I2C frequencies below 100kbps

Due to board design flaws that led to insufficient rise time for 100kbps communication, I would like to configure my i2c node in the device tree with a baud rate of 10 kbps.  At build time I get the following build failure:

C:\ncs\v2.1.0\zephyr\include\zephyr\toolchain\gcc.h:77:36: error: static assertion failed: "Wrong I2C 1 frequency setting in dts"
   77 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
      |                                    ^~~~~~~~~~~~~~

This is checked in `i2c_nrfx_twim.c`:

#define I2C_NRFX_TWIM_FREQUENCY(bitrate)				       \
	(bitrate == I2C_BITRATE_STANDARD  ? NRF_TWIM_FREQ_100K :	       \
	 bitrate == 250000                ? NRF_TWIM_FREQ_250K :	       \
	 bitrate == I2C_BITRATE_FAST      ? NRF_TWIM_FREQ_400K :	       \
	IF_ENABLED(NRF_TWIM_HAS_1000_KHZ_FREQ,				       \
	(bitrate == I2C_BITRATE_FAST_PLUS ? NRF_TWIM_FREQ_1000K :))	       \
					    I2C_NRFX_TWIM_INVALID_FREQUENCY)

I suspect the answer is no but just want to double check before I wait on building another board - Could the driver support a lower baud rate if I modified this section of code?

Details:
nRF Connect SDK - v2.1.0

nRF52840

Parents Reply Children
No Data
Related