AnsweredAssumed Answered

How works the function HAL_SAI_Transmit_DMA()

Question asked by Gia Hung Tran on Jul 26, 2017
Latest reply on Aug 1, 2017 by Imen D

Hi Communities, 


can any body please explain me, how works exactly the function HAL_SAI_Transmit_DMA(). I am using STM32F746VGTX.

This is one example:


uint8_t TestArray[4] = {0x00,0xff,0x00,0x00};

HAL_SAI_Transmit_DMA(hsai, TestArray, 1);


my configuration of Sai for the transmitter: 

hsai_BlockA1.Instance = SAI1_Block_A;
hsai_BlockA1.Init.AudioMode = SAI_MODEMASTER_TX;
hsai_BlockA1.Init.Synchro = SAI_ASYNCHRONOUS;
hsai_BlockA1.Init.OutputDrive = SAI_OUTPUTDRIVE_DISABLE;
hsai_BlockA1.Init.NoDivider = SAI_MASTERDIVIDER_ENABLE;
hsai_BlockA1.Init.FIFOThreshold = SAI_FIFOTHRESHOLD_FULL;
hsai_BlockA1.Init.AudioFrequency = SAI_AUDIO_FREQUENCY_8K;
hsai_BlockA1.Init.SynchroExt = SAI_SYNCEXT_DISABLE;
hsai_BlockA1.Init.MonoStereoMode = SAI_STEREOMODE;
hsai_BlockA1.Init.CompandingMode = SAI_NOCOMPANDING;
hsai_BlockA1.Init.TriState = SAI_OUTPUT_NOTRELEASED;
if (HAL_SAI_InitProtocol(&hsai_BlockA1, SAI_PCM_LONG, SAI_PROTOCOL_DATASIZE_16BIT, 2) != HAL_OK)


Thank you for your help!