LPC11C24 CAN explanation: explain like I'm five

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by andreibuiza on Mon Nov 03 20:59:24 MST 2014
Hello all,

I've been spending a lot of time trying to figure out how to use CAN. All I need to do is some basic transmit and receive functions but the documentation/sample code under LPCopen and LPC11C24 user guide is very hard to read. Note that I have never used CAN before, all I know is its general overview from Wikipedia.  I attached a snippet from the user manual which I think contains some info, and I also attached the LPCopen CAN code snippet.

Basically I'm confused on how to setup msg_obj, I already figured how to use the CAN functions, ie. LPC_CCAN_API->can_transmit and LPC_CCAN_API->config_rxmsgobj.

My questions are:
what to do with msg_obj.msgobj?
what to do with msg_obj.mode_id?
what to do with msg_obj.mask?

Any form of guidance is deeply appreciated :)