Skip to content

Conversation

@earlephilhower
Copy link
Owner

The divider is a shared HW resource, and when an IRQ comes in (i.e. when a packet is processed by LWIP and the user's callbacks) its state can be corrupted silently and randomly.

Change the Pico-SDK defaults to disable IRQs during division operations, avoiding the issue by disallowing the LWIP callback to happen until after division is completed.

Fixes #3212

The divider is a shared HW resource, and when an IRQ comes in (i.e.
when a packet is processed by LWIP and the user's callbacks) its state can
be corrupted silently and randomly.

Change the Pico-SDK defaults to disable IRQs during division operations,
avoiding the issue by disallowing the LWIP callback to happen until after
division is completed.

Fixes #3212
@yohine
Copy link

yohine commented Nov 27, 2025

I found the real cause. The 64-bit timer loop is unrelated to the WiFi library. There is nothing wrong with Arduino library and SDK. The WiFi reconnection issue is resolved in #3212.

Sorry, I made it extra work for you here.

@yohine
Copy link

yohine commented Nov 29, 2025

I'm currently running stability tests on my environment, applying 5.4.3 and update #3250. Operation under the same conditions as the previous task appears to be fine for now. It's too early to draw any conclusions about long-term stability, but I'll report any issues later.

I also performed another test: the stability of the WiFi library in an RP2040 multi-core environment.

In projects of a complexity involving SPI and I2C access, multi-core and WiFi are extremely unstable, even without an OS. I have not been able to get WiFi to work on multi-core with update #3250.

However, even if it can't be resolved, it's not a problem. When I started my project, the library was still version 5.2.0 or earlier, and even WiFi.beginNoBlock would block for several seconds. Therefore, I considered separating WiFi initialization on multi-core to avoid blocking the main task.

The blocking issue was resolved with an update to #3157 CYW43shim.cpp, and now begin itself does not block. Therefore, multi-core operation is no longer required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants