Jump to content
  • 0

cannot change PMOD CAN speed


Gaston

Question

Hi,

I'm evaluating the PMOD CAN using provided demo software by digilent. The demo works fine as I'm able to see the received message on a BASYS MX3 slave from a BASYS MX3 master. However I'm trying to analyze the CAN frames with no success. For this I'm using a Microchip CAN Analyzer that have been used in others projects before. The weird thing is the demo software seems to be configured at 250kbps so I expect to see this rate on my analyzer single-ended RX pin. Here's the capture I get

image.png.41a769ba5919ab8bc62cfbc888c86571.png

The bit rate is almost 1.8Mbps instead 250kbps as expected. How is it possible? I don't understand this behavior. I've also checked the code and I find the next conditional.

image.png.72743702e718f2f4d3829d7736a0ac08.png

Please, could someone explain me this? Changing the speed does not give any results.

regards,
gaston

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

@Gaston

If the waveform you captured corresponds to the case you described the data rate is likely 1Mbits.  Since the Microchip CAN analyzer can't monitor at 250kbits the rate is certainly different. I would try different settings on Microchip CAN analyzer and monitor the traffic.

I am not an expert in the MCP25625 but the statement you showed is not sufficient to set the data rate. Typically, CAN hardware quite elaborate configuration for particular data rate.

Link to comment
Share on other sites

Hi, thank you for the feedback. I've finally found the problem. The conditional into the while posted above should to be changed to mcp_begin(MCP_ANY, CAN_250KBPS, MCP_20MHZ). Another (*) silly mistake from this 'of-the shelf' CAN library demo. Digilent team, please, fix it. This is very annoying to waste the time debugging this kind of issues.

(*)

regards,
gaston

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...