ispEnterProgMode: Error status received: Got 0xc0, expected 0x00

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

When I used Atmel ICE programming an Atmage328p MCU, the second last step failed:

 

When I went to "Device Signature", this prompted:

 

"Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00"

 

The "Target Voltage" testing was OK.

 

How to fix it?

Attachment(s): 

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

Is your ISP connection correct?
Is the reset pin capacitor removed?
Is a clock supplied to the device?

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

Or, is the device in debugWire mode?

:: 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

Before this prompt, there was another prompt. It said the Device Voltage was wrong, is this the reason?

Attachment(s): 

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

This is my wiring.(in attachment)

Attachment(s): 

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

I used the chip I have just used in Arduino IDE, so there was bootloader inside, is this the reason?

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

Presence of bootloader is not this  issue. It is happy to write on top of the bootloader and wipe it out.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

I used PC USB port power, when I test the USB voltage, it was 5.13V, while, after I power it for Atmega328p (connected with Atmel ICE), the voltage fall to 0.14V.

 

and, the prompt in Atmel Studio 7.0 was:

 

"Read voltage -0.1V is outside selected device's operating range: 1.8 V to 5.5 V."

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

 

It's a lot more helpful if you put the pictures in your post - where we can see them:

For instructions to do that, see Tip #1 in my signature.

 

That's telling you that the supply voltage is -0.2V. 

 

surprise

 

Clearly, the chip is not going to work at that voltage at all - and, therefore, your debugger can't connect to it!

 

MianQi wrote:
This is my wiring

Again:

 

we really can't see anything much from that at all!

 

please post a proper schematic (aka "circuit diagram").

 

MianQi wrote:
when I test the USB voltage, it was 5.13V, while, after I power it for Atmega328p (connected with Atmel ICE), the voltage fall to 0.14V.

Clearly, that's a problem!

 

Looks like you're shorting something out!

 

Remember that a PC USB port may only supply 100mA ...

 

MianQi wrote:
 the prompt in Atmel Studio 7.0 was:

 

"Read voltage -0.1V ... 

That really means, "too low to measure properly" - so the -0.1V is really just noise.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Thu. Mar 12, 2020 - 08:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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

There's a lot more in your photo than you've just shown there!

 

How, exactly, are you supplying the power to it ?

 

How about simplifying your breadboard to have what you've shown, and nothing else - does that work?

 

make the layout neat.

 

Note that the crystal and its capacitors need close to the chip pins, and with very short connections.

Similarly the 100nF capacitor.

 

If it doesn't work,  post a good, clear, in-focus, close-up photo so the we can see & check the wiring.

 

May well need to be more than one photo to see everything clearly.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rather than throw in all the doubts & uncertainties of breadboards & homebrew wiring, why not just use an ATmega328P XPlained Mini board:

 

https://www.avrfreaks.net/forum/xplained-mini-mega328pb

 

https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ATMEGA328P-XMINI

 

That way you get known-good hardware to start learning & experimenting on ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for you all, inspired by your suggestions, I found a solution:

 

 

Using an Arduino UNO as bridge.

 

But there was still an error, when I verified the Flash, there was it. While, when I didn't verify the Flash, just program, it went through.

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

Why? Why? Why?

 

In Atmel Studio 7.0

 

There are "program" button in "Device Programming --> Memories" and "Device Programming --> Production file".

 

this disturbed me half a morning.surprise

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

So, solution is: One should use "Program" in "Memories", not "Program" in "Production files".

 

The file in "Memories" is .hex format, while in "Production files" is ELF firmat.

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

MianQi wrote:
 I found a solution ...  Using an Arduino UNO as bridge

 

That is not a solution to the original problem that you posted - which was that the Target AVR had no power.

 

There is no way that anything could program a chip which has no power!

 

Somehow, you have fixed the original problem as a byproduct of re-arranging your stuff.

 

Mostly likely, it was a wiring problem which got correct in the course of the rearrangement.

 

Anyhow, if it's not solved, please mark the solution - see Tip #5 (in my signature)

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Fri. Mar 13, 2020 - 07:13 AM