cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L433 clock is running in stop 2

Jonathan Frech
Associate II

My issue is a high current in stop 2 mode with the STM32L433, i'm measuring around 1mA in Stop2 Mode, which should be around 5uA for the MCU, with the rest of the board compoents, i expect around 50uA. For investiagrion, i desoldered all other components and only left voltage regulator in place. I'm still seing 750uA.

Further i enabled the PA8 MCO. This resulted in seeing a 4Mhz MSI Clock output while STOP2 is active, so it seems that the clock is active, and causing the current draw. Cube MX states 600uA for 4Mhz in "run" mode, which is closely to the measured 750uA.

I'm using the following code:

void pwr_Stop(void){
 
	/* Set regulator to bypass: 2.5....3V from battery, instead of 3.3 regulated*/
	hw_resetPin(PSU_EN);
 
 
	/* Suspend the Ticker */
	HAL_SuspendTick();
 
 
	/* Change the GPIO , only leave wakeup pin active*/
	hw_GPIO_InitStop();
 
	__HAL_RCC_ADC_CLK_DISABLE();
	__HAL_RCC_PWR_CLK_DISABLE();
	__HAL_RCC_DMA1_CLK_DISABLE();
	__HAL_RCC_PWR_CLK_DISABLE();
 
	 HAL_PWR_DisableBkUpAccess();
	 __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_MSI);
 
	/* Clear all related wakeup flags */
	__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
 
	/* Go to STOP2 Mode */
	HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
 
	////////////////
	// STOP MODE
	////////////////
 
 
	/* Reinit the clocks */
	sysClockConfig();
 
 
	/* Enable Clocks */
	sysClockEnable();
 
 
	/* Resume the Ticker */
	HAL_ResumeTick();
 
	/* Reinit the Pins */
	hw_GPIO_Init();
 
 
 
	/* Startup the Regulator */
	hw_PwrCntrl_EnAll();
 
 
}

Any ideas why the clock stays on?

3 REPLIES 3
Uwe Bonnes
Principal III

Are you connected toi a debugger and eventually DBGMCU_CR is set?

Jonathan Frech
Associate II

The debugger is not connected, if the debugger is connected, the current-draw is around 3mA. Also before entering stop, i call:

 HAL_DBGMCU_DisableDBGStopMode();

Also, maybe its helpfull to say, that i have a working "Shutdown" mode in the same application, that draws only 0.5uA, which is quite right for Stutdown.

CHunt.3
Associate

Did you ever get to the bottom of this, I am seeing exactly the same problem? The STM32L433 micro is functioning correctly using 'Stop 2', except the MSI oscillator seems to be running (4 MHz clock if I enable MCO) whilst it is stopped and is drawing excess current.