LPC4357 CAN

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

LPC4357 CAN

Jump to solution
1,017 Views
Ashrumochan
Contributor III

Hello Friends,

I was configuring can for one of my project in lpc 4357. In can the message object is defined as 0x20(32).

Which means maximum 32 numbers can be assigned as object number and for each individual number separate RAM will be used to store and process the can messages.
If my understanding is okay, the messages processed using the CPU ram . If there are multiple nodes in can bus and one node winning the bus and busy in transmitting. During this another node has also number of messages , will the messages be remain in RAM until first node completes its job or they will be lost.  How this will work? another doubt is can we assign multiple messages object numbers to multiple can IDS, then how it will identify the messages?

Please share your feedback to me if any example or document on above?


Regards,
Ashrumochan

Tags (2)
0 Kudos
1 Solution
954 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Unfortunately, the CAN module of the LPC43xx does not support the ARM_CAN_FILTER_ID_RANGE_ADD and ARM_CAN_FILTER_ID_RANGE_REMOVE features.

Hope it can help you

BR

XiangJun Rong

View solution in original post

0 Kudos
3 Replies
998 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ashrumochan,

Q1) During this another node has also number of messages , will the messages be remain in RAM until first node completes its job or they will be lost. How this will work?

>>>>>>>Based on CAN protocol, as you know that a CAN node includes CAN_TD/CAN_RD, when a node wants to send message, first of all, the CAN_RD pin of the node will poll the CAN bus state, when the CAN bus is idle(no node drives the CAN bus), the CAN bus is in recessive state. When the CAN node detects that the CAN bus is in idle with CAN_RD pin, the CAN_TD of the node will drive the CAN bus with the CAN ID bits, then DLC, then data... When the CAN node detects that the CAN bus is NOT in idle with CAN_RD pin, the CAN_TD of the node will wait until the CAN bus is in idle and try to transmit.

If TWO CAN nodes detect that the CAN bus is in idle, then both of then try to drive the CAN bus with their own transmitted ID, in the case, because the CAN node also receives the ID when the same CAN node transmits it's ID, in the case, the node with small ID will own the CAN bus, the node with big ID will drop out of transmission, this is called arbitration.

 

 

Q2)another doubt is can we assign multiple messages object numbers to multiple can IDS, then how it will identify the messages?

>>>>>>For the CAN receiver, the accepted ID is defined in the CAN_IFx_ARB1 register, only when the ID matches between the ID defined CAN_IFx_ARB1 register and the ID the CAN bus transmitted via CAN BUS can the CAN receiver receives the CAN packet.

Hope it can help you

BR

XiangJun Rong

0 Kudos
960 Views
Ashrumochan
Contributor III

Hi xiangjun_rong,

Thanks for your reply and sorry for acknowledging you late.

Your reply clarified my doubts as well understood.

I have another issue with the driver need your valuable suggestion/clarification to proceed further...

If we see the driver and functionality of CANx ObjectSetFilter function, the driver gives an error if we configure as below.  

case ARM_CAN_FILTER_ID_RANGE_ADD:
case ARM_CAN_FILTER_ID_RANGE_REMOVE:
return ARM_DRIVER_ERROR_UNSUPPORTED;

Is the driver is implemented like this for any specific reason or this feature is not supported?

How can we implement to use the above features ?

Regards,

Ashrumochan

0 Kudos
955 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Unfortunately, the CAN module of the LPC43xx does not support the ARM_CAN_FILTER_ID_RANGE_ADD and ARM_CAN_FILTER_ID_RANGE_REMOVE features.

Hope it can help you

BR

XiangJun Rong

0 Kudos