Arduino mega faulty uart

I've just got an Arduino Mega 2560 Rev3 (I'm fairly sure it is genuine Arduino all the markings are right).

I can't upload a single program to it via uart, nor get any data via uart with the 16U2 usb chip. I can read uart data from uart0 with my FTDI Rs232 wire but not upload anything via the RS232 wire. The TX and RX lights never light up.

The uart upload prints this when you try to upload:

         Using Port                    : /dev/ttyACM3
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
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

I tried burning the bootloader using an Arduino compatable nano as ISP, and that made no difference, I tried re-burning the firmware to the 16U2 also using its ICSP headers. ICSP programming on both is successful, and the situation did not change after burning the firmware to the 16U2.

I've had a fair experience using Arduino compatable nanos with the CH340G, Arduino Nano everys, and also some usage of Atmega 1284 with Mightycore firmware, also used ESP8226s and the Pi pico. All the rest of these work now without issue, the CH340G runs fine with Linux and no need to install the driver as it's shipped ready with Linux distros. Interestingly after installing the new boards the 16U2 worked fine on the Nano every.

I'm running Fedora Linux version 34, and Arduino IDE 1.9.0Beta I updated the Arduino boards today in Arduino IDE and that made no difference. I've also tried it from my other computer running Debian10 and had the same issue.

It's a great shame to say that I might have done better to but the £20 Arduino mega compatable board with CH340G than spend the £40 on the genuine board I did buy.

Please might someone be able to help or at least give some pointer to what's going wrong?

Did it come with the blink program running. It is possible it was not properly programmed with the boot loader. Also check your cable it could be defective.

I would go back to basics...

  1. when you plugged the USB cable into your computer did your OS recognize something was there?

  2. I'm not familiar with the Linux versions but you have an old IDE beta. Maybe updating your IDE could help.

  3. I'm not knocking Linux but do you have a windows computer to also test on?

Is /dev/ttyACM3 indeed the Mega? Does it disappear when you disconnect the board?

Did you try the Loop-Back Test Instructions? It will tell you if the path from the PC to the 16U2 is working. Note that the TX/RX LEDs ared driven by the 16U2.

The Nano Every does not use the 16U2; am I misunderstanding something?

Thank you all for the help and ideas.

I'd certainly not come across the loopback test before.

The Arduino mega did come with the D13 light blinking program, and this was blinking again after ICSP programming the mega's bootloader.

I don't have a Windows computer with Arduino IDE installed.

Arduino IDE does recognise the board on /dev/ttyACM3 because the tools menu shows

Port: "/dev/ttyACM3 (Arduino Mega or Mega 2560)"

I've tried 2 different USB wires which both work with other devices.

Just tried the loopback test

On plugging in, DMESG read:

usb 2-2: New USB device found, idVendor=2341, idProduct=0042, bcdDevice= 0.01
[56263.467288] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[56263.467295] usb 2-2: Manufacturer: Arduino (www.arduino.cc)
[56263.467299] usb 2-2: SerialNumber: ............(I'm unsure it is wise to give away the serial number on the forum)
[56263.471273] cdc_acm 2-2:1.0: ttyACM3: USB ACM device

Nothing comes back when typed into the Arduino IDE serial monitor and the return key pressed, so something must be amiss with the 16u2.

Trying the loopback test on an Arduino Uno with the 16u2 works perfectly.

You're right - the Nano every does not have the 16u2 that's my mistake.

I suggest that you send it back to the seller.

Posted an answer in another thread, not going to post it here again, but in short - change the USB cable and use the shortest possible one - the shorter, the better, and if possible, with good shield. I guess the serial chip on these cheap clones is total crap.

Interesting statement. How do you know that it's a cheap clone?

Fair point, however Chris thinks it is a genuine just by the markings. And I know mine is a cheap clone for sure (bought it from China for a fraction of the original cost), as I bought an original from an authorised dealer for a much greater price.

I was actually asking how you knew that the OP had a cheap clone?

FYI, I have some Nanos with CH340 TTL-to-USB; they have survived for the last couple of years.

OK, edited my post :slight_smile: Also, my board uses an unknown serial chip - no markings over it and Windows sees it just as a serial port as I have other boards with CH340 and when I connect them, Device Manager says they are CH340. So yeah, I made some assumptions, but it doesn't hurt trying with a short cable as I was getting exactly the same timeout error messages.
Sorry, forgot to mention: I had issues with the original USB cable that came with my Arduino UNO starter kit and I use it constantly for other boards too (including clones). The board connected, but refused to be programmed. As soon as I replaced the cable, no issues. So original or not - no guarantee :wink:

I agree on that.

Although one never knows what manufacturers of cheap boards do, they usually don't put 16U2 chips on them. And the board has clearly been identified (in software) as a Mega so can not possibly have the CH340.

That's very cheap. But are you sure? The CH340 on my Nanos does not seem to have markings on it. This is a photo under an angle with flash and the markings are clearly visible.

Yeah, I am sure my chip does not have any markings on this Mega board. That is why I was ready to throw the board away, but I gave it a last chance with one very short cable that I had and it worked just fine. (If it had any markings, I would've replaced the chip and try again).

Btw, attaching the "faulty" cable again I see the prints that should come out of the board every second, however some of them are missing (baud rate 115200):
image
Switched the cable back to upload the sketch to use 9600 speed and here is what I got when I used the wrong cable:
image

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.