Freescale Semiconductor FRDM-FXS-MULTI 데이터 시트

다운로드
페이지 100
FXOS8700CQ
Sensors
Freescale Semiconductor, Inc.
79
10.16
Magnetometer threshold function
The magnetometer threshold function works in a similar manner to the freefall/motion detection module but uses magnetic data 
for the event detection instead of acceleration data. The m_ths_oae bit setting determines the logic used to evaluate the threshold 
detection function for the enabled axes. With m_ths_oae = 0, the magnetic sample data for each enabled axis must be below the 
threshold values specified in the MAG_THS_X/Y/Z registers for the time period specified in MAG_THS_COUNT before the event 
flag is triggered. For m_ths_oae = 1, any of the enabled axes must be above the threshold values specified in the MAG_THS_X/
Y/Z registers for the time period specified in MAG_THS_COUNT before the event flag is triggered.
10.16.1 M_THS_CFG (0x52) register
Magnetic-field threshold detection configuration register.
The unsigned 15-bit M_THS_X/Y/Z registers hold the threshold used for magnetic-event detection. With M_THS_CFG 
[m_ths_oae] = 0, the event is detected when all of the enabled axes are below or equal to their respective threshold values (AND 
condition). With M_THS_CFG [m_ths_oae] = 1, the event is detected when any of the enabled axes is above or equal to their 
respective threshold value (OR condition). The thresholds for each axis are applied after the magnetic data has been adjusted 
by the offset values stored in the M_OFF_X/Y/Z registers when M_CTRL_REG3[m_raw] = 0.
Table 181. M_THS_CFG register
m_ths_ele
m_ths_oae
m_ths_zefe
m_ths_yefe
m_ths_xefe
m_ths_wake_en
m_ths_int_en
m_ths_int_cfg
0
0
0
0
0
0
0
0
Table 182. M_THS_CFG bit descriptions
Field
Description
m_ths_ele
Magnetic-threshold event latch enable. 
0: Event flag latch disabled. Magnetic-threshold events are not latched, and the event flag will change state with the real-
time status of the event detection logic.
1: Event flag latch enabled. Magnetic-threshold events are latched and the event flag can only be cleared by reading the 
M_THS_SRC register.
m_ths_oae
Magnetic-threshold event logic selection. 
0: Logical “AND” of enabled axes X, Y, and Z below threshold flags is used to detect the event.
1: Logical “OR” of enabled axes X, Y, and Z above threshold flags is used to detect the event.
m_ths_zefe
Event-flag enable on Z-axis. 
0: Z-axis event detection disabled
1: Raise event flag on measured magnetic field value above/below preset threshold for Z-axis
m_ths_yefe
Event-flag enable on Y-axis. 
0: Y-axis event detection disabled 
1: Raise event flag on measured magnetic field value above/below preset threshold for Y-axis
m_ths_xefe
Event-flag enable on X-axis. 
0: X-axis event detection disabled 
1: Raise event flag on measured magnetic field value above/below preset threshold for X-axis
m_ths_wake_en
0: The system excludes the magnetic-threshold event flag when evaluating the Auto-Sleep/Wake function.
1: The system includes the magnetic-threshold event flag when evaluating the Auto-Sleep/Wake function.
m_ths_int_en
0: Magnetic-threshold interrupt is disabled.
1: Magnetic-threshold interrupt is enabled.
m_ths_int_cfg
0: Magnetic-threshold event flag is output on INT2 pin (logically OR'd with other INT2 interrupt events)
1: Magnetic-threshold event flag is output on INT1 pin (logically OR'd with other INT1 interrupt events)