cancel
Showing results for 
Search instead for 
Did you mean: 

Lis3dsh on STM32F407 Discovery (HELP ME)

tranvokhoinguyen
Associate
Posted on December 29, 2015 at 08:07

Hi all,

i want to read Acc value of LIS3DSH on KIT STM32F407 Discovery. I read sensor datasheet. I write data to registor. But i can't get anything from sensor.

How to communication LIS3DSH? set REG3, REG4, REG5, REG6 ? 

And any code example. (i use HAL library)

Anybody help me. Thank all

#accelerometer #lis3dsh
1 REPLY 1
estie
Associate II
Posted on December 29, 2015 at 08:49

The accelerometer is a SPI device, not memory mapped I/O where you just read a register. You need to learn about how to use the SPI interface on the STM32F and send two byte requests to the lis3dsh to get each register value.

The board is supplied with a demo already loaded that interfaces with the device. You need to go and look at the source code of the demo.