Fixed Bug #761.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9665 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
72874ecdfd
commit
7af76933f7
|
@ -88,8 +88,7 @@ static void hal_lld_backup_domain_init(void) {
|
||||||
*/
|
*/
|
||||||
void hal_lld_init(void) {
|
void hal_lld_init(void) {
|
||||||
|
|
||||||
/* Reset of all peripherals. AHB3 is not reseted because it could have
|
/* Reset of all peripherals.*/
|
||||||
been initialized in the board initialization file (board.c).*/
|
|
||||||
rccResetAHB1(~0);
|
rccResetAHB1(~0);
|
||||||
rccResetAHB2(~0);
|
rccResetAHB2(~0);
|
||||||
rccResetAHB3(~0);
|
rccResetAHB3(~0);
|
||||||
|
@ -109,15 +108,20 @@ void hal_lld_init(void) {
|
||||||
|
|
||||||
/* Programmable voltage detector enable.*/
|
/* Programmable voltage detector enable.*/
|
||||||
#if STM32_PVD_ENABLE
|
#if STM32_PVD_ENABLE
|
||||||
PWR->CR1 |= PWR_CR1_PVDE | (STM32_PLS & STM32_PLS_MASK);
|
PWR->CR2 = PWR_CR2_PVDE | (STM32_PLS & STM32_PLS_MASK);
|
||||||
#endif /* STM32_PVD_ENABLE */
|
|
||||||
|
|
||||||
/* Validating USB VDD.*/
|
|
||||||
#if HAL_USE_USB
|
|
||||||
PWR->CR2 = PWR_CR2_USV;
|
|
||||||
#else
|
#else
|
||||||
PWR->CR2 = 0;
|
PWR->CR2 = 0;
|
||||||
#endif /* STM32_PVD_ENABLE */
|
#endif /* STM32_PVD_ENABLE */
|
||||||
|
|
||||||
|
/* Enabling independent VDDUSB.*/
|
||||||
|
#if HAL_USE_USB
|
||||||
|
PWR->CR2 |= PWR_CR2_USV;
|
||||||
|
#endif /* HAL_USE_USB */
|
||||||
|
|
||||||
|
/* Enabling independent VDDIO2 required by GPIOG.*/
|
||||||
|
#if STM32_HAS_GPIOG
|
||||||
|
PWR->CR2 |= PWR_CR2_IOSV;
|
||||||
|
#endif /* STM32_HAS_GPIOG */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -198,7 +202,7 @@ void stm32_clock_init(void) {
|
||||||
RCC->CR |= RCC_CR_MSIPLLEN;
|
RCC->CR |= RCC_CR_MSIPLLEN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note that MSI range is the MSISRANGE by default which is 4M.*/
|
/* Changing MSIRANGE value. Meanwhile range is set by MSISRANGE which is 4MHz.*/
|
||||||
RCC->CR |= STM32_MSIRANGE;
|
RCC->CR |= STM32_MSIRANGE;
|
||||||
|
|
||||||
/* Switching from MSISRANGE to MSIRANGE.*/
|
/* Switching from MSISRANGE to MSIRANGE.*/
|
||||||
|
|
|
@ -120,6 +120,8 @@
|
||||||
- RT: Merged RT4.
|
- RT: Merged RT4.
|
||||||
- NIL: Merged NIL2.
|
- NIL: Merged NIL2.
|
||||||
- NIL: Added STM32F7 demo.
|
- NIL: Added STM32F7 demo.
|
||||||
|
- HAL: Fixed wrong PWR configurations in STM32L4xx\hal_lld (bug #761)
|
||||||
|
(backported to 16.1.5).
|
||||||
- HAL: Fixed wrong comment in STM32L4xx\hal_lld (bug #760)
|
- HAL: Fixed wrong comment in STM32L4xx\hal_lld (bug #760)
|
||||||
(backported to 16.1.5).
|
(backported to 16.1.5).
|
||||||
- HAL: Fixed wrong MSIRANGE management for STM32L4xx in function
|
- HAL: Fixed wrong MSIRANGE management for STM32L4xx in function
|
||||||
|
|
Loading…
Reference in New Issue