Skip to content

Commit 7e73e0b

Browse files
Can't call get_rand_64 under FreeRTOS (#2004)
Remove the HW random generator call while initting LWIP to avoid the SDK looping forver due to FreeRTOS exception/timer interrupts.
1 parent 91c007e commit 7e73e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/rp2040/lwip_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ extern "C" {
8989
extern void __real_lwip_init();
9090
void __wrap_lwip_init() {
9191
if (!_lwip_rng) {
92-
_lwip_rng = new XoshiroCpp::Xoshiro256PlusPlus(get_rand_64());
92+
_lwip_rng = new XoshiroCpp::Xoshiro256PlusPlus(micros() * rp2040.getCycleCount());
9393
__real_lwip_init();
9494
}
9595
}

0 commit comments

Comments
 (0)