Go Down

Topic: Uno SMD r3 arrived in DFU, installed FW & bootloader, now 'out of sync' (Read 2645 times) previous topic - next topic

May 02, 2013, 03:40 pm Last Edit: May 02, 2013, 10:57 pm by pharmachris Reason: 1
Hi,
I recently posted here and received very good help here about a Arduino Uno SMD r3 that arrived already in DFU mode, I used FLIP to install the bootloader successfully, but still have been unable to successfully load even a single sketch to the device.
The error i always get is
Quote
avrdude: stk500_getsync(): not in sync: resp=0x00

Thinking i may have done something wrong, I went back to FLIP, only to find that when I went to open a USB connection I got another error
Quote
window title 'com.atmel.flip.IspException'
content 'could not open USB device'

Which i thought was odd, as I had just used FLIP to load the bootloader only minutes earlier and had succeeded.
So then I figured the board was probably dead, and I'd have to buy another board anyway, so i did, an Uno r3 (but not SMD this time).
In doing some research while the new board was in transit, I found you could use one board to load a bootloader to another, so I did this using the ArduinoIDE, successfully.
But alas this too did not resolve my issue, I still get the same 'avrdude' errror
I am using the same cable for either board, and I have nothing other than the USB cable plugged into either board when programming

I have two questions,
Firstly: Is there anything anyone can think of I have not done that might yield a better result? I'm sure I could probably burn sketches straight to the chip without bootloader, using either my new board or an ICSP cable (which i don't have, nor a parallel port), but this is a pain, and really defeats the purpose of an easy to use board.
Second: Does this sound like a legitimate case for seeking a refund from the retailer? (it was RS-online)

Thanks for your time
Chris

James C4S

DFU mode applies to the ATmega16u2 chip.  You don't load a bootloader on that chip, you load the firmware to make it work as a USB to Serial chip.

The bootloader only applies to the ATmega328p.

If the 16u2 wasn't programmed, it would stand to reason neither was the 328p.


Second: Does this sound like a legitimate case for seeking a refund from the retailer? (it was RS-online)

Yes, in my opinion, it would be legitimate.  The board arrived, effectively, unusable.  For service like that, you normally have to buy a cheap clone off of eBay.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

l3gendluk3

The board not coming pre-bootloaded and lacking the necessary firmware indicate that this is a knockoff arduino as all real arduino's get bootloaded at the factory. You should see if you can follow this tutorial to reprogram your 16u2:

http://arduino.cc/en/Hacking/DFUProgramming8U2

And yes I would seriously recommend notifying RS about this.

-Luke

Thanks for clearing up the roles of each chip and what I was actually doing when running FLIP.
I followed the tutorial, but it was basically what I had done in the first instance, other than shorting the reset to ground, I was then able to connect and update the firmware again, I tried a few that were recommended in different places, all loaded successfully using FLIP, I hit 'start application', and then windows detects and installs it as a Arduino Uno, but I still get the same ' avrdude' error when trying to load a sketch

James C4S


and then windows detects and installs it as a Arduino Uno, but I still get the same ' avrdude' error when trying to load a sketch

Like I said, if the 16u2 wasn't programmed there is a good change the 328p wasn't either.  So now that you have a functioning 16u2, you need to use a programmer to flash the bootloader onto the 328p.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

#5
May 03, 2013, 05:45 am Last Edit: May 03, 2013, 12:51 pm by pharmachris Reason: 1
I think I have already done this, by a different method.
Isn't it what I did when I loaded the 'ArduinoISP' sketch onto my new board, wired it to my old board, then set use 'Arduino as ISP' as the programmer in the ArduinoIDE and clicked install bootloader? I thought this was bypassing the 16u2 to install it straight to the 328p, because this succeeded.

edit: For the sake of completeness I attempted to load the bootloader over usb from the IDE but I received this error
Quote
avrdude: usbdev_open(): did not find any USB device "usb"

remembering I have another Uno working perfectly, so this is not a driver issue
this makes me think the source of my problems is either the 16u2 (it did arrive in DFU after all) or between that and the 328p

Does this point to any other possible solutions or should I start writing for refund/replace?

hiduino

Assuming you have correctly burn bootloader to the m328p.  Can you verify which firmware you uploaded with FLIP to the 16U2?  It should have been something like \arduino-1.0.4\hardware\arduino\firmwares\atmegaxxu2\arduino-usbserial\Arduino-usbserial-atmega16u2-Uno-Rev3.hex.

Can you verify if the loopback works on the 16U2?
http://arduino.cc/forum/index.php/topic,73748.msg554568.html#msg554568


James C4S


Isn't it what I did when I loaded the 'ArduinoISP' sketch onto my new board, wired it to my old board, then set use 'Arduino as ISP' as the programmer in the ArduinoIDE and clicked install bootloader?

Yes, that should have installed the bootloader on the ATmega328p.  Does the LED on pin 13 flicker when you press the RESET button?  That's a quick way to tell if the bootloader is installed.


edit: For the sake of completeness I attempted to load the bootloader over usb from the IDE but I received this error
Quote
avrdude: usbdev_open(): did not find any USB device "usb"

Yeah, that shouldn't have done anything since you can't program the bootloader without a programmer.  (e.g. using another Arduino as the programmer.  Which, by the way, tends to be really temperamental to get working right.)


Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Quote
Yeah, that shouldn't have done anything since you can't program the bootloader without a programmer.

Thanks for clarifying that.

In answer to the question if the pin 13 led flashes on reset, yes it does, it flickers on/off a few times, the goes dark for a sec, then lights solid from then on

The firmware i am using on the 16u2 is either 'Arduino-usbserial-atmega16u2-Uno-Rev3.hex' or 'Arduino-usbserial-uno.hex' I have used them both without success, currently the r3 version is installed.

The loopback test works fine, I get back in the window everything I type in the text field

The only other thing I can add is that when I attempt to upload a sketch, the pin13 led flashes a few times and goes straight back to solid, and the Rx led flashes a few times, then nothing. I get no activity on the Tx led


James C4S


The loopback test works fine, I get back in the window everything I type in the text field

If loopback is working, STOP doing stuff to the 16u2.  The loopback proves that chip is working.


The only other thing I can add is that when I attempt to upload a sketch, the pin13 led flashes a few times and goes straight back to solid,

Flickering tell us the bootloader is running.  However.  Solid sounds suspicious, it should turn back off.  Because of how of the LED is implemented on the R3, it is possible for it to get stuck on, but it rarely happens.

Do you have a volt meter?  You might measure the voltage on Pin 13 when the LED is solid.  That'll give us an idea if it is actually solid-on or if it is flickering faster than you can see.

Something else to double check, which board do you have selected in the Board List.  You might try switching between Uno and Duemilanove.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

The voltage across the led is around 1.8V, does that mean flickering very fast?
Changing between Uno and Duemilanove even a few times made no apparent difference

hiduino

I would suggest trying to burn bootloader to the m328p smd again.  Make sure you are selecting Uno board type for burning bootloader.  http://arduino.cc/en/Tutorial/ArduinoISP


#12
May 06, 2013, 01:36 pm Last Edit: May 06, 2013, 02:48 pm by pharmachris Reason: 1
I have tried to burn the uno bootloader a number of times. All apparently successful (no error LED, heartbeat LED ok, everything fine) but it didnt make any difference.

However I was just reading another similar thread here and saw James C4S talk more of knock off boards being Duemilanove and in combination with his suggestion above (of trying different selection under board type), I decided to burn the Duemilanove bootloader.
That definitely made a difference. The pin 13 led now flashes slowly, longer off than on, but still within 1-2 second cycle. I guess that shows my bootloader burning is working, and from above, my loopback is working, what else could be going on?
Even with the Duemilanove bootloader I still get the same error, even switching between Duemilanove and uno under board selection when uploading sketches.

James C4S

Personally, I think you've spent too much effort at this point.  RS is an authorized distributor and authorized distributors are required to accept returns.  Time to try a new board.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Thanks for your time, you have been really helpful this whole thread, I do appreciate it!
I have contacted RS-online and they are shipping a new board out to me and don't need the old one back.
I think I'll try writing sketches straight to the chip using either ArduinoISP or an ICSP cable I am yet to build (I ordered a PCIe parallel port for $4 and found the tutorial for the cable) to use if I ever decide to make a project a permanent product. On that note could someone direct me to a tutorial on the process of getting a sketch running with no boot loader, specifically what if any changes do I need to make to my code?

Thanks again everyone for all the help

Go Up