Andre Hartmann

S12XEP100 MSCAN Bitrate detection

Discussion created by Andre Hartmann on Jun 24, 2013
Latest reply on Jun 26, 2013 by Andre Hartmann

Hello,

 

I have the following system:

 

  • Multiple devices (up to 64) on a CAN bus line
  • One Gateway (usually a PC with USB or PCI CAN card)
  • All devices use one of the bit rates 125 or 250 kbit/s
  • The selected bit rate is stored in an EEPROM cell in all devices

 

This works fine as long as all devices work with the same bit rate.

 

Sometimes it happens, that one device with the "wrong" bitrate is inserted in such a system which breaks the whole system.

 

I'm now looking for a way to detect such errors.

 

In my opinion, the CANTXERR register should count up in the one wrong configured module whenever it transmits a CAN message.

I'm not sure if the CANRXERR is counted up if messages with a wrong bitrate are received.

 

Is there a reason why these registers are not readable in normal mode?

 

What will be the best way to detect these error conditions?

 

Thanks in advance.

 

Best regards,

Andre

Outcomes