2024-07-31 06:42 PM
Hi All!
I have a issue about SPI DMA communication on NUCLEO-H563 Board. Details are as follows.
My Configuration of STM32CubeMx as shown in the figure1 and 2.
figure1
figure2
I call the function of HAL_SPI_TransmitReceive_DMA(), it comes to line 2212 of program and return HAL_ERROR then.
I debug the program and find the value of hspi->hdmarx->Init.DestDataWidth is 0, so it return the error.
Then I back to check the initialization of spi1 dma. I find that the Init.DestDataWidth of handle_GPDMA1_Channel2 is already 0 before execute statement __HAL_LINKDMA() .
So I guess maybe somewhere my configuration of spi dma is wrong somewhere and I can't figure it out.
Please help me for this question.
Thanks!
2024-07-31 08:55 PM
To me, the code you show seems to be setting the dest width on a linked list node, and there's also a call to set the DMA to circular mode. But your configuration is in standard request mode, and circular mode is disabled.
Could you be looking at the wrong place?
If you attach the .ioc file it'd be much easier for forum members to double check what your doing.