Skip to main content
Associate
October 15, 2024
Question

LSM303AGR using only temperature sensor

  • October 15, 2024
  • 1 reply
  • 672 views

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?

1 reply

Federica Bossi
Technical Moderator
October 23, 2024

Hi @jjay ,

Yes, this is sufficient. Does it work?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
jjayAuthor
Associate
October 25, 2024

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?