mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
add the STM32 peripheral clock enable and disable
calls to the benchmark program so the benchmark program can use hardware accleration
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user