Commit f305469
WIP: rp2: Make GPIO wakeup from lightsleep consistent.
Before this commit:
- A Pin with an irq() trigger is a wakeup source only when
machine.lightsleep(n) is used with a timeout, and only if an IRQ handler
is set.
After this commit:
- A Pin with an irq() trigger is a wakeup source from both
indefinite machine.lightsleep() and machine.lightsleep(n) with
a timeout.
- A Pin with an irq() trigger is a wakeup source even if no handler
function is set.
Issues at present:
- Waking RP2040 repeatedly from machine.lightsleep() with no timeout and
USB causes the USB connection to misbehave and eventually the CPU hangs.
- This implementation doesn't match the machine.Pin docs re: irq(wake=)
argument. However, I think only cc3200 port has actually implemented
this argument as documented.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <[email protected]>1 parent 76ad700 commit f305469
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| 462 | + | |
461 | 463 | | |
462 | 464 | | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
467 | 469 | | |
468 | | - | |
469 | | - | |
| 470 | + | |
| 471 | + | |
470 | 472 | | |
| 473 | + | |
| 474 | + | |
471 | 475 | | |
472 | 476 | | |
473 | 477 | | |
| |||
0 commit comments