How doesn CAN on MK20 loss receiving messages?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How doesn CAN on MK20 loss receiving messages?

967 次查看
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 项奖励
回复
1 回复

836 次查看
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 项奖励
回复