I previously had issue updating code to Arduino Mega (clone). This is a continuation of this issue, but I think it should be made as separate thread.
After some time spending with it. Turns out if I change my USB port and connect it another USB port, the Mega is detected in port COM 6. I can upload code to the Mega using this COM port (COM6), although it shows an error sometimes. But if I change it back to the previous USB port (here the Mega detected as connected in COM9), I can't upload anything. You can see the error message in the above link.
I also have a Uno and tried uploading code to it through the same USB port (here it is detected as COM8), I can upload code.
I used the working COM (COM6) to upload Marlin FW to the Mega and I can connect my printer through the same COM port, but if I try it through COM9 I can't connect.
So why can't I use COM 9?
PS: I've been COM9 being used to communicate with the same Mega.