SLAAED8 October   2024 TAC5111 , TAC5112 , TAC5211 , TAC5212 , TAC5412-Q1 , TAD5112 , TAD5212

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Signal Generator 1 (SG1)
    1. 2.1 Signal Generator 1 Introduction
    2. 2.2 Signal Generator 1 Amplitude and Output Channels
    3. 2.3 Signal Generator 1 Frequency
    4. 2.4 Generating Register Coefficients Using PPC3
  6. 3ADSR Envelope Parameters
    1. 3.1 ADSR Introduction
    2. 3.2 Restart and Sustain Timers
    3. 3.3 Attack, Release, and Decay Timers
    4. 3.4 Sustain Level
    5. 3.5 ADSR Envelope Example Script
    6. 3.6 Ultrasonic Activity Detection (UAD) ADSR Mode
  7. 4Signal Generator 2 (SG2)
    1. 4.1 Signal Generator 2 Introduction
    2. 4.2 Signal Generator 2 Amplitude
    3. 4.3 Signal Generator 2 Frequency
    4. 4.4 Signal Generator 2 Modes
      1. 4.4.1 Manual Mode
      2. 4.4.2 Continuous Pulse Mode
      3. 4.4.3 One Shot Mode
  8. 5Summary

Restart and Sustain Timers

Registers B0_P28_R80 (0x50) to B0_P28_R83 (0x53) configure restart time. Registers B0_P28_R84 (0x54) to B0_P28_R87 (0x57) configure sustain time. Refer to Table 3-2.

The restart time is the time for a configured pulse to repeat, while the sustain time is the length of the pulse configured.

Restart and Sustain timers are based off the number of samples retrieved from an operating sampling frequency, fs. Restart time must always be configured to be longer than sustain time. Table 3-1 generates possible I2C configurations for both parameters based off a 48KHz sampling frequency. The desired time is generated based on scaling samples with respect to the sampling frequency. These two timers are not available in all SG2 modes.

Table 3-1 Restart and Sustain Timer Correlation Table
kspsNumber of Samples Per Timer

I2C Command Script

Desired Time

48000d’4800x000001E010ms
48000d’4,8000x000012C0100ms
48000d’48,0000x0000BB801s
48000d’480,0000x0007530010s

The formula below generates a 32-bit hex register coefficients for both restart and sustain timers.

Equation 10. Reg.Coeff=DEC2HEXMODROUNDk× 20, 0, 232,8

where k is the number of samples per timer.

Restart and sustain timers have been demonstrated in Continuous Pulse Mode example script. These are all 32-bit I2C commands. Refer to this image to locate restart and sustain timer GUI in PPC3. The scrolls generate hex values in I2C monitor.

Find more info on using PPC3 here Generating Register Coefficients Using PPC3.

Table 3-2 Programmable Restart Timer Registers

Page

Register

Description

Reset value

0x1C

0x50

DAC_ADSR_RESTART_BYT1[7:0]

0x00

0x1C

0x51

DAC_ADSR_ RESTART _BYT2[7:0]0x00

0x1C

0x52

DAC_ADSR_ RESTART _BYT3[7:0]0x00

0x1C

0x53

DAC_ADSR_ RESTART _BYT4[7:0]0x00
Table 3-3 Programmable Sustain Timer Registers
PageRegisterDescriptionReset Value
0x1C0x54DAC_ADSR_SUSTAIN_BYT1[7:0]0x00
0x1C0x55DAC_ADSR_SUSTAIN _BYT2[7:0]0x00
0x1C0x56DAC_ADSR_SUSTAIN _BYT3[7:0]0x00
0x1C0x57DAC_ADSR_SUSTAIN _BYT4[7:0]0x00