Arduino Nano V3.0
- Войдите на сайт для отправки комментариев
Сб, 05/03/2016 - 21:27
Здравствуйте!
Есть arduino Nano V3.0 CH340 которая в один прекрасный момент перестала прошиваться, ошибка была
avrdude: verification error; content mismatch
поискаврешение, пришёл к выводу что нужно перепрошить загрузчик. Программатор был собран из другой arduino Nano V3.0 FTDI и подключен по следующей схеме
Arduino | Arduino as ISP
| programmer
___________________|________________
ICSP pin#1 (MISO) | D12
ICSP pin#2 (+5V) | 5V
ICSP pin#3 (SCK) | D13
ICSP pin#4 (MOSI) | D11
ICSP pin#5 (RST) | D10
ICSP pin#6 (GND) | GND
___________________|________________
при нажатии на "Записать загрузчик" появилась ошибка
avrdude: verification error, first mismatch at byte 0x7880
0xff != 0x05
avrdude: verification error; content mismatch
Ошибка при записи загрузчика.
при этом диоды мигали на обоих arduino(контакт есть и всё вроде хорошо).Е
если игнорировать ошибку и пробовать загрузить что либо через программатор возникает ошибка подобная ей, ну а если просто "Записать" подключив arduino напрямую, то в логе видно
avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 Проблема загрузки в плату. Помощь по загрузке: http://www.arduino.cc/en/Guide/Troubleshooting#upload .
Подскажите в какую сторону копать. Заранее спасибо!
Забыл сказать что в скетче Aduino as ISP было выставлено
и в файлах programmers.txt и boards.txt ни чего не менялось(пробовал поменять на 57600 скорость, но так не шилось).
Стоит попробовать через avrdude "Erase"?
И при загрузке скетча точно такая же ошибка как и была выше. Если пробовать прошить без -V - то такая же ошибка как если нажать "Записать загрузчик".
UPD.
avrdude -P /dev/ttyUSB4 -b 19200 -c avrisp -p m328p -e -F -V -v -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m avrdude: Version 6.3, compiled on Feb 21 2016 at 13:33:25 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch System wide configuration file is "/etc/avrdude.conf" User configuration file is "~/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : /dev/ttyUSB4 Using Programmer : avrisp 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 AVR ISP 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 = 0x1e950f (probably m328p) avrdude: safemode: hfuse reads as DA avrdude: safemode: efuse reads as FD avrdude: erasing chip avrdude: reading input file "0x05" avrdude: writing efuse (1 bytes): Writing | | 0% 0.00s ***failed; Writing | ################################################## | 100% 0.05s avrdude: 1 bytes of efuse written avrdude: reading input file "0xD6" avrdude: writing hfuse (1 bytes): Writing | ################################################## | 100% 0.02s avrdude: 1 bytes of hfuse written avrdude: reading input file "0xFF" avrdude: writing lfuse (1 bytes): Writing | ################################################## | 100% 0.01s avrdude: 1 bytes of lfuse written avrdude: safemode: hfuse reads as D6 avrdude: safemode: efuse reads as FD avrdude: safemode: efuse changed! Was 5, and is now fd Would you like this fuse to be changed back? [y/n] n avrdude: safemode: Fuses OK (E:05, H:D6, L:FF) avrdude done. Thank you. avrdude -P /dev/ttyUSB4 -b 19200 -c avrisp -p m328p -e -v -F -V -U flash:w:optiboot_atmega328.hex -U lock:w:0x0F:m avrdude: Version 6.3, compiled on Feb 21 2016 at 13:33:25 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch System wide configuration file is "/etc/avrdude.conf" User configuration file is "~/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : /dev/ttyUSB4 Using Programmer : avrisp 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 AVR ISP 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 = 0x1e950f (probably m328p) avrdude: safemode: hfuse reads as D6 avrdude: safemode: efuse reads as FD avrdude: erasing chip avrdude: reading input file "optiboot_atmega328.hex" avrdude: input file optiboot_atmega328.hex auto detected as Intel Hex avrdude: writing flash (32768 bytes): Writing | ################################################## | 100% 0.00s avrdude: 32768 bytes of flash written avrdude: reading input file "0x0F" avrdude: writing lock (1 bytes): Writing | ################################################## | 100% 0.02s avrdude: 1 bytes of lock written avrdude: safemode: hfuse reads as D6 avrdude: safemode: efuse reads as FD avrdude: safemode: Fuses OK (E:FD, H:D6, L:FF) avrdude done. Thank you.Тоже без результата...
Конец атмеге?
Судя по сообщению камушку конец. Я разрабатывая устройство сильно натирал флеш память бедной восьмерки. Натер, до блеска)) (не зная на то время про эмуляцию платформы)
Нужно учитывать, что в микре используется пппзу насколько помню. И оно имеет ограниченный ресурс записи \ чтения.
А ошибка гласит "содержимое flash и скетча не совпадают".
Среда Arduino IDE Как я понимаю по подробным данным вывода в консоли.
Сначала, компилирует скетч > трет память микре > заливает скетч > тут же его читает с микры и сравнивает с тем файлом что до этого в него заливала.
Если все нормально то Verified если нет mismatch - несовпадение.
Было такое что затирался именно диапазон в районе 50-55 % памяти устройства. Ибо при чтениее чуть больше половины появлялся ступор, и ошибка. И на 20%. Все это было предвестником смерти камушка. Правда как-тооно потом шилось нормально. Мб есть резервные ячейки памяти не знаю. А может была проблема при передаче данных ибо юзался 3м usb кабель.
В любом случае как вариант рассматривать стоит.