STM32L49x and STM32L4Ax HSI48 support Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Mbroek635
Posts: 3
Joined: Thu Oct 06, 2022 10:21 am
Been thanked: 3 times

STM32L49x and STM32L4Ax HSI48 support  Topic is solved

Postby Mbroek635 » Thu Oct 06, 2022 10:33 am

I have been trying to enable the HSI48 on the STM32L496.
After closer inspection I found that this feature is wrongfully disabled in the stm32_registery in the hal.

According to the datasheet the HSI48 can be enabled
6.2.4 HSI48 clock (only valid for STM32L49x/L4Ax devices)
The HSI48 clock signal is generated from an internal 48 MHz RC oscillator and can be used
directly for USB and for random number generator (RNG) as well as SDMMC.

The line to fix
https://github.com/ChibiOS/ChibiOS/blob ... ry.h#L1416

the patch

Code: Select all

diff --git a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
index 5268ee033..565b56fda 100644
--- a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h
@@ -1413,7 +1413,7 @@
 
 /* RCC attributes.*/
 #define STM32_RCC_HAS_HSI16                 TRUE
-#define STM32_RCC_HAS_HSI48                 FALSE
+#define STM32_RCC_HAS_HSI48                 TRUE
 #define STM32_RCC_HAS_MSI                   TRUE
 #define STM32_RCC_HAS_LSI                   TRUE
 #define STM32_RCC_HAS_LSI_PRESCALER         FALSE


I have been able to get the USB driver working using the HSI48 after applying this patch.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM32L49x and STM32L4Ax HSI48 support

Postby Giovanni » Sun Nov 20, 2022 9:57 am

Hi,

Fixed as bug #1242.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 28 guests