Using the STR912, I am using several different interrupts (usb, uart, timer and wiu) all of the irq handled as VIC (vectored) with different priorities (2->6). It happens that something my firmware hangs and I think is because once I get inside a interrupt the IRQ are disabled (according with the datasheet) and if other IRQ occurs during this time my program crashes ... no Undefined_Handler IRQ, no Abort_Handler IRQ ... nothing. The expected behavior is that if not working with nested interrupts the execution should finish the execution of the actual interrupt and then switch for the next one, even if an interrupt occurs during the execution of the previous (atomic execution), right? Someone has an idea what can possibly be?
This is basically how I use the IRQ handlers:
void TIM1_IRQHandler(void) { // Clear TIM1 counter TIM_CounterCmd(TIM1, TIM_CLEAR); // Clear TIM1 flag OC1 TIM_ClearFlag(TIM1,TIM_FLAG_OC1); // whatever I want VIC0->VAR = 0xFF; }
I once saw a document written by either ST or NXP to explain what happens in such a situation. I don't have time to look now, but I will next week if you don't find it!