drivers: can: m_can: fix reconfiguring bitrate
Set enable configuration change bit in can_mcan_set_timing() because the NBTP register can only be changed if we're in init mode AND configuration change bit is set, per MCU docs. Signed-off-by: Jeremy Wood <jeremy@bcdevices.com>
This commit is contained in:
parent
4e88c91964
commit
833d6c2315
1 changed files with 3 additions and 0 deletions
|
@ -193,6 +193,9 @@ int can_mcan_set_timing(const struct can_mcan_config *cfg,
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
/* Configuration Change Enable */
|
||||
can->cccr |= CAN_MCAN_CCCR_CCE;
|
||||
|
||||
can_mcan_configure_timing(can, timing, timing_data);
|
||||
|
||||
ret = can_leave_init_mode(can, K_MSEC(CAN_INIT_TIMEOUT));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue