cancel
Showing results for 
Search instead for 
Did you mean: 

LPS22HB is giving same value

Jumshed Akhtar
Associate II
Posted on January 22, 2018 at 09:27

Hi I am using  LPS22HB with my custom made board based on STM32F777. I am reading 

LPS22HB using the same driver as ST is giving. I always read the same value of pressure i.e 1847. Temperature value is also incorrect as it is very small.  here is code snippet from the LPS22HB_Init()

/* Make LPS22HB Reset and Reboot */

if(LPS22HB_SwResetAndMemoryBoot())

return LPS22HB_ERROR;

pLPS22HBInit.PowerMode=LPS22HB_LowNoise;

pLPS22HBInit.OutputDataRate=LPS22HB_ODR_25HZ;

pLPS22HBInit.LowPassFilter=LPS22HB_DISABLE;

pLPS22HBInit.LPF_Cutoff=LPS22HB_ODR_9;

pLPS22HBInit.BDU=LPS22HB_BDU_NO_UPDATE;

pLPS22HBInit.IfAddInc=LPS22HB_ENABLE; //default

pLPS22HBInit.Sim= LPS22HB_SPI_4_WIRE;

I have also tried by  disabling IfAddInc and reading one by one register.

Could you please help me, what  am I missing.

Best Regards,

#lps22hb
2 REPLIES 2
Miroslav BATEK
ST Employee
Posted on January 24, 2018 at 11:01

Can you please give me more details exactly which driver for LPS22HB are you using?

Jumshed Akhtar
Associate II
Posted on January 29, 2018 at 13:36

By re-reading 

Table 11. SAD+Read/Write patterns and initializing all parameters at once , I solved the problem. Thanks.