We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20e4a35 commit a4ae9f1Copy full SHA for a4ae9f1
targets/TARGET_STM/trng_api.c
@@ -128,8 +128,8 @@ void trng_init(trng_t *obj)
128
}
129
130
/* first random number generated after setting the RNGEN bit should not be used */
131
- if (HAL_RNG_GenerateRandomNumber(&obj->handle, &dummy) != HAL_OK) {
132
- 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) {
133
134
135
#if defined(CFG_HW_RNG_SEMID)
0 commit comments