adafruit / ArduinoCore-samd

115 stars 119 forks source link

SAMD21 waits 2 seconds at start-up #231

Open nikodiyana opened 4 years ago

nikodiyana commented 4 years ago

When the SAMD21 Arduino core enables external oscillator (XOSC32K), it sets a start-up time of around 2 secs with the instruction SYSCTRL_XOSC32K_STARTUP( 0x6u ), (startup.c, line 353). The timings are described on data sheet page 185.

This guarantees a stable clock, however, it hangs the chip during startup quite a while - too bad for quick starting and power saving applications.

On the SAMD51 there is no such wait. Why not removing it for the SAMD21 too?