Hello,
I’m trying to setup an interrupt routine.
There is an led and scope on gpiob pin 11 to monitor the outcome.
The SysTick_Handler() is working correctly but not the TIM1_UP_IRQHandler().
What could be the reason for that ?
Does the code work when compiled with a different toolchain/IDE or has the code never worked before? Also define “not working”. No outupt, wrong frequency output, …? More info needed.
@maxgerhardt
I haven’t tested another toolchain/IDE yet.
By not working i mean the code inside TIM1_UP_IRQHandler() is not excecuting while the code inside SysTick_Handler() is. The output on pb11 stays high while i get a square wave output when i uncomment GPIOB->ODR ^= GPIO_ODR_ODR11; inside the SysTick_Handler().
@maxgerhardt
Thank you, clearing the interrupt pending bit fixed it.
I got the code from a tutorial on Youtube which you can see here.
Now that i watch it again, he also is clearing the interrupt pending bit. I must have looked over it.
I also needed to add this line.