cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030F6 MCU : Shutdown mode

gailu96
Visitor

Hi Experts,

We are building a battery based product based STM32G030F6 MCU. We are using Arduino environment as we need multiple Arduino libraries for the project.

Well our software is working fine, however we are facing issue with the current consumption. It has to wakeup every 5 seconds and send some data. We are able to put microcontroller in DeepSleep mode using STM32LowPower Library In deepSleep mode it takes around 175uA current. We need to further reduce the current consumption to less 20-25uA. So we are trying to use shutdown mode but not able to use it.

When we use shutdown mode, it still takes 175 uA. When analyzed the code we found that it is falling back to deep sleep mode when it does not found LSE. When LSE is available it tries to call function 

HAL_PWREx_EnterSHUTDOWNMode() 

It is available in Arduino core for STM32. File name stm32g0xx_hal_pwr_ex.c

 
We tried to call this function (with LSI enabled) in library's
LowPower_shutdown() function instead of falling back to deepsleep just to check if the code compiles or not. When compiled we got error 
Spoiler
undefined reference to HAL_PWREx_EnterSHUTDOWNMode
 Before we work out on LSE we have some queries as below. Your help and expert advise is appreciated.
 
1) Does STM32G030F6 supports shutdown mode? (It does not have VBAT pin but based on documentation we believe that VDD will power VBAT) Is our understanding correct?
 
2) Why we get HAL_PWREx_EnterSHUTDOWNMode as undefined reference. Is it not available for STM32G030F6 ?
 
3) How do we properly enable LSE in Arduino environment  after connecting 32KHz crystal on PC14 and PC15 ?
 
1 REPLY 1
KnarfB
Principal III

Shutdown mode is not mentioned in the DS12991 Rev 4 datasheet for STM32G030F6, but in the DS12992 Rev 3 data sheet for STM32G031F6 and similar.

hth

KnarfB