Browse Source

boards/nucleo-l476: enabled hwrng feature

- enabled hwrng feature
- fixed 48MHz clock selection for the STM32L4
pr/rotary
Hauke Petersen 6 years ago
parent
commit
278d39153d
  1. 1
      boards/nucleo-l476/Makefile.features
  2. 3
      cpu/stm32l4/cpu.c

1
boards/nucleo-l476/Makefile.features

@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer

3
cpu/stm32l4/cpu.c

@ -143,6 +143,9 @@ static void cpu_clock_init(void)
while (!(RCC->CSR & RCC_CSR_LSIRDY)) {}
#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 CLOCK_HSE
RCC->CR |= RCC_CR_HSEON;

Loading…
Cancel
Save