STM32 TRNG : update init to match all config

pull/14722/head
jeromecoutant 2021-06-01 18:11:24 +02:00
parent 20e4a351f1
commit a4ae9f13a7
1 changed files with 2 additions and 2 deletions

View File

@ -128,8 +128,8 @@ void trng_init(trng_t *obj)
}
/* first random number generated after setting the RNGEN bit should not be used */
if (HAL_RNG_GenerateRandomNumber(&obj->handle, &dummy) != HAL_OK) {
printf("trng_init: HAL_RNG_GenerateRandomNumber error 0x%x\n", obj->handle.ErrorCode); // should not occur
/* could be executed few times in case of long init (obj->handle.ErrorCode can be checked for debug) */
while (HAL_RNG_GenerateRandomNumber(&obj->handle, &dummy) != HAL_OK) {
}
#if defined(CFG_HW_RNG_SEMID)