Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mega328p got error when buring bootloader #7

Open
raffeale opened this issue Dec 2, 2017 · 4 comments
Open

mega328p got error when buring bootloader #7

raffeale opened this issue Dec 2, 2017 · 4 comments

Comments

@raffeale
Copy link

raffeale commented Dec 2, 2017

hi , i use HVPP to repair fuse with a Arduino UNO ,and got success message.

and then i burning bootloader with ScratchMonkey(STK500 MODE),
i got following message. i don't know how to fix it.

raffeale@creator:~/arduino-1.0.6$ /home/raffeale/arduino-1.0.6/hardware/tools/avrdude -C/home/raffeale/arduino-1.0.6/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -cstk500v2 -P/dev/ttyUSB0 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xde:m -Ulfuse:w:0xff:m -F

avrdude: Version 5.11, compiled on Sep 9 2011 at 16:00:41
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

     System wide configuration file is "/home/raffeale/arduino-1.0.6/hardware/tools/avrdude.conf"
     User configuration file is "/home/raffeale/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/ttyUSB0
     Using Programmer              : stk500v2

avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv: . [1b]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
avrdude: Recv: . [0e]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [0d]
avrdude: Recv: S [53]
avrdude: Recv: C [43]
avrdude: Recv: R [52]
avrdude: Recv: A [41]
avrdude: Recv: T [54]
avrdude: Recv: C [43]
avrdude: Recv: H [48]
avrdude: Recv: M [4d]
avrdude: Recv: O [4f]
avrdude: Recv: N [4e]
avrdude: Recv: K [4b]
avrdude: Recv: E [45]
avrdude: Recv: Y [59]
avrdude: Recv: O [4f]
avrdude: stk500v2_getsync(): got response from unknown programmer SCRATCHMONKEY, assuming STK500
avrdude: stk500v2_getsync(): found STK500 programmer
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
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : STK500V2
     Description     : Atmel STK500 Version 2.x firmware
     Programmer Model: STK500

avrdude: Send: . [1b] . [02] . [00] . [02] . [0e] . [03] . [90] . [86]
avrdude: Recv: . [1b]
avrdude: Recv: . [02]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [17]
avrdude: Send: . [1b] . [03] . [00] . [02] . [0e] . [03] . [91] . [86]
avrdude: Recv: . [1b]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [14]
avrdude: Send: . [1b] . [04] . [00] . [02] . [0e] . [03] . [92] . [82]
avrdude: Recv: . [1b]
avrdude: Recv: . [04]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [11]
Hardware Version: 0
Firmware Version Master : 2.00
avrdude: Send: . [1b] . [05] . [00] . [02] . [0e] . [03] . [9a] . [8b]
avrdude: Recv: . [1b]
avrdude: Recv: . [05]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [10]
Topcard : Unknown
avrdude: Send: . [1b] . [06] . [00] . [02] . [0e] . [03] . [94] . [86]
avrdude: Recv: . [1b]
avrdude: Recv: . [06]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: 2 [32]
avrdude: Recv: ! [21]
Vtarget : 5.0 V
avrdude: Send: . [1b] . [07] . [00] . [02] . [0e] . [03] . [98] . [8b]
avrdude: Recv: . [1b]
avrdude: Recv: . [07]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [10]
avrdude: Send: . [1b] . [08] . [00] . [02] . [0e] . [03] . [95] . [89]
avrdude: Recv: . [1b]
avrdude: Recv: . [08]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: 2 [32]
avrdude: Recv: / [2f]
avrdude: Send: . [1b] . [09] . [00] . [02] . [0e] . [03] . [96] . [8b]
avrdude: Recv: . [1b]
avrdude: Recv: . [09]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [1c]
avrdude: Send: . [1b] . [0a] . [00] . [02] . [0e] . [03] . [97] . [89]
avrdude: Recv: . [1b]
avrdude: Recv: . [0a]
avrdude: Recv: . [00]
avrdude: Recv: . [03]
avrdude: Recv: . [0e]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [1f]
SCK period : 2.2 us
Varef : 5.0 V
Oscillator : Off

avrdude: Send: . [1b] . [0b] . [00] . [03] . [0e] . [02] . [9e] . [01] . [80]
avrdude: Recv: . [1b]
avrdude: Recv: . [0b]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [0e]
avrdude: Recv: . [02]
avrdude: Recv: . [00]
avrdude: Recv: . [1e]
avrdude: Send: . [1b] . [0c] . [00] . [0c] . [0e] . [10] . [c8] d [64] . [19] [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00] ? [3f]
avrdude: Recv: . [1b]
avrdude: Recv: . [0c]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [0e]
avrdude: Recv: . [10]
avrdude: Recv: . [c0]
avrdude: Recv: . [cb]
avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: Send: . [1b] . [0d] . [00] . [03] . [0e] . [11] . [01] . [01] . [0a]
avrdude: Recv: . [1b]
avrdude: Recv: . [0d]
avrdude: Recv: . [00]
avrdude: Recv: . [02]
avrdude: Recv: . [0e]
avrdude: Recv: . [11]
avrdude: Recv: . [00]
avrdude: Recv: . [0b]

avrdude done. Thank you.

@microtherion
Copy link
Owner

I assume you connected in ISP mode? Did you follow the connection diagram?

Depending on what you set the fuses to, you might need to apply the clock signal (Marked as (XTAL) in the diagram).

@raffeale
Copy link
Author

raffeale commented Dec 2, 2017

i connected all pin based on https://microtherion.github.io/ScratchMonkey/Connection.html
programmer is Arduino UNO , target MCU Mega328P.
i connected XTAL1 PIN of target 328P to Arduino Uno 9 PIN.
i use arduino 1.0.6 IDE to compile and upload ScratchMonkey in Arduino uno.
then i choose programmer to ScratchMonkey(STK500 Mode) to burning bootloader , i got error message.
and then i try arduino as ISP programmers to burning bootloader , i got error mesage too!

@raffeale
Copy link
Author

raffeale commented Dec 2, 2017

2017-12-03 00-39-18
i connected all pin by this diagram to repair fuse.

2017-12-03 00-42-13

i am burning bootloader depends on this diagram. i choose ScratchMonkey(STK500 Mode) for programmer

@onre
Copy link

onre commented Mar 2, 2018

FWIW, I'm hitting the same bug. avrdude version 6.3 as supplied with latest Arduino IDE on Windows, if that matters. ISP mode, trying to reset a fuse, have the XTAL out connected to XTAL2 on target as it is in the "watch crystal" mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants