drivers: can: unify spelling of CAN Flexible Data-rate abbreviation

Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2023-10-31 10:09:38 +01:00 committed by Fabio Baltieri
parent b432293a9a
commit 5d5249d85b
55 changed files with 117 additions and 117 deletions

View File

@ -34,7 +34,7 @@ Hardware
- CMSIS-DAP swd debug interface over USB HID.
- 2 CAN port(support CAN-FD)
- 2 CAN FD ports
For more information about the GD32A503 SoC and GD32A503V-EVAL board:

View File

@ -36,7 +36,7 @@ Hardware
- CMSIS-DAP swd debug interface over USB HID.
- 2 CAN port(support CAN-FD)
- 2 CAN FD ports
- This function is not available in this board due to hardware issues, please check ``GD32C103`` .

View File

@ -11,7 +11,7 @@ processor series and expands the i.MX RT series to three scalable families.
The i.MX RT1060 doubles the On-Chip SRAM to 1MB while keeping pin-to-pin
compatibility with i.MX RT1050. This series introduces additional features
ideal for real-time applications such as High-Speed GPIO, CAN-FD, and
ideal for real-time applications such as High-Speed GPIO, CAN FD, and
synchronous parallel NAND/NOR/PSRAM controller. The i.MX RT1060 runs on the
Arm® Cortex-M7® core up to 600 MHz.

View File

@ -11,7 +11,7 @@ processor series and expands the i.MX RT series to three scalable families.
The i.MX RT1062 doubles the On-Chip SRAM to 1MB while keeping pin-to-pin
compatibility with i.MX RT1050. This series introduces additional features
ideal for real-time applications such as High-Speed GPIO, CAN-FD, and
ideal for real-time applications such as High-Speed GPIO, CAN FD, and
synchronous parallel NAND/NOR/PSRAM controller. The i.MX RT1062 runs on the
Arm® Cortex-M7® core up to 600 MHz.

View File

@ -10,7 +10,7 @@ The i.MX RT1064 adds to the industry's first crossover
processor series and expands the i.MX RT series to three scalable families.
The i.MX RT1064 doubles the On-Chip SRAM to 1MB while keeping pin-to-pin
compatibility with i.MX RT1050. This series introduces additional features
ideal for real-time applications such as High-Speed GPIO, CAN-FD, and
ideal for real-time applications such as High-Speed GPIO, CAN FD, and
synchronous parallel NAND/NOR/PSRAM controller. The i.MX RT1064 runs on the
Arm® Cortex-M7® core up to 600 MHz.

View File

@ -56,7 +56,7 @@ Nucleo G0B1RE provides the following hardware components:
- HDMI_CEC(1)
- USB 2.0 FS device (crystal-less) and host controller(1)
- USB Type-C Power Delivery controller
- CAN-FD(2)
- CAN FD(2)
- GPIO (up to 94) with external interrupt capability
- Tamper Pins(3)
- 12-bit ADC with 16 channels

View File

@ -71,7 +71,7 @@ Nucleo H723ZG provides the following hardware components:
- UART(4)
- USB OTG Full Speed and High Speed(1)
- USB OTG Full Speed(1)
- CAN-FD(2)
- CAN FD(2)
- SAI(2)
- SPDIF_Rx(4)
- HDMI_CEC(1)

View File

@ -73,7 +73,7 @@ Nucleo H743ZI provides the following hardware components:
- UART(4)
- USB OTG Full Speed and High Speed(1)
- USB OTG Full Speed(1)
- CAN-FD(2)
- CAN FD(2)
- SAI(2)
- SPDIF_Rx(4)
- HDMI_CEC(1)

View File

@ -75,7 +75,7 @@ Nucleo H745ZI-Q provides the following hardware components:
- UART(4)
- USB OTG Full Speed and High Speed(1)
- USB OTG Full Speed(1)
- CAN-FD(2)
- CAN FD(2)
- SAI(2)
- SPDIF_Rx(4)
- HDMI_CEC(1)

View File

@ -73,7 +73,7 @@ Nucleo H753ZI provides the following hardware components:
- UART(4)
- USB OTG Full Speed and High Speed(1)
- USB OTG Full Speed(1)
- CAN-FD(2)
- CAN FD(2)
- SAI(2)
- SPDIF_Rx(4)
- HDMI_CEC(1)

View File

@ -69,7 +69,7 @@ Nucleo H7A3ZI-Q provides the following hardware components:
- USART(5)
- UART(5)
- USB OTG Full Speed and High Speed(1)
- CAN-FD(2)
- CAN FD(2)
- SAI(2)
- SPDIF_Rx(4)
- HDMI_CEC(1)

View File

@ -70,7 +70,7 @@ features:
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| CAN-FD | on-chip | can |
| CAN FD | on-chip | can |
+-----------+------------+-------------------------------------+
| HWINFO | on-chip | Unique device serial number |
+-----------+------------+-------------------------------------+

View File

@ -1,12 +1,12 @@
.. _mikroe_mcp2518fd_click_shield:
MikroElektronika MCP2518FD Click shield (CAN-FD)
################################################
MikroElektronika MCP2518FD Click shield
#######################################
Overview
--------
MCP2518FD Click shield has a MCP2518FD CAN-FD controller via a SPI
MCP2518FD Click shield has a MCP2518FD CAN FD controller via a SPI
interface and a high-speed ATA6563 CAN transceiver.
More information about the shield can be found at

View File

@ -18,7 +18,7 @@ over Controller Area Networks. Nevertheless, it's not limited to applications in
road vehicles or the automotive domain.
This transport protocol extends the limited payload data size for classical
CAN (8 bytes) and CAN-FD (64 bytes) to theoretically four gigabytes.
CAN (8 bytes) and CAN FD (64 bytes) to theoretically four gigabytes.
Additionally, it adds a flow control mechanism to influence the sender's
behavior. ISO-TP segments packets into small fragments depending on the payload
size of the CAN frame. The header of those segments is called Protocol Control

View File

@ -292,7 +292,7 @@ The following example sets the bitrate to 250k baud with the sampling point at
LOG_ERR("Failed to start CAN controller");
}
A similar API exists for calculating and setting the timing for the data phase for CAN-FD capable
A similar API exists for calculating and setting the timing for the data phase for CAN FD capable
controllers. See :c:func:`can_set_timing_data` and :c:func:`can_calc_timing_data`.
SocketCAN

View File

@ -56,9 +56,9 @@ config CAN_STATS
Enable CAN controller device statistics.
config CAN_FD_MODE
bool "CAN-FD"
bool "CAN FD"
help
Enable CAN-FD support. Not all CAN controllers support CAN-FD.
Enable CAN FD support. Not all CAN controllers support CAN FD.
config CAN_RX_TIMESTAMP
bool "Receiving timestamps"

View File

@ -9,7 +9,7 @@ config CAN_MCAN
Enable Bosch m_can driver.
This driver supports the Bosch m_can IP. This IP is built into the
STM32G4, STM32G0, STM32H7, and the Microchip SAM controllers with
CAN-FD.
CAN FD.
if CAN_MCAN

View File

@ -19,7 +19,7 @@ config CAN_MCUX_FLEXCAN_FD
default y
depends on DT_HAS_NXP_FLEXCAN_FD_ENABLED && CAN_FD_MODE
help
Enable support for CAN-FD capable NXP FlexCAN devices.
Enable support for CAN FD capable NXP FlexCAN devices.
config CAN_MCUX_FLEXCAN_WAIT_TIMEOUT
int "Maximum number of wait loop iterations"

View File

@ -4,10 +4,10 @@
# SPDX-License-Identifier: Apache-2.0
config CAN_NUMAKER
bool "Nuvoton NuMaker CAN-FD driver"
bool "Nuvoton NuMaker CAN FD driver"
default y
select CAN_MCAN
depends on DT_HAS_NUVOTON_NUMAKER_CANFD_ENABLED
depends on SOC_SERIES_M46X
help
Enables Nuvoton NuMaker CAN-FD driver, using Bosch M_CAN
Enables Nuvoton NuMaker CAN FD driver, using Bosch M_CAN

View File

@ -882,7 +882,7 @@ int can_mcan_send(const struct device *dev, const struct can_frame *frame, k_tim
}
if (!data->fd && ((frame->flags & (CAN_FRAME_FDF | CAN_FRAME_BRS)) != 0U)) {
LOG_ERR("CAN-FD format not supported in non-FD mode");
LOG_ERR("CAN FD format not supported in non-FD mode");
return -ENOTSUP;
}
#else /* CONFIG_CAN_FD_MODE */
@ -900,7 +900,7 @@ int can_mcan_send(const struct device *dev, const struct can_frame *frame, k_tim
if ((frame->flags & CAN_FRAME_FDF) != 0U) {
if (frame->dlc > CANFD_MAX_DLC) {
LOG_ERR("DLC of %d for CAN-FD format frame", frame->dlc);
LOG_ERR("DLC of %d for CAN FD format frame", frame->dlc);
return -EINVAL;
}
} else {

View File

@ -7,7 +7,7 @@
/* Base driver compatible */
#define DT_DRV_COMPAT nxp_flexcan
/* CAN-FD extension compatible */
/* CAN FD extension compatible */
#define FLEXCAN_FD_DRV_COMPAT nxp_flexcan_fd
#include <zephyr/kernel.h>
@ -443,7 +443,7 @@ static int mcux_flexcan_set_mode(const struct device *dev, can_mode_t mode)
}
if ((mode & CAN_MODE_FD) != 0 && (mode & CAN_MODE_3_SAMPLES) != 0) {
LOG_ERR("triple samling is not supported in CAN-FD mode");
LOG_ERR("triple samling is not supported in CAN FD mode");
return -ENOTSUP;
}
@ -479,7 +479,7 @@ static int mcux_flexcan_set_mode(const struct device *dev, can_mode_t mode)
#ifdef CONFIG_CAN_MCUX_FLEXCAN_FD
if (config->flexcan_fd) {
if ((mode & CAN_MODE_FD) != 0) {
/* Enable CAN-FD mode */
/* Enable CAN FD mode */
mcr |= CAN_MCR_FDEN_MASK;
data->fd_mode = true;
@ -490,7 +490,7 @@ static int mcux_flexcan_set_mode(const struct device *dev, can_mode_t mode)
config->base->FDCTRL |= CAN_FDCTRL_TDCEN_MASK;
}
} else {
/* Disable CAN-FD mode */
/* Disable CAN FD mode */
mcr &= ~(CAN_MCR_FDEN_MASK);
data->fd_mode = false;
}
@ -849,7 +849,7 @@ static int mcux_flexcan_add_rx_filter(const struct device *dev,
}
#ifdef CONFIG_CAN_MCUX_FLEXCAN_FD
/* Defer starting FlexCAN-FD MBs unless started */
/* Defer starting FlexCAN FD MBs unless started */
if (!config->flexcan_fd || data->started) {
#endif /* CONFIG_CAN_MCUX_FLEXCAN_FD */
status = mcux_flexcan_mb_start(dev, alloc);
@ -933,7 +933,7 @@ static void mcux_flexcan_remove_rx_filter(const struct device *dev, int filter_i
#ifdef CONFIG_CAN_MCUX_FLEXCAN_FD
const struct mcux_flexcan_config *config = dev->config;
/* Stop FlexCAN-FD MBs unless already in stopped mode */
/* Stop FlexCAN FD MBs unless already in stopped mode */
if (!config->flexcan_fd || data->started) {
#endif /* CONFIG_CAN_MCUX_FLEXCAN_FD */
mcux_flexcan_mb_stop(dev, filter_id);

View File

@ -514,13 +514,13 @@ static int can_nxp_s32_send(const struct device *dev,
if ((frame->flags & CAN_FRAME_FDF) != 0 &&
(config->base_sic->BCFG2 & CANXL_SIC_BCFG2_FDEN_MASK) == 0) {
LOG_ERR("CAN-FD format not supported in non-FD mode");
LOG_ERR("CAN FD format not supported in non-FD mode");
return -ENOTSUP;
}
if ((frame->flags & CAN_FRAME_BRS) != 0 &&
~(config->base_sic->BCFG1 & CANXL_SIC_BCFG1_FDRSDIS_MASK) == 0) {
LOG_ERR("CAN-FD BRS not supported in non-FD mode");
LOG_ERR("CAN FD BRS not supported in non-FD mode");
return -ENOTSUP;
}
#else
@ -544,7 +544,7 @@ static int can_nxp_s32_send(const struct device *dev,
#ifdef CONFIG_CAN_FD_MODE
} else {
if (frame->dlc > CANFD_MAX_DLC) {
LOG_ERR("DLC of %d for CAN-FD format frame", frame->dlc);
LOG_ERR("DLC of %d for CAN FD format frame", frame->dlc);
return -EINVAL;
}
#endif
@ -904,7 +904,7 @@ static int can_nxp_s32_init(const struct device *dev)
}
}
LOG_DBG("Setting CAN-FD bitrate %d:", config->bitrate_data);
LOG_DBG("Setting CAN FD bitrate %d:", config->bitrate_data);
nxp_s32_zcan_timing_to_canxl_timing(&data->timing_data, &config->can_cfg->Fd_bitrate);
#endif

View File

@ -669,7 +669,7 @@ static int cmd_can_send(const struct shell *sh, size_t argc, char **argv)
frame_no = frame_counter++;
shell_print(sh, "enqueuing CAN frame #%u with %s (%d-bit) CAN ID 0x%0*x, "
"RTR %d, CAN-FD %d, BRS %d, DLC %d", frame_no,
"RTR %d, CAN FD %d, BRS %d, DLC %d", frame_no,
(frame.flags & CAN_FRAME_IDE) != 0 ? "extended" : "standard",
(frame.flags & CAN_FRAME_IDE) != 0 ? 29 : 11,
(frame.flags & CAN_FRAME_IDE) != 0 ? 8 : 3, frame.id,
@ -781,7 +781,7 @@ static int cmd_can_filter_add(const struct shell *sh, size_t argc, char **argv)
}
shell_print(sh, "adding filter with %s (%d-bit) CAN ID 0x%0*x, "
"CAN ID mask 0x%0*x, data frames %d, RTR frames %d, CAN-FD frames %d",
"CAN ID mask 0x%0*x, data frames %d, RTR frames %d, CAN FD frames %d",
(filter.flags & CAN_FILTER_IDE) != 0 ? "extended" : "standard",
(filter.flags & CAN_FILTER_IDE) != 0 ? 29 : 11,
(filter.flags & CAN_FILTER_IDE) != 0 ? 8 : 3, filter.id,
@ -908,7 +908,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_can_filter_cmds,
"Add rx filter\n"
"Usage: can filter add <device> [-e] [-f] [-r] [-R] <CAN ID> [CAN ID mask]\n"
"-e use extended (29-bit) CAN ID/CAN ID mask\n"
"-f match CAN-FD format frames\n"
"-f match CAN FD format frames\n"
"-r also match Remote Transmission Request (RTR) frames\n"
"-R only match Remote Transmission Request (RTR) frames",
cmd_can_filter_add, 3, 5),
@ -950,8 +950,8 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_can_cmds,
"Usage: can send <device> [-e] [-r] [-f] [-b] <CAN ID> [data] [...]\n"
"-e use extended (29-bit) CAN ID\n"
"-r send Remote Transmission Request (RTR) frame\n"
"-f use CAN-FD frame format\n"
"-b use CAN-FD Bit Rate Switching (BRS)",
"-f use CAN FD frame format\n"
"-b use CAN FD Bit Rate Switching (BRS)",
cmd_can_send, 3, SHELL_OPT_ARG_CHECK_SKIP),
SHELL_CMD(filter, &sub_can_filter_cmds,
"CAN rx filter commands\n"

View File

@ -96,7 +96,7 @@ static const uint16_t srcr[] = {
0x920, 0x924, 0x928, 0x92C,
};
/* CAN-FD Clock Frequency Control Register */
/* CAN FD Clock Frequency Control Register */
#define CANFDCKCR 0x244
/* Clock stop bit */

View File

@ -1,4 +1,4 @@
description: Specialization of Bosch m_can CAN-FD controller for Atmel SAM
description: Specialization of Bosch m_can CAN FD controller for Atmel SAM
compatible: "atmel,sam-can"

View File

@ -1,4 +1,4 @@
description: Specialization of Bosch m_can CAN-FD controller for Atmel SAM0
description: Specialization of Bosch m_can CAN FD controller for Atmel SAM0
compatible: "atmel,sam0-can"

View File

@ -1,4 +1,4 @@
description: Bosch M_CAN CAN-FD controller base
description: Bosch M_CAN CAN FD controller base
include: [can-fd-controller.yaml]

View File

@ -1,4 +1,4 @@
# Common fields for CAN-FD controllers
# Common fields for CAN FD controllers
include: can-controller.yaml

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
description: |
Microchip MCP251XFD SPI CAN-FD controller
Microchip MCP251XFD SPI CAN FD controller
The MCP251XFD node is defined on an SPI bus. An example
configuration is:

View File

@ -1,7 +1,7 @@
# Copyright (c) 2023 Nuvoton Technology Corporation
# SPDX-License-Identifier: Apache-2.0
description: Nuvoton NuMaker CAN-FD controller, using Bosch M_CAN IP
description: Nuvoton NuMaker CAN FD controller, using Bosch M_CAN IP
compatible: "nuvoton,numaker-canfd"

View File

@ -4,7 +4,7 @@
description: |
NXP FlexCAN CANFD controller.
This is a specialization of the NXP FlexCAN CAN controller with support for CAN-FD.
This is a specialization of the NXP FlexCAN CAN controller with support for CAN FD.
Example:
flexcan3: can@401d8000 {

View File

@ -1,4 +1,4 @@
description: NXP LPC SoC series MCAN CAN-FD controller
description: NXP LPC SoC series MCAN CAN FD controller
compatible: "nxp,lpc-mcan"

View File

@ -1,4 +1,4 @@
description: ST STM32 FDCAN CAN-FD controller
description: ST STM32 FDCAN CAN FD controller
compatible: "st,stm32-fdcan"

View File

@ -1,4 +1,4 @@
description: ST STM32H7 series FDCAN CAN-FD controller
description: ST STM32H7 series FDCAN CAN FD controller
compatible: "st,stm32h7-fdcan"

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
description: |
Texas Instruments TCAN4x5x SPI CAN-FD controller.
Texas Instruments TCAN4x5x SPI CAN FD controller.
Example:
&spi0 {

View File

@ -153,10 +153,10 @@ extern "C" {
/** Message uses extended (29-bit) CAN ID */
#define ISOTP_MSG_IDE BIT(2)
/** Message uses CAN-FD format (FDF) */
/** Message uses CAN FD format (FDF) */
#define ISOTP_MSG_FDF BIT(3)
/** Message uses CAN-FD Baud Rate Switch (BRS). Only valid in combination with ``ISOTP_MSG_FDF``. */
/** Message uses CAN FD Baud Rate Switch (BRS). Only valid in combination with ``ISOTP_MSG_FDF``. */
#define ISOTP_MSG_BRS BIT(4)
/** @} */
@ -182,7 +182,7 @@ struct isotp_msg_id {
/**
* ISO-TP frame data length (TX_DL for TX address or RX_DL for RX address).
*
* Valid values are 8 for classical CAN or 8, 12, 16, 20, 24, 32, 48 and 64 for CAN-FD.
* Valid values are 8 for classical CAN or 8, 12, 16, 20, 24, 32, 48 and 64 for CAN FD.
*
* 0 will be interpreted as 8 or 64 (if ISOTP_MSG_FDF is set).
*

View File

@ -60,7 +60,7 @@ extern "C" {
*/
#define CAN_MAX_DLC 8U
/**
* @brief Maximum data length code for CAN-FD.
* @brief Maximum data length code for CAN FD.
*/
#define CANFD_MAX_DLC 15U
@ -94,7 +94,7 @@ extern "C" {
/** Controller is not allowed to send dominant bits. */
#define CAN_MODE_LISTENONLY BIT(1)
/** Controller allows transmitting/receiving CAN-FD frames. */
/** Controller allows transmitting/receiving CAN FD frames. */
#define CAN_MODE_FD BIT(2)
/** Controller does not retransmit in case of lost arbitration or missing ACK */
@ -144,13 +144,13 @@ enum can_state {
/** Frame is a Remote Transmission Request (RTR) */
#define CAN_FRAME_RTR BIT(1)
/** Frame uses CAN-FD format (FDF) */
/** Frame uses CAN FD format (FDF) */
#define CAN_FRAME_FDF BIT(2)
/** Frame uses CAN-FD Baud Rate Switch (BRS). Only valid in combination with ``CAN_FRAME_FDF``. */
/** Frame uses CAN FD Baud Rate Switch (BRS). Only valid in combination with ``CAN_FRAME_FDF``. */
#define CAN_FRAME_BRS BIT(3)
/** CAN-FD Error State Indicator (ESI). Indicates that the transmitting node is in error-passive
/** CAN FD Error State Indicator (ESI). Indicates that the transmitting node is in error-passive
* state. Only valid in combination with ``CAN_FRAME_FDF``.
*/
#define CAN_FRAME_ESI BIT(4)
@ -209,7 +209,7 @@ struct can_frame {
/** Filter matches data frames */
#define CAN_FILTER_DATA BIT(2)
/** Filter matches CAN-FD frames (FDF) */
/** Filter matches CAN FD frames (FDF) */
#define CAN_FILTER_FDF BIT(3)
/** @} */
@ -333,7 +333,7 @@ typedef int (*can_set_timing_t)(const struct device *dev,
const struct can_timing *timing);
/**
* @brief Optional callback API upon setting CAN-FD bus timing for the data phase.
* @brief Optional callback API upon setting CAN FD bus timing for the data phase.
* See @a can_set_timing_data() for argument description
*/
typedef int (*can_set_timing_data_t)(const struct device *dev,
@ -841,7 +841,7 @@ __syscall int can_calc_timing(const struct device *dev, struct can_timing *res,
* @param dev Pointer to the device structure for the driver instance.
*
* @return Pointer to the minimum supported timing parameter values, or NULL if
* CAN-FD support is not implemented by the driver.
* CAN FD support is not implemented by the driver.
*/
__syscall const struct can_timing *can_get_timing_data_min(const struct device *dev);
@ -865,7 +865,7 @@ static inline const struct can_timing *z_impl_can_get_timing_data_min(const stru
* @param dev Pointer to the device structure for the driver instance.
*
* @return Pointer to the maximum supported timing parameter values, or NULL if
* CAN-FD support is not implemented by the driver.
* CAN FD support is not implemented by the driver.
*/
__syscall const struct can_timing *can_get_timing_data_max(const struct device *dev);
@ -901,7 +901,7 @@ __syscall int can_calc_timing_data(const struct device *dev, struct can_timing *
uint32_t bitrate, uint16_t sample_pnt);
/**
* @brief Configure the bus timing for the data phase of a CAN-FD controller.
* @brief Configure the bus timing for the data phase of a CAN FD controller.
*
* @note @kconfig{CONFIG_CAN_FD_MODE} must be selected for this function to be
* available.
@ -915,13 +915,13 @@ __syscall int can_calc_timing_data(const struct device *dev, struct can_timing *
* @retval -EBUSY if the CAN controller is not in stopped state.
* @retval -EIO General input/output error, failed to configure device.
* @retval -ENOTSUP if the timing parameters are not supported by the driver.
* @retval -ENOSYS if CAN-FD support is not implemented by the driver.
* @retval -ENOSYS if CAN FD support is not implemented by the driver.
*/
__syscall int can_set_timing_data(const struct device *dev,
const struct can_timing *timing_data);
/**
* @brief Set the bitrate for the data phase of the CAN-FD controller
* @brief Set the bitrate for the data phase of the CAN FD controller
*
* CAN in Automation (CiA) 301 v4.2.0 recommends a sample point location of
* 87.5% percent for all bitrates. However, some CAN controllers have
@ -1605,12 +1605,12 @@ static inline bool can_frame_matches_filter(const struct can_frame *frame,
}
if ((frame->flags & CAN_FRAME_FDF) != 0 && (filter->flags & CAN_FILTER_FDF) == 0) {
/* CAN-FD format frame, classic format filter */
/* CAN FD format frame, classic format filter */
return false;
}
if ((frame->flags & CAN_FRAME_FDF) == 0 && (filter->flags & CAN_FILTER_FDF) != 0) {
/* Classic frame, CAN-FD format filter */
/* Classic frame, CAN FD format filter */
return false;
}

View File

@ -49,7 +49,7 @@ enum {
#define CAN_MTU (sizeof(struct socketcan_frame))
#endif /* !CONFIG_CAN_FD_MODE */
/* CAN-FD specific flags from Linux Kernel (include/uapi/linux/can.h) */
/* CAN FD specific flags from Linux Kernel (include/uapi/linux/can.h) */
#define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */
#define CANFD_ESI 0x02 /* error state indicator of the transmitting node */
#define CANFD_FDF 0x04 /* mark CAN FD for dual use of struct canfd_frame */

View File

@ -22,10 +22,10 @@ config SAMPLE_CAN_BABBLING_RTR
Babbling node sends Remote Transmission Request (RTR) frames.
config SAMPLE_CAN_BABBLING_FD_MODE
bool "Send CAN-FD format frames"
bool "Send CAN FD format frames"
select CAN_FD_MODE
help
Babbling node sends CAN-FD format frames.
Babbling node sends CAN FD format frames.
config SAMPLE_CAN_BABBLING_TX_QUEUE_SIZE
int "Maximum number of CAN frames to enqueue"

View File

@ -47,5 +47,5 @@ Sample output
.. code-block:: console
*** Booting Zephyr OS build zephyr-v3.1.0-4606-g8c1efa8b96bb ***
babbling on can@40024000 with standard (11-bit) CAN ID 0x010, RTR 0, CAN-FD 0
babbling on can@40024000 with standard (11-bit) CAN ID 0x010, RTR 0, CAN FD 0
abort by pressing User SW3 button

View File

@ -60,7 +60,7 @@ int main(void)
if (IS_ENABLED(CONFIG_SAMPLE_CAN_BABBLING_FD_MODE)) {
err = can_set_mode(dev, CAN_MODE_FD);
if (err != 0) {
printk("Error setting CAN-FD mode (err %d)", err);
printk("Error setting CAN FD mode (err %d)", err);
return 0;
}
}
@ -109,7 +109,7 @@ int main(void)
frame.id = CONFIG_SAMPLE_CAN_BABBLING_CAN_ID;
printk("babbling on %s with %s (%d-bit) CAN ID 0x%0*x, RTR %d, CAN-FD %d\n",
printk("babbling on %s with %s (%d-bit) CAN ID 0x%0*x, RTR %d, CAN FD %d\n",
dev->name,
(frame.flags & CAN_FRAME_IDE) != 0 ? "extended" : "standard",
(frame.flags & CAN_FRAME_IDE) != 0 ? 29 : 11,

View File

@ -23,7 +23,7 @@ config SAMPLE_RX_THREAD_PRIORITY
Priority used for the RX threads.
config SAMPLE_CAN_FD_MODE
bool "Use CAN-FD"
bool "Use CAN FD"
select CAN_FD_MODE
config ISOTP_RX_BUF_COUNT

View File

@ -80,7 +80,7 @@ config ISOTP_RX_BUF_SIZE
help
This value defines the size of a single block in the pool. The number of
blocks is given by ISOTP_RX_BUF_COUNT. To be efficient use a multiple of
CAN_MAX_DLEN - 1 (for classic CAN : 8 - 1 = 7, for CAN-FD : 64 - 1 = 63).
CAN_MAX_DLEN - 1 (for classic CAN : 8 - 1 = 7, for CAN FD : 64 - 1 = 63).
config ISOTP_RX_SF_FF_BUF_COUNT
int "Number of SF and FF data buffers for receiving data"

View File

@ -126,7 +126,7 @@ static inline uint32_t receive_get_sf_length(struct net_buf *buf, bool fdf)
{
uint8_t len = net_buf_pull_u8(buf) & ISOTP_PCI_SF_DL_MASK;
/* Single frames > 8 bytes (CAN-FD only) */
/* Single frames > 8 bytes (CAN FD only) */
if (IS_ENABLED(CONFIG_CAN_FD_MODE) && fdf && !len) {
len = net_buf_pull_u8(buf);
}
@ -433,7 +433,7 @@ static void process_ff_sf(struct isotp_recv_ctx *rctx, struct can_frame *frame)
#endif
sf_len = frame->data[index] & ISOTP_PCI_SF_DL_MASK;
/* Single frames > 8 bytes (CAN-FD only) */
/* Single frames > 8 bytes (CAN FD only) */
if (IS_ENABLED(CONFIG_CAN_FD_MODE) && (rctx->rx_addr.flags & ISOTP_MSG_FDF) != 0 &&
can_dl > ISOTP_4BIT_SF_MAX_CAN_DL) {
if (sf_len != 0) {
@ -920,7 +920,7 @@ static inline int send_sf(struct isotp_send_ctx *sctx)
(IS_ENABLED(CONFIG_CAN_FD_MODE) && (sctx->tx_addr.flags & ISOTP_MSG_FDF) != 0 &&
len + index > ISOTP_PADDED_FRAME_DL_MIN)) {
/* AUTOSAR requirements SWS_CanTp_00348 / SWS_CanTp_00351.
* Mandatory for ISO-TP CAN-FD frames > 8 bytes.
* Mandatory for ISO-TP CAN FD frames > 8 bytes.
*/
frame.dlc = can_bytes_to_dlc(
MAX(ISOTP_PADDED_FRAME_DL_MIN, len + index));
@ -1003,7 +1003,7 @@ static inline int send_cf(struct isotp_send_ctx *sctx)
(IS_ENABLED(CONFIG_CAN_FD_MODE) && (sctx->tx_addr.flags & ISOTP_MSG_FDF) != 0 &&
len + index > ISOTP_PADDED_FRAME_DL_MIN)) {
/* AUTOSAR requirements SWS_CanTp_00348 / SWS_CanTp_00351.
* Mandatory for ISO-TP CAN-FD frames > 8 bytes.
* Mandatory for ISO-TP CAN FD frames > 8 bytes.
*/
frame.dlc = can_bytes_to_dlc(
MAX(ISOTP_PADDED_FRAME_DL_MIN, len + index));
@ -1243,7 +1243,7 @@ static int send(struct isotp_send_ctx *sctx, const struct device *can_dev,
len = get_send_ctx_data_len(sctx);
LOG_DBG("Send %zu bytes to addr 0x%x and listen on 0x%x", len,
sctx->tx_addr.ext_id, sctx->rx_addr.ext_id);
/* Single frames > 8 bytes use an additional byte for length (CAN-FD only) */
/* Single frames > 8 bytes use an additional byte for length (CAN FD only) */
if (len > sctx->tx_addr.dl - (((tx_addr->flags & ISOTP_MSG_EXT_ADDR) != 0) ? 2 : 1) -
((sctx->tx_addr.dl > ISOTP_4BIT_SF_MAX_CAN_DL) ? 1 : 0)) {
ret = add_fc_filter(sctx);

View File

@ -235,7 +235,7 @@ ZTEST(canfd, test_get_capabilities)
err = can_get_capabilities(can_dev, &cap);
zassert_equal(err, 0, "failed to get CAN capabilities (err %d)", err);
zassert_not_equal(cap & (CAN_MODE_LOOPBACK | CAN_MODE_FD), 0,
"CAN-FD loopback mode not supported");
"CAN FD loopback mode not supported");
}
/**
@ -248,7 +248,7 @@ ZTEST(canfd, test_send_receive_classic)
}
/**
* @brief Test send/receive with standard (11-bit) CAN IDs and CAN-FD frames.
* @brief Test send/receive with standard (11-bit) CAN IDs and CAN FD frames.
*/
ZTEST(canfd, test_send_receive_fd)
{
@ -257,7 +257,7 @@ ZTEST(canfd, test_send_receive_fd)
}
/**
* @brief Test send/receive with (11-bit) CAN IDs, mixed classic and CAN-FD frames.
* @brief Test send/receive with (11-bit) CAN IDs, mixed classic and CAN FD frames.
*/
ZTEST(canfd, test_send_receive_mixed)
{
@ -290,7 +290,7 @@ static void check_filters_preserved_between_modes(can_mode_t first, can_mode_t s
err = can_start(can_dev);
zassert_equal(err, 0, "failed to start CAN controller (err %d)", err);
/* Add classic CAN and CAN-FD filter */
/* Add classic CAN and CAN FD filter */
filter_id_1 = add_rx_msgq(can_dev, &test_std_filter_1);
filter_id_2 = add_rx_msgq(can_dev, &test_std_fdf_filter_2);
@ -301,7 +301,7 @@ static void check_filters_preserved_between_modes(can_mode_t first, can_mode_t s
assert_frame_equal(&frame, &test_std_frame_1, 0);
if ((first & CAN_MODE_FD) != 0) {
/* Verify CAN-FD filter in first mode */
/* Verify CAN FD filter in first mode */
send_test_frame(can_dev, &test_std_fdf_frame_2);
err = k_msgq_get(&can_msgq, &frame, TEST_RECEIVE_TIMEOUT);
zassert_equal(err, 0, "receive timeout");
@ -329,14 +329,14 @@ static void check_filters_preserved_between_modes(can_mode_t first, can_mode_t s
assert_frame_equal(&frame, &test_std_frame_1, 0);
if ((second & CAN_MODE_FD) != 0) {
/* Verify CAN-FD filter in second mode */
/* Verify CAN FD filter in second mode */
send_test_frame(can_dev, &test_std_fdf_frame_2);
err = k_msgq_get(&can_msgq, &frame, TEST_RECEIVE_TIMEOUT);
zassert_equal(err, 0, "receive timeout");
assert_frame_equal(&frame, &test_std_fdf_frame_2, 0);
}
/* Stop controller and restore CAN-FD loopback mode */
/* Stop controller and restore CAN FD loopback mode */
err = can_stop(can_dev);
zassert_equal(err, 0, "failed to stop CAN controller (err %d)", err);
@ -356,7 +356,7 @@ static void check_filters_preserved_between_modes(can_mode_t first, can_mode_t s
/**
* @brief Test that CAN RX filters are preserved through CAN controller mode changes between classic
* CAN and CAN-FD.
* CAN and CAN FD.
*/
ZTEST_USER(canfd, test_filters_preserved_through_classic_to_fd_mode_change)
{
@ -364,7 +364,7 @@ ZTEST_USER(canfd, test_filters_preserved_through_classic_to_fd_mode_change)
}
/**
* @brief Test that CAN RX filters are preserved through CAN controller mode changes between CAN-FD
* @brief Test that CAN RX filters are preserved through CAN controller mode changes between CAN FD
* and classic CAN.
*/
ZTEST_USER(canfd, test_filters_preserved_through_fd_to_classic_mode_change)
@ -432,7 +432,7 @@ void *canfd_setup(void)
(void)can_stop(can_dev);
err = can_set_mode(can_dev, CAN_MODE_LOOPBACK | CAN_MODE_FD);
zassert_equal(err, 0, "failed to set CAN-FD loopback mode (err %d)", err);
zassert_equal(err, 0, "failed to set CAN FD loopback mode (err %d)", err);
err = can_start(can_dev);
zassert_equal(err, 0, "failed to start CAN controller (err %d)", err);

View File

@ -785,7 +785,7 @@ ZTEST_USER(can_classic, test_send_invalid_dlc)
}
/**
* @brief Test that CAN-FD format frames are rejected in non-FD mode.
* @brief Test that CAN FD format frames are rejected in non-FD mode.
*/
ZTEST_USER(can_classic, test_send_fd_format)
{
@ -797,7 +797,7 @@ ZTEST_USER(can_classic, test_send_fd_format)
frame.flags = CAN_FRAME_FDF;
err = can_send(can_dev, &frame, TEST_SEND_TIMEOUT, NULL, NULL);
zassert_equal(err, -ENOTSUP, "sent a CAN-FD format frame in non-FD mode");
zassert_equal(err, -ENOTSUP, "sent a CAN FD format frame in non-FD mode");
}
/**

View File

@ -81,7 +81,7 @@ const struct can_frame test_ext_rtr_frame_1 = {
};
/**
* @brief Standard (11-bit) CAN ID frame 1 with CAN-FD payload.
* @brief Standard (11-bit) CAN ID frame 1 with CAN FD payload.
*/
const struct can_frame test_std_fdf_frame_1 = {
.flags = CAN_FRAME_FDF | CAN_FRAME_BRS,
@ -95,7 +95,7 @@ const struct can_frame test_std_fdf_frame_1 = {
};
/**
* @brief Standard (11-bit) CAN ID frame 1 with CAN-FD payload.
* @brief Standard (11-bit) CAN ID frame 1 with CAN FD payload.
*/
const struct can_frame test_std_fdf_frame_2 = {
.flags = CAN_FRAME_FDF | CAN_FRAME_BRS,
@ -219,7 +219,7 @@ const struct can_filter test_std_some_filter = {
};
/**
* @brief Standard (11-bit) CAN-FD ID filter 1. This filter matches
* @brief Standard (11-bit) CAN FD ID filter 1. This filter matches
* ``test_std_fdf_frame_1``.
*/
const struct can_filter test_std_fdf_filter_1 = {
@ -229,7 +229,7 @@ const struct can_filter test_std_fdf_filter_1 = {
};
/**
* @brief Standard (11-bit) CAN-FD ID filter 2. This filter matches
* @brief Standard (11-bit) CAN FD ID filter 2. This filter matches
* ``test_std_fdf_frame_2``.
*/
const struct can_filter test_std_fdf_filter_2 = {

View File

@ -87,12 +87,12 @@ extern const struct can_frame test_std_rtr_frame_1;
extern const struct can_frame test_ext_rtr_frame_1;
/**
* @brief Standard (11-bit) CAN ID frame 1 with CAN-FD payload.
* @brief Standard (11-bit) CAN ID frame 1 with CAN FD payload.
*/
extern const struct can_frame test_std_fdf_frame_1;
/**
* @brief Standard (11-bit) CAN ID frame 2 with CAN-FD payload.
* @brief Standard (11-bit) CAN ID frame 2 with CAN FD payload.
*/
extern const struct can_frame test_std_fdf_frame_2;
@ -163,13 +163,13 @@ extern const struct can_filter test_ext_rtr_filter_1;
extern const struct can_filter test_std_some_filter;
/**
* @brief Standard (11-bit) CAN-FD ID filter 1. This filter matches
* @brief Standard (11-bit) CAN FD ID filter 1. This filter matches
* ``test_std_fdf_frame_1``.
*/
extern const struct can_filter test_std_fdf_filter_1;
/**
* @brief Standard (11-bit) CAN-FD ID filter 2. This filter matches
* @brief Standard (11-bit) CAN FD ID filter 2. This filter matches
* ``test_std_fdf_frame_2``.
*/
extern const struct can_filter test_std_fdf_filter_2;

View File

@ -24,12 +24,12 @@ ZTEST(can_utilities, test_can_dlc_to_bytes)
{
uint8_t dlc;
/* CAN 2.0B/CAN-FD DLC, 0 to 8 data bytes */
/* CAN 2.0B/CAN FD DLC, 0 to 8 data bytes */
for (dlc = 0; dlc <= 8; dlc++) {
zassert_equal(can_dlc_to_bytes(dlc), dlc, "wrong number of bytes for DLC %u", dlc);
}
/* CAN-FD DLC, 12 to 64 data bytes in steps */
/* CAN FD DLC, 12 to 64 data bytes in steps */
zassert_equal(can_dlc_to_bytes(9), 12, "wrong number of bytes for DLC 9");
zassert_equal(can_dlc_to_bytes(10), 16, "wrong number of bytes for DLC 10");
zassert_equal(can_dlc_to_bytes(11), 20, "wrong number of bytes for DLC 11");
@ -51,7 +51,7 @@ ZTEST(can_utilities, test_can_bytes_to_dlc)
zassert_equal(can_bytes_to_dlc(bytes), bytes, "wrong DLC for %u byte(s)", bytes);
}
/* CAN-FD DLC, 12 to 64 data bytes in steps */
/* CAN FD DLC, 12 to 64 data bytes in steps */
zassert_equal(can_bytes_to_dlc(12), 9, "wrong DLC for 12 bytes");
zassert_equal(can_bytes_to_dlc(16), 10, "wrong DLC for 16 bytes");
zassert_equal(can_bytes_to_dlc(20), 11, "wrong DLC for 20 bytes");
@ -119,17 +119,17 @@ ZTEST(can_utilities, test_can_frame_matches_filter)
zassert_false(can_frame_matches_filter(&test_std_frame_1, &test_std_rtr_filter_1));
zassert_false(can_frame_matches_filter(&test_ext_frame_1, &test_ext_rtr_filter_1));
/* CAN-FD format frames and filters */
/* CAN FD format frames and filters */
zassert_true(can_frame_matches_filter(&test_std_fdf_frame_1, &test_std_fdf_filter_1));
zassert_true(can_frame_matches_filter(&test_std_fdf_frame_2, &test_std_fdf_filter_2));
zassert_false(can_frame_matches_filter(&test_std_fdf_frame_1, &test_std_fdf_filter_2));
zassert_false(can_frame_matches_filter(&test_std_fdf_frame_2, &test_std_fdf_filter_1));
/* CAN-FD format frames and classic filters */
/* CAN FD format frames and classic filters */
zassert_false(can_frame_matches_filter(&test_std_fdf_frame_1, &test_std_filter_1));
zassert_false(can_frame_matches_filter(&test_std_fdf_frame_2, &test_std_filter_2));
/* Classic format frames and CAN-FD format filters */
/* Classic format frames and CAN FD format filters */
zassert_false(can_frame_matches_filter(&test_std_frame_1, &test_std_fdf_filter_1));
zassert_false(can_frame_matches_filter(&test_std_frame_2, &test_std_fdf_filter_2));
}

View File

@ -70,7 +70,7 @@ static const struct can_timing_test can_timing_data_tests[] = {
{ 500000, 800, false },
/** Valid bitrate, invalid sample point. */
{ 500000, 1000, true },
/** Invalid CAN-FD bitrate, valid sample point. */
/** Invalid CAN FD bitrate, valid sample point. */
{ 8000000 + 1, 750, true },
};
#endif /* CONFIG_CAN_FD_MODE */
@ -175,7 +175,7 @@ static void test_timing_values(const struct device *dev, const struct can_timing
max = can_get_timing_data_max(dev);
sp_err = can_calc_timing_data(dev, &timing, test->bitrate, test->sp);
} else {
zassert_unreachable("data phase timing test without CAN-FD support");
zassert_unreachable("data phase timing test without CAN FD support");
}
} else {
min = can_get_timing_min(dev);

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
config TEST_USE_CAN_FD_MODE
bool "Use CAN-FD"
bool "Use CAN FD"
select CAN_FD_MODE
config TEST_ISOTP_TX_DL

View File

@ -6,5 +6,5 @@ CONFIG_ISOTP_ENABLE_CONTEXT_BUFFERS=y
CONFIG_ISOTP_RX_BUF_COUNT=6
CONFIG_ISOTP_RX_BUF_SIZE=128
CONFIG_ISOTP_RX_SF_FF_BUF_COUNT=2
# some tests may be skipped if CAN-FD should be used, but is not supported by the controller
# some tests may be skipped if CAN FD should be used, but is not supported by the controller
CONFIG_ZTEST_VERIFY_RUN_ALL=n

View File

@ -1019,7 +1019,7 @@ ZTEST(isotp_conformance, test_sender_fc_errors)
ZTEST(isotp_conformance, test_canfd_mandatory_padding)
{
/* Mandatory padding of CAN-FD frames (TX_DL > 8).
/* Mandatory padding of CAN FD frames (TX_DL > 8).
* Must be padded with 0xCC up to the nearest DLC.
*/
#if TX_DL < 12

View File

@ -6,7 +6,7 @@
/*
* This test suite checks that correct errors are returned when trying to use the ISO-TP
* protocol with CAN-FD mode even though the controller does not support CAN-FD.
* protocol with CAN FD mode even though the controller does not support CAN FD.
*/
#include <zephyr/canbus/isotp.h>

View File

@ -5,11 +5,11 @@
# +--------+------------------------+----------------------+----------------+
# | 1 | Classical CAN only | CONFIG_CAN_FD_MODE=n | nucleo_f072 |
# | 2 | Classical CAN only | CONFIG_CAN_FD_MODE=y | nucleo_f072 |
# | 3 | Classical CAN + CAN-FD | CONFIG_CAN_FD_MODE=n | native_posix |
# | 4 | Classical CAN + CAN-FD | CONFIG_CAN_FD_MODE=y | native_posix |
# | 3 | Classical CAN + CAN FD | CONFIG_CAN_FD_MODE=n | native_posix |
# | 4 | Classical CAN + CAN FD | CONFIG_CAN_FD_MODE=y | native_posix |
#
# The test-specific CONFIG_TEST_USE_CAN_FD_MODE is used to decide if the test should use
# CAN-FD independent of CONFIG_CAN_FD_MODE configuration.
# CAN FD independent of CONFIG_CAN_FD_MODE configuration.
#
tests: