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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
2,584 次查看
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? 

标记 (1)
0 项奖励
回复
1 解答
2,287 次查看
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 项奖励
回复
1 回复
2,288 次查看
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 项奖励
回复