2020-04-29 10:37 AM
Hello,
I'm experimenting with ulp I'm starting from lowest power consumption achievable and add
peripherals and wake up conditions to see what happens.
That's why I'm starting with shutdown mode.
I'm using a custom board with only an STM32L412K8, few capacitors and 6.8k between BOOT0 and GND. I'm running 3.3v.
According to this application note (page 15) , current should be 8nA.
The datasheet (page 107) says it should be 5-6nA.
CubeMX simulator (configured at 25°C) says it should be 31nA. I don't understand why CubeMx current simulator is different from the datasheet, but anyway, for my application it's "not that far".
All measurments stated after are done without programming probe and using X-nucleo-lpm01A as micro-amperes meter.
I run a basic application that does nothing more than :
HAL_Delay(5000);
HAL_PWREx_EnterSHUTDOWNMode();
I don't have any GPIO configured.
After entering shutdown, current measured is about 68nA. Not that far from cubeMx but not very close to datasheet. Ok, let's imagine that it is measurement error.
Now, I try to add a wake up pin. So I do something like this based on an example from the library:
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_HIGH);
HAL_PWREx_EnterSHUTDOWNMode();
With this setup, current is 5 to 7µA, (depending on the clock used before shutdown). This time, it is 1000x the current from the datasheet.
I found nowhere anything that explains how to configure wakeup pin in order to get the graal of some nA.
How should I do?
Thanks
Julien
2020-04-29 05:39 PM
Hello,
I tried an example with the Nucleo STM32L476RG board and works well, here is the code:
/* Going into shutdown */
__HAL_RCC_PWR_CLK_ENABLE();
HAL_PWR_EnableBkUpAccess();
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN2);
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN2_HIGH);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF2);
HAL_PWREx_EnterSHUTDOWNMode();
Best Regards,
Mohamed Aymen.
2020-04-30 12:38 AM
Hello,
Thanks for your answer.
Yes, it works but did you measure the current in shutdown?
Best regards
Julien
2020-04-30 03:18 AM
Hello,
Yes, I use X-nucleo-lpm01A as micro-amperes meter and I get 97 nA at 3.3V.
Best Reagrds,
Mohamed Aymen.
2020-04-30 03:55 AM
Hello,
>The datasheet (page 107) says it should be 5-6nA.
Page 107 illustrates the values of VBAT mode and not of SHUTDOWN, but its values in table 106.
Best Regards,
Mohamed Aymen.
2020-04-30 07:37 AM
Hum, you're right, I scrolled a bit too much.... :(
Based on the datasheet, it's hot in your office ! :D
OK, thanks again, I will try to strictly adapt the example to my mcu and see what happens.
I'm using the same code except for clock configuration.
As all clock are disabled during shutdown, can clock configuration change the current?
Best regards.
Julien
2020-04-30 12:49 PM
> Based on the datasheet, it's hot in your office ! :D
Don't forget the MAX column!