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

What is the recommended way to shutdown a TWI slave and then restart with a secondary I2C slave address

On powering up the nRF52840 I start the twis slave.  The nRF52840 works as expected.

I install one i2c slave address on the system, external master has no issues communicating

Problem:  I would like to install and configure a secondary I2C address (SDK 15.1), currently doing the following:

  1. nrf_drv_twis_disable(&m_twis)
  2. nrf_drv_twis_uninit(&m_twis)
  3. load the nrf_drv_twis_config_t with the operational parameters plus the secondary I2C address
  4. nrf_drv_twis_init(&m_twis, &config, handler_function)
  5. nrf_drv_twis_enable(&m_twis)

If I execute this code from within a debugger, Segger Studios, it works perfectly.  Master can communicate on both addresses

If I load a release image onto the nRF52840 it works sometimes but it is not reliable.

Any ideas would be appreciated, 

Regards.

Parents Reply Children
Related