CAN Baudrate Error

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello at all,
if i connect my XMC4500 with the PEAK and the Baudraes are the same it works perfekt. But wen i change the Baudrate on one site, on the PEAK or on the XMC, the CANVIEW says BusHeavy. Ok.... But then i choose to the other site the same Baudrate it doesn't work (always BusHeavy).
it doesn't work, but wen i restart the XMC it beginns to work with de New Baudrate!
Can someone help me?????

Greetings
Knecht Patrick
0 Likes
1 Reply
DRubeša
Employee
Employee
First solution authored First like received
Hi Knecht Patrick,

if I understood everything correctly, you would like to be able to change baudrate dynamically during the run-time. I don´t know how you tried to do it (at least on the XMC side), but I can give you some hints and you can try something like that.

First of all it´s very important to understand that you shouldn´t change the baudrate while the NODE is part of the active CAN network. Things like bus errors just wait to happen. For this reason I suggest to first terminate participation of the node in CAN traffic. You do this by calling "XMC_CAN_NODE_SetInitBit" function.

However, be sure that you already finished with transmitting/receiving on the node you want to disable. If you disable the node in the middle of operation, you´ll end up with an error. So, check the status flag first and then proceed with terminating participation of the node.

Once you done that, call "XMC_CAN_NODE_NominalBitTimeConfigure" with appropriate baudrate argument to the function. Inside of this function NCRx.CCE will be set and reset so you don´t need to take care about it. Once that is done, you can enable the participation of the node in CAN traffic by calling "XMC_CAN_NODE_ResetInitBit" function.

Try something like this and let me know how it went.

Best regards,
Deni
0 Likes