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

Issues with auto reset #4

Open
MCUdude opened this issue Jan 4, 2020 · 3 comments
Open

Issues with auto reset #4

MCUdude opened this issue Jan 4, 2020 · 3 comments

Comments

@MCUdude
Copy link

MCUdude commented Jan 4, 2020

Hi!

I figured out that the provided hex file for the 328p in this repo was a bit dated, so I compiled a new one file that supports autobaud.

I'm currently using a genuine UNO with an ATmega8u2 as the USB to serial converter. I'm having problems with the auto-reset routine. I am able to upload if I hit the reset button at the right time, but auto reset does not work at all. Any reason why this might happen?

It also seems like the microcontroller gets stuck in bootloader mode when I open the serial monitor after a successful upload. the D13 LED is constantly lid, and the sketch isn't running.

@nerdralph
Copy link
Owner

I've occasionally seen something like that which appeared after I added autobaud, but haven't been able to consistently reproduce it. I think it may be from turning on the USART part way through the first STK_GET_SYNC message that avrdude sends. I just started testing a change that pauses after autobaud before you posted the issue. Expect an updated version within 24hrs. I'll also push a new hex file for the 328p and 168p.

@nerdralph
Copy link
Owner

The bootloader mode toggle was causing problems with a Uno clone I have because it's auto-reset circuit was resetting the AVR after the CH340G was enumerated by the USB stack.
I decided to remove the booloader mode toggle, and go with a timeout. This means it works more like Optiboot, but I use a busy loop timeout instead of WDT. I just pushed a v3 beta, and compiled for m328p. It's now over 256 bytes though. I'm going to try to pare it back down to 256 for a final v3 release so it will again fit in the minimum bootloader size for the m88 & m168.

@nerdralph
Copy link
Owner

nerdralph commented Jan 11, 2020

I've just pushed v3b2 (exactly 256 bytes), after lots of testing with both manual reset and auto-reset. It has been very reliable at 250kbps, and fast. Hex files for m168 and m328 have been pushed. I also plan to test with the m88, which may be able to use the same build as the m168.

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