Skip to main content
Associate
August 6, 2026
Question

LPS22DF sensor freezes

  • August 6, 2026
  • 4 replies
  • 103 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

4 replies

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.
FduchunAuthor
Associate
August 17, 2026

Hello Rebecca,

I have FIFO control register at 0x00, CTRL1 = 0x01, and changed CTRL2 to 0x08 but still the sensor returns correct value once and the next readouts it stays at the same values for pressure and temperature until i reset power on the sensor, then it reads one more time. I currently read data registers sepatately like this  

xl = LPS22DF_Read_Reg(0x28); // PRESS_OUT_XL

  l = LPS22DF_Read_Reg(0x29); // PRESS_OUT_L

  h = LPS22DF_Read_Reg(0x2A); // PRESS_OUT_H

but tried burst read in the past as well. (use MikroC from mikroelektronika)

What else may make the sensor not updating data?

 

Thank you for your time

 

Federica Bossi
ST Technical Moderator
August 27, 2026

Hi ​@Fduchun ,

This freezing is not expected, can you give us the complete configuration you are using to check if some step is missing? 

Did you try enabling interrupt to check if the interrupt signal is sent? Have you check that power lines are stable? Have you replicated this issue with another sensor?

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.
FduchunAuthor
Associate
September 3, 2026

Hello  Frederica,

 

I tried many configurations suggested by AI and what you suggested above but nothing works. The sensor returns one correct value and freezes until power reset. I did not try the interrupt line as migrating from another sensor and limited with MCU ports. Power is stable and the sensor always replies to WhoAmI request. For now I just switched the project to analog sensor for the next production run but if you suggest working configuration settings, may return to LPS22DF in the future. I only need to periodically read the sensor and it is quite enough if it updates once per second or even at a slower rate, no FIFO needed.

No, I did not try another sensor as have only one evaluation board with it.

 

Thank you for your time