merge ofw PR 3933

furi_hal_random: Wait for ready state and no errors before sampling

by n1kolasM

https://github.com/flipperdevices/flipperzero-firmware/pull/3933/files
This commit is contained in:
MX 2024-10-05 04:46:43 +03:00
parent d91e390690
commit 83b0e46ccd
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83

View File

@ -11,7 +11,7 @@
#define TAG "FuriHalRandom"
static uint32_t furi_hal_random_read_rng(void) {
while(LL_RNG_IsActiveFlag_CECS(RNG) && LL_RNG_IsActiveFlag_SECS(RNG) &&
while(LL_RNG_IsActiveFlag_CECS(RNG) || LL_RNG_IsActiveFlag_SECS(RNG) ||
!LL_RNG_IsActiveFlag_DRDY(RNG)) {
/* Error handling as described in RM0434, pg. 582-583 */
if(LL_RNG_IsActiveFlag_CECS(RNG)) {