For processors with GPDMA peripherals and "linked lists" support, Cube generates sufficient code for linked list Node initialisations and uses HAL_DMAEx_List_Init correctly. But doesn't bother populating the DMA Channel Init structure with the HAL_DMA_Init, leaving Channels SrcDataWidth, DestDataWidth elements unconfigured.
This is probably correct and sufficient to configure the peripheral, however HAL DMA functions only check the DMA Init structure, and not the Node structure, and unnecessarily reject the configuration:
Above check on SrcDataWidth fails the call, as it was never initialised in the HAL_SPI_MspInit function
The issues made worse, as Cube preferes to use "linked lists" for circular buffers, rather than a standard buffer, meaning Cube generated code with circular buffers don't work with HAL drivers.
Unfortunately, I couldn't reproduce the behavior. Could you please provide the steps to reproduce this issue? Additionally, could you let me know which series you are working on?
For processors with GPDMA peripherals and "linked lists" support, Cube generates sufficient code for linked list
Node
initialisations and usesHAL_DMAEx_List_Init
correctly. But doesn't bother populating theDMA Channel Init
structure with theHAL_DMA_Init
, leaving ChannelsSrcDataWidth
,DestDataWidth
elements unconfigured.This is probably correct and sufficient to configure the peripheral, however HAL DMA functions only check the DMA Init structure, and not the Node structure, and unnecessarily reject the configuration:
For example:
Above check on
SrcDataWidth
fails the call, as it was never initialised in theHAL_SPI_MspInit
functionThe issues made worse, as Cube preferes to use "linked lists" for circular buffers, rather than a standard buffer, meaning Cube generated code with circular buffers don't work with HAL drivers.
Kind regards, Oz