|
|
  |
Проблема с прошивкой fuse-bit в ATmega32U4, avrdude |
|
|
|
Feb 9 2016, 12:15
|

Electrical Engineer
     
Группа: СуперМодераторы
Сообщений: 2 163
Регистрация: 4-10-04
Пользователь №: 778

|
возникла проблема с atmega32u4 (китайский клон Arduino Pro Micro) - прошивается всё, кроме фьюзов: Код sudo /usr/bin/avrdude -C /etc/avrdude/avrdude.conf -p atmega32u4 -c avr109 -P /dev/ttyACM0 -b 19200 -U lfuse:w:0x90:m -U hfuse:w:0xd9:m
Connecting to programmer: . Found programmer: Id = "CATERIN"; type = S Software Version = 1.0; No Hardware Version given. Programmer supports auto addr increment. Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices: Device code: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 avrdude: reading input file "0x90" avrdude: writing lfuse (1 bytes):
Writing | | 0% 0.00s ***failed; Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0x90: avrdude: load data lfuse data from input file 0x90: avrdude: input file 0x90 contains 1 bytes avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ... avrdude: verification error, first mismatch at byte 0x0000 0x90 != 0xff avrdude: verification error; content mismatch
avrdude: safemode: lfuse changed! Was 90, and is now ff Would you like this fuse to be changed back? [y/n] все секции memory присутствуют в /etc/avrdude/avrdude.conf и соответствуют даташиту расширенная диагностика при чтении фьюзов: Код sudo /usr/bin/avrdude -C /etc/avrdude/avrdude.conf -p atmega32u4 -c avr109 -P /dev/ttyACM0 -b 19200 -U lfuse:r:-:i -U hfuse:r:-:i -v
avrdude: Version 5.10, compiled on Oct 22 2010 at 08:16:12 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude/avrdude.conf" User configuration file is "/root/.avrduderc" User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0 Using Programmer : avr109 avr910_devcode (avrdude.conf) : none Overriding Baud Rate : 19200 AVR Part : ATmega32U4 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 1024 8 0 9000 9000 0x00 0x00 flash 65 6 128 0 yes 32768 128 256 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 : avr910 Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: . Found programmer: Id = "CATERIN"; type = S Software Version = 1.0; No Hardware Version given. Programmer supports auto addr increment. Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices: Device code: 0x44
avrdude: devcode selected: 0x44 avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as D8 avrdude: safemode: efuse reads as CB avrdude: reading lfuse memory:
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as D8 avrdude: safemode: efuse reads as CB avrdude: reading lfuse memory:
Reading | ################################################## | 100% 0.00s
avrdude: writing output file "<stdout>" 0xff avrdude: reading hfuse memory:
Reading | ################################################## | 100% 0.00s
avrdude: writing output file "<stdout>" 0xd8 avrdude: reading lock memory:
Reading | ################################################## | 100% 0.00s
avrdude: writing output file "<stdout>" 0xef
avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as D8 avrdude: safemode: efuse reads as CB avrdude: safemode: Fuses OK
avrdude done. Thank you. any ideas?
|
|
|
|
|
Feb 14 2016, 20:20
|

Electrical Engineer
     
Группа: СуперМодераторы
Сообщений: 2 163
Регистрация: 4-10-04
Пользователь №: 778

|
однако успех через внешний прошивальщик. какая-то загадка со встроенным.. Код avrdude -p atmega32u4 -c arduino-ft232r -P ft0 -U lfuse:w:0x90:m -U hfuse:w:0xd9:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9587 (probably m32u4) avrdude: reading input file "0x90" avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0x90: avrdude: load data lfuse data from input file 0x90: avrdude: input file 0x90 contains 1 bytes avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude: reading input file "0xd9" avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against 0xd9: avrdude: load data hfuse data from input file 0xd9: avrdude: input file 0xd9 contains 1 bytes avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ... avrdude: 1 bytes of hfuse verified
avrdude: safemode: Fuses OK (E:CB, H:D9, L:90)
avrdude done. Thank you. нда.. рано радовался.. теперь выдает такое после первой перешивки фьюзов: Код avrdude -F -p atmega32u4 -c arduino-ft232r -P ft0 -U lfuse:w:0x90:m -U hfuse:w:0xd9:m
avrdude: Device is not responding to program enable. Check connection. avrdude: initialization failed, rc=-1 avrdude: AVR device initialized and ready to accept instructions avrdude: Device signature = 0xe80ed1 avrdude: Expected signature for ATmega32U4 is 1E 95 87
avrdude done. Thank you. не понимаю - как вообще Device signature могла смениться??
--------------------
|
|
|
|
|
Feb 14 2016, 21:02
|

Профессионал
    
Группа: Свой
Сообщений: 1 292
Регистрация: 26-06-07
Пользователь №: 28 718

|
Цитата однако успех через внешний прошивальщик. какая-то загадка со встроенным.. встроенный - это тот, который SPI использует. Цитата не понимаю - как вообще Device signature могла смениться?? сигнатура не менялась. просто МК не отвечает. Там фьюзами случайно SPI не был выключен? Ещё может быть установлен тип генератора не тот.
|
|
|
|
|
Feb 15 2016, 21:04
|

Electrical Engineer
     
Группа: СуперМодераторы
Сообщений: 2 163
Регистрация: 4-10-04
Пользователь №: 778

|
разобрался в чем накосячил - выключил кварцевый генератор - настроил на внешний клок, вот он и затих... теперь вот какая непонятка: не могу снять защиту с бутсектора. фьюз LOCK=0x2F а я хочу туда залить 0xFF - как? Код $ sudo avrdude -p atmega32u4 -c usbasp -U lock:w:0xFF:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4) avrdude: reading input file "0xFF" avrdude: writing lock (1 bytes):
Writing | | 0% 0.00s ***failed; Writing | ################################################## | 100% 0.06s
avrdude: 1 bytes of lock written avrdude: verifying lock memory against 0xFF: avrdude: load data lock data from input file 0xFF: avrdude: input file 0xFF contains 1 bytes avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ... avrdude: verification error, first mismatch at byte 0x0000 0x2f != 0xff avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK (E:CB, H:D9, L:BF) остальные фьюзы прошились как мне надо
--------------------
|
|
|
|
|
  |
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0
|
|
|