Closed GoogleCodeExporter closed 6 years ago
The UART initialization code ends up being exactly the same...
Hmm. Exactly what changes did you make in 4.4 to build a m8 8MHz bootload?
The obvious makefile change seems to invoke the SW UART, which doesn't compile
at all.
Did you use the LED_START_FLASHES=10 there as well? It occurs to me that 10
flashes at 8MHz may be perilously close to the 1s watchdog timeout used...
Original comment by wes...@gmail.com
on 12 Mar 2014 at 1:04
I will try it again with LED_START_FLASHES=10 & default value for both
versions. Thanks for your hint.
Original comment by hebi...@gmail.com
on 4 Apr 2014 at 4:28
So it turns out that optiboot seems to be pretty fragile with values of LED_START_FLASHES much bigger than 3, even on ATmega328s running at 16MHz. It looks like this is because AVRDUDE is pretty aggressive sending its initial GET_SYNC messages, sending 3 in quick succession. This ends up overrunning the AVR UART's buffer, causing the command sequence to be out-of-sync thereafter.
A fix is to add code the the LED flashing code to abort if UART data is seen. This seems to improve reliability (and perhaps even response time) quite a bit.
https://github.com/Optiboot/optiboot/commit/b109eb2615b570ce326e2664553f5d7c5ae9af26
Original issue reported on code.google.com by
hebi...@gmail.com
on 20 Feb 2014 at 2:29