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?
Original Attachment has been moved to: CAN0.zip