2018-05-16 03:58 AM
Hi fellows,
I have a issue when i exit the stopmode on my stm32h7.
I notice that my power consumption goes down from 34mA to 5mA when i put my MCU in StopMode. But after the wake up from the StopMode i read 19mA.
This issue leads me to the fact that i don't configure my clock on the right way after a WakeUp from the StopMode.Does someone had the same issue or does someone have a clue for me?Thanks in advance
JC
Note : I already try different exemple code and none worked...
2018-05-16 11:22 PM
Hello,
During enter into STOP mode all clocks are stopped (RTC clocks LSE can be still operational but it is kept in backup domain and this clock cannot drive the core).
After wakeup from STOP mode MCU is woken up using one of the internal clocks (in H7 it is HSI 16MHz) as it is starting in shortest time. Then it is up to the user to reconfigure the clock system to desired frequency (starting HSE, configuration PLL), but it takes time.
Concerning power consumption in STOP mode. Please remember that there is no action done on GPIO lines those will keep the state like before the entrance into low power mode.
I have found one example with entrance and exit from STOP mode with clock reconfiguration. It has been prepared for STM32H743ZI-Nucleo, but can be ported to any other STM32H7.
You can find it within
in the path:.\STM32Cube_FW_H7_V1.2.0\Projects\STM32H743ZI-Nucleo\Examples\PWR\PWR_STOP_RTC\
I hope it helps.
Best Regards,
Artur
2018-05-17 03:54 AM
Hi,
Thanks for the answer.In fact i'm already using the HSI as main clock instead of the HSE. Is this a good or not i don't know. I just need the full potential of the H7 at some point.
The stange thing is that if i call 'SystemClock_Config' after exiting StopMode I get back to a normal working environement. But i can't go to stop mode again (while loop) and can't even go in StandByMode...
Could it be a flag issue?
I know i do something wrong but what is the question ...2018-05-20 09:58 PM
Hello,
Most probable reason that you cannot go into STOP mode is that either some wakeup flag is not cleared or wakeup signal is still active. With STANDBY mode it could be active wakeup source which causes immediate wakeup as we are coming back from STANDBY always via RESET and executing the code from the begining afterwards (but please be careful as BACKUP domain (with RTC) is not affected by any reset except POR/BOR one).
Could you please pass me part of your code with the code executed just after wakeup, please?
2019-03-04 10:17 AM
Hi.
If you call 'SystemClock_Config' the Tick gets enabled and it will be preventing STM from going into stop mode again.
You can call 'HAL_SuspendTick();' after clock config.