I did a small port to the HC12 (that has only minor differences to the existing HCS12 Port).
My application communicates on the CAN Bus. As long as the CAN load can be handled everything works fine. If I increase the CAN load so that I got an overrun interrupt pending while I am still processing the receive interrupt the application crashes. If I just disable the overrun interrupt everything is fine again. However I like to get notice if an overrun occurs by increasing an counter within the overrun ISR. I copied fragments of the two ISR to make it more clear what I programmed.
Does anyone has an idea what I did wrong ?
/* receive ISR */
static unsigned char xYieldRequired = pdFALSE;
C0RFLG = C0RFLG | 0x01; /* Reset receive flags */
/* CAN ID 0x100 was received */
xYieldRequired = xTaskResumeFromISR(CAN_ID100_TASK_handle);
if( xYieldRequired == pdTRUE )
/* overrun ISR */
static int counter = 0;
C0RFLG = C0RFLG | 0x02; /* reset overun flags*/