Go Down

Topic: arduino uno smd r2: avrdude: stk500_getsync(): not in sync: resp=0x00 (Read 2323 times) previous topic - next topic

RunningWolf

Hi
the board worked fine for some few weeks. since yesterday I receive the nice message "avrdude: stk500_getsync(): not in sync: resp=0x00".
I tried with another computer. same message.
Another Arduino UNO SMD r2 / a Diecimila works fine with the same sketch and IDE.
The board shows this
- reset does not cause LED 13 to blink
- after uploading only RX blinks three times, TX does not, LED 13 does not.
- I tried the loop, and both RX/TX blink

Did I kill something and shall I stop trying?
Is there a solution I did not find yet (I am new in this forum, I am new with Arduino as well.)
Thanks

Wolfgang
Thanks and have a great time

Hi RunningWolf.

Since your Rx is flashing, I suspect your bootloader on the Atmega328 got stuck somehow.  Try this out:
http://www.gammon.com.au/forum/?id=11635

If you hook up your Diecimila as the programmer (and upload the sketch) and the Uno SMD as the "board to be programmed", this sketch will let you open a serial monitor @115200 baud on the Diecimila and you can reprogram the bootloader.
http://www.spcomputing.com

RunningWolf

Hi sp computing
I used my functioning Uno smd and uploaded the sketch. No error message.
I connected both boards as discribed with separate wires.
The defective board:
- shows the green power LED on.
- shows the LED 13 blinking identical to the programmer board. (ah! it ain't broken!)

I open the serial monitor and adjust to 115200 baud.
I hit reset on the programmer board.
The monitor shows:
Atmega chip programmer.
Written by Nick Gammon.

That's it, no further question.

I sent "U", nothing.
I sent "G", nothing.

What I am doing wrong?

Thanks and have a great time

Ouch, it is not pulling the reset on the target board.  It should look like this:

Code: [Select]
Atmega chip programmer.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768 bytes.
LFuse = 0xFF
HFuse = 0xDE
EFuse = 0xFD
Lock byte = 0xCF
Bootloader address = 0x7E00
Bootloader length = 512 bytes.
Type 'L' to use Lilypad (8 MHz) loader, or 'U' for Uno (16 MHz) loader ...


Check and/or replace the jumper from D10 of the Programmer going to the Reset of the Target Uno.  Do you have Female jumpers?
http://www.spcomputing.com

RunningWolf

#4
Oct 13, 2012, 11:17 pm Last Edit: Oct 13, 2012, 11:25 pm by RunningWolf Reason: 1
I went through the program
it is stuck in this loop:

void startProgramming ()
 {
 byte confirm;
 pinMode (RESET, OUTPUT);
 pinMode (SCK, OUTPUT);
 
 // we are in sync if we get back programAcknowledge on the third byte
 do
   {
   delay (100);
   // ensure SCK low
   digitalWrite (SCK, LOW);
   // then pulse reset, see page 309 of datasheet
   digitalWrite (RESET, HIGH);
   delay (1);  // pulse for at least 2 clock cycles
   digitalWrite (RESET, LOW);
   delay (25);  // wait at least 20 mS
   SPI.transfer (progamEnable);  
   SPI.transfer (programAcknowledge);  
   confirm = SPI.transfer (0);  
   SPI.transfer (0);  
   } while (confirm != programAcknowledge);
   
 Serial.println (F("Entered programming mode OK."));
 }  // end of startProgramming

I figured that "confirm" is always "0", so it never will match "programAcknowledge" to leave the loop.


D10 is connected to reset, Both are female jumpers.
When uploading, at least LED 13 of the dead board is blinking as well. that one is not dead.
But is it not performing the reset, I believe.

By the way: I just downloaded "setup_Arduino_ERW_1.0.1h_20121002.exe" with no problems. It says that the upload is done. No error message .... but it does not work either :-(

regards

Wolfgang
Thanks and have a great time

If you have female jumpers, we can try to hook up to the actual programming headers (3x2 pins) next to the Atmega328.  They are numbered different than chips:

(MISO)1 - 2 (Vcc)
(SCK) 3 - 4 (MOSI)
(RST) 5 - 6 (Gnd)

Pin 1 is the one with either a "1" or a dot.  If you hook up both Arduinos like pin to like pin except pin 5 from the target board to the D10 of the programming board.

After that, open the serial monitor as before.  If you can attach a picture I can look it over...
http://www.spcomputing.com

RunningWolf

#6
Oct 14, 2012, 11:06 am Last Edit: Oct 14, 2012, 12:19 pm by RunningWolf Reason: 1
Hi
I found the dot. I will try
see my set up as before as attachment.

I tried with a cable I configured from old PC remains.
I connected #5 to pin 10 of the programming boad as well.

I get the same result.
I figured that "confirm" is always "0", so it never will match "programAcknowledge" to leave the loop.
when I forced the loop to be left, it says "unrecognized signature".

Ah, something is different. When I press "reset" on either boards, the loop starts again (with the same result) and LED 13 flickers as well on the dead board, like it should at reset. BUT not as bright.



Thanks and have a great time

You are hooked up perfectly.  The flicker is just the clock pulse (SCK) going through D13 which is connected to the "L" LED.

The hangup is the Atmega328 will not identify itself with a chip ID and the fuse settings.  The sketch usually works perfectly with all manner of Arduino chips.  We should test it in the Arduino IDE to be sure.

Open the Arduino IDE and select the Arduino as ISP in the Examples sketches folder.  Select the appropriate board and serial for the "programmer" Uno and upload to the Arduino.  When done, click Tools -> Programmer and Arduino as ISP then click Tools -> Burn Bootloader.
http://www.spcomputing.com

RunningWolf

Hi
I tried.
The heartbeat LED does it.
However if I try to install bootloader via tools it says

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.
Thanks and have a great time

I just checked my only '328 SMD (Nano v3) and it verified just fine.

Just to be sure that Nick did not change anything, I attached a copy of the programmer that I am using.  Try it out and we will go from there.  I am not sure if your SMD board would survive a high voltage reprogram.
http://www.spcomputing.com

RunningWolf

Hi
if I try to upload I receive:

Binäre Sketchgröße: 23.448 Bytes (von einem Maximum von 32.256 Bytes)
avrdude: verification error, first mismatch at byte 0x2680
         0xff != 0x51
avrdude: verification error; content mismatch

I will be on a business trip all next week, so I have to stop at this time.
Thank you for your support so far.

Wolfgang
Thanks and have a great time

I think it needs to be put back into the Atmega_Board_Programmer folder.  Anyhow, I will look around for any other solutions to this weird problem.

Good luck on your business trip.
http://www.spcomputing.com

Go Up