IIS2MDC read X,Y,Z, temperature via I2C - separately or together ?
I have the IIS2MDC along with LSM6DSL accel / gyro on a board with stm32L451 uC.
Accel / gyro work fine. uC reads status byte then if any axis has new data ready it reads all from temp to accel (0x20-0x2d) in 1 ST hal fn call multi byte read: HAL_I2C_Mem_Read().
IIS2MDC seems to read X-Z fine using same fn that is read X Low to Temp high ( 0x68-0x6F) but the value for 6E-6F is a duplicate of X values (regs 0x68-0x69)
I can read 6 bytes Y to temp and still get the X value for the temp.
If I read X-Z in 1 fn call then temperature in another call, temp reads ok.
I have read each register 0x45 - 0x6f one by one and compared to a read from 0x45-0x6f in 1 bulk read sequence. All matches except temperature or status (if no time for recalc).
temp read alone: 0x6e - 0x1b, 0x6f = 0x00 - these make sense.
temp read as part of axis or previous reads: 0x6e = 7d 0x6f = 0xff.
This is on a board about 75 deg F so 0x001b is about correct.
The IIS2MDC traffic has been verified with a logic analyzer on the I2C bus so it seems to be coming from chip this way NOT mishandling by uC / uC libs.
I don't see anything in data sheet indicating this behaviour. I saw something indicating address increment is unlimited.
cfgs: 0x60 (A) = 0x84, B = 0x12, C = 0x10 ( BDU set BLE is off. ).
offsets set to 0.
no irq's, thing fancy, just update compass outputs at 20 Hz I think it is. It is then polled for status and has values read.
Any ideas??
