Not all timer interrupts working on STM32F407 (shared timer IRQ settings)
I am trying to control 8 independent pulse channels using 8 independent pins of the STM32F407. Each pin will supply the pulse pin to a different motor, so I will be controlling 8 independent motors with the microcontroller. For each pin I am assigning an independent timer's Output Compare Channel. I have assigned the timers as follows:
PA1 - TIM5_CH2
PA5 - TIM2_CH1
PA6 - TIM3_CH1
PA7 - TIM14_CH1
PA8 - TIM1_CH1
PB8 - TIM4_CH3
PB9 - TIM11_CH1
PE5 - TIM9_CH1
TIM5, TIM2, TIM3, and TIM4 work as expected. But as soon as I try to toggle TIM14, TIM1, TIM11 or TIM9 it stops working. I noticed that the timers that don't work require NVIC settings are shared between multiple timers. I don't understand why they are shared like this but it appears the issue is related. Here are the NVIC settings:
HAL_NVIC_SetPriority(TIM5_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM5_IRQn);
HAL_NVIC_SetPriority(TIM2_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM2_IRQn);
HAL_NVIC_SetPriority(TIM3_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM3_IRQn);
HAL_NVIC_SetPriority(TIM8_TRG_COM_TIM14_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM8_TRG_COM_TIM14_IRQn);
HAL_NVIC_SetPriority(TIM1_CC_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM1_CC_IRQn);
HAL_NVIC_SetPriority(TIM4_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM4_IRQn);
HAL_NVIC_SetPriority(TIM1_TRG_COM_TIM11_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM1_TRG_COM_TIM11_IRQn);
HAL_NVIC_SetPriority(TIM1_BRK_TIM9_IRQn,15,0);
HAL_NVIC_EnableIRQ(TIM1_BRK_TIM9_IRQn);
