Skip to main content
Visitor
June 29, 2026
Question

STM32U3 Doesnt enter STOP Mode

  • June 29, 2026
  • 2 replies
  • 21 views

Hi, I am using a STM32U375KEU on a custom PCB and I am trying to enter STOP2 mode. When flashing the code i the error: Target is not responding, retrying… and the current draw is the same as running the MCU normally at around 2mA. Here is the main

int main(void)

{

HAL_Init();

SystemClock_Config();

 

HAL_DBGMCU_DisableDBGStopMode();

 

// 3. KILL SYSTICK SO IT CAN'T WAKE THE CPU

HAL_SuspendTick();

SCB->ICSR |= SCB_ICSR_PENDSTCLR_Msk;

 

// 4. ENTER DEEP SLEEP

__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SBF);

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERMODE_STOP1, PWR_STOPENTRY_WFI);

 

// 5. IF IT WAKES UP, TRAP IT HERE

while (1)

{

}

}

}

Does it have something to do with the Clock?

2 replies

ST Technical Moderator
June 30, 2026

Hello ​@vtsiam 
First, to ensure if it is a software or hardware issue
can you try run this firmware example, it should work on your MCU
or you can base yourself on it to create a working project
So, we can see if it is an issue related to your code or an issue related to your hardware
BR
Gyessine

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
vtsiamAuthor
Visitor
June 30, 2026

Hi, I tested the board based on the code you send. In the first 5 seconds of the HAL_Delay I measure 3.6mA and after when i enter STOP 2 Mode i measure 2mA current. The board also has a sensor with I2C, a IC with SPI and some LEDs but i have unssoldered them all and set all the GPIO pins including the debugging ones to analog.