diff --git a/libraries/SrcWrapper/src/stm32/hw_config.c b/libraries/SrcWrapper/src/stm32/hw_config.c index efdb1dcb5a..8b7f7c61cc 100644 --- a/libraries/SrcWrapper/src/stm32/hw_config.c +++ b/libraries/SrcWrapper/src/stm32/hw_config.c @@ -45,6 +45,7 @@ void hw_config_init(void) { configIPClock(); +#if !defined (SKIP_DISABLING_UCPD_DEAD_BATTERY) #if defined(PWR_CR3_UCPD_DBDIS) || defined(PWR_UCPDR_UCPD_DBDIS) /* Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral */ HAL_PWREx_DisableUCPDDeadBattery(); @@ -53,6 +54,7 @@ void hw_config_init(void) /* Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral */ HAL_SYSCFG_StrobeDBattpinsConfig(SYSCFG_CFGR1_UCPD1_STROBE | SYSCFG_CFGR1_UCPD2_STROBE); #endif /* SYSCFG_CFGR1_UCPD1_STROBE || SYSCFG_CFGR1_UCPD2_STROBE */ +#endif /* !SKIP_DISABLING_UCPD_DEAD_BATTERY */ #if defined(PWR_SVMCR_ASV) HAL_PWREx_EnableVddA();