Mega 2560 ISP programozása

Ha a chip nem reagál a programozóra...
Avatar
szuperp
Bitmanipulátor
Hozzászólások: 116
Csatlakozott: 2012. november 17. szombat, 7:00

Mega 2560 ISP programozása

Hozzászólás Szerző: szuperp »

Sziasztok!

Próbálom a MEGA 2560-at felprogramozni egy UNO-val...
UNO-n fut az isp...
sikerül bootloadert feltöltenem rá...
bootloaderen keresztül természetesen felmegy rá a blink, vagy bármi és működik is rendesen...
de, ha nem a bootloadert akarom feltölteni ( arduino as isp - ahogy a bootloadernél is volt), akkor azt írja, hogy compiling, uploading, done.
és mégsem működik... :(
ugyan ekkor kicserélem a mega 2560-at egy másik UNO-ra és tökéletesen feltölti a cuccokat.

a gyári fuse bitekkel sem megy...
Avatar
szuperp
Bitmanipulátor
Hozzászólások: 116
Csatlakozott: 2012. november 17. szombat, 7:00

Re: Mega 2560 ISP programozása

Hozzászólás Szerző: szuperp »

most kipróbáltam egy eredeti arduino mega 2560-al és tökéletesen működik.
a kínaival nem megy :(
Avatar
Robert
Elektronbűvölő
Hozzászólások: 10191
Csatlakozott: 2005. december 9. péntek, 7:00

Re: Mega 2560 ISP programozása

Hozzászólás Szerző: Robert »

Minthogy azonos a 2 HW és a 2 szoftver is így ott valami más probléma lesz.


Az ArduinoISP esetén a következők szükségesek:
- RESET jumper elvágása (com nyitásakor a ArduinoISP ne reseteljen)
- tápfesz közössé tétele.

Ha bekapcsolod a File - Beállításoknál a log mutatása (mid a 2) opciót, akkor látod mit ír ki a AVRDuDe.
Avatar
szuperp
Bitmanipulátor
Hozzászólások: 116
Csatlakozott: 2012. november 17. szombat, 7:00

Re: Mega 2560 ISP programozása

Hozzászólás Szerző: szuperp »

igen... hát nem ír hibát... azt írja , hogy felmet... és mégsem...:(
van 2 kínai panel is nálam, de egyikre sem megy fel ISP-n keresztül (csak a bootloader)...(mondom, az eredetire rámegy, csak a kínaira nem)
azt nem tudom mit kéne átvágni, de gondolom nincs mit, mert usb-n és a bootloader feltöltése működik.
Avatar
Robert
Elektronbűvölő
Hozzászólások: 10191
Csatlakozott: 2005. december 9. péntek, 7:00

Re: Mega 2560 ISP programozása

Hozzászólás Szerző: Robert »

Ha a bootloader felmegy, akkor a flashprogramnak is fel kellene. Ott más gondod van!
_AZONOS_ a két HW!

Kérdés: a LockBitek ki vannak törölve? ERASE chippel kezded a programozást?
Avatar
szuperp
Bitmanipulátor
Hozzászólások: 116
Csatlakozott: 2012. november 17. szombat, 7:00

Re: Mega 2560 ISP programozása

Hozzászólás Szerző: szuperp »

1. feltöltöm a gyári beállításokkal a bootloadert ISP-n:

Kód: Egész kijelölése

mega.bootloader.low_fuses=0xFF
mega.bootloader.unlock_bits=0x3F
mega.bootloader.lock_bits=0x0F
mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD8
mega.menu.cpu.atmega2560.bootloader.extended_fuses=0xFD
természetesen a unlock bitekről semmit sem tudk, de gyárni beállítást hagytam.
ez szépen felmegy... a következőt írja a log:

Kód: Egész kijelölése

/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -P/dev/cu.usbserial-A601BY2K -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/peterszabo/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-A601BY2K
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         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    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 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
         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.07s

avrdude: Device signature = 0x1e9801
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFD:
avrdude: load data efuse data from input file 0xFD:
avrdude: input file 0xFD contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xD8"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD8:
avrdude: load data hfuse data from input file 0xD8:
avrdude: input file 0xD8 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.02s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.

/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -P/dev/cu.usbserial-A601BY2K -b19200 -Uflash:w:/Applications/Arduino 5.app/Contents/Java/hardware/arduino/avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:i -Ulock:w:0x0F:m 

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/peterszabo/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-A601BY2K
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         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    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 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
         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.05s

avrdude: Device signature = 0x1e9801
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/Applications/Arduino 5.app/Contents/Java/hardware/arduino/avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex"
avrdude: writing flash (261406 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 261406 bytes of flash written
avrdude: verifying flash memory against /Applications/Arduino 5.app/Contents/Java/hardware/arduino/avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:
avrdude: load data flash data from input file /Applications/Arduino 5.app/Contents/Java/hardware/arduino/avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex:
avrdude: input file /Applications/Arduino 5.app/Contents/Java/hardware/arduino/avr/bootloaders/stk500v2/stk500boot_v2_mega2560.hex contains 261406 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 261406 bytes of flash verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.05s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.03s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

2. megpróbálom ugyan ezen beállítások mellett feltölteni a blink programot.
látszólag felmegy, de nem működik...
ezt írja a log:

Kód: Egész kijelölése

Build options changed, rebuilding all

Sketch uses 1,518 bytes (0%) of program storage space. Maximum is 253,952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8,183 bytes for local variables. Maximum is 8,192 bytes.
/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -P/dev/cu.usbserial-A601BY2K -b19200 -Uflash:w:/var/folders/jc/_t5h2p8x72jdxsvbrd9lsbfr0000gn/T/build7537173193097259380.tmp/Blink.cpp.hex:i 

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino 5.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/peterszabo/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-A601BY2K
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         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    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 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
         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.05s

avrdude: Device signature = 0x1e9801
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/var/folders/jc/_t5h2p8x72jdxsvbrd9lsbfr0000gn/T/build7537173193097259380.tmp/Blink.cpp.hex"
avrdude: writing flash (1518 bytes):

Writing | ################################################## | 100% 1.53s

avrdude: 1518 bytes of flash written
avrdude: verifying flash memory against /var/folders/jc/_t5h2p8x72jdxsvbrd9lsbfr0000gn/T/build7537173193097259380.tmp/Blink.cpp.hex:
avrdude: load data flash data from input file /var/folders/jc/_t5h2p8x72jdxsvbrd9lsbfr0000gn/T/build7537173193097259380.tmp/Blink.cpp.hex:
avrdude: input file /var/folders/jc/_t5h2p8x72jdxsvbrd9lsbfr0000gn/T/build7537173193097259380.tmp/Blink.cpp.hex contains 1518 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.01s

avrdude: verifying ...
avrdude: 1518 bytes of flash verified

avrdude done.  Thank you.



nem látom az erase chip-et.... hogy kell berakni?
Avatar
Robert
Elektronbűvölő
Hozzászólások: 10191
Csatlakozott: 2005. december 9. péntek, 7:00

Re: Mega 2560 ISP programozása

Hozzászólás Szerző: Robert »

Gyárilag törli a folyamatban:
avrdude: erasing chip
Válasz küldése