I'm using an STM32L073RZ on a bare board with just the CPU and decoupling caps. I'm powering the board straight from an Otii Arc and measuring current consumption. I'm running MbedOS 5.11.2.
When I call the sleep()
function the CPU goes into a low power mode, with an occasional 5mA spike in current consumption approximately every second, see the image below:
What is the cause of this? I'm attempting to place the CPU into STOP mode with an RTC running - this should draw, according to the datasheet, 1µA current.
Further to this, how can I tell which low power mode the sleep()
function has chosen? I'm trying to stay away from the HAL because I've had many issues configuring interrupts and the like.
For completeness, here's the code that's running on the board:
#include "mbed.h"
int main() {
sleep();
}