Why upload to Arduino UNO R3 board failed?

Hi, I found an old Arduino UNO R3 board containing a ATmega328 (not ATmega328P/PB). I tried to upload a sketch and it failed. I flashed 3 different UNO bootloaders into the uC using Microchip Studio along with an Atmel-ICE programmer/debugger. Also I set the Fuses to the correct bootloader startaddress. At powerup the bootloader starts to run continuously seen by the onboard led flashing 1 or 4 or other times approximately each 1.5 seconds. If I look with an oscilloscope on the DTR signal coming out of the USB converter uC ATmega16U2 when uploading a sketch this signal stays high as I expected it to go low for a short time to reset the ATmega328 uC. In the schematics the DTR signal is passing through a capacitor to the uC Reset pin. Is there anybody who can help me out where I go wrong?

What output do you see from the IDE when you attempt the upload and it fails?

This is what the IDE Output tells:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x88
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x88
...
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x88
Failed uploading: uploading error: exit status 1

Some additions:

  • the error code appears app. 90 seconds after uploading
  • the error codes are random, 0x88, 0x28, 0x51, 0x56, 0xcb
  • when scope probing the USB-to-Serial uC ATMEGA18U2 XTal no comport is found by device manager
  • when lifting the probe COM22 is found (so this uC seems to be okay)
  • the uC TX or RX leds do not light up during sketch uploading
  • I tried 3 different USB kabels

When you programmed in the bootloader, from your description, it sounds like you did so by using the 6-pin ICSP header directly into the 328, bypassing the USB-Serial interface.

When you upload a sketch using the IDE, avrdude uses the USB-Serial interface on your UNO. It sounds like there may be an issue in this area. Have you tried to do a loopback test?

With the loopback test the serial comport TX signal should be connected to the serial comport RX signal. As the Arduino UNO contains an onboard USB-versus-Serial interface (ATmega16U2 uC) the TX and RX signals of this chip should be connected to each other. However as I mentioned before there is absolutely no activity on this RX and TX pins measured by oscilloscope during upload of a sketch. Both signals stay high all the time so a loopback test will add nothing to find the cause of the problem. I suggest something is wrong with the ATmega16U2 firmware. I found some firmware versions but until now I did not succeed to get access to this ATmega16U2 over the ATmega16U2 dedicated 6-pin ICSP connection by Microchip Studio. I'll give it a new try.

Update: The ICSP (In Circuit Serial Programming) signals travels to the ATmega328 and the ICSP1 (one) signals travel to the ATmega16U2. I measured the ICSP1 signals RESET2, SCK2 and MOSI2 by oscilloscope during a device id read operation. The RESET2 signal shows a digital behaviour between 5V and 0V. The SCK2 and MOSI2 signals both show digital data but only between 5V and 3V. This 3V is supposed to be approximately 0V. The SCK2 signal is ONLY connected from the ICSP2 to the ATmega16U2 uC SCK2 pin. I measured the VCC and GND of the ATmega16U2 which both are okay. So I suspect that the ATmega16U2 uC ICSP interface is somehow defective.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.