Stepper motor using freeRTOS task
Posted: Fri Jan 28, 2022 5:14 pm
Hi,
I have to drive a stepper motor with my esp32, with a frequency that requires a delay below milliseconds (for example 100 microseconds). The esp32 has WiFi and ESP-NOW active at the same time, receiving some data from another esp32. My idea was to create a freeRTOS task for the stepper motor on core 0, so that core 1 can run WiFi ESP-NOW, but I have a hard time managing microseconds delay by doing so. I know that the vTaskDelay() cannot go higher than 1kHz.
Any suggestions? Thanks in advance!
I have to drive a stepper motor with my esp32, with a frequency that requires a delay below milliseconds (for example 100 microseconds). The esp32 has WiFi and ESP-NOW active at the same time, receiving some data from another esp32. My idea was to create a freeRTOS task for the stepper motor on core 0, so that core 1 can run WiFi ESP-NOW, but I have a hard time managing microseconds delay by doing so. I know that the vTaskDelay() cannot go higher than 1kHz.
Any suggestions? Thanks in advance!