| FRDM-KW40Z Demo Software Reference Manual Rev 0.0 NXP Semiconductors |

Data Structures | Macros | Enumerations
FXOS8700CQ Registers
Accelerometer » FXOS8700CQ

## Overview

This module defines all the registers present in the FXOS8700CQ sensor.

See the FXOS8700CQ datasheet for more information.

## Data Structures
union | FXOS8700CQ_CTRL_REG1_map_t
struct | FXOS8700CQ_CTRL_REG1_map_t.ctrl_reg1_map
union | FXOS8700CQ_CTRL_REG2_map_t
struct | FXOS8700CQ_CTRL_REG2_map_t.ctrl_reg2_map
union | FXOS8700CQ_XYZ_DATA_CFG_map_t
struct | FXOS8700CQ_XYZ_DATA_CFG_map_t.xyz_data_cfg_map
union | FXOS8700CQ_M_CTRL_REG1_map_t
struct | FXOS8700CQ_M_CTRL_REG1_map_t.m_ctrl_reg1_map
union | FXOS8700CQ_M_CTRL_REG2_map_t
struct | FXOS8700CQ_M_CTRL_REG2_map_t.m_ctrl_reg2_map
union | FXOS8700CQ_M_CTRL_REG3_map_t
struct | FXOS8700CQ_M_CTRL_REG3_map_t.m_ctrl_reg3_map

## Macros
#define | FXOS8700CQ_STATUS
#define | FXOS8700CQ_OUT_X_MSB
#define | FXOS8700CQ_OUT_X_LSB
#define | FXOS8700CQ_OUT_Y_MSB
#define | FXOS8700CQ_OUT_Y_LSB
#define | FXOS8700CQ_OUT_Z_MSB
#define | FXOS8700CQ_OUT_Z_LSB
#define | FXOS8700CQ_F_SETUP
#define | FXOS8700CQ_TRIG_CFG
#define | FXOS8700CQ_SYSMOD
#define | FXOS8700CQ_INT_SOURCE
#define | FXOS8700CQ_WHO_AM_I
#define | FXOS8700CQ_XYZ_DATA_CFG
#define | FXOS8700CQ_HP_FILTER_CUTOFF
#define | FXOS8700CQ_PL_STATUS
#define | FXOS8700CQ_PL_CFG
#define | FXOS8700CQ_PL_COUNT
#define | FXOS8700CQ_PL_BF_ZCOMP
#define | FXOS8700CQ_PL_THS_REG
#define | FXOS8700CQ_A_FFMT_CFG
#define | FXOS8700CQ_A_FFMT_SRC
#define | FXOS8700CQ_A_FFMT_THS
#define | FXOS8700CQ_A_FFMT_COUNT
#define | FXOS8700CQ_TRANSIENT_CFG
#define | FXOS8700CQ_TRANSIENT_SRC
#define | FXOS8700CQ_TRANSIENT_THS
#define | FXOS8700CQ_TRANSIENT_COUNT
#define | FXOS8700CQ_PULSE_CFG
#define | FXOS8700CQ_PULSE_SRC
#define | FXOS8700CQ_PULSE_THSX
#define | FXOS8700CQ_PULSE_THSY
#define | FXOS8700CQ_PULSE_THSZ
#define | FXOS8700CQ_PULSE_TMLT
#define | FXOS8700CQ_PULSE_LTCY
#define | FXOS8700CQ_PULSE_WIND
#define | FXOS8700CQ_ASLP_COUNT
#define | FXOS8700CQ_CTRL_REG1
#define | FXOS8700CQ_CTRL_REG2
#define | FXOS8700CQ_CTRL_REG3
#define | FXOS8700CQ_CTRL_REG4
#define | FXOS8700CQ_CTRL_REG5
#define | FXOS8700CQ_OFF_X
#define | FXOS8700CQ_OFF_Y
#define | FXOS8700CQ_OFF_Z
#define | FXOS8700CQ_M_DR_STATUS
#define | FXOS8700CQ_M_OUT_X_MSB
#define | FXOS8700CQ_M_OUT_X_LSB
#define | FXOS8700CQ_M_OUT_Y_MSB
#define | FXOS8700CQ_M_OUT_Y_LSB
#define | FXOS8700CQ_M_OUT_Z_MSB
#define | FXOS8700CQ_M_OUT_Z_LSB
#define | FXOS8700CQ_CMP_X_MSB
#define | FXOS8700CQ_CMP_X_LSB
#define | FXOS8700CQ_CMP_Y_MSB
#define | FXOS8700CQ_CMP_Y_LSB
#define | FXOS8700CQ_CMP_Z_MSB
#define | FXOS8700CQ_CMP_Z_LSB
#define | FXOS8700CQ_M_OFF_X_MSB
#define | FXOS8700CQ_M_OFF_X_LSB
#define | FXOS8700CQ_M_OFF_Y_MSB
#define | FXOS8700CQ_M_OFF_Y_LSB
#define | FXOS8700CQ_M_OFF_Z_MSB
#define | FXOS8700CQ_M_OFF_Z_LSB
#define | FXOS8700CQ_MAX_X_MSB
#define | FXOS8700CQ_MAX_X_LSB
#define | FXOS8700CQ_MAX_Y_MSB
#define | FXOS8700CQ_MAX_Y_LSB
#define | FXOS8700CQ_MAX_Z_MSB
#define | FXOS8700CQ_MAX_Z_LSB
#define | FXOS8700CQ_MIN_X_MSB
#define | FXOS8700CQ_MIN_X_LSB
#define | FXOS8700CQ_MIN_Y_MSB
#define | FXOS8700CQ_MIN_Y_LSB
#define | FXOS8700CQ_MIN_Z_MSB
#define | FXOS8700CQ_MIN_Z_LSB
#define | FXOS8700CQ_TEMP
#define | FXOS8700CQ_M_THS_CFG
#define | FXOS8700CQ_M_THS_SRC
#define | FXOS8700CQ_M_THS_X_MSB
#define | FXOS8700CQ_M_THS_X_LSB
#define | FXOS8700CQ_M_THS_Y_MSB
#define | FXOS8700CQ_M_THS_Y_LSB
#define | FXOS8700CQ_M_THS_Z_MSB
#define | FXOS8700CQ_M_THS_Z_LSB
#define | FXOS8700CQ_M_THS_COUNT
#define | FXOS8700CQ_M_CTRL_REG1
#define | FXOS8700CQ_M_CTRL_REG2
#define | FXOS8700CQ_M_CTRL_REG3
#define | FXOS8700CQ_M_INT_SRC
#define | FXOS8700CQ_A_VECM_CFG
#define | FXOS8700CQ_A_VECM_THS_MSB
#define | FXOS8700CQ_A_VECM_THS_LSB
#define | FXOS8700CQ_A_VECM_CNT
#define | FXOS8700CQ_A_VECM_INITX_MSB
#define | FXOS8700CQ_A_VECM_INITX_LSB
#define | FXOS8700CQ_A_VECM_INITY_MSB
#define | FXOS8700CQ_A_VECM_INITY_LSB
#define | FXOS8700CQ_A_VECM_INITZ_MSB
#define | FXOS8700CQ_A_VECM_INITZ_LSB
#define | FXOS8700CQ_M_VECM_CFG
#define | FXOS8700CQ_M_THS_MSB
#define | FXOS8700CQ_M_THS_LSB
#define | FXOS8700CQ_M_VECM_CNT
#define | FXOS8700CQ_M_VECM_INITX_MSB
#define | FXOS8700CQ_M_VECM_INITX_LSB
#define | FXOS8700CQ_M_VECM_INITY_MSB
#define | FXOS8700CQ_M_VECM_INITY_LSB
#define | FXOS8700CQ_M_VECM_INITZ_MSB
#define | FXOS8700CQ_M_VECM_INITZ_LSB
#define | FXOS8700CQ_A_FFMT_THS_X_MSB
#define | FXOS8700CQ_A_FFMT_THS_X_LSB
#define | FXOS8700CQ_A_FFMT_THS_Y_MSB
#define | FXOS8700CQ_A_FFMT_THS_Y_LSB
#define | FXOS8700CQ_A_FFMT_THS_Z_MSB
#define | FXOS8700CQ_A_FFMT_THS_Z_LSB

## Enumerations
enum | FXOS8700CQ_data_rate_hz_t { kDataRate0, kDataRate1, kDataRate2, kDataRate3, kDataRate4, kDataRate5, kDataRate6, kDataRate7 }
enum | FXOS8700CQ_sensor_enable_t { kAccelerometerOnly, kMagnetometerOnly, kHybridMode }
enum | FXOS8700CQ_interrupt_sources_t { kInterruptSleep, kInterruptFIFO, kInterruptTransient, kInterruptOrientation, kInterruptPulse, kInterruptFFMT, kInterruptVECM, kInterruptDataReady, kInterruptDisabled }
enum | FXOS8700CQ_interrupt_pin_map_t { kInterruptSleepPinIsInt1, kInterruptFIFOPinIsInt1, kInterruptTransientPinIsInt1, kInterruptOrientationPinIsInt1, kInterruptPulsePinIsInt1, kInterruptFFMTPinIsInt1, kInterruptVECMPinIsInt1, kInterruptDataReadyPinIsInt1, kInterruptAllPinsAreInt2 }
enum | FXOS8700CQ_sensitivity_t { kSensitivity2g, kSensitivity4g, kSensitivity8g }
enum | FXOS8700CQ_oversampling_mods_t { kNormal, kLowNoiseLowPower, kHighResolution, kLowPower }
enum | FXOS8700CQ_magnetometer_osr_t { kMagnetometerOSR0, kMagnetometerOSR1, kMagnetometerOSR2, kMagnetometerOSR3, kMagnetometerOSR4, kMagnetometerOSR5, kMagnetometerOSR6, kMagnetometerOSR7 }
enum | FXOS8700CQ_magnetic_sensor_reset_t { kMagneticAutoReset1, kMagneticAutoReset16, kMagneticAutoReset512, kMagneticAutoResetDisabled }

## Data Structure Documentation

union FXOS8700CQ_CTRL_REG1_map_t

Data Fields
unsigned char | ctrl_reg1 |
struct FXOS8700CQ_CTRL_REG1_map_t | ctrl_reg1_map |

struct FXOS8700CQ_CTRL_REG1_map_t.ctrl_reg1_map

Data Fields
unsigned char | active: 1 |
unsigned char | f_read: 1 |
unsigned char | lnoise: 1 |
unsigned char | dr: 3 |
unsigned char | aslp_rate: 2 |

union FXOS8700CQ_CTRL_REG2_map_t

Data Fields
unsigned char | ctrl_reg2 |
struct FXOS8700CQ_CTRL_REG2_map_t | ctrl_reg2_map |

struct FXOS8700CQ_CTRL_REG2_map_t.ctrl_reg2_map

Data Fields
unsigned char | mods: 2 |
unsigned char | slpe: 1 |
unsigned char | smods: 2 |
unsigned char | reserved: 1 |
unsigned char | rst: 1 |
unsigned char | st: 1 |

union FXOS8700CQ_XYZ_DATA_CFG_map_t

Data Fields
unsigned char | xyz_data_cfg |
struct FXOS8700CQ_XYZ_DATA_CFG_map_t | xyz_data_cfg_map |

struct FXOS8700CQ_XYZ_DATA_CFG_map_t.xyz_data_cfg_map

Data Fields
unsigned char | fs: 2 |
unsigned char | reserved0: 2 |
unsigned char | hpf_out: 1 |
unsigned char | reserved1: 3 |

union FXOS8700CQ_M_CTRL_REG1_map_t

Data Fields
unsigned char | m_ctrl_reg1 |
struct FXOS8700CQ_M_CTRL_REG1_map_t | m_ctrl_reg1_map |

struct FXOS8700CQ_M_CTRL_REG1_map_t.m_ctrl_reg1_map

Data Fields
unsigned char | m_hms: 2 |
unsigned char | m_os: 3 |
unsigned char | m_ost: 1 |
unsigned char | m_rst: 1 |
unsigned char | m_acal: 1 |

union FXOS8700CQ_M_CTRL_REG2_map_t

Data Fields
unsigned char | m_ctrl_reg2 |
struct FXOS8700CQ_M_CTRL_REG2_map_t | m_ctrl_reg2_map |

struct FXOS8700CQ_M_CTRL_REG2_map_t.m_ctrl_reg2_map

Data Fields
unsigned char | m_rst_cnt: 2 |
unsigned char | m_maxmin_rst: 1 |
unsigned char | m_maxmin_dis_ths: 1 |
unsigned char | m_maxmin_dis: 1 |
unsigned char | hyb_autoinc_mode: 1 |
unsigned char | reserved: 2 |

union FXOS8700CQ_M_CTRL_REG3_map_t

Data Fields
unsigned char | m_ctrl_reg3 |
struct FXOS8700CQ_M_CTRL_REG3_map_t | m_ctrl_reg3_map |

struct FXOS8700CQ_M_CTRL_REG3_map_t.m_ctrl_reg3_map

Data Fields
unsigned char | reserved: 3 |
unsigned char | m_ths_xys_update: 1 |
unsigned char | m_aslp_os: 3 |
unsigned char | m_raw: 1 |

## Enumeration Type Documentation

enum FXOS8700CQ_data_rate_hz_t

Defines output data rate.

- Single mode: Accelerometer or Magnetometer only
- Hybrid mode: Accelerometer and Magnetometer

enum FXOS8700CQ_sensor_enable_t

Defines enabled sensors.

Enumerator
kAccelerometerOnly | Only accelerometer is enabled.
kMagnetometerOnly | Only magnetometer is enabled.
kHybridMode | Accelerometer and magnetometer are enabled.

enum FXOS8700CQ_interrupt_sources_t

Available interrupt sources.

Enumerator
kInterruptSleep | Sleep interrupt.
kInterruptFIFO | FIFO interrupt.
kInterruptTransient | Transient interrupt.
kInterruptOrientation | Orientation interrupt.
kInterruptPulse | Pulse interrupt.
kInterruptFFMT | Freefall/Motion interrupt.
kInterruptVECM | Acceleration vector-magnitude interrupt.
kInterruptDataReady | Data ready interrupt.
kInterruptDisabled | All interrupt sources are disabled.

enum FXOS8700CQ_interrupt_pin_map_t

Interrupt pin mapping.

- 0: Interrupt mapped to INT1 pin
- 1: Interrupt mapped to INT2 pin

Enumerator
kInterruptSleepPinIsInt1 | Sleep interrupt is mapped to INT1.
kInterruptFIFOPinIsInt1 | FIFO interrupt is mapped to INT1.
kInterruptTransientPinIsInt1 | Transient interrupt is mapped to INT1.
kInterruptOrientationPinIsInt1 | Orientation interrupt is mapped to INT1.
kInterruptPulsePinIsInt1 | Pulse interrupt is mapped to INT1.
kInterruptFFMTPinIsInt1 | Freefall/Motion interrupt is mapped to INT1.
kInterruptVECMPinIsInt1 | Acceleration vector-magnitude interrupt is mapped to INT1.
kInterruptDataReadyPinIsInt1 | Data ready interrupt is mapped to INT1.
kInterruptAllPinsAreInt2 | All interrupt sources are routed to INT2.

enum FXOS8700CQ_sensitivity_t

Sensitivity options.

Enumerator
kSensitivity2g | +-2g Sensitivity
kSensitivity4g | +-4g Sensitivity
kSensitivity8g | +-8g Sensitivity

enum FXOS8700CQ_oversampling_mods_t

Accelerometer Oversampling Mods.

Enumerator
kNormal | Normal mode.
kLowNoiseLowPower | Low-Noise + Low-Power mode.
kHighResolution | High-resolution mode.
kLowPower | Low-Power Mode.

enum FXOS8700CQ_magnetometer_osr_t

Magnetometer Oversampling Ratio.

Enumerator
kMagnetometerOSR0 | Magnetometer oversampling ratio = 0.
kMagnetometerOSR1 | Magnetometer oversampling ratio = 1.
kMagnetometerOSR2 | Magnetometer oversampling ratio = 2.
kMagnetometerOSR3 | Magnetometer oversampling ratio = 3.
kMagnetometerOSR4 | Magnetometer oversampling ratio = 4.
kMagnetometerOSR5 | Magnetometer oversampling ratio = 5.
kMagnetometerOSR6 | Magnetometer oversampling ratio = 6.
kMagnetometerOSR7 | Magnetometer oversampling ratio = 7.

enum FXOS8700CQ_magnetic_sensor_reset_t

Magnetic Sensor Reset Frequency.

Enumerator
kMagneticAutoReset1 | Automatic magnetic sensor reset every 1 ODR cycle.
kMagneticAutoReset16 | Automatic magnetic sensor reset every 16 ODR cycles.
kMagneticAutoReset512 | Automatic magnetic sensor reset every 512 ODR cycles.
kMagneticAutoResetDisabled | Automatic magnetic sensor reset disabled (must be manually reset)