Skip to main content
Explorer II
October 20, 2023
Solved

LIS2HH12 working like 1.6kHz@ODR=800Hz

  • October 20, 2023
  • 1 reply
  • 1156 views

I am evaluating LIS2HH12. Before starting to collect data, I simply reboot it, set FIFO to stream mode (010), enable FIFO, and enable the sensor by setting ODR=800Hz (110). Then I collect 800 samples (each sample=6 bytes, 2 for each axis) by reading the output registers when FSS>0 and as many times as FSS and checking OVR also (which never happens) and maximum FSS I see is 4 or so (the sensor is connected to an RPi 4, SPI@1MHz). I expect 800 samples to be collected around 1 second, but 800 samples are collected in 0.5 seconds. Why would this happen ? I double checked the FSS values I have read and they sum up to 800 in 0.5 seconds as well.

    This topic has been closed for replies.
    Best answer by mete

    Probably it was. Not sure what happened but it is working now as expected. Maybe a system-wide issue, I rebooted since I posted the question. I was measuring the time with time.monotonic() and summing the FSS values until reaching 800. 

    1 reply

    Super User
    October 20, 2023

    Probably a bug of some sort. How are you determining 0.5 seconds? Can you show relevant code?

    meteAuthorAnswer
    Explorer II
    October 20, 2023

    Probably it was. Not sure what happened but it is working now as expected. Maybe a system-wide issue, I rebooted since I posted the question. I was measuring the time with time.monotonic() and summing the FSS values until reaching 800.