2023-12-31 7:36 AM
Hi, I am trying to use DMA in my project for SPI and noticed there are 2 type definitions as below:-
SPI_HandleTypeDef hspi1;
DMA_HandleTypeDef hdma_spi1_tx;
Which one do I need to use for SPI transmission as I am having problems using 'hspi1' as below:-
HAL_SPI_Transmit_DMA(&hspi1, "Test",sizeof"Test");
HAL_SPI_Transmit_DMA(&hdma_spi1_tx, "Test",sizeof"Test");
I just wasn't sure which handle was the correct to use...
Solved! Go to Solution.
2023-12-31 8:10 AM
afaik you need it to do this way:
HAL_DMA_Init(&hdma_spi1_tx);
HAL_SPI_Transmit_DMA(&hspi1, "Test",sizeof"Test");
2023-12-31 8:02 AM
2023-12-31 8:10 AM
afaik you need it to do this way:
HAL_DMA_Init(&hdma_spi1_tx);
HAL_SPI_Transmit_DMA(&hspi1, "Test",sizeof"Test");
2024-01-08 2:58 AM
Hi,
Thanks for the explanation I now understand!