2022-03-16 12:47 AM
Basically, the frequency change already works. My problem is that the new frequency, which is specified by DMA, only takes effect after the ARR has been reached.
I tried to solve the problem by disabling the auto-reload (ARR) preload.
unfortunately in this case no update event is generated if the ARR is written to a lower value than the current count value. As a result, the next update event is only generated when the counter overflows.
Do you have any idea how the ARR will take effect immediately without a counter overflow?
thank you in advance for your help
Florian
2022-03-16 01:34 AM
Run a second DMA which will force update by writing 1 to TIMx_EGR.UG.
JW
2022-03-16 01:53 AM
Thank you for your quick reply.
Unfortunately, the update must not be generated cyclically. That would only allow frequencies greater than the DMA frequency.
The update event should be generated if
counter >= AutoReload Register
2022-03-16 07:00 AM
Use the timer in downcounting mode instead. Update won't be immediate, but it will avoid the other issue.