这是我尝试运行ARDUINO程序时得到的主要错误。完整的错误列表如下:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer我的代码如下:
int led=13;
void setup()
{
pinMode(13,OUTPUT);
}
void loop()
{
digitalWrite(13,HIGH);
delay(1000);
digitalWrite(13,LOW);
delay(1000);
}我已经尝试过更新驱动程序(它们已经完全更新)并下载了一些程序。我使用的是Windows7,而我的arduino是MEGA 2560。它显示在设备管理器中,并且我的所有连接都是正确的。绿色PWR灯亮起,闪烁的L灯也亮起。当我更新时,RX和TX指示灯闪烁。我在网上几乎什么都试过了。有什么问题吗?
发布于 2015-03-19 08:16:06
Mega 2560出现此错误的另一个可能原因是代码中有三个感叹号。也许是在最近添加的字符串中。
一行中的3个bang标记会导致Mega 2560引导加载程序进入监控模式,无法完成编程。
“!”<-破坏了Mega2560引导加载程序。
要修复此问题,请拔下Arduino USB以重置COM端口,然后重新编译,只需两个感叹号或两个空格即可。然后重新连接Arduino并像往常一样编程。
是的,昨天我被咬了一口,今天我找到了罪魁祸首。这里有一个更多信息的链接:http://forum.arduino.cc/index.php?topic=132595.0
发布于 2013-10-29 06:00:06
错误消息基本上意味着程序员无法联系设备上的引导加载程序;您尝试上传的代码与问题无关。
导致这种情况的原因可能有很多,可能有以下几个问题:
- Blinking is happening, so hopefully you aren't using the wrong port. It might be worth checking again though, sometimes USB COM devices install on strange port numbers.
- Connect TX to RX (and disconnect them from the AVR if possible) then open a terminal on the COM port, you should see characters echoed if you type them. If you don't, something is wrong up-stream of the chip, it could be the communications chip (I think the Arduino 2560 uses a secondary AVR instead of an FTDI for some reason, so that could be broken, either its software or hardware)
* bootloader- The AVR is not executing the bootloader for some reason. If the programmer is not resetting the micro before attempting to connect, this might be the reason. Try to reset the AVR (press and release the button) while the programmer is attempting to connect. Sometimes software that runs in a tight loop will prevent the bootloader from connecting.
- Barring that, the fuses might have gotten messed up or the code erased. You would need to reflash the bootloader and proper fuses, again, see the appropriate info page for your device.
仅限
- Might not be working and would need reprogramming. See the [Programming section on the info page](http://arduino.cc/en/Main/arduinoBoardMega2560), you will need the firmware and Atmel-compatible DFU (device firmware update) software on your computer to reflash the target.
- You're hosed; need a new chip.
有关更多想法,请查看此forum post。
发布于 2014-02-05 19:29:15
我得到这个错误是因为我没有在avrdude命令行中指定正确的程序员。如果您使用Arduino板,则必须指定"-c arduino“。
此示例命令读取hfuse的状态:
avrdude -c arduino -P /dev/ttyACM0 -p atmega328p -U hfuse:r:-:hhttps://stackoverflow.com/questions/19645441
复制相似问题