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

Windows USB serial workaround: set DTR after RTS #554

Closed
wants to merge 1 commit into from

Conversation

haileys
Copy link
Contributor

@haileys haileys commented Jan 19, 2024

When setting DTR before RTS, espflash can't connect to a USB serial device on Windows:

image

After changing the order, it can:

image

Strange but true!

esptool itself features a similar workaround - it additionally sets DTR to its last known state whenever RTS is set. For our purposes though, it seems good enough to just switch the order we set the pins.

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I wonder if we should also update the UsbJtagSerialReset order.

esptool itself features a similar workaround - it additionally sets DTR to its last known state whenever RTS is set.

I wonder if we could easily store the value of dtr and rts and do like esptool does, when setting rst set the current value of dtr, so we can keep the same order as esptool while have this Windows workaround

@SergioGasquez
Copy link
Member

I've also added the changes for UsbJtagSerialReset in https://github.com/SergioGasquez/espflash/tree/fix/windows-reset. Do you have by any chance a devkit with jtab port available by any chance to confirm if the issue is also present there and my changes fix it?

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

Successfully merging this pull request may close these issues.

2 participants