AnsweredAssumed Answered

STM32F4 I2S with DMA connected to Audio Codec, converting long to float

Question asked by Mig on Aug 19, 2013
Latest reply on Feb 12, 2015 by waclawek.jan

I have the I2S running on STM32F4 with DMA and Interrupt connected to a 24 bit AD/DA codec, which works fine. I receive/transmit the 64 bit frame based on 4 DMA transfers between SPIx->DR and Memory.

Unfortunately the order of the Hi and Lo short (16 bit) is vice versa and I need to exchange the 16 Bit values to get a 32 bit Long, containing the 24 bit Audio in a correct order, to convert them via 'vcvt.s32.f32' and 'vcvt.f32.s32' to float and back.

Is there a possiblity to receive/transmit the 16 bit values in a correct order, without manually exchanging them? I'm not sure if the DMA FIFO could be an option, or how to configure this function correctly.