Error using interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error using interrupt

565 Views
kdn
Contributor III

I have attached error file which I am getting while using interrupt , can anyone please provide me solution for it.

Labels (1)
Tags (3)
1 Reply

386 Views
iggi
NXP Employee
NXP Employee

Hi,

See the snapshot below. The ISR inside the pragma segment in CAN1.c source file must be available (out of comment; not in red)

CAn1.png

You can use the following code inside the ISR to service the CANRx interrupt:

ISR(CANRxISR)

{

   unsigned char length, index;

    unsigned char rxdata[8];

    length = (CAN0RXDLR & 0x0F);

      for (index=0; index<length; index++)

          rxdata[index] = *(&CAN0RXDSR0 + index); /* Get received data */

    CAN0RFLG = 0x01;   /* Clear RXF */

}

Hopefully the info helps.

Regards.

iggi