Skip to main content
Visitor II
December 29, 2015
Question

Lis3dsh on STM32F407 Discovery (HELP ME)

  • December 29, 2015
  • 1 reply
  • 765 views
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
    This topic has been closed for replies.

    1 reply

    Visitor II
    December 29, 2015
    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.