Arduino Mega 2560 Serial Input Cycle Problem

Yes RX0 and TX0 are connected to USB of Arduino Mega with a USB to UART converter chip. We can directly connect to TX0 and RX0 using an external USB to UART cable. It bypasses the internal conversion chip. It works then.