10 years ago.

CAN interface on LPC1549

Hello,

From the pinout it appears that CAN is not setup by default on this board. I realize that the switch matrix makes it fairly simple to assign the pins, but this makes me worry that the library is not ready either for use. I have a project that I want to evaluate this MCU but do not want to go into it thinking the CAN is working out of the box with MBED

My questions really is, has the CAN library been tested, and is it supported on this platform.

Thanks for the time

Question relating to:

It looks like CAN is now supported in the SDK but has not moved into the online compiler. Is this correct?

posted by Travis Travelstead 28 Jul 2014

1 Answer

10 years ago.

The datasheet says that the LPC1549 supports CAN. However, CAN is currently not yet implemented in the mbed library. You can check that by reviewing the device file where DEVICE_CAN = 0.

Thanks for the quick response. That is exactly what I was worried about. I know I can always use the typical routes but I like the MBED simplicity over LPCopen and some of the other APIs.

Any idea on the state or is it not even in progress?

posted by Travis Travelstead 15 Apr 2014

Not aware about ongoing work in that area. Could be easy when the lpc1549 CAN hardware is similar to the lpc1768, but I have not verified.

posted by Wim Huiskamp 15 Apr 2014

Sadly, the CAN implementation in the LPC15xx family is quite different from that in the LPC1768.

There are some CAN drivers in ROM on the LPC15xx parts but it depends what you're trying to do.

I think the LPCOpen example code for the LPC15xx doesn't include any CAN examples either (or at least not yet), so you might have to go back to the LPC11Cxx or the LPC43xx/LPC18xx examples to find a similar CAN implementation.

Sorry not to have better news for you!

posted by Jez Cawley 15 Apr 2014

That is somewhat disappointing. I am not finding examples with LPCOpen as well like Jez was saying. I know CAN is not the most important peripheral but it quite important for industrial and controls so I figured it would be farther than this.

I guess for the time being I will look into using ROM commands... anybody willing to help out?

I am not sure if I officially can ask for help and offer anything for it but to me, the help is worth something.

Hopefully things move forward, this chip looks like it is very capable.

Thanks

posted by Travis Travelstead 16 Apr 2014

There are some discussions going about CAN on the lpcware forum. You see a statement that example code should be available about now. There is also some example CAN TX code shown (main.c). That could be your starting point.

posted by Wim Huiskamp 16 Apr 2014

Wim and Jez you both have been a great help. I will look at the code you referenced and see what I can pull off in the short term.

Again any more help will be greatly appreciated.

Thanks

posted by Travis Travelstead 16 Apr 2014

Since everybody is telling me c_can is used on both the 11Cxx and the LPC15xx that it should be fairly portable. Thanks to others I found the mbed code for the 11Cxx micro controllers. It does not look like it is fully official since it is not in the platforms page and just in the git repo.

mbed git 11Cxx target library

If anybody is willing to help that would be great. I mostly need somebody that has a better feel for this to help check my work. Anyways I hope this might help others.

posted by Travis Travelstead 18 Apr 2014

Wim, I am assuming your are not officially part of mbed. If that is true then I was hoping by now that somebody at mbed would of posted a response. CAN seems to be a pretty basic functionality using a very widely used interface.

I will continue on my path to attempt to port and test the existing contributed CAN library for the 11CXX, but I am not sure if I have the skill to fully implement this.

posted by Travis Travelstead 22 Apr 2014

Hi Travis, not officially part of mbed. Just part of the furniture... Anyhow, I am not very familiar with CAN and would have to look into LPC1549/11CXX CAN stuff before being able to contribute. However, currently I am using my mbed related cpu cycles to address on some other topics.

posted by Wim Huiskamp 22 Apr 2014