Marvee Amasi
DIIDevHeads IoT Integration Server
•Created by Marvee Amasi on 4/29/2024 in #middleware-and-os
How can I run independent tasks on separate cores using ESP-IDF on ESP32?
Hey @Middleware & OS coding gurus 👩💻, There is this thing I want to fully understand.
I'm working with ESP-IDF on an ESP32 and trying to run two independent tasks simultaneously on separate cores. Look how I did it using 👇👇:
The expected behavior is for both LEDs to be constantly lit. However, they are flickering, I think the tasks are running one core at a time. Adding in both tasks resolves the issue.
But my question is:
- Why are the LEDs flickering even though the tasks are assigned to separate cores and should be running concurrently?
- Why is the delay necessary if both cores are supposedly operating independently?
I understand that the delay allows for context switching between tasks, but shouldn't that be handled by the FreeRTOS scheduler with two cores available?
10 replies