drivers: entropy: add support for stm32wl and stm32g0
This commit adds entropy support for stm32wl and stm32g0. Pll is used as clock source and has to be enabled, other clock sources are not supported at the moment. Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
parent
808cc68e4c
commit
a587c25156
1 changed files with 3 additions and 0 deletions
|
@ -382,6 +382,9 @@ static int entropy_stm32_rng_init(const struct device *dev)
|
||||||
* Linear Feedback Shift Register
|
* Linear Feedback Shift Register
|
||||||
*/
|
*/
|
||||||
LL_RCC_SetRNGClockSource(LL_RCC_RNG_CLKSOURCE_PLLSAI1);
|
LL_RCC_SetRNGClockSource(LL_RCC_RNG_CLKSOURCE_PLLSAI1);
|
||||||
|
#elif CONFIG_SOC_SERIES_STM32WLX || CONFIG_SOC_SERIES_STM32G0X
|
||||||
|
LL_RCC_PLL_EnableDomain_RNG();
|
||||||
|
LL_RCC_SetRNGClockSource(LL_RCC_RNG_CLKSOURCE_PLL);
|
||||||
#elif defined(RCC_CR2_HSI48ON) || defined(RCC_CR_HSI48ON) \
|
#elif defined(RCC_CR2_HSI48ON) || defined(RCC_CR_HSI48ON) \
|
||||||
|| defined(RCC_CRRCR_HSI48ON)
|
|| defined(RCC_CRRCR_HSI48ON)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue