Skip to content
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

esp_wifi_start stops USB on ESP32-C6 (IDFGH-14233) #15029

Open
3 tasks done
JesperBllnbm opened this issue Dec 14, 2024 · 0 comments
Open
3 tasks done

esp_wifi_start stops USB on ESP32-C6 (IDFGH-14233) #15029

JesperBllnbm opened this issue Dec 14, 2024 · 0 comments
Labels
Status: Opened Issue is new Type: Bug bugs in IDF

Comments

@JesperBllnbm
Copy link

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.

IDF version.

v5.3.2.

Espressif SoC revision.

ESP32 C6

Operating System used.

macOS

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32 C6 mini u1

Power Supply used.

USB

What is the expected behavior?

I expect to be able to run the SOFT AP example from: https://github.com/espressif/esp-idf/tree/v5.3.2/examples/wifi/getting_started/softAP

and it should work as documented.

What is the actual behavior?

I enter some kind of boot loop, whenever wifi is started usb connection is lost.

Steps to reproduce.

  1. Obtain hardware, I used: https://www.espressif.com/sites/default/files/documentation/esp32-c6-mini-1_mini-1u_datasheet_en.pdf in form of a LilyGo T-Knob
  2. Flash the example https://github.com/espressif/esp-idf/tree/v5.3.2/examples/wifi/getting_started/softAP or anything that needs wifi.
  3. Connect the monitor

Debug Logs.

base) jesper@Mac softAP % '/Users/jesper/.espressif/python_env/idf5.3_py3.13_env/bin/python' '/Use
rs/jesper/esp/esp-idf/tools/idf_monitor.py' -p /dev/tty.usbmodem101 -b 115200 --toolchain-prefix ri
scv32-esp-elf- --target esp32c6 '/Users/jesper/esp/esp-idf/examples/wifi/getting_started/softAP/bui
ld/wifi_softAP.elf'
--- Warning: Serial ports accessed as /dev/tty.* will hang gdb if launched.
--- Using /dev/cu.usbmodem101 instead...
--- esp-idf-monitor 1.5.0 on /dev/cu.usbmodem101 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x15 (USB_UART_HPSYS),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x4205b4a4
--- 0x4205b4a4: mpi_hal_clear_interrupt at /Users/jesper/esp/esp-idf/components/hal/mpi_hal.c:46

SPIWP:0xee
mode:DIO, clock div:2
load:0x40875720,len:0x18ec
load:0x4086c110,len:0xe5c
load:0x4086e610,len:0x2f50
entry 0x4086c11a
I (23) boot: ESP-IDF v5.3.2 2nd stage bootloader
I (23) boot: compile time Dec 14 2024 16:16:51
I (24) boot: chip revision: v0.0
I (26) boot: efuse block revision: v0.1
I (30) boot.esp32c6: SPI Speed      : 80MHz
I (35) boot.esp32c6: SPI Mode       : DIO
I (40) boot.esp32c6: SPI Flash Size : 2MB
I (44) boot: Enabling RNG early entropy source...
I (50) boot: Partition Table:
I (53) boot: ## Label            Usage          Type ST Offset   Length
I (61) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (68) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (76) boot:  2 factory          factory app      00 00 00010000 00100000
I (83) boot: End of partition table
I (87) esp_image: segment 0: paddr=00010020 vaddr=42098020 size=1be20h (114208) map
I (117) esp_image: segment 1: paddr=0002be48 vaddr=40800000 size=041d0h ( 16848) load
I (122) esp_image: segment 2: paddr=00030020 vaddr=42000020 size=9023ch (590396) map
I (234) esp_image: segment 3: paddr=000c0264 vaddr=408041d0 size=14dfch ( 85500) load
I (253) esp_image: segment 4: paddr=000d5068 vaddr=40818fd0 size=03b78h ( 15224) load
I (263) boot: Loaded app from partition at offset 0x10000
I (263) boot: Disabling RNG early entropy source...
I (275) cpu_start: Unicore app
I (283) cpu_start: Pro cpu start user code
I (284) cpu_start: cpu freq: 160000000 Hz
I (284) app_init: Application information:
I (286) app_init: Project name:     wifi_softAP
I (292) app_init: App version:      v5.3.2
I (296) app_init: Compile time:     Dec 14 2024 16:16:46
I (302) app_init: ELF file SHA256:  1ceb4e118...
I (308) app_init: ESP-IDF:          v5.3.2
I (312) efuse_init: Min chip rev:     v0.0
I (317) efuse_init: Max chip rev:     v0.99 
I (322) efuse_init: Chip rev:         v0.0
I (327) heap_init: Initializing. RAM available for dynamic allocation:
I (334) heap_init: At 40821F60 len 0005A6B0 (361 KiB): RAM
I (340) heap_init: At 4087C610 len 00002F54 (11 KiB): RAM
I (346) heap_init: At 50000000 len 00003FE8 (15 KiB): RTCRAM
I (354) spi_flash: detected chip: generic
I (357) spi_flash: flash io: dio
W (361) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (375) sleep: Configure to isolate all GPIO pins in sleep state
I (381) sleep: Enable automatic switching of GPIO sleep configuration
I (388) coexist: coex firmware version: cbb41d7
I (394) coexist: coexist rom version 5b8dcfa
I (399) main_task: Started on CPU0
I (399) main_task: Calling app_main()
I (409) wifi softAP: ESP_WIFI_MODE_AP
I (409) pp: pp rom version: 5b8dcfa
I (409) net80211: net80211 rom version: 5b8dcfa
I (429) wifi:wifi driver task: 4082aec8, prio:23, stack:6656, core=0
I (429) wifi:wifi firmware version: b0fd6006b
I (429) wifi:wifi certification version: v7.0
I (429) wifi:config NVS flash: enabled
I (429) wifi:config nano formating: disabled
I (439) wifi:mac_version:HAL_MAC_ESP32AX_761,ut_version:N, band:0x1
I (439) wifi:Init data frame dynamic rx buffer num: 32
I (449) wifi:Init static rx mgmt buffer num: 5
I (449) wifi:Init management short buffer num: 32
I (459) wifi:Init dynamic tx buffer num: 32
I (459) wifi:Init static tx FG buffer num: 2
I (469) wifi:Init static rx buffer size: 1700 (rxctrl:92, csi:512)
I (469) wifi:Init static rx buffer num: 10
I (479) wifi:Init dynamic rx buffer num: 32
I (479) wifi_init: rx ba win: 6
I (479) wifi_init: accept mbox: 6
I (489) wifi_init: tcpip mbox: 32
I (489) wifi_init: udp mbox: 6
I (489) wifi_init: tcp mbox: 6
I (499) wifi_init: tcp tx win: 5760
I (499) wifi_init: tcp rx win: 5760
I (509) wifi_init: tcp mss: 1440
I (509) wifi_init: WiFi IRAM OP enabled
I (519) wifi_init: WiFi RX IRAM OP enabled
I (519) wifi_init: WiFi SLP IRAM OP enabled
I (529) phy_init: phy_version 320,348a293,Sep  3 2024,16:33:12
W (579) wifi:ACK_TAB0   :0x   90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
W (579) wifi:CTS_TAB0   :0x   90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
W (579) wifi:(agc)0x600a7128:0xd20279f0, min.avgNF:0xce->0xd2(dB), RCalCount:0x27, min.RRssi:0x9f0(-97.00)
W (589) wifi:(TB)WDEV_PWR_TB_MCS0:19
W (589) wifi:(TB)WDEV_PWR_TB_MCS1:19
W (599) wifi:(TB)WDEV_PWR_TB_MCS2:19
W (599) wifi:(TB)WDEV_PWR_TB_MCS3:19
W (599) wifi:(TB)WDEV_PWR_TB_MCS4:19
W (609) wifi:(TB)WDEV_PWR_TB_MCS5:19
W (609) wifi:(TB)WDEV_PWR_TB_MCS6:18
W (609) wifi:(TB)WDEV_PWR_TB_MCS7:18
W (619) wifi:(TB)WDEV_PWR_TB_MCS8:17
W (619) wifi:(TB)WDEV_PWR_TB_MCS9:15
W (619) wifi:(TB)WDEV_PWR_TB_MCS10:15
W (629) wifi:(TB)WDEV_PWR_TB_MCS11:15
I (629) wifi:11ax coex: WDEVAX_PTI0(0x55777555), WDEVAX_PTI1(0x00003377).

W (639) wifi:(he)deattach, ap, phymode:11bgn
I (639) wifi:mode : softAP (40:4c:ca:46:8f:45)
I (689) wifi:Total power save buffer number: 16
I (689) wifi:Init max length of beacon: 752/752
I (689) wifi:Init max length of beacon: 752/752
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
oot:  0 nvs              WiFi data        01 02 00009000 00006000
I (69) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (77) boot:  2 factory          factory app      00 00 00010000 00100000
I (84) boot: End of partition table
I (89) esp_image: segment 0: paddr=00010020 vaddr=42098020 size=1be20h (114208) map
I (119) esp_image: segment 1: paddr=0002be48 vaddr=40800000 size=041d0h ( 16848) load
I (123) esp_image: segment 2: paddr=00030020 vaddr=42000020 size=9023ch (590396) map
I (235) esp_image: segment 3: paddr=000c0264 vaddr=408041d0 size=14dfch ( 85500) load
I (254) esp_image: segment 4: paddr=000d5068 vaddr=40818fd0 size=03b78h ( 15224) load
I (264) boot: Loaded app from partition at offset 0x10000
I (264) boot: Disabling RNG early entropy source...
I (276) cpu_start: Unicore app
I (285) cpu_start: Pro cpu start user code
I (285) cpu_start: cpu freq: 160000000 Hz
I (285) app_init: Application information:
I (288) app_init: Project name:     wifi_softAP
I (293) app_init: App version:      v5.3.2
I (298) app_init: Compile time:     Dec 14 2024 16:16:46
I (304) app_init: ELF file SHA256:  1ceb4e118...
I (309) app_init: ESP-IDF:          v5.3.2
I (314) efuse_init: Min chip rev:     v0.0
I (318) efuse_init: Max chip rev:     v0.99 
I (323) efuse_init: Chip rev:         v0.0
I (328) heap_init: Initializing. RAM available for dynamic allocation:
I (335) heap_init: At 40821F60 len 0005A6B0 (361 KiB): RAM
I (342) heap_init: At 4087C610 len 00002F54 (11 KiB): RAM
I (348) heap_init: At 50000000 len 00003FE8 (15 KiB): RTCRAM
I (355) spi_flash: detected chip: generic
I (359) spi_flash: flash io: dio
W (363) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (376) sleep: Configure to isolate all GPIO pins in sleep state
I (383) sleep: Enable automatic switching of GPIO sleep configuration
I (390) coexist: coex firmware version: cbb41d7
I (395) coexist: coexist rom version 5b8dcfa
I (400) main_task: Started on CPU0
I (400) main_task: Calling app_main()
I (410) wifi softAP: ESP_WIFI_MODE_AP
I (410) pp: pp rom version: 5b8dcfa
I (410) net80211: net80211 rom version: 5b8dcfa
I (430) wifi:wifi driver task: 4082aec8, prio:23, stack:6656, core=0
I (430) wifi:wifi firmware version: b0fd6006b
I (430) wifi:wifi certification version: v7.0
I (430) wifi:config NVS flash: enabled
I (430) wifi:config nano formating: disabled
I (440) wifi:mac_version:HAL_MAC_ESP32AX_761,ut_version:N, band:0x1
I (440) wifi:Init data frame dynamic rx buffer num: 32
I (450) wifi:Init static rx mgmt buffer num: 5
I (450) wifi:Init management short buffer num: 32
I (460) wifi:Init dynamic tx buffer num: 32
I (460) wifi:Init static tx FG buffer num: 2
I (470) wifi:Init static rx buffer size: 1700 (rxctrl:92, csi:512)
I (470) wifi:Init static rx buffer num: 10
I (480) wifi:Init dynamic rx buffer num: 32
I (480) wifi_init: rx ba win: 6
I (480) wifi_init: accept mbox: 6
I (490) wifi_init: tcpip mbox: 32
I (490) wifi_init: udp mbox: 6
I (490) wifi_init: tcp mbox: 6
I (500) wifi_init: tcp tx win: 5760
I (500) wifi_init: tcp rx win: 5760
I (510) wifi_init: tcp mss: 1440
I (510) wifi_init: WiFi IRAM OP enabled
I (520) wifi_init: WiFi RX IRAM OP enabled
I (520) wifi_init: WiFi SLP IRAM OP enabled
I (530) phy_init: phy_version 320,348a293,Sep  3 2024,16:33:12
W (580) wifi:ACK_TAB0   :0x   90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
W (580) wifi:CTS_TAB0   :0x   90a0b, QAM16:0x9 (24Mbps), QPSK:0xa (12Mbps), BPSK:0xb (6Mbps)
W (580) wifi:(agc)0x600a7128:0xd20369e8, min.avgNF:0xce->0xd2(dB), RCalCount:0x36, min.RRssi:0x9e8(-97.50)
W (590) wifi:(TB)WDEV_PWR_TB_MCS0:19
W (590) wifi:(TB)WDEV_PWR_TB_MCS1:19
W (600) wifi:(TB)WDEV_PWR_TB_MCS2:19
W (600) wifi:(TB)WDEV_PWR_TB_MCS3:19
W (600) wifi:(TB)WDEV_PWR_TB_MCS4:19
W (610) wifi:(TB)WDEV_PWR_TB_MCS5:19
W (610) wifi:(TB)WDEV_PWR_TB_MCS6:18
W (610) wifi:(TB)WDEV_PWR_TB_MCS7:18
W (620) wifi:(TB)WDEV_PWR_TB_MCS8:17
W (620) wifi:(TB)WDEV_PWR_TB_MCS9:15
W (620) wifi:(TB)WDEV_PWR_TB_MCS10:15
W (630) wifi:(TB)WDEV_PWR_TB_MCS11:15
I (630) wifi:11ax coex: WDEVAX_PTI0(0x55777555), WDEVAX_PTI1(0x00003377).

W (640) wifi:(he)deattach, ap, phymode:11bgn
I (640) wifi:mode : softAP (40:4c:ca:46:8f:45)
I (690) wifi:Total power save buffer number: 16
I (690) wifi:Init max length of beacon: 752/752
I (690) wifi:Init max length of beacon: 752/752
--- Error: read failed: [Errno 6] Device not configured

More Information.

Maybe related to:

SOC_WIFI_PHY_NEEDS_USB_WORKAROUND
SoC has WiFi and USB PHYs interference, needs a workaround

or #8241

@JesperBllnbm JesperBllnbm added the Type: Bug bugs in IDF label Dec 14, 2024
@JesperBllnbm JesperBllnbm changed the title esp_wifi_start stops USB on ESP32-S5 esp_wifi_start stops USB on ESP32-C6 Dec 14, 2024
@github-actions github-actions bot changed the title esp_wifi_start stops USB on ESP32-C6 esp_wifi_start stops USB on ESP32-C6 (IDFGH-14233) Dec 14, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

2 participants