This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320DAC3100: Setting Registers for Audio Beep

Part Number: TLV320DAC3100

I've designed the TLV320DAC3100 audio chip into a product that we're developing and have been using the TLV320DAC3100 EVM and documents slas671c and slaa446 to decipher the register setting to produce an audio beep. This is the 1st step in bringing up the audio system on this board, eventually we also want to be able to produce short audio sound bites for different product functions.

I've created the attached 'Byte Beep 0_1s 2KHz Script.txt' file that I can play through the EVM software to produce a beep and I've also attached the equivalent 'audio_beep.c' C code function that I'm using on our board.

Our board uses a STM32F746 processor that is providing a 12.286MHz MCLK and 3.072MHz BCLK to the TLV320DAC3100 chip, and the WCLK line is held high and we're not clocking any DIN data. I've attached the schematic for our audio section.

I've modeled our attached 'TLV320DAC3100_Init.c' function around the 'AIC3111_USB_Init.txt' script that appears to be what's used to init the EVM.

Using our TLV320DAC3100_Init.c function to initialize the TLV320DAC3100 on our board produces a believable output from audio chip (see audio chip output) with a switching frequency on about 389.7KHz.

Running our 'audio_beep.c' function on our board produces no audible output on the speaker.

I've tried several variations of the initialization based on various TI docs and other TLV320DAC3100 threads in this forum, but haven't been able to produce a beep on our board. There must be some register value that I've improperly set or neglected to set, but I haven't been able to find it.

Thanks in advance for any help in resolving this issue!


Steve

/cfs-file/__key/communityserver-discussions-components-files/6/1856.Byte-Beep-0_5F00_1s-2KHz-Script.txt

/cfs-file/__key/communityserver-discussions-components-files/6/6562.audio_5F00_beep.c

Audio Schematic

/cfs-file/__key/communityserver-discussions-components-files/6/0714.TLV320DAC3100_5F00_Init.c

audio chip output

  • Hi Steve,

    My colleague will be responding soon with further information.

    Best Regards
    José Luis Figueroa
    Audio Applications Engineer
  • Hi Steve,

    Audio_Beep.c file is only setting the values for beep generation. You would first need to initialize the device like TLV320DAC3100_Init.c Are you doing it this way? Or are you running only Audio_Beep.c file?
    Speaker output is a Class-D amplifier so the signal you're seeing at the output is the modulated signal from the speaker driver.

    Best regards,
    -Ivan Salazar
    Audio Applications Engineer - Low Power Audio & Actuators
  • Yes, the TLV320DAC3100_Init.c file contain the code that I use to initialize the audio chip before executing the Audio_Beep.c file.

    Yesterday I was attempting to actually stream audio to the device and I found that once I fully setup the host to output a stream to the audio chip, that the beep code worked also. Previously, I'd only setup the I2S clock generator to provide the MCLK and BCLK clocks to the audio chip, but it appears that you need to write something to the I2S port before that audio chip beep generator will work. Is this normal in that you have to write something over the I2S interface before the beep generator will function?


    In my application I'm only using the audio chip for annunciation of key presses and other operational status and fault indication for the instrument, so I'm looking to use a mono 8ksps bit stream. What's the best interface mode (I2S, DSP or etc) for a single channel stream? How should you handle the FS signal for a mono stream if using the I2S mode?

    Thanks,

    Steve

  • Steve,

    Digital interface is usually two channel, eg DSP begins at the falling edge of WCLK with left channel and immediately after it ends the right channel comes in. I2S mode uses Low state of WCLK for streaming left channel and High state of WCLK for streaming right channel.
    If you want a mono streaming you can use one of the channels or send the same data for both channels and configure the device to use data coming from one of the channels or use the sum of both channels divided by 2.

    Best regards,
    -Ivan Salazar
    Audio Applications Engineer - Low Power Audio & Actuators
  • Ivan, thanks.


    I was able to set my system up for a single channel using the TDM mode with a single slot (2 slots but only 1 active), and I can now stream and play a mono sound file to the audio chip.

    The digital beep generation will only work after I've first sent a stream over the I2S bus and will then function whether or not a stream is flowing. I would have thought that simply having MCLK and BCLK active would have been sufficient to use the beep generator, but that doesn't seem to be the case. I can only get the beep generator to work if there's been a previous stream on the I2S interface.

    Thanks,

    Steve