Skip to main content
Visitor II
December 6, 2013
Question

Urgent:Data Ready Interrupt

  • December 6, 2013
  • 3 replies
  • 1139 views
Posted on December 06, 2013 at 12:00

Hi,

I don't know, the interrupts work.

I have the testcase attached.

Here is the logged sequence:

BEGIN:

STAT_REG = 0

..

STAT_REG = 0xF // here should come the Int, shouldn't it?

..

STAT_REG = 0xFF // Overflow, new_lis will be set

LIS331DLH_ResetInt1Latch()

LIS331DLH_GetAccAxesRaw(&axesraw);

 -> here comes the Interrupt new_lis will be set

LIS331DLH_GetAccAxesRaw(&axesraw);

GOTO BEGIN

Why do I have to poll STATUS_REG. No interrupts occur without polling!?

When exactly comes the interrupt, and when will it reset(?!).

Regards,

Steffen

#h3lis331dl #interrupts
    This topic has been closed for replies.

    3 replies

    Visitor II
    December 11, 2013
    Posted on December 11, 2013 at 17:32

    Hello Steffen,

    In order to better understand your setup for interrupts on the accelerometer, could you please share your registers configuration? In special 30h to 33h.

    Thank you very much,

    Thiago Reis

    steffenAuthor
    Visitor II
    December 12, 2013
    Posted on December 12, 2013 at 10:36

    Hi,

    therefore, I've attached the file

    https://my.st.com/public/STe2ecommunities/mems_sensors/Lists/Accelerometers/Attachments/101/lis33_test.c

    The registers 32-33 I don't set.

    INT1_CFG , I set to 0x3F

    INT1_SRC should be read only?!!!

    regards,

    Steffen

    Visitor II
    January 10, 2014
    Posted on January 10, 2014 at 12:58

    Hello Steffen,

    I believe you have to setup reg 31h, INT1_SRC, in that way you will define the source of your interrupt.

    Then on 32h and 33h you will be able to setup both the interrupt threshold value and the duration that, when the measured value is above the threshold will activate the INT.

    Please let me know if this details aid your question!

    Thank you,

    Thiago Reis