Electronic – How to correctly configure deepsleep for STM32L0xx

low-powermbedmicrocontrollernucleostm32

I'm trying to configure my Nucleo Board with a STM32L073RZ in deepsleep mode to get the lowest power consumption.
To do that I use the mbed librairies with the deepsleep() function (This function use Stop mode with RTC). On the application note given by STMicroelectronics the consumption is around 1µA in Stop mode with RTC but on my board I have 4,2µA.
This is my script


int main()
{
    User_Setup();

    RTCHandle.Instance = RTC;

    //Create and launch the RTC date (08:30:00 08/12/16)
    RTC_DATE_TIME(0x16, RTC_MONTH_FEBRUARY, 0x8, RTC_WEEKDAY_TUESDAY, 0x9, 0x50, 0x00, RTC_HOURFORMAT12_AM);

    RTC_AlarmConfig();

    while(1)
    {
        deepsleep();
        //Display the time after a wakeup
        RTC_TimeShow();
        wait(1);
    }
}

How can I correctly configure my STM32 to get the lowest consumption ?

Thank you for your attention

Simon NOWAK

Best Answer

In addition to dim's answer, which would indicate that you might try manually turning off peripherals before going into deep sleep (I don't know if this is handled by deep sleep all by itself) to see if this reduces your sleep current, you need to absolutely pore through the schematics for the Nucleo Board to see if there might be pull-ups, LED's, etc, that might be sucking up current. I haven't used the Nucleo, but on some ST boards, there are jumpers (solder and otherwise) that you might need to deal with. A dev board can be very useful, but it probably isn't your best platform to test low-current systems.

You should also configure all your I/O's to be high-Z before sleep.