eDMA with different source/destination data sizes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eDMA with different source/destination data sizes

562 Views
jvalenzuela
Contributor I

I have an application that requires a TDM8 stream to be transmitted using the I2S/SAI module. Said stream consists of eight channels of 16-bit audio. The receiver requires each TDM frame to be 32 bytes, or 256 bits, in length regardless of the actual data size. Using MSB-first transmission, each frame should begin with the MSB-LSB of the first channel, followed by 16 empty bits, then the MSB-LSB of the second channel, another 16 empty bits, and so on. To conserve memory, the source buffer within the Kinetis is an array of int16_t, so there is no padding between channels. Is it possible to configure the eDMA to read 16-bit data from the source, and write 32-bit data to the I2S TX FIFO?

Thank you,

Jason Valenzuela

Tags (3)
0 Kudos
1 Reply

429 Views
EarlOrlando
Senior Contributor II

Hello Jason,

Yes, the eDMA can do the padding automatically, the source data transfer size can be different than the destination data transfer size (please take a look into the DMA_TDCn_ATTR[SSIZE] and DMA_TDCn_ATTR[DSIZE] register fields).

Does this answer your question? If it doesn't please don't hesitate in contact me.

Best regards,

Earl.

0 Kudos