Triaxis

MLX90396

Triaxis three-axis magnetometer
Driven over SPI, which is how the part is strapped here: the MS_A0_A1 pin below ⅛ VDD selects SPI rather than I2C. Built from the preliminary datasheet V0.5 and from a working reference implementation, which disagree in three places — the temperature word comes first in a measurement reply, values are 12-bit, and the temperature bit of the read command is 0x41 rather than the 0x48 the datasheet's table implies. The last one is a switch below. Readings are raw LSB: microtesla needs the configured range.

Magnetic field

LSB, vector magnitude
Bars are scaled to the largest magnitude seen since connecting, so a small field still shows movement.

Registers

Register access is per 16-bit word and the register number goes on the wire as it is. Values are 16-bit; the NVRAM map starts around 0x10.

Device

Status
Disconnected
Status byte
Temperature
Sample
The board powers the part. Applies on the next connect.

Channels

0 of 6 magnetic measurements selected.

Protocol

NV_COMM_CRC decides this, and it cannot be read without talking to the part first. If every command comes back rejected, try the other setting.
The two sources disagree. If temperature reads as nonsense, or the whole reply looks shifted, try the other one.

Debug