Skip to main content
PForn.15
Associate
February 14, 2019
Question

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

  • February 14, 2019
  • 3 replies
  • 1070 views

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?

This topic has been closed for replies.

3 replies

AvaTar
Senior III
February 14, 2019

Have you checked the signals ?

Is /CS pulled low during transfer attempts ?

PForn.15
PForn.15Author
Associate
February 14, 2019

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

0690X000006DbufQAC.png

AvaTar
Senior III
February 14, 2019

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.