Hello,
As an Arduino user I am looking for hopefully definitive answers to these questions regarding dual core usage on ESP32 with Arduino code:
My understanding is that Arduino code runs on Core#1, named APP_CPU. And low-level WIFI operations run on Core#0, named PRO_CPU.
1. Is the above statement correct?
2. If so, do any WIFI operations (ie. interrrupts) also run on Core#1 ?
3. Which core is more free of resources or interrupts in general ?
Core usage with Arduino
Re: Core usage with Arduino
Yes that is correct. What happens is a FreeRTOS task that is pinned to Core 1 is created (called loopTask). The loopTaskperigalacticon wrote:My understanding is that Arduino code runs on Core#1, named APP_CPU. And low-level WIFI operations run on Core#0, named PRO_CPU.
will run setup() once, then run loop() repeatedly (see source code here).
In theory there shouldn't be, as interrupts are allocated to whichever core the allocation API was called from. Since the WiFi tasks runs on Core 0, its corresponding interrupts should also be allocated to Core 0.perigalacticon wrote:2. If so, do any WIFI operations (ie. interrrupts) also run on Core#1 ?
Core 1 is generally more free of resources. The underlying intention is to have Core 0 handle most protocol processing (hence PRO_CPU) and have the application code run mostly on Core 1 (hence APP_CPU). However there might be cases where the application code requires heavy processing whilst there is minimal protocol processing, in which case it would make sense to shift some application processing to Core 0.perigalacticon wrote:3. Which core is more free of resources or interrupts in general ?
Who is online
Users browsing this forum: No registered users and 79 guests