Skip to content

Commit 004da6d

Browse files
mstasiaknordicnordicjm
authored andcommitted
[nrf fromtree] soc: nordic: allow use of TWIM frequency workaround
Added Kconfig options to allow use of TWIM frequency workaround in NRFX for nRF52 and nRF53. Signed-off-by: Michał Stasiak <[email protected]> (cherry picked from commit def5f8e)
1 parent 6bf2702 commit 004da6d

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

modules/hal_nordic/nrfx/nrfx_kconfig.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,12 @@
772772
#ifdef CONFIG_NRFX_TWIM137
773773
#define NRFX_TWIM137_ENABLED 1
774774
#endif
775+
#ifdef CONFIG_NRF52_ANOMALY_219_WORKAROUND
776+
#define NRFX_TWIM_NRF52_ANOMALY_219_WORKAROUND_ENABLED 1
777+
#endif
778+
#ifdef CONFIG_SOC_NRF53_ANOMALY_47_WORKAROUND
779+
#define NRFX_TWIM_NRF53_ANOMALY_47_WORKAROUND_ENABLED 1
780+
#endif
775781

776782
#ifdef CONFIG_NRFX_TWIS
777783
#define NRFX_TWIS_ENABLED 1

soc/nordic/nrf52/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,12 @@ config NRF52_ANOMALY_109_WORKAROUND_EGU_INSTANCE
120120
help
121121
EGU instance used by the nRF52 Anomaly 109 workaround for PWM.
122122

123+
config NRF52_ANOMALY_219_WORKAROUND
124+
bool "Anomaly 219 workaround"
125+
depends on NRFX_TWIM
126+
help
127+
Due to Anomaly 219 the low period of SCL clock is too short to meet
128+
the I2C specification at 400 kHz. This workaround configures the I2C
129+
frequency to 390 kHz instead of 400 kHz.
130+
123131
endif # SOC_SERIES_NRF52X

soc/nordic/nrf53/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ if SOC_SERIES_NRF53X
4141
VREGMAIN_PATH := $(dt_nodelabel_path,vregmain)
4242
VREGRADIO_PATH := $(dt_nodelabel_path,vregradio)
4343

44+
config SOC_NRF53_ANOMALY_47_WORKAROUND
45+
bool "Anomaly 47 workaround"
46+
depends on NRFX_TWIM
47+
help
48+
Due to Anomaly 47 the low period of SCL clock is too short to meet
49+
the I2C specification at 400 kHz. This workaround configures the I2C
50+
frequency to 390 kHz instead of 400 kHz.
51+
4452
config SOC_NRF53_ANOMALY_160_WORKAROUND_NEEDED
4553
bool "Workaround for nRF5340 anomaly 160"
4654
imply SOC_NRF53_ANOMALY_160_WORKAROUND

0 commit comments

Comments
 (0)