HAL_SAI_Transmit_IT data
I'm using the NUCLEO board NUH723 to develop a project and I need to understand better how the HAL_SAI_Transmit_IT works.
In my code I use the HAL_SAI_Transmit_IT to send data to the SAI1 interface --> 48KHz, stereo,32bit:
I have to send two buffer of 128 word (Arxbuff31 and Brxbuff31, stereo,32bits),
uint8_t DAC_Buffer[BUFFER_SIZE]; // __attribute__ ((aligned (4)));
uint8_t ADC_Buffer[BUFFER_SIZE]; // __attribute__ ((aligned (4)));
int32_t *p31;
q31_t Arxbuff31[128],Brxbuff31[128];
p31=(q31_t *)DAC_Buffer;
for(x=0;x<128;x++){
*p31++=Arxbuff31[x];
*p31++=Brxbuff31[x];
}
----
----
while(!RxDataReady);
status=HAL_SAI_Transmit_IT(&hsai_BlockA1,DAC_Buffer,256);
----
RxDataReady=0;
----
In what way the data must be stored in the output buffer (DAC_Buffer) for both the channels ?
(I suppose Left4bytes,Right4bytes,Left4bytes,....)
The "size" parameter has to set to the 2*128 ?
Thank you, Luigi
