cancel
Showing results for 
Search instead for 
Did you mean: 

LPS22HB - One shot mode problem

bvn123
Associate II
Posted on July 16, 2016 at 21:04

Hi,

I try to get the pressure data in One shot mode.

I read the state of

Reg Who am I (0Fh)=B1h

Ctrl_Reg1 (10h)=00h,

Ctrl_Reg2 (11h) =10h,

then I write to Ctrl_Reg2< 11h, to provide One Shot Mode,

Now continuous reading of this Ctrl_Reg2(11h) = 11h (no reset bit OneShot after conversion)

Reading of Status (27h) =00h

Pressure Data (Regs 2Ah:29h:28h) = 2F6666h

I may only write default value to Ctrl_Reg2 < 10h

Now reading of Ctrl_Reg2=10h, but no changes in Status and Pressure data.

 

The document

'AN4672

Application note

LPS22HB/LPS25HB digital pressure sensors: hardware guidelines for system integration',

pages 19,20, proposes special procedure for one shot mode, using some CTE bit in Config Reg (43h), but this register is not described in LPS22HB datasheet and it is not clear, what is the number of CTE bit. The result of reading this Reg 43h = 20h

#lps22hb
3 REPLIES 3
licciardello.anto
Associate II
Posted on July 18, 2016 at 10:35

Hi,

I have not clear if you have applied the procedure for one shot mode, set CTE bit in Config Reg (43h), described in application Note AN4672.

If not, please try to do the following steps:

1-Write 0x20h in reg 43h 

2- Write CTRL_REG2 (set one shot bit to start a new conversion)

3- Polling the status bit in the STATUS_REG (27h) and when tha data is ready, read the pressure output registers.

4- Optionally, read the CTRL_REG2  in order to check that the one shot bit has been reset (it is self clear).

Regards

Antonella

 

bvn123
Associate II
Posted on July 18, 2016 at 11:41

Hi, Antonella,

thank You for answer.

on PowerOn

reg43h=20h

reg10h=0

reg11h=10h

reg27h=02h  (temperature data ready)

if I read the temperature:

  reg2Bh : 2Ch = 0000h,

  and now reg27h=0

I try to

write reg43h=20h

write reg11h=11h

then polling reg27h - it equals 0

read reg11h=11h

I also try to

write reg43h=0

write reg43h=20h

write reg11h=11h

then polling reg27h - it equals 0

polling reg11h - it equals 11h

All this I send and read with intervals in a few seconds, using monitor application, where I manually write the regs' nums and their states.

May be, CTE bit in reg43h is not the 5th one (bbCTEb bbbb) ?

AN4672 doesn't concider the position of this bit in reg43h, and I can't find the reg43h bits' description. The state reg43h=20h I get only by reading reg43h.

And in Datasheet this reg isn't mentioned.

Best regards,

Vadim

P.S.

I tried to write to reg43h < 1,2,4,8,10h,20h,40h,80h, then write to reg11h<11h. No changes in reaction.

Also I wrote to shift regs RPDS_L : RPDS _H then read reg28:29:2A - their states are shifted for entered to RPDS value.

So, LPS22HB reacts for SPI transactions, but doesn't accomplish measurement.

le
Associate II
Posted on July 26, 2016 at 12:45

Hi Vadim,

just like you, I don't understand the bit CTE because it 

is not described in LPS22HB datasheet. Do you understand now? Have you solved your problem?

I have used one shot mode, and I didn't need to set CTE bit but it worked!!