mirror of https://github.com/ARMmbed/mbed-os.git
STM32 TRNG : update init to match all config
parent
20e4a351f1
commit
a4ae9f13a7
|
@ -128,8 +128,8 @@ void trng_init(trng_t *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* first random number generated after setting the RNGEN bit should not be used */
|
/* first random number generated after setting the RNGEN bit should not be used */
|
||||||
if (HAL_RNG_GenerateRandomNumber(&obj->handle, &dummy) != HAL_OK) {
|
/* could be executed few times in case of long init (obj->handle.ErrorCode can be checked for debug) */
|
||||||
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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CFG_HW_RNG_SEMID)
|
#if defined(CFG_HW_RNG_SEMID)
|
||||||
|
|
Loading…
Reference in New Issue