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; }
you don't tell us what you did to isolate the problem. what happens if you lower the load (disconnect USB device, for example). does it still crash? are you doing some sort of IAP? or other critical operation that cannot be interrupted? are you manipulating the interrupt vector table? and where does the system hang?
watchdog reset, maybe? I know it is unlikely...
maybe it is just a bad piece of code that is executed from time to time. did you scan your software with a static code analyzer? do you have any compiler/linker warnings?
you do remember that FIQ interrupts will interrupt your IRQs...
stack overflow, maybe? in what mode does the processor run when the failure occurs?