|
From: | Bob Paddock |
Subject: | Re: [avrdude-dev] EEPROM fails verification on ATmega645 with pony-stk200 hardware? |
Date: | Fri, 14 Jul 2006 15:23:39 -0400 |
User-agent: | Opera M2/8.54 (Win32, build 7730) |
I found one more bit of information to explain what is going on: If you are using a parallel port dongle like the pony-stk200 and you have defined the loadpage_lo/writepage sections in the part entry for the EEPROM area, avrdude seems to become confused. Doing so seems to cause avrdude to use the loadpage_lo op-code where it should be using the write op-code, when using the parallel port dongle. Simple solution is to removed the loadpage_lo and writepage from the eeprom section. Then the EEPROM programs and verifies just fine. The downside to that solution is that the STK500V2 then stops working with the error "load page instruction not defined". Can someone with more insight into the code point me in a direction to look? This parallel dongle issue probably effects the Mega169 as well, but I did not have one to test with at hand. What happens in this function when you have only LOADPAGE_LO defined (Mega645 does not list a LOADPAGE_HI for the EEPROM)?: avr.c: int avr_write_byte_default(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, { ... /* * determine which memory opcode to use */ if (mem->op[AVR_OP_WRITE_LO]) { if (addr & 0x01) writeop = mem->op[AVR_OP_WRITE_HI]; else writeop = mem->op[AVR_OP_WRITE_LO]; caddr = addr / 2; } else if (mem->op[AVR_OP_LOADPAGE_LO]) { if (addr & 0x01) writeop = mem->op[AVR_OP_LOADPAGE_HI]; else writeop = mem->op[AVR_OP_LOADPAGE_LO]; caddr = addr / 2; } else { writeop = mem->op[AVR_OP_WRITE]; caddr = addr; } ... }On Thu, 13 Jul 2006 21:02:16 -0400, Bob Paddock <address@hidden> wrote:
Today I moved over to a pony-stk200 that production uses (much cheaper to replace when they kill it), and I can not get the EEPROM to program in any of my boards when using the pony-stk200 hardware. The Flash and Fuses still program just fine with the pony-stk200.I had some more time to look at the problem today. Can someone please explain to me this sequence of events?: avrdude: reading input file "main.eep" avrdude: input file main.eep auto detected as Intel Hex avrdude: writing eeprom (579 bytes): Writing | bitbang_cmd(): [ A0 00 00 00 ] [ 00 A0 00 FF ] bitbang_cmd(): [ C1 00 00 09 ] [ 00 C1 00 00 ] bitbang_cmd(): [ A0 00 00 00 ] [ 09 A0 00 FF ] bitbang_cmd(): [ A0 00 00 00 ] [ 00 A0 00 FF ] [Repeated 136 more times.]
[Prev in Thread] | Current Thread | [Next in Thread] |