Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool) Unable to enter programming mode.

Go To Last Post
82 posts / 0 new

Pages

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

Darien wrote:

I get same error...I tested on: ATmega16, ATmega8, ATtiny13A, Atmega328P (on Arduino-UNO R3 board) all working good...

 

So which chips don't work?

 

And why don't you have any decoupling capacitors?

 

Show your ISP connections.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

You need to add power bypass caps  (100nf) mounted as close as possible to the two pairs of power pins (7-8, 20-22).

 

Jim

 

 

FF = PI > S.E.T

 

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

Darien, when the failure is there and you run the non project device programming. what happens if you then select another chip, do a read target voltage and switch back to the right processor?

 

I have not been able to spend time on my project so have not had the chance to have a more detailed look into what the driver state is when things fail.

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

meslomp wrote:

Darien, when the failure is there and you run the non project device programming. what happens if you then select another chip, do a read target voltage and switch back to the right processor?

I do not try such steps.

 

Problem is:

Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)

Unable to enter programming mode. Verify device selection, interface settings, target power, security bit, and connections to the target device.

 

...when you try to read device: Device information -> Read. --> so you can't to program you chip.

 

What I discover:

1) I try to read device information on my Arduino UNO R3 -) -> it worked. I manage to read device information.

2) On board my own design I can't read device information (microcontroller info)

2) I try to duplicate ISP chip connection from Arduino UNO R3 circuit:

As you can see from Arduino UNO R3 circuit:

a) you need add resistor 10 kOm between RST and POWER <- present in my own board design

b) cristal for XTAL1 and XTAL2 chip pins with two capacitors connected to GND <- present in my own board design

c) resistor beetwen XTAL1 and XTAL2 chip pins <- not present in my own board design. I don't know purpose of this resistor.

d) diode beetwen POWER and RST <- not present in my own board design. I don't find in store any to connect.

e) MOSI, MISO, SCK don't have any connection to something (resistors, diodes, capacitors) -> chip pins connected straight to Atmel-ICE

f) capacitor 100nF beetwen POWER and GND <- present in my own board design

 

Next step: I build two testing boards with duplication of ISP connection from Arduino UNO R3

...one board working (I can read device info and programm microcontroller)  <- on this board I use SMD resistors and capacitors

...another board don't working (I can't read device info and programm microcontroller) <- on this board I use standart resistors and capacitors. Error:

Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)

Unable to enter programming mode. Verify device selection, interface settings, target power, security bit, and connections to the target device.

 

Circuits on this two boards have same disign! I can't figure out what the difference -> I tested this bords with same microcontroller chip: ATmega16

I tested  ATmega16, ATmega8, ATtiny13A, Atmega328P (on Arduino-UNO R3 board) <- with SMD resistors and capacitors microcontrolles are read with Atmel-ICE without any errors.

 

Now I guess that need to use some certain resistor type between RST and POWER with lower resistor power voltage supply.

 

 

Last Edited: Thu. Jan 3, 2019 - 07:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Darien wrote:

...one board working (I can read device info and programm microcontroller)  <- on this board I use SMD resistors and capacitors

...another board don't working (I can't read device info and programm microcontroller) <- on this board I use standart resistors and capacitors

 

So, to summarise, you have one board that works and one that doesn't?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

Brian Fairchild wrote:

So, to summarise, you have one board that works and one that doesn't?

Yes.

One board working with SMD components (resistors and capacitors).

Another board don'g working with standart components (resistors and capacitors) and error is:

Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)

Unable to enter programming mode. Verify device selection, interface settings, target power, security bit, and connections to the target device.

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

On the board that does not work, look for solder shorts/opens on the pins of the AVR!

Post a clear picture of the board that does not work, we may be able spot something.

 

Jim

 

 

FF = PI > S.E.T

 

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

ki0bk wrote:

On the board that does not work, look for solder shorts/opens on the pins of the AVR!

Post a clear picture of the board that does not work, we may be able spot something.

I check solder circuit shorts many times -> don't find any. Trust me the board is fine. If there were any solder short circuits i would see them.

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

Darien wrote:

Trust me the board is fine. 

 

But, unless I'm missing something in your descriptions,there can be nothing else other than a hardware fault.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

Darien wrote:
Trust me the board is fine.

If we had a $ for every time that was said, AVRFreaks would be a profit center!

 

Brian Fairchild wrote:
But, unless I'm missing something in your descriptions,there can be nothing else other than a hardware fault.

+1

 

 

 

FF = PI > S.E.T

 

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

Brian Fairchild wrote:

But, unless I'm missing something in your descriptions,there can be nothing else other than a hardware fault.

I use AVRISP mkII clone as programator befor Atmel-ICE and read my board with it on AtmelStudio6.2 without any errors so board have no hardware defects.

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

Now I have build extra circuit board with the same SMD RST-POWER-GND components as my already working one I have (also with SMD components). New clone-board -> Error again: 

 

Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)

Unable to enter programming mode. Verify device selection, interface settings, target power, security bit, and connections to the target device.

 

I'm start to think I made mistake to bye this Atmel-ICE. All my circuit boards read by AVRISP mkII clone without errors, circuits DO NOT HAVE any hardwere defects for 100%!!! Now I'm stuck don't know what to do next(((

Last Edited: Wed. Jan 9, 2019 - 06:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Darien wrote:
All my circuit boards read by AVRISP mkII clone without errors,

Try rotating the connector around 180 degrees, maybe the cable is attached backwards on the ICE!

 

Jim

 

 

FF = PI > S.E.T

 

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

I read Arduino-UNO without errors ->  connector not problem.

This is working board, for testing ATmega16, ATmega8, ATtiny13A (all working):

 

This board don't work:

 

Work with solder is good so I find no circuit shorts. Any difference I don't know about?)

Front view(not working board) if you need to see it:

Last Edited: Wed. Jan 9, 2019 - 10:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can not give you a solution but get same problem with ATMEGA168PB

I have get working when I use intern oscillator. No way to work with externe crystal.

it was a batch of 50 board , get only one with this problem but lucky me, I was running to 8MHz with crystal , use 8Mhz intern oscillator for this unit with programming error. 

Not se bad soldering on this crystal but was so soldering issue on another crystal soldering, it was a "old smd batch" and perhaps oxyde on the pad. 

Thierry Pottier

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

Darien wrote:
This board don't work:

How does power get to the board?   via the 2x3 header on the right?

Is the 1x6 connector your ISP connection?   Why not use a standard 2x3?

 

You should have bypass caps (100nF) on both VCC/GND pairs, I only see one (bottom view) on the left side.

Your long spindly GND run around the outside of the board is not good practice, it could be improved, but difficult to do with a single sided board.

Instead of using bare chips, it would be better (i.e. more successful) to use Arduino Nano or Pro-Micro boards, then use your single sided pcb for break outs to other parts, probably cheaper as well.

 

Your symptoms are typical of:

1) no power to target mpu, the ICE does not supply power

2) incorrect connections to ISP (mis-wiring)

3) reversed ISP connector

4) bad solder connections

5) bad ribbon connector from target board to ICE debugger/programmer (search AVRFreaks for threads on how I fix this problem easily)

 

Take them one at a time and verify each.

 

Good luck

Jim

 

 

FF = PI > S.E.T

 

Last Edited: Thu. Jan 10, 2019 - 01:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finally) I find issue -> bad RESET connection inside plastic connector. So when you bye Atmel-ICE need to check wire from programmer to device and all plastic connectors first. All my cirsuit boards start to work -> read device without errors))

 

Last Edited: Thu. Jan 10, 2019 - 03:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It has been a while since I have had the time to do some coding but today I have had some time and almost immediately I ran into problems again.

 

As asked earlier, the ISP MKII driver was loaded correctly and was the latest version.

I then decided to do the experiment again were I would select another processor to see if that helped.

This also included connecting another PCB.

 

Changed back to the original PCb and CPU... nothing went. Removed a number of resistors from the PCB to have the ISP lines isolated, no change.

Then again back to the other board....

WTF that now also no longer could be programmed/device signature read.

restarted studio and disconnected ISP and restarted the bunch.

again the board was connectable as I could read the device signature.... ONCE !!!!!

restarted/restarted again and again...... nothing worked.

Was afraid that the ISP had died after well over more than 10 years of service.....

I then decided to get my atmel ICE from my traveling package and see what that did......

worked like a charm...... on all boards I threw at it......

So initial thought... the ISP has finally died  crying crying crying

 

well it sort of died.....

actually the 6pin cable seems to have been the problem. I took a 6pin pressfit connected and put that just in front of the original connector.

now I could again connect to all the boards and all would be OK.

 

now my experimenting time is done for today and I have to see how this goes over time, but it seems to have been solved in my case to due to a connection problem.

If it comes back again I will investigate further.

 

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

meslomp wrote:

...actually the 6pin cable seems to have been the problem. I took a 6pin pressfit connected and put that just in front of the original connector.

now I could again connect to all the boards and all would be OK.

 

Those type of connectors are';t meant to be repeatedly connected and disconnected. It would not be unusual to find them rated for only a few hundred cycles.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

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

Brian Fairchild wrote:

meslomp wrote:

...actually the 6pin cable seems to have been the problem. I took a 6pin pressfit connected and put that just in front of the original connector.

now I could again connect to all the boards and all would be OK.

 

Those type of connectors are';t meant to be repeatedly connected and disconnected. It would not be unusual to find them rated for only a few hundred cycles.

well it did multiple 100s so that is a big plus then. And indeed I found a spec that states that it should only last for 100 cycles.

If it holds again for 10 years i will be a happy man :D .

 

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

I have a similar problem with AtMega164A - schematic attached.

Power is from a 78L05, & meters at 5.0V.

The software is Atmel Studio 7 (Version: 7.0.1645), trying both a JTAGIce 2 & a AVRISP Mk 2, with 2 different (but same design) target PCBs.

The parts are factory-new.

When connected, the "Apply" command works, & I can then read the supply voltage.

However, when I try to read the device signature, I get

"Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)"

 

Both programmers fail the same way.

I have tried adding 12k pullups to the other lines (ie MISO, MOSI & SCK), but no difference.

Attachment(s): 

Dave

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

What is you ISP clock? Make sure it is set at 250KHz or better 125Khz. Also do any of the board program at all? Is the ISP header shown from the TOP of the board?

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Clock = 125kHz. The AVR is expected (being new) to default to its internal clock.

I have populated 2 boards: they both behave the same.

The ISP header is viewed from the top, ie

 

6  5

4  3

2  1  being rotated 180 to ease PCB routing.

 

Dave

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

I can't see anything wrong with the wiring. Don't know if it makes any difference but I have never seen a pulldown resistor on the crystal pins when running from internal oscillator.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I've tried removing R16, so X1/2 now both float.

No difference.

Dave

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

You have swapped MOSI and MISO on the programming header.

My connections:

 

Your connections:

 

 

I think you messed/mixed up naming with Uart connections were TXD goes to RXD and vice versa.

with SPI ( and also thus ISP) MOSI is Master Out - Slave In and does not change. there is only 1 master that controls the slaves. same goes for the miso line.

So a bit of line cutting and re-wiring to do I think.

 

Also make sure that if there is anything else connected to the SPI bus ( or uart on some processors) that you have small series resistors between the cpu pin + programming connection on one side and the other connected stuff on the other side. I always put 1K in series.

Last Edited: Mon. Mar 11, 2019 - 06:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Success!!

Many thanks: I'd forgotten that SPI programming has the target device as Slave, so MISO & MOSI swap.

 

Dave

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

Daveb237 wrote:
so MISO & MOSI swap.
Except, no.  They >>don't<< swap.  You had swapped them.  That's the point @meslomp was making.

 

Same goes for using the SPI peripheral.  MOSI is MOSI, regardless of whether you're using the AVR as an SPI master, or an SPI slave.

 

Glad you got it sorted, though!

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Joey, I think that is what Dave meant, but just did not put it in in as many words ;)

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

Yes, that's what it amounted to: I had mis-labelled the pins on the 6-way header.

Many thanks, all.

Dave

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

Had this same issue on my ATmega32 w/ STK500.
The problem was that some of the SPI pins were connected to ground or something because Port B was incorrectly connected to the STK's LEDs.

(A colleague had placed the 10pin-header cable one row off to the left)

 

-> If you have this error, confirm that the SPI pins are correctly connected to your computer and your computer only.

Pages