4

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

Simon NOWAK
  • 355
  • 2
  • 14

2 Answers2

7

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.

Scott Seidman
  • 29,274
  • 4
  • 44
  • 109
  • Thank you ! I never thought about that. I try to get more results in this way. – Simon NOWAK Dec 08 '16 at 15:44
  • 3
    High-Z as in analog mode - digital inputs use Schmitt triggers which can cause transient currents visible in the microamper range. – jaskij Dec 08 '16 at 16:22
4

I think there may still be some peripherals using a bit of current. The datasheet specifies about 1µA in stop mode with RTC enabled, but it also specifies that ~1.2µA is consumed by the PVD/BOR peripheral and ~1.7µA consumed by the internal voltage reference (see datasheet Table 41: Peripheral current consumption in Stop and Standby mode). I believe those two peripherals are enabled by default.

If you disable them explicitly, you should have a consumption closer to the 1µA you're expecting.

I can't tell you how to do that with the libraries provided by ST, however. I never used them.

dim
  • 15,845
  • 3
  • 39
  • 84
  • Thank you for your response, thanks to you my consumption is now to 3.8µA, I need to configure the STM32 better but it's a good start :) – Simon NOWAK Dec 08 '16 at 15:42
  • @SimonNOWAK super old thread! If possible, could you share how you managed to get down to such low consumption? I am really struggling at the moment! – amitchone Mar 15 '19 at 15:12