Skip to content

Check multitasking on ESP32 #13

Description

@stueble

Acceptance Criteria

  • Run two tasks in parallel, i.e., on two cores, on ESP32
    • One task to control the stepper motor
    • One task to handle the user interface
  • Prevent that watchdog has to be disabled

Results

Running the stepper motor control on core 0 does not work very well, since the timing constrains result in the watchdog resetting the task. However, running the stepper loop in core 1 and the UI in core 0 worked very well. Therefore, I choose the following design including three tasks:

  1. The first task, the default Arduino loop() function running on core 1, runs the time-critical stepper control functions.
  2. The second task, named "inputTask", runs on core 0 a loop to read and handle inputs. This loop is executed every 20ms.
  3. The third task, named "displayTask" runs also on core 0 a loop to update the display. This loop is executed every 200ms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    user storyA feature description from a users perspective

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions