PonyProg => "Write error (-21)"

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

Hi everybody!

I have a big problem, I hope someone here can help me with it!
When I try to "write device" in ponyProg2000 I get an error: "Write error (-21)" when about 30-50% is programmed (it always occupies when the "programming-done"-scale gets the same place!).

I tried to change the timevalues that the help-file in PonyProg, described, but that didn't help me at all.

The most annoying is that it works perfect in most times, but SOMETIMES I get this error and when it has occupied once it newer dissapear!
It look likes it is some error in THAT program I try to transfer (if I open an other program it works perfect again, and if I open the first program again, the error cames back!)
But when I compile, AVR GCC don't show any errors!

For a couple of days ago, I also got this error but I get around the error when I change a bit of the C-code! (I think!?!)

(And yes - I am a newbie in those programs!)

Sorry for my bad english!
Big tnx!
// Erik Wahlund

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

What OS are you running? Win95, 98, ME, 2000, XP?
Reiner

admin's test signature
 

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

Ohh, sorry!
Running on XP, (think that matter - it works in most cases!!! as I wrote)

admin's test signature
 

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

I had this problem, and changing the timer values solved it for me. To check, try reading the flash back from the chip after a failure. If the last byte programmed is a 7F, then it's a timing problem.

You need to ensure that the timing gets slower (larger delay values) do get around this.

Sean.

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

Thanks for the tips (even if its the same as the help-file told me :-)

When I tried to transfer the same (not recompiled!!!) program, it worked perfect again, and I had not done ANY changes at all (not the code, and not on any ini-file)

I guess the computer just needed a reboot (Windows :-D or something!!

sorry to bother you!

// Erik W

admin's test signature
 

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

When I tried to transfer the same (not recompiled!!!) program, it worked perfect again

As I say, I had exactly the same problems. The programmer would have about a 25% chance of hanging when trying to program a byte with the value 0x7F.

For a while, it was OK for me just to retry, but once I created big enough programs it was virtually certain that it would fail.

It's been a while since I have used Ponyprog (pre-2000 versions) - I now use a STK500, so that's about it for my advice. Did you try looking at the program memory after a failed write? What AVR chip are you trying to program?

Finally, have you asked this question on the forum over at lancos.com?

Sean.

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

Okay!,
I have not get the error again, so ... I had no reason to look at the program memory.
The chip I had problem whit was an 2313, but as I sad, it works perfectly now!

No I have not asked om lancos.com (thanks for the tip, newer heard about that site!...I will take a look) in the same reason as above.

Thanks for your ideas!
// Erik

admin's test signature
 

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

Today i get that error again!, the first I tried was increasing that timevalues, and that helped me!, no errors! :-)
(Confusing why it didn't help me before!)

but I'm still confusing why it worked on most programs but absolutly not on someone! (can the size of code whas the problem??)

Enough talking (writing) from me now!
Thanks alot!!!
// Erik

admin's test signature
 

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

Did you check for the 7f byte as was suggested?

Lee

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

I gotted that error today again!, I taked a look at the downloaded program, and YES, it is 0x7F at the end of code (before all 0xFF's)

I was tired about the error, so I tried to increased the timeing values in steps (about doubling each value), And it start to wors more and more often, Now I had the values: 500 (!!!) on each (both AVRByteWriteDelay and AVREraseDelay) and it seems to works (I have not tested so much times yet)!

I newer tried THAT high values before (its about 2500% resp 1000% larger than the "orgin. values") (I tried befor this values 200 resp 500 and that didn't work for 100%)

I will try this values, and supposily went back here if there is more problems!

Thanks!
// Erik

admin's test signature