Merge pull request #653 from openmv/dbgmcu_fix

Enable DBGMCU in sleep modes.
This commit is contained in:
Ibrahim Abd Elkader 2019-12-16 19:17:35 +02:00 committed by GitHub
commit cf9b7ec025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,6 +167,12 @@ void SystemInit(void)
/* dpgeorge: enable 8-byte stack alignment for IRQ handlers, in accord with EABI */
SCB->CCR |= SCB_CCR_STKALIGN_Msk;
#if defined(MCU_SERIES_4) || defined(MCU_SERIES_F7)
DBGMCU->CR |= DBGMCU_CR_DBG_SLEEP;
#elif defined(MCU_SERIES_H7)
DBGMCU->CR |= DBGMCU_CR_DBG_SLEEPD1;
#endif
}
void SystemClock_Config(void)