Hi - I think this is expected... Because the Pico doesn't know if it has a crystal or not it has to check, so I believe what it does is:
Powers up using the internal RC oscillator
Switches on the external oscillator
Starts executing code
After ~1 second it then looks at the external crystal and it it seems to be working it swaps over to using it.
But that's complicated again, because on the Pico, we wanted to be able to get accurate timing (better than 32kHz), but that timing should also match the real time clock (which only runs at 32kHz).
So we have some crazy logic that uses the processor's high speed clock counter, but then syncs that against the RTC - and it takes a while to adjust itself to the right speed, especially as it just started adjusting itself once to the internal RC oscillator and then has to readjust to the external one.
So I'm afraid I don't think there's a great deal we can do to avoid that
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi - I think this is expected... Because the Pico doesn't know if it has a crystal or not it has to check, so I believe what it does is:
But that's complicated again, because on the Pico, we wanted to be able to get accurate timing (better than 32kHz), but that timing should also match the real time clock (which only runs at 32kHz).
So we have some crazy logic that uses the processor's high speed clock counter, but then syncs that against the RTC - and it takes a while to adjust itself to the right speed, especially as it just started adjusting itself once to the internal RC oscillator and then has to readjust to the external one.
So I'm afraid I don't think there's a great deal we can do to avoid that