ZHCAEK6 October   2024 TAC5212

 

  1.   1
  2.   摘要
  3.   商标
  4. 1引言
  5. 2语音活动检测
    1. 2.1 VAD 配置
      1. 2.1.1 用户、自动、中间
      2. 2.1.2 具有 ADC 记录功能的 VAD
      3. 2.1.3 VAD 监控通道
      4. 2.1.4 VAD 中断引脚
      5. 2.1.5 在 PDM 监控期间启用 MICBIAS
      6. 2.1.6 VAD 时钟可配置性
    2. 2.2 VAD 参数
      1. 2.2.1 初始学习周期
      2. 2.2.2 保持计数器
      3. 2.2.3 唤醒等待
      4. 2.2.4 阈值
  6. 3VAD 性能结果
  7. 4示例
  8. 5总结
  9. 6参考资料

示例

本节提供了六个有关如何配置 VAD 的示例。

示例 1:以下示例代码显示了在用户启动模式下,在 CH1 上使用 VAD 和模拟麦克风所需的配置。


# Key: w A0 XX YY ==> write to I2C address 0xA0, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w A0 00 00 # Goto Page 0
w A0 01 01 # Software reset
d 10       # Wait for 16 ms
w A0 02 09 # Device wake up, Power up VREF and DREG
w A0 42 A0 # Interrupt asserts on live events, active high
w A0 0A 31 # GPIO is IRQ w Drive Strength Active Low and Active High
#
w A0 00 01 # Goto Page 1
w A0 33 DF # Unmask VAD Power Up Detect
w A0 1E 02 # User Initiated power up, VAD on CH1
#
w A0 00 0D # Goto Page D
w A0 0D 00 8F 47 35 # Threshold Value of -5dB
w A0 70 00 4E 20 00 # ILP of 2.5s
#
w A0 00 00 # Goto Page 0
w A0 76 80 # Enable CH1
w A0 78 A4 # ADC,MICBIAS, and VAD Power On

示例 2:以下示例代码显示了在自动上电和断电模式下,在 CH1 上使用 VAD 和模拟麦克风所需的配置。


# Key: w A0 XX YY ==> write to I2C address 0xA0, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w A0 00 00 # Goto Page 0
w A0 01 01 # Software reset
d 10       # Wait for 16 ms
w A0 02 01 # Device wake up, Power up only DREG, VAD will power up VREF
w A0 42 A0 # Interrupt asserts on live events, active high
w A0 0A 31 # GPIO is IRQ w Drive Strength Active Low and Active High
#
w A0 00 01 # Goto Page 1
w A0 33 DF # Unmask VAD Power Up Detect
w A0 1E 42 # Automatic Powerup/down, VAD on CH1
#
w A0 00 0D # Goto Page D
w A0 0D 00 8F 47 35 # Threshold Value of -5dB
w A0 70 00 4E 20 00 # ILP of 2.5s
w A0 00 0E # Goto Page E
w A0 08 00 9C 40 00 #Set wakeup wait to 5s
#
w A0 00 00 # Goto Page 0
w A0 76 80 # Enable CH1
w A0 78 24 # VAD, MICBIAS Power On

示例 3:以下示例代码显示了在自动上电和用户启动断电模式下,在 CH1 上使用 VAD 和模拟麦克风所需的配置。

# Key: w A0 XX YY ==> write to I2C address 0xA0, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w A0 00 00 # Goto Page 0
w A0 01 01 # Software reset
d 10       # Wait for 16 ms
w A0 02 01 # Device wake up, Power up only DREG, VAD will power up VREF
w A0 42 A0 # Interrupt asserts on live events, active high
w A0 0A 31 # GPIO is IRQ w Drive Strength Active Low and Active High
#
w A0 00 01 # Goto Page 1
w A0 33 DF # Unmask VAD Power Up Detect
w A0 1E 82 # VAD Automatic Powerup/User Initiated Powerdown, VAD on CH1
#
w A0 00 0D # Goto Page D
w A0 0D 00 8F 47 35 # Threshold Value of -5dB
w A0 70 00 4E 20 00 # ILP of 2.5s
#
w A0 00 00 # Goto Page 0
w A0 76 80 # Enable CH1
w A0 78 A4 # ADC,VAD, MICBIAS Power On

示例 4:以下示例代码显示了在用户启动模式下,在 CH1 上使用 VAD 和数字麦克风所需的配置。

# Key: w A0 XX YY ==> write to I2C address 0xA0, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w A0 00 00 # Goto Page 0
w A0 01 01 # Software reset
d 10       # Wait for 16 ms
w A0 02 09 # Device wake up, VREF and DREG Powered Up
w A0 0C 41 # GPO1 is PDM Clock output, Active Low and Active High
w A0 0D 02 # GPI1 is enabled
w A0 13 EC # GPI1 is PDM Data Input CH1 and 2
w A0 42 A0 # Interrupt asserts on live events, active high
w A0 0A 31 # GPIO is IRQ w Drive Strength Active Low and Active High
#
w A0 00 01 # Goto Page 1
w A0 33 DF # Unmask VAD Power Up Detect
w A0 1E 02 # User Initiated power up, VAD on CH1
#
w A0 00 0D # Goto Page D
w A0 0D 00 8F 47 35 # Threshold Value of -5dB
w A0 70 00 4E 20 00 # ILP of 2.5s
#
w A0 00 00 # Goto Page 0
w A0 76 80 # Enable CH1
w A0 78 A4 # ADC, MICBIAS, and VAD Power On 

示例 5:以下示例代码显示了在自动上电和断电模式下,在 CH1 上使用 VAD 和数字麦克风所需的配置。

# Key: w A0 XX YY ==> write to I2C address 0xA0, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w A0 00 00 # Goto Page 0
w A0 01 01 # Software reset
d 10       # Wait for 16 ms
w A0 02 09 # Device wake up, VREF and DREG Powered Up
w A0 0C 41 # GPO1 is PDM Clock output, Active Low and Active High
w A0 0D 02 # GPI1 is enabled
w A0 13 EC # GPI1 is PDM Data Input CH1 and 2
w A0 42 A0 # Interrupt asserts on live events, active high
w A0 0A 31 # GPIO is IRQ w Drive Strength Active Low and Active High
#
w A0 00 01 # Goto Page 1
w A0 33 DF # Unmask VAD Power Up Detect
w A0 1E 42 # VAD Automatic Power up/down, VAD on CH1
#
w A0 00 0D # Goto Page D
w A0 0D 00 8F 47 35 # Threshold Value of -5dB
w A0 70 00 4E 20 00 # ILP of 2.5s
w A0 00 0E # Goto Page E
w A0 08 00 9C 40 00 #Set wakeup wait to 5s
#
w A0 00 00 # Goto Page 0
w A0 76 80 # Enable CH1
w A0 78 24 # VAD, MICBIAS Power On 

示例 6:以下示例代码显示了在自动上电和用户启动断电模式下,在 CH1 上使用 VAD 和数字麦克风所需的配置。

# Key: w A0 XX YY ==> write to I2C address 0xA0, to register 0xXX, data 0xYY
#               # ==> comment delimiter
# See the corresponding EVM user guide for jumper settings and audio connections.
################################################################
#
#
# Power up IOVDD and AVDD power supplies 
# Wait for 1ms.
#
w A0 00 00 # Goto Page 0
w A0 01 01 # Software reset
d 10       # Wait for 16 ms
w A0 02 09 # Device wake up, VREF and DREG Powered Up
w A0 0C 41 # GPO1 is PDM Clock output, Active Low and Active High
w A0 0D 02 # GPI1 is enabled
w A0 13 EC # GPI1 is PDM Data Input CH1 and 2
w A0 42 A0 # Interrupt asserts on live events, active high
w A0 0A 31 # GPIO is IRQ w Drive Strength Active Low and Active High
#
w A0 00 01 # Goto Page 1
w A0 33 DF # Unmask VAD Power Up Detect
w A0 1E 82 # VAD Automatic Powerup/User Initiated Powerdown, VAD on CH1
#
w A0 00 0D # Goto Page D
w A0 0D 00 8F 47 35 # Threshold Value of -5dB
w A0 70 00 4E 20 00 # ILP of 2.5s
#
w A0 00 00 # Goto Page 0
w A0 76 80 # Enable CH1
w A0 78 A4 # VAD, MICBIAS Power On