Jump to content
  • 0

Digilent PmodCAN


SunmedCAN19

Question

Our team has been using the Digilent PmodCAN CAN-Spi module and have been running into issues related to reading the messages from the CANBus. We are using the mcp_can library that is compatible with this module to read messages from the CANBus, but the messages are coming in out of order and will sometimes miss messages when the CANBus is loaded with a higher number of messages in a short amount of time. I have attached the code I am using that returns messages out of order or misses messages completely. The code will miss around half of the messages when the CANBus has a Bus message load higher than 40% and some of the caught messages are out of order. 

mcp_can.h.txt

mcp_can_dfs.h.txt

CANTest.ino.txt

mcp_can.cpp.txt

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hi @SunmedCAN19,

Welcome to the forums. Looking at you libraries, the INO and the CAN IC's datasheet, we have some initial thoughts as to what the issue could be.

1) In listening mode the filters are ignored. So the receive buffers are being used without the normal overhead managing input. If you are not reading the buffers at the right frequency then you could easily be losing data (explained more on page 15 of the MCP25625 datasheet). You need to make sure you are reading from both receive buffers as well.  

2) You could have some configuration issues that is causing unexpected results.

We have not used the PmodCAN in listening mode. We have loopback and rx/tx examples. When I have some available bandwidth, later next week, I will work on getting the listening mode working through the Arduino IDE with two of our Arduino compatible microcontrollers and share the results on this thread.

thank you,

Jon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...