Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4650 Datasheet(PDF) 48 Page - STMicroelectronics

Part # AN4650
Description  This document is intended to provide usage information
PDF  102 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4650 Datasheet(HTML) 48 Page - STMicroelectronics

Back Button AN4650 Datasheet HTML 44Page - STMicroelectronics AN4650 Datasheet HTML 45Page - STMicroelectronics AN4650 Datasheet HTML 46Page - STMicroelectronics AN4650 Datasheet HTML 47Page - STMicroelectronics AN4650 Datasheet HTML 48Page - STMicroelectronics AN4650 Datasheet HTML 49Page - STMicroelectronics AN4650 Datasheet HTML 50Page - STMicroelectronics AN4650 Datasheet HTML 51Page - STMicroelectronics AN4650 Datasheet HTML 52Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 48 / 102 page
background image
Interrupt generation
AN4650
48/102
DocID027415 Rev 1
4.5.5
Double-tap example
The example code which implements the SW routine for single-tap detection is given below.
In this example the TAP_THS field of the TAP_THS_6D register is set to 01100b, therefore
the tap threshold is 750 mg (= 12 * FS_XL / 25).
For interrupt generation, during the first and the second tap the slope data must return
below the threshold before the Shock window has expired. THe SHOCK field of the
INT_DUR2 register is set to 11b, therefore the Shock time is 57.7 ms (= 3 * 8 / ODR_XL).
For interrupt generation, after the first tap recognition there must not be any slope data
overthreshold during the Quiet time window. Furthermore, since the latch mode is disabled,
the interrupt is kept high for the duration of the Quiet window. The QUIET field of the
INT_DUR2 register is set to 11b, therefore the Quiet time is 28.8 ms (= 3 * 4/ ODR_XL).
For the maximum time between two consecutive detected taps, the DUR field of the
INT_DUR2 register is set to 0111b, therefore the Duration time is 538.5 ms (= 7 * 32 /
ODR_XL).
4.6
Activity/Inactivity recognition
The Activity/Inactivity recognition function allows reducing system power consumption and
developing new smart applications.
When the Activity/Inactivity recognition function is activated, the LSM6DS3 device is able to
automatically decrease the accelerometer sampling rate to 13 Hz, increasing the
accelerometer ODR and bandwidth as soon as the wake-up interrupt event has been
detected. This feature is applied to the accelerometer sensor only, regardless of the
selected gyroscope power mode and ODR.
With this feature the system may be efficiently switched from low-power consumption to full
performance and vice-versa depending on user-selectable acceleration events, thus
ensuring power saving and flexibility.
The Activity/Inactivity recognition function is enabled by setting to 1 the INACTIVITY bit of
the WAKE_UP_THS register.
The Activity/Inactivity recognition function uses the slope between two consecutive
acceleration samples to detect the Activity/Inactivity event; the slope data is computed using
the following formula:
slope(tn) = [ acc(tn) - acc(tn-1) ] / 2
1
Write 60h into CTRL1_XL
// Turn on the accelerometer
// ODR_XL = 416 Hz, FS_XL = 2g
2
Write 0Eh into TAP_CFG
// Enable tap detection on X, Y, Z axis
3
Write 0Ch into TAP_THS_6D
// Set tap threshold
4
Write 7Fh into INT_DUR2
// Set Duration, Quiet and Shock time windows
5
Write 80h into WAKE_UP_THS
// Single & Double tap enabled (SINGLE_DOUBLE_TAP = 1)
6
Write 08h into MD1_CFG
// Double tap interrupt driven to INT1 pin



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com