Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ESP-32: Use RTS and DTR for Reset and Boot on upload (Read 7792 times)
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
ESP-32: Use RTS and DTR for Reset and Boot on upload
Dec 22nd, 2019 at 5:46pm
Print Post  
Hi

I'm using an FTDI-based USB to serial adapter to upload programs to an ESP-32. To make the upload process more convenient I would like to use the RTS and DTR pins of the converter chip to trigger Reset and Boot in my circuit.
How can I get VisualMicro to pull down DTR and RTS at the right moments to start the upload process?

Thanks
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP-32: Use RTS and DTR for Reset and Boot on upload
Reply #1 - Dec 22nd, 2019 at 7:45pm
Print Post  
I thought that is what happens anyway? I think yiu upload is made via the python files in the toolchain you are using.
  
Back to top
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
Re: ESP-32: Use RTS and DTR for Reset and Boot on upload
Reply #2 - Dec 22nd, 2019 at 9:25pm
Print Post  
During an upload attempt DTR is pulled down twice but RTS/CTS stays high all the time.

I would like to use DTR for Boot and RTS for Reset since this also done by the original development tools as described on this page:
https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP-32: Use RTS and DTR for Reset and Boot on upload
Reply #3 - Dec 22nd, 2019 at 9:28pm
Print Post  
Please follow the instructions in the yellow box above but also enabled the Verbose Upload option.

Then try upload and post the output as a .txt file or email with link to this post.

Thanks
  
Back to top
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
Re: ESP-32: Use RTS and DTR for Reset and Boot on upload
Reply #4 - Dec 22nd, 2019 at 9:38pm
Print Post  
Oh, I wasn't aware that the upload function also has a verbose mode.

Code
Select All
Uploading 'ControllerEsp32' to 'ESP32 Dev Module' using 'COM3'
Uploader started for board ESP32 Dev Module
Upload method will be: bootloader
Uploading via Bootloader
sptool.exe --chip esp32 --port "COM3" --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 ols/partitions/boot_app0.bin" 0x1000 ols/sdk/bin/bootloader_qio_80m.bin" 0x10000 Esp32.ino.bin" 0x8000 Esp32.ino.partitions.bin"
esptool.py v2.6
Serial port COM3
___
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
esptool.py v2.6
Serial port COM3
___
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

The uploader returned an error
 


  
Back to top
 
IP Logged
 
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
Re: ESP-32: Use RTS and DTR for Reset and Boot on upload
Reply #5 - Dec 22nd, 2019 at 9:52pm
Print Post  
Maybe I just found the problem.

According to the data sheet of the FTDI FT232RL RTS, CTS and DTR are 3 independent pins. My serial adapter only connects CTS and DTR and I thought all the time that RTS and CTS were two names for the same pin.

This explains what happens. Sorry for wasting your time.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP-32: Use RTS and DTR for Reset and Boot on upload
Reply #6 - Dec 22nd, 2019 at 10:01pm
Print Post  
No problem, thanks for the update.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint