Avrdude Configuration - Extend Delay Between Reset And Program

Hi all!

I'm attempting to lengthen the delay between the DTR signal and the programming initiation signal by avrdude. Unfortunately, modifying the various delay options in avrdude.conf seems to have no effect.

Is there proper documentation for these options anywhere? (The available documentation doesn't go into much detail: http://www.nongnu.org/avrdude/user-manual/avrdude.html)

Long Version:

I've attached the DTR signal to a power supply, and it takes almost a second to power cycle the board. As a result, the board is still powered off when avrdude sends the first initialization signal. And unfortunately, optiboot times out before avrdude tries again!

As far as I can see, my software solutions are 1) Extend the delay between the DTR toggle and avrdude's first attempt (this question). 2) Modify avrdude to shorten the delay between attempts (I believe this requires recompilation). 3) Modify and recompile optiboot to have a longer timeout period :o

My current solution is to open the serial port half a second before attempting to program. This works (by moving DTR forward rather than avrdude back), but it's quite an ugly hack.

Any direction or thoughts you can provide are appreciated. Thanks for your help! Patton

Um. Optiboot won't try to download new code when the chip is started by "power on." (The 'fast start' modification made a very long time ago.) Somehow you'll need to signal an external reset to the board AFTER the power is up.

Thanks for the quick response westfw! I’m sorry it took me so long to follow up - I missed the email notification of your reply.

You’re absolutely correct. :slight_smile: I solved this problem in an earlier draft by tying a 1uF capacitor and 10k resistor to the reset line. This pulls the reset line low long enough that a power cycle looks like a reset.

For anyone following this thread, I ended up extending the power cycle of the board to five seconds. This means that the board misses the first attempt by avrdude, but hits the second attempt spot on.

It’s not a beautiful solution, but it works reliably!