Skip to content

Commit 5f149cb

Browse files
committed
CAN Hw: give some time for HW to stop before restarting with new baud
H7 CAN can fall somewere inside low level init without this delay.
1 parent 9558427 commit 5f149cb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

firmware/hw_layer/drivers/can/can_hw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ int setCanBaud(size_t index, can_baudrate_e rate) {
329329
// Actually stop HW
330330
canStop(device);
331331

332+
// Give some time for HW to stop
333+
chThdSleepMilliseconds(1);
334+
332335
// Get config for new baudrate
333336
CANConfig canConfig;
334337
memcpy(&canConfig, findCanConfig(rate), sizeof(canConfig));

0 commit comments

Comments
 (0)