- WINXP - STK500v2 - Mega168 - Clock (intern 8Mhz) -> 62Khz ( nach CLKPR=0x80; CLKPR=0x07;) Nun kann ich zwar mit AVR-Studio bei einer ISP-Frequenz von ca.4Khz meinen Controller flashen, würde das allerdings wieder gern direkt aus WINAVR heraus machen. Mit welcher Einstellung / Kommandozeilenschalter im Makefile kann ich die ISP Frequenz auf meinen geforderten Wert absenken? Vielen Dank AxelR.
`-i DELAY'
For bitbang-type programmers, delay for approximately DELAY
microseconds between each bit state change. If the host system is
very fast, or the target runs off a slow clock (like a 32 kHz
crystal, or the 128 kHz internal RC oscillator), this can become
necessary to satisfy the requirement that the ISP clock frequency
must not be higher than 1/4 of the CPU clock frequency. This is
implemented as a spin-loop delay to allow even for very short
delays. On Unix-style operating systems, the spin loop is
initially calibrated against a system timer, so the number of
microseconds might be rather realistic, assuming a constant system
load while AVRDUDE is running. On Win32 operating systems, a
preconfigured number of cycles per microsecond is assumed that
might be off a bit for very fast or very slow machines.
`-B BITCLOCK'
Specify the bit clock period for the JTAG interface or the ISP
clock (JTAG ICE only). The value is a floating-point number in
microseconds. The default value of the JTAG ICE results in about
1 microsecond bit clock period, suitable for target MCUs running
at 4 MHz clock and above. Unlike certain parameters in the
STK500, the JTAG ICE resets all its parameters to default values
when the programming software signs off from the ICE, so for MCUs
running at lower clock speeds, this parameter must be specified on
the command-line.
1 | AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) |
2 | AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) |
3 | AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) |
4 | AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) |
5 | AVRDUDE_FLAGS += -B 22 |
mit '-i' gehts nicht:( Ist bei mir in der Hilfe auch nicht aufgeführt. '-B' hatte ich gefunden. Da dort aber explizit das JTAG ICE erwähnt wurde, hatte ich es nicht probiert. '-B 22' ist das schnellste, was bei 62Khz CPU-Clock funktioniert: avrdude: writing flash (5956 bytes): Writing | ################## | 100% 14.56s Bei '-i 22' hingegen: > "make.exe" program avrdude -p atmega168 -P com1 -c stk500v2 -i 50 -U flash:w:CLOCK_SLOW.hex avrdude: unknown option -- i Usage: avrdude [options] Options: -p <partno> Required. Specify AVR device. . . . Danke für die schnelle Hilfe AxelR.
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.