I'm working with a MEMSIC MMC5983MA magnetometer, using SPI. I can read the WHOAMI and status registers fine, and the Y and Z axes seem to be giving reasonable (near mid-range) results. But for some reason, after one reasonable reading after a reset, the X axis does not update for me. It outputs a reasonable value once, and then every read after that outputs exactly the same value, even though the Y and Z axes that I'm reading in the same multi-byte read are updating as expected.
One other issue is that the data ready interrupt pin is always low for me, despite commanding the INT_meas_done_en bit high in control register 0. Some other context:
- I perform a software reset during my initialization and wait 15 msec.
- I'm using the single-shot mode where I command a magnetic measurement 10 msec before each read.
- I'm using the default 8 msec sample time and it does update the status register at the expected time.
- The status register shows an available magnetic measurement before every read, both the single time it works and all the subsequent times with no update to the x axis.
- I do a set, reset, and set in my initialization before trying to read from the part
- I tried replacing the part, and the 2nd part acts the same.
Is anyone else getting the MMC5983 to work on all 3 axes?