espressif / esp-phy-lib

Precompiled libraries for low-level RF functions in Espressif chips
Apache License 2.0
7 stars 6 forks source link

ESP32-S3: USB stops working after commit 74658eb (fix some phy issue(20210825)) #1

Closed felix1689 closed 2 years ago

felix1689 commented 2 years ago

Hardware

ESP32-S3-DevKitC-1 v1.0

Problem

After checking out commit 74658eb and flashing, the USB on the dev kit stops working. The issue still stands at commit 39a1f4b.

Logs

OpenOCD

(Trying to debug, openocd -f board/esp32s3-builtin.cfg)

Open On-Chip Debugger  v0.10.0-esp32-20210902 (2021-09-02-09:33)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
WARNING: ESP flash support is disabled!
WARNING: ESP flash support is disabled!
force hard breakpoints
adapter speed: 1000 kHz

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: esp_usb_jtag: could not retrieve jtag_caps descriptor!

Assertion failed!

Program: ... \tools\openocd-esp32\v0.10.0-esp32-20210902\openocd-esp32\bin\openocd.exe
File: ../src/jtag/core.c, Line 343

Expression: jtag_trst == 0

esptool

(Trying to flash)

esptool.py v3.2-dev
Found 1 serial ports
Serial port COM14
COM14 failed to connect: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)

A fatal error occurred: Could not connect to an Espressif device on any of the 1 available serial ports.
Application error: 2
nonoo commented 2 years ago

I'm using the same devkit. Issue appears when esp_wifi_start() is called with commit 74658eb or more recent, as felixandra mentioned. USB connection (both JTAG and USB serial) is dropped and the host dmesg starts to get filled with the following messages repeatedly:

Oct 29 14:26:12 pukk kernel: [164003.104115] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
Oct 29 14:26:12 pukk kernel: [164003.104123] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
Oct 29 14:26:12 pukk kernel: [164003.219963] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
Oct 29 14:26:12 pukk kernel: [164003.219975] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.

Commit 0ae4bb8 works correctly.

igrr commented 2 years ago

@nonoo the fix for PHY lib has been merged in https://github.com/espressif/esp-phy-lib/commit/39a1f4b19b9794d7dd9aef741e04244db2da485e, but it requires a change in esp-idf as well. We'll update the related esp-idf issue when the fix is merged.