Page 1 of 1

What runs on each core? And can you force ethernet callback routines onto core 0?

Posted: Fri Sep 04, 2020 6:24 pm
by scotthauck
Is there any reference to what runs on each of the cores of the ESP32 under a normal arduino application?

Looks like the Arduino setup & loop are on core 1. The Ethernet callback function also seems to end up on core 1 (i.e. I'm using AsyncUDP, and the onPacket routine says it is on core 1). I believe the RF stack is supposed to be on core 0.

I was hoping to toss the callback routine onto core 0, but don't see an obvious mechanism to do it - is there a mechanism? Registering the callback routine via a thread running on core 0 didn't seem to do it.

Yes, my callback routine is fairly efficient, but I'd like to keep core 1 doing just the Arduino "loop" stuff if possible.

Thanks!

Re: What runs on each core? And can you force ethernet callback routines onto core 0?

Posted: Sat Sep 05, 2020 7:42 pm
by lbernstone
https://github.com/espressif/arduino-es ... fig.h#L112
You can grep through the code for xTaskCreate to see which tasks use which core. They are controlled through sdkconfig.h, or you can pass them as -D build parameters.

Re: What runs on each core? And can you force ethernet callback routines onto core 0?

Posted: Sun Sep 06, 2020 7:44 pm
by idahowalker
Use xTaskCreatePinnedToCore(), internet search time. BTW xTaskCreatePinnedToCore works just like xTaskCreate().

Re: What runs on each core? And can you force ethernet callback routines onto core 0?

Posted: Sun Sep 20, 2020 10:20 pm
by mrburnette