![]() |
Autodrone
Multi-Domain Vehicle
|
This file contains all the functions to initalize and read data from the MPU-6000. More...
Go to the source code of this file.
Functions | |
bool | mpu6000Init (void) |
MPU-6000 initialization sequence. More... | |
void | readMPU6000 (void) |
Reads MPU-6000 raw data and packs accel, gyro, temp data into variables. More... | |
void | computeMPU6000RTData (void) |
Computes IMU runtime data to find gyro bias. More... | |
void | computeMPU6000TCBias (void) |
Calculates the IMU temperature bias. More... | |
Variables | |
uint8_t | rawData [16] |
float | accelOneG |
float | accelTCBias [3] |
int32_t | accelSum100Hz [3] |
int32_t | accelSum500Hz [3] |
int32_t | accelSummedSamples100Hz [3] |
int32_t | accelSummedSamples500Hz [3] |
int16andUint8_t | rawAccel [3] |
float | nonRotatedAccelData [3] |
float | gyroRTBias [3] |
float | gyroTCBias [3] |
int32_t | gyroSum500Hz [3] |
int32_t | gyroSummedSamples500Hz [3] |
int16andUint8_t | rawGyro [3] |
float | nonRotatedGyroData [3] |
uint8_t | accelCalibrating |
uint8_t | mpu6000Calibrating |
float | mpu6000Temperature |
int16andUint8_t | rawMPU6000Temperature |
This file contains all the functions to initalize and read data from the MPU-6000.
#define ACCEL_SCALE_FACTOR 0.004788403f |
#define BIT_H_RESET 0x80 |
#define BIT_I2C_IF_DIS 0x10 |
#define BIT_INT_ANYRD_2CLEAR 0x10 |
#define BIT_INT_STATUS_DATA 0x01 |
#define BIT_RAW_RDY_EN 0x01 |
#define BIT_SLEEP 0x40 |
#define BITS_CLKSEL 0x07 |
#define BITS_DLPF_CFG_10HZ 0x05 |
#define BITS_DLPF_CFG_188HZ 0x01 |
#define BITS_DLPF_CFG_20HZ 0x04 |
#define BITS_DLPF_CFG_2100HZ_NOLPF 0x07 |
#define BITS_DLPF_CFG_256HZ 0x00 |
#define BITS_DLPF_CFG_42HZ 0x03 |
#define BITS_DLPF_CFG_5HZ 0x06 |
#define BITS_DLPF_CFG_98HZ 0x02 |
#define BITS_DLPF_CFG_MASK 0x07 |
#define BITS_FS_1000DPS 0x10 |
#define BITS_FS_16G 0x18 |
#define BITS_FS_2000DPS 0x18 |
#define BITS_FS_250DPS 0x00 |
#define BITS_FS_2G 0x00 |
#define BITS_FS_4G 0x08 |
#define BITS_FS_500DPS 0x08 |
#define BITS_FS_8G 0x10 |
#define BITS_FS_MASK 0x18 |
#define DISABLE_MPU6000 GPIOA->BSRR |= GPIO_BSRR_BS4 |
#define ENABLE_MPU6000 GPIOA->BSRR |= GPIO_BSRR_BR4 |
#define GYRO_SCALE_FACTOR 0.000532632f |
#define MPU6000_ACCEL_CONFIG 0x1C |
#define MPU6000_ACCEL_XOUT_H 0x3B |
#define MPU6000_ACCEL_XOUT_L 0x3C |
#define MPU6000_ACCEL_YOUT_H 0x3D |
#define MPU6000_ACCEL_YOUT_L 0x3E |
#define MPU6000_ACCEL_ZOUT_H 0x3F |
#define MPU6000_ACCEL_ZOUT_L 0x40 |
#define MPU6000_CONFIG 0x1A |
#define MPU6000_FIFO_COUNTH 0x72 |
#define MPU6000_FIFO_COUNTL 0x73 |
#define MPU6000_FIFO_EN 0x23 |
#define MPU6000_FIFO_R_W 0x74 |
#define MPU6000_GYRO_CONFIG 0x1B |
#define MPU6000_GYRO_XOUT_H 0x43 |
#define MPU6000_GYRO_XOUT_L 0x44 |
#define MPU6000_GYRO_YOUT_H 0x45 |
#define MPU6000_GYRO_YOUT_L 0x46 |
#define MPU6000_GYRO_ZOUT_H 0x47 |
#define MPU6000_GYRO_ZOUT_L 0x48 |
#define MPU6000_INT_ENABLE 0x38 |
#define MPU6000_INT_PIN_CFG 0x37 |
#define MPU6000_INT_STATUS 0x3A |
#define MPU6000_PRODUCT_ID 0x68 |
#define MPU6000_PWR_MGMT_1 0x6B |
#define MPU6000_PWR_MGMT_2 0x6C |
#define MPU6000_SIGNAL_PATH_RESET 0x68 |
#define MPU6000_SMPLRT_DIV 0x19 |
#define MPU6000_TEMP_OUT_H 0x41 |
#define MPU6000_TEMP_OUT_L 0x42 |
#define MPU6000_USER_CTRL 0x6A |
#define MPU6000_WHOAMI 0x75 |
#define MPU_CLK_SEL_PLLGYROX 0x01 |
#define MPU_CLK_SEL_PLLGYROZ 0x03 |
#define MPU_EXT_SYNC_GYROX 0x02 |
void computeMPU6000RTData | ( | void | ) |
Computes IMU runtime data to find gyro bias.
void computeMPU6000TCBias | ( | void | ) |
Calculates the IMU temperature bias.
bool mpu6000Init | ( | void | ) |
MPU-6000 initialization sequence.
void readMPU6000 | ( | void | ) |
Reads MPU-6000 raw data and packs accel, gyro, temp data into variables.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |