LPC1768 CAN DLC problem

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

LPC1768 CAN DLC problem

210 Views
lpcware
NXP Employee
NXP Employee
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
0 Kudos
1 Reply

160 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jchisolm on Thu Nov 03 21:31:37 MST 2011
solved - programming error on receive side.
Sorry for using up the bandwidth.
0 Kudos