Author Topic: "Entering programming mode... Failed" using AVRISP mkII  (Read 8730 times)

0 Members and 1 Guest are viewing this topic.

Offline mwaauTopic starter

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
"Entering programming mode... Failed" using AVRISP mkII
« on: July 28, 2010, 02:39:38 PM »

I am a real newbie trying to build my first simple 50$ Robot following the tutorial from Society of Robots. I have (magically) soldered up the electronics needed and I have uploaded a simple "servo centering" program to the ATmega328P microcontroller using the Atmel AVRISP mkII programmer. The first times it actually worked fine, but after changing the pulsewidth in the code a couple of times it suddenly doesn't work anymore. I get the message:

"Setting mode and device parameters.. OK!
Entering programming mode.. FAILED!
Leaving programming mode.. OK!"

I also get a pop up saying the ISP frequency should be less than 1/4 of the clock frequency which it is!

When I google the message I can see that many other have had this problem also, but I have not been able to solve the problem... Maybe because I don't fully understand the nature of the microcontroller, programmer etc. However I have tried to change the ISP frequency to all the possible values with no luck, but I haven't tried changing any other settings (don't know what I should change either). The target voltage also reads 5.0 V which should be okay.

I really hope you have some ideas I can try before ordering a new chip or adding an external oscillator, if I maybe have got the microcontroller locked? For your info I have upgraded the newest firmware to the programmer and I am running AVR Studio 4.18.700. I you need any other information about my setup please ask.


« Last Edit: July 29, 2010, 01:11:10 AM by mwaau »

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
Re: "Entering programming mode... Failed" using AVRISP mkII
« Reply #1 on: September 07, 2010, 12:41:45 PM »

If you haven't fixed your problem yet, you might try the steps at the previously mentioned link. The symtoms are not identical, but the end results of resetting the fuse bits could fix your issue.

From "Evil Mad Scientist Laboratories":
So, let's assume that you've set your AVR clock source to a very slow internal signal, and you can no longer program the device by conventional means. It is still possible at that point to use avrdude in interactive mode by entering a command like the following:
avrdude -p t2313 -c avrispmkII -P usb -tuF
where \"t2313,\" \"usb,\" and \"avrispmkII\" should be changed as needed to reflect your device, interface/programmer location, and programmer.

Once it (finally) enters interactive mode (at its super-slow clock speed), enter \"sck 1000\" at the prompt. This slows down the serial communication greatly by setting the SCK signal period to 1000 microseconds. You can then erase the chip by entering \"e\" and then set the programmer back to normal by entering \"sck 10\" (for a 10 microsecond period). Finally, enter \"quit\" to exit interactive mode. Your chip should be back to normal at this point, which you can verify by programming it again-- hopefully without the same fuse bit settings.

I would like to hear back if you fixed this on your own or if this suggestion helps. I have not run into this particular problem yet. I would also consider re-checking solder points and jumpers to make sure everything is WELL connected. The software trying to do the programming could barf all over the place if it is not securely connected.


Get Your Ad Here