How Do I read an LIS3MDL X/Y/Z registers in single conversion mode?
I am attempting to use single conversion mode to read x/y/z data.
My configuration is:
- CTRL_REG1: set data rate to 5Hz/ x/y Axis ultra high perf mode
- CTRL_REG2: set full scale to 16 gauss
- CTRL_REG3: Single-conversion mode
- CTRL_REG4: Z-Axis mode - Ultra-high-performance mode
- CTRL_REG5: BDU set to 1
Once config registers are written as described above I use a loop:
{
read status register until it returns ZYXDA (0x08).
read x/y/z registers
// device automatically returns to IDLE mode.
Write 0x00 to CTRL_REG3 to set single conversion mode again
}
Once x/y/z registers are read the 1st time ZYXDA status bit never gets set to 1 again.
Does this logic look correct?
