Hi,
I have a circuit with an I2C peripheral on a separate power switch. There is excessive power consumption (about 50µA extra) due to leakage after TWIM is disabled and the power switch is off. On 52840v1, this code eliminated the leak:
nrfx_twim_enable(&i2c1); gpio_pin_set_dt(&peripherial_power_ctrl_pin, 1); //... //Use peripherial... //... nrfx_twim_disable(&i2c1); gpio_pin_configure(gpio0, TWIM_SDA, GPIO_DISCONNECTED); gpio_pin_configure(gpio0, TWIM_SCL, GPIO_DISCONNECTED); gpio_pin_set_dt(&peripherial_power_ctrl_pin, 0);But on 52840v2, TWIM stopped functioning after disconnecting pins once and didn't recover after nrfx_twim_enable, resulting in 0x0BAE0001 error. If I comment out gpio_pin_configure, TWIM runs normally, but idle current increases. How should I handle this?