Hi,
I can see that 32768Hz Xtal oscillator is running in my MKR WAN 1300 and 1310 boards, but is it really needed to run?
Or the board and LoRa could work without it?
Thanks,
Tipo
Hi,
I can see that 32768Hz Xtal oscillator is running in my MKR WAN 1300 and 1310 boards, but is it really needed to run?
Or the board and LoRa could work without it?
Thanks,
Tipo
Is that crystal disturbing You and needs to be removed?
That is a crystal used for timing, clocks.
Whether or not you require the 32.768kHz external crystal depends on your application. If you require some absolute time measurement, such as the SAMD21's Real Time Counter/Clock (RTC) then it's far better to use the 32k crystal, since the microcontroller's own 32k internal oscillator is significantly less accurate.
To give you an idea, the accuracy of external crystal is around ±1.7s per day, while the internal oscillator is around ±20 minutes per day.
By default the board will generate it's 32.768kHz clock source from the crystal (XOSC32K). To run your sketches using the microcontroller's on-chip 32.768kHz internal oscillator (OSC32K), you need to add the CRYSTALLESS build flag the MKR WAN 1300 or 1310 entry in the Arduino SAMD21 "boards.txt" file:
mkrwan1310.build.extra_flags=-DUSE_ARDUINO_MKR_PIN_LAYOUT -D__SAMD21G18A__ {build.usb_flags} -DUSE_BQ24195L_PMIC -DVERY_LOW_POWER -DCRYSTALLESS
The "boards.txt" file (on my Windows machine at least) can be found at:
C:\Users\Computer\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.11\
@tipo1000 By the way, I forgot to mention that either the internal or external 32.768kHz clock source is then multiplied up to the 48MHz main CPU clock using the on-chip Digital Frequency Locked Loop (DFLL48M). Therefore a 32.768kHz clock source is required (in this case).
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.