整理任务使用的cpu
新增配置: CONFIG_TQ_NETWORK_TASK_CORE=0 CONFIG_TQ_LOCAL_TASK_CORE=1 网络类任务默认固定到 Core 0: cp_ws_wait cp_wifi_state cp_fortune mm_autostart mm_watchdog mm_ws_ordered mm_ws_stop lan_http 本地类任务默认固定到 Core 1: cp_model_cmd cp_direction cp_lcd_render cp_task_monitor cp_system_event cp_key_input factory_cli mm_local_evt 已有音频任务保持现有配置: CONFIG_MULTIMODAL_AUDIO_TASK_CORE=1
This commit is contained in:
@@ -47,6 +47,16 @@
|
||||
#define CONTROL_PLANE_IDLE_TRANSPORT_SHUTDOWN_MS 30000
|
||||
#define CONTROL_PLANE_WATCHDOG_TASK_STACK_SIZE 6144
|
||||
|
||||
#ifndef CONFIG_TQ_NETWORK_TASK_CORE
|
||||
#define CONFIG_TQ_NETWORK_TASK_CORE 0
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_NETWORK_TASK_CORE < 0
|
||||
#define CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE)
|
||||
#endif
|
||||
|
||||
static const char *TAG = "control_plane_mm_rt";
|
||||
static TaskHandle_t s_multimodal_watchdog_task;
|
||||
static TaskHandle_t s_multimodal_autostart_task;
|
||||
@@ -434,12 +444,13 @@ static void schedule_autostart_if_enabled(void)
|
||||
}
|
||||
|
||||
set_multimodal_stop_flag(&s_multimodal_autostart_stop_requested, false);
|
||||
if (xTaskCreate(multimodal_autostart_task,
|
||||
"mm_autostart",
|
||||
6144,
|
||||
NULL,
|
||||
4,
|
||||
&s_multimodal_autostart_task) != pdPASS) {
|
||||
if (xTaskCreatePinnedToCore(multimodal_autostart_task,
|
||||
"mm_autostart",
|
||||
6144,
|
||||
NULL,
|
||||
4,
|
||||
&s_multimodal_autostart_task,
|
||||
CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE) != pdPASS) {
|
||||
set_multimodal_task_handle(&s_multimodal_autostart_task, NULL);
|
||||
set_multimodal_start_flag(&s_multimodal_autostart_task_starting, false);
|
||||
ESP_LOGW(TAG, "Auto Start task create failed");
|
||||
@@ -646,12 +657,13 @@ esp_err_t control_plane_start_multimodal_client(void)
|
||||
try_begin_multimodal_task_start(&s_multimodal_watchdog_task,
|
||||
&s_multimodal_watchdog_task_starting)) {
|
||||
set_multimodal_stop_flag(&s_multimodal_watchdog_stop_requested, false);
|
||||
if (xTaskCreate(multimodal_watchdog_task,
|
||||
"mm_watchdog",
|
||||
CONTROL_PLANE_WATCHDOG_TASK_STACK_SIZE,
|
||||
NULL,
|
||||
4,
|
||||
&s_multimodal_watchdog_task) != pdPASS) {
|
||||
if (xTaskCreatePinnedToCore(multimodal_watchdog_task,
|
||||
"mm_watchdog",
|
||||
CONTROL_PLANE_WATCHDOG_TASK_STACK_SIZE,
|
||||
NULL,
|
||||
4,
|
||||
&s_multimodal_watchdog_task,
|
||||
CONTROL_PLANE_MULTIMODAL_NETWORK_TASK_CORE) != pdPASS) {
|
||||
ESP_LOGE(TAG, "Watchdog task create failed");
|
||||
set_multimodal_task_handle(&s_multimodal_watchdog_task, NULL);
|
||||
set_multimodal_start_flag(&s_multimodal_watchdog_task_starting, false);
|
||||
|
||||
@@ -84,6 +84,16 @@
|
||||
#define CONTROL_PLANE_LOCAL_RESPONDING_EVENT_QUEUE_LEN 4U
|
||||
#define CONTROL_PLANE_MULTIMODAL_BINARY_SUMMARY_INTERVAL 200U
|
||||
|
||||
#ifndef CONFIG_TQ_LOCAL_TASK_CORE
|
||||
#define CONFIG_TQ_LOCAL_TASK_CORE 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_LOCAL_TASK_CORE < 0
|
||||
#define CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE)
|
||||
#endif
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 ) && \
|
||||
((defined(CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) && CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) || \
|
||||
defined(CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY))
|
||||
@@ -210,7 +220,7 @@ static BaseType_t create_local_responding_event_task(TaskHandle_t *out_handle)
|
||||
NULL,
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY,
|
||||
out_handle,
|
||||
tskNO_AFFINITY,
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE,
|
||||
MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
|
||||
if (created == pdPASS) {
|
||||
return pdPASS;
|
||||
@@ -223,15 +233,16 @@ static BaseType_t create_local_responding_event_task(TaskHandle_t *out_handle)
|
||||
NULL,
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY,
|
||||
out_handle,
|
||||
tskNO_AFFINITY,
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE,
|
||||
MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
#else
|
||||
return xTaskCreate(local_responding_event_worker,
|
||||
"mm_local_evt",
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_STACK_BYTES,
|
||||
NULL,
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY,
|
||||
out_handle);
|
||||
return xTaskCreatePinnedToCore(local_responding_event_worker,
|
||||
"mm_local_evt",
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_STACK_BYTES,
|
||||
NULL,
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_EVENT_TASK_PRIORITY,
|
||||
out_handle,
|
||||
CONTROL_PLANE_LOCAL_RESPONDING_TASK_CORE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,16 @@
|
||||
#define FACTORY_CLI_START_WAIT_STEP_MS 20
|
||||
#define FACTORY_CLI_START_GATE_WAIT_MS 5000
|
||||
|
||||
#ifndef CONFIG_TQ_LOCAL_TASK_CORE
|
||||
#define CONFIG_TQ_LOCAL_TASK_CORE 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_LOCAL_TASK_CORE < 0
|
||||
#define FACTORY_CLI_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define FACTORY_CLI_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE)
|
||||
#endif
|
||||
|
||||
static const char *TAG = "cp_factory_cli";
|
||||
|
||||
static TaskHandle_t s_worker_task;
|
||||
@@ -496,12 +506,13 @@ esp_err_t control_plane_factory_cli_start(void)
|
||||
}
|
||||
|
||||
TaskHandle_t worker_task = NULL;
|
||||
BaseType_t ok = xTaskCreate(factory_cli_worker_entry,
|
||||
"factory_cli",
|
||||
FACTORY_CLI_WORKER_STACK_BYTES,
|
||||
NULL,
|
||||
FACTORY_CLI_WORKER_PRIORITY,
|
||||
&worker_task);
|
||||
BaseType_t ok = xTaskCreatePinnedToCore(factory_cli_worker_entry,
|
||||
"factory_cli",
|
||||
FACTORY_CLI_WORKER_STACK_BYTES,
|
||||
NULL,
|
||||
FACTORY_CLI_WORKER_PRIORITY,
|
||||
&worker_task,
|
||||
FACTORY_CLI_TASK_CORE);
|
||||
if (ok != pdPASS) {
|
||||
factory_cli_finish_start(NULL);
|
||||
ESP_LOGE(TAG, "Failed to start factory CLI worker");
|
||||
|
||||
@@ -48,6 +48,16 @@
|
||||
#define CONFIG_TQ_KEY_INPUT_POLL_MS 20
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TQ_LOCAL_TASK_CORE
|
||||
#define CONFIG_TQ_LOCAL_TASK_CORE 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_LOCAL_TASK_CORE < 0
|
||||
#define CONTROL_PLANE_KEY_INPUT_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define CONTROL_PLANE_KEY_INPUT_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_MULTIMODAL_PTT_BUTTON_PULLDOWN
|
||||
#define CONFIG_MULTIMODAL_PTT_BUTTON_PULLDOWN 0
|
||||
#endif
|
||||
@@ -464,12 +474,13 @@ esp_err_t control_plane_start_key_input_task(void)
|
||||
}
|
||||
|
||||
s_stop_requested = false;
|
||||
BaseType_t created = xTaskCreate(control_plane_key_input_task,
|
||||
"cp_key_input",
|
||||
CONFIG_TQ_KEY_INPUT_TASK_STACK,
|
||||
NULL,
|
||||
5,
|
||||
&s_key_input_task);
|
||||
BaseType_t created = xTaskCreatePinnedToCore(control_plane_key_input_task,
|
||||
"cp_key_input",
|
||||
CONFIG_TQ_KEY_INPUT_TASK_STACK,
|
||||
NULL,
|
||||
5,
|
||||
&s_key_input_task,
|
||||
CONTROL_PLANE_KEY_INPUT_TASK_CORE);
|
||||
if (created != pdPASS) {
|
||||
s_key_input_task = NULL;
|
||||
return ESP_ERR_NO_MEM;
|
||||
|
||||
@@ -74,6 +74,26 @@
|
||||
#define CONFIG_TQ_TASK_MONITOR_MAX_TASKS 64
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TQ_NETWORK_TASK_CORE
|
||||
#define CONFIG_TQ_NETWORK_TASK_CORE 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TQ_LOCAL_TASK_CORE
|
||||
#define CONFIG_TQ_LOCAL_TASK_CORE 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_NETWORK_TASK_CORE < 0
|
||||
#define CONTROL_PLANE_NETWORK_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define CONTROL_PLANE_NETWORK_TASK_CORE ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE)
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_LOCAL_TASK_CORE < 0
|
||||
#define CONTROL_PLANE_LOCAL_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define CONTROL_PLANE_LOCAL_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_FORTUNE_SNTP_SERVER
|
||||
#define CONFIG_FORTUNE_SNTP_SERVER "ntp.aliyun.com"
|
||||
#endif
|
||||
@@ -358,6 +378,7 @@ static esp_err_t control_plane_create_task(TaskFunction_t task,
|
||||
const char *name,
|
||||
uint32_t stack_size,
|
||||
UBaseType_t priority,
|
||||
BaseType_t core_id,
|
||||
TaskHandle_t *out_handle)
|
||||
{
|
||||
if (task == NULL || out_handle == NULL) {
|
||||
@@ -372,7 +393,13 @@ static esp_err_t control_plane_create_task(TaskFunction_t task,
|
||||
ctx->task_with_caps = false;
|
||||
|
||||
TaskHandle_t task_handle = NULL;
|
||||
if (xTaskCreate(control_plane_task_start_gate, name, stack_size, ctx, priority, &task_handle) != pdPASS) {
|
||||
if (xTaskCreatePinnedToCore(control_plane_task_start_gate,
|
||||
name,
|
||||
stack_size,
|
||||
ctx,
|
||||
priority,
|
||||
&task_handle,
|
||||
core_id) != pdPASS) {
|
||||
free(ctx);
|
||||
ESP_LOGE(TAG, "Task create failed: %s", name);
|
||||
return ESP_ERR_NO_MEM;
|
||||
@@ -387,6 +414,7 @@ static esp_err_t control_plane_create_task_psram_first(TaskFunction_t task,
|
||||
const char *name,
|
||||
uint32_t stack_size,
|
||||
UBaseType_t priority,
|
||||
BaseType_t core_id,
|
||||
TaskHandle_t *out_handle)
|
||||
{
|
||||
if (task == NULL || out_handle == NULL) {
|
||||
@@ -408,7 +436,7 @@ static esp_err_t control_plane_create_task_psram_first(TaskFunction_t task,
|
||||
ctx,
|
||||
priority,
|
||||
&task_handle,
|
||||
tskNO_AFFINITY,
|
||||
core_id,
|
||||
MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
|
||||
if (created != pdPASS) {
|
||||
ESP_LOGW(TAG, "Task create with PSRAM stack failed: %s, fallback to internal stack", name);
|
||||
@@ -418,17 +446,18 @@ static esp_err_t control_plane_create_task_psram_first(TaskFunction_t task,
|
||||
ctx,
|
||||
priority,
|
||||
&task_handle,
|
||||
tskNO_AFFINITY,
|
||||
core_id,
|
||||
MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
}
|
||||
#else
|
||||
ctx->task_with_caps = false;
|
||||
BaseType_t created = xTaskCreate(control_plane_task_start_gate,
|
||||
name,
|
||||
stack_size,
|
||||
ctx,
|
||||
priority,
|
||||
&task_handle);
|
||||
BaseType_t created = xTaskCreatePinnedToCore(control_plane_task_start_gate,
|
||||
name,
|
||||
stack_size,
|
||||
ctx,
|
||||
priority,
|
||||
&task_handle,
|
||||
core_id);
|
||||
#endif
|
||||
if (created != pdPASS) {
|
||||
free(ctx);
|
||||
@@ -718,6 +747,7 @@ static esp_err_t control_plane_schedule_websocket_wait_task(void)
|
||||
"cp_ws_wait",
|
||||
CONTROL_PLANE_WS_WAIT_TASK_STACK_SIZE,
|
||||
4,
|
||||
CONTROL_PLANE_NETWORK_TASK_CORE,
|
||||
&s_ws_wait_task);
|
||||
portENTER_CRITICAL(&s_runtime_lock);
|
||||
s_ws_wait_task_starting = false;
|
||||
@@ -1453,6 +1483,7 @@ esp_err_t control_plane_start_runtime_workers(void)
|
||||
"cp_model_cmd",
|
||||
CONTROL_PLANE_MODEL_CMD_TASK_STACK_SIZE,
|
||||
5,
|
||||
CONTROL_PLANE_LOCAL_TASK_CORE,
|
||||
&s_model_cmd_task);
|
||||
if (task_err != ESP_OK) {
|
||||
control_plane_stop_runtime_workers();
|
||||
@@ -1473,6 +1504,7 @@ esp_err_t control_plane_start_runtime_workers(void)
|
||||
"cp_direction",
|
||||
CONTROL_PLANE_DIRECTION_TASK_STACK_SIZE,
|
||||
5,
|
||||
CONTROL_PLANE_LOCAL_TASK_CORE,
|
||||
&s_direction_console_task);
|
||||
if (task_err != ESP_OK) {
|
||||
control_plane_stop_runtime_workers();
|
||||
@@ -1486,6 +1518,7 @@ esp_err_t control_plane_start_runtime_workers(void)
|
||||
"cp_lcd_render",
|
||||
CONTROL_PLANE_LCD_RENDER_LOOP_TASK_STACK_SIZE,
|
||||
4,
|
||||
CONTROL_PLANE_LOCAL_TASK_CORE,
|
||||
&s_lcd_render_loop_task);
|
||||
if (task_err != ESP_OK) {
|
||||
control_plane_stop_runtime_workers();
|
||||
@@ -1501,6 +1534,7 @@ esp_err_t control_plane_start_runtime_workers(void)
|
||||
"cp_wifi_state",
|
||||
CONTROL_PLANE_WIFI_STATE_TASK_STACK_SIZE,
|
||||
4,
|
||||
CONTROL_PLANE_NETWORK_TASK_CORE,
|
||||
&s_wifi_state_task);
|
||||
if (task_err != ESP_OK) {
|
||||
control_plane_stop_runtime_workers();
|
||||
@@ -1514,6 +1548,7 @@ esp_err_t control_plane_start_runtime_workers(void)
|
||||
"cp_task_monitor",
|
||||
CONTROL_PLANE_TASK_MONITOR_TASK_STACK_SIZE,
|
||||
3,
|
||||
CONTROL_PLANE_LOCAL_TASK_CORE,
|
||||
&s_task_monitor_task);
|
||||
if (task_err != ESP_OK) {
|
||||
control_plane_stop_runtime_workers();
|
||||
@@ -1541,6 +1576,7 @@ esp_err_t control_plane_start_runtime_workers(void)
|
||||
"cp_fortune",
|
||||
CONTROL_PLANE_FORTUNE_TASK_STACK_SIZE,
|
||||
4,
|
||||
CONTROL_PLANE_NETWORK_TASK_CORE,
|
||||
&s_daily_fortune_task);
|
||||
if (task_err != ESP_OK) {
|
||||
control_plane_stop_runtime_workers();
|
||||
|
||||
@@ -30,6 +30,16 @@
|
||||
#define CONFIG_TQ_SYSTEM_EVENT_TASK_STACK 4096
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TQ_LOCAL_TASK_CORE
|
||||
#define CONFIG_TQ_LOCAL_TASK_CORE 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_LOCAL_TASK_CORE < 0
|
||||
#define CONTROL_PLANE_SYSTEM_EVENT_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define CONTROL_PLANE_SYSTEM_EVENT_TASK_CORE ((BaseType_t)CONFIG_TQ_LOCAL_TASK_CORE)
|
||||
#endif
|
||||
|
||||
static const char *TAG = "cp_system_event";
|
||||
|
||||
static QueueHandle_t s_system_event_queue;
|
||||
@@ -192,12 +202,13 @@ esp_err_t control_plane_start_system_event_task(void)
|
||||
}
|
||||
|
||||
s_stop_requested = false;
|
||||
BaseType_t created = xTaskCreate(control_plane_system_event_task,
|
||||
"cp_system_event",
|
||||
CONFIG_TQ_SYSTEM_EVENT_TASK_STACK,
|
||||
NULL,
|
||||
4,
|
||||
&s_system_event_task);
|
||||
BaseType_t created = xTaskCreatePinnedToCore(control_plane_system_event_task,
|
||||
"cp_system_event",
|
||||
CONFIG_TQ_SYSTEM_EVENT_TASK_STACK,
|
||||
NULL,
|
||||
4,
|
||||
&s_system_event_task,
|
||||
CONTROL_PLANE_SYSTEM_EVENT_TASK_CORE);
|
||||
if (created != pdPASS) {
|
||||
s_system_event_task = NULL;
|
||||
return ESP_ERR_NO_MEM;
|
||||
|
||||
@@ -94,10 +94,14 @@
|
||||
#define CONFIG_MULTIMODAL_AUDIO_TASK_CORE 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_MULTIMODAL_AUDIO_TASK_CORE < 0
|
||||
#define MULTIMODAL_AUDIO_CORE_ID tskNO_AFFINITY
|
||||
#ifndef CONFIG_TQ_NETWORK_TASK_CORE
|
||||
#define CONFIG_TQ_NETWORK_TASK_CORE 0
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_NETWORK_TASK_CORE < 0
|
||||
#define MULTIMODAL_WS_CORE_ID tskNO_AFFINITY
|
||||
#else
|
||||
#define MULTIMODAL_AUDIO_CORE_ID ((BaseType_t)CONFIG_MULTIMODAL_AUDIO_TASK_CORE)
|
||||
#define MULTIMODAL_WS_CORE_ID ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE)
|
||||
#endif
|
||||
|
||||
#define WS_OPCODE_TEXT 0x1
|
||||
|
||||
@@ -368,7 +368,7 @@ static esp_err_t ws_start_async_stop(void)
|
||||
5,
|
||||
&task,
|
||||
true,
|
||||
tskNO_AFFINITY);
|
||||
MULTIMODAL_WS_CORE_ID);
|
||||
if (ok != pdPASS) {
|
||||
ws_set_async_stop_task(NULL);
|
||||
ESP_LOGE(TAG, "Create WebSocket async stop task failed");
|
||||
|
||||
@@ -641,7 +641,7 @@ static esp_err_t create_worker_pipeline(void)
|
||||
CONFIG_MULTIMODAL_WEBSOCKET_TASK_PRIORITY,
|
||||
&s_ws_dispatch_task,
|
||||
true,
|
||||
tskNO_AFFINITY) != pdPASS) {
|
||||
MULTIMODAL_WS_CORE_ID) != pdPASS) {
|
||||
(void)destroy_worker_pipeline_until(
|
||||
ws_stop_deadline_from_timeout(MULTIMODAL_WS_WORKER_STOP_WAIT_MS));
|
||||
return ESP_ERR_NO_MEM;
|
||||
|
||||
@@ -35,6 +35,16 @@
|
||||
#define LAN_HTTP_START_TIMEOUT_MS 1500
|
||||
#define LAN_HTTP_STOP_POLL_MS 20
|
||||
|
||||
#ifndef CONFIG_TQ_NETWORK_TASK_CORE
|
||||
#define CONFIG_TQ_NETWORK_TASK_CORE 0
|
||||
#endif
|
||||
|
||||
#if CONFIG_TQ_NETWORK_TASK_CORE < 0
|
||||
#define LAN_HTTP_TASK_CORE tskNO_AFFINITY
|
||||
#else
|
||||
#define LAN_HTTP_TASK_CORE ((BaseType_t)CONFIG_TQ_NETWORK_TASK_CORE)
|
||||
#endif
|
||||
|
||||
#if (configSUPPORT_STATIC_ALLOCATION == 1) && \
|
||||
((defined(CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) && CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM) || \
|
||||
defined(CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY))
|
||||
@@ -111,7 +121,7 @@ static BaseType_t lan_http_create_task(TaskHandle_t *out_handle)
|
||||
NULL,
|
||||
LAN_HTTP_TASK_PRIORITY,
|
||||
out_handle,
|
||||
tskNO_AFFINITY,
|
||||
LAN_HTTP_TASK_CORE,
|
||||
MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT);
|
||||
if (created == pdPASS) {
|
||||
return pdPASS;
|
||||
@@ -124,15 +134,16 @@ static BaseType_t lan_http_create_task(TaskHandle_t *out_handle)
|
||||
NULL,
|
||||
LAN_HTTP_TASK_PRIORITY,
|
||||
out_handle,
|
||||
tskNO_AFFINITY,
|
||||
LAN_HTTP_TASK_CORE,
|
||||
MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
#else
|
||||
return xTaskCreate(server_task,
|
||||
"lan_http",
|
||||
LAN_HTTP_TASK_STACK_SIZE,
|
||||
NULL,
|
||||
LAN_HTTP_TASK_PRIORITY,
|
||||
out_handle);
|
||||
return xTaskCreatePinnedToCore(server_task,
|
||||
"lan_http",
|
||||
LAN_HTTP_TASK_STACK_SIZE,
|
||||
NULL,
|
||||
LAN_HTTP_TASK_PRIORITY,
|
||||
out_handle,
|
||||
LAN_HTTP_TASK_CORE);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user