Author Topic: Arduino Returns error while uploading bootloader [SOLVED]  (Read 9190 times)

0 Members and 1 Guest are viewing this topic.

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Arduino Returns error while uploading bootloader [SOLVED]
« on: August 18, 2018, 03:36:45 pm »
Hello All,

I am trying to burn a bootloader via an arduino TQFP32 which already as the Arduino ISP loaded into it. Wiring are as follows


Master    SLAVE

MOSI  -> MOSI
MISO  -> MISO
SCK    -> SCK
RESET -> To reset via 0.1uf cap (RST pin in schematic)
VCC    -> VCC
GND    -> GND

here is the verbose error log
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\georget\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\georget\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM12 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m

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\georget\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM12
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         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    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x04
         Hardware Version: 4728160
         Firmware Version: 0.4598883

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x01

avrdude: stk500_getparm(): (a) protocol error, expect=Error while burning bootloader.
0x14, resp=0x10
         Vtarget         : 420030.5 V
         Varef           : 199919366.4 V
         Oscillator      : 3.686 MHz
         SCK period      : 0.1 us


avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x00
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x10
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00

avrdude done.  Thank you.
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Arduino Returns error while uploading bootloader [SOLVED]
« Reply #1 on: August 18, 2018, 04:26:06 pm »
Check your wiring plan for programming bootloader via ISP. Reset for the device to have bootloader burned should go to a digital output pin from the master (arduino acting as ISP programmer), with no series resistor used. The output pin to use is defined in the arduino as ISP programmer sketch.

 
 
The following users thanked this post: anishkgt

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: Arduino Returns error while uploading bootloader [SOLVED]
« Reply #2 on: August 18, 2018, 04:31:56 pm »
Check your wiring plan for programming bootloader via ISP. Reset for the device to have bootloader burned should go to a digital output pin from the master (arduino acting as ISP programmer), with no series resistor used. The output pin to use is defined in the arduino as ISP programmer sketch.


Thanks I doubted that. Just doing it now.


Www.Georgehobby.wordpress.com

Equipments: DSO104z, Hakko FX888D, Brymen BM869s
 

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: Arduino Returns error while uploading bootloader [SOLVED]
« Reply #3 on: August 19, 2018, 04:06:51 pm »
Though the arduino sketch has the reset on Pin 10 i see it is the same pin named as SS. What is the difference ? Just that it is controlled by the sketch or is it something else ?
 

Offline rrinker

  • Super Contributor
  • ***
  • Posts: 2046
  • Country: us
Re: Arduino Returns error while uploading bootloader [SOLVED]
« Reply #4 on: August 20, 2018, 07:17:40 pm »
 I've built two different Arduino as ISP devices, one is for ATTiny 8 pin chips, the other is to program ATMega328. In both cases, I just wired to the actual pins and not the ICSP header, though they SHOULD be the exact same pins.
The Tiny85 programmer is a shield that fits on an UNO. The only capacitor is a 10uF on the Uno's reset, to keep the Uno from resetting.

The Mega328 programmer is a little fancier, I made a PCB for that, it uses a Nano for the Arduino running the Arduino as ISP sketch, and has a ZIF socket for the 328 being programmed.

Both had the 3 indicator LEDs mentioned in the Arduino as ISP sketch comments for the programming status. And both have an LED and resistor attached to a pin so that a basic blink sketch can be loaded to test the programming and the chip. The 328 programmer has a 16MHz oscillator and the associated caps, plus a 10uF on the Nano's reset pin. The Tiny85 one is set up to use the internal clock.

 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf