From 2ad9ef81a88bf4e7e7661abee797635bac2501c8 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Tue, 17 Dec 2024 10:06:52 +0100 Subject: [PATCH] chore: allow to not disable UCPD dead battery Closes #2576. Signed-off-by: Frederic Pillon --- libraries/SrcWrapper/src/stm32/hw_config.c | 2 ++ 1 file changed, 2 insertions(+) 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();