Skip to main content
girish ghadage
Associate
July 5, 2019
Question

What configuration is required for disabling Tap Function of LSM6DSM accelerometer + gyroscope sensor?

  • July 5, 2019
  • 2 replies
  • 866 views

..

    This topic has been closed for replies.

    2 replies

    Eleon BORLINI
    ST Employee
    July 5, 2019

    Hi @girish ghadage​ , according to AN4987 (p. 44) in order to enable the single-tap and double-tap recognition functions it is necessary to set the INTERRUPTS_ENABLE bit in TAP_CFG register to 1. So, to disable the same function the same bit must be set to 0. (Btw, consider it is disabled by default). Did I correctly understood your question? Regards

    girish ghadage
    Associate
    July 5, 2019

    Thank you for your help,

    Yes you did understood the question correctly.

    Issue is i have tried doing it both ways by setting the TAP_CFG bit to 0 and by leaving it to default. But when i test it, i am able to start and stop the sensor readings by tap on sensor.

    I'am sharing the configuration settings i have uploaded,

    sendCommand(0x10,0x3C,50); //Linear Acceleration Control

    sendCommand(0x11,0x00,50); //Angular Rate Control Register

    sendCommand(0x12,0x0C,50); //Control Reg

    sendCommand(0x13,0x02,50); //Control Reg

    sendCommand(0x14,0x20,50); //Control Reg

    sendCommand(0x15,0x60,50); //Control Reg

    sendCommand(0x58,0x00,50); //TAP_Cfg

    also i have only need the accelerometer reading so i have disabled the angular data rate.