cancel
Showing results for 
Search instead for 
Did you mean: 

No trigger of HRTIM burst DMA controller

PGONOVEA
Associate

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:

  • It seems that the BDMADR is never updated because when I put data directly into it, the CMP1xR is updated correctly.
  • I suspect that the HRTIM burst DMA controller is never triggered, but I could be wrong.

What I also tried:

  • I tried without the debugger, which can be intrusive, but the PWM duty cycle, which should match the value in Reg_Update, is also never updated.
  • I tried to repeat the steps with another board (STM32F3348-DISCO) without success.


Did I miss something? Do you have any idea why the CMP1xR is not updated?

1 REPLY 1
Pierre_Paris
ST Employee

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.