From d3ea903c5506108984998d288e4691c7fee34cf9 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Tue, 4 Sep 2018 16:13:09 -0600 Subject: [PATCH] enable RNG clock when WOLFSSL_STM32F427_RNG is defined --- wolfcrypt/src/random.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 7e9efec2e..cf2f598be 100755 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -1620,6 +1620,9 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) int i; (void)os; + /* enable RNG peripheral clock */ + RCC->AHB2ENR |= RCC_AHB2ENR_RNGEN; + /* enable RNG interrupt, set IE bit in RNG->CR register */ RNG->CR |= RNG_CR_IE;