2024-03-06 1:25 AM
Hi,
I want to update multiple HRTIM registers with a single DMA request on a STM32G474RE. To do this, I am trying to follow this simple Getting started with HRTIM tutorial, which has a section "#To_go_further_about_DMA_burst" on the board "B-G474E-DPOW1".
At the end of the tutorial we should see the CMP1xR updated with the value we set in Reg_Update after executing the HAL_HRTIM_BurstDMATransfer call in the debugger, but the register is not updated.
I followed the tutorial exactly, using CubeIDE to configure and generate code.
My analysis:
Going deeper into the function calls, I can see that the CPAR and CMAR registers are set correctly: CPAR contains the address of BDMADR (0x400177f0) and CMAR contains the address of Reg_Update (0x20000000). Then DMA is enabled and every statuses returned by HAL_DMA_Start_IT and HAL_HRTIM_BurstDMATransfer are HAL_OK. But there is no transfer to the CMP1xR.
My conclusions:
What I also tried:
Did I miss something? Do you have any idea why the CMP1xR is not updated?
2024-03-11 3:13 AM
Hello @PGONOVEA,
Thank you for your comment, which has helped us to improve the article !
Indeed, one step is missing. You need to declare the direction as being from memory to memory in the HRTIM DMA handler :
hdma_hrtim1_a.Init.Direction = DMA_MEMORY_TO_MEMORY;Can you try and tell me if it's better now ?
Kind Regards,
Pierre
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.