2024-12-01 12:18 PM
Hello, I try to use a LSM303AGR sensor via I2C bus, the magnetometer part seems to work, I can write registers of the sensor and read them back, but the same approach for the accelerometer doesn't work.
I use 0x19 as I2C address of the accelerometer and 0x1E as I2C address of the magnetometer.
This is what reading the WHO_AM_I_A register looks like in a logic analyzer (No ACK received from the sensor, so reading was interrupted):
And this is what reading the WHO_AM_I_M register looks like (everything seems to be Ok):
It's almost impossible to get ACK from the accelerometer (sometimes it comes, but only for a few operations).
What I am doing wrong? I assume the I2C of the MCU itself is working correctly, otherwise I wouldn't get a response from the magnetometer. From the electronics side everything should be fine, since the same two I2C pins are used.
2024-12-01 01:50 PM
Could you please move this topic to "MEMS and sensors"?
I can't find a way to remove it here and start it there.