Dear colleagues,
I am making several CAN applications on LPC2119 and LPC2129 chips. All these applications including Keil example program, BlinkyCAN, work fine on LPC2129. None of them work on LPC2119, not even the example program.
I check with oscilloscope at the point between the CANTx and CANRx pin of LPC2119 and the CAN transceiver, no waveform is detected at all while CAN program is running and supposed to continuously transmit CAN messages out.
On LPC2129, CAN messages are transmitted successfully, and waveform is detected by oscilloscope at the point mentioned above.
Does LPC2119 require a different CAN initialisation routine? Or there is a hardware bug hidden in the LPC2119 CAN controller? (I encountered the same problem with all my 5 LPC2119 chips!)
Allan
As always with this type of problem, it's time to get out the Datasheets (and/or "user manuals" or whatever) for the two devices, and compare them side-by-side...
Or there is a hardware bug hidden in the LPC2119 CAN controller? (I encountered the same problem with all my 5 LPC2119 chips!)
Have you looked in the errata sheets of the processors in question?
Thank you for the replies!
Yes, I read through the manual, datasheet and the errata for LPC2119 before. LPC2119 and LPC2129 differ only in the size of flash memory.
When I downloaded a CAN application to LPC2119 and observed the whole CAN transmission process on the chip with the JTag debugger, the following happened: 1. CAN message was successfully saved to a transmit buffer. 2. As soon as transmission command was issued, the transmit error counter kept increasing until bus-off.
One might suspect that there was something wrong with the CAN initialisation routine or the baudrate was set wrongly. It could not be the case, because the program went well in Keil simulation of LPC2119.
The probable problem is that new LPC2119/01 derivatives have CAN controller index in acceptance filter starting form 0 where old derivatives had this starting from 1.
Other things should be identical.
I bypass the acceptance filter, so the hardware bug you mentioned can not be the cause of the CAN transmission failure. In addition, my CAN programs actually work well on both LPC2129/00 and LPC2129/01 controllers.