| Electronic Components Datasheet Search |
|
AN2381 Datasheet(PDF) 42 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2381 Datasheet(HTML) 42 Page - STMicroelectronics |
|
42 / 47 page ![]() Application information AN2381 42/47 At step 7, a dummy read at HP_FILTER_RESET register is performed to set the current/reference acceleration/tilt state against which the device performed the threshold comparison. This read may be performed any time it is required to set the orientation/tilt of the device as a reference state without waiting for the filter to settle. 6.6 Free-Fall detection This paragraph provides the basics for the use of the free-fall detection feature. In particular the SW routine that configures the device to detect free-fall events and to signal them is the following: 7 read HP_FILTER_RESET register // Dummy read to force the HP filter to // actual acceleration value // (i.e. set reference acceleration/tilt value) 8 write 6Ah into FF_WU_CFG // Configure desired wake-up event 9 poll RDY/INT pad; if RDY/INT=0 then goto 9 // Poll RDY/INT pin waiting for the // wake-up event 10 (Wake-up event has occurred; insert your code here) // Event handling 11 read FF_WU_SRC register // Return the event that has triggered the // interrupt 12 (Insert your code here) // Event handling 13 read FF_WU_ACK register // Clear interrupt request 14 goto 9 1 write D7h into CTRL_REG1 // Turn on the sensor and set DF=128 2 write 08h into CTRL_REG2 // Enables interrupt generation 3 write 08h into CTRL_REG3 // Set CTRL_REG3 to its default state 4 write 60h into FF_WU_THS_L register // Set the lower part of free-fall threshold 5 write 16h into FF_WU_THS_H register // Set the higher part of free-fall threshold 6 write 05h into FF_WU_DURATION register // Set minimum event duration 7 write D5h into FF_WU_CFG // Configure free-fall recognition and latch // interrupt request 8 poll RDY/INT pad; if RDY/INT=0 then goto 8 // Poll RDY/INT pin waiting for the free-fall // event 9 (Free-fall event has occurred; insert your code here) // Event handling 10 read FF_WU_ACK register // Clear interrupt request 11 goto 8 |
|
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 |
| 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 |