Skip to main content
Visitor II
January 22, 2018
Question

LPS22HB is giving same value

  • January 22, 2018
  • 2 replies
  • 794 views
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
    This topic has been closed for replies.

    2 replies

    ST Employee
    January 24, 2018
    Posted on January 24, 2018 at 11:01

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

    Visitor II
    January 29, 2018
    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.