[SOLVED] Arduino Mega wont upload unless repeated resets

Hi Everyone, I just bought a Arduino Mega and when i go to upload any code it wont upload and simply gives a message after some time saying timeout.

However when i constantly keep pressing the physical reset button after a few presses it will upload. But there is no fixed number of presses, seems to be completely random.

I tried to flash the bootloader, tried to upload using a different arduino (i used an UNO and tried uploading with Arduino As ISP), reflashed the uploader but none of these seem to work. Any suggestions are appreciated.

You should be programming it via the USB connection , any other method will overwrite the bootloader .
If you can re install the correct bootloader and try again .
If you have anything connected to the mega that might be an issue ( eg on the first com port ) . Disconnect everything and upload a simple sketch .
Is it a genuine Arduino mega 2560 ?

If you can re install the correct bootloader and try again .

Yes i did try to reinstall the bootloader multiple times which does pass but after that I can upload 1 sketch only after that same problem arises.

If you have anything connected to the mega that might be an issue

No i tried by removing everything from it and then upload still failed. Even the simple blink sketch.

Is it a genuine Arduino mega 2560 ?

Yes its genuine Mega

Any sketch will do the same even if i upload the blink sketch for the first time it will upload. Then if i try again right after withouth any changes it will fail again.

I dont think this is to do with the computer or the setup as i have a second Arduino Mega which uploads just fine with the exact same setup.

So what you are saying is that i am just getting lucky when i press the reset button manually?

The first one is real (the one with the problem) and the second one is clone.

I am relatively new to Arduino's but I tried reflashing the chip using flip and a guide I found online which passed and again allowed 1 upload but the issue reappeared right after. I don't think that the actual chip is bad as after uploading a code it runs perfectly.

Ok so I ran the said test and when I close serial monitor, close the IDE then restart everything it does not reset the count and continues from where it was before.

Here is the code:

void setup() {
  Serial.begin(9600);  // Initialize serial communication at 9600 baud rate
}

void loop() {
  static int count = 0;  // Variable to hold the count, initialized to 0
  count++;               // Increment the count

  // Print the count over the serial connection
  Serial.print("Count: ");
  Serial.println(count);

  delay(1000);  // Wait for 1 second before incrementing the count again
}

Can you suggest a way to maybe check the actual trace (like checking continuity with a multimeter )

I was just looking around comparing stuff to my other Mega and i found what looks like a spot for a capacitor or resistor that's unpopulated named "reset en"


Perhaps that's the problem?

Ok I will do that tomorrow morning and let you know, its very late here so I am off to bed now.

Hey, Good News!
After I soldered the reset en pads it works perfectly now it uploads every time and the counter test works too! Thank you very much.

Have the same problem, except I have some bad uno china clone with CH340G, there's no RESET-EN to solder.

Hi @boryagames. I'm going to ask you to post the full verbose output from an upload attempt.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: compilation in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.