2023-12-18 4:34 PM - edited 2023-12-18 4:37 PM
On a Nucleo-H563ZI with CubeIDE 1.14.0 and firmware package for H5 1.1.1.
I managed to get SPI transmit and receive using DMA, triggered by a timer, going not using linked lists. I get my requested number of transmissions and results into my buffers as witnessed on an oscilloscope and a live watchpoint.
But when I enable circular mode, no other modifications, in MX_SPI1_Init - HAL_SPI_Init - HAL_SPI_MspInit it sets up
NodeConfig.Init.SrcDataWidth = DMA_SRC_DATAWIDTH_WORD;
NodeConfig.Init.DestDataWidth = DMA_DEST_DATAWIDTH_HALFWORD;
builds the node (whatever that is), inserts it into the correct DMA channel, sets circular mode, basically looks like magic but I can imagine what it is doing. But then the stuff in the NodeConfig doesn't get applied to handle_GPDMA1_Channel1, so later when I finally call HAL_SPI_TransmitReceive_DMA, it gets grumpy around line 2230 because hspi->hdmarx->Init is all zeros still. It never got updated maybe?
I think there is a problem with HAL_SPI_MspInit in stm32h5xx_hal_msp.c .
Thanks,
Andrei (from the Great (not very) White North)
2026-01-22 2:52 PM
Also, in another project I use GPDMA circular mode with ADCs and it works nicely. Plus DMA for UART. No problem.
It's just SPI (standard request mode in CubeMX) that is being grumpy.