Skip to main content
JR2963
Senior II
October 27, 2022
Solved

HAL_SAI_Receive_DMA does not work (STM32H74xx)

  • October 27, 2022
  • 1 reply
  • 1306 views

Hi,

I use SAI interface for reading data: 8 of 32bit slots -> 256 Bytes

This work fine:

uint32_t GlSAI_DMA_Buff[8];
....
HAL_SAI_Receive(&hsai_BlockB3,(uint8_t *) GlSAI_DMA_Buff, 8, 0xffffff);

When I use DMA like this:

HAL_SAI_Receive_DMA(&hsai_BlockB3,(uint8_t *) GlSAI_DMA_Buff, 8);

It only recieve 1 Byte:

Then only GlSAI_DMA_Buff[0] is equal to 0x52 - but there should be something like 0x5260A246 , in other places are also zeros...

When I try another DMA for mem to mem (on GlSAI_DMA_Buff ) it works fine - so probably my MPU for disabling Cache is set correctly.

Any advice please?

This topic has been closed for replies.
Best answer by JR2963

OK, the Cube did not enable clock for DMA - so no DMA setting was transfered to DMA registers...

1 reply

JR2963
JR2963AuthorBest answer
Senior II
October 27, 2022

OK, the Cube did not enable clock for DMA - so no DMA setting was transfered to DMA registers...