ext: hal: stm32cube: fix stm32l4xx VDDUSB supply control

The STM32L4x2 SoCs need to control the isolation of the USB features
from VDDUSB. This is done through the PWR_CR2 bit USV. The STM32L4 HAL
in stm32l4xx_ll_pwr.h wrongly checks for the PWR_CR2_PVME1 bit, which
is only available on Cat. 3 devices. Replace the check by PWR_CR2_USV
like it is already done in stm32l4xx_hal_pwr_ex.c.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Aurelien Jarno 2018-05-23 21:36:07 +02:00 committed by Kumar Gala
parent 509e6964cc
commit b66ecc5765
2 changed files with 9 additions and 1 deletions

View file

@ -47,3 +47,11 @@ Patch List:
Impacted files:
drivers/include/stm32l4xx_ll_spi.h
ST Bug tracker ID: 13359
* The STM32L4x2 SoCs need to control the isolation of the USB features
from VDDUSB. This is done through the PWR_CR2 bit USV. The STM32L4 HAL
in stm32l4xx_ll_pwr.h wrongly checks for the PWR_CR2_PVME1 bit, which
is only available on Cat. 3 devices. Replace the check by PWR_CR2_USV.
Impacted files:
ext/hal/st/stm32cube/stm32l4xx/drivers/include/stm32l4xx_ll_pwr.h
ST Bug tracker ID: 47844

View file

@ -514,7 +514,7 @@ __STATIC_INLINE uint32_t LL_PWR_IsEnabledDSIPinsPDActivation(void)
}
#endif /* PWR_CR3_DSIPDEN */
#if defined(PWR_CR2_PVME1)
#if defined(PWR_CR2_USV)
/**
* @brief Enable VDDUSB supply
* @rmtoll CR2 USV LL_PWR_EnableVddUSB