9 years, 5 months ago.

can_api.c/can_filter() is not implemented - Any idea, who and when?

Pulled a mbed-src tgz today and took a look into some files, especially CAN stuff. I suspect, this function is meant to configure the CAN sub-systems acceptance and mask filters, which would make software address filtering unnecessary. The code just returns 0, it is not implemented yet.

I'd liked to code that thing; can anyone help me with a link to chip docs, maybe examples for ARM register handling? TIA Mike

BTW: What's the recommended method, here, to report bugs? Is it by posting a question, or by generating an issue?

The setting of the filters would, I believe, be chip- or architecture- specific. That is, the CAN peripherals are not ARM standard.

You don't say what chip you're using, so I can't be more specific, but:

There are a number of mbed-enabled boards that have CAN; these include several of the NXP, STMicro and Freescale boards.

However, the can_filter HAL API function only appears to be fully coded for the NXP LPC11CXX and LPC15XX targets.

As for where you could get documentation, you could look at the User Manual for the LPC15XX family: http://www.nxp.com/documents/user_manual/UM10736.pdf and compare it with the code in libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/can_api.c

I'm sure that a contribution of the filter code for your chip would be welcome!

posted by Ned Konz 06 Nov 2014

Ned, please visit https://developer.mbed.org/forum/mbed/topic/5261/ . I'd liked to concentrate ideas and discussions there. Thx .M

posted by Michael Svetlik 06 Nov 2014

2 Answers

9 years, 5 months ago.

Hello,

questions belong here. CAN is currently available for only lpc1768 as I recall and one more nxp chip (not certain), so download its reference manual. I am not familiar with CAN on mbed, possibly somebody else can provide more information.

If you are determined that there's a bug in the mbed SDK (mbed lib, RTOS, USB and Ethernet - all these libs are part of mbed SDK which is hosted on github), report it on the github with detailed report. If it;s website related ,there's section Bugs in the forum here. If just a question, ask here in questions sections.

To contribute to can_api, use github to send a pull request where we review and test it. Thanks !

Regards, 0xc0170

Accepted Answer

Thank you,Martin.

Meanwhile busy with RTFM, I found the respective source in mbed. Reporting will follow as soon as a I find the time to struggle with github....

Nice day, .M

posted by Michael Svetlik 05 Nov 2014
9 years, 5 months ago.

Hi Michael,

I have used some example code for the LPC1768 MBED by a company called Dragonwake which implments CAN filters. I've just tried to find it again and ended up at a different site, http://www.csun.co.jp, which has a downloadable link to dragonwake's source code on this page:

http://www.csun.co.jp/hpgen/HPB/entries/9.html

This is their direct link to LPC1768 example (on the dragonwake website):

http://www.dragonwake.com/download/LPC1768/Example.zip

Look in CAN\CAN.C for the functions that set and clear CAN filters

Hope this helps, Sophie

Thanks a lot, Sophie!

Just checked the example CAN stuff, helped - even if configuring the acceptance filter(s) makes tons of code ....

posted by Michael Svetlik 05 Nov 2014