我一直在尝试使用基于 FT232H 芯片的 C232HM-DDHSL-0 编程器对我的 ATmega644p 进行编程。
我在我的主目录中编辑了 .avrduderc 以包含以下内容,这些内容是从 /etc/avrdude.conf 改编而来的:
programmer
id = "C232HM";
desc = "C232HM-MPSSE";
type = avrftdi;
usbvid = 0x0403;
# Note: This PID is reserved for generic H devices and
# should be programmed into the EEPROM
# usbpid = 0x8A48;
usbpid = 0x6014; // changed from 0x6010 after checking "lsusb"
usbdev = "A";
usbvendor = "";
usbproduct = "";
usbsn = "";
#ISP-signals // Modified according to datasheet
reset = 5;
sck = 2;
mosi = 3;
miso = 4;
;
我已经能够使用 avrdude 与 MCU 通信
sudo avrdude -c 2232HIO -p m644p -P /dev/ttyUSB0
其中终端的输出是:
Unknown type 6 (0x6) //Remainder pins - 1,2,7,8,9,10 not declared
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e960a
avrdude: safemode: Fuses OK
avrdude done. Thank you.
启用 -vvvv 选项的输出: http ://pastebin.com/z3K8RYJP
但是,当我尝试刷新一个简单的 .hex 文件时,它会在写入 flash 时停止:
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
Unknown type 6 (0x6)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e960a
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 "int1.hex"
avrdude: input file int1.hex auto detected as Intel Hex
avrdude: writing flash (164 bytes):
Writing |
启用 -vvvv 选项的输出: http ://pastebin.com/EmmuCsxN
我还安装了 FTDI 的 D2XX 驱动程序,并按照本指南中概述的步骤进行操作,但无济于事:(请参阅评论以获取链接)
似乎我无法写入 MCU,所以我的第一个猜测是我错误地配置了编程器。任何帮助将非常感激。谢谢!
编辑:刚刚注意到我使用不同的命令与 MCU 进行通信 :(
EDIT2:我使用此配置修复了它:
programmer
id = "C232HM";
desc = "C232HM-MPSSE";
type = avrftdi;
usbvid = 0x0403;
# Note: This PID is reserved for generic H devices and
# should be programmed into the EEPROM
# usbpid = 0x8A48;
usbpid = 0x6014;
usbdev = "A";
usbvendor = "";
usbproduct = "";
usbsn = "";
#ISP-signals
reset = 4;
sck = 1;
mosi = 2;
miso = 3;
;