Are there any sample code/example for usage of classic CAN in LPC54628?
Hello Hemanth S,
There is CAN demo under MCUXpresso SDK for lpc54628, it support MCUXpresso IDE,
keil and IAR, you can download from:
The both example in SDK are mostly CAN FD based.
Are any sample code for Classc CAN and not CAN FD?
Just change the definition to 0:
#define USE_CANFD (0U)
Hope it helps,
Thanks for your inputs.
I had more queries regarding the CAN usage:
1. Which is the recommended work flow for Receiving the CAN messages?CAN Bus-> RX FIFO -> Application BufferCAN Bus-> RX Buffer -> Application Buffer
2. I am able to receive messages based on CAN filter configuration.But when I tried to read the received message ID from the structure "mcan_rx_buffer_frame_t",
it show some value which is not the same which I configured to receive.The CAN RAM location also seem to contain this value.
e.g. for msg ID 0x11 (STD ID) -> 0x00464022 (R0 bits figure 133 in manual) for msg ID 0x21 (STD ID) -> 0x00864042 (R0 bits figure 133 in manual)
So even tough the message are correctly received in FIFO/Buffer,
I am unable to read-back the message ID from the structure.
Why do you think "it show some value which is not the same which I configured to receive.",
what value do you read ?
There is no problem about the ID in below:
Thanks for you inputs, I was looking in wrong bits (11:0)
any inputs for other question?
Retrieving data ...