LIS2MDL magnetometer with steval_mki181v1
Hello everyone,
I'm working with the LIS2MDL sensor (steval_mki181v1) , i made a connection between it and the nrf5340 and I configured it over I2C with pull-up resistors enabled.
-VDD -- > VDD
-VDDio --> VDD
-CS --> VDD
-PIN I2C :: SCL to SCL et SDA to SDA
-GND t GND
Current configuration:
I2C communication working (i got the chip id 0x40)
Block Data Update (BDU) enabled
Output Data Rate tested at 10 Hz or50 Hz
Offset cancellation enabled
Continuous mode enabled
- I applied the offset XYZ as ::
int16_t mag_offset[3] = {
0xF500, /* OFFSET_X_REG */
0xF800, /* OFFSET_Y_REG */
0xF400, /* OFFSET_Z_REG */
};
However, I noticed that the values I read from the sensor remain almost always the same and do not update as expected, as shown in the photo below.
Could anyone help me understand what might be causing this issue or guide me on how to troubleshoot it?
Any help would be greatly appreciated. Thank you!


