Skip to content

Commit

Permalink
chore: allow to not disable UCPD dead battery
Browse files Browse the repository at this point in the history
Closes #2576.

Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Dec 17, 2024
1 parent ffb23d6 commit 2ad9ef8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/SrcWrapper/src/stm32/hw_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 2ad9ef8

Please sign in to comment.