2019-02-14 04:38 AM
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?
2019-02-14 06:47 AM
Have you checked the signals ?
Is /CS pulled low during transfer attempts ?
2019-02-14 06:56 AM
2019-02-14 07:11 AM
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.