cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to know the instantaneous data/sample that has been sent by the I2S DMA transfer

akosodry
Associate II
Posted on June 22, 2016 at 12:46

Hello.

I have a successfully configured the I2S peripheral that continously sends (with the desired frequencies) a vector of data to an external DAC. The transmission is done with the HAL_I2S_Transmit_DMA function.

Since the transmission is done in the background, i don't really know, if it is possible to monitor (or know) the instantaneous data/sample (e.g. the 64 bit (L and R) data, or 32bit (L or R)) that has been sent with the I2S? I mean on a register which can be read every time the new instantaneous data has been sent. 

Thanks for the feedback in advance.

Best regards.

#i2s #stm32 #stm32f4 #dma #discovery
3 REPLIES 3
Posted on June 22, 2016 at 14:27

Not really, one usually establishes a timebase, and synchronizes to that via the DMA HT and TC interrupts/signals, that way you have a clear feeling about what data is transiting at any given instance.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
akosodry
Associate II
Posted on June 22, 2016 at 14:51

The reference manual says on the page 903, that 

'' The TXE flag is set after each transfer from the Tx buffer to the shift register and an interrupt is generated if the TXEIE bit in the SPI_CR2 is set''

Can we use this interrupt to identify the instantaneous sample that is sent?

AvaTar
Lead
Posted on June 22, 2016 at 15:04

> '' The TXE flag is set after each transfer from the Tx buffer to the shift register and an interrupt is generated if the TXEIE bit in the SPI_CR2 is set''

 

But that would exclude DMA, wouldn't it ?