why usb-jtag disconnect when wifi start?

emyjob
Posts: 13
Joined: Fri Apr 29, 2022 3:15 am

why usb-jtag disconnect when wifi start?

Postby emyjob » Fri Apr 29, 2022 5:45 am

chip:ESP32-C3, IDF:4.4 , examples: blink,espnow,ble_mesh_wifi_coexist
I can debug example code 'blink' project by usb-jtag, but debug error for 'espnow','ble_mesh_wifi_coexist'..etc

i reedit it:
-----------------------------------------
void app_main(void)
{
// Initialize NVS
ESP_LOGI(TAG,"app_main entry.");

esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK( nvs_flash_erase() );
ret = nvs_flash_init();
}
ESP_ERROR_CHECK( ret );

while (1) {
vTaskDelay(1000 / portTICK_PERIOD_MS);
ESP_LOGI(TAG,"app_main Delay.");
}// for not run under line code
example_wifi_init();
example_espnow_init();
}
-------------------------------------

if not run example_wifi_init(),i can compile,download and debug, but cancel 'while()...' code, i can compile and download,but not debug for hardware. console tips:
------------------------------------------
** Programming Started **
Info : PROF: Data transferred in 460.766 ms @ 43.406 KB/s
** Programming Finished **
** Verify Started **
** Verified OK **
** Flashing done for bootloader/bootloader.bin **
Flashing D:/Espressif/frameworks/esp-idf-v4.4/workspace/espnow/build/espnow.bin at 0x10000
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
** Programming Started **
Info : PROF: Data transferred in 13213.2 ms @ 47.2256 KB/s
** Programming Finished **
** Verify Started **
** Verified OK **
** Flashing done for espnow.bin **
** Resetting Target **
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
0
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_bulk_read error: LIBUSB_ERROR_PIPE
Error: libusb_bulk_read error: LIBUSB_ERROR_TIMEOUT
-------------------------------------------
I found : if contains 'esp_wifi_start()' code, compile...download ,run .... usb-jtag is not working, and download , only when switch bootloader mode, to continue download.
Why? wifi and usb-jtag cann't working together?

emyjob
Posts: 13
Joined: Fri Apr 29, 2022 3:15 am

Re: why usb-jtag disconnect when wifi start?

Postby emyjob » Fri Apr 29, 2022 8:10 am

going on...
if found wifi start appication download to board and run, usb device will change to "unknow device" in computer system,normal usb-jtag working is "USB JTAG debug unit
" in computer system. it looks usb-jtag function is disabled by application! Now,how i debug the board? Where config to use usb-jtag?

ESP_Sprite
Posts: 9575
Joined: Thu Nov 26, 2015 4:08 am

Re: why usb-jtag disconnect when wifi start?

Postby ESP_Sprite » Sat Apr 30, 2022 8:04 am

Can you try making USB-serial-JTAG into the primary console output? (Menuconfig -> Component config → ESP System Settings -> Channel for console output)

emyjob
Posts: 13
Joined: Fri Apr 29, 2022 3:15 am

Re: why usb-jtag disconnect when wifi start?

Postby emyjob » Thu May 05, 2022 12:42 am

ESP_Sprite :thank you,very much!
set Channel for console output = USB Serial/JTAG controller,done! :)

asd3330303
Posts: 5
Joined: Thu May 05, 2022 1:50 am

Re: why usb-jtag disconnect when wifi start?

Postby asd3330303 » Thu May 05, 2022 2:08 am

emyjob wrote:
Thu May 05, 2022 12:42 am
ESP_Sprite :thank you,very much!
set Channel for console output = USB Serial/JTAG controller,done! :)
感谢,终于解决了

Who is online

Users browsing this forum: Bing [Bot] and 133 guests