2020-05-18 06:24 AM
I have problems with power consumption. In standby power consumption seems to we be way over the documented ~1,97 uA. Current codes gives consumption around 300 uA. Is there something more that needs to be taken into account when putting the CPU to standby? Code is generated latest version on CubeIde.
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB)){
__HAL_PWR_CLEAR_FLAG(PWR_CPU_FLAGS);
}
HAL_SuspendTick();
HAL_PWR_EnterSTANDBYMode();
for(;;){
}
}
2020-05-18 08:13 AM
How are you measuring it? Note that 3.3V / 300uA is about 10kOhm. Is it possible you're measuring the current on a pullup/down resistor as well?
The PWR example doesn't look like it does anything fancy:
2020-05-19 12:39 AM
Thanks for the answer and example. Problem solver... it was pretty stupid mistake. Problem was that i have debugger attached to board(custom made). When removed current drops to ~20uA