Does usb_serial_jtag_driver_install() disable stdout?

AndreaS73
Posts: 14
Joined: Tue Jan 16, 2024 8:16 am

Does usb_serial_jtag_driver_install() disable stdout?

Postby AndreaS73 » Tue Jul 02, 2024 1:59 pm

I created a task for processing incoming data on the JTAG/USB serial line:

Code: Select all

void Serial_Task(void *arg)
{
    usb_serial_jtag_driver_config_t usb_serial_jtag_config =
    {
        .rx_buffer_size = BUFFER_SIZE,
        .tx_buffer_size = BUFFER_SIZE,
    };

    ESP_ERROR_CHECK(usb_serial_jtag_driver_install(&usb_serial_jtag_config));

    while (1)
    {

        int len = usb_serial_jtag_read_bytes(data, (BUFFER_SIZE - 1), 20 / portTICK_PERIOD_MS);
        if (len)
        {
            // do something
        }

        vTaskDelay(1);
    }
}
In main I activate the task:

Code: Select all

ESP_LOGI(TAG, "before"); // works
printf("before\n"); // works

xTaskCreate(Serial_Task, "serial_task", STACK_SIZE, NULL, 10, NULL);

ESP_LOGI(TAG, "after"); // don't work
printf("after\n"); // don't work
Is this the expected behavior? How to continue to use printf and ESP_LOGx functions?

Who is online

Users browsing this forum: No registered users and 73 guests