2021-04-05 09:37 AM
Hi
I am trying to Toggle a pin using Timer2 interrupt in stm32 Nuclueo-64 ,
But it is going to ISR only once .please Help
2021-04-05 11:52 AM
Which STM32?
By using your own symbols and "magic values" instead of the symbols defined in CMSIS-mandated device header, you 1. increase the chance you introduce errors in constants, 2. decrease chance anybody wants to review your code.
To enable timer interrupts, you have to set some of the respective pins in TIMx_DIER. Here are some more tips to debug interrupts.
Also, in the ISR, clear the interrupt source in TIMx_SR immediately at the beginning of the ISR, and don't use read-modify-write to clear bits in TIMx_SR.
JW