2
\$\begingroup\$

I'm debugging my robot with a CAN bus for communication between the main controller unit and all motor controllers.

Recently I'm getting several cases where I'm getting an error frame at the 6th bit in EOF. What is this error and what does it indicate?

This doesn't seem to be a CRC or ACK error, and to my knowledge could be only a random bit error. But if that is true I don't understand why it's at the 6th bit every time.

I've posted the plot here and a second plot to show a zoomed-in version of where the error occurs. The motor controllers are using 3.3 V CAN transceivers and the main controller is 5 V, and that's why you would see different voltage levels. The frame with error was when a motor controller was sending to the main controller unit.

The complete CAN frame

EOF and error frame

\$\endgroup\$
5
  • \$\begingroup\$ "to my knowledge could be only a random bit error. But if that is true I don't understand why it's at the 6th bit every time." Bit stuffing happens after 5 consecutive bits of the same polarity. But on the other hand, bit stuffing is not applied during EOF. Which CAN controller is responsible for this malformed frame? \$\endgroup\$
    – Velvet
    Commented Oct 4, 2022 at 22:11
  • \$\begingroup\$ Looks like an error frame (6 dominant 8 recessive). As for who is sending it and why, I don't know. The location at bit 5 in EOF might cause a "form error" (unexpected values of fixed bits) rather than "stuffing error" (6 consecutive logic levels) with the receivers, in case that matters for some reason. \$\endgroup\$
    – Lundin
    Commented Oct 5, 2022 at 9:22
  • 1
    \$\begingroup\$ For troubleshooting further, here's a good place to start: What are the most common causes of CAN bus communication errors? \$\endgroup\$
    – Lundin
    Commented Oct 5, 2022 at 9:30
  • \$\begingroup\$ @Seir the main controller is a Nucleo and the motor side is STM32F405. In case you are also asking about CAN transceiver it's SN65HVD23X on both sides. \$\endgroup\$
    – YBC82
    Commented Oct 22, 2022 at 4:07
  • \$\begingroup\$ @YBC82 What does the CAN error status register (CAN_ESR) say? Reference Manual \$\endgroup\$
    – Velvet
    Commented Oct 22, 2022 at 20:46

0

Browse other questions tagged or ask your own question.