Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.2k
Commit9a34859
committed
WIP: rp2: Use the soft timer hardware alarm to wake from lightsleep.
Fixes issue where PICO-W build won't lightsleep() for more than 64ms. Thisis a regression introduced in74fb42a when we switched away from thepico-sdk alarm pool for soft timers and accidentally made soft timer expirya wakeup source.Before74fb42a, both the pico-sdk alarm pool and the lightsleep wakeuptimer uses alarm 3. The lightsleep wakeup would quietly clobber alarm 3'stimeout, meaning softtimer wouldn't wake the chip from lightsleep.After74fb42a, soft timer wakeup happens on timer alarm 2 so this interruptwakes the chip from light sleep. On PICO-W builds this happens every lwIPtick (64ms).The change is to go back to using the same timer alarm for both lightsleepwakeup and soft timer, but now being explicit about lightsleep wakeupclobbering any soft timer wakeup. Also adds a "catch up" call to soft timerhandler as it's currently possible to miss soft timer events after wakingup.This also reverts the changes added in 19844b to enable the timer IRQ onCPU1. This should now be covered by the changes in9db16cf which explicitlytrigger a wakeup event from CPU0 to CPU1 any time the soft timer handlerfires. TBC.This work was funded through GitHub Sponsors.Signed-off-by: Angus Gratton <angus@redyak.com.au>1 parentee8d8b3 commit9a34859
1 file changed
+10
-16
lines changedLines changed: 10 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
199 |
| - | |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 | 199 |
| |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 | 200 |
| |
211 | 201 |
| |
212 | 202 |
| |
| |||
215 | 205 |
| |
216 | 206 |
| |
217 | 207 |
| |
218 |
| - | |
219 |
| - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
220 | 214 |
| |
221 | 215 |
| |
222 | 216 |
| |
| |||
247 | 241 |
| |
248 | 242 |
| |
249 | 243 |
| |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 | 244 |
| |
255 | 245 |
| |
256 | 246 |
| |
| |||
264 | 254 |
| |
265 | 255 |
| |
266 | 256 |
| |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
267 | 261 |
| |
268 | 262 |
| |
269 | 263 |
| |
|
0 commit comments
Comments
(0)