Using Timer Global Interrupt crashes board
I have an Arduino Giga (STM32H7). I'm trying to generate an interrupt on the Catch/Compare even of TIM5_CH3. TIM5 is set to one pulse mode and triggered as a slave to TIM1, they generate some PWMs; everything is working absolutely fine there. Also, I've successfully used the CC interrupt of TIM1, and now I'm trying to do the same for TIM5, which only has a global interrupt handler. I've reduced my program to its simplest form for demonstration purposes:
TIM5->DIER = 0; //disable all interrups on TIM5
TIM5->SR = 0; //set all flags down
TIM5->DIER |= TIM_DIER_CC3IE; //enable interrupt from CH3
NVIC_EnableIRQ(TIM5_IRQn); //enable TIM5 ISR
// I don't set the priority here, doesn't seem to matter
extern "C" void TIM5_IRQHandler(void){
TIM5->SR = 0; //set all flags to 0 again
}
For some reason, this makes the board unresponsive. I feel like I'm missing something obvious, even though this feels very safe. Only CH3 can generate an interrupt, which it does successfully (since it only crashes when the DIER_CC3IE is set). Then I just set its flag to 0 again (and all others, just for the sake of it).
Any help would be greatly appreciated!
