zephyr/drivers/can
Martin Jäger c56b1dbca1 drivers: can: stm32: rework filter handling
The previous driver implementation aimed to maximize the amount of
filters, which resulted in a fairly complex implementation.

Background: The bxCAN assigns a number to the filters in the order they
appear in the filter banks. This number is used to match messages in
the FIFO with their filter. If the scale or mode of a filter bank is
changed, all following filter numbers get an offset and the assigned
callbacks have to be shifted accordingly.

The required additional space for the shifting operations resulted in
non-deterministic behaviour and the maximum number of filters could not
be determined at compile-time, which made several tests like
tests/drivers/can/api fail.

This implementation uses a more simple but reliable approach for
filtering and and reserves fixed space for extended and standard ID
filters in the available banks (configurable via Kconfig).
The list mode is not used, which may reduce the total number of usable
filters depending on the application.

The maximum amount of filters is 14 if all filters use ext. IDs,
28 if all use std IDs and something in between if mixed IDs are used.

Also see issue #47986 for more detailed background information.

Signed-off-by: Martin Jäger <martin@libre.solar>
2022-08-03 05:02:09 +01:00
..
transceiver drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
CMakeLists.txt drivers: can: add ESP32 TWAI CAN controller driver 2022-07-30 17:32:04 +01:00
Kconfig drivers: can: add ESP32 TWAI CAN controller driver 2022-07-30 17:32:04 +01:00
Kconfig.esp32 drivers: can: add ESP32 TWAI CAN controller driver 2022-07-30 17:32:04 +01:00
Kconfig.loopback drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
Kconfig.mcan kconfig: remove Enable from boolean prompts 2022-03-09 15:35:54 +01:00
Kconfig.mcp2515 drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
Kconfig.mcux drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
Kconfig.rcar drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
Kconfig.sam drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
Kconfig.sja1000 drivers: can: add NXP SJA1000 common driver backend 2022-07-30 17:32:04 +01:00
Kconfig.stm32 drivers: can: stm32: rework filter handling 2022-08-03 05:02:09 +01:00
Kconfig.stm32fd drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
Kconfig.stm32h7 drivers: can: Update drivers to use devicetree Kconfig symbol 2022-07-21 06:02:28 -05:00
can_common.c drivers: can: rename API functions from timing_*_data to timing_data_* 2022-05-11 10:47:54 +02:00
can_esp32_twai.c drivers: can: add ESP32 TWAI CAN controller driver 2022-07-30 17:32:04 +01:00
can_handlers.c drivers: can: add API for getting supported capabilities 2022-07-13 10:13:56 +02:00
can_loopback.c drivers: can: loopback: add CAN-FD loopback support 2022-07-18 18:43:36 +02:00
can_mcan.c drivers: can: mcan: acknowledge all received frames 2022-07-18 13:24:54 +00:00
can_mcan.h drivers: can: mcan: increase maximum supported bitrate 2022-07-18 14:30:47 +00:00
can_mcan_priv.h drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
can_mcp2515.c drivers: can: add API for getting supported capabilities 2022-07-13 10:13:56 +02:00
can_mcp2515.h drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
can_mcux_flexcan.c drivers: Fix coding guidelines MISRAC:2012 Rule 14.4 do-whiles/Zero checks 2022-07-26 15:30:24 -04:00
can_mcux_mcan.c drivers: can: mcux: mcan: add pinctrl support 2022-07-13 18:10:52 +02:00
can_rcar.c drivers: can: add API for getting supported capabilities 2022-07-13 10:13:56 +02:00
can_sam.c drivers: can: add API for getting supported capabilities 2022-07-13 10:13:56 +02:00
can_shell.c drivers: can: shell: add support for setting triple sampling mode 2022-07-13 19:06:59 +02:00
can_sja1000.c drivers: can: add NXP SJA1000 common driver backend 2022-07-30 17:32:04 +01:00
can_sja1000.h drivers: can: add NXP SJA1000 common driver backend 2022-07-30 17:32:04 +01:00
can_sja1000_priv.h drivers: can: add NXP SJA1000 common driver backend 2022-07-30 17:32:04 +01:00
can_stm32.c drivers: can: stm32: rework filter handling 2022-08-03 05:02:09 +01:00
can_stm32.h drivers: can: stm32: rework filter handling 2022-08-03 05:02:09 +01:00
can_stm32fd.c drivers: can: add API for getting supported capabilities 2022-07-13 10:13:56 +02:00
can_stm32h7.c drivers: can: add API for getting supported capabilities 2022-07-13 10:13:56 +02:00
can_utils.h drivers: can: catch up on API naming changes 2021-12-07 15:39:06 -05:00