Using two CPU Cores
Posted: Fri Jul 13, 2018 1:50 am
I apologize in advance that I am new to ESP32, and have never used a dual-Core CPU bfore.
I am evaluating the ESP32 for use in a product that needs to do both WiFi mesh (ESP-MESH) and also run very high speed control calculations from Matlab Simulink.
I need around 25 kHz update rate on my Simulink model calculations.
I think the only way to run at 25 kHz, is to have a hardware group timer with an alarm occurring at 25 kHz (every 40 us), and then have ONLY ONE task, that reads a global flag from the timer ISR, and executes the Simulink model code. (If I use more than one task, then the 10 ms RTOS tick means I cannot share information between tasks - the XQueueReceive (for instance) only updates every 10 ms.
This means that I cannot also do WiFi mesh on the same CPU at the same time.
Questions:
1. Is there a way to FORCE a task to run (in my case, every 40 us, when the timer alarm occurs)?
2. Is it possible for me to run my Simulink model on the first CPU Core, and run my WiFi Mesh on the second CPU Core? Are there any issues I should be concerned about if running Mesh on a different Core than my main application?
Thank you!
I am evaluating the ESP32 for use in a product that needs to do both WiFi mesh (ESP-MESH) and also run very high speed control calculations from Matlab Simulink.
I need around 25 kHz update rate on my Simulink model calculations.
I think the only way to run at 25 kHz, is to have a hardware group timer with an alarm occurring at 25 kHz (every 40 us), and then have ONLY ONE task, that reads a global flag from the timer ISR, and executes the Simulink model code. (If I use more than one task, then the 10 ms RTOS tick means I cannot share information between tasks - the XQueueReceive (for instance) only updates every 10 ms.
This means that I cannot also do WiFi mesh on the same CPU at the same time.
Questions:
1. Is there a way to FORCE a task to run (in my case, every 40 us, when the timer alarm occurs)?
2. Is it possible for me to run my Simulink model on the first CPU Core, and run my WiFi Mesh on the second CPU Core? Are there any issues I should be concerned about if running Mesh on a different Core than my main application?
Thank you!