STM32 Timer interrupts immediately after start
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-09-28 3:33 PM
Posted on September 29, 2017 at 00:33
i don't know if it's a feature or bug, but starting a timer in interrupt mode will bring the code into the interrupt handler the first time mcu calls timer start function.
To solve this problem it's enought to clear the UIF bit from SR register right after timer initialization so there would be no pending interrupts.
But, is this safe to clear this bit?
#timer #hal #stm32 #bug #interrupt
Labels:
- Labels:
-
Bug-report
-
Interrupt
-
STM32Cube MCU Packages
-
TIM
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-09-28 3:47 PM
Posted on September 29, 2017 at 00:47
Update is when CNT == 0, so that's how it works.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
