2021-08-16 10:22 PM
I am using following snippet after the BLE Advertisement stops. I am using p2pserver example in which BLE Advertisement stops after 60 seconds and I have a timer of 65 seconds in which I have following snippet.
HAL_SuspendTick();
SET_BIT(PWR->CR3,PWR_CR3_RRS); //RAM retention in standby mode (SRAMa);
LL_C2_PWR_SetPowerMode(LL_PWR_MODE_STANDBY);
HAL_PWR_EnterSTANDBYMode();
But somehow i am getting 5 to 6 mA even after this snippet means it is not going into standby mode. I already made the configuration as follows:
/**
* keep debugger enabled while in any low power mode when set to 1
* should be set to 0 in production
*/
#define CFG_DEBUGGER_SUPPORTED 0
/**
* When set to 1, the traces are enabled in the BLE services
*/
#define CFG_DEBUG_BLE_TRACE 0
/**
* Enable or Disable traces in application
*/
#define CFG_DEBUG_APP_TRACE 0
Please guide me. Thanks in advance.
2021-08-23 03:03 AM
In DEBUG mode, you can’t achieve a real low consumption as the DEBUG system must stay running but this is not your case.
The system low power mode to enter depends on the allowed mode selected by both CPUs in the LPMS bits of PWR control register 1 (PWR_CR1) and PWR CPU2 control register 1 (PWR_C2CR1).
HAL_PWR_EnterSTANDBYMode() function only manages the setting of LPMS in the PWR_CR1 register.
The entered system low-power mode depends also upon the PWR_C2CR1.LPMS allowed low-power mode from CPU2.
So can you check if LPMS = “011�? in PWR_CR1 and/or in PWR_C2CR1registers?
2021-08-26 02:34 AM
Hello @Remi QUINTIN ,
As I mentioned in previous post, I put CPU2 also in Low power Mode with command LL_C2_PWR_SetPowerMode(LL_PWR_MODE_STANDBY);
Can you provide me small snippet to put both CPUs in standby mode?
Thanks in advance.
Regards.
2021-09-01 01:08 AM
Did you try the BLE_HeartRate out of the package with no modification on a Nucleo board ?
It shall provide the best low power consumption with roughly 3.6us during radio idle time.
If this is not what is measured, I don't see any other reason than something wrong with the measurement method.
There are some jumpers to configure on the board to disconnect the ST-link when doing power measurement: remove the VDD MCU jumper on JP5 connector.
You can also use the ST power shield to achieve a very accurate measurement.
This board is recommended by EEMBC organization as an Official EEMBC Energy Monitor for Direct computation of EEMBC ULPMark scores.
Reference is X-NUCLEO-LPM01A.