Getting random USB_UART_CHIP_RESET

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

Getting random USB_UART_CHIP_RESET

Postby AndreaS73 » Mon Nov 11, 2024 11:32 am

I made several prototypes of my custom board that is powered by external power supply and uses the USB connection (USB_D+, USB_D-) for programming and UART only.

I'm sure I'm doing something wrong in my firmware (quite large) because since few days I'm getting random resets with the cause `USB_UART_CHIP_RESET`:

Of course I'm trying to comment out some part of my code to find the culprit, but I wonder what can cause such a reset so I can search in the right direction.

I use the USB port for sending out messages, with `ESP_LOGI` for example, or to receive data using the `usb_serial_jtag`driver:

Code: Select all

usb_serial_jtag_driver_config_t usb_serial_jtag_config =
    {
        .rx_buffer_size = NMEA_BUFFER_SIZE,
        .tx_buffer_size = NMEA_BUFFER_SIZE,
    };

    usb_serial_jtag_driver_install(&usb_serial_jtag_config);
    usb_serial_jtag_vfs_register();
    usb_serial_jtag_vfs_use_driver();
    uart_vfs_dev_register();
and

Code: Select all

int len = usb_serial_jtag_read_bytes(buffer, (BUFFER_SIZE - 1), 20 / portTICK_PERIOD_MS);
called every 50 ms.
What can cause such a reset?

aliarifat794
Posts: 198
Joined: Sun Jun 23, 2024 6:18 pm

Re: Getting random USB_UART_CHIP_RESET

Postby aliarifat794 » Mon Nov 11, 2024 12:44 pm

Verify buffer sizes (NMEA_BUFFER_SIZE and BUFFER_SIZE) and ensure they align with the expected data flow. If buffers are too small, there may be overflow issues, especially if logging at high rates.

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

Re: Getting random USB_UART_CHIP_RESET

Postby AndreaS73 » Tue Nov 12, 2024 3:24 pm

Found the problem.
It was the cable, a faulty cable.

Who is online

Users browsing this forum: Bing [Bot], VinayDand and 421 guests