Timer updates only after i set a breakpoint
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-28 9:26 AM
I'm using an STM32F401RCT6 to create a very accurate millisecond timer for a school project. When the second interrupt of the alarm triggers i set a new CCR1 value and reset the timer. But it seems like the timer just ignores this. Only when i set a breakpoint in the function and resume it updates. Can anyone help me?
Everything else works, i get a square wave of 50%. But it just doesnt seem to update.
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-28 11:16 AM
Timer prescaler TIMx_PSC is unconditionally preloaded, it means, that the new value does not get into effect until the next Update (overflow) of the timer.
TIMx_CCRx may be preloaded, too; see TIMx_CCMRx.OCxPE.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-28 11:16 AM
Timer prescaler TIMx_PSC is unconditionally preloaded, it means, that the new value does not get into effect until the next Update (overflow) of the timer.
TIMx_CCRx may be preloaded, too; see TIMx_CCMRx.OCxPE.
JW
