Hello,
I have CPU2 handling CANA IO on a 1MHz high-precision clock. I am working on a 2016 Mac Workbook that hosts a windows 10 install on top of Parallels.
To test communications, I am using a PCASN-USB Pro and PCAN-Viewer. I have PCAN-Viewer send one message every 1ms. I have registered 16 CAN objects (8 rx, 8 tx). Of which I am only using 2. The PC to C2000 message ID is 0x02000002. The response message ID is 0x01000000.
Here's the issue I am wondering about: I find the occasional missed message (2-6 in order 10^5 messages). What I find strange is, when I put the CAN message reception on an ISR, receive status interrupts, and accumulate them, I get a status interrupt for every inbound message, however, I don't get an interrupt for the message object receiving data. I believe it's reasonable to rule out the test as the source of the error because the receive status interrupt is always consistent with the number of messages sent by the test HW/SW. Under what circumstances could I get the status interrupt, but not the message interrupt?
I have tried several things to further characterize the issue:
- query the CAN core for all received messages every time the receive status interrupt occurs.
- disable receive interrupts, and query the CAN core in the main loop.
- change the transmission rate to 2ms.
After sending 10^6 messages @ 2ms, I show no lost messages. So the problem seems related to timing. In theory, I should be able to send 8K messages per second. So, The bus should be busy only 25% of the time.
I hope to gain a better understanding of how this could happen, and how it can be prevented. Perhaps someone more versed in CAN IO on this target could suggest considerations in this matter.
Thanks in advanced!
Stephen