Renaudp
February 10, 2020, 11:29pm
1
Hello,
Using Arduino IDE 1.8.11 and this AVR ISP Programmable Expansion Shield , I got the following error while burning the bootloader of an Atmega8 (ATMEGA8A-PU ).
Board: Atmega8
Clock: 8 MHz internal
BOD: BOD 2.7V
Compiler LTO: LTO disabled
Boorloader: Yes (UART0)
Programmer: Arduino as ISP
Any idea how to fix that?
Thanks!
Arduino: 1.8.11 (Windows 7), Board: "ATmega8, Yes (UART0), BOD 2.7V, LTO disabled, 8 MHz internal"
C:\Users\Renaud\Desktop\arduino-1.8.11\hardware\tools\avr/bin/avrdude -CC:\Users\Renaud\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/avrdude.conf -v -patmega8 -cstk500v1 -PCOM16 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:0b11010100:m -Ulfuse:w:0b10100100:m
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Renaud\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/avrdude.conf"
Using Port : COM16
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega8
Chip Erase delay : 10000 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 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
efuse 0 0 0 0 no 0 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
calibration 0 0 0 0 no 4 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
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
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.02s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000 (retrying)
Error while burning bootloader.
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
pert
February 11, 2020, 12:41am
2
Make sure you have the chip the right way around in the socket. The end of the chip with the semicircular notch in it should be at the end of the socket with the lever.
Renaudp
February 11, 2020, 7:36am
3
The chip is properly set.
urugulu
February 12, 2020, 7:53am
4
Seems like the programmer can not sense the target voltage (i.e. vcc of your uC)
I can confirm from my own experience that this WILL cause Problems such as the device ID not getting read.
also there appears to be a mismatch in your programmer Settings. you seem to use an stk500 from what the Output says but your post mentions an Arduino as isp...
pert
February 12, 2020, 10:20am
5
urugulu:
also there appears to be a mismatch in your programmer Settings. you seem to use an stk500 from what the Output says but your post mentions an Arduino as isp...
This is fine. The Arduino as ISP programmer uses the stk500v1 protocol:
For one or two versions of Arduino AVR Boards, it was using the arduino protocol, but this caused problems, so it was switched back to the stk500v1 protocol:
arduino:master
← per1234:arduino-as-isp-atmega32u4-programmer
opened 10:16AM - 19 Dec 18 UTC
Use of the `stk500v1` protocol for Arduino as ISP does not work with native USB … boards on Windows. The `arduino` protocol does (see https://github.com/arduino/Arduino/issues/1182#issue-9477400).
However, the `arduino` protocol makes it more likely that boards with an external USB interface chip will require the auto-reset circuitry to be disabled to allow them to be used as Arduino as ISP. That adds extra complexity to a process already difficult for the average Arduino user.
For this reason, this pull request does the following:
- Revert the [previous commit changing the Arduino as ISP programmer to use the `arduino` protocol](https://github.com/arduino/ArduinoCore-avr/commit/b084848f2eaf9ccb3ac9a64ac5492d91df4706bf). This restores the Arduino as ISP programmer to maximum compatibility with boards using an external USB interface.
- Add a new programmer using the `arduino` protocol specifically for using native USB boards as Arduino as ISP.
I'm not sure what the most appropriate name for the new programmer is. I went with "Arduino as ISP (ATmega32U4)" and the ID `arduinoasispatmega32u4` but I'm happy to modify this PR if something else is preferred.
Approved at https://github.com/arduino/Arduino/issues/8032#issuecomment-448520230
- Fixes https://github.com/arduino/Arduino/issues/1182 (though note some more advanced fixes are also discussed in that thread)
- Fixes https://github.com/arduino/Arduino/issues/8032
Juraj
February 12, 2020, 1:05pm
6
pert:
This is fine. The Arduino as ISP programmer uses the stk500v1 protocol:
ArduinoCore-avr/programmers.txt at master · arduino/ArduinoCore-avr · GitHub
For one or two versions of Arduino AVR Boards, it was using the arduino protocol, but this caused problems, so it was switched back to the stk500v1 protocol:
Add ATmega32U4-compatible Arduino as ISP programmer by per1234 · Pull Request #56 · arduino/ArduinoCore-avr · GitHub
Per, please use "boards package". Even I needed a second to realize wat you mean with "versions of Arduino AVR Boards"
pert
February 12, 2020, 1:08pm
7
It says "Arduino AVR Boards" in the Tools > Board menu and in Boards Manager. Nowhere is the term "boards package" used.
Renaudp
February 12, 2020, 8:47pm
8
Thank you for your replies.
Now, same setup, same hardware:
Arduino: 1.8.11 (Windows 7), Board: "ATmega8, Yes (UART0), BOD 2.7V, LTO disabled, 8 MHz internal"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Renaud\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\2.0.3/avrdude.conf"
Using Port : COM17
Using Programmer : stk500v1
Overriding Baud Rate : 19200
Error while burning bootloader.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
AVR Part : ATmega8
Chip Erase delay : 10000 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 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
efuse 0 0 0 0 no 0 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
calibration 0 0 0 0 no 4 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=0x14
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 4744608
Firmware Version: 0.4611299
Topcard : STK502
Vtarget : 1.8 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
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=0x10
avrdude done. Thank you.
pert
February 12, 2020, 10:00pm
9
I believe this error indicates the board used as an Arduino as ISP programmer is resetting. The usual solution is to connect a 10 uF capacitor between the GND and RST pins on the "Arduino as ISP" programmer board. Unfortunately, that is a little bit more tricky to do with this shield blocking those pins. You could solder the capacitor to the pins on the top of the shield or you could connect the shield to the Arduino board using jumper wires.
Renaudp
February 13, 2020, 3:34pm
10
I've found a trick in this movie .
In the Boards Manager: downgrade Arduino AVR to version 1.6.9. No error when burning the bootloader.
The next step is to compile and upload the code? Because I got then avrdude: stk500_recv(): programmer is not responding
pert
February 13, 2020, 4:19pm
11
What is the circuit you're using to upload to the ATmega8?
Renaudp
February 13, 2020, 7:24pm
12
Same as to burn the bootloader
pert
February 13, 2020, 7:38pm
13
Did you do Sketch > Upload Using Programmer ?
pert
February 13, 2020, 9:17pm
15
You're welcome. I'm glad to hear it's working now. Enjoy!
Per