Skip to main content
alessio31183
Associate II
August 29, 2017
Question

[ATT]9358

  • August 29, 2017
  • 2 replies
  • 969 views
Posted on August 29, 2017 at 18:35

Dear all,

I'm writing .cpp driver for Arduino for the LIS3DHH but something seems wrong.

No replies from the accelerometer.

Do you have any suggestion on the SPI correct communication task reading my files?

0690X000006080OQAQ.png
This topic has been closed for replies.

2 replies

ST Employee
August 30, 2017
Posted on August 30, 2017 at 11:16

I didn't have chance to try your code yet. But at first glance, can you please try SPI mode 3?

alessio31183
Associate II
August 30, 2017
Posted on August 30, 2017 at 11:29

Hi Miroslav,

I've found the issue. It was a bad SPI writeRegister procedure.

Attached the files updated.

Now I'm struggling withe the interrupt 1 settings, but this is another

issue.

Thanks

Alessio

________________

Attachments :

LIS3DHH.cpp.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyRS&d=%2Fa%2F0X0000000b8B%2FlIWi6xYE216a.HD7s74uNFjzUVBojEOMALzNfNN22qY&asPdf=false

LIS3DHH.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyI6&d=%2Fa%2F0X0000000b89%2F8A9hJQ..Byl.qHClsAqj2PgmNAtmHEB.8j2qPDRMJiM&asPdf=false
alessio31183
Associate II
August 30, 2017
Posted on August 30, 2017 at 20:56

If I change the DRDY_PULSE = 1, I get the interrupt each value uploaded in the FIFO register.

Instead the I get an interrupt every 910 us => 1.1KHz  the accelerometer ODR.

Anyway I'm not able to get the right FIFO interrupt.