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

Custom reset to reboot (ESPTOOL-913) #1004

Open
boborjan2 opened this issue Sep 1, 2024 · 5 comments
Open

Custom reset to reboot (ESPTOOL-913) #1004

boborjan2 opened this issue Sep 1, 2024 · 5 comments

Comments

@boborjan2
Copy link

boborjan2 commented Sep 1, 2024

Is your feature request related to a problem?

On boards that have custom setup and EN and IO0 is not wired as on "normal" boards, esptool already supports a custom reset strategy to enter bootloader mode. This works just fine. However the artermath reset ('--after') only supports limited options.

Describe the solution you'd like

It would be great to be able to define custom reset for resetting the board just like in 'custom_reset_sequence'. This way resetting would be far more generic supporting boards with unusual setup. Existing code for parsing custom reset strategy could be reused.

Describe alternatives you've considered

Means for setting (hard_)reset time could also be a solution.

Additional context

No response

@github-actions github-actions bot changed the title Custom reset to reboot Custom reset to reboot (ESPTOOL-913) Sep 1, 2024
@radimkarnis
Copy link
Collaborator

Hello @boborjan2,

thank you for the feature request!

Please let me first understand your situation correctly.

resetting would be far more generic supporting boards with unusual setup

Defining a custom reset sequence is intended to help with variable development environments. Some combinations of OS, drivers, and HW can cause the timing requirements to change. The feature is not primarily implemented to support cases when "EN and IO0 is not wired as on "normal" boards". It is a response to the bootloader reset sequence failing in some cases - we had a few reports of this happening. On the other hand, there were never any reports about the --after reset needing any changes.

The --after reset is usually just a simple HIGH->LOW->HIGH assertion to the RST (EN) pin. Can you please describe how the "boards with unusual setup" could benefit from being able to change this? Are there any real cases when the RST (EN) is unavailable and the device has a more complicated reset circuitry?

This is just to understand the situation better so we can assess the feature. Thank you!

@boborjan2
Copy link
Author

Thanks for the response. In my example, defining a longer reset time would enough. Just as I needed this in the custom_reset_sequence. But even though I define my custom reset sequence, at the end (--after) esp_tool still simply calls HardReset that does not reset the board.

@radimkarnis
Copy link
Collaborator

Understandable, could you please share more about how your board is an "unusual setup"? Do you know what the cause for needing a longer delay is?

@boborjan2
Copy link
Author

The reason for the long reset time is that EN is not wired to the debug connector. Instead, power-reset is used by an external circuitry. This way reset impulse must be long enough for the supply capacitors to discharge.

@radimkarnis
Copy link
Collaborator

@boborjan2 thank you for clarification. It sounds reasonable, we will implement this, I will keep this ticket open until then.

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