2022-03-30 10:06 PM
2022-03-30 10:15 PM
Check if the timer has started at all by reading its control register CR1 (reg TIM2->CR1, bit TIM_CR1_CEN).
2022-03-31 05:51 AM
What is HAL_TI() and why are you expecting interrupts there?
Some source code would be explanatory.
The timer update interrupt would call HAL_TIM_PeriodElapsedCallback.
2022-03-31 07:07 AM
Hi Thanks for your reply. The routine was HAL_TIM_PeriodElapsedCallback(); but due to less available character space, only HAL_TI(); was blw to write.
I think I am missing something very minute but very critical parameter. I tried with all possible clock configs, prescalers, postscallers for 1us tick period, but unable to get interrupt.
Can you please help me out by some Enable Routine by special function registers?
2022-03-31 10:08 AM
Does PE2 toggle?
Observe the TIM registers, mainly DIER (is the Update interrupt enabled?). Some generic hints to solve interrupts not firing here.
JW
2022-03-31 11:01 AM
Interrupting at 1 MHz (1us) is not practical.
If you want to measure elapsed time with this granularity, free run in maximal count, and read the count value, deltaing the different from current vs initial value.
>>..but due to less available character space
Don't put the entire question in the title/summary, but rather in the body field for the question itself. You can also Edit posts, see V icon in upper right of message areas.