Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
mpu9250_regs.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2010-2013 The Paparazzi Team
3
*
4
* This file is part of paparazzi.
5
*
6
* paparazzi is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2, or (at your option)
9
* any later version.
10
*
11
* paparazzi is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with paparazzi; see the file COPYING. If not, write to
18
* the Free Software Foundation, 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
20
*/
21
28
#ifndef MPU9250_REGS_H
29
#define MPU9250_REGS_H
30
31
/* default I2C address */
32
#define MPU9250_ADDR 0xD0
33
#define MPU9250_ADDR_ALT 0xD2
34
35
#define MPU9250_MAG_ADDR 0x18
36
37
#define MPU9250_SPI_READ 0x80
38
39
// Power and Interface
40
#define MPU9250_REG_AUX_VDDIO 0x01 // Must be set to 0 on MPU6000
41
#define MPU9250_REG_USER_CTRL 0x6A
42
#define MPU9250_REG_PWR_MGMT_1 0x6B
43
#define MPU9250_REG_PWR_MGMT_2 0x6C
44
45
// FIFO
46
#define MPU9250_REG_FIFO_EN 0x23
47
#define MPU9250_REG_FIFO_COUNT_H 0x72
48
#define MPU9250_REG_FIFO_COUNT_L 0x73
49
#define MPU9250_REG_FIFO_R_W 0x74
50
51
// Measurement Settings
52
#define MPU9250_REG_SMPLRT_DIV 0x19
53
#define MPU9250_REG_CONFIG 0x1A
54
#define MPU9250_REG_GYRO_CONFIG 0x1B
55
#define MPU9250_REG_ACCEL_CONFIG 0x1C
56
#define MPU9250_REG_ACCEL_CONFIG_2 0x1D
57
58
59
// I2C Slave settings
60
#define MPU9250_REG_I2C_MST_CTRL 0x24
61
#define MPU9250_REG_I2C_MST_STATUS 0x36
62
#define MPU9250_REG_I2C_MST_DELAY 0x67
63
// Slave 0
64
#define MPU9250_REG_I2C_SLV0_ADDR 0X25 // i2c addr
65
#define MPU9250_REG_I2C_SLV0_REG 0X26 // slave reg
66
#define MPU9250_REG_I2C_SLV0_CTRL 0X27 // set-bits
67
#define MPU9250_REG_I2C_SLV0_DO 0X63 // DO
68
// Slave 1
69
#define MPU9250_REG_I2C_SLV1_ADDR 0X28 // i2c addr
70
#define MPU9250_REG_I2C_SLV1_REG 0X29 // slave reg
71
#define MPU9250_REG_I2C_SLV1_CTRL 0X2A // set-bits
72
#define MPU9250_REG_I2C_SLV1_DO 0X64 // DO
73
// Slave 2
74
#define MPU9250_REG_I2C_SLV2_ADDR 0X2B // i2c addr
75
#define MPU9250_REG_I2C_SLV2_REG 0X2C // slave reg
76
#define MPU9250_REG_I2C_SLV2_CTRL 0X2D // set-bits
77
#define MPU9250_REG_I2C_SLV2_DO 0X65 // DO
78
// Slave 3
79
#define MPU9250_REG_I2C_SLV3_ADDR 0X2E // i2c addr
80
#define MPU9250_REG_I2C_SLV3_REG 0X2F // slave reg
81
#define MPU9250_REG_I2C_SLV3_CTRL 0X30 // set-bits
82
#define MPU9250_REG_I2C_SLV3_DO 0X66 // DO
83
// Slave 4 - special
84
#define MPU9250_REG_I2C_SLV4_ADDR 0X31 // i2c addr
85
#define MPU9250_REG_I2C_SLV4_REG 0X32 // slave reg
86
#define MPU9250_REG_I2C_SLV4_DO 0X33 // DO
87
#define MPU9250_REG_I2C_SLV4_CTRL 0X34 // set-bits
88
#define MPU9250_REG_I2C_SLV4_DI 0X35 // DI
89
90
// Interrupt
91
#define MPU9250_REG_INT_PIN_CFG 0x37
92
#define MPU9250_REG_INT_ENABLE 0x38
93
#define MPU9250_REG_INT_STATUS 0x3A
94
95
// Accelero
96
#define MPU9250_REG_ACCEL_XOUT_H 0x3B
97
#define MPU9250_REG_ACCEL_XOUT_L 0x3C
98
#define MPU9250_REG_ACCEL_YOUT_H 0x3D
99
#define MPU9250_REG_ACCEL_YOUT_L 0x3E
100
#define MPU9250_REG_ACCEL_ZOUT_H 0x3F
101
#define MPU9250_REG_ACCEL_ZOUT_L 0x40
102
103
// Temperature
104
#define MPU9250_REG_TEMP_OUT_H 0x41
105
#define MPU9250_REG_TEMP_OUT_L 0x42
106
107
// Gyro
108
#define MPU9250_REG_GYRO_XOUT_H 0x43
109
#define MPU9250_REG_GYRO_XOUT_L 0x44
110
#define MPU9250_REG_GYRO_YOUT_H 0x45
111
#define MPU9250_REG_GYRO_YOUT_L 0x46
112
#define MPU9250_REG_GYRO_ZOUT_H 0x47
113
#define MPU9250_REG_GYRO_ZOUT_L 0x48
114
115
// External Sensor Data
116
#define MPU9250_EXT_SENS_DATA 0x49
117
#define MPU9250_EXT_SENS_DATA_SIZE 24
118
119
120
#define MPU9250_REG_WHO_AM_I 0x75
121
#define MPU9250_WHOAMI_REPLY 0x71
122
123
// Bit positions
124
#define MPU9250_I2C_BYPASS_EN 1
125
126
// in MPU9250_REG_USER_CTRL
127
#define MPU9250_SIG_COND_RESET 0
128
#define MPU9250_I2C_MST_RESET 1
129
#define MPU9250_FIFO_RESET 2
130
#define MPU9250_I2C_IF_DIS 4
131
#define MPU9250_I2C_MST_EN 5
132
#define MPU9250_FIFO_EN 6
133
134
// in MPU9250_REG_I2C_MST_STATUS
135
#define MPU9250_I2C_SLV4_DONE 6
136
139
enum
Mpu9250DLPFGyro
{
140
MPU9250_DLPF_GYRO_250HZ
= 0x0,
// internal sampling rate 8kHz
141
MPU9250_DLPF_GYRO_184HZ
= 0x1,
// internal sampling rate 1kHz
142
MPU9250_DLPF_GYRO_92HZ
= 0x2,
143
MPU9250_DLPF_GYRO_41HZ
= 0x3,
144
MPU9250_DLPF_GYRO_20HZ
= 0x4,
145
MPU9250_DLPF_GYRO_10HZ
= 0x5,
146
MPU9250_DLPF_GYRO_05HZ
= 0x6
147
};
148
149
enum
Mpu9250DLPFAccel
{
150
MPU9250_DLPF_ACCEL_460HZ
= 0x0,
// internal sampling rate 8kHz
151
MPU9250_DLPF_ACCEL_184HZ
= 0x1,
// internal sampling rate 1kHz
152
MPU9250_DLPF_ACCEL_92HZ
= 0x2,
153
MPU9250_DLPF_ACCEL_41HZ
= 0x3,
154
MPU9250_DLPF_ACCEL_20HZ
= 0x4,
155
MPU9250_DLPF_ACCEL_10HZ
= 0x5,
156
MPU9250_DLPF_ACCEL_05HZ
= 0x6
157
};
158
162
enum
Mpu9250GyroRanges
{
163
MPU9250_GYRO_RANGE_250
= 0x00,
164
MPU9250_GYRO_RANGE_500
= 0x01,
165
MPU9250_GYRO_RANGE_1000
= 0x02,
166
MPU9250_GYRO_RANGE_2000
= 0x03
167
};
168
172
enum
Mpu9250AccelRanges
{
173
MPU9250_ACCEL_RANGE_2G
= 0x00,
174
MPU9250_ACCEL_RANGE_4G
= 0x01,
175
MPU9250_ACCEL_RANGE_8G
= 0x02,
176
MPU9250_ACCEL_RANGE_16G
= 0x03
177
};
178
182
enum
Mpu9250MstClk
{
183
MPU9250_MST_CLK_500KHZ
= 0x9,
184
MPU9250_MST_CLK_471KHZ
= 0xA,
185
MPU9250_MST_CLK_444KHZ
= 0xB,
186
MPU9250_MST_CLK_421KHZ
= 0xC,
187
MPU9250_MST_CLK_400KHZ
= 0xD,
188
MPU9250_MST_CLK_381KHZ
= 0xE,
189
MPU9250_MST_CLK_364KHZ
= 0xF,
190
MPU9250_MST_CLK_348KHZ
= 0x0,
191
MPU9250_MST_CLK_333KHZ
= 0x1,
192
MPU9250_MST_CLK_320KHZ
= 0x2,
193
MPU9250_MST_CLK_308KHZ
= 0x3,
194
MPU9250_MST_CLK_296KHZ
= 0x4,
195
MPU9250_MST_CLK_286KHZ
= 0x5,
196
MPU9250_MST_CLK_276KHZ
= 0x6,
197
MPU9250_MST_CLK_267KHZ
= 0x7,
198
MPU9250_MST_CLK_258KHZ
= 0x8
199
};
200
201
#endif
/* MPU9250_REGS_H */
MPU9250_MST_CLK_500KHZ
Definition:
mpu9250_regs.h:183
MPU9250_ACCEL_RANGE_16G
Definition:
mpu9250_regs.h:176
MPU9250_MST_CLK_348KHZ
Definition:
mpu9250_regs.h:190
MPU9250_MST_CLK_276KHZ
Definition:
mpu9250_regs.h:196
MPU9250_ACCEL_RANGE_4G
Definition:
mpu9250_regs.h:174
MPU9250_ACCEL_RANGE_2G
Definition:
mpu9250_regs.h:173
Mpu9250GyroRanges
Mpu9250GyroRanges
Selectable gyro range.
Definition:
mpu9250_regs.h:162
MPU9250_MST_CLK_444KHZ
Definition:
mpu9250_regs.h:185
MPU9250_DLPF_GYRO_92HZ
Definition:
mpu9250_regs.h:142
MPU9250_DLPF_ACCEL_05HZ
Definition:
mpu9250_regs.h:156
MPU9250_DLPF_GYRO_20HZ
Definition:
mpu9250_regs.h:144
MPU9250_DLPF_ACCEL_41HZ
Definition:
mpu9250_regs.h:153
MPU9250_ACCEL_RANGE_8G
Definition:
mpu9250_regs.h:175
MPU9250_DLPF_ACCEL_20HZ
Definition:
mpu9250_regs.h:154
MPU9250_MST_CLK_421KHZ
Definition:
mpu9250_regs.h:186
Mpu9250MstClk
Mpu9250MstClk
I2C Master clock.
Definition:
mpu9250_regs.h:182
MPU9250_MST_CLK_296KHZ
Definition:
mpu9250_regs.h:194
MPU9250_MST_CLK_258KHZ
Definition:
mpu9250_regs.h:198
Mpu9250DLPFAccel
Mpu9250DLPFAccel
Definition:
mpu9250_regs.h:149
MPU9250_MST_CLK_333KHZ
Definition:
mpu9250_regs.h:191
MPU9250_DLPF_GYRO_184HZ
Definition:
mpu9250_regs.h:141
MPU9250_DLPF_GYRO_250HZ
Definition:
mpu9250_regs.h:140
MPU9250_DLPF_ACCEL_460HZ
Definition:
mpu9250_regs.h:150
MPU9250_MST_CLK_364KHZ
Definition:
mpu9250_regs.h:189
MPU9250_MST_CLK_308KHZ
Definition:
mpu9250_regs.h:193
MPU9250_GYRO_RANGE_1000
Definition:
mpu9250_regs.h:165
MPU9250_DLPF_GYRO_41HZ
Definition:
mpu9250_regs.h:143
MPU9250_MST_CLK_286KHZ
Definition:
mpu9250_regs.h:195
MPU9250_MST_CLK_320KHZ
Definition:
mpu9250_regs.h:192
MPU9250_GYRO_RANGE_2000
Definition:
mpu9250_regs.h:166
MPU9250_GYRO_RANGE_500
Definition:
mpu9250_regs.h:164
MPU9250_DLPF_ACCEL_10HZ
Definition:
mpu9250_regs.h:155
MPU9250_DLPF_GYRO_05HZ
Definition:
mpu9250_regs.h:146
MPU9250_MST_CLK_381KHZ
Definition:
mpu9250_regs.h:188
MPU9250_GYRO_RANGE_250
Definition:
mpu9250_regs.h:163
MPU9250_DLPF_GYRO_10HZ
Definition:
mpu9250_regs.h:145
Mpu9250AccelRanges
Mpu9250AccelRanges
Selectable accel range.
Definition:
mpu9250_regs.h:172
MPU9250_DLPF_ACCEL_184HZ
Definition:
mpu9250_regs.h:151
MPU9250_MST_CLK_267KHZ
Definition:
mpu9250_regs.h:197
MPU9250_MST_CLK_471KHZ
Definition:
mpu9250_regs.h:184
MPU9250_DLPF_ACCEL_92HZ
Definition:
mpu9250_regs.h:152
MPU9250_MST_CLK_400KHZ
Definition:
mpu9250_regs.h:187
Mpu9250DLPFGyro
Mpu9250DLPFGyro
Digital Low Pass Filter Options.
Definition:
mpu9250_regs.h:139
sw
airborne
peripherals
mpu9250_regs.h
Generated on Wed Feb 10 2021 04:34:17 for Paparazzi UAS by
1.8.8