我如何修复 Arduino ISP 'Device signature = ...' 错误

问题:

我正在尝试使用 AVRISP MK II 编程器编程我的 Arduino,但每次我尝试编程它(使用 avrdude 或 Arduino 软件)时,我遇到类似这样的错误:

avrdude_device_signature_error.txt
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: MOSI fail, RST fail, SCK fail, Target reverse inserted
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xb058e2
avrdude: Expected signature for ATmega2560 is 1E 98 01
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.

解决方案

在我的情况下,此问题的原因是有扩展板连接到 SPI 总线

由于 Arduino 上的 SPI 总线与用于在线系统编程(ISP)的 ICSP 头共享,而 ISP 是外部编程器用于编程 AVR 芯片的协议,将其他任何东西连接到 SPI 总线可能会导致问题。

*尝试从 SPI 总线断开任何东西。*如果 SPI 总线上额外设备的 CS(芯片选择)信号为低,它可能会干扰与 AVR 芯片的通信!


Check out similar posts by category: Arduino