From 39da81288cd20a8e261b72f1ef00f64baf4247bb Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Thu, 12 May 2022 09:33:16 +0200 Subject: [PATCH 1/2] doc: develop: api: overview: note that the CAN API was changed in v3.1 Update the API overview documentation to note that the CAN API was changed in the upcoming Zephyr v3.1 release. Signed-off-by: Henrik Brix Andersen --- doc/develop/api/overview.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/develop/api/overview.rst b/doc/develop/api/overview.rst index ad5d501ecbfbd..3ff155f7512cf 100644 --- a/doc/develop/api/overview.rst +++ b/doc/develop/api/overview.rst @@ -50,7 +50,7 @@ current :ref:`stability level `. * - :ref:`can_api` - Unstable - 1.14 - - 3.0 + - 3.1 * - :ref:`counter_api` - Unstable From 5b5ba6ebe346232aab28fef14481fe48510e967c Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Thu, 12 May 2022 09:34:24 +0200 Subject: [PATCH 2/2] doc: releases: 3.1: add CAN related release notes Add CAN related release notes for Zephyr v3.1.0. Signed-off-by: Henrik Brix Andersen --- doc/releases/release-notes-3.1.rst | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/doc/releases/release-notes-3.1.rst b/doc/releases/release-notes-3.1.rst index 852ed9b9c1001..737f27218d6b0 100644 --- a/doc/releases/release-notes-3.1.rst +++ b/doc/releases/release-notes-3.1.rst @@ -36,6 +36,41 @@ Changes in this release with SD cards. See :ref:`the disk access api ` for an example of the new devicetree binding format required. +* CAN + + * Added ``const struct device`` parameter to the following CAN callback function signatures: + + * ``can_tx_callback_t`` + * ``can_rx_callback_t`` + * ``can_state_change_callback_t`` + + * Allow calling the following CAN API functions from userspace: + + * :c:func:`can_set_mode()` + * :c:func:`can_calc_timing()` + * :c:func:`can_calc_timing_data()` + * :c:func:`can_set_bitrate()` + * :c:func:`can_get_max_filters()` + + * Changed :c:func:`can_set_bitrate()` to use a sample point of 75.0% for bitrates over 800 kbit/s, + 80.0% for bitrates over 500 kbit/s, and 87.5% for all other bitrates. + + * Split CAN classic and CAN-FD APIs: + + * :c:func:`can_set_timing()` split into :c:func:`can_set_timing()` and + :c:func:`can_set_timing_data()`. + * :c:func:`can_set_bitrate()` split into :c:func:`can_set_bitrate()` and + :c:func:`can_set_bitrate_data()`. + + * Converted the ``enum can_mode`` into a ``can_mode_t`` bitfield and renamed the CAN mode + definitions: + + * ``CAN_NORMAL_MODE`` renamed to :c:macro:`CAN_MODE_NORMAL`. + * ``CAN_SILENT_MODE`` renamed to :c:macro:`CAN_MODE_LISTENONLY`. + * ``CAN_LOOPBACK_MODE`` renamed to :c:macro:`CAN_MODE_LOOPBACK`. + * The previous ``CAN_SILENT_LOOPBACK_MODE`` can be set using the bitmask ``(CAN_MODE_LISTENONLY | + CAN_MODE_LOOPBACK)``. + Removed APIs in this release ============================ @@ -49,6 +84,19 @@ Removed APIs in this release * ``CONFIG_GPIO_STM32_SWJ_NOJTAG`` * ``CONFIG_GPIO_STM32_SWJ_DISABLE`` +* Removed experimental 6LoCAN protocol support. + +* Removed the following deprecated CAN APIs: + + * Custom CAN error codes + * ``can_configure()`` + * ``can_attach_workq()`` + * ``can_attach_isr()`` + * ``can_attach_msgq()`` + * ``can_detach()`` + * ``can_register_state_change_isr()`` + * ``can_write()`` + Deprecated in this release ========================== @@ -105,6 +153,16 @@ New APIs in this release * Added a :ref:`MIPI-DSI api `. This is an experimental API, some of the features/APIs will be implemented later. +* CAN + + * Added support for getting the minimum/maximum supported CAN timing parameters: + + * :c:func:`can_get_timing_min()` + * :c:func:`can_get_timing_max()` + * :c:func:`can_get_timing_data_min()` + * :c:func:`can_get_timing_data_max()` + + * Added support for enabling/disabling CAN-FD mode at runtime using :c:macro:`CAN_MODE_FD`. Kernel ****** @@ -168,6 +226,15 @@ Drivers and Sensors * CAN + * Switched from transmitting CAN frames in FIFO/chronological order to transmitting according to + CAN-ID priority (NXP FlexCAN, ST STM32 bxCAN, Bosch M_CAN, Microchip MCP2515). + * Added support for ST STM32U5 to the ST STM32 FDCAN driver. + * Renamed the base Bosch M_CAN devicetree binding compatible from ``bosch,m-can-base`` to + :dtcompatible:`bosch,m_can-base`. + * Added CAN controller statistics support (NXP FlexCAN, Renesas R-Car, ST STM32 bxCAN). + * Added CAN transceiver support. + * Added generic SocketCAN network interface and removed driver-specific implementations. + * Counter * DAC