Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
runtime: allow interrupts to wake the scheduler #1214
Comments
- Fix UART & putChar - Timer-based sleep - Enable systick in abort - Buffered, interrupt-based UART TX - Use the new interrupt API and fix sleepTicks - Make pins behave more like other boards - Use the MCU's UART numbering - Allow interrupts to wake the scheduler (tinygo-org#1214)
I updated #863 with support for this |
- Fix UART & putChar - Timer-based sleep - Enable systick in abort - Buffered, interrupt-based UART TX - Use the new interrupt API and fix sleepTicks - Make pins behave more like other boards - Use the MCU's UART numbering - Allow interrupts to wake the scheduler (tinygo-org#1214)
- Fix UART & putChar - Timer-based sleep - Enable systick in abort - Buffered, interrupt-based UART TX - Use the new interrupt API and fix sleepTicks - Make pins behave more like other boards - Use the MCU's UART numbering - Allow interrupts to wake the scheduler (#1214)
In order for interrupt-based wake-ups (as introduced by #1142) to work concurrently with
time.Sleep
, we need to make some per-board changes.Previously,
sleepTicks
(the function used as an interface between the scheduler and the hardware timer) was defined to block until the timer completed, since there was nothing else to do. Now we need to change this so that it bails out when an interrupt wakes the chip. I started with the 2 main chip types I have (atsamd21
andatsamd51
). This change is trivial, but requires testing on all supported platforms.My
atsamd51
fix can be used as a reference for how this works: https://github.com/tinygo-org/tinygo/pull/1197/filesIf you want to try to port over the fix to a board class, comment on this thread to claim it so we don't duplicate work.
Platforms: