2019-12-27 01:51 AM
Hello ,
I want to configure a timer which start and runs for specific duration and stops automatically
and when again i want to start that timer i could be able to start timer and agian stops automatically
duration is fixed all time
Dipak Garasiya
2020-01-02 09:37 PM
I have solved out this problem , actually when i have write some code , like making another gpio write as @Community member have suggested, i solved issue
Thanks for support @Community member and @berendi
2020-01-02 11:04 PM
Looks like the debugger got confused because there was no code after the while loop. This happens with gdb.
Add an
asm("nop");
instruction when you are not sure the debugger has something to put a breakpoint on.
2020-01-03 12:48 AM
which interrupt is generated when TIM_CR1_CEN becomes zero ?
2020-01-03 01:18 AM
It's called Update Interrupt, and it's generated every time the counter reaches the limit (even if the timer is not in one-shot mode).
Look the name of the interrupt up in the interrupt and exception vector table in the reference manual. Some timers have one global interrupt, others have separate vectors for different events.
Enable the update interrupt both in the NVIC and in the timer DIER register.