avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] Can't erase an ATmega644p + timing error


From: Ing. Daniel Rozsnyó
Subject: Re: [avrdude-dev] Can't erase an ATmega644p + timing error
Date: Tue, 25 Jun 2013 21:35:20 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121026 Thunderbird/16.0.2

That does happen also on a different PCB, with different mcu (ATmega88) and different programmer ("arduino-ft232r" - no buffer is there now).



$ avrdude -c arduino-ft232r -P usb -p m88 -e

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e930a
avrdude: erasing chip
avrdude: Device is not responding to program enable. Check connection.



The chip actually gets erased and I can program it using the -D option in the next run:


$ avrdude -c arduino-ft232r -P usb -p m88 -D -U flash:w:dp2lcd.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e930a
avrdude: reading input file "dp2lcd.hex"
avrdude: input file dp2lcd.hex auto detected as Intel Hex
avrdude: writing flash (1346 bytes):

Writing | ################################################## | 100% 0.41s

avrdude: 1346 bytes of flash written
avrdude: verifying flash memory against dp2lcd.hex:
avrdude: load data flash data from input file dp2lcd.hex:
avrdude: input file dp2lcd.hex auto detected as Intel Hex
avrdude: input file dp2lcd.hex contains 1346 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.40s

avrdude: verifying ...
avrdude: 1346 bytes of flash verified

avrdude: safemode: Fuses OK
avrdude done.  Thank you.




Without the -D it erases the chip and then stops:


$ avrdude -c arduino-ft232r -P usb -p m88 -U flash:w:dp2lcd.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e930a
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: Device is not responding to program enable. Check connection.


avrdude done.  Thank you.




( That's today SVN trunk version )

I have tried to remove the strange not-exiting, by commenting out some calls in the closing code:


//        ftdi_usb_close(handle);
// ftdi_deinit (handle); // TODO this works with libftdi 0.20, but hangs with 1.0
//        ftdi_free(handle);


The code actually hangs sooner than the comment indicate, on ftdi_usb_close(). When I commented it out, it hangs on the deinit and so on, so that all three have to go out to make avrdude to exit (and not break my makefiles).


And there is some timing issue as well - when I have an empty MCU, I must set the fuses with -b 1200 speed option. On -b 9600 it does not work. I have looked to the source code - avrdude multiplies the freq by 2, and libftdi by another 4. Is that still correct? I can make some measurement using my digital scope if needed... as this is really annoying that the hardware does something different than we would expect.


Daniel


On 06/25/2013 02:50 PM, "Ing. Daniel Rozsnyó" wrote:
Hi,
    I am unable to work on a project which uses an ATmega644P part
because avrdude behaves strange.

    1) it wont exit after processing all operations, all the time I have
to use Ctrl+C

    2) it is not able to erase the chip, but it is able to program it!
(see the attachments)

Any idea?

Daniel



_______________________________________________
avrdude-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/avrdude-dev





reply via email to

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