diff --git a/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/halconf.h b/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/halconf.h index 378175d7a..7f0d25903 100644 --- a/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/halconf.h +++ b/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/halconf.h @@ -170,7 +170,7 @@ * @brief Enables the TRNG subsystem. */ #if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) -#define HAL_USE_TRNG TRUE +#define HAL_USE_TRNG FALSE #endif /** diff --git a/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/mcuconf.h b/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/mcuconf.h index a5d509955..666714135 100644 --- a/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/mcuconf.h +++ b/demos/STM32/RT-STM32H743I-NUCLEO144/cfg/mcuconf.h @@ -404,7 +404,7 @@ /* * TRNG driver system settings. */ -#define STM32_TRNG_USE_RNG1 TRUE +#define STM32_TRNG_USE_RNG1 FALSE /* * UART driver system settings. diff --git a/os/hal/ports/STM32/STM32L0xx/hal_lld.h b/os/hal/ports/STM32/STM32L0xx/hal_lld.h index b685a6aba..0aab281d2 100644 --- a/os/hal/ports/STM32/STM32L0xx/hal_lld.h +++ b/os/hal/ports/STM32/STM32L0xx/hal_lld.h @@ -1155,7 +1155,7 @@ #endif /** - * @brief USB/RNG frequency. + * @brief USB clock point. */ #if (STM32_HSI48SEL == STM32_HSI48SEL_HSI48) || defined(__DOXYGEN__) #define STM32_USBCLK STM32_HSI48CLK @@ -1165,6 +1165,11 @@ #error "invalid STM32_HSI48SEL value specified" #endif +/** + * @brief RNG clock point. + */ +#define STM32_RNGCLK STM32_USBCLK + /** * @brief Timers LPTIM1, TIM2, TIM6 clock. */ diff --git a/os/hal/ports/STM32/STM32L0xx/platform.mk b/os/hal/ports/STM32/STM32L0xx/platform.mk index 41c606479..208d41014 100644 --- a/os/hal/ports/STM32/STM32L0xx/platform.mk +++ b/os/hal/ports/STM32/STM32L0xx/platform.mk @@ -32,6 +32,7 @@ include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/GPIOv2/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/I2Cv2/driver.mk +include $(CHIBIOS)/os/hal/ports/STM32/LLD/RNGv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/RTCv2/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/SPIv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/TIMv1/driver.mk diff --git a/os/hal/ports/STM32/STM32L0xx/stm32_rcc.h b/os/hal/ports/STM32/STM32L0xx/stm32_rcc.h index b8f2b6d7e..696ae64cf 100644 --- a/os/hal/ports/STM32/STM32L0xx/stm32_rcc.h +++ b/os/hal/ports/STM32/STM32L0xx/stm32_rcc.h @@ -410,6 +410,34 @@ #define rccResetI2C3() rccResetAPB1(RCC_APB1RSTR_I2C3RST) /** @} */ +/** + * @name RNG peripherals specific RCC operations + * @{ + */ +/** + * @brief Enables the RNG peripheral clock. + * + * @param[in] lp low power enable flag + * + * @api + */ +#define rccEnableRNG(lp) rccEnableAHB(RCC_AHBENR_RNGEN, lp) + +/** + * @brief Disables the RNG peripheral clock. + * + * @api + */ +#define rccDisableRNG() rccDisableAHB(RCC_AHBENR_RNGEN) + +/** + * @brief Resets the RNG peripheral. + * + * @api + */ +#define rccResetRNG() rccResetAHB(RCC_AHBRSTR_RNGRST) +/** @} */ + /** * @name SPI peripherals specific RCC operations * @{ diff --git a/readme.txt b/readme.txt index 1691b6f6c..598dae3a2 100644 --- a/readme.txt +++ b/readme.txt @@ -74,7 +74,8 @@ ***************************************************************************** *** Next *** -- HAL: TRNG support added to STM32F7xx, STM32G0xx, STM32G4xx and STM32H7xx. +- HAL: TRNG support added to STM32F7xx, STM32G0xx, STM32G4xx, STM32H7xx + and STM32L0xx. - NEW: Added support for .cc files extensions in makefiles. - HAL: New RTCv3 driver for STM32G0xx and STM32G4xx. - HAL: Added support for DAC3 and DAC4 in STM32 DACv1 driver.