AnsweredAssumed Answered

CAN Bus Frame reception?

Question asked by John Whitmore on Oct 5, 2017
Latest reply on Oct 19, 2017 by John Whitmore

[ LPC1788 uC developing with MCUXpresso and Segger J-Link ]


I'm working on the CAN Bus of the LPC1788 and it's not playing nice in terms of reception of Frames. I did a quick self test mode transmission test and that was fine so then I connected the two LPC1788 CAN Bus channels together. So both channels are on the same bus. So now I transmit a single standard frame on Channel 1, for reception on Channel 2.


The first problem is that the frame is NOT ack'd by Channel 2 of the 1788 so Channel 1 re-transmits the frame a second time. On the second transmission Channel 2 now acknowledges the frame.


The Second, and more worrying, problem is that Channel 2 never receives any frame. I'm turning on an LED when Channel 2 is receiving a frame so I can see a visual indication that Channel 2 was receiving a frame. So you'd immediately jump to the conclusion that I've not set up the suitable Acceptance Filters, for reception of the frame, but I'm in BYPASS mode so ALL frames should be received from the Bus?


I'm obviously missing something in the User Manual but my understanding is that there is only one Acceptance filter engine which is shared by the two channels. And setting it into bypass mode should be good for both channels, the code is a single line:


    Chip_CAN_SetAFMode(LPC_CANAF, CAN_AF_BYBASS_MODE);  // Bypass acceptance filters, accept all Frames


So why is no interrupt being raised for a received frame? I am getting an interrupt for the successful transmission from Channel 1, which I clear, but no interrupt is raised for any received frame. Like I say you jump to Acceptance Filters but they are bypassed.


Anybody got any ideas I'd be very grateful