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:
- The first task, the default Arduino loop() function running on core 1, runs the time-critical stepper control functions.
- The second task, named "inputTask", runs on core 0 a loop to read and handle inputs. This loop is executed every 20ms.
- The third task, named "displayTask" runs also on core 0 a loop to update the display. This loop is executed every 200ms.
Acceptance Criteria
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: