stm32/system_stm32: Enable DBGMCU in low-power modes for debug builds.

This commit is contained in:
iabdalkader 2020-12-08 00:22:17 +02:00 committed by Damien George
parent 20f8ce1982
commit 32d76e5de6
1 changed files with 5 additions and 0 deletions

View File

@ -425,6 +425,11 @@ void SystemClock_Config(void) {
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);
NVIC_SetPriority(SysTick_IRQn, NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, TICK_INT_PRIORITY, 0));
#endif
#if defined(STM32H7) && !defined(NDEBUG)
// Enable the Debug Module in low-power modes.
DBGMCU->CR |= (DBGMCU_CR_DBG_SLEEPD1 | DBGMCU_CR_DBG_STOPD1 | DBGMCU_CR_DBG_STANDBYD1);
#endif
}
#endif