From 61b3035c3da84db71b13a025b2fc43b1a0f7ec34 Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Thu, 12 Sep 2013 11:20:03 +0000 Subject: [PATCH] bug #37768 Poll usbtiny 100 times at init time to handle low-clock devices Add a FAQ entry describing the method to connect to a device where the firmware has reduced the internal clock speed. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1218 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ doc/avrdude.texi | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 88dcdaa5..6c3542db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-09-12 Joerg Wunsch + + bug #37768 Poll usbtiny 100 times at init time to handle low-clock devices + * doc/avrdude.texi: Add a FAQ entry about how to connect to a + target where the firmware has reduced the internal clock speed. + 2013-09-11 Joerg Wunsch bug #28344 chip_erase_delay too short for ATmega324P, 644, 644P, and 1284P diff --git a/doc/avrdude.texi b/doc/avrdude.texi index 726dfefe..9eafe751 100644 --- a/doc/avrdude.texi +++ b/doc/avrdude.texi @@ -70,7 +70,7 @@ Use @uref{http://savannah.nongnu.org/bugs/?group=avrdude} to report bugs. Copyright @copyright{} 2003,2005 Brian S. Dean -Copyright @copyright{} 2006 - 2008 J@"org Wunsch +Copyright @copyright{} 2006 - 2013 J@"org Wunsch @sp 2 Permission is granted to make and distribute verbatim copies of @@ -2495,6 +2495,24 @@ affected by this. See also: @url{http://www.libusb.org/ticket/6} +@item +Problem: after flashing a firmware that reduces the target's clock +speed (e.g. through the @code{CLKPR} register), further ISP connection +attempts fail. + +Solution: Even though ISP starts with pulling @var{/RESET} low, the +target continues to run at the internal clock speed as defined by the +firmware running before. Therefore, the ISP clock speed must be +reduced appropriately (to less than 1/4 of the internal clock speed) +using the -B option before the ISP initialization sequence will +succeed. + +As that slows down the entire subsequent ISP session, it might make +sense to just issue a @emph{chip erase} using the slow ISP clock +(option @code{-e}), and then start a new session at higher speed. +Option @code{-D} might be used there, to prevent another unneeded +erase cycle. + @end itemize