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

Release DTR after flashing (ESPTOOL-958) #1032

Closed
Sejny opened this issue Nov 1, 2024 · 2 comments
Closed

Release DTR after flashing (ESPTOOL-958) #1032

Sejny opened this issue Nov 1, 2024 · 2 comments

Comments

@Sejny
Copy link

Sejny commented Nov 1, 2024

Is your feature request related to a problem?

If you need use same uart pins for flashing firmware in to ESP32 and control different things from same uart from ESP32.

I have used on my custom programming tool DTR for switching TX from programmer or different peripheral. TX from programmer is necessary only when flashing.

Describe the solution you'd like

Release DTR not before start flashing but after flashing.

@github-actions github-actions bot changed the title Release DTR after flashing Release DTR after flashing (ESPTOOL-958) Nov 1, 2024
@radimkarnis
Copy link
Collaborator

Hello @Sejny,

you can use a configuration file to alter the before and after reset sequences. Defining custom_hard_reset_sequence and custom_reset_sequence allows you to configure DTR and RTS transitions as you like.

We won't be changing the default behavior of esptool, there is a huge risk of bricking the reset sequence for all the other users. I will close this issue now.

@Sejny
Copy link
Author

Sejny commented Nov 6, 2024

@radimkarnis Thank you for help. Config file is nice feature. :)

On windows + platformio + arduino ESP32 esptool dont see config file in esptool folder, after move in to C:\Users\xxxxxx\AppData\Local\esptool custom config start working.

Here is my config for holding DTR during flashning and correct reset after flashing:

[esptool]
chip_erase_timeout = 140
serial_write_timeout = 8.5
connect_attempts = 7
write_block_attempts = 2
reset_delay = 0.75
# Overriding the default reset sequence to work in an abnormal environment
custom_reset_sequence = D0|R1|W0.1|D1|R0|W0.5
custom_hard_reset_sequence = D0|W0.1|R1|W0.5|R0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants