Mega16, flash verify fails

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I just plugged a Mega16 into my STK500. All is well (code programs into flash and runs after a reboot) except verification of the flash programming.

AVRStudio (version 4.11 build 401) says in the STK500 window:
"Programming FLASH .. OK!"
"Reading FLASH .. FAILED!"
"Leaving programming mode.. FAILED!"

A popup window named "STK500/AVRISP/JTAGICE" says:
"Problems occured when executing command(s). Please check the history window. See the troubleshooting section in help for information on what may have caused the problems."

Are my fuse bits wrong? haven't worked with Mega16 before. Hints are welcome!

Greetings,

Børge

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Borge
How can somebody tell you if te fuse settings are wrong when you have not published them?

Keep it simple it will not bite as hard

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

select: "erase device before programming"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Good point! I plugged in the chip with default fuse settings, assuming they would work with STK500. Here are the bits that are set:

JTAG Interface Enabled
Boot Flash section size=1024
Brown-out detection at 2.7V
Ext. Clock; 6CK+64ms (I use the clock on STK500)

I don't know if I should have Serial program downloading (SPI) enabled. In my window it is gray with a red question mark in the corner.

In the LockBits section the set bits are:
Mode 1: No memory lock features enabled
Application Protection Mode 1: No lock
Boot Loader Protection Mode 1: No lock

--
Børge

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparkymark567 wrote:
select: "erase device before programming"

Already have it selected. Same problem if I unchecked it that setting. I have ISP programming mode and Verify Device checked.

--
Børge

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Usually on the STK500 you would use the ISP programming method and not JTAG so you can uncheck JTAG enable. SPI is gray...as that's what you are using (I think).

Also, check the lock bits....and ensure that no memory lock features are enabled.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the tip. But the Flash read still fails with JTAG unchecked and erase device checked.

--
Børge

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think its an error with avr studio, I got same error with m128 and AVRISP had to down grade to AVR studio 1.09

Troy