ATMega16 remains "FF" after programming via AVR Studio & JTAG Ice-Cube
2010-09-05 by Chuck Hackett
When I select "Build and Run" from the "Build" menu the build is successful and the
progress bar shows "loading program memory
" (and red led on Ice-Cube is flashing as
normal) then "loading event memory
" with no errors. Message panel shows "Loaded
objectfile:
. RSS.elf" and no errors but, when I display "program memory" from
within AVR Studio all memory remains erased ("FF").
Configuration:
- AVR Studio 4.16 (I looked at newer version change logs but it apparently just
addresses newer Atmel processors and debugging devices)
- ATMega16L mounted in a development board (Olimex AVR-P40) with external 8.000 mhz
Xtal
- Loading and debugging via JTAG "Ice-Cube"
I have programmed and tested a different processor using the same setup (just
swapped processors in the development board) and they worked fine.
Unfortunately, the other processors that worked are now installed in devices that
are in the field being tested so I can't compare fuse settings, etc.
The fuse settings of the device I am trying to load are:
(High=0x0B, Low=0xFF)
Checked:
OCDEN, JTAGEN, SPIEN, CKOPT
Unchecked:
EESAVE, BOOTRST, BODEN
Other:
BOOTSZ = Size=512 words, Start=$1E00
BODLEVEL = VCC=2.7v
SUT_CKSEL = Ext. Xtal, High Freq., Stratup: 16k CK + 64 ms
I get the same results when I use the Connect dialog to program the device.
In all cases, the device resets but, when it runs the user LED on the board does not
light as it does with the other processors when my program runs. This would seem to
confirm that memory is all "FF"s and the "view program memory" dialog is showing
correct data - i.e.: the ATMega16 did not program.
Whenever I stop the processor with AVR Studio, the program counter is at 0x00173E.
When I use the Memory dialog to alter "Data" (RAM) to 0 the light on the Ice-Cube
flashes and the content display shows 0 very briefly (only visible if I hold down 0
so that it repeats) but goes right back to "FF".
Any thoughts as to why it apparently will not program but AVR Studio does not report
a problem?
(BTW: In the past I thought that I had seen the AVR Studio "progress bar" go
through a "verifying program memory..." after the "loading program memory
" but I
don't see it this time. Is there a setting somewhere to cause AVR Studio to verify
after programming? (I see a verify option under the "auto" tab on the "Connect"
dialog but this is apparently only in effect when you are using the "Connect" dialog
to program the device.)
Cheers,
Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844 http://www.whitetrout.net/Chuck