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

Reset via DTR pin is broken #10

Closed
roybaer opened this issue Jan 11, 2019 · 4 comments
Closed

Reset via DTR pin is broken #10

roybaer opened this issue Jan 11, 2019 · 4 comments

Comments

@roybaer
Copy link

roybaer commented Jan 11, 2019

Resetting a board via DTR pin does not work anymore.
The guilty commit appears to be cd470a7, which kind of makes sense. I.e. you'll have to open the port before you can toggle DTR.

gicking added a commit that referenced this issue Jan 12, 2019
open and close port for reset via DTR (issue #10)
@gicking
Copy link
Owner

gicking commented Jan 12, 2019

hi roybaer,

thanks for pointing that out! You are correct, port must be opened before DTR reset. In old versions the port was indeed opened before reset, but I changed the sequence because I had issues with USB port not flushing correctly (see also here).

To fix the bug without the flush issue, I just uploaded a fix to branch develop (not yet master). This opens the port, resets via DTR and closes the port again, see here.

Can you please check it and let me know if this fixes your problem? Thanks in advance!

@roybaer
Copy link
Author

roybaer commented Jan 12, 2019

I can confirm that this solves the DTR reset problem.
However, I cannot get anything past 1d91c12 to work. That problem appears to be unrelated, though.
Can you cherry-pick this fix into the master branch?

gicking added a commit that referenced this issue Jan 13, 2019
fix DTR reset issue, see issue #10
#10
@gicking
Copy link
Owner

gicking commented Jan 13, 2019

Darn!

  1. just added the fix to the master branch, like requested.

  2. I implemented many improvements and bugfixes (at least with my setup) in the develop branch. I would hate to go back to master again!
    Could you please be more specific what exactly doesn't work, which OS you're using, and which board / STM8 variant is not working...? Maybe it's due to a different behavior of the ROM bootloader, which I couldn't test...? Thanks in advance!

@roybaer
Copy link
Author

roybaer commented Jan 13, 2019

Thanks! master works well, now.
I've opened #11 for the unrelated issue, so this can be closed.

@roybaer roybaer closed this as completed Jan 13, 2019
MarkStokes71 pushed a commit to MarkStokes71/stm8gal that referenced this issue Feb 17, 2021
open and close port for reset via DTR (issue gicking#10)
MarkStokes71 pushed a commit to MarkStokes71/stm8gal that referenced this issue Feb 17, 2021
fix DTR reset issue, see issue gicking#10
gicking#10
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

No branches or pull requests

2 participants