zephyr/samples
Henrik Brix Andersen 180cdc105e drivers: can: add start and stop CAN controller API functions
Up until now, the Zephyr CAN controller drivers set a default bitrate (or
timing) specified via devicetree and start the CAN controller in their
respective driver initialization functions.

This is fine for CAN nodes using only one fixed bitrate, but if the bitrate
is set by the user (e.g. via a DIP-switch or other HMI which is very
common), the CAN driver will still initialise with the default
bitrate/timing at boot and use this until the application has determined
the requested bitrate/timing and set it using
can_set_bitrate()/can_set_timing().

During this period, the CAN node will potentially destroy valid CAN frames
on the CAN bus (which is using the soon-to-be-set-by-the-application
bitrate) by sending error frames. This causes interruptions to the ongoing
CAN bus traffic when a Zephyr-based CAN node connected to the bus is
(re-)booted.

Instead, require all configuration (setting bitrate, timing, or mode) to
take place when the CAN controller is stopped. This maps nicely to entering
"reset mode" (called "configuration mode" or "freeze mode" for some CAN
controller implementations) when stopping and exiting this mode when
starting the CAN controller.

Fixes: #45304

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-09-13 16:06:50 +00:00
..
application_development includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
arch includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
basic samples: blinky_pwm: add rcar_h3ulcb_cr7 board overlay's 2022-09-07 15:50:49 +02:00
bluetooth Bluetooth: Mesh: Remove experimental tag from CDB 2022-09-12 14:14:27 +00:00
boards samples: reel_board: mesh_badge: Switch to FIXED_PARTITION_ macros 2022-09-06 09:56:37 +02:00
compression includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
drivers drivers: can: add start and stop CAN controller API functions 2022-09-13 16:06:50 +00:00
hello_world includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
kernel includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
modules includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
net drivers: can: add start and stop CAN controller API functions 2022-09-13 16:06:50 +00:00
philosophers includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
posix include: Prefix includes to use a scope 2022-04-08 19:03:32 +02:00
sensor samples: sensors: add a new one for lsm6dso as I2C on I3C bus 2022-09-09 17:42:33 -04:00
shields includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
subsys boards: frdm_k64f: add SD/MMC support 2022-09-07 16:37:36 -05:00
synchronization includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
tfm_integration sample: psa_firmware: Fix the review comments 2022-09-09 16:31:20 -04:00
userspace includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
classic.rst
index.rst