6 years ago.

High power consuption on nrf52832 because of I2C

Hei hi =)

I'm having big power consumption problems with I2C on nrf52832. The code is based on mbed-os-5.10.4. I've tried all the tricks I've used in the previous mbed-os versions:

  • Define NDEBUG and ASSERT_MSG flags
  • Destroy I2C object
  • Disabling both I2C (TWI) instances:

I2C disable

NRF_TWI0->ENABLE = 0;
 NRF_TWI0->PSELSCL = 0xFFFFFFFF;
NRF_TWI1->ENABLE = 0;
NRF_TWI1->PSELSCL = 0xFFFFFFFF;
NRF_TWIM0->ENABLE = 0;
NRF_TWIM0->PSEL.SCL = 0x80000000;
NRF_TWIM0->PSEL.SDA = 0x80000000;
NRF_TWIM1->ENABLE = 0;
NRF_TWIM0->PSEL.SCL = 0x80000000;
NRF_TWIM0->PSEL.SDA = 0x80000000;

DigitalOut foo(SDA);
DigitalOut bar(SCL);

but for some reason, all these stuff does not work anymore... My power consumption is around 800uA (instead of 1.6uA). And I quite sure it due to I2C because the power consumption goes up at the moment when the program communication over I2C.

Do you have any idea what's the problem and what's the solution? Thank you.

Be the first to answer this question.