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

TWI consuming extra current (nRF52)

Hello,

I am working on product based on the NRF52. It has an external EEPROME wired via I2C bus (no external pullups). I see an extra 300uA ish current consumption after performing an I2C transaction. 

I have init the peripheral in this way:

nrf_gpio_cfg_input(EEPROM_SCL_PIN,NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_input(EEPROM_SDA_PIN,NRF_GPIO_PIN_PULLUP);

const nrf_drv_twi_config_t twi_eeprom_config = {
.scl = EEPROM_SCL_PIN,
.sda = EEPROM_SDA_PIN,
.frequency = NRF_DRV_TWI_FREQ_100K,
.interrupt_priority = APP_IRQ_PRIORITY_LOWEST,
.clear_bus_init = false,
.hold_bus_uninit = true
};

err_code = nrf_drv_twi_init(&m_twi, &twi_eeprom_config, NULL, NULL);
APP_ERROR_CHECK(err_code);

The I perform an I2C transaction like this:

nrf_drv_twi_enable(&m_twi);

err_code = nrf_drv_twi_tx(&m_twi, EEPROM_I2C_ADDRESS, write_data, 2, true);
APP_ERROR_CHECK(err_code);

err_code = nrf_drv_twi_rx(&m_twi, EEPROM_I2C_ADDRESS, read_buffer, read_bytes_num);
APP_ERROR_CHECK(err_code);

nrf_drv_twi_disable(&m_twi);

And here I can see the device drawing extra 300uA. If I comment out the nrf_drv_twi_tx/rx functions the extra current disappears.

I do not think it is the peripheral drawing the extra current because I can see the current increase also if I use a different I2C ADDRESS.

I am using SDK 16.

Thanks and Regards,


Andrea

Parents Reply Children
No Data
Related