Changing timer frequency by writing the AutoReload Register every 10 microseconds with DMA on a STM32H743
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Labels:
-
DMA
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-16 1:34 AM
Run a second DMA which will force update by writing 1 to TIMx_EGR.UG.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-16 1: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-16 7:00 AM
Use the timer in downcounting mode instead. Update won't be immediate, but it will avoid the other issue.
