cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030 sometimes not waking up from STOP 1 Mode

JakobB
Associate

Hey everyone, I have developed a circuit board with STM32G030. I use the STOP 1 mode to save power, the device wakes up on a pin change interrupt.

Sometimes the current consumption in STOP 1 mode is around 1,2mA higher mode than normal (3uA) but lower than run mode(2,5mA) and the MCU does not wake up anymore. The same in Standby Mode.

I can´t find the reason, maybe someone has an idea.

 

Here is my STOP Mode function:

void StopMode(void)

{

LED_On(OFF);

I2C_On(OFF);

MOT_EN(OFF);

//DisableDebugger();

//disablePeripherie();

HAL_SuspendTick();

sleep = 1;

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); //Stop 1

 

SystemClock_Config();

HAL_ResumeTick();

 

USR_LED_On(1);

 

LED_On(ON);

I2C_On(ON);

MOT_EN(ON);

}

2 REPLIES 2
JakobB
Associate

After some testing I figured out that the problem is only present when I run the Timer 3 with PWM generation before going to sleep. The Errata sheet mentions something but my HSI_DIV is set to [00]

code out of main.c:

RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;

 

STM32G030x6/x8 device errata:

2.2.6 Wakeup from Stop not effective under certain conditions
Description
With the HSI clock divider bitfield HSIDIV[2:0] set to a value different from 000, the device fails to enter Stop
mode when SYSCLK is set to HSE clock.
With the HSI clock divider bitfield HSIDIV[2:0] set to a value different from 000, peripherals with clock request
capability fail to wake the device up from Stop modes.
Workaround
None.

Hello JakobB,

 

could you figure out your problem ?

We have a similar issue using an STM32G0B1 ...

 

Best regards,

lakeroe