SBAA600 October   2024 TAA5212 , TAC5111 , TAC5112 , TAC5211 , TAC5212

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Voice Activity Detection
    1. 2.1 VAD Configurations
      1. 2.1.1 User, Auto, Intermediate
      2. 2.1.2 VAD With ADC Recording
      3. 2.1.3 VAD Monitoring Channel
      4. 2.1.4 VAD Interrupt Pin
      5. 2.1.5 MICBIAS Enable During PDM Monitoring
      6. 2.1.6 VAD Clock Configurabilty
    2. 2.2 VAD Parameters
      1. 2.2.1 Initial Learning Period
      2. 2.2.2 Hold Over Counter
      3. 2.2.3 Wakeup Wait
      4. 2.2.4 Threshold
  6. 3VAD Performance Results
  7. 4Examples
  8. 5Summary
  9. 6References

Examples

This section presents six examples for configuring the VAD.

Example 1: The following example code shows configuration for using the VAD in User Initiated Mode with analog microphone on CH1.


# 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

Example 2: The following example code shows configuration for using the VAD in Automatic Power Up and Power Down Mode with analog microphone on CH1.


# 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

Example 3: The following example code shows configuration for using the VAD in Automatic Power Up with User-Initiated Power Down Mode with analog microphone on CH1.

# 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

Example 4: The following example code shows the configuration for using the VAD in User Initiated Mode with digital microphone on CH1.

# 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 

Example 5: The following example code shows the configuration for using the VAD in Automatic Power Up and Power Down mode with digital microphone on CH1.

# 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 

Example 6: The following example code shows the configuration for using the VAD in Automatic Power Up with User-Initiated Power Down Mode with digital microphone on CH1.

# 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