[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] stk500v2 snapshot release
From: |
Martin Thomas |
Subject: |
Re: [avrdude-dev] stk500v2 snapshot release |
Date: |
Tue, 22 Mar 2005 22:35:39 +0100 |
Hello,
from -Colin:
About the new version being slower - have you changed the SCK clock from the
default value? This was a problem people with AVR Studio were having as well.
Now I think you can change the SCK clock frequency, but it defaults to
something really slow. Changing it from the default value to something more
suited to your target should speed up programming.
Because of the this problems I've tried to change the method how the
ISP-frequency ("SCK-clock") is set in my "avrdude-test-version" to mimic
the AVRStudio-plugin. The user can set the ISP-frequency (fISP) from
terminal-mode. It might be easier to set and verify "fISP<=f_target/4" than
calculating SCK-periods. Internal calculation is done with a function given
in the Atmel AppNote for the new protocol. Added a new command
"fisp" into terminal-mode for this (stk500v2 only). This code could be
integrated in Erik's version since basicly its just a small
"wrapper" around the sck_duration parameter setting.
(see stk500_2_print_parms1 and stk500_2_set_isp_freq
in stk500_2.c - link at end of mail)
from Brian:
Thanks Erik! I'm still planning to integrate your V2 support into the
existing stk500.c files assuming that can be done cleanly, then
rewrite the initialize routine to attempt to detect what protocol
version is installed and set the function pointers appropriately.
While the stk500-"v1" functions and stk500-"v2" functions might
be integrated in one source-file it may be easier to maintain the code
when they are kept in separate files.
In my "test-version" I've implemented some auto-detection which
probes for stk500-"v1" when stk500 is given from the command-
line. If the Version 1 Firmware does not "answer" an "auto-switch"
to stk500v2 takes place. This does work here and maybe the
method could be used in the official version.
(see stk500_2_probe_firmware1 in stk500_2.c and main-function)
In reply to the message "Safemode default behaviour change"
from Colin: I've also seen some problems with the savemode
being enabled by default. I've had problems during
the stk500v2-tests when the isp-frequency has been set too
high. Readout for fuses and locks has not been reliable so
the safemode-functions wrote fuse-values which were not
those on the AVR and "locked" some of my AVRs (now
unlocked again with parallel-programming). Maybe the
safemode could stay enabled by default and after the signature
has been read from the AVR the "ATMEL-byte" could
be checked. If it's not 0x1E safemode should be disabled
since the connection is not reliable or the ISP-frequency is
too high. (see main-function)
Other than in Erik's patch there are no values from the
XML-files used in "my" version, only those already
available in the old avrdude.conf. I've tested with different
AVR types and at least two others are using this version
on Win32 without problems.
To avoid misunderstandings: My "fork" is just some kind
of "design-study" since I've had already most of the coding
done (but some errors and not functional) before Erik
published his first patch. Afterwards I've just fixed the
errors and implemented the described extensions -
hopefully some of them are usefull for the official
avrdude.
Link to the my "test-version":
http://www.siwawi.arubi.uni-kl.de/avr_projects/#avrdudew32
Martin Thomas