8515 programming problems

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

I am useing the stk500 kit and AVR studio 3.2 and when I program the device I get a error massage:

Problems occured when executing command. Check history window.

And in the history window:

Programing FLASH using block mode... 0% FAILED!

What am I doing wrong. Is this a problem with a block that is not erased or can I only program one block at the time. My program is 150 words.

If I erase the flash separetly and then program the device a part of the program is stored.I have written my code in many smal steps and when it was over 120 words or something like that the problems began. Before that everyting went acording to plans. I have checked that the ISP6PIN header is connected to SPROG3 header
. If I use a preveus version of my code it works fine but if use the 150 word code I get the error massage but a part of that code is stored in the flash and works fine and when the device reaches the last instructions the program counter resets and it starts all over again. If I try to read the fuses or lockbits the program tells me that these are not suported by this devise. why is that?

Thanks in advance Mikael.

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

Mikael, have you tried using a different AVR? The symptoms sound like your micro might be bust. Try to erase the micro; then try to fill the buffer with FF, and program that and verify; next try 0; program that and verify, finally try 0F and F0.

If your AVR is older some of the flash might be damaged. The reason why I use the patterns above is because sometimes old flash can be set but not cleared, or vice versa, and programming it with these full patterns will show dead areas.

If it's a brand new STK500 and you can simulate this behaviour on more than one device, the issue must be cabling/software.

On that topic, I have a couple of old 8515's that are totally stuffed in the first couple of bytes; I simply use .org to move the program start to a 'healthy' portion; but this might not always work. Also, forget using interrupts when the first couple of bytes are nuked, as the interrupt vectors are stored here :(

Hope this helps - any additions / corrections welcome ;)
Andi

admin's test signature