Why is there a 2-3 second delay before the XIAO SAMD21 gets recognized by Windows?

Hey, I have multiple XIAO SAMD21 boards, and all of them have a few second delay after plugging it in and it appearing in Windows device manager.

I’ve also tested with the XIAO ESP32S3 and it gets recognized instantly, also with the Adafruit QT-PY SAMD21, which is based on the XIAO version. It also gets recognized instantly.

i would assume the SAMD uses a different driver that is probably generic and the windows takes a little time to search thru its records

you might verify by checking

It doesn’t appear under the HID, I guess unless you use a HID library.

It appears under the “Ports”:

Yeah … I didn’t have any plugged in but you got the picture

There are two things going on here, possible bootloader and the external 32 kHz xtal startup.
If you’re not using a bootloader that rules out the first.

The 48 MHz PLL is normally locked to the external 32 kHz xtal.
Low frequency xtals have miserable cold startup.
The SAMD21G allows for startup of up to 4 seconds!
In the clock startup source that I was using it was set for 2 seconds.
How good a xtal and how fast a startup you can count on is unknown.
I trimmed my source code down to 0.5 seconds.

Find the source code for your clock setup and look for:
SYSCTRL->XOSC32K.reg = SYSCTRL_XOSC32K_STARTUP( 0x6u ) …
7 = 4S, 6=2S, 5=1S, 4=0.5S …