szawus
February 13, 2020, 6:01pm
1
From another topic. Hello, I was playing with programming using SPI on Raspberry and it looks like some fuses gone bad on my Arduino Nano. I can't program them anymore, avrdude shows errors. Is there any way to fix them? I heard something about high-voltage programmer. Is that a good idea? Is it only way? Thanks!
Sketches:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
Bootloader burning:
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Error while burning bootloader.
Tried both things with 328P, old bootloader and 168.
And one more thing - do you know what could cause such behaviour?
pert
February 13, 2020, 6:09pm
2
Are you using the Raspberry Pi to burn the bootloader, or are you using a some other type of ISP programer? If the latter, which one?
Please do this:
(In the Arduino IDE) File > Preferences
Check the checkbox next to "Show verbose output during: upload".
Click the "OK" button.
Tools > Burn Bootloader
After the Burn Bootloader process fails, you'll see a button on the right side of the orange bar: "Copy error messages". Click that button.
In a forum reply here, click on the reply field.
Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
Press "Ctrl + V". This will paste the Burn Bootloader output between the code tags.
Move the cursor outside of the code tags before you add any additional text to your reply.
szawus
February 13, 2020, 7:08pm
3
Here you are
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:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
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 : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Błąd przy wgrywaniu bootloadera.
I "broke" this Arduino using Raspberry SPI pins. In Raspberry console I got same output.
pert
February 13, 2020, 7:39pm
4
Please answer this question:
pert:
Are you using the Raspberry Pi to burn the bootloader, or are you using a some other type of ISP programer? If the latter, which one?
szawus
February 13, 2020, 7:52pm
5
I am trying to burn bootloader using USBasp now.
pert
February 13, 2020, 8:12pm
6
Make sure the programmer's cable is correctly connected to the Nano. Pin 1 on the cable is indicated by a small triangle embossed on the plastic. Pin 1 on the Nano's ICSP header is indicated by a white dot on the PCB's silkscreen. I get this error when I plug the USBasp's cable in backwards on the Nano.
szawus
February 13, 2020, 8:14pm
7
I have 4 Arduinos, 2 behave this way. So that's not the case...
pert
February 13, 2020, 8:17pm
8
Have you been modifying the fuses on your Nano?
The reason I ask is because if your USBasp programmer has the official firmware, you must short the JP3 jumper to program chips that are running at <=1 MHz clock speed. The factory default clock configuration is running on the internal oscillator at 1 MHz.
szawus
February 13, 2020, 8:33pm
9
I haven't intentionally changed fuses but they may be changed. I will try this JP3 thing.
szawus
February 13, 2020, 8:57pm
10
Ok, tried with JP3.
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:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
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 : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Błąd przy wgrywaniu bootloadera.
Do I have to change something in avrdude or sth using this slow clock feature?
szawus
February 14, 2020, 10:22pm
11
Using standalone avrdude it reads Device signature 0x000000
pert
February 15, 2020, 6:36pm
13
In my experience, the 0x000000 is caused by incorrect wiring between the programmer and the target microcontroller. If you are using the exact same wiring to connect to the other boards and having success, I don't know what other problem would cause it. Maybe someone else here on the forum will have an idea.
szawus
February 16, 2020, 11:36pm
14
Yep, 3 Arduinos working, 2 don't - with same wiring.