From 805ea267a8515b7ee70125f444763f4aaa95c454 Mon Sep 17 00:00:00 2001 From: onsdagens <112828711+onsdagens@users.noreply.github.com> Date: Sun, 29 Sep 2024 06:21:14 +0200 Subject: Add SYSTIMER based ESP32-C3 monotonic (#972) * add esp32c3 monotonic * fix tests --- examples/esp32c3/README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'examples/esp32c3/README.md') diff --git a/examples/esp32c3/README.md b/examples/esp32c3/README.md index 37d0167..fa382c6 100644 --- a/examples/esp32c3/README.md +++ b/examples/esp32c3/README.md @@ -15,12 +15,24 @@ This crate uses the most convenient option in ``cargo-espflash`` and ``espflash` ## Running the crate +Uncomment the + +```runner = "espflash flash --monitor"``` + +line in ``.cargo/config.toml`` + +and comment out (or remove) + +```runner = "./runner.sh"``` + +Now, running + ```cargo run --example sw_and_hw --features=riscv-esp32c3-backend (--release)``` -should do the trick. +in the root of this crate should do the trick. # Expected behavior -The program +The example ``sw_and_hw`` - Prints ``init`` - Enters a high prio task - During the execution of the high prio task, the button should be non-functional @@ -31,3 +43,9 @@ The program - Exits the low prio task - Prints ``idle`` +The example ``monotonic`` +- Prints ``init`` +- Spawns the ``foo``, ``bar``, ``baz`` tasks (because of hardware interrupt latency dispatch, the order here may vary). +- Each task prints ``hello from $TASK`` on entry +- The tasks wait for 1, 2, 3 seconds respectively +- Once the wait period is over, each task exits printing ``bye from $TASK`` (now in the proper order). -- cgit v1.2.3