Is it possible to change the CAN bit rate in run time?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to change the CAN bit rate in run time?

Jump to solution
2,252 Views
tamiritzhaki
Contributor I

We are using several S32K144EVB boards and as part of the CAN evaluation we would like to change the CAN bus bitrate of the network in run time. Is it possible? what's the best way to do it? Does restart of the units is required? 

Tags (1)
0 Kudos
1 Solution
1,955 Views
allen_willson
NXP Employee
NXP Employee

Hi Tamir,

Practically speaking, this is not usually done in CAN bus, because there is no autobaud feature, and any node on the bus that is not acting on the right bit rate will take down the bus due to transmitting continuous error frames.  You would need to build in a very reliable synchronization scheme for all nodes to change bit rates at the same time.  Changing the CAN controller's bit timing does not require restarting, just going back into initialization mode to reconfigure and then go to Normal mode and participate on the bus again. This is a very loose description of the steps...

On the other hand, CAN-FD provides some of what you are asking for.  CAN-FD provides two bit rates for the frame. Typically a slow/reliable bit rate is used during arbitration when sending the message identifier, then a faster bit rate is used for the data payload. The change of bit rate is built into the protocol and requires no special handling by the controller.  Maybe this feature of CAN-FD could help.  You can find the Bosch CAN-FD specs online, to review this capability.

-allenw

View solution in original post

0 Kudos
1 Reply
1,956 Views
allen_willson
NXP Employee
NXP Employee

Hi Tamir,

Practically speaking, this is not usually done in CAN bus, because there is no autobaud feature, and any node on the bus that is not acting on the right bit rate will take down the bus due to transmitting continuous error frames.  You would need to build in a very reliable synchronization scheme for all nodes to change bit rates at the same time.  Changing the CAN controller's bit timing does not require restarting, just going back into initialization mode to reconfigure and then go to Normal mode and participate on the bus again. This is a very loose description of the steps...

On the other hand, CAN-FD provides some of what you are asking for.  CAN-FD provides two bit rates for the frame. Typically a slow/reliable bit rate is used during arbitration when sending the message identifier, then a faster bit rate is used for the data payload. The change of bit rate is built into the protocol and requires no special handling by the controller.  Maybe this feature of CAN-FD could help.  You can find the Bosch CAN-FD specs online, to review this capability.

-allenw

0 Kudos