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

hold_bus_uninit in which case should be set to true and which case should be false?

SDK 16

52810

LIS3DH

I2C

I am using nrfx_twi_init and wonder when to set the hold_bus_uninit to true, and when I should leave it false?

Thanks,

  • Hi,

    I think it depends on your HW. It should not matter much if you already have external pull-ups. Are you initializing the TWI driver in your code, and do you want the pull-up to always be enabled? I can think of two scenarios where this setting would make a difference:

    1. The external sensor voltage supply is cut off when disabled. In such a case, the sensor may get powered through the bus lines and thus cause a leakage current.  Set hold_bus_uninit to false to avoid this.

    2. The external sensor is idle but powered after you have un-initialized the TWI. In this case you may want to keep the pull-ups enabled to prevent floating input on the sensor.

Related