Skip to content

I2C Protocol ​

Applies only to models with the -I2C suffix (such as HI05-I2C). I2C shares the CAN pins, so -I2C models have no CAN interface. Pull-up resistors are not populated inside the module and must be placed on the host board. Use COM1 for bulk debugging and firmware upgrades.

Bus Parameters & Addressing ​

ItemSpecification
7-bit device addressDefault 0x50 (80), shared with MD_ID (0x0005); range 0x08–0x77, takes effect immediately. Shares the address of common 24Cxx EEPROMs — connect the module alone to change its address if an EEPROM is on the same bus
Bus speed100 kHz or 400 kHz (1 MHz Fm+ not supported)
Clock stretchingHost must support it; allow at least 20 ms when Flash writes or activity on other ports overlap a transaction
Recommended poll rate (default 74 B frame)≤ 200 Hz at 400 kHz; ≤ 100 Hz at 100 kHz

Basic read/write rules:

  • Register addresses count 16-bit words (2 bytes each, big-endian / MSB first); addresses auto-increment within a read transaction.
  • The module infers the operation from the write transaction length. Split every request and read into two separate transactions (Write+STOP, then Read+STOP) — do not use Repeated START.
Address SpacePurpose
0x0000–0x0FFFRegister area (same map as Modbus Registers, max 32 words per read)
0x1000 and upComplete HI83 frame of the latest sample (same layout and CRC as Serial HI83, little-endian payload)
Write PayloadMeaning
ADDR_H ADDR_L (2 bytes)Set read pointer; writing 10 00 also latches the latest HI83 frame
ADDR_H ADDR_L COUNT (3 bytes)Request register read, COUNT in 1–32
ADDR_H ADDR_L DATA... (even length, 4–66 bytes)Write contiguous registers (invalid values are silently ignored; read back to confirm)

Reading the Latest HI83 Frame ​

I2C has no fixed output rate; each request to 0x1000 snapshots the latest sample (-I2C default HI83_MAP = 0x0000003B, 74 bytes):

  1. Write 10 00 + STOP to latch the latest sample.
  2. Read the 6-byte header (5A A5 + LEN + CRC). While packing, the module returns NACK — retry the read every 1 ms for up to 1 s.
  3. Write 10 03 + STOP to move the pointer to the payload start.
  4. Read LEN payload bytes.
  5. Verify CRC-16/XMODEM and decode using data_bitmap.
  • If no sample is ready right after boot, bytes read 0 (first byte ≠ 0x5A); skip and retry.
  • If header CRC and LEN match the previous frame, no new sample arrived yet (polling faster than internal rate) — skip steps 3–4. When frame size is known, you may read all 6 + LEN bytes in one read after 10 00, or read in chunks by moving the pointer; reads past the end return 0.
  • Use the official C driver hipnuc_i2c.c/.h (handles NACK retry, boot wait, register access, and deduplication); see the C SDK README.

Common Configuration Registers ​

In addition to shared Modbus registers (0x0000 CTRL, 0x0005 MD_ID, 0x0006 PROFILE, 0x0007 COORD, 0x0008–0x000B magnetic calibration, 0x00A5 ATT_RST, 0x00A6 URFR, 0x0070–0x0082 version), -I2C models expose two extra registers:

RegistersNameTypeR/WDescription
0x0408–0x040FSN_STRASCIIRProduct serial number (first 16 chars of SN= in LOG VERSION, 2 chars/word, MSB first)
0x00B8–0x00B9HI83_MAPu32R/WHI83 bitmap: 0x00B8 high 16 bits, 0x00B9 low 16 bits; must be written in one 4-byte write transaction (single-word writes are ignored)

Example: set HI83_MAP = 0x0000013B (adds temperature; frame grows 74 → 78 bytes) and read back ([0x50] is the 7-bit address). Takes effect and saves immediately for the next 10 00 request:

text
→ [0x50] Write 00 B8 00 00 01 3B    write 0x00B8–0x00B9 together
→ [0x50] Write 00 B8 02             request 2 registers
← [0x50] Read  00 00 01 3B          confirm value

Example: change device address 0x50 → 0x60 (immediate and auto-saved):

text
→ [0x50] Write 00 05 00 60          update MD_ID
→ [0x60] Write 00 05 01             read back at new address
← [0x60] Read  00 60

NACK Retry & Reset Timing ​

  • NACK means busy: the module NACKs its address while packing data or writing Flash. Retry every 1 ms for up to 1 s. When a read is NACKed, retry only the read transaction — do not resend the read request.
  • Reset recovery: after power-up, reboot, or factory reset, keep the bus idle for ≥ 150 ms, then poll 0x0005 (MD_ID) until it returns the device address. After a factory reset, the address may revert to 0x50: poll the old address first, then 0x50 if silent.
  • Transaction timeout & integrity: finish each transaction (START to STOP) within 50 ms; wait 100 ms after any timeout or bus error before retrying. Register reads have no CRC — read critical parameters twice and compare in noisy environments.

Last updated:

IMU · AHRS · INS · RTK Support Center