Skip to content

The data transfer causes the USB to fail to communicate #11312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
guess-name opened this issue Apr 28, 2025 · 3 comments
Open
1 task done

The data transfer causes the USB to fail to communicate #11312

guess-name opened this issue Apr 28, 2025 · 3 comments
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@guess-name
Copy link

Board

ESP32S3

Device Description

ESP32-S3-WROOM-1U-N16R8

Single-module testing

Image

Hardware Configuration

Minimal system

GPIO18 and GPIO19 No other peripherals

Version

v3.1.0

IDE Name

VSCODE

Operating System

win11

Flash frequency

The module comes with it

PSRAM enabled

yes

Upload speed

115200

Description

Sending a string of data every 50ms will cause the USB to fail (unacceptable and unable to send)。
Sending the same data every 100ms will not cause the above problems

Send data:{"cmd":1,"data":100}

Sketch

void setup()
{
    Serial.begin(115200);
    Serial.setRxBufferSize(4096);
    Serial.setTxBufferSize(4096);
    delay(1000); // 等待串口初始化
}

// 线程函数
void PcComTask(void *arg)
{
    while (adcUartObj._initFinish == false)
    {
        delay(100);
    }
    pcComObj.init(&Serial);
    uint8_t lent = 0;
    while (1)
    {
        if (lent == pcComObj._serial->available() && lent > 0)
        {
            pcComObj.handleData();
            lent = 0;
        }
        else
        {
            lent = pcComObj._serial->available();
        }
        delay(5);
    }
}

Debug Message

No errors

Other Steps to Reproduce

If you send within 100 ms, you will not have this exception, but if the transmission interval is less than 80 ms, an error will occur

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@guess-name guess-name added the Status: Awaiting triage Issue is waiting for triage label Apr 28, 2025
@guess-name
Copy link
Author

Image

@guess-name
Copy link
Author

Image

@SuGlider
Copy link
Collaborator

Which USB CDC mode is used?
ESP32-S3 has 2 modes: Hardware JTAG/CDCD and OTG USB CDC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

2 participants