Problems when programming Xmega128A3U by AVRISP XPII

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

Hi everyone,

 

I'm trying to program an Xmega chip by using a XPII programmer. Can anyone kindly inform me what path I should choose for the flash memory? Is the hex file that I built by the code? If yes, the error message is "Unexpected answer size reading memory (got 3 bytes)", Or it should be some kind of usb boot loader? When I tried to erase the flash memory, there is another error "Error status received from tool: 0x02". Please help.

 

Wenyu

----------------------------------------

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

Did the "Read Signature" command work correctly?

That is the first step.

 

Are there any Lock Bits set in the micro?

Perhaps use the "Erase chip" / "Erase now" command to erase the entire chip, and to reset the lock bits, would them allow you to proceed.

 

Yes, the "Memories" should point to the .hex file the compiler generated.

 

JC

 

Edit: Typo

 

Last Edited: Tue. Sep 12, 2017 - 10:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Error status received from tool: 0x02

So, your third-party tool that emulates and AVRISP2 does not emulate it well... Seems you need to ask them smiley

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

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

The "Read Signature" command work fine. 

I just fixed the problem. My supply voltage was too low. The chip required a voltage of 3.3 to program I guess. That's how i get it works. Low voltage wouldn't allow me to erase chip either. 

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

It's the voltage. It works now. Thank you.

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

The Xmega128A3U has an operating voltage range of 1.6 to 3.6 V

 

Your screen shot shows 2.4 V, which I would have thought would work just fine.

 

The micro has a "Brown Out Detector", (BOD), which will hold the micro in Reset Mode if the supply voltage is lower than the BOD threshold voltage.

 

One can use the Fuses to turn the BOD on or off, and to set several different BOD threshold voltages.

 

I suspect you have the BOD enabled, and your supply voltage was lower than the BOD threshold, and that is why the chip was not working.

 

JC