LPC4357 CAN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4357 CAN

1,013 Views
Ashrumochan
Contributor III

Hi,

I am using MCB4300 Dev Kit and configured for CAN.

I configured a message object to receive 10 numbers of message IDs and able to receive properly each message.

1) My doubt is as i am using single message object for multiple IDS, everytime the message buffer/receiving buffers are overwritten with new message. If i want to read last 5 message IDs then first 5 message ID, will it be possible? Is it like CAN can store the data of all message IDs though we are using single message object/RAM?

2) If we see our driver,

if (size > 0U) { data[0] = (ptr_CAN->IF1_DA1) & 0xFFU;
if (size > 1U) { data[1] = (ptr_CAN->IF1_DA1 >> & 0xFFU;
if (size > 2U) { data[2] = (ptr_CAN->IF1_DA2) & 0xFFU;
if (size > 3U) { data[3] = (ptr_CAN->IF1_DA2 >> & 0xFFU;
if (size > 4U) { data[4] = (ptr_CAN->IF1_DB1) & 0xFFU;
if (size > 5U) { data[5] = (ptr_CAN->IF1_DB1 >> & 0xFFU;
if (size > 6U) { data[6] = (ptr_CAN->IF1_DB2) & 0xFFU;
if (size > 7U) { data[7] = (ptr_CAN->IF1_DB2 >> & 0xFFU;

Its using only IF1 register and IF2 register is still there.

Why its not used or how i can use it , Will it help me to store the data upto next read?

 

Awaiting for your valuable comments..

Regards,
Ashru

0 Kudos
Reply
3 Replies

995 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ashru,

1) Yes, you can config 10 Message objects, then use the "CAN message interface command request registers" to control receive which number message first.

Alice_Yang_0-1644983384724.png

 

2) About the IF1 and IF2, they are two interface registers.

The function of the two interface register sets is identical (except for test mode Basic).
One set of registers may be used for data transfer to the Message RAM while the other
set of registers may be used for the data transfer from the Message RAM, allowing both
processes to be interrupted by each other.

Detail you can refer to "45.6.2 Message interface registers" of UM.

 

BR

Alice

0 Kudos
Reply

980 Views
Ashrumochan
Contributor III

Hello Alice,

Thank you for your feedback . I appreciate your response.

Let me put the question like this,
I am using a single message object let 01, and for this object i am using message id filter from 10 to 20.
Means object 01 can receive data from 10 to 20 message ids. In this scenario how message object memory will support all the 10 to 20 message id data. Because every time new id data receives by the object old id data is overwritten if i am right?
So if i want to store all the 10 to 20 message ID data then how i can store it ?


Regards,
Ashrumochan

0 Kudos
Reply

969 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Yes, if you only use one message object.

While how about use ten Message objects in RAM:

Alice_Yang_0-1645692685574.png

 

BR

Alice

 

0 Kudos
Reply