2018-01-22 12:27 AM
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,
#lps22hb2018-01-24 02:01 AM
Can you please give me more details exactly which driver for LPS22HB are you using?
2018-01-29 04:36 AM
By re-reading
Table 11. SAD+Read/Write patterns and initializing all parameters at once , I solved the problem. Thanks.