Cannot Write Flash nor Fuse Atmega1284p

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

Hello,

I am trying to program newly bought ATMEGA1284p with miniAVR StK500 Programmer in AVR Studio 4.

"Read Signature" is OK.
Erase is also OK.

But when I try to program a hex file or setting a fuse bit; then i get verification error in both cases. I also unchecked verification box and READ the written hex file which shows all FFFF...'s means hex file was not written.
Also I have not been able to Program it since the time I bought it, so all the fuse settings are DEFAULT.

The Programmer is working Fine for ATMEGA16.
Does it means that my micro-controller is dead ? if so, can it be revived ?

Any suggestion is welcomed...
Thanks.

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

Erase the chip, switch the power off and on again - you have probably set the protection fuses.

And please delete your other (duplicate) post while it hasn't been replied yet.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

what is your programming speed?

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

Try another AVR programmer? I have talked with others who have had issues programming the 1284P with some programmers.

I have programmed this chip with the ATMEL AVRISP mkii programmer with no problems.

Someone was just telling me yesterday that they weren't able to program the 1284P with the USBTinyISP programmer (they said that this could only program 64k Flash max devices). I've never used this programmer, so I can't speak from personal experience. Can someone else please verify/refute this????

Beau
www.goEWS.com (Wireless Modules/Breakout Boards -and- AVR Breakout Boards)

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

ISP programmers obviously need to be physically able to connect to the actual hardware SPI, TPI, PDI, JTAG interface.

So if you have an SPI type programmer, you should be able to program any AVR which allows SPI programming. However the software needs to know about any new chips.
e.g. avrdude5.10 knows about ATmega1284P but was released before ATmega1284 was ever made.

So if you use a modern avrdude or Studio version, you should be able to program your AVR.

Difficulties arise with Indian or Chinese programming software. They tend to only 'know' old-fashioned AVRs, and have no method of adding 'new' devices.

I have no idea what 'miniSTK500' may be. With luck, it will work with Studio4.19 or avrdude.

David.

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

The ISP Frequency is 5.946KHz.
I also tried to program my atmega1284p via ponyser programmer through serial cable and same error comes.
My programmer is currently only working with avr studio 4 and studio 5 cannot detect it. Maybe the firmware is old.

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

http://www.sure-electronics.com/...

This is the programmer I am using and sadly it does not have ATMEGA1284P listed in the compatible devices. :|

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

I would put serious money on your Sure programmer working perfectly well with Studio4.19

I suspect that you have inadvertently altered the clock fuses. Read Cliff's tutorial.

David.

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

I am not able to detect any incorrectly configured fuse bits here:
Screenshot attached.

Please verify...
Thanks.

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

Everything looks absolutely fine to me.

Go to the Main tab, and read the signature.
Then you can go to the Programming tab.
Erase the chip, and program the Flash.

Let us know how you get on.

David.

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

Read Signature Gives:

Entering programming mode.. OK!
Reading signature .. 0x1E, 0x97, 0x05 .. OK!
Leaving programming mode.. OK!

Erase gives:
Entering programming mode.. OK!
Erasing device.. OK!
Leaving programming mode.. OK!

But Program command gives:
Getting isp parameter.. SD=0x19 .. OKOK
Reading FLASH input file.. OK
Entering programming mode.. OK!
Programming FLASH .. OK!
Reading FLASH .. OK!
WARNING: FLASH byte address 0x0000 is 0xFF (should be 0x0C).. FAILED!
Leaving programming mode.. OK!

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

What version Studio are you using? v4.18 or v4.19 should work fine.

That seems strange. In the Main tab, set the ISP frequency to 125kHz or similar.

Try again.

David.

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

I am using AVR Studio 4.13, downloading 4.19 right now. Lets see how it turns out :anxious:

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

ahmed34234 wrote:
I am using AVR Studio 4.13, downloading 4.19 right now. Lets see how it turns out :anxious:

AVR Studio 4.19 cannot recognize the AVR ISP device now. I was using Studio 4.13 earlier.

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

How does your Sure programmer appear to the PC?

I guess that it just looks like a normal COM port.
So you select COM4 or whatever COM# it uses, and tell Studio4.19 or Imagecraft or CodeVision or avrdude or ...

It should work perfectly with all AVR software ever invented. (except perhaps Studio5)

David.

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

Programmer is now working with AS 4.19, rest is same.
Can you choose one of the following possibilites:
1. Is the microcontroller dead ?
( because I also tried the ponyser programmer before this programmer and I faced exactly the same error in avrdude through serial programmer.)

OR

2. Programmer does not support ATMEGA1284P ?
( as it is not enlisted in the page of sure electronics http://www.sure-electronics.com/...
and it is programming other microcontrollers okay. Plus the signature/hex/fuse of ATMEGA1284P is read okay. Problem is in the writing.)

BTW can a mircocontroller be rendered as dead if its signature matches the device signature?)

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

Please read Signature, fuses, lockbits and report back.

Yes. You can get a good Signature with a dead chip. If you wear out the Flash with continuous SPM commands.
It is very unlikely that your ATmega1284P is dead.

OTOH, I would not trust PonyProg with anything.

If you say which country you live in, there may be a neighbour who can try the ATmega1284P in a STK500.

David.