This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi team,
I got a question from my customer:
How to automatically separate different field of a received CAN frame?
For example, they need to know the following information:
1. Identifier of the received frame.
2.They want to know how many frames is included in a data.
Can we support these need automatically? Or we need to achieve this in software by using mask and bit shift?
Thanks!
Dear Weiqi Wang,
That is a fairly basic question. It is likely that this customer is just getting started with CAN. To prevent lots of basic questions, we have addressed those types of questions with the following information. Please let us know if this is appropriate for your customer and if you think it will enable them to make progress with their CAN project.
=====================================================================================================
For information about the CAN protocol itself (which is not covered in our documentation), there are excellent resources online.
• Wikipedia & many videos on YouTube cover the protocol extensively.
• Good resource for a tutorial is https://www.kvaser.com/about-can/the-can-protocol/ .
• I have benefited immensely from reading the book “A Comprehensible Guide to Controller Area Network” by Wilfried Voss.
• There are also good Application Notes on our website. You can find them listed in the References section of my own app.note SPRA876.
Thanks,
Krishna
Weiqi
You can't access the raw frame, it is processed by the CAN IP. You only have the information that is available to be transferred into the various IFx registers.
Edit: If you're looking for API to perform the transfer of data into the IFx registers, see CAN_transferMessage()
best regards
Chris
Weiqi,
I presume your question is about extracting the MSGID & DLC fields of a received CAN frame with the help of a API function, correct?
But other bits of the frame will not be transferred into a register
Thus, how can we get access to the raw frame and do the mask and shift operation?