Форум РадиоКот • Просмотр темы — не могу прошить atmega8
Сообщения без ответов | Активные темы
ПРЯМО СЕЙЧАС: |
Автор | Сообщение | ||
---|---|---|---|
|
Заголовок сообщения: не могу прошить atmega8
|
||
Зарегистрирован: Чт ноя 08, 2012 20:52:52 Рейтинг сообщения: 0
|
не могу прошить контроллер через usbasp пишет такую ошибку: Код: # avrdude -c usbasp -pm8 -P /dev/ttyUSB0 -U flash:w:/AVR/main.hex avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x008100 avrdude done. Thank you. я новичек в этом деле, так что сильно не ругайте. с ключом -F то же самое только вместо hfuse — lfuse |
||
Вернуться наверх |
Профиль
|
||
Реклама | |
|
|
Полиграф Полиграфыч |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Зарегистрирован: Ср окт 31, 2012 10:33:57 Рейтинг сообщения: 0
|
Если Atmega8 новая и по умолчанию работает от встроенного rc-генератора, то возможно программатор обращается к ней на очень большой частоте и она не может. |
||
Вернуться наверх | |||
Реклама | |
|
|
super electrik |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Зарегистрирован: Чт ноя 08, 2012 20:52:52 Рейтинг сообщения: 0
|
Полиграф Полиграфыч писал(а): Если Atmega8 новая и по умолчанию работает от встроенного rc-генератора, то возможно программатор обращается к ней на очень большой частоте и она не может. а вот по этой ошибке можно понять что я все правильно подключил? |
||
Вернуться наверх | |||
Engineer_Keen |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Карма: 32 Рейтинг сообщения: 0
|
Раз сигнатура прочиталась не как 0x000000 или 0xffffff, то варианта 3: |
||
Вернуться наверх | |||
Реклама | |
|
Выгодные LED-драйверы для решения любых задач КОМПЭЛ представляет со склада и под заказ широкий выбор LED-драйверов производства MEAN WELL, MOSO, Snappy, Inventronics, EagleRise. Линейки LED-драйверов этих компаний, выполненные по технологии Tunable White и имеющие возможность непосредственного встраивания в систему умного дома (димминг по шине KNX), перекрывают практически полный спектр применений: от простых световых указателей и декоративной подсветки до диммируемых по различным протоколам светильников внутреннего и наружного освещения. Подобрать LED-драйвер>> |
super electrik |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Зарегистрирован: Чт ноя 08, 2012 20:52:52 Рейтинг сообщения: 0
|
я ее прошил, да? или нет просто в конце какието ероры нарисовались( # avrdude -c usbasp -p atmega8 -F -U flash:w:/AVR/main.hex avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x000000 Writing | ################################################## | 100% 22.50s avrdude: 4700 bytes of flash written Reading | ################################################## | 100% 20.35s avrdude: verifying … avrdude: safemode: Fuses OK avrdude done. Thank you. |
||
Вернуться наверх | |||
Реклама | |
|
|
Реклама | |
|
LIMF – источники питания High-End от MORNSUN со стандартным функционалом на DIN-рейку На склад Компэл поступили ИП MORNSUN (крепление на DIN-рейку) с выходной мощностью 240 и 480 Вт. Данные источники питания обладают 150% перегрузочной способностью, активной схемой коррекции коэффициента мощности (ККМ; PFC), наличием сухого контакта реле для контроля работоспособности (DC OK) и возможностью подстройки выходного напряжения. Источники питания выполнены в металлическом корпусе, ПП с компонентами покрыта лаком с двух сторон, что делает ее устойчивой к соляному туману и пыли. Изделия соответствуют требованиям ANSI/ISA 71.04-2013 G3 на устойчивость к коррозии, а также нормам ATEX для взрывоопасных зон. Подробнее>> |
Engineer_Keen |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Карма: 32 Рейтинг сообщения: 0
|
Ну начиная со строчки Код: avrdude: Device signature = 0x000000 уже понятно что процесс пошел неправильно… А уж то что в конце произошла ошибка верификации однозначно показывает что ничего не прошилось. |
||
Вернуться наверх | |||
super electrik |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Зарегистрирован: Чт ноя 08, 2012 20:52:52 Рейтинг сообщения: 0
|
а сигнатура для контроллера должна быть постояной? Или может меняться? |
||
Вернуться наверх | |||
Engineer_Keen |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Карма: 32 Рейтинг сообщения: 0
|
Сигнатура всегда постоянная, по ней определяется какой именно контроллер подключен. |
||
Вернуться наверх | |||
nibiluk |
Заголовок сообщения: Re: не могу прошить atmega8
|
||
Зарегистрирован: Пн мар 16, 2009 23:35:42 Рейтинг сообщения: 0
|
Насколько я знаю у usbasp есть джампер понижения частоты, так вот его надо снять так как новая мега8 с ним не шьется, проверено. Когда снимется фуз ckdiv8 будет и с джампером прошиватся. |
||
Вернуться наверх | |||
gehrmann |
Заголовок сообщения: Re: не могу прошить atmega8
|
Зарегистрирован: Чт мар 07, 2013 16:37:21 Рейтинг сообщения: 0
|
Попробуйте ещё очищать микроконтроллер перед заливкой прошивки. У меня была похожая проблема с несколькими ATMega8A и я её решил таким образом. |
Вернуться наверх | |
Кто сейчас на форуме |
Сейчас этот форум просматривают: son313 и гости: 11 |
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения |
I’m spending my free time tinkering with GertDuino, which I have bought this week. I had an idea to use Ino (http://inotool.org/) to build .hex files for ATmega328 and 48 from command line, which I will then upload using avrdude (I have modified Gert’s program_328 and program_48 scripts for this purpose). Initial setup was done with great help of Gordon’s site (https://projects.drogon.net/raspberry-p … ega-setup/).
The thing is that for 328 everything works great, while for 48 I got a lot of errors from avrdude. For example:
Code: Select all
ino build -m gertduino48
/usr/bin/avrdude -c gpio -p m48p ./.build/gertduino48/firmware.hex -U flash:w:./.build/gertduino48/firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e920a
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: To protect your AVR the programming will be aborted
avrdude done. Thank you.
or
Code: Select all
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x003d0a
avrdude: Expected signature for ATMEGA48P is 1E 92 0A
Double check chip, or use -F to override this check.
avrdude done. Thank you.
Similar situation is when I try to program it from Arduino IDE (also here 328 works without any problems).
But still once for a time it is possible to succeed:
Code: Select all
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e920a
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: current erase-rewrite cycle count is -512 (if being tracked)
avrdude: erasing chip
avrdude: reading input file "./.build/gertduino48/firmware.hex"
avrdude: input file ./.build/gertduino48/firmware.hex auto detected as Intel Hex
avrdude: writing flash (952 bytes):
Writing | ################################################## | 100% 0.13s
avrdude: 952 bytes of flash written
avrdude: verifying flash memory against ./.build/gertduino48/firmware.hex:
avrdude: load data flash data from input file ./.build/gertduino48/firmware.hex:
avrdude: input file ./.build/gertduino48/firmware.hex auto detected as Intel Hex
avrdude: input file ./.build/gertduino48/firmware.hex contains 952 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.07s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x41 != 0x00
avrdude: verification error; content mismatch
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode
avrdude done. Thank you.
It is totally random and still there is a verification error, but I have confirmed with blink sketch and LED trick from manual that it is possible to program it. I tried to purge arduino and start over again, but without any improvement. Can I ask for some suggestions?
EDIT
In other thread (http://www.raspberrypi.org/forum/viewto … 96&t=62026) I have found Gordon’s suggestion that such behaviour can occur when RPi is overclocked. It turns out out that some time ago I overclocked my Pi and forgot about that. After returning to factory settings everything runs as it should.
Hey guys,
So… I got into the crazy world of hand SMD soldering. I built the Circuit Skills kit, and now moved on to something that blinks: the Blinken Button (beginner version, of course). I’ve managed to solder it up, in what seems to be a successful manner. I don’t see any shorts, and nothing smokes when applying power. Multimeter (resistance, continuity, etc.) also seems to agree with the schematic.
I’m now up to the part where I have to program the QFP32 package ATMega168, and this is where things aren’t working so well. I am using AVRDude on my Mac with an AVR Isp mkII USB programmer. Running the following command:
Code: Select all
avrdude -p m168 -c avrispmkII -P usb -t -v
gets me this most of the time:
Code: Select all
avrdude: Version 5.8cvs, compiled on Jan 15 2010 at 17:27:01
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/usr/local/CrossPack-AVR-20100115/etc/avrdude.conf"
User configuration file is "/Users/robodude666/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispmkII
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200029302
AVR Part : ATMEGA168
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 5 4 0 no 512 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 16384 128 128 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 : STK500V2
Description : Atmel AVR ISP mkII
Programmer Model: AVRISP mkII
Hardware Version: 1
Firmware Version Master : 1.12
Vtarget : 3.0 V
SCK period : 4.00 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e0106
avrdude: Expected signature for ATMEGA168 is 1E 94 06
Double check chip, or use -F to override this check.
avrdude done. Thank you.
In other words, it reads the device signature incorrectly. Most of the time, 2 of the 3 bytes are correct and one of them is wrong. Rarely does it give me all FFs or other completely wrong signatures.
Once in a while (every 3-4 attempts) it will match the device signature, but get snagged at the following:
Code: Select all
avrdude: Version 5.8cvs, compiled on Jan 15 2010 at 17:27:01
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/usr/local/CrossPack-AVR-20100115/etc/avrdude.conf"
User configuration file is "/Users/robodude666/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispmkII
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200029302
AVR Part : ATMEGA168
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 5 4 0 no 512 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 16384 128 128 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 : STK500V2
Description : Atmel AVR ISP mkII
Programmer Model: AVRISP mkII
Hardware Version: 1
Firmware Version Master : 1.12
Vtarget : 3.0 V
SCK period : 4.00 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9406
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: To protect your AVR the programming will be aborted
avrdude done. Thank you.
Now it complains that the lfuse cannot be read properly.
I tried using the -F and -u flags to ignore these cases, but nothing good comes out of it. It either complains it was unable to read the AVR, or that there was a mismatch.
I have a fresh CR2032 battery, and the ISP cable is connected in the right orientation. What could be wrong? Could a small solder bridge that I can’t see cause this, or does this seem more like I applied too much heat and killed the chip?
Of course here is the picture of the board, though it doesn’t do much good because it’s not super sharp. The other side of the board just has the battery holder and a battery (not pictured).
(click for higher-res)
Cheers,
-robodude666
Unable to flash the MMU board with firmware 0.9.0 provided together with the last
Einsy firmware 3.4.1
Using Slic3rPE-1.41.1-rc+linux64 and micro USB cable between MMU board and PC.
Installed Einsy firmware 3.4.1 with no problems.
See Slic3r log:
avrdude: Version 6.3-20160220-prusa3d, compiled on Oct 5 2018 at 15:41:54
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/tmp/.mount_Slic3roqlBaQ/usr/bin/resources/avrdude/avrdude.conf"
Using Port : /dev/ttyACM0
Using Programmer : avr109
Overriding Baud Rate : 57600
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 20 4 0 no 1024 4 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 : butterfly
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 (probably m32u4)
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as CB
avrdude: reading input file «/home/andre/Desktop/prusa3d_fw_MMU2board_0_9_0.hex»
avrdude: writing flash (17286 bytes):
Writing | ##########avrdude: error: programmer did not respond to command: set addr
avrdude: error: programmer did not respond to command: write block
***failed;
####################################### | 100% 0.56s
avrdude: failed to write flash memory, rc=-1
avrdude: safemode: Verify error — unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Verify error — unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode
avrdude: error: programmer did not respond to command: leave prog mode
avrdude done. Thank you.