Content mismatch, not in sync error.. Please Help.!!

Hi this is my first time using the Arbotix-M and I am trying to get it to work with the arduino. I am currently running the Arduino 1.0.6 IDE and am following this tutorial:

http://learn.trossenrobotics.com/arb...ck-start-guide

I am on STEP 5 and while trying to upload, this error comes :
avrdude: stk500_getsync(): not in sync: resp=0x00 Error

After getting this error, I replaced my board with a new Arbotix-M and now I am getting this error:

avrdude: verification error, first mismatch at byte 0x0002
0x7d != 0x80
avrdude: verification error; content mismatch

I have selected the right COM port and selected the right board.

Has anyone experienced the same problem? I'm really excited to get it to work with the simple LED blinking code so that I can start working with the dynamixel motors. Thank you in advance

The resp=0x00 means that device is not connected correctly or not started. Same with all ATmegas. It is general type. Here is lots of topics with the same problem and how to solve. In 90% of cases it is bad connection.
The 2nd one "verification error, first mismatch at byte 0x0002 0x7d != 0x80" is also general type of error. It can be floating wire, broken USB cable...

Thanks for the response. But the ROS program is being uploaded right. Please check the attached screenshot for a reference.

Sorry, I don't understand to "the ROS program is being uploaded right". I have no such device exactly but as I see from their web it is just "another" board with ATmega644P (see my signature, 1284P is bigger MCU of same type). At this moment the errors are common with all ATmegas or ATmega based Arduinos and it is as I wrote in #1.
1st error type (resp=0x00) - device (MCU) doesn't respond at all. I have 3 problems in my mind:

  • device/MCU is not connected (cable, wires, transceiver),
  • MCU wont start - missing clock signal.
  • no bootloader in the MCU (ATmega requires the bootloader if you want to program it via serial line).
    2nd error type (byte mismatch):
  • also some problem with the communication, there is some but not correct,
  • incorrect type of MCU.
    Post full log (switch on verbose mode in preferences).
    You can check the USB/serial converter whether it works correctly, e.g. loop-back test.

After closer view, I see ISP port on the board. You can try to use ISP programmer (any should be fine). But first, read carefully their Advanced Programming guide.

Full error log:

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\zhou\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

Using Port : COM4
Using Programmer : arduino
Overriding Baud Rate : 38400
AVR Part : ATmega644P
Chip Erase delay : 55000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 10 128 0 no 2048 8 0 9000 9000 0xff 0xff
flash 33 6 256 0 yes 65536 256 256 4500 4500 0xff 0xff
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.16
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e960a (probably m644p)
avrdude: reading input file "C:\Users\zhou\AppData\Local\Temp\build60a30a32187ba25eaa7c8ee7ab047c4e.tmp/Blink.ino.hex"
avrdude: writing flash (984 bytes):

Writing | ################################################## | 100% 0.38s

avrdude: 984 bytes of flash written
avrdude: verifying flash memory against C:\Users\zhou\AppData\Local\Temp\build60a30a32187ba25eaa7c8ee7ab047c4e.tmp/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\zhou\AppData\Local\Temp\build60a30a32187ba25eaa7c8ee7ab047c4e.tmp/Blink.ino.hex:
avrdude: input file C:\Users\zhou\AppData\Local\Temp\build60a30a32187ba25eaa7c8ee7ab047c4e.tmp/Blink.ino.hex contains 984 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.38s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
0x80 != 0x78
avrdude: verification error; content mismatch

avrdude done. Thank you.

the selected serial port
does not exist or your board is not connected

I don't want to use the ISP programmer. I am using FTDI.. I have done the loop back test as well..

No one else helped? I'm busy but I don't want leave it.

Are you sure about the setting? As I see the speed is 38400. BTW you missed the command in log.
At this moment it is hard to advice something easy. I don't konw your skills. Anyway, I would go to ISP, to try read out the flash memory, fuses and lock. Consequently, compare with settings, program image and the bootloader. I cannot believe that two boards are bad. It can be HW but also SW problem. Do you have ISP programmer or Arduino?

Budvar10:
No one else helped? I'm busy but I don't want leave it.

Are you sure about the setting? As I see the speed is 38400. BTW you missed the command in log.
At this moment it is hard to advice something easy. I don't konw your skills. Anyway, I would go to ISP, to try read out the flash memory, fuses and lock. Consequently, compare with settings, program image and the bootloader. I cannot believe that two boards are bad. It can be HW but also SW problem. Do you have ISP programmer or Arduino?

My skills are moderate. I have worked with the Arduino UNO but not an expert in that. Unfortunately, I don't have any ISP programmer or ARduino right now..

As I mentioned before, I have two Arbotix-m boards and one is faulty, I have checked it, it's showing the resp=0x00 error.. The other one is showing the content mismatch error. So, I am concerned with the content mismatch error.

Ok, I understand your skill are moderate. That is why this forum exists. Anyway, did you ask the vendor about the help or replacement?

You can use th UNO as ISP programmer. Here on the web is a tutorial how to use it (or on Nick Gammon's web). You will need just: 1. ISP cable or separate wires between UNO and Arbotix, 2. ArduinoISP sketch loaded in the UNO. Then, you can use avrdude command to read out (no write) the stuff from the Arbotix.

I do not know if you have original SW for Arbotix, especially the bootloader. I cannot find it on their web. Their download section seems to me pretty poor. Along with it, I'm not sure if it is able to replace the bootloader with the optiboot. Just for a case. If the bootloader has no other special function beside of uploading the programs, it could be fine with optiboot also.

Another question crossed my mind. Do you have something connected to the board? Disconnect all before next try.

...and another one thing. You can use avrdude verbose command form cmd to try communicate with the boards by standard way, via USB/serial cable. Avrdude tool is included in the Arduino SW. You can use the command from uploading log as template, it has help -?, get rid of any writes, -v is verbose switch, I think up to 4 'v' can be used (-v ... -vvvv) for more detailed output.

Budvar10:
Ok, I understand your skill are moderate. That is why this forum exists. Anyway, did you ask the vendor about the help or replacement?

Yes. I dit ask the vendor. the vendor said that content mismatch error indicates that the bootloader is bricked. Have to replace the the board.

Budvar10:
You can use th UNO as ISP programmer. Here on the web is a tutorial how to use it (or on Nick Gammon's web). You will need just: 1. ISP cable or separate wires between UNO and Arbotix, 2. ArduinoISP sketch loaded in the UNO. Then, you can use avrdude command to read out (no write) the stuff from the Arbotix.

Now, I am trying to program it through Arduino MEGA 2560 but having problem.. I have programmed the Arduino ISP sketch to the MEGA but can't upload anz program to ARBOTIX. Can you guide me how to do it? I have connected PIN 50-53 + GND, 5V to the ARBOTIX board. Selected Com port of MEGA 2560. Don't know what to do..

I am using Windows so can't use Linux commands.

Budvar10:
Another question crossed my mind. Do you have something connected to the board? Disconnect all before next try.

There is a Xbee with the Arbotix board but I have already diconnected it.

  1. Bricked bootloader? :slight_smile: The bootloader can be replaced. I had some time during the weekend to look at the SW stuff. There is a bootloader in downloadable package so it should not be a problem to repair the board by replacing it. Even the source is there and it looks like very old version of the optiboot. I would go to the newest version. I do not understand why the upload speed is decreased to 38400 but OK. Once, if you will be able to upload via ISP, should not be a problem for you to replace the bootloader. It is same process

  2. Mega should be fine. Arbotix has ISP (6pin) connector. You have to connect appropriate pins to this connector. They have documentation on the web. Also read this https://www.arduino.cc/en/Tutorial/ArduinoISP.
    Just for sure:
    52 -> SCK
    50 -> MISO
    51 -> MOSI
    53 -> RESET
    5V -> 5V
    GND -> GND
    Look ad the schematics for ICSP pins. Easiest way is connect 5 wires 1:1 between ISCP connectors except of RESET pin. The RESET pin on the target have to be connected to pin 53 on Mega (marked also as SS).
    The ISP sketch should be uploaded before wiring.
    If everything is correctly connected you should be able to talk with the target via avrdude command:
    avrdude -pATmega644P -Pname_of_port -cstk500v1 -b19200 -v
    The speed is hardcoded in ISP sketch, port name - you must find out, -v can be up to -vvvv. It is just read, no writes - no wearing (flash has up to 10 000 write/erase cycles).
    ...and that's it!
    If it will work, you should be able to upload also.

  3. Disconnect all from the board before such experiments as above. Use just bare board.

Just my 2 cents. :slight_smile:

Tonight using a clone Mega 2560 as Arduino as ISP going to a clone Uno I have to have a 10uF cap between Reset and GND on the Mega.

Also using pin 10 from Mega to Uno Reset instead of pin 53.

I sometimes don't need the Cap, but if you use different Arduino's as ISP you should try the Cap if it isn't working.
A Usbasp with updated firmware seems to work much better than Arduino as ISP for me.

avrdude -p m328p -P /dev/ttyUSB0 -cstk500v1  -b19200 -vv

avrdude: Version 6.3
       

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as FD

avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

avrdude done.  Thank you.

The capacitor is preventing the reset on source Arduino. However, the -cstk500v1 doesn't produce reset pulse in compare with other programmer types (e.g.-cArduino). In adition, the situation is a bit complicated because older IDEs v1.0.x generates reset pulse itself. In any case, you can not go wrong using this capacitor as @kprims wrote.

Just for clarification, especially for OP: The reset pulse starts the bootloader which waits some time for programming prompt. If the instruction for programming is received during this time the programming process (via serial line of course) starts, otherwise normal program/sketch starts to be executed.
If we want to use the Arduino for ISP we do not want to reset it as we start to upload. Source Arduino will produce the reset pulse for the target. Source Arduino is just "another worker" in chain sending bricks further.