2024-10-15 03:23 AM
Hello,
I'd like to use LSM303AGR temperature sensor and only that, what is the minimal configuration to be able to do that? As I browsed the forum I saw that setting TEMP_EN[1:0] bits to 1 in the TEMP_CFG_REG_A and BDU bit in CTRL_REG4_A is not enough, you also have to set XL ODR in CTRL_REG1_A. Is there anything else needed?
2024-10-23 06:27 AM
Hi @jjay ,
Yes, this is sufficient. Does it work?
2024-10-25 01:19 AM
Hello @Federica Bossi
yes, this does work but seems like the problem lies elsewhere. I am communicating with LSM303AGR using 3 wire SPI. I enable 3 wire mode in CTRL_REG4_A, so the configuration should be fine. It seems that sensor is very unstable in that mode. It can even get stuck returning constant temperature values and only soft reset using TEMP_CFG_REG_A helps to recover, until it happens again. I tested different SPI frequencies and the most stable behaviour is with 10MHz but still some issues occur. In the datasheet there's a note about SPI timings: "Values are guaranteed at 10 MHz clock frequency for SPI with 3 wires, based on characterization results, not tested in production." How to understand that?