when I upload the script to my arduino mega 2560, I have this message : avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Try out the steps below:
Install the board's core via the Arduino IDE:
· Tools > Board > Boards Manager
· Search for "Arduino AVR Boards"
· From the drop-down menu select latest version
· Click "Install/update"
· Wait for installation to finish
· Click "Close" and restart your IDE.
. Plug your board back to the computer and select the board and port via tools.
See https://www.arduino.cc/en/Guide/Cores
Note:
- Use a data USB cable capable of 480Mbps and do not use a USB hub or USB 3.0 port.
- Remove anything wired to the board.
Hello, I have the same message: (4 times)
avrdude: stk500v2_ReceiveMessage(): timeout,
When trying to program a MEGA2560-R3 board on which I change the 16u2.
I programmed the firmware of the 16u2 from this page:
I tried several firmware as it never worked well.
I'm able to reprogram the ATmega128 with the following process:
using an Arduino UNO as programmer.
Then I checked the TxD/RxD signals between 16u2 and ATmega128 and I found a strange behavior:
16u2 is sending first 2 pulses of 320µs at "0", then 7 bytes at a rate of about 14,4kBd, which is not a standard value.
The 7 bytes are the following sequence: 0x1B, 0x01, 0x00, 0x01, 0x0E, 0x01, 0x14 .
The last one is the check sum of the first 6 bytes, but I don't know if they are ok for this board ?
So my questions are:
- is this data rate of 14,4kBd OK ? if not how can I change it ?
- Is the 7 bytes séquence OK ?
I had a idea by disconnecting the serial interface and inserting a "bridge" between the 16u2 and the ATmega128 using a PicKit uc32 board which have 2 serial interfaces. One is programmed at 115200Bd and connected to ATmega128 and one at 11400Bd and connected to the 16u2.
... and it works: I can program the ATmega128.
So there is something wrong in the 16u2 that program the serial bus at 14400Bd instead of 115200Bd.
But I don't know how to correct that
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.