avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] Problem with avr910


From: Charles Steinkuehler
Subject: [avrdude-dev] Problem with avr910
Date: Mon, 16 Feb 2004 15:24:56 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

I'm having problems with the avr910 programmer code in all recent versions of avrdude upto and including 4.3.0. Avrdude is loosing sync with my programmer after sending a single-byte 'y' command to clear the LED.

I'm running on a windows system, and have tried both the windows installer and compiling from source under cygwin, with similar results, but I think the problem I'm having would affect the linux version, as well.

The problem looks like it stems from a bug in the original AVR app-note #910 code for the programmer chip. The code for the 'x' and 'y' LED commands are documented to require an additional byte of data, but the provided .asm code only reads the initial command byte before returning #13, indicating the command compleated successfully.

I'm running boot-block code for in-system updates via the serial port based on the code from AVR-Freaks Design Note #32 (modifed to add the HW version command to make avrdude happy). This code expects the documented second byte after an 'x' or 'y' LED command.

As a point of reference, the avrprog program from Atmel will happily talk to my boot-loader code as-is (2-byte LED commands and no hardware version command). If I modify the 'y' command to return w/o expecting a second byte, avrdude will work, but avrprog throws a 'sync' error when programming.

This *shouldn't* even be an issue, as all the LED code in avr910.c is 'no-ops'. A bit of digging, however, turns up the avr910_write_setup procedure, which not only does a single-byte 'y' command, but includes a comment about cryptic programming problems:

<code>
/*
* For some reason, if we don't do this when writing to flash, the first byte
* of flash is not programmed. I susect that the board got out of sync after
* the erase and sending another command gets us back in sync. -TRoth
*/
static void avr910_write_setup(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m)
{
 if (strcmp(m->desc, "flash") == 0) {
   avr910_send(pgm, "y", 1);
   avr910_vfy_cmd_sent(pgm, "clear LED");
 }
}
</code>

Pertinant verbose output from avrdude:
avrdude: reading input file "/cygdrive/c/Projects/Delphi/Hygrometer-App/Hygrometer-0103.hex" avrdude: input file /cygdrive/c/Projects/Delphi/Hygrometer-App/Hygrometer-0103.hex auto detected as Intel Hex
avrdude: writing flash (7470 bytes):

Writing |                            | 0% 0.00savrdude:
Send: y [79]
avrdude: serial_recv(): programmer is not responding

--
Charles Steinkuehler

address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]