| 전자부품 데이터시트 검색엔진 |
|
AN2960 데이터시트(PDF) 35 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2960 데이터시트(HTML) 35 Page - STMicroelectronics |
|
35 / 41 page ![]() AN2960 Application information Doc ID 15557 Rev 1 35/41 The FF_WU_CFG(LIR) bit permits the determination of whether or not the interrupt request should be latched. If the LIR bit is ‘0’ (default value), the interrupt signal goes high when the interrupt condition is satisfied and comes back low immediately if the interrupt condition is no longer verified. Otherwise, if the LIR bit is ‘1’, whenever an interrupt condition is applied the interrupt signal remains high even if the condition returns to a non-interrupt status, until a reading to the FF_WU_SRC register is performed. The remaining bits of the FF_WU_CFG register allow the decision as to which axis the interrupt should be performed on and in which direction the threshold must be exceeded to generate the interrupt request. 9.5 Inertial wake-up 9.5.1 HP filter bypassed This paragraph provides a basic algorithm which shows the practical use of the inertial wake-up feature. In particular, with the code below, the device is configured to recognize when the absolute acceleration along either X or Y axis exceeds a preset threshold (180 mg is used in the example). The event which triggers the interrupt is latched inside the device using FF_WU interrupt source 1 and its occurrence is signalled through the use of the INT2 pin. 1 write C7h into CTRL_REG1 // Turn-on the sensor and set ODR=400Hz 2 write 00h into CTRL_REG2 // Default value: high-pass filter bypassed 3 write 08h into CTRL_REG3 // FF_WU1 interrupt sent to INT2 pin 4 write 0Ah into FF_WU_THS_1 reg // Set wake-up threshold = 180 mg 5 write 00h into FF_WU_DURATION_1 reg // No filtering/confirmation on the event 6 write 4Ah into FF_WU_CFG_1 // Configure desired wake-up event 7 poll INT2 pin; if INT2=0 then goto 7 // Poll INT2 pin waiting for the wake-up event 8 read FF_WU_SRC_1 reg // Return the event that has triggered the interrupt // Clear interrupt request 9 (Wake-up event has occurred; insert your code here) // Event handling 10 goto 7 |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |