is there a difference in sending a serial command at setup and during loop?

zoomkat:

Again the arduino mega is externally powered.

The power source usually has nothing to do with resetting an arduino. Activity on the serial port causes the arduino to reset. When a pc opens a serial port it sends signals on the rts/dtr setial lines which cause the arduino reset (unless defeated).

Even if the mega is connected to the pc via two pins tx & rx on Serial1 via the GPIO?