How doesn CAN on MK20 loss receiving messages?

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

How doesn CAN on MK20 loss receiving messages?

468 Views
yarannan
Contributor III

Hi,

I am really new to CAN bus. Currently, I am using CANOpen and send 5 bytes per message.

I am running into an issue of receive all of messages by using CAN on MK20 with KDS2.0+Processor Expert.

1. I sent 580 messages in total, interval is 100ms per message through P-CAN view and CAN node on MK20 only acknowledged 568.

2. I used system oscillator as my clock.

3. I tried to reduce the bit rate to 50kbps, but it doesnt seem get less losses.

4. I tried to remove the while loop in the code, but it wont receive any message after.

3. My code is attached below (There are a bunch of unrelated things, just ignore them at this moment)

 

I have following questions:

1. Is something wrong with my software? If yes, please dont hesitate to comment on it.

2. How could i improve this?

 

Thanks,

 

Yaran

Original Attachment has been moved to: CAN0.zip

0 Kudos
1 Reply

337 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Yaran,

I just took your SR and replied with some suggestion, please kindly let me know if you have any issue .

Have a great day!

Kan

0 Kudos