Time Sync & IO
Feature Selection & Exclusivity
| Requirement | Feature | Direction | Configuration |
|---|---|---|---|
| Emit one frame on each external pulse | SYNC_IN trigger | Input | LOG <MSG> ONMARK 1 |
| Align internal clock to UTC | PPS time sync | Input | Connect 1PPS + serial RMC |
| Signal an external host as frames emit | SOUT sync output | Output | Automatic when COM1 streams HI91 / HI83 |
SYNC_IN triggering and PPS time sync share the same SYNC_IN/PPS input pin (see the datasheet for pin number and voltage levels).
WARNING
SYNC_IN triggering and PPS time sync are mutually exclusive. If ONMARK is enabled on any frame of any port, input rising edges trigger frames instead of syncing time and UTC_UNSYNC never clears. Ensure no port uses ONMARK when using PPS sync.
SYNC_IN Triggered Output
Internally pulled down; rising-edge sensitive (leave floating or tie to GND when unused). Each rising edge emits one frame for every message configured as ONMARK 1 across all ports, disabling periodic streaming for those messages.
LOG [<COM>] <MSG> ONMARK 1 (trigger on external rising edge; <MSG> is HI91 or HI83)
LOG [<COM>] <MSG> ONMARK ONCE (software-trigger once; no OK reply — check for data frame)
LOG [<COM>] <MSG> ONTIME <sec> (return to periodic streaming)- Changes apply immediately and persist after
SAVECONFIG.ONMARK ONCEtriggers allONMARK 1frames on that port (port must be inLOG ENABLE). - The triggered frame carries the timestamp of the latest sample when processed, not the exact pulse edge. Keep trigger intervals longer than one frame's serial transmission time.
PPS Time Sync
Feed a GNSS receiver's 1PPS signal to SYNC_IN/PPS and its NMEA serial output to COM1 or COM2 (set that port's baud rate with SERIALCONFIG to match the receiver). Once locked, MAIN_STATUS.UTC_UNSYNC clears to 0 (see Status Word) and HI91 system_time and HI83 utc switch to valid UTC+0 time.
| Parameter | Meaning | Requirement |
|---|---|---|
| Interval between consecutive PPS rising edges | 1000 ms ± 10 ms | |
| PPS high pulse width | Recommended 10–50 ms (rising-edge triggered) | |
| RMC serial transmission duration | Depends on baud rate | |
| Delay from PPS rising edge to RMC arrival | < 1 s (smaller and more consistent is better) |
NMEA requirements:
- 1 Hz rate, terminated with
\r\n; RMC statusA(valid fix) is recommended. - Each RMC timestamp pairs with the immediately preceding PPS rising edge. If RMC arrives more than 1 s late, UTC shifts by a full second with no warning.
- Both PPS and RMC are required; RMC alone cannot sync time. Always use
UTC_UNSYNC = 0to judge sync lock.
Example (2024-06-18 12:35:19 UTC):
$GNRMC,123519.000,A,3958.1234,N,11623.4567,E,0.0,0.0,180624,,,A*70SOUT Synchronous Output
Whenever COM1 transmits an HI91 or HI83 frame, the SOUT pin outputs a high pulse (idles low) just before transmission begins, with the frame starting after the falling edge. External hosts can pair the pulse with MAIN_STATUS.SOUT_PULSE = 1 in the frame to align data to an external clock. Each SOUT_PULSE = 1 frame matches the most recent pulse; if low bandwidth causes dropped frames, an extra pulse may lack a frame, so match by the status bit rather than counting pulses.
- Scope: applies only to HI91 / HI83 on COM1 (not COM2 or other protocols).
- Constraint: enable only one periodic frame type on COM1 when using SOUT. Disable the old frame before enabling the new one:text
LOG COM1 HI91 ONTIME 0 LOG COM1 HI83 ONTIME 0.01 SAVECONFIG - Pause & rate:
LOG DISABLEalso stops SOUT pulses; pulse rate tracks COM1's output period (see the datasheet for logic level and drive strength).
Multifunction IO Remapping (PMUX)
Use CONFIG PMUX<n> IO<m> to remap SYNC_IN or SOUT onto another available IO pin (check the datasheet for exposed pins). Each pin accepts only one function; invalid pins return ERR. Requires SAVECONFIG and REBOOT.
| Function | Signal | Direction | Default Pin |
|---|---|---|---|
PMUX1 | SYNC_IN (and PPS) | Input | IO1 |
PMUX2 | SOUT | Output | IO2 |
Example (move SOUT to IO3 when IO3 is exposed in the datasheet):
CONFIG PMUX2 IO3
SAVECONFIG
REBOOT