suspend i2c does NOT reduce current?

Hi,

The custom board is 52832 with st lsm6dsr sensor.

I tried to suspend i2c by this code: 

#define I2C_INST DT_NODELABEL(i2c0)
const struct device *const i2c = DEVICE_DT_GET(I2C_INST);
int rc = pm_device_action_run(i2c, PM_DEVICE_ACTION_SUSPEND);
	if (rc < 0) {
		LOG_ERR("Could not suspend i2c (%d)\n", rc);
	}

It worked with no errors. 

But when I measure the current, its the same whether the i2c is suspended or resumed. There is NO power saving at all. I checked the config, it has following:
CONFIG_I2C_NRFX=y
CONFIG_I2C_NRFX_TRANSFER_TIMEOUT=500
CONFIG_I2C_0_NRF_TWI=y
CONFIG_I2C_INIT_PRIORITY=50 

Questions:
1. How to reduce current by suspend i2c/twi? Is there any configuration I should do?  When with SDK, disable twi can reduce significant current. 

2. For 52832, how to make it into low power mode?

Thanks,

Parents Reply
  • Dejan,

    Thanks for your reply. Yes I do want to know why there is no current reduction after i2c device suspended. I measured it keeps the high current even after disconnect. 

    After flash, when the board start advertising, the current is 0.13mA.

    With i2c active, the current is 1.6mA.

    With sensor data notification, the current is 1.6mA.

    Then stop data notification and disconnect, the current keeps 1.6mA.

    How to put i2c off? 

    Thanks,

Children
Related