Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bsp][stm32][drv_crypto] Enable RNG Clock #5911

Merged
merged 1 commit into from
May 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bsp/stm32/libraries/HAL_Drivers/drv_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

估计本来的设计是要求,cubemx里去开的,这样这行代码应该会生成在msp.c文件里。这里加一个也好

Copy link
Member

@mysterywolf mysterywolf May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉tim定时器中断也是,可以直接在驱动里使能HAL
#5808

RNG_HandleTypeDef *hrng = rt_calloc(1, sizeof(RNG_HandleTypeDef));
if (RT_NULL == hrng)
{
Expand Down