zephyr/drivers/can
Henrik Brix Andersen 267a83e94b drivers: can: flexcan: fix timing parameter limits
Fix the limits for the timing parameter calculations.

The lower limit for the phase_seg2 value is wrongly specified as 1 to 7,
but 1U is substracted before writing it to the CTRL1:PSEG2 register
field. This results in register field values between 0 and 6, but 0 is
an invalid value for the PSEG2 register field.

The upper limits for several of the timing parameters are wrong as well,
but this does not result in invalid register field values being
calculated. It can, however, result in not being able to meet CAN timing
requirements.

The confusion in specifying the limits likely stems from the timing
calculations and timing limits using the "physical" values, whereas the
registers fields all use the "physical" value minus 1. When the
datasheet says "The valid programmable values are 1-7", the
corresponding limits should be set to 2 to 8 to take the "minus 1" into
account.

Fixes: #39541

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-10-20 07:06:56 -04:00
..
can_common.c
can_handlers.c drivers: can: Fix compilation issue 2021-05-27 07:05:34 -05:00
can_loopback.c
can_loopback.h
can_mcan_int.h drivers: can: Implement Bosch M_CAN driver 2021-05-07 12:36:10 -05:00
can_mcan.c drivers: can: mcan: Fix DBTP sjw register writes 2021-06-04 08:12:12 -05:00
can_mcan.h drivers: can: Implement stm32fd driver 2021-05-07 12:36:10 -05:00
can_mcp2515.c can: mcp2515: convert to spi_dt_spec 2021-08-03 13:58:39 +02:00
can_mcp2515.h can: mcp2515: convert to spi_dt_spec 2021-08-03 13:58:39 +02:00
can_mcux_flexcan.c drivers: can: flexcan: fix timing parameter limits 2021-10-20 07:06:56 -04:00
can_net.c drivers: Update drivers to use new multicast monitor API 2021-09-28 20:04:49 -04:00
can_rcar.c drivers: can: Add Renesas R-Car driver 2021-06-07 12:06:21 +02:00
can_shell.c
can_stm32.c drivers: can: stm32: fix typo in a comment 2021-08-05 16:11:11 +02:00
can_stm32.h
can_stm32fd.c drivers/pinmux: stm32: Move stm32 driver from stm32/ 2021-06-11 08:04:39 -05:00
can_stm32fd.h drivers/pinmux: stm32: Move stm32 driver from stm32/ 2021-06-11 08:04:39 -05:00
can_utils.h drivers: can: mcp2515: move filter_match function 2021-06-07 12:06:21 +02:00
CMakeLists.txt drivers: can: build as static library 2021-08-17 06:06:03 -04:00
Kconfig drivers: can: Timestamps depend on driver select 2021-06-25 10:42:49 -04:00
Kconfig.loopback
Kconfig.mcan drivers: can: Timestamps depend on driver select 2021-06-25 10:42:49 -04:00
Kconfig.mcp2515
Kconfig.mcux drivers: can: Timestamps depend on driver select 2021-06-25 10:42:49 -04:00
Kconfig.net
Kconfig.rcar drivers: can: Kconfig.rcar: Make options depend on its driver 2021-06-28 10:40:18 -05:00
Kconfig.stm32 drivers: can: Timestamps depend on driver select 2021-06-25 10:42:49 -04:00
Kconfig.stm32fd drivers: can: Implement stm32fd driver 2021-05-07 12:36:10 -05:00
socket_can_generic.h