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

scotthauck
Posts: 20
Joined: Fri Jul 26, 2019 5:50 pm

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

Postby scotthauck » Fri Sep 04, 2020 6:24 pm

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!

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » Sat Sep 05, 2020 7:42 pm

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.

idahowalker
Posts: 166
Joined: Wed Aug 01, 2018 12:06 pm

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

Postby idahowalker » Sun Sep 06, 2020 7:44 pm

Use xTaskCreatePinnedToCore(), internet search time. BTW xTaskCreatePinnedToCore works just like xTaskCreate().


Who is online

Users browsing this forum: No registered users and 79 guests