Has this ever happened to you? You're working on an Arduino sketch, happily uploading it to your board, then suddenly Arduino says it can't upload since the COM / Serial port "doesn't exist". This unfortunately seems to happen quite often. It typically occurs with boards that use "native USB" to provide the serial port. What is native USB? And why do these boards tend to lose their serial ports?
This guide discusses what a "native USB" board is and how they provide their COM port connection. For contrast, boards that lack native USB and instead rely on a dedicated USB-to-serial converter are also discussed. This should help to better understand the general nature of these two board designs and why native USB boards behave the way they do. Additionally, ways of dealing with and recovering from native USB boards that have lost their COM ports, or just generally are acting weird, are covered.
Before going into more detail, let's briefly describe the two main classes of Arduino boards and the terminology used to refer to them.
- USB-to-Serial Converter Boards - These boards have a dedicated piece of hardware, a USB-Serial bridge chip, separate from the main processor, that "bridges" the connection between the host PC's USB and the processor's serial interface.
- Native USB Boards - These boards use processors that have a USB peripheral interface "native" to the processor itself, so the processor and host PC's USBs can be connected directly.
Now let's look at these two in more detail.