8000 esp32: Pin MicroPython to core 1 again. · micropython/micropython@c20cfb1 · GitHub
[go: up one dir, main page]

Skip to content

Commit c20cfb1

Browse files
committed
esp32: Pin MicroPython to core 1 again.
This follows up on #5489, where we changed the esp32 core pinning to core 0 in order to work around an issue with IDF < 4.2.0. Now that IDF > 4.2.0 is available, we allow pinning back to core 1, which eliminates some problematic callback latency with wifi enabled.
1 parent 9a0bca2 commit c20cfb1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ports/esp32/mphalport.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@
3636
#include "freertos/task.h"
3737

3838
// The core that the MicroPython task(s) are pinned to.
39-
// Until we move to IDF 4.2+, we need NimBLE on core 0, and for synchronisation
40-
// with the ringbuffer and scheduler MP needs to be on the same core.
41-
// See https://github.com/micropython/micropython/issues/5489
39+
// Now that we have IDF 4.2.0+, we are once again able to pin to core 1
40+
// and avoid the Wifi/BLE timing problems on the same core.
41+
// Best effort here to remain backwards compatible in rare version edge cases...
42+
// See https://github.com/micropython/micropython/issues/5489 for history
43+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0)
44+
#define MP_TASK_COREID (1)
45+
#else
4246
#define MP_TASK_COREID (0)
47+
#endif
4348

4449
extern TaskHandle_t mp_main_task_handle;
4550

0 commit comments

Comments
 (0)
0