BUSOFF error automatic protection?

CAN FD Interface for High-Speed USB 2.0
Post Reply
zhicks
Posts: 3
Joined: Thu 26. Sep 2024, 21:53

BUSOFF error automatic protection?

Post by zhicks » Thu 26. Sep 2024, 22:01

Hello,

I am testing a CAN device and am considering implementing automatic baud detection. I am doing some preliminary testing and have found that if two or more devices are communicating on the bus, and a third (non-PCAN) device connects to the bus actively with a mismatched bitrate, the PCAN will show a BUS-OFF error as the mis-configured device has flooded the bus with error messages, and communication between the previously transceiving devices ceases (I believe this is expected with CAN). However, when the PCAN acts as this mismatched bitrate device joining the active bus, the PCAN shows a BUS-OFF error, but the other two devices continue to communicate without issue. How is this achieved? Does the PCAN have an error threshold and puts itself into listen-only mode to preserve the bus?

Any help would be great, thanks!

M.Heidemann
Sales & Support
Sales & Support
Posts: 1023
Joined: Fri 20. Sep 2019, 13:31

Re: BUSOFF error automatic protection?

Post by M.Heidemann » Fri 27. Sep 2024, 08:42

Hi,

A node that is mismatched to the rest of the bus itself is supposed to run into a BUSOFF state, as the purpose of it is to eliminate the error source, if this device on your bus does not into a bus-off that behavior isn't what one would expect when adhering to the CAN-Spec.

The are only certain conditions that cause more than one CAN-node into a bus-off, namely ID collisions, these will result in all nodes detecting a collision to go into a BUS-Off state.

The scenario you are describing is exactly what a bus-off is supposed to prevent, by adhering to the spec our devices will enter their error states (passive/active) and eventually a busoff if the controller is unable to A) recognize its own tranmission B) recognizes a ID conflict or C) never gets any acknowledgement from other nodes and receiving faulty signals (bitrate mismatch).

We didn't implement any behavior in this that is specific to our devices, we adhere to the CAN-spec in this case.

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

zhicks
Posts: 3
Joined: Thu 26. Sep 2024, 21:53

Re: BUSOFF error automatic protection?

Post by zhicks » Fri 27. Sep 2024, 16:05

Hi Marvin, thank you for the response. To be clear, is the bus forcing the mismatched device to go into a BUSOFF state, or is it the responsibility of the mismatched device to recognize it is causing errors and isolate itself from the BUS?

Thank you.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1023
Joined: Fri 20. Sep 2019, 13:31

Re: BUSOFF error automatic protection?

Post by M.Heidemann » Fri 27. Sep 2024, 16:12

Hi,

You're welcome!

The device itself is supposed to stop communication to the bus,
every node is supposed to manage itself and keep the bus operational. (Mutli-Master)

This is happening on the CAN-Controller (On hardware), so this applies even if there is a higher-layer
protocol running which uses a Server/Client approach.

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

zhicks
Posts: 3
Joined: Thu 26. Sep 2024, 21:53

Re: BUSOFF error automatic protection?

Post by zhicks » Wed 9. Oct 2024, 16:57

Hello again, thank you for the reply.

I was just curious, when the PCAN joins an active BUS, if I connect the PCAN to it with a mismatched baud (the PCAN is the wrong rate) - what is the PCAN doing to manage itself? Is it putting itself into monitor mode? Or does it have some sort of automatic baud detection?

M.Heidemann
Sales & Support
Sales & Support
Posts: 1023
Joined: Fri 20. Sep 2019, 13:31

Re: BUSOFF error automatic protection?

Post by M.Heidemann » Tue 15. Oct 2024, 14:09

Hello,

PCAN-API 4 based applications (PCANView, PCAN-Explorer) can connect to existing connections, it will just use the same bitrate and will be able to fully participate on the bus.

PCANBasic API lacks that feature.

BR

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply