2020-04-06 01:23 AM
I need to use all four Capture-Compare interrupts to use multiple timeouts for TIM5 on STM32F427. It is a 32-bit timer.
The problem I am running into is that the interrupt flags are constantly high (e.g. CC4IF,CC3IF,etc.) . As long as only one CC-interrupt is enabled I can "fix" it by checking which interrupt is enabled. However, using the 32-bit mode or enabling multiple CC-interrupts at the same time would imply a huge overhead in the ISR...
Could anybody tell me why the flags (CC4IF, CC3IF, CC2IF, CC1IF, UIF) are constantly high and even cannot be cleared?
Thanks.
Best,
Rolf
2020-04-06 02:21 AM
Alright, I have solved the mystery why I couldn't clear the flags.
--> solution: stop the counter in debug mode:
DBGMCU->APB1FZ |= DBGMCU_APB1_FZ_DBG_TIM5_STOP;
Now I am trying to get it running in 32-bit mode...
2020-04-06 02:32 AM
STILL I seem to not fully understand the mechanics:
If I set the the configuration to the following:
to my understanding the flag CC3IF should never be high... However it IS high after the timer has been reloaded (i.e. after TIM5->CNT == TIM5->ARR)
Please enlighten me :D
2020-04-06 04:44 AM
JW