summaryrefslogtreecommitdiff
path: root/chip/stm32/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/system.c')
-rw-r--r--chip/stm32/system.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/chip/stm32/system.c b/chip/stm32/system.c
index 85b3ad9012..682020b344 100644
--- a/chip/stm32/system.c
+++ b/chip/stm32/system.c
@@ -105,9 +105,6 @@ void __enter_hibernate(uint32_t seconds, uint32_t microseconds)
void system_hibernate(uint32_t seconds, uint32_t microseconds)
{
- if (board_hibernate)
- board_hibernate();
-
#ifdef CONFIG_HOSTCMD_PD
/* Inform the PD MCU that we are going to hibernate. */
host_command_pd_request_hibernate();
@@ -117,6 +114,10 @@ void system_hibernate(uint32_t seconds, uint32_t microseconds)
/* Flush console before hibernating */
cflush();
+
+ if (board_hibernate)
+ board_hibernate();
+
/* chip specific standby mode */
__enter_hibernate(seconds, microseconds);
}