Skip to content

Commit aa37c03

Browse files
committed
chore: allow to not disable UCPD dead battery
Closes #2576. Signed-off-by: Frederic Pillon <[email protected]>
1 parent ffb23d6 commit aa37c03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: libraries/SrcWrapper/src/stm32/hw_config.c

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ void hw_config_init(void)
4545
{
4646
configIPClock();
4747

48+
#if !defined (SKIP_DISABLING_UCPD_DEAD_BATTERY)
4849
#if defined(PWR_CR3_UCPD_DBDIS) || defined(PWR_UCPDR_UCPD_DBDIS)
4950
/* Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral */
5051
HAL_PWREx_DisableUCPDDeadBattery();
@@ -53,6 +54,7 @@ void hw_config_init(void)
5354
/* Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral */
5455
HAL_SYSCFG_StrobeDBattpinsConfig(SYSCFG_CFGR1_UCPD1_STROBE | SYSCFG_CFGR1_UCPD2_STROBE);
5556
#endif /* SYSCFG_CFGR1_UCPD1_STROBE || SYSCFG_CFGR1_UCPD2_STROBE */
57+
#endif /* !SKIP_DISABLING_UCPD_DEAD_BATTERY */
5658

5759
#if defined(PWR_SVMCR_ASV)
5860
HAL_PWREx_EnableVddA();

0 commit comments

Comments
 (0)