nrf52832 power consumption when disabling Twi driver (i2c)

Good morning,

It has been implemented a sleep mode to save battery when the board is not used.

To do that we follow the documentation and implemented the SystemOn mode and we've seen huge improvement in the power consumption (both in sleep and running mode)

When sleep mode is engaged all the peripheral are turned off.

To save power due to the twi driver we use the lines of code below.

Although we see good power save we think it is not enough.

The board when in sleep mode consumer around 550uA, but if the twi driver is not initialized at all, the consumption is around 280uA. So I guess there someting we can improve in the twi driver shut down sequence.

We are using nrf5 SDK 17.0.2

        /* Uninit all the TWI instances, this will put the hardware in a known state and stop any ongoing transfer, standard shutdown */
        for (uint8_t i = 0; i < I2C_BUS_N; i++)
        {
            nrf_drv_twi_disable(&busToTwiInstance[i]->twi);
            nrf_twi_mngr_uninit(busToTwiInstance[i]);
        }

Parents Reply
  • Hi,

    Luca Nisti said:
    1. We measured the board consumption removing the mcu from the pcb, plus it is consistent with calculation done by the hw engineer.
    Luca Nisti said:
    The results are consistent with different boards.

    Thank you for confirming.

    Luca Nisti said:
    2. I checked the SDA and SCL pin status during the sleep mode and they are set correctly to save power

    Good to hear.

    Luca Nisti said:
    3. Attached the sdk config file. I can confirm we are using the NRF_TWIM and TWI0_USE_EASY_DMA and TWI1_USE_EASY_DMA

    It looks like you have forgotten to attach the .h file?

     

    Is the log module disabled? Should be sdk_config.h::#define NRF_LOG_ENABLED 0 to disable logging, as uart will cause the peripheral clock tree to run in sleep.

     

    Kind regards,

    Håkon

Children
Related