Custom arduino board flashing

We are working on custom Arduino Mega board and encountered a problem with flashing the card.
There is our scheme:


The reference:

We upload through ISP the images provided at git hub:

But still don't see the board as COM port in device manager and can't upload sketches via Arduino IDE.

does your design use an in circuit programmer or USB?

We use USBTiny to flash *.hex files

Your PC will react on the 16U2. Did you burn the firmware?

I suspect that you mean via USB? If so, see my first comment about the 16U2.

don't know what a USBTiny does.

is it an interface between USB and the Serial connections (pins 0 & 1) that supports the protocol for programming and Arduino compatible chip?

Yes, we flashed Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex to 16U2, but still din't see the board in device manager.

I know the 16U2 is USB to serial bridge for Mega2560. If we upload sketches via ISP connector to Mega2560 it works fine.

But the issue is uploading sketches via USB in IDE

shouldn't the IDE recognize the USBTiny once it's connected to USB?

Isn't the Arduino compatible Mega already programmed with the bootloader?

The problem seems to be something with ATmega16U2 and USB circuits, FW etc. It has nothing with ATmega2560.
Are you sure the USB-C is connected correctly?

According to pinout seems to be correct
image

We use USBTinyISP only to flash the firmware via ISP connector.

and of course you have not forget to flash stk500boot_v2_mega2560.hex to mega2560 chip, right?

are your trying to program the Mega via the ISP connection, not using the serial interface?

I've never used USB-C but according some designs on the internet A5 B5 should be tied down to GND via 5k1 resistors.
Your schematics is not clear for me, plus it is too small.

Didn't forget :)"

That has nothing to do with the board detection. Missing that will result in not being able to upload but board detection is an issue with the 16U2, cable or PC.

We checked on another PC and checked with multiple cable.

Even if the connection is in USB1.1-2.0 mode? USB-C as I know only gaives possibility to use USB3.0 Protocol, but if master both sides useing USB2.0 those pins does nothing.

I'm not sure. As I wrote, I'm not familiar with USB-C but maybe it is way how to force USB 3 to USB2. It is "Configuration Channel".
It is definitely an issue with USB-ATmega16U2-firmware16U2.

1 Like

I’ve only tried this once and failed … but there is a lot on google about programming the 16u2 and other threads on here worth a look .
Example

You mean the official firmware from github couldn't work properly?