Skip to content

refactor(timer): share async lifecycle and fix WS63 cancellation - #19

Draft
sanchuanhehe wants to merge 2 commits into
fix/irq-signal-rendezvousfrom
refactor/timer-async-lifecycle
Draft

sanchuanhehe wants to merge 2 commits into
fix/irq-signal-rendezvousfrom
refactor/timer-async-lifecycle

Conversation

@sanchuanhehe

@sanchuanhehe sanchuanhehe commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

A cancelled WS63 async delay left its counter/IRQ running, and an empty IRQ could complete a live wait. WS53 and WS63 now use one one-shot lifecycle for arming, Waker registration, completion and cancellation; their PAC/IRQ adapters and ownership entry points remain separate. WS63 also adopts upward rounding, zero/no-arm and bounded long-period chunks. No Embassy queue or second timer owner is introduced.

Two commits: extract and validate the WS53 lifecycle (moving MMIO outside metadata critical sections), then integrate/fix WS63 while preserving public signatures. The former WS53 lifecycle tests move into the shared child-owned suite, with immediate-arm expiry, late-status expiry, channel isolation and callback/IO lock checks added.

Independent development checks: WS63/WS53/BS21 host tests 351/432/220, all three target Clippy checks, formatting and no-Embassy dependency guards pass. WS53 QEMU passes two channels, 16 expiries, four cancellations and six handoff guards. WS63 opt-in fixture fails with baseline da254f8 at cancellation, passes with this change on all three WS63 channels, each followed by five IRQ-driven waits. WS53 SPI/I2C DMA plus timer IRQ regression passes 50/166 scenarios.

No hardware operations. Physical stop/IRQ timing and cross-core ownership remain unqualified; minimal block_on poll-to-WFI and legacy DMA safety are separate outstanding issues. Fixed remote runtime overrides are development integration, not registry release qualification. Stacked on #18; no history rewriting or stable API graduation.

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.

1 participant