cancel
Showing results for 
Search instead for 
Did you mean: 

LPS22HB Help

kmcgrath
Associate
Posted on March 25, 2016 at 14:51

I am working with the LPS22HB pressure sensor and I cannot get a response from it. I have ctrl_reg1 set as 01000000, ctrl reg 2 set as 00011000, and everything else as default. 

I am using a 1MHz SPI clock and a CS pin (low - active). 

I then write to the pressure_XL register and retrieve the first byte then consecutively retrieve the L and H bytes using the iterative data collecting (ctrl_reg2 enabled).

i am operating at 2.5V and am correctly sending the right bytes (measured the outputs of my microcontroller)

Why am I getting no response? 
3 REPLIES 3
licciardello.anto
Associate II
Posted on April 05, 2016 at 15:14

Hi,

the setting you are using seems to be correct.

I am able to read properly using the same setting therefore there must be something strange underneath.

I need further details in order to understand this behaviour.

Can you send me the SPI timing diagram with the WhoAMI_register (0x0F) reading and the reading for pressure data (0x28h, 0x29h and 0x2A)?

Regards

Antonella

the1engr
Associate II
Posted on May 11, 2016 at 21:38

I have seen similar issues here as well using I2C.

At this time, my two registers are set as:

Control Register 1: 0x20

Control Register 2: 0x00

I'm going for 10 Hz operation in this case, continuous (BDU) updates, and no low pass data configurations.

For control register 2, I'm using I2C then single byte reads from 0x28, 0x29, and 0x2A for the pressure and don't want the device to automatically increment the address and so that is disabled.  I also have the FIFO disabled.

It is my expectation that I should then be able to read the data directly out of 0x28, 0x29, and 0x2A and convert to pressure, at a rate of up to 10 Hz.

At this time, I'm only able to read [0x00, 0x00, 0x2D] from the device on those registers. That is clearly not correct. 

I am able to read and write all other registers on the device, including the WHO_AM_I register and that comes back correct, as well as the setting/reading of the configuration registers.

Any thoughts on what may be happening here?

licciardello.anto
Associate II
Posted on May 12, 2016 at 09:47

The reading of the pressure registers is sinchronized with the status register?

If you are not using the interrupt mode, before to read the output registers you have to check the P_DA bit (Pressure data available ) on status register (27h).

You have to poll this bit and when it is set  to 1 means that a new pressure data is generated and so you can read this value on output registers (0x28, 0x29 and 0x2A).

The same is for temperature outputs.

Regards

Antonella