I work with some devices which used STM32 MCU and MCP2561. Theses devices talks on a CAN Bus. Everything is ok.

But when i plug a Raspberry Pi with a MCP2515(Spi) and a MCP2561. I see a lot of invalid frames on my scope like this :

enter image description here

A valid CAN Frame is like : enter image description here

A zoom on the problem : enter image description here

I don't understand why there is a problem at the ACK/ACK Delimiter.

Thank You for your help.

  • \$\begingroup\$ In your 'valid' frame, the ACK slot does not look right either. Why is it only at 2V? I assume you measure not only one line (CANH) but the difference between CANH and CANL, correct? What else is connected to the bus besides the scope? Do you have termination resistor(s) in place? \$\endgroup\$ – JimmyB Jun 21 at 13:17
  • \$\begingroup\$ Looks like the RPI issues an error flag at the end. What do the status registers of the can controller read? \$\endgroup\$ – Jeroen3 Jun 24 at 5:46

It could be an electrical issue with one of the CAN signal leads or the grounds. Check the continuity of those.

Next, make sure that the RPi is running some known-good code that initializes the CAN adapter properly. The adapter has to do a lot of work for the CAN protocol. It works semi-autonomously, so if it’s not set up properly it’ll reject frames.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.