From 4171fcbb0612aa928f98797e3a982a0921cea35e Mon Sep 17 00:00:00 2001 From: Wu Han Date: Sun, 8 May 2022 11:34:37 +0100 Subject: [PATCH] [bsp][stm32][drv_crypto] Enable RNG Clock --- bsp/stm32/libraries/HAL_Drivers/drv_crypto.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_crypto.c b/bsp/stm32/libraries/HAL_Drivers/drv_crypto.c index 60dce6098f..9738d998a6 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_crypto.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_crypto.c @@ -395,6 +395,7 @@ static rt_err_t _crypto_create(struct rt_hwcrypto_ctx *ctx) #if defined(BSP_USING_RNG) case HWCRYPTO_TYPE_RNG: { + __HAL_RCC_RNG_CLK_ENABLE(); RNG_HandleTypeDef *hrng = rt_calloc(1, sizeof(RNG_HandleTypeDef)); if (RT_NULL == hrng) {