Skip to content

Why are low-priority tasks prioritized over high-priority tasks in the first cycle? (IDFGH-16971) #18024

@xiulu0

Description

@xiulu0

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

My code is shown below:#include <stdio.h>
#include <inttypes.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "portmacro.h"

void test_task_1(void *pvParameter)
{
while(1)
{
printf("test_task_1\n");
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}

void test_task_2(void *pvParameter)
{
while(1)
{
printf("test_task_2\n");
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}

void app_main(void)
{
xTaskCreate(test_task_1, "test_task_1", 4096, NULL, 1, NULL);
xTaskCreate(test_task_2, "test_task_2", 4096, NULL, 2, NULL);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions