HAL FDCAN Overview ¶
Introducing FDCAN ¶
- group FDCAN_Introduction
-
The FDCAN hardware abstraction layer provides a comprehensive software interface to support the communication protocol on STM32 microcontrollers. FDCAN (Flexible Data-rate Controller Area Network) is an advanced communication protocol that extends the classical CAN protocol to support higher data rates and improved error handling capabilities. It is designed to meet the requirements of modern automotive and industrial applications.
This peripheral conforms to CAN protocol version 2.0 part A, part B, and ISO 11898-1. This HAL driver abstracts low-level hardware details, enabling configuration, data transfer, and interrupt handling, thereby accelerating development and ensuring robust and scalable embedded applications leveraging the full capabilities of the CAN-FD bus.
Module and files ¶
The following diagram illustrates the FDCAN module and its associated files.
Component diagram ¶
The following diagram illustrates the software components involved in the FDCAN module. It shows the interactions between the user application, HAL drivers, low-level drivers, and the hardware components.
Configuration table ¶
The following table lists the configuration defines for the HAL FDCAN module, specifying their locations, default values, and descriptions:
- group FDCAN_Configuration_Table
-
Configuration inside the FDCAN driver
Software configuration defined in stm32c5xx_hal_conf.h:
Preprocessor flags
Default value
Comment
USE_HAL_FDCAN_MODULE
1
Enable HAL FDCAN driver module
USE_HAL_FDCAN_REGISTER_CALLBACKS
0
Allow the user to define their own callback
USE_HAL_CHECK_PARAM
0
Enable runtime parameter check
USE_HAL_FDCAN_CLK_ENABLE_MODEL
HAL_CLK_ENABLE_NO
Enable the gating of the peripheral clock
USE_HAL_CHECK_PROCESS_STATE
0
Enable atomicity of process state check
USE_HAL_MUTEX
0
Enable semaphore creation for OS
USE_HAL_FDCAN_USER_DATA
0
Add a user data inside HAL FDCAN handle
USE_HAL_FDCAN_GET_LAST_ERRORS
0
Enable retrieval of the last process error codes
Software configuration defined in preprocessor environment:
Preprocessor flags
Default value
Comment
USE_ASSERT_DBG_PARAM
Not defined
Enable check param for HAL
USE_ASSERT_DBG_STATE
Not defined
Enable check state for HAL