I2S DMA data width question. Word vs half word.
So I got i2s working great on a stm32f4 based on this video
https://www.youtube.com/watch?v=lNBrGOk0XzE&list=WL&index=7
which has DMA set to circular, half word.
and we start the i2s with
HAL_I2SEx_TransmitReceive_DMA (&hi2s2, txBuf, rxBuf, 4); 4 being the "size" or amount of 16 bit messages
We do the half callback and the complete callback and both do this
//restore signed 24 bit sample from 16-bit buffers
int lSample = (int) (rxBuf[0]<<16)|rxBuf[1];
int rSample = (int) (rxBuf[2]<<16)|rxBuf[3];
//restore to buffer
txBuf[0] = (lSample>>16)&0xFFFF;
txBuf[1] = lSample&0xFFFF;
txBuf[2] = (rSample>>16)&0xFFFF;
txBuf[3] = rSample&0xFFFF;
This all works great on f4 but the problem is when I switch to H7.
I can only get data to be populated into the rx if I have the DMA set to "Word" instead of half word.
So my question is do I need to change the size of the 2SEx_TransmitReceive?
Do I still need to do this to get the data?
//restore signed 24 bit sample from 16-bit buffers
int lSample = (int) (rxBuf[0]<<16)|rxBuf[1];
int rSample = (int) (rxBuf[2]<<16)|rxBuf[3];
I'm just a little confused on what I need to do to make it work correctly.
