Closed mcuee closed 1 year ago
Test 2:
FAILED: MSVC with custom avrdude-libftdi/FTDI driver, FT2232H via ISP
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude71 -C avrdude71.conf -c avrftdi -p m328p
E avrftdi_program_enable(874): Device is not responding to program enable. Check connection.
avrdude71 error: initialization failed, rc=-1
- double check the connections and try again
- use -B to set lower ISP clock frequency, e.g. -B 125kHz
- use -F to override this check
avrdude71 done. Thank you.
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude7 -C avrdude7.conf -c avrftdi -p m328p
E avrftdi_program_enable(889): Device is not responding to program enable. Check connection.
avrdude7.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude7.exe done. Thank you.
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git_msvc -C avrdude_git_msvc.conf -c avrftdi -p m328p
E avrftdi_program_enable(874): Device is not responding to program enable. Check connection.
avrdude_git_msvc error: initialization failed, rc=-1
- double check the connections and try again
- use -B to set lower the bit clock frequency, e.g. -B 125kHz
- use -F to override this check
avrdude_git_msvc done. Thank you.
Full debug log for the last run.
Debug log for the MSVC version.
Test 3: FAILED: MinGW64 with stock libftdi-1.0/libusb-1.0/WinUSB driver, FT2232H via ISP
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git -c ft2232h -p m328p
E avrftdi_program_enable(874): Device is not responding to program enable. Check connection.
avrdude_git error: initialization failed, rc=-1
- double check the connections and try again
- use -B to set lower the bit clock frequency, e.g. -B 125kHz
- use -F to override this check
avrdude_git done. Thank you.
Debug log for MinGW version.
Oops, this is invalid. I reversed SDI and SDO port. I am still used to the MISO and MOSI naming convention.
Note to myself: MOSI is called SDO in avrdude; MISO is called SDI.
@mariusgreuel
After fixing this problem, I can use my FT2232H or similar adapters for ISP, either with the MSVC version (FTDI driver) or MinGW version (WinUSB driver).
1) WinUSB driver, MinGW, libftdi-1.0
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git -c ft4232h -p m328p
avrdude_git: AVR device initialized and ready to accept instructions
avrdude_git: device signature = 0x1e950f (probably m328p)
avrdude_git done. Thank you.
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git -c jtagkey -p m328p
avrdude_git: AVR device initialized and ready to accept instructions
avrdude_git: device signature = 0x1e950f (probably m328p)
avrdude_git done. Thank you.
2) FTDI vendor driver, MSVC version, avrdude-libftdi
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git_msvc -c ft4232h -p m328p
avrdude_git_msvc: AVR device initialized and ready to accept instructions
avrdude_git_msvc: device signature = 0x1e950f (probably m328p)
avrdude_git_msvc done. Thank you.
C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git_msvc -c jtagkey -p m328p
avrdude_git_msvc: AVR device initialized and ready to accept instructions
avrdude_git_msvc: device signature = 0x1e950f (probably m328p)
avrdude_git_msvc done. Thank you.
No issues with an ATmega32A as well.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_pr1324v1 -C .\avrdude_pr1324v1.conf -p m32a -c ft4232h -v
avrdude_pr1324v1: Version 7.1-20230320 (6793305)
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\work\avr\avrdude_test\avrdude_bin\avrdude_pr1324v1.conf
Using Port : usb
Using Programmer : ft4232h
AVR Part : ATmega32A
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : possible i/o
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 4 20 64 0 no 1024 4 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 32768 128 256 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 1 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 2000 2000 0x00 0x00
lock 0 0 0 0 no 1 1 0 2000 2000 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
calibration 0 0 0 0 no 4 1 0 0 0 0x00 0x00
Programmer Type : avrftdi
Description : FT4232H based generic programmer
Pin assignment : 0..7 = DBUS0..7, 8..15 = CBUS0..7
VCC = (not used)
BUFF = (not used)
RESET = 3
SCK = 0
SDO = 1
SDI = 2
ERR LED = (not used)
RDY LED = (not used)
PGM LED = (not used)
VFY LED = (not used)
avrdude_pr1324v1: AVR device initialized and ready to accept instructions
avrdude_pr1324v1: device signature = 0x1e9502 (probably m32a)
avrdude_pr1324v1 done. Thank you.
This needs confirmation to see if there is a real issue or not.
From @mariusgreuel https://github.com/avrdudes/avrdude/pull/1324#issuecomment-1478631446 SUCCESS: MSVC with custom avrdude-libftdi/FTDI driver, FT232H via ISP FAILED: MinGW64 with stock libftdi/libusb0 driver, FT232H via ISP FAILED: Linux/Ubuntu 22.04 with usbipd-win, FT232H via ISP
From myself using JTAGKey 2 and another FT2232H breakout board https://github.com/avrdudes/avrdude/pull/1324#issuecomment-1480422098
Test 1 FAILED: MSVC with custom avrdude-libftdi/FTDI driver, JTAGKey2 via ISP FAILED: MinGW64 with stock libftdi-1.0/libusb-1.0/WinUSB driver, JTAGKey2 via ISP
Debug log for the MSVC version.
full debug log when using MSVC version FTDI driver, latest git main
``` PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude_git_msvc -c jtagkey -p m328pb -vvvv avrdude_git_msvc: Version 7.1-20230322 (7a8d257) Copyright the AVRDUDE authors; see https://github.com/avrdudes/avrdude/blob/main/AUTHORS System wide configuration file is C:\work\avr\avrdude_test\avrdude_bin\avrdude.conf Using Port : usb Using Programmer : jtagkey I avrftdi_open(703): Using device VID:PID 0403:cff8 and SN '(null)' on interface A. D write_flush(472): Setting pin direction (0x0000) and value (0x0000) T write_flush(484): Set pins command: 80 00 00 82 00 00 I set_frequency(206): Using frequency: 150000 I set_frequency(207): Clock divisor: 0x0027 D avrftdi_check_pins_mpsse(562): Using valid mask mpsse: 0x0000fff8 avrdude_git_msvc: