This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2C slave support on nRF52840 using Zephyr v1.6.0

Hi,

I'm attempting to develop chip to chip communication where an nRF9160 acts as an I2C master communicating with an nRF52840 acting as an I2C slave.

I got reasonably far in developing the nRF52840 code to have it act as an I2C slave using the Zephyr API in drivers/i2c.h only to get an ENOSYS error when attempting to register the nRF52840 as a slave by calling i2c_slave_driver_register. I used eeprom_slave.c located in zephyr/drivers/i2c/slave as a starting point for my implementation.

I then noticed this github thread indicating that I2C slave support doesn't exist, but the thread is over a year old so I'm hoping there is an update or that I'm missing something, and that it is in fact possible to use the nRF52840 as an I2C slave in Zephyr.

Thanks in advance for your help!

Parents Reply
  • Hi,

    The issue is that I have some other sensors on the same I2C bus that the nRF52840 is communicating with; won't their drivers in zephyr break if I modify things to use the nrfx driver?

    Or, is there a way to make sure I only use the nrfx driver implementation for this chip to chip communication driver, leaving the existing sensor drivers to work as they currently do with the I2C bus as it is currently configured?

Children
Related