From 2db79c1eb984a30822c50de60e028a1a685abc8f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 22 Jul 2020 09:17:30 +0000 Subject: [PATCH] Fixed bug #1114. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_20.3.x@13771 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/STM32H7xx/hal_lld.c | 12 ++++++++++-- readme.txt | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/os/hal/ports/STM32/STM32H7xx/hal_lld.c b/os/hal/ports/STM32/STM32H7xx/hal_lld.c index d40f21f4d..364786ae4 100644 --- a/os/hal/ports/STM32/STM32H7xx/hal_lld.c +++ b/os/hal/ports/STM32/STM32H7xx/hal_lld.c @@ -276,14 +276,22 @@ void stm32_clock_init(void) { #endif while ((RCC->CR & RCC_CR_HSERDY) == 0) ; /* Waits until HSE is stable. */ -#endif +#endif /* STM32_HSE_ENABLED == TRUE */ + + /* HSI48 activation.*/ +#if STM32_HSI48_ENABLED == TRUE + RCC->CR |= RCC_CR_HSI48ON; + while ((RCC->CR & RCC_CR_HSI48RDY) == 0) + ; /* Waits until HSI48 is stable. */ + +#endif /* STM32_HSI48_ENABLED == TRUE */ /* CSI activation.*/ #if STM32_CSI_ENABLED == TRUE RCC->CR |= RCC_CR_CSION; while ((RCC->CR & RCC_CR_CSIRDY) == 0) ; /* Waits until CSI is stable. */ -#endif /* STM32_HSE_ENABLED == TRUE */ +#endif /* STM32_CSI_ENABLED == TRUE */ /* LSI activation.*/ #if STM32_LSI_ENABLED == TRUE diff --git a/readme.txt b/readme.txt index 8d147d3b3..eef4dd241 100644 --- a/readme.txt +++ b/readme.txt @@ -78,6 +78,7 @@ - NEW: Added a new setting to STM32 USBv1 allowing for some clock deviation from 48MHz. Renamed setting USB_HOST_WAKEUP_DURATION to STM32_USB_HOST_WAKEUP_DURATION for consistency. +- FIX: Fixed HSI48 not getting enabled on STM32H7 (bug #1114). - FIX: Fixed wrong sector count in EFL driver for L4+ dual bank configuration (bug #1112). - FIX: Fixed wrong preprocessor checks in STM32 TIMv1 ICU driver (bug #1111).