Flipper Zero crystal oscillator calibration
Calibrate your Flipper against internet time, so the RFID detector app can measure the precise frequency of a low-frequency RFID field.
- 1Connect
- 2Measure
- 3Save
Connect your Flipper
Plug your Flipper in to USB and close qFlipper. Exit any app that's open on the Flipper itself. This browser-based tool requires Chrome or Edge on a computer. See below for alternative options.
Already know the offset? Set it by hand in the app: press Left for Config, then Set calibration manually.
Keep this tab open in the foreground with the computer awake, and stay on the same network.
The calibration is slightly sensitive to temperature, and shifts by about 1 ppm for every 4 °C. Calibrate at about the temperature you'll take readings at, for example indoors for indoor readers.
starting
–Measurement details
This computer relative to the time servers
About this plot
Each dot is one request to a time server and shows how far this computer's clock has moved relative to that server since the start of the run. The line only uses the fastest requests (blue for Akamai, orange for Cloudflare), and its slope shows the overall rate at which the computer's clock is moving away from internet time. A line falling 1 ms over 5 minutes means the computer's clock runs 3.3 ppm slow.
Flipper relative to this computer
About this plot
Each dot is one reading from the Flipper's crystal-driven timer and shows how far the Flipper's clock has moved relative to this computer since the start of the run. The slope shows how quickly the crystal is moving away from this computer's clock, and the scatter represents USB delays. The crystal's true offset (how fast or slow it runs in absolute terms) is this plot's slope plus the computer clock's slope from the other plot.
Command line (Python script)
flipper_crystal.py performs the same calibration using NTP.
curl -LO https://mfcarroll.github.io/rfid-test-tools/flipper/crystal/flipper_crystal.py uv run flipper_crystal.py
uv installs pyserial automatically.
curl -LO https://mfcarroll.github.io/rfid-test-tools/flipper/crystal/flipper_crystal.py pipx run flipper_crystal.py
pipx installs pyserial automatically.
curl -LO https://mfcarroll.github.io/rfid-test-tools/flipper/crystal/flipper_crystal.py pip install pyserial python3 flipper_crystal.py
On macOS or Linux.
curl.exe -LO https://mfcarroll.github.io/rfid-test-tools/flipper/crystal/flipper_crystal.py py -m pip install pyserial py flipper_crystal.py
In PowerShell or the Command Prompt.
Options
For developers
The RFID detector app (1.5 or later) adds
rfid_detector_cal to the Flipper's CLI while the app is
running. Values are in 0.1 ppm, + meaning fast.
- It replies
OK lfcal 64000000 <saved>. -
rreturns<count> <pll>: a 32-bit timer at 64 MHz from the crystal (it wraps every 67 s), and 1 while the clock runs from the crystal. ppm = (counts per second / 64 MHz − 1) × 10⁶. -
p<elapsed s> <total s> [<estimate> <±>]+ Enter updates the progress screen. -
treturnsT <temperature>: the Flipper's temperature (from the battery gauge) in 0.1 °C. -
s<value> [<±>]+ Enter saves the calibration and its ±. The app repliesSET <value>once it has saved it, otherwiseERR <reason>. -
Anything else ends the session (
STOPPED), including Cancel on the Flipper.