[bug #48261] STK500V2 ISP problem with ATmega8/8515/8535, ATmega16 and ATmega32 #425
Description
Johnny Quest scotty264b@gmx.com
Sat 18 Jun 2016 04:51:15 AM UTC
Hello:
First off, I have done my homework on this matter and would not have posted seeking assistance unless it was a last resort. smiley
This message was posted on AVR FREAKS. http://www.avrfreaks.net/forum/atmega32a-avr-dragon-programming-flaky-ness
Background: Ex-disti-FAE for ATMEL as one of my support lines. Very familiar with ATmega48/88/168/328, ATtiny25/45/85, ATmega32U4, AT90USB1286 (and somewhat on the ATmega2560).
Development environment: Using Linux for development running AVR STUDIO in a "Virtual WINDOWS" environment. AVRDUDE V6.3 for Linux. ATmega32A, 16MHz external crystal, VCC = 5V (PwrSup is 1A capable). Fuses set for external high-freq crystal, bootloader at 0x7E00, bootloader reset enabled (lfuse = 0x8F hfuse = 0x96).
Quandary: developing code for ATmega32A; when using AVRDUDE to program FLASH using ISP with "DRAGON_ISP" programmer, AVRDUDE fails with:
avrdude: verification error, first mismatch at byte 0x7e00
0xff != 0x0f
Command line invokation is:
avrdude -u -p m32 -c dragon_isp -B 1MHz -U flash:w:AVR_Specific_Builds/m32/ATTOBASICV234_m32-16MHZ-uart_btldr.hex
Partial dump from original HEX file around address 0x7E00:
:107D00000000000000000000000000000000000073
:107D10000000000000000000000000000000000063
:107D20000000000000000000000000000000000053
:107D30000000000000000000000000000000000043
:107D40000000000000000000000000000000000033
:107D50000000000000000000000000000000000023
:107D60000000000000000000000000000000000013
:107D70000000000000000000000000000000000003
:107D8000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03
:107D9000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3
:107DA000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE3
:107DB000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD3
:107DC000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC3
:107DD000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB3
:107DE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA3
:107DF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF93
:107E00000F92CDB7DEB711248FE598E09EBF8DBFEE
:107E100084B714BE81FFD6D085E08EBD82E08BB9D9
:107E200088E18AB986E880BD80E189B98EE0B5D065
:107E3000BD9A26E080E39CEF54E040E29DBD8CBDFE
:107E400058BF08B602FEFDCF38B3342738BBA8951B
:107E50002150A1F788249924CC24C394F5E0DF2E87
:107E6000E1E1EE2E73E0F72E91D0813469F48ED0EB
:107E7000898398D08981823811F1813811F485E0A5
:107E800001C083E07FD07BC0823411F484E103C061
:107E9000853419F485E08ED072C0853561F476D0D2
:107EA000082F10E073D090E0982E8824802A912A21
:107EB000880C991C63C0863521F484E07BD080E077
:107EC000E1CF843609F03FC061D060D0B82E5ED0DB
:107ED00080E0881680E7980618F4F401F7BEE8956C
:107EE00000E610E053D0F80181938F01BA94D1F7E6
:107EF000F0E08F16F0E79F0618F0F401F7BEE89562
Addresses 0x7D00 to 0x7DFF is waveform data for DDS function.
After failure, partial dump of reback of FLASH memory around address 0x7E00. Even the data starting at 0x7D00 is incorrect.
:107D0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF83
:107D1000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF73
:107D2000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF63
:107D3000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF53
:107D4000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF43
:107D5000FFFF000000000000000000000000000025
:107D60000000000000000000000000000000000013
:107D70000000000000000000000000000000000003
:107D8000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03
:107D9000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3
:107DA000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE3
:107DB000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD3
:107DC000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC3
:107DD000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB3
:107DE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA3
:107DF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF93
:107E0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF82
:107E1000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF72
:107E2000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF62
:107E3000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF52
:107E4000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF42
:107E5000FFFFA1F788249924CC24C394F5E0DF2EFA
:107E6000E1E1EE2E73E0F72E91D0813469F48ED0EB
:107E7000898398D08981823811F1813811F485E0A5
:107E800001C083E07FD07BC0823411F484E103C061
:107E9000853419F485E08ED072C0853561F476D0D2
:107EA000082F10E073D090E0982E8824802A912A21
:107EB000880C991C63C0863521F484E07BD080E077
:107EC000E1CF843609F03FC061D060D0B82E5ED0DB
:107ED00080E0881680E7980618F4F401F7BEE8956C
:107EE00000E610E053D0F80181938F01BA94D1F7E6
:107EF000F0E08F16F0E79F0618F0F401F7BEE89562
All other ATmega devices program properly using ISP and JTAG, without incident, so I do not believe it is the DRAGON. The ATmega32A programs properly using JTAG with AVRDUDE and DRAGON, only ISP fails using AVRDUDE. Using DRAGON (1MHz sck) under AVR STUDIO, ISP programming is successful.
I have tried ISP with USBASP and USBtinyISP as well and they function correctly.
I have tried with V6.3, V6.2 V6.0 of AVRDUDE. V5.x versions fail to communicate with DRAGON due to "parallel port connection error" (?????DRAGON is USB!!) I have looked at the avrdude.conf for other "compatible devices" and found ATmega328p and ATmega329 are accurate. Using AVRDUDE "-F" switch produces the same verification failure with these two part definitions.
I have tried various "-B" settings for AVRDUDE to no avail.
I have tried using external 8MHz crystal to no avail.
I have tried using internal 8MHz oscillator to no avail.
I have four (4) NEW ATmega32A's, none are blown as I can successfully program all of them using JTAG, USBtinyISP and USBasp but using DRAGON_ISP, all fail in the same manner.
Chinese fakes? I do not see how as these parts do not look like it. They have ATMEL logo and date code of "1508".
Is this an AVRDUDE issue, an ATmega32A issue or combination of both?
Does anyone have any answers, ideas or clues to offer?
Thank you in advance.
Peace and blessings,
Scott
file #37526: ATTOBASICV234_m32-16MHZ-uart_btldr.hex
file #37550: ATTOBASICV234_m16-16MHZ-uart_btldr.hex
This issue was migrated from https://savannah.nongnu.org/bugs/?48261