mirror of https://github.com/wolfSSL/wolfssl.git
add the STM32 peripheral clock enable and disable
calls to the benchmark program so the benchmark program can use hardware acclerationpull/6289/head
parent
d9d9c5cd3d
commit
fbadcf67da
|
@ -2941,6 +2941,11 @@ int benchmark_init(void)
|
|||
|
||||
benchmark_static_init(0);
|
||||
|
||||
#ifdef WOLFSSL_STM32_CUBEMX
|
||||
/* enable the peripheral clock */
|
||||
__HAL_RCC_CRYP_CLK_ENABLE();
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_STATIC_MEMORY
|
||||
ret = wc_LoadStaticMemory(&HEAP_HINT, gBenchMemory,
|
||||
sizeof(gBenchMemory), WOLFMEM_GENERAL, 1);
|
||||
|
@ -3049,6 +3054,11 @@ int benchmark_free(void)
|
|||
printf("%serror %d with wolfCrypt_Cleanup\n", err_prefix, ret);
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_STM32_CUBEMX
|
||||
/* disable the peripheral clock */
|
||||
__HAL_RCC_CRYP_CLK_DISABLE();
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue