cancel
Showing results for 
Search instead for 
Did you mean: 

Can't make SPI work via DMA. STM32H7xx HAL.

Spider
Associate II

Hello!

Trying to launch SPI via DMA data transfer to LCD display. I has created "default" project via cube master.

Created SPI2 for LCD display in 8bit Master Transfer Only mode.

Added DMA1 Stream 0 to SPI2_TX Mem to Perif.

In code I do:

static uint8_t buff[28800] __attribute__ ((aligned (32))); //in result buff in RAM_D1 - i have checked it.
 
MX_SPI2_Init();
MX_DMA_Init();
....
HAL_SPI_Transmit(&hspi2, buff, chunk_size, HAL_MAX_DELAY);  // This Code work FINE.
....
HAL_SPI_Transmit_DMA(&hspi2, buff, chunk_size); //This Code NOT work.

No I or D caches are enabled in Cube.

How to make it work? :tired_face:

0 REPLIES 0