38.12.1 Bus Diagnostic Registers

The Bus Diagnostic registers provide additional information about the health of the CAN bus:

  • CxBDIAG0 contains separate error counters for receive/transmit and for nominal/data bit rates. The counters work differently than the counters in the CxTREC registers. They are simply incremented by one on every error. They are never decremented, but can be cleared by writing ‘0’ to the register.
  • CxBDIAG1 keeps track of the kind of error that occurred since the last clearing of the register. The CxBDIAG1 register also contains the error-free message counter. The flags and the counter are cleared by writing ‘0’ to the register.