drivers: can: stm32fd: use bosch m_can timing parameter initializers
The minimum/maximum CAN timing parameters for the STM32 FDCAN driver uses the wrong values for the minimum, nominal phase segment values. Using the static initializers fixes these and aligns them to the Bosch M_CAN manual. The STM32G4 reference manual contains contradicting limits for these register values. Fixes: #58429 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
52a8f821fa
commit
fd6ba71076
1 changed files with 4 additions and 28 deletions
|
@ -594,36 +594,12 @@ static const struct can_driver_api can_stm32fd_driver_api = {
|
|||
.get_max_bitrate = can_mcan_get_max_bitrate,
|
||||
.get_max_filters = can_mcan_get_max_filters,
|
||||
.set_state_change_callback = can_mcan_set_state_change_callback,
|
||||
.timing_min = {
|
||||
.sjw = 0x01,
|
||||
.prop_seg = 0x00,
|
||||
.phase_seg1 = 0x01,
|
||||
.phase_seg2 = 0x01,
|
||||
.prescaler = 0x01
|
||||
},
|
||||
.timing_max = {
|
||||
.sjw = 0x80,
|
||||
.prop_seg = 0x00,
|
||||
.phase_seg1 = 0x100,
|
||||
.phase_seg2 = 0x80,
|
||||
.prescaler = 0x200
|
||||
},
|
||||
.timing_min = CAN_MCAN_TIMING_MIN_INITIALIZER,
|
||||
.timing_max = CAN_MCAN_TIMING_MAX_INITIALIZER,
|
||||
#ifdef CONFIG_CAN_FD_MODE
|
||||
.set_timing_data = can_mcan_set_timing_data,
|
||||
.timing_data_min = {
|
||||
.sjw = 0x01,
|
||||
.prop_seg = 0x00,
|
||||
.phase_seg1 = 0x01,
|
||||
.phase_seg2 = 0x01,
|
||||
.prescaler = 0x01
|
||||
},
|
||||
.timing_data_max = {
|
||||
.sjw = 0x10,
|
||||
.prop_seg = 0x00,
|
||||
.phase_seg1 = 0x20,
|
||||
.phase_seg2 = 0x10,
|
||||
.prescaler = 0x20
|
||||
}
|
||||
.timing_data_min = CAN_MCAN_TIMING_DATA_MIN_INITIALIZER,
|
||||
.timing_data_max = CAN_MCAN_TIMING_DATA_MAX_INITIALIZER,
|
||||
#endif /* CONFIG_CAN_FD_MODE */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue