Higher priority timer will preempt lower priority external interrupt, but will not preempt a lower priority timer.
EDIT: Hello, everyone. My code issue seems to have resolved itself after much changing, but I never did find out what was happening. My real question was answered: There are no likely circumstances that a higher-priority interrupt should not pre-empt a lower priority interrupt, even if they are both timer interrupts. Thank you all for your help. I'll leave the original thread alone.
I have a priority 2 timer TIM1, a priority 6 timer TIM4, and priority 5 EXTI9_5.
TIM1 occurs every 1 ms. It clears the interrupt then increments uwTick then returns.
EXTI9_5 operates when I push a button. It is a while(1) loop which does not clear the interrupt so it just locks up.
TIM4 occurs every 30 seconds. It is a while(1) loop so it just locks up. The following scenario occurs regardless of whether or not the interrupt is cleared before the while(1) loop.
If I debug and press the button before the 30 second mark, I can see that TIM1 continues to operate. However, if I debug and simply wait for TIM4 to interrupt (and I debug to verify that it is interrupting), then TIM1 no longer interrupts, even though it has the higher preemption (lower number, higher priority).
How can I get TIM1 to preempt TIM4? Thanks.