STM32U3 Doesnt enter STOP Mode
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?
