cancel
Showing results for 
Search instead for 
Did you mean: 

HRTIM register update with Burst DMA doesn't work properly

DDPS.1
Associate II

The problem is as follows: When I am trying to update HRTIM master timer registers (MPER, MCMP1-4) on the STM32G474 via Burst DMA access, every data word I write into the BDMADR register gets written into two of the specified master timer registers. So the first data word gets written into MPER and MCMP1, the second into MCMP2 and MCMP3, the third into MCMP4 and whatever has the address after MCMP4 (it's not a master timer register I think), and then it repeats. I have tried manually writing into the BDMADR register, used various DMA data chunk lengths, but to no avail.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

I forgot to update it here because we already had a direct support ticket: The problem was caused by the APB2 being half of all the other clocks.

View solution in original post

5 REPLIES 5
Imen.D
ST Employee

Hello @DDPS.1​ ,

Are you using CubeMx for your application ? It will be better to share a screenshot to check your configuration, or your code if this issue is not resolved.

Have a look at this AN4539 Application note HRTIM cookbook, it may help you.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello,

I forgot to update it here because we already had a direct support ticket: The problem was caused by the APB2 being half of all the other clocks.

DDPS.1
Associate II

0693W00000NroDmQAJ.png0693W00000NroDrQAJ.png

Glad to know the issue has been solved.

Please allow me to close this thread and thank you again for having reported the point.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Singh.Harjit
Senior II

I'm not following why the APB2 prescaler being /2 would cause double writes?

I just checked the Reference Manual and the Datasheet and didn't see any requirements for clock frequency relationship between different clocks.

Looking forward to your answer and thanks in advance.