Merge pull request #6821 from haukepetersen/add_stm32l4_hwrng
boards/cpu: added hwrng for nucleo-l476 / stm32l4
This commit is contained in:
commit
cf3cc6e0f8
@ -1,6 +1,7 @@
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_cpuid
|
FEATURES_PROVIDED += periph_cpuid
|
||||||
FEATURES_PROVIDED += periph_gpio
|
FEATURES_PROVIDED += periph_gpio
|
||||||
|
FEATURES_PROVIDED += periph_hwrng
|
||||||
FEATURES_PROVIDED += periph_pwm
|
FEATURES_PROVIDED += periph_pwm
|
||||||
FEATURES_PROVIDED += periph_spi
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
FEATURES_PROVIDED += periph_timer
|
||||||
|
|||||||
@ -143,6 +143,9 @@ static void cpu_clock_init(void)
|
|||||||
while (!(RCC->CSR & RCC_CSR_LSIRDY)) {}
|
while (!(RCC->CSR & RCC_CSR_LSIRDY)) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* select the MSI clock for the 48MHz clock tree (USB, RNG) */
|
||||||
|
RCC->CCIPR = (RCC_CCIPR_CLK48SEL_0 | RCC_CCIPR_CLK48SEL_1);
|
||||||
|
|
||||||
/* if configured: enable the HSE clock */
|
/* if configured: enable the HSE clock */
|
||||||
#if CLOCK_HSE
|
#if CLOCK_HSE
|
||||||
RCC->CR |= RCC_CR_HSEON;
|
RCC->CR |= RCC_CR_HSEON;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user