I am using CubeMX and System Workbench, and an STM32F030f4p.
In CubeMX I enable only one GPIO port so I can turn on-off the LED on the board, and RTC Alarm A.
In the code I turn on the power clock with
then I call
The curent consumption is 4.6mA. I power the board via the 3V pin, there is nothing else attached to the board.
(I tried an other version of the code on a nucleo board, (F446RE I think) where I am waking up the board periodically with RTC. (the led blinks three times, then the board goes to standby, after 10 second MCU wakes up, the led blinks three times again, etc.)
I get similar consumption.)
With this really stripped down version of the code where I only enable power clock, then enter standby, I get 4.6mA consumption.
I measure the current with a multimeter in serial with the board 3v pin and the power source.
Could you help me finding the solution? This is my first time working with an MCU.