sandeepmistry/arduino-nRF5

NRF52 - I2C, hight power consumption after Wire.end()

Open

#261 geöffnet am 13. März 2018

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C (288 Forks)github user discovery
help wantedquestion

Repository-Metriken

Stars
 (952 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi, I'm using I2C in a low power solutions. I tried to disable I2C after using it but I obtain strange hight power consumption behaviour. I'm using the following code:

#include <Wire.h>

void setup() {
  // start of I2C block
  Wire.begin();
  Wire.beginTransmission(0x19);
  int8_t ret = Wire.endTransmission();
  Wire.end();
  // end of I2C block
}

void loop() {
  NRF_POWER->TASKS_LOWPWR = 1;
  __WFE();
  // Make sure any pending events are cleared
  __SEV();
  __WFE();
}

On my board the consumption with the I2C block of code is 0,78 mAh when I remove the block I obtain 0,36 mAh.

Any suggestion on how to reduce the consumption?

Contributor Guide