2020-05-29 04:38 AM
Hi,
I'm working on a custom board based on STM32L486 MCU, the microcontroller will stay most of the time in standby and will wake up using a physical button connected to SYS_WKUP3. This to say that the overall board consumption have to be as low as possible during standby mode while I don't care very much when it is in run mode.
I have three test programs doing basically the same things, they use the same code to enter in standby mode (copied from Cube example) and they share the same PullUp or PullDown configuration using the HAL_PWREx_EnableGPIOPullDown /Up HAL functions. I measured the voltages on all the pins for each of the three programs and they are exactly the same, so I know that the rest of the board is in the same bias condition.
The three test programs are:
1) Bare metal
2) Based on FreeRtos
3) Based on Zephyr
I have three quite different power consumptions in standby.
Bare metal 200uA
FreeRtos 350uA
Zephir 750uA
The current floor, measured without the microcontroller is 100uA.
A part the absolute current, I was expecting similar behaviour for all the three implementation once the micro entered in standby mode. I can't figure out the reason why they are so different. Any of you guys has had similar experience or any idea on what's going on?
Thanks a lot