PDI: Unexpected answer size reading memory (got 3 bytes)

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

Haven't seen this one before: When I try to program, studio complains "Unexpected answer size reading memory (got 3 bytes)"

    New xMega8E5, not one recycled from a previous project
    New board, so a mistake wouldn't be surprising.
    Target Voltage says 3.0
    Reads signature as 0x1E9341
    ISP MK II

I'm starting with the volt meter and magnifier now.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Happened several times.

Unplugged the USB plug. Closed the programming dialog. Started it up again. Read the voltage. Read the signature. Read the device info. Read the fuse bits. Read the lock bits. FAILED to read the production signature! Tried again to program the flash and now it programmed the flash.

How odd. Production signature still can't read the DACA1GAINCAL byte.

Starting operation read registers
Reading register RCOSC8M...OK
Reading register RCOSC32K...OK
Reading register RCOSC32M...OK
Reading register RCOSC32MA...OK
Reading register LOTNUM0...OK
Reading register LOTNUM1...OK
Reading register LOTNUM2...OK
Reading register LOTNUM3...OK
Reading register LOTNUM4...OK
Reading register LOTNUM5...OK
Reading register WAFNUM...OK
Reading register COORDX0...OK
Reading register COORDX1...OK
Reading register COORDY0...OK
Reading register COORDY1...OK
Reading register ADCACAL0...OK
Reading register ADCACAL1...OK
Reading register ACACURRCAL...OK
Reading register TEMPSENSE0...OK
Reading register TEMPSENSE1...OK
Reading register DACA0OFFCAL...OK
Reading register DACA0GAINCAL...OK
Reading register DACA1OFFCAL...OK
Reading register DACA1GAINCAL...Failed!

Now I'm looking at a row of black boxes on my 2x16 character LCD, but that's not surprising as I just tried porting Peter Fluery's 4 bit mode code to xMega for the first time.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Works first try every time now. I need a shrug smiley.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

And now the dark boxes are gone.

Tip: Forget the Peter Fluery code. Use the code from the tutorial section. Peter tries to cover every possibility with lots of defines and ifs and such, but naturally, never thought of an xMega. The code in the tutorial section is much easier to read and adjust.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

I am experiencing the same problem. At the end, do you know what was the problem? I get the same unexpected error. And before trying to erase the memory, you can read everything: Read the voltage. Read the signature. Read the device info. Read the fuse bits. Read the lock bits.
I tried restarting my computer, but it didn't help.

Some more information:
Error dialog: "TCF command:Modules:writeToMemoryfailed"

I am using an ATXMEGA128A4U, and I am programming using an AVRISP mkII, and PDI interface.

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

It eventually just went away and hasn't happened again. No doubt it will come back when I need to get something programmed NOW.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

a.murray88 wrote:
I am experiencing the same problem. At the end, do you know what was the problem? I get the same unexpected error. And before trying to erase the memory, you can read everything: Read the voltage. Read the signature. Read the device info. Read the fuse bits. Read the lock bits. I tried restarting my computer, but it didn't help. Some more information: Error dialog: "TCF command:Modules:writeToMemoryfailed" I am using an ATXMEGA128A4U, and I am programming using an AVRISP mkII, and PDI interface.

 

did you find solution to that?

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

Look at your bypass capacitors. Make sure there is one on EVERY supply pin, close to the chip.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

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

Could this be an AS7 problem?   I've read of people having problems with AS7. 

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

I had this problem in December of 2013. AS7 didn't exist then. I've done lots since then.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut.