diff options
| author | Felix Dörre <felix@dogcraft.de> | 2023-02-21 07:11:14 +0000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-09-29 15:15:42 +1000 |
| commit | 3c2b2f7a4d790c66dbe723c5ed59ec18472baa6f (patch) | |
| tree | c78719a9587f4f780f4e23d5318e84de32eaf5ab /extmod/asyncio/task.py | |
| parent | 584c495d3201bbf01190cff673533bc405cee53f (diff) | |
rp2/modmachine: Fix lightsleep while wifi is powered off.
While cyw43 is deinitialized, an interrupt occurs. That is handled with
these lines: ports/rp2/mpnetworkport.c#L59-L61 and as pendsv is disabled
while in network code, the poll function then just waits there.
When deinit has finished, the poll func is executed, but skipped:
src/cyw43_ctrl.c#L222-L225 this skips the `CYW43_POST_POLL_HOOK` which
would re-enable interrupts, but also reset `cyw43_has_pending`.
And in that state, the lightsleep code, will skip sleeping as it thinks
there is a network packet pending to be handled.
With this change applied, lightsleep works as expected when the wifi chip
is enabled, and when it's powered off.
Diffstat (limited to 'extmod/asyncio/task.py')
0 files changed, 0 insertions, 0 deletions
