This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CAN Interrupts

Other Parts Discussed in Thread: TMS320F28069

Hi, 

I am trying ti implement CAN on my TMS320F28069. I went through the ecanback2back example, and F2806x_ECan.h and F2806x_ECan.c to my project. I think I set up the mailboxes properly but I do not know how to set up the interrupt for when I receive a can message through the CANRX pin.  

This is how set up the mailboxes. 

void EnableMailboxes()
{
// eCAN control registers require read/write access using 32-bits. Thus we
// will create a set of shadow registers for this example. These shadow
// registers will be used to make sure the access is 32-bits and not 16.
struct ECAN_REGS ECanaShadow;

ECanaMboxes.MBOX0.MSGID.all = 0x9555AAA0; // from example.
ECanaMboxes.MBOX1.MSGID.all = 0x9555AAA1; // from example.
ECanaShadow.CANMD.all = ECanaRegs.CANMD.all;
ECanaShadow.CANMD.bit.MD0 = 0; //MBOX0 = TX
ECanaShadow.CANMD.bit.MD1 = 1; //MBOX1 = RX
ECanaShadow.CANME.bit.ME0 = 1; //Mailbox 0 enabled
ECanaShadow.CANME.bit.ME1 = 1;
ECanaMboxes.MBOX0.MSGCTRL.bit.DLC = 8; //specify that 8 bits are sent
ECanaMboxes.MBOX1.MSGCTRL.bit.DLC = 8;
}

Thanks in advance.