2016-09-02 05:03 AM
The documentation (DOCID027704 Rev 5) states
At the end of data transfer HAL_DMA_IRQHandler() function is executed and user can add his own function by customization of function pointer XferCpltCallback and XferErrorCallback (i.e. a member of DMA handle structure).I have used this feature for the STM32L0xx but it does not work for STM32L4xx any longer. This is because
HAL_DMA_init()
zeroes the pointers. I am aware that I can still override theweak
callback handlers. Are the callback pointers zeroed on purpose and is the documentation outdated? Is the use ofDMA_HandleTypeDef
for setting callback pointers deprecated? #hal-dma_handletypedef-callback2016-09-09 04:49 AM
Hi kleier.hermann,
Maybe you have not correctly configured that. As a response for you questions, I recommend that you check the DMA example inside the ''DMA_FlashToRAM'' where the complete and error callbacks are configured and used. The example is at this path: STM32Cube_FW_L0_V1.7.0\Projects\STM32L073Z_EVAL\Examples\DMA\DMA_FLASHToRAM -Hannibal-2016-09-11 01:54 PM
Exactly. The example (and five other similar examples) in the
STM32Cube_FW_L0_V1.7.0 package show howDmaHandle.XferCpltCallback
can be used to redirect the callback to a local function. The examples have been there in V 1.6.0 too. And this is what I meant when I wrote “I have used this feature for the STM32L0xx�. Alas, there are no such examples in the STM32Cube_FW_L4_V1.5.0 tree. And though it is still documented there, it does not work for the STM32L4 package. Is this a bug? Has it been deprecated? Hermann Kleier