diff --git a/modules/hal_nordic/nrfx/nrfx_config.h b/modules/hal_nordic/nrfx/nrfx_config.h index 4b23f7a2190a97..47c13686033ec2 100644 --- a/modules/hal_nordic/nrfx/nrfx_config.h +++ b/modules/hal_nordic/nrfx/nrfx_config.h @@ -882,6 +882,10 @@ CONFIG_NRF52_ANOMALY_109_WORKAROUND_EGU_INSTANCE #endif +#ifdef CONFIG_NRF52_ANOMALY_89_WORKAROUND +#define NRFX_TWIM_NRF52_ANOMALY_89_WORKAROUND_ENABLED 1 +#endif + #if defined(CONFIG_SOC_SERIES_BSIM_NRFXX) #include "nrfx_config_bsim.h" #endif diff --git a/modules/hal_nordic/nrfx/nrfx_config_nrf52832.h b/modules/hal_nordic/nrfx/nrfx_config_nrf52832.h index b181bf6cdcc6e2..a89ac8110bf5c6 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_nrf52832.h +++ b/modules/hal_nordic/nrfx/nrfx_config_nrf52832.h @@ -1331,6 +1331,16 @@ #define NRFX_TWIM_NRF52_ANOMALY_109_WORKAROUND_ENABLED 0 #endif +/** + * @brief NRFX_TWIM_NRF52_ANOMALY_89_WORKAROUND_ENABLED - Enables nRF52 Anomaly 89 workaround for + * TWIM. + * + * Boolean. Accepted values 0 and 1. + */ +#ifndef NRFX_TWIM_NRF52_ANOMALY_89_WORKAROUND_ENABLED +#define NRFX_TWIM_NRF52_ANOMALY_89_WORKAROUND_ENABLED 0 +#endif + /** * @brief NRFX_TWIM_CONFIG_LOG_LEVEL * diff --git a/soc/nordic/nrf52/CMakeLists.txt b/soc/nordic/nrf52/CMakeLists.txt index 6b01a1ffc778aa..b01fae193bbf71 100644 --- a/soc/nordic/nrf52/CMakeLists.txt +++ b/soc/nordic/nrf52/CMakeLists.txt @@ -13,4 +13,9 @@ if(CONFIG_SOC_NRF52832) message(WARNING "NRF52_ANOMALY_109_WORKAROUND disabled with SPIS, SPIM, TWIM or PWM enabled. This will occasionally cause the first byte transmitted to be incorrect") endif() endif() + if(NOT CONFIG_NRF52_ANOMALY_89_WORKAROUND) + if (CONFIG_NRFX_TWIM AND CONFIG_NRFX_GPIOTE) + message(WARNING "NRF52_ANOMALY_89_WORKAROUND disabled with TWIM and GPIOTE enabled. This can cause a static current draw of 400uA") + endif() + endif() endif() diff --git a/soc/nordic/nrf52/Kconfig b/soc/nordic/nrf52/Kconfig index adb57916627e48..ce3bdc9bc37381 100644 --- a/soc/nordic/nrf52/Kconfig +++ b/soc/nordic/nrf52/Kconfig @@ -119,4 +119,14 @@ config NRF52_ANOMALY_109_WORKAROUND_EGU_INSTANCE help EGU instance used by the nRF52 Anomaly 109 workaround for PWM. +config NRF52_ANOMALY_89_WORKAROUND + bool "Anomaly 89 workaround" + default y + depends on SOC_NRF52832 + depends on NRFX_TWIM || NRFX_SPIM + depends on NRFX_GPIOTE + help + This helps in reducing the 400uA to 450uA static current consumption when + GPIOTE and TWIM is enabled. + endif # SOC_SERIES_NRF52X diff --git a/west.yml b/west.yml index f7c3e04da5e73a..d0e2c2ad6f0301 100644 --- a/west.yml +++ b/west.yml @@ -188,7 +188,7 @@ manifest: groups: - hal - name: hal_nordic - revision: 4a3ba8eaca8f5255f550db7bc54dc3e23212da64 + revision: pull/180/head path: modules/hal/nordic groups: - hal