1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

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

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)) {