Replies: 1 comment
-
Using two cores simultaneously is feasible if you need precise and consistent timing for your ADC reads (2kHz and above). However, ESP32 has limited RAM, so careful planning is required to avoid memory bottlenecks. The FreeRTOS task should be set to a high priority to maintain the required 2kHz sampling rate, especially if other tasks are running concurrently. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using MicroPython on an ESP32 with a Microdot server and an asynchronous MQTT client. Additionally, I have several peripheral asyncio tasks that communicate over I2C and SPI with external port expanders and ADCs. Currently, my ADC reading frequency is set to 10Hz, and everything is handled within MicroPython. However, a new application requires ADC readings at frequencies above 2kHz, which, based on my experience, could be challenging to achieve with MicroPython alone.
Would it be possible (and advisbale) to use the second core of the ESP32 with an RTOS task to handle the ADC readouts?
Furthermore, is it possible (and advisbale) to allocate a portion of the RAM for RTOS to write data while MicroPython reads from it?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions