← RFID test tools

Proxmark3 crystal oscillator offset

Measure how fast or slow your Proxmark3's 16 MHz crystal runs, against internet time.

  1. 1Connect
  2. 2Measure
  3. 3Result

Connect your Proxmark3

Plug your PM3 in to USB, not Bluetooth, and quit the pm3 client or anything else using it. This browser-based tool requires Chrome or Edge on a computer. See below for alternative options.

Connected
Proxmark3
Checking the firmware…

Keep this tab open in the foreground with the computer awake, stay on the same network, and leave the PM3's button alone.

Options

starting

–
Estimate so far
–
–
The crystal's offset, + meaning fast.
PM3 relative to this computer
–
This computer's clock
–
PM3 read scatter
–
Network check
–
Firmware

Measuring needs the test firmware, which is Iceman master plus a command that reads the crystal-driven tick counter (source). Flash the test firmware with your own pm3 client, and flash your usual firmware back when you're done. Flashing the OS leaves the bootloader alone.

./pm3-flash hw-ticks-a8471ac1-pm3generic-fullimage.elf

Run the command from your proxmark3 folder, with the image in that folder. On an RDV4, use the RDV4 image's name. pm3-flash finds the PM3's port itself. To go back, run ./pm3-flash-fullimage there as usual.

Command line (Python script)

pm3_crystal.py performs the same measurement using NTP. The script also needs the test firmware, and the pm3 client must be closed.

curl -LO https://mfcarroll.github.io/rfid-test-tools/proxmark3/crystal/pm3_crystal.py
uv run pm3_crystal.py /dev/tty.usbmodemXXXX

uv installs pyserial automatically.

Options

PORT
The PM3's serial port: /dev/tty.usbmodem… on macOS, /dev/ttyACM0 on Linux, COM5 or similar on Windows.
--minutes N
How long to measure. 30 by default.
--server HOST
The NTP server. time.cloudflare.com by default.
--log FILE
Write every sample to a file.

For developers

The test firmware adds CMD_HW_TICKS (0x011B) to the PM3's protocol (branch feat/hw-ticks). The command reads the firmware's tick counter (TC0 and TC1 chained), which counts the master clock divided by 32. The PLL makes the 48 MHz master clock from the crystal. The count therefore runs at 1.5 MHz. The 125 kHz LF carrier also comes from the crystal and is off by the same ppm.

Log