Strange Upload COM Port Behavior

When I attach my UNO MINIMA to my laptop it creates a USB Port COM13 and USB Device DFU-RT Port...

But when I go to upload a sketch the COM port disappears and the USB device changes to Santiago DFU...

By the time USB COM port reconnects the sketch is already in the loop unless I put a long delay in setup.

After an upload completes pressing the reset button always again disconnects the COM port and then reconnects.

Any ideas how to fix this behavior?

what are you trying to fix?

there are 2 devices:

  • the DFU device
  • the Arduino serial over USB

When the upload needs to happen the board enters DFU, so it appears as a new device.
Arduino CLI and Arduino IDE are both able to reconnect automatically so I don't see an issue to fix :slight_smile:

moreover, you can enter DFU mode by double-pressing the reset button

Hi @ubidefeo - so every sketch will need a delay added at the beginning of Setup for the serial monitor to work?

If the Minima is connected to my laptop pressing the reset button disconnects it from the COM port and by the time it reconnects the sketch is well started and often in the loop already before any serial feedback can print.

That just doesnā€™t seem right and different from any other Arduino I have used (other than the GIGA which is doing the same thing but worse).

Or is there some common code practice to wait for the reconnection to occur before proceeding?

Thank you for the feedback

oh!
now I got it, you lose some of the initial print output?

for USB boards it's better to have a

while(!Serial && millis() < 3000){}

this is an old problem which happened with all the boards that reset the USB connection by not having an in-between chip.

Leonardo, Micro and many more act the same

1 Like

Thank you @ubidefeo !
I have only used UNO boards in the past so this behavior was very disconcerting.
Thank you for the explanation and solution.

1 Like

En mi Arduino minima ha sucedido lo mismo, al cargar un programa que funciona con un NANO se bloquea y pierdo la comunicaciĆ³n me ha sucedido ya con tres Arduino minima y cuando eso sucede, el voltaje de 3.3V baja hasta desaparecer. TambiĆ©n aparece Santiago (Upgrade) y no reconoce el puerto Com. Aparece Puerto "2-1.1" en el IDE.

*/

#include <U8g2lib.h>

#include <SPI.h>

#include <mcp2515.h>

#include <Wire.h>