H, I am using a simple PCB with RAK3172, directly connected to CR123 battery. Pin PA_1 is connected to a voltage divider 2 * 1 MOhm. When I run the script below everything is fine. I tested this with 3.5.* and the new 4.0 firmware release with equal results. Sleep current (measured with OTII) is around 5 uA and returns to thi level after a button press and release.
Activating the Pin PB_4 (#define SHOWBUG) the sleep current is 5 uA as well but will jump to 300…350 uA once I hit the button. After the button is released it stays on this level. Any suggestion?
#define SHOWBUG
void setup() {
Serial.begin(115200);
Serial.printf(“FW: %s\r\n”, api.system.firmwareVersion.get().c_str());
#ifdef SHOWBUG
pinMode(PB_4, INPUT);
int v = analogRead(PB_4);
#endif
pinMode(PA_1, INPUT);
attachInterrupt(PA_1, buttonpress, LOW);
api.system.sleep.all();
}
void loop() {
api.system.sleep.all();
}
void buttonpress() {
Serial.println(“button pressed”);
}