cancel
Showing results for 
Search instead for 
Did you mean: 

Help understand bits mapping in SPDIFRX_Loopback example

jmf1
Associate III
Posted on November 03, 2016 at 09:49

Dear all,

In need to implement SPDIFTX with a nucleo board. In want to rely on the SPDIFRX_Loopback example provided for the STM32F769I-Discovery, part of Cube_FW_F7 package.

This example seems to implement exactly what I need: send 16 bits stereo data to SPDIF and then compare the looped back results.

The SPDIF -TX data width is fixed to 24 bits (reference manual). I don't understand in the example when/how is performed the 16 bits to 24 bits adjustment and alignment to have the significant bits in the right place.  

DMA transfer to SAI is set to be from halfword to halfword. How is it done that we don't have SAI send to the TX line a word (two consecutive values grouped, which would be bad), or 24 bits but with the provided halfword in the bad place.

Any help to understand the underlying mechanism would be greatly appreciated.

Best regards,

JM

#f7
0 REPLIES 0