Content originally posted in LPCWare by jchisolm on Wed Nov 02 13:07:12 MST 2011
I have 2 identical boards, LPC1768 each using CAN1. I have some test code based on the CAN led demo. The processors are running at 100Mhz and the CAN bus is at 100K.
I set up the transmit for DLC=1, 2, 3, 4 ... 8 with data values of
data 1= 0x11
data 2= 0x22
...
data 7= 0x77
data 8=0x88
so I can quickly identify the bytes sent and received.
The problem: If I set the xmit DLC to 1 through 7 all is OK in the received messages. But if I set the xmit DLC to 8 I get byte 7 sent again in the byte 8 slot and the receive frame (RFS) register says the DLC is 7. I get no errors. I have put a CAN bus analyzer on the bus and the analyzer sees the correct frame with a dlc of 8 and 0x88 in the 8th byte so I know the transmit side is working OK. It is something in the receive side.
I find it hard to belive that something as fundamental as DLC = 8 would not be working so I'm looking for any pointers to configuration isssues or other things I might look for to help figure this out.
I am only using CAN1 and CAN 2 is not powered up but I tried powering up CAN2 with the same results. I cannot test CAN2 as those pins are in use for other functions.
Thanks