Skip to main content
Visitor II
August 6, 2026
Question

LPS22DF sensor freezes

  • August 6, 2026
  • 1 reply
  • 31 views

Did anyone have issue with freezing LPS22DFsensor?

Have it connected using 4 wire SPI at 3.3 and 3.3  Volts. It successfully starts and reads temperature and air pressure once and than stays at the same value with no updates until I reset power on it. I can still read the Who_Am_I register which returns the correct valie (zeroed every time after it is read, so no doubt it reads every time) but the Air pressure and Temperature registers not updating. I use NoFIFO setting and sensor updating once per second. What I may be doing wrong?

I do not use burst mode for reading and read individual bytes separately (not sure why but burst reading does not work for me)

Using MikroC compiler.and PIC18F25K83 MCU

1 reply

Federica Bossi
ST Technical Moderator
August 13, 2026

Hi ​@Fduchun ,

You configured the register 0x10 with your desired ODR (1Hz) right? Can you give us the complete register configuration that you are using?

You could also use the interrupt pin to check if the data is updating by enabling pulsed data ready (register 0x13).

You can check out this example on how to read data from LPS22DF in polling mode (STMems_Standard_C_drivers/lps22df_STdC/examples/lps22df_read_data_polling.c at master · STMicroelec…) or with the data ready signal (STMems_Standard_C_drivers/lps22df_STdC/examples/lps22df_read_data_drdy.c at master · STMicroelectro…).

Let us know if after replicating the configuration used in those examples the problem is solved. 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.