Skip to main content
NNagy.1
Associate III
June 13, 2020
Question

I2S 24-bit interface, DMA data/memory alignment?

  • June 13, 2020
  • 2 replies
  • 908 views

For 24-bit I2S, should the data/memory alignment be configured to a word because it's 24-bit data on a 32-bit frame, or should it be configured to a half-word because SPIx_DR is a 16-bit register?

This topic has been closed for replies.

2 replies

Piranha
Principal III
June 13, 2020

I suggest starting to read reference manual, because it explains it pretty clearly, but you didn't even care to write your MCU part number. You cannot do 32-bit writes to 16-bit register, therefore the correct answer is the second one - two 16-bit writes.

If your MCU has it, SAI peripheral is preferred for audio protocols.

waclawek.jan
Super User
June 13, 2020

If this is the two-port DMA, the memory-side alignment requirement is given by the DMA itself, if the FIFO is used (i.e. not in direct mode). Read the DMA chapter in RM.

JW