Skip to content

Commit 4a611a8

Browse files
committed
esp32/main: Pin the uPy task to core 0.
Even though we run in single-core mode we pin to core 0 to be on the safe side. The ESP IDF points out some pitfalls using multi-core configuration and suggests to pin tasks to a certain core if those tasks are responsible for setting up interrupt handlers.
1 parent 4016d0d commit 4a611a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

esp32/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void mp_task(void *pvParameter) {
9696
void app_main(void) {
9797
nvs_flash_init();
9898
// TODO use xTaskCreateStatic (needs custom FreeRTOSConfig.h)
99-
xTaskCreate(mp_task, "mp_task", MP_TASK_STACK_LEN, NULL, MP_TASK_PRIORITY, NULL);
99+
xTaskCreatePinnedToCore(mp_task, "mp_task", MP_TASK_STACK_LEN, NULL, MP_TASK_PRIORITY, NULL, 0);
100100
//xTaskCreateStatic(mp_task, "mp_task", MP_TASK_STACK_LEN, NULL, MP_TASK_PRIORITY, &mp_task_stack[0], &mp_task_tcb);
101101
}
102102

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy