modbus slave tcp fix the affinity option missing for server task

This commit is contained in:
aleks
2022-06-23 11:03:46 +02:00
parent 40a2161320
commit 9f58c2518d

View File

@ -150,12 +150,13 @@ xMBTCPPortInit( USHORT usTCPPort )
xConfig.pcBindAddr = NULL; xConfig.pcBindAddr = NULL;
// Create task for packet processing // Create task for packet processing
BaseType_t xErr = xTaskCreate(vMBTCPPortServerTask, BaseType_t xErr = xTaskCreatePinnedToCore(vMBTCPPortServerTask,
"tcp_server_task", "tcp_slave_task",
MB_TCP_STACK_SIZE, MB_TCP_STACK_SIZE,
NULL, NULL,
MB_TCP_TASK_PRIO, MB_TCP_TASK_PRIO,
&xConfig.xMbTcpTaskHandle); &xConfig.xMbTcpTaskHandle,
MB_PORT_TASK_AFFINITY);
vTaskSuspend(xConfig.xMbTcpTaskHandle); vTaskSuspend(xConfig.xMbTcpTaskHandle);
if (xErr != pdTRUE) if (xErr != pdTRUE)
{ {