ST sensor - LPS27HHTW pressure read out problem
I would like to read out the pressure reading from this sensor, but it keep returning '0' Status.
Tools: Nucleo-767ZI, STM32CUBEIDE, STEVAL-220VI (the sensor eval)
I connect Sensor
VDD to 3.3V,
CS pin to VDD_IO,
SDA, SCL pulled up by 4kOhm to 3.3V,
INT/DRDY pin left unconnected,
SAO address to GND.
Using Device Address = 5Ch (I did the 1 bit-shifting), I started to read 4 registers directly from Status Register 27h, together with measured pressure 28, 29, 2Ah, into an 8 bits array. Then, I compared the LSB of 27h for a '1'.
But I could never see once once of P_DA = 1.
Or do we need to repeat 4x of "HAL_I2C_Mem_Read_IT" in order to get the reading of that 4 registers (27-2Ah)?
=================================
Can anyone share a successful read of this sensor with hardware connection and code snippets to correct my mistakes?
by the way, I have another question about the 24bits Pressure data reads out (though I haven't read out successfully), I am using a 32bits to hold the value, I saw the STM32CUBEIDE said I shall print it using "Long Decimal", however, specifier such as %ld shown a typo error.
Does anyone know how to specify long integer or long decimal syntax correctly in this compiler?
