AnsweredAssumed Answered

CAN Interrupt

Question asked by Onur Demirel on Jun 21, 2018
Latest reply on Jun 26, 2018 by Onur Demirel

Hello,

 

I am working with KE18F and trying to use FLEXCAN.

 

My aim is setting up the CANbus and wait for the incoming messages that initiates the interrupt subroutine. I want to use CAN0_ORed_Message_buffer_IRQn and its function. I somehow enter this subroutine when I try to send a data using another mailbox and stay in that subroutine continiously. 

 

I set up interrupt as below:

FLEXCAN_Enable_MbInterrupts(CAN0, CAN_IMASK1_BUF31TO0M(RXMB_NUM));

EnableIRQ(CAN0_ORed_Message_buffer_IRQn);

 

I also create handle

FLEXCAN_TransferCreateHandle(CAN0, &flexcanHandle, flexcan_callback, NULL);

 

The interrupt enters after

FLEXCAN_TransferSendNonBlocking(CAN0,&flexcanHandle,&txXfer);

 

Where I am missing, and how can I figure out what the problem is? Where should I check?

 

Thanks in advance,

 

Onur

Outcomes