arch/nrf53: port 6e8f25ba3b change from nrf52

Added config setting for NRF53 I2C timing bug workaround
This commit is contained in:
raiden00pl 2023-08-13 09:08:27 +02:00 committed by Alan Carvalho de Assis
parent eec59015f0
commit 5572552024
2 changed files with 12 additions and 1 deletions

View File

@ -687,6 +687,13 @@ config NRF53_I2C_MASTER_COPY_BUF_SIZE
transaction will fit otherwise it will fall back
on malloc.
config NRF53_I2C_MASTER_WORKAROUND_400KBPS_TIMING
bool "Master 400Kbps timing anomaly workaround"
default y
---help---
Enable the workaround to fix I2C Master 400Kbps timing bug
which occurs in all NRF5340 revisions to date.
endif # NRF53_I2C_MASTER
endmenu

View File

@ -156,7 +156,11 @@
#define TWIM_FREQUENCY_100KBPS (0x01980000) /* 100 kbps */
#define TWIM_FREQUENCY_250KBPS (0x04000000) /* 250 kbps */
#define TWIM_FREQUENCY_400KBPS (0x06400000) /* 400 kbps */
#ifdef CONFIG_NRF53_I2C_MASTER_WORKAROUND_400KBPS_TIMING
# define TWIM_FREQUENCY_400KBPS (0x06200000) /* 390 kbps */
#else
# define TWIM_FREQUENCY_400KBPS (0x06400000) /* 400 kbps */
#endif
#define TWIM_FREQUENCY_1000KBPS (0x0ff00000) /* 1000 kbps */
/* RXDMAXCNT Register */