LPC open CAN driver - generic CAN issue

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by gnxp on Tue Sep 16 08:08:58 MST 2014
Environment -
LPC1769, Keil uV4, lpc open 2.10, lpc xpresso 1769 board on a custom baseboard

I am trying to get CAN (at 500kbps) work reliably with the above setup. I am able to send and receive data. I have CANusb analyser attached to the network to monitor CAN data sent from board and in the debugger I can see CAN data received by lpc1769(received data is correct). The issue is I see lot of ERR frames. The setup runs for quite a while and then goes bus off and doesn't recover. It goes bus off quicker if it is also transmitting CAN frames. Now if I am only receiving frames and I add CANusb analyser in active mode(ACK  done) and/or a different CAN device I don't see any ERR frames(so the other devices ACK correctly).  So it is easy to conclude the ERR is on lpc1769 side. I understand all this points to a bus HW err, but I have checked soldering joints, termination resistors etc.  Next thing I would be trying is try catch CAN behaviour on scope just before err frame. I wanted to ask here if there are any gotchas I might have missed using the lpc open CAN driver. I have verified the bitrate setup which is correct. lpc1769 running at 96Mhz, CAN pclk at 24 Mhz (so BRP -1 TSEG-15 TSEG2-6  giving me 500kbps)

Any suggestions welcome.