Protect the HW random generation from FreeRTOS (#1395)
Fixes #1394 The Pico_Rand SDK calls gather bits from the HW ROSC at precise intervals. If there is jitter in the sleep_until() call then the ROSC bit collection will always think it's failed to acquire the right bit and retry infintitely. Avoid by wrapping the HW random number calls and the sleep_until() routine. Only when in FreeRTOS set a flag to silently make sleep_until() into a busy wait loop while in a random number generation step. When not in the random code, do the normal sleep_until call.
Showing
Please register or sign in to comment