Hello, I'm trying to use an STM32 (blue pill) with some other modules (including an external RTC). The idea is to make the stm go into deepsleep and wake it up once every day to do its business.
I use the latest STM32 Core and the Stm32 LowPower library.
The minimum relevant code example is as follows
I tried measuring the current going to the bluepill, then I see it steady around 38mA (using a keithley dm6500), and it never falls down (upon waking up and "doing stuff" I mean, the real stuff it has to do it jumps up to 70mA).
What am I doing wrong? I think 40mA is way too high for a deep sleep.
thanks for your reply.
I understand that the LED is consuming about 6mA (3.3V across 510R).
I have no serial enabled, nor I have the usb connected.
The deepsleep example in the folder you mentioned was what I used as the base idea for what I did.
Also, to be clear, I did not measure the psu current, but the current directly into the 3.3V pin of the pill…
Am I doing something wrong?
Not anything wrong, but I suspect the uC is not consuming the current. BluePills have been known to have various issues: wrong resistors, bridged solder joints, even non-STM microcontrollers. I suspect you should try to put the uC into reset mode and see if the current drops.
Over on the STM32duino.com forum, you may be able to get some help from Frederic who's team wrote the core wrappers.