From f74de6a27aa26035ee5dddd20d0bb1e2dd615520 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Sat, 26 Dec 2020 20:53:04 +0100 Subject: [PATCH] move mqttloop from core0 to core1 --- src/main.cpp | 2 +- src/mqttclient.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b52ce977..b5f69647 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,11 +29,11 @@ Task Core Prio Purpose ------------------------------------------------------------------------------- ledloop 0 3 blinks LEDs spiloop 0 2 reads/writes data on spi interface -mqttloop 0 2 reads/writes data on ETH interface IDLE 0 0 ESP32 arduino scheduler -> runs wifi sniffer lmictask 1 2 MCCI LMiC LORAWAN stack clockloop 1 4 generates realtime telegrams for external clock +mqttloop 1 2 reads/writes data on ETH interface timesync_proc 1 3 processes realtime time sync requests irqhandler 1 2 cyclic tasks (i.e. displayrefresh) triggered by timers gpsloop 1 1 reads data from GPS via serial or i2c diff --git a/src/mqttclient.cpp b/src/mqttclient.cpp index 867f06db..f66456ec 100644 --- a/src/mqttclient.cpp +++ b/src/mqttclient.cpp @@ -37,7 +37,7 @@ esp_err_t mqtt_init(void) { SEND_QUEUE_SIZE * PAYLOAD_BUFFER_SIZE); ESP_LOGI(TAG, "Starting MQTTloop..."); - xTaskCreate(mqtt_client_task, "mqttloop", 4096, (void *)NULL, 1, &mqttTask); + xTaskCreatePinnedToCore(mqtt_client_task, "mqttloop", 4096, (void *)NULL, 1, &mqttTask, 1); return ESP_OK; }