File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -941,9 +941,11 @@ void powerctrl_enter_standby_mode(void) {
941
941
// Clear and mask D1 EXTIs.
942
942
EXTI_D1 -> PR1 = 0x3fffffu ;
943
943
EXTI_D1 -> IMR1 &= ~(0xFFFFu ); // 16 lines
944
+ #if defined(EXTI_D2 )
944
945
// Clear and mask D2 EXTIs.
945
946
EXTI_D2 -> PR1 = 0x3fffffu ;
946
947
EXTI_D2 -> IMR1 &= ~(0xFFFFu ); // 16 lines
948
+ #endif
947
949
// Clear all wake-up flags.
948
950
PWR -> WKUPCR |= PWR_WAKEUP_FLAG_ALL ;
949
951
#elif defined(STM32G0 ) || defined(STM32G4 ) || defined(STM32L4 ) || defined(STM32WB )
@@ -970,7 +972,7 @@ void powerctrl_enter_standby_mode(void) {
970
972
PWR -> CSR1 |= PWR_CSR1_EIWUP ;
971
973
#endif
972
974
973
- #if defined(NDEBUG )
975
+ #if defined(NDEBUG ) && defined( DBGMCU )
974
976
// Disable Debug MCU.
975
977
DBGMCU -> CR = 0 ;
976
978
#endif
You can’t perform that action at this time.
0 commit comments