fixed bug not going to standby correctly

This commit is contained in:
2024-05-21 22:17:03 +02:00
parent a9d11ea891
commit 1d7ad7dc31

View File

@@ -52,6 +52,9 @@ void BSP_POWER_WakeUp() {
*/
void BSP_POWER_EnterStandby() {
// stop the sytem interrupts
__disable_irq();
// We need to disable all Periperals to minimize parasitic currents
HAL_I2C_DeInit(&hi2c1);
HAL_I2C_MspDeInit(&hi2c1);
@@ -108,6 +111,13 @@ void BSP_POWER_EnterStandby() {
/* Enter the Standby mode */
HAL_PWR_EnterSTANDBYMode();
while (1)
{
// if we are here, something went wrong
NVIC_SystemReset();
Error_Handler();
}
}
uint32_t sec_without_k15 = 0;