AnsweredAssumed Answered

Is it possible to change the CAN baud rate on the fly?

Question asked by mpfgregory on Oct 11, 2016
Latest reply on Oct 12, 2016 by mpfgregory

Hello all,

 

I'm developing a product based on a Vybrid Vf6. I'm running MQX on the M4 core. The HMI on the A5 allows the user to change the baud rate for CAN0 and CAN1. Both CAN ports are controlled by the fsl_flexcan_driver on the M4. For testing purposes I connect the 2 CAN ports and have them send messages to each other. This works fine at all baud rates, but only if I set both to equal baud rates before establishing a physical connection. The following scenarios will crash the CAN driver:

 

1) The 2 ports are not physically connected. Set the 2 baud rates to different values, then establish the physical connection.

 

2) The 2 ports are physically connected and run on the same baud rate. Change the baud rate of one port while the connection is present.

 

In both cases the driver doesn't work anymore. There is no crash in the software, but when I measure the signal on the CAN bus with an oscilloscope, there is only silence. Disconnecting the 2 ports, setting their baud rate to the same value, then reconnecting them doesn't help either. Only after a reboot of the M4 the CAN ports are working again.

 

Has anybody seen this problem? Is it related to the driver, or is this usual behavior for CAN devices? Would the customers accept this restriction?

 

Best regards

Michael

Outcomes