From bd2b7d80d1d8422f49f716d4f737cd4dd39efc40 Mon Sep 17 00:00:00 2001 From: Jiafei Pan Date: Thu, 26 Jun 2025 10:48:12 +0800 Subject: [PATCH] modules: hal_nxp: add timeout for ii2c status polling Enalbe II2C hal driver status polling timeout in order to avoid blocking of some driver API, such as kernel hang during i2c scanning. Signed-off-by: Jiafei Pan --- modules/hal_nxp/mcux/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/hal_nxp/mcux/CMakeLists.txt b/modules/hal_nxp/mcux/CMakeLists.txt index 848c4af84cb..90168c1d9ab 100644 --- a/modules/hal_nxp/mcux/CMakeLists.txt +++ b/modules/hal_nxp/mcux/CMakeLists.txt @@ -101,6 +101,11 @@ zephyr_compile_definitions_ifdef( FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL=1 ) +zephyr_compile_definitions_ifdef( + CONFIG_I2C_NXP_II2C + I2C_RETRY_TIMES=40000 + ) + # note: if FSL_IRQSTEER_ENABLE_MASTER_INT is not # defined then it will automatically be defined # and set to 1 via fsl_irqsteer.h