Например TDA7294

Форум РадиоКот :: Просмотр темы - Не прошивается usbasp через AVRISP mkII
Форум РадиоКот
http://radiokot.ru/forum/

Не прошивается usbasp через AVRISP mkII
http://radiokot.ru/forum/viewtopic.php?f=57&t=171547
Страница 1 из 3

Автор:  tutvam [ Сб июн 27, 2020 23:53:46 ]
Заголовок сообщения:  Не прошивается usbasp через AVRISP mkII

Прошу помочь разобраться почему не прошивается usbasp через AVRISP mkII
Приобрел usbasp.ю индикатор горит красным цветов, пишет необходимо апгрейд софта.

avrdude -p m8 -c usbasp -P usb -v -U flash:r:/tmp/flash_dump.hex:i

avrdude: Version 6.3
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 "/home/petr/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : usb
Using Programmer : usbasp
AVR Part : ATmega8
Chip Erase delay : 10000 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 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
calibration 0 0 0 0 no 4 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


Подключил к AVRISP mkII - usbasp
Изображение

dmesg
usb 1-1.1: new full-speed USB device number 49 using ehci-pci
usb 1-1.1: New USB device found, idVendor=03eb, idProduct=2104, bcdDevice= 2.00
usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.1: Product: AVRISP mkII
usb 1-1.1: Manufacturer: ATMEL
usb 1-1.1: SerialNumber: 000200055103

#lsusb
Bus 001 Device 049: ID 03eb:2104 Atmel Corp. AVR ISP mkII


Примеры брал отсюда
https://ph0en1x.net/77-avrdude-full-how ... linux.html

Тест не проходит связки не проходит.
Что я делаю не так?

# avrdude -c avrisp2 -p m8

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Target not detected
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.

avrdude -c avrisp2 -p m8 -U -P usb flash:w:1/usbasp.atmega8.2011-05-28.hex -v

avrdude: Version 6.3
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 "/home/petr/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : usb
Using Programmer : avrisp2
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200055103
AVR Part : ATmega8
Chip Erase delay : 10000 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 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
calibration 0 0 0 0 no 4 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.17
Vtarget : 0.0 V
SCK period : 8.00 us

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Target not detected
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Автор:  mickbell [ Вс июн 28, 2020 15:26:36 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Насколько я ни хрена не помню, надо там на плате что-то с чем-то замкнуть на время программирования. К сожалению, я не сохранил ссылок на тот сайт. Сам успешно справился, правда, не авр-дюдей, а через среду AVR Studio. Да и AVRISP у меня не настоящий, клон оного.

Автор:  NStorm [ Вс июн 28, 2020 15:46:48 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

JP2 на USBASP замкните на время прошивки, это ж перемычка для программирования.

Автор:  tutvam [ Вс июн 28, 2020 17:11:54 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

NStorm писал(а):
JP2 на USBASP замкните на время прошивки, это ж перемычка для программирования.

В данном случае здесь перемычка для программирования JP1, JP21 выбор питания 3.3V или 5 V. JP3 понижение частоты.

Автор:  NStorm [ Вс июн 28, 2020 17:22:40 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

В оригинальном USBASP на программирование именно JP2 сделано.
Изображение

Китайцы вроде раньше также и подписывали... может поменялось что. Покажите фото вашего аспа поближе, сверху и в нормальном разрешении.

Автор:  tutvam [ Вс июн 28, 2020 21:15:53 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Да, конечно.
Изображение Изображение

Автор:  NStorm [ Вс июн 28, 2020 22:40:48 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Кхм. Вроде всё верно. Может на 5V надо соединить перемычку на JP21?

Автор:  tutvam [ Вс июн 28, 2020 23:06:58 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Смущает, что
Vtarget : 0.0 V
Когда поставил перемычку, получул ошибку.
И красный индикатор начал моргать на AVRISPmkII
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: RST fail, Target not detected
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Автор:  NStorm [ Вс июн 28, 2020 23:31:26 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

tutvam, всё ясно, оказывается AVRISP mkII не умеет сам подавать питание на целевой МК. По Vcc он только определяет питание, для выставления нужного уровня на выходах. Подавайте на Vcc+GND USBAsp'а питание 5В и прошьется всё, в USB воткнуть наверное не получится - D+ / D- на линии могут мешать прошивке. Это не точно, но лучше чисто питание отдельно подать.

Автор:  tutvam [ Вс июн 28, 2020 23:36:31 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Попробую, а пока так.
Как-то раз проскочило, больше не повторялось
~/usbasp/1$ avrdude -c avrispmkII -p m8 -U -P usb flash:w:1/usbasp.atmega8.2011-05-28.hex -v

avrdude: Version 6.3
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 "/home/petr/.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: 000200055103
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
AVR Part : ATmega8
Chip Erase delay : 10000 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 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
calibration 0 0 0 0 no 4 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
avrdude: usbdev_send(): wrote 0 out of 2 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
avrdude: usbdev_send(): wrote 0 out of 2 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
avrdude: usbdev_send(): wrote 0 out of 2 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
Hardware Version: 0
Firmware Version Master : 0.00
avrdude: usbdev_send(): wrote 0 out of 2 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
Vtarget : 20.7 V
avrdude: usbdev_send(): wrote 0 out of 2 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
SCK period : 0.00 us

avrdude: usbdev_send(): wrote 0 out of 12 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
avrdude: AVR device initialized and ready to accept instructions

Reading | | 0% 0.00savrdude: usbdev_send(): wrote 0 out of 6 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
avrdude: usbdev_send(): wrote 0 out of 6 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
Reading | ################# | 33% 0.01savrdude: usbdev_send(): wrote 0 out of 6 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x303030
avrdude: Expected signature for ATmega8 is 1E 93 07
Double check chip, or use -F to override this check.
avrdude: usbdev_send(): wrote 0 out of 3 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: usbdev_send(): wrote 0 out of 1 bytes, err = could not detach kernel driver from interface 0: No data available
avrdude: stk500_send_mk2(): failed to send command to serial port
avrdude: stk500v2_getsync(): error communicating with programmer: (0)

avrdude done. Thank you.

Автор:  NStorm [ Пн июн 29, 2020 00:01:21 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Попробуйте от root'а запустить (через sudo).
Если не поможет - кабель другой попробовать или на другом ПК.

Добавлено after 2 minutes 12 seconds:
Команда кстати правильно вот так должна писаться:
Код:
sudo avrdude -c avrispmkII -p m8 -P usb -U flash:w:1/usbasp.atmega8.2011-05-28.hex -v

Т.е. после -U должна следовать инструкция для прошивки.

Автор:  tutvam [ Пн июн 29, 2020 09:14:37 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Благодарю, NStorm!

Похоже начало получаться :)

Я из под рута выполнял, с питанием да , промахнулся и с синтаксисом.
Но индикатор после отключения JP1 и от avrispmkII, все же горит красным. Может у него и другого нетю
avrdude -c avrispmkII -p m8 -P usb -U flash:w:1/usbasp.atmega8.2011-05-28.hex -v

avrdude: Version 6.3
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 "/root/.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: 000200055103
AVR Part : ATmega8
Chip Erase delay : 10000 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 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
calibration 0 0 0 0 no 4 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.17
Vtarget : 5.1 V
SCK period : 8.00 us

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9307 (probably m8)
avrdude: safemode: hfuse reads as D9
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 "1/usbasp.atmega8.2011-05-28.hex"
avrdude: input file 1/usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: writing flash (4700 bytes):

Writing | ################################################## | 100% 1.76s

avrdude: 4700 bytes of flash written
avrdude: verifying flash memory against 1/usbasp.atmega8.2011-05-28.hex:
avrdude: load data flash data from input file 1/usbasp.atmega8.2011-05-28.hex:
avrdude: input file 1/usbasp.atmega8.2011-05-28.hex auto detected as Intel Hex
avrdude: input file 1/usbasp.atmega8.2011-05-28.hex contains 4700 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.41s

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

avrdude: safemode: hfuse reads as D9
avrdude: safemode: Fuses OK (E:FF, H:D9, L:EF)

avrdude done. Thank you.

Автор:  NStorm [ Пн июн 29, 2020 09:31:14 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Вроде всё прошилось у вас нормально, судя по логу уже без проблем. У вас 2 обычных LED стоит там, может красный всегда и должен гореть, просто питание показывает? Вы попробуйте уже через USBAsp прошить что-нибудь.

Автор:  tutvam [ Пн июн 29, 2020 10:35:55 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

Вполне возможно, питание показывает.
Пытаюсь поверить связь с ATMega-32A-AU, пока не получается, может опять что-то не то делаю, микросхема на плате.
avrdude -c usbasp -p m32 -P usb

avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Автор:  NStorm [ Пн июн 29, 2020 12:06:25 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

А МК целевой случаем не прошит уже? Может там фьюзами отключено что-то, что мешает прошивке. И подключение проверьте, каждый провод, распиновку.

Автор:  tutvam [ Пн июн 29, 2020 12:39:29 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

МК новый был, с фьэюзами дело не имел пока, подключение проверял , 5V на плату с usbasp подается.

Автор:  NStorm [ Пн июн 29, 2020 13:22:16 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

"Новый" - случаем не с AliExpress? Там сплошь и рядом фуфло БУшное и бракованное продают, имейте в виду. В 1ом посте кстати у вас, где попытка прошить atmega8 тоже проблема не в прошивке была в общем-то, а в том, что целевой МК не виделся.
Как подключаете? Плата с мегой32 у вас самодельная? Какие пины выводили, как подключаете? Надо MOSI->MISO, MISO->MOSI, SCK->SCK, RESET->RESET и питание.

Автор:  tutvam [ Пн июн 29, 2020 13:35:51 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

понизил частоту на программаторе JP3, пошло!
avrdude -c usbasp -p m32 -U lfuse:w:0xc3:m -U hfuse:w:0x99:m

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9502 (probably m32)
avrdude: reading input file "0xc3"
avrdude: writing lfuse (1 bytes):

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

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

Reading | ################################################## | 100% 0.01s

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

Writing | ################################################## | 100% 0.01s

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

Reading | ################################################## | 100% 0.01s

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

avrdude: safemode: Fuses OK (E:FF, H:99, L:C3)

avrdude done. Thank you.


Теперь другой вопрос как выставить эти параметры в avr8 Burn-O-Mat?
или через avrdude, нужно залить eeprom и flash

Изображение

Автор:  NStorm [ Пн июн 29, 2020 13:44:08 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

С новой прошивкой кстати скорость можно ключиком -B выставлять, не меняя перемычку.

В смысле выставить фьюзы так? Или всё-таки flash & eeprom зашить?
Если фьюзы, то почти также, как выше для меги32:
Код:
avrdude -c usbasp -p m8 -B 10 -U lfuse:w:0x62:m -U hfuse:w:0xDF:m


Если флэш и EEPROM:
Код:
avrdude -c usbasp -p m8 -B 10 -U flash:w:file.hex -U eeprom:w:file.eep

Толкьо имена файлов правильные напишите.

Автор:  tutvam [ Пн июн 29, 2020 14:15:55 ]
Заголовок сообщения:  Re: Не прошивается usbasp через AVRISP mkII

не ту картинку скинул, но не важно а extended fuse куда?

Страница 1 из 3 Часовой пояс: UTC + 3 часа
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/