• 0

Digilent PmodCAN


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. 





Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 1

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,


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now