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 just guess it may be the problem of the debugger, which occupy one interrupt routine( seems SWI). while u delay and mcu no feedback to debugger host via JTAG. it seems crash in host, saying,can't keep in sync with the mcu status on board.
so u can build the hex file and program into board.Directly test on board without the debugger.
I have been trying several things including the download and not using the debugger without success. I have a TIMER interrupt with a while inside of 5 seconds and I call an UART interrupt through the hyperterminal, it happens that now the UART doesn't even occurs anymore. The UART interrupt is priority 4 and TIMER 5, how can this happen?
Thanks for your help.