PetrM,
Thanks for your reply.
I found the cause of my problem:
I use direct interrupt in my code. I use Event to signal other task that an interrupt has occured. This causes a lot of problems--- sometime Shell restarts, sometime unexpected exceptions........
So I changes the code to use a global variable to signal the interrupt event. below is the code snip.
In the MQXUG, on page154 it reads:
"It must not call any MQX functions" when user uses replacement ISR.
So without using MQX Event, what is the best method to communcate between ISR and other task?
Regards,
Jeff
---------------------------------------------------------------------------------------------------------
__declspec(interrupt:0) void new_irq7_isr ( pointer user_isr_ptr )
{
VMCF5225_STRUCT_PTR reg_ptr = (VMCF5225_STRUCT_PTR)BSP_IPSBAR;
//switch caused IRQ
reg_ptr->EPORT->EPFR |= MCF522XX_EPORT_EPFR_EPF7; //DES Clear IRQ7 interrupt flag
intcnt++;
if ( intcnt > MAX_INT_CNT )
intcnt =0;
// _lwevent_set(&ISR7_Event,ISR7_EVENT);
}
---------------------------------------------------------------------------------------------------------------------------------