Tercio FD
Bus health
CAN controllers keep score of every error they see. The Tercio FD reports those counters four times a second, so a bad cable or a missing terminator shows up as a number instead of a mystery.
In Tercio Control, open Tercio FD at the bottom of the side bar. In Python, read bus.adapter_status.
Bus state
Section titled “Bus state”Error active
HealthyNormal. Both error counters below 96.Warning
Errors seenA counter reached 96. Frames still get through, but something is wrong.Error passive
Error passiveA counter reached 128. The adapter stops signalling errors so it cannot disturb the bus.Bus off
Bus offThe transmit counter passed 255. The adapter left the bus and tries to rejoin every 50 ms.The drivers have the same counters: an S1 in error passive shows the CAN errors warning.
Counters
Section titled “Counters”| Field | Meaning |
|---|---|
| Transmit errors (TEC) | Rises by 8 for each failed transmission, falls by 1 for each successful one. |
| Receive errors (REC) | The same for reception. |
| Last error | The type of the most recent error, see below. |
| To the bus | Frames delivered to the bus (acknowledged by some node). |
| From the bus | Frames received from the bus. |
| Dropped out | Frames from the computer that could not be sent: the queue was full, or no node acknowledged them within 50 ms. |
| Dropped in | Frames from the bus lost because the computer did not read fast enough. |
| Bad USB frames | Damaged frames from the computer, rejected by their CRC. |
| Bus-off events | How often the adapter went bus-off. |
Reset counters zeroes the traffic statistics; the error counters belong to the CAN controller and fall by themselves as frames get through.
Last error
Section titled “Last error”| Error | Usual cause |
|---|---|
| No acknowledge | Nothing else on the bus is powered or listening. Check that the S1 has power and that CAN-H and CAN-L are not swapped. |
| Stuff error, Form error | Noise or reflections: a missing or extra terminator, an untwisted cable, a long stub. |
| Bit 0 error, Bit 1 error | The adapter could not drive the bus to the level it sent: a short, a swapped pair, or a node on a different bit rate. |
| CRC error | Corrupted frames: noise, bad termination or a poor ground connection. |
| None / No change | Nothing new since the last report. |
The status frame
Section titled “The status frame”The adapter sends this on its own channel (ID 0x800) every 250 ms while the port is open, and in answer to GetStatus and ResetCounters. See Serial link.
0bus stateu8
1tecu8
2recu8
3last erroru8
4to CANu32
8from CANu32
12dropped to CANu32
16dropped from CANu32
20framing errorsu32
24bus-off eventsu16
26reservedu16
| Offset | Field | Type | Meaning |
|---|---|---|---|
| 0 | bus state | u8 | 0 error active, 1 warning, 2 error passive, 3 bus off |
| 1 | tec | u8 | Transmit error counter |
| 2 | rec | u8 | Receive error counter |
| 3 | last error | u8 | Last protocol error code (0 none … 6 CRC, 7 no change) |
| 4 | to CAN | u32 | Frames delivered to the bus |
| 8 | from CAN | u32 | Frames received from the bus |
| 12 | dropped to CAN | u32 | Queue full, or not deliverable within 50 ms |
| 16 | dropped from CAN | u32 | The host did not read fast enough |
| 20 | framing errors | u32 | Damaged serial frames from the host |
| 24 | bus-off events | u16 | Times the adapter went bus-off |
| 26 | reserved | u16 | 0 |