首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >avrdude: stk500v2_ReceiveMessage():超时

avrdude: stk500v2_ReceiveMessage():超时
EN

Stack Overflow用户
提问于 2013-10-29 05:30:53
回答 14查看 161.3K关注 0票数 34

这是我尝试运行ARDUINO程序时得到的主要错误。完整的错误列表如下:

代码语言:javascript
复制
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

我的代码如下:

代码语言:javascript
复制
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指示灯闪烁。我在网上几乎什么都试过了。有什么问题吗?

EN

回答 14

Stack Overflow用户

发布于 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

票数 20
EN

Stack Overflow用户

发布于 2013-10-29 06:00:06

错误消息基本上意味着程序员无法联系设备上的引导加载程序;您尝试上传的代码与问题无关。

导致这种情况的原因可能有很多,可能有以下几个问题:

  1. UART communications

代码语言:javascript
复制
- 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)

  1. ATmega* bootloader

代码语言:javascript
复制
- 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.

仅限

  1. Arduino Mega 2560 : ATmega8U/16U软件

代码语言:javascript
复制
- 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.

  1. 硬件损坏主板、AVR或FTDI卡芯片

代码语言:javascript
复制
- You're hosed; need a new chip.

有关更多想法,请查看此forum post

票数 14
EN

Stack Overflow用户

发布于 2014-02-05 19:29:15

我得到这个错误是因为我没有在avrdude命令行中指定正确的程序员。如果您使用Arduino板,则必须指定"-c arduino“。

此示例命令读取hfuse的状态:

代码语言:javascript
复制
avrdude -c arduino -P /dev/ttyACM0 -p atmega328p -U hfuse:r:-:h
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19645441

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档