Skip to content

Commit b9675b0

Browse files
henrikbrixandersenfabiobaltieri
authored andcommitted
drivers: can: mcux: flexcan: override maximum HAL wait loop iterations
Add option for overriding the maximum number of wait loop iterations for entering/leaving freeze mode. Set the default to 10000 (as opposed to a default of 1000 used in the HAL). Fixes: #56171 Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent f02c612 commit b9675b0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/can/Kconfig.mcux

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ config CAN_MCUX_FLEXCAN_FD
2121
help
2222
Enable support for CAN-FD capable NXP FlexCAN devices.
2323

24+
config CAN_MCUX_FLEXCAN_WAIT_TIMEOUT
25+
int "Maximum number of wait loop iterations"
26+
default 10000
27+
help
28+
Maximum number of wait loop iterations for the MCUX FlexCAN HAL when entering/leaving
29+
freeze mode.
30+
2431
config CAN_MAX_MB
2532
int "Maximum number of message buffers for concurrent active instances"
2633
default 16

modules/hal_nxp/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ if(CONFIG_HAS_MCUX OR CONFIG_HAS_IMX_HAL OR CONFIG_HAS_NXP_S32_HAL)
1212
zephyr_include_directories_ifdef(CONFIG_PWM_MCUX_CTIMER
1313
${ZEPHYR_CURRENT_MODULE_DIR}/mcux/mcux-sdk/drivers/ctimer/)
1414
zephyr_include_directories(.)
15+
16+
zephyr_compile_definitions_ifdef(CONFIG_CAN_MCUX_FLEXCAN
17+
FLEXCAN_WAIT_TIMEOUT=${CONFIG_CAN_MCUX_FLEXCAN_WAIT_TIMEOUT})
1518
endif()

0 commit comments

Comments
 (0)