Skip to content

Commit

Permalink
STM32 TRNG : update init to match all config
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromecoutant committed Jun 1, 2021
1 parent 8b8825e commit a5ce12f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/TARGET_STM/trng_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
while (HAL_RNG_GenerateRandomNumber(&obj->handle, &dummy) != HAL_OK) {
// printf("trng_init: HAL_RNG_GenerateRandomNumber error 0x%x\n", obj->handle.ErrorCode);
}

#if defined(CFG_HW_RNG_SEMID)
Expand Down

0 comments on commit a5ce12f

Please sign in to comment.