Electrical – Synchronize internal DAC to I2S on STM32F4

dacdmai2sstm32f4synchronization

I have a CS4344 DAC connected to my STM32F407 outputting sound at a 44.1kHz rate with DMA and I2S and I would like to output and envelope signal through the internal DAC of the STM32F4, in sync with the I2S.

I could use a timer at a frequency of 44.1kHz but the 2 outputs wouldn't be in sync.

Is it possible to use the I2S WS clock to trigger the DAC conversion? So that everytime a sample is sent through I2S, a sample is converted through the internal DAC?

Thanks in advance!

Best Answer

I was not able to figure that out in the STM chips.

I had to solve a very similar problem to yours (phase-locked DMA transfers). I had to move to the NXP Kinetis chip to do it. The Kinetis has a few

 - DMA channels where requests can be gated by the
     -> Programmable Interrupt timer, 
         ->which can also trigger the programmable delay block, 
             ->which can trigger the flexible timer module, 
                 ->which can be configured to start the DAC conversion. 

It was a "clever" (brittle, hardware-dependent) solution. But I needed it, and it worked.