UTILS FDCAN Functions ¶
UTILS FDCAN Functions ¶
- group UTILS_FDCAN_Exported_Functions
-
Functions
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitTiming
(
const
stm32_utils_fdcan_input_bus_param_t
*
p_bus_param
,
stm32_utils_fdcan_bit_timing_type_t
bit_timing_type
,
stm32_utils_fdcan_bit_timing_t
*
p_output_bit_timing
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
-
Compute the FDCAN nominal or data bit timings from input bus parameters.
Note
The given maximum bitrate tolerance takes into account integer rounding, and guarantees that the bitrate deviation is always below or equal to the maximum given.
Note
The stm32_utils_fdcan_bit_timing_t:sync_jump_width parameter is highly dependent on the specific characteristics of the CAN network, such as the network’s length, the propagation delay, the oscillator tolerance, etc. Therefore, this function will always set it to the default minimal value 1. This value can be fine-tuned by the end user if synchronization issues are observed.
- Parameters :
-
p_bus_param – Pointer to a stm32_utils_fdcan_input_bus_param_t structure containing the desired bus parameters.
bit_timing_type – Type of bit timing to compute (nominal or data).
p_output_bit_timing – Pointer to a stm32_utils_fdcan_bit_timing_t structure to fill with computed bit timings.
p_output_config – Pointer to a stm32_utils_fdcan_output_config_t structure containing the real bus parameters.
- Return values :
-
STM32_UTILS_FDCAN_OK – Configuration matching the bus parameters was found.
STM32_UTILS_FDCAN_ERROR – No configuration matching the bus parameters was found. Data output must be discarded.
STM32_UTILS_FDCAN_INVALID_PARAM – Pointer parameter is NULL.
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitrate
(
const
stm32_utils_fdcan_bit_timing_t
*
p_bit_timing
,
uint32_t
fdcan_clk_khz
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
-
Compute the FDCAN nominal or data bitrate and sampling point from bit timing parameters.
- Parameters :
-
p_bit_timing – Pointer to a stm32_utils_fdcan_bit_timing_t structure.
fdcan_clk_khz – FDCAN clk in kHz.
p_output_config – Pointer to a stm32_utils_fdcan_output_config_t structure containing the computed bus parameters.
- Return values :
-
STM32_UTILS_FDCAN_OK – Operation completed successfully.
STM32_UTILS_FDCAN_INVALID_PARAM – Pointer parameter is NULL.
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitTiming
(
const
stm32_utils_fdcan_input_bus_param_t
*
p_bus_param
,
stm32_utils_fdcan_bit_timing_type_t
bit_timing_type
,
stm32_utils_fdcan_bit_timing_t
*
p_output_bit_timing
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
- group UTILS_FDCAN_Exported_Functions
-
Functions
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitTiming
(
const
stm32_utils_fdcan_input_bus_param_t
*
p_bus_param
,
stm32_utils_fdcan_bit_timing_type_t
bit_timing_type
,
stm32_utils_fdcan_bit_timing_t
*
p_output_bit_timing
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
-
Compute the FDCAN nominal or data bit timings from input bus parameters.
Note
The given maximum bitrate tolerance takes into account integer rounding, and guarantees that the bitrate deviation is always below or equal to the maximum given.
Note
The stm32_utils_fdcan_bit_timing_t:sync_jump_width parameter is highly dependent on the specific characteristics of the CAN network, such as the network’s length, the propagation delay, the oscillator tolerance, etc. Therefore, this function will always set it to the default minimal value 1. This value can be fine-tuned by the end user if synchronization issues are observed.
- Parameters :
-
p_bus_param – Pointer to a stm32_utils_fdcan_input_bus_param_t structure containing the desired bus parameters.
bit_timing_type – Type of bit timing to compute (nominal or data).
p_output_bit_timing – Pointer to a stm32_utils_fdcan_bit_timing_t structure to fill with computed bit timings.
p_output_config – Pointer to a stm32_utils_fdcan_output_config_t structure containing the real bus parameters.
- Return values :
-
STM32_UTILS_FDCAN_OK – Configuration matching the bus parameters was found.
STM32_UTILS_FDCAN_ERROR – No configuration matching the bus parameters was found. Data output must be discarded.
STM32_UTILS_FDCAN_INVALID_PARAM – Pointer parameter is NULL.
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitrate
(
const
stm32_utils_fdcan_bit_timing_t
*
p_bit_timing
,
uint32_t
fdcan_clk_khz
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
-
Compute the FDCAN nominal or data bitrate and sampling point from bit timing parameters.
- Parameters :
-
p_bit_timing – Pointer to a stm32_utils_fdcan_bit_timing_t structure.
fdcan_clk_khz – FDCAN clk in kHz.
p_output_config – Pointer to a stm32_utils_fdcan_output_config_t structure containing the computed bus parameters.
- Return values :
-
STM32_UTILS_FDCAN_OK – Operation completed successfully.
STM32_UTILS_FDCAN_INVALID_PARAM – Pointer parameter is NULL.
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitTiming
(
const
stm32_utils_fdcan_input_bus_param_t
*
p_bus_param
,
stm32_utils_fdcan_bit_timing_type_t
bit_timing_type
,
stm32_utils_fdcan_bit_timing_t
*
p_output_bit_timing
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
- group UTILS_FDCAN_Exported_Functions
-
Functions
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitTiming
(
const
stm32_utils_fdcan_input_bus_param_t
*
p_bus_param
,
stm32_utils_fdcan_bit_timing_type_t
bit_timing_type
,
stm32_utils_fdcan_bit_timing_t
*
p_output_bit_timing
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
-
Compute the FDCAN nominal or data bit timings from input bus parameters.
Note
The given maximum bitrate tolerance takes into account integer rounding, and guarantees that the bitrate deviation is always below or equal to the maximum given.
Note
The stm32_utils_fdcan_bit_timing_t:sync_jump_width parameter is highly dependent on the specific characteristics of the CAN network, such as the network’s length, the propagation delay, the oscillator tolerance, etc. Therefore, this function will always set it to the default minimal value 1. This value can be fine-tuned by the end user if synchronization issues are observed.
- Parameters :
-
p_bus_param – Pointer to a stm32_utils_fdcan_input_bus_param_t structure containing the desired bus parameters.
bit_timing_type – Type of bit timing to compute (nominal or data).
p_output_bit_timing – Pointer to a stm32_utils_fdcan_bit_timing_t structure to fill with computed bit timings.
p_output_config – Pointer to a stm32_utils_fdcan_output_config_t structure containing the real bus parameters.
- Return values :
-
STM32_UTILS_FDCAN_OK – Configuration matching the bus parameters was found.
STM32_UTILS_FDCAN_ERROR – No configuration matching the bus parameters was found. Data output must be discarded.
STM32_UTILS_FDCAN_INVALID_PARAM – Pointer parameter is NULL.
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitrate
(
const
stm32_utils_fdcan_bit_timing_t
*
p_bit_timing
,
uint32_t
fdcan_clk_khz
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)
-
Compute the FDCAN nominal or data bitrate and sampling point from bit timing parameters.
- Parameters :
-
p_bit_timing – Pointer to a stm32_utils_fdcan_bit_timing_t structure.
fdcan_clk_khz – FDCAN clk in kHz.
p_output_config – Pointer to a stm32_utils_fdcan_output_config_t structure containing the computed bus parameters.
- Return values :
-
STM32_UTILS_FDCAN_OK – Operation completed successfully.
STM32_UTILS_FDCAN_INVALID_PARAM – Pointer parameter is NULL.
-
stm32_utils_fdcan_status_t
STM32_UTILS_FDCAN_ComputeBitTiming
(
const
stm32_utils_fdcan_input_bus_param_t
*
p_bus_param
,
stm32_utils_fdcan_bit_timing_type_t
bit_timing_type
,
stm32_utils_fdcan_bit_timing_t
*
p_output_bit_timing
,
stm32_utils_fdcan_output_config_t
*
p_output_config
)