cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any sequence that should be done before reading the registers value on LIS3DHH accelerometer?

PForn.15
Associate

Hello,

I try run accelerometer LIS3DHH on Nucleo F411RE. I want check register WHO_AM_I value. I set address on 0x8F (0x0F address register and 0x10 value as set accelerometer to read data from register.) I always receive value 0x00 from register. I run example from STMicroelectronics driver from github service.

Is there any sequence that should be done before reading the registers?

3 REPLIES 3
AvaTar
Lead

Have you checked the signals ?

Is /CS pulled low during transfer attempts ?

PForn.15
Associate

Yes. I checked the signals. CS signal is OK. I attach a picture from the signal analyzer.

0690X000006DbufQAC.png

AvaTar
Lead

Is the SPI interface setup correctly (clock polarity, edge) ?

The datasheet says:

These lines are driven at the falling edge of SPC and should be captured at the rising edge of SPC.

The datasheet (sect. 4.2) shows a 16-bit transfer. And says:

Both the read register and write register commands are completed in 16 clock pulses or in multiples of 8 in case of multiple read/write bytes.