I need to use nRF5240 device to control LED driver IC through I2C interface. And I also need to use I2C 10-bit addressing. How to enable I2C 10-bit addressing on ncs v2.4.2?
I need to use nRF5240 device to control LED driver IC through I2C interface. And I also need to use I2C 10-bit addressing. How to enable I2C 10-bit addressing on ncs v2.4.2?
Hello,
From the TWI peripheral description in the nRF5340 product specification you can find that only 7-bit address is supported by the hardware:
https://infocenter.nordicsemi.com/topic/ps_nrf5340/twim.html#register.ADDRESS
Looking at the screenshots you shared it may seem as it's possible to use 7-bit address to expand this to 10-bit by actually using 16-bit. We don't have any example on how to do this, however in theory (I believe) it can be possible to use the low level nrfx_twim_xfer() api directly to have more control of what bytes are sent on the bus. There are example in ncs showing the use of nrfx_twim directly that may be used as basis for this:
https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src
Kenneth