-
Notifications
You must be signed in to change notification settings - Fork 118
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
Cannot connect to target. Error: 1 (ESF-157) #117
Comments
Hello @versamodule, thank you for using this project. May I ask you what do you mean by:
You mean "USB (Experimental)" option? With that enabled it works every time? If this does not work, try to use dupont wires to connect pin master's pin 19 and 20 to slave's pin 19 and 20 (image for reference), to be sure you can also try just the esp32_usb_cdc_acm_example. |
Thank you for responding so quickly!
No, When I am in menuconfig, there is an option for SERIAL_FLASHER_DEBUG_TRACE. When I enable that option it connects all the time. It's much slower of course cuz it prints everything out. When I disable it I get "Cannot connect to target. Error: 1" 99.9% of the time. With enabled it connects all the time and uploads the firmware. The esp32_usb_cdc_acm_example is the one I am working with. |
Thanks, that's strange. Can you please test it with the dupont wires instead of the cable? Meanwhile I will try to test it by myself. |
Already did that and same behavior. So it looks like this.
I don't have to even have SERIAL_FLASHER_DEBUG_TRACE enabled anymore. I added tusb_msc example to my code project. I give a short delay when it boots and flash the led to let the user know when to press the GPIO0 button. If not pressed within 3 seconds it goes to the esp32_usb_cdc_acm_example to flash the device. So, thank you for all your time, working flawless now. |
That is awesome project you have. Happy you found the solution. I will still keep this issue open for a while and try to investigate it a bit more. Least we can do is add the delay to the example. Thanks for finding this. |
Interesting, this looks like the target is not ready to receive data, and the USB CDC ACM driver returns something other than a timeout error. The reason it works with tracing is most probably because the tracing slows down the transfer enough for the target to be ready. We will investigate this further and find a fix that doesn't require a manually added delay. |
Port
ESP
Target chip
ESP32-S3
Hardware Configuration
ESP32-S3-Devkitc-1 v1.0 to ESP32-S3-Devkitc-1 v1.0 via USB cable attached from one USB port to the other USB port.
Along with USB cable to PC from both units attached to UART port.
Log output
More Information
I am using an ESP32-S3 for both the Master and Slave(device to be programmed) via USB between both units.
The issue is I get "Cannot connect to target. Error: 1" in the terminal when I plug them together with the USB cable.
Pressing reset several times on both units I was able to get it to connect and update the slave unit just once.
In menuconfig under ESP serial flasher I have selected "USB (Experimental)" for the Hardware Interface.
On the Master terminal:
I (1510) usb_flasher: Installing USB Host
I (1540) usb_flasher: Installing the USB CDC-ACM driver
I (1540) usb_flasher: Opening CDC ACM device 0x303A:0x1001...
Cannot connect to target. Error: 1
On the slave Terminal:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x22 (DOWNLOAD(USB/UART0))
Saved PC:0x4037b326
waiting for download
Any ideas why it cannot connect to target ?
The text was updated successfully, but these errors were encountered: