Merge pull request #6821 from haukepetersen/add_stm32l4_hwrng

boards/cpu: added hwrng for nucleo-l476 / stm32l4
pr/rotary
Hauke Petersen 6 years ago committed by GitHub
commit cf3cc6e0f8

@ -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

@ -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;

@ -31,7 +31,7 @@ int main(void)
uint8_t buf[LIMIT];
puts("\nHWRNG peripheral driver test\n");
printf("This test will print from 1 to %i random bytes about every"
printf("This test will print from 1 to %i random bytes about every "
"second\n\n", LIMIT);
puts("Initializing the HWRNG driver.\n");

Loading…
Cancel
Save