Question
STM32F4 I2S with DMA connected to Audio Codec, converting long to float
Posted on August 19, 2013 at 13:54
Hi,
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.cheersmig #stm32f4-i2s-dma-24bit-codec