Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
mpu60x0_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 MPU60X0_REGS_H
29 #define MPU60X0_REGS_H
30 
31 /* default I2C address */
32 #define MPU60X0_ADDR 0xD0
33 #define MPU60X0_ADDR_ALT 0xD2
34 
35 #define MPU60X0_SPI_READ 0x80
36 
37 // Power and Interface
38 #define MPU60X0_REG_AUX_VDDIO 0x01 // Must be set to 0 on MPU6000
39 #define MPU60X0_REG_USER_CTRL 0x6A
40 #define MPU60X0_REG_PWR_MGMT_1 0x6B
41 #define MPU60X0_REG_PWR_MGMT_2 0x6C
42 
43 // FIFO
44 #define MPU60X0_REG_FIFO_EN 0x23
45 #define MPU60X0_REG_FIFO_COUNT_H 0x72
46 #define MPU60X0_REG_FIFO_COUNT_L 0x73
47 #define MPU60X0_REG_FIFO_R_W 0x74
48 
49 // Measurement Settings
50 #define MPU60X0_REG_SMPLRT_DIV 0x19
51 #define MPU60X0_REG_CONFIG 0x1A
52 #define MPU60X0_REG_GYRO_CONFIG 0x1B
53 #define MPU60X0_REG_ACCEL_CONFIG 0x1C
54 #define MPU60X0_REG_ACCEL_CONFIG2 0x1D
55 #define MPU60X0_REG_UNDOC1 0x11
56 
57 // I2C Slave settings
58 #define MPU60X0_REG_I2C_MST_CTRL 0x24
59 #define MPU60X0_REG_I2C_MST_STATUS 0x36
60 #define MPU60X0_REG_I2C_MST_DELAY 0x67
61 // Slave 0
62 #define MPU60X0_REG_I2C_SLV0_ADDR 0X25 // i2c addr
63 #define MPU60X0_REG_I2C_SLV0_REG 0X26 // slave reg
64 #define MPU60X0_REG_I2C_SLV0_CTRL 0X27 // set-bits
65 #define MPU60X0_REG_I2C_SLV0_DO 0X63 // DO
66 // Slave 1
67 #define MPU60X0_REG_I2C_SLV1_ADDR 0X28 // i2c addr
68 #define MPU60X0_REG_I2C_SLV1_REG 0X29 // slave reg
69 #define MPU60X0_REG_I2C_SLV1_CTRL 0X2A // set-bits
70 #define MPU60X0_REG_I2C_SLV1_DO 0X64 // DO
71 // Slave 2
72 #define MPU60X0_REG_I2C_SLV2_ADDR 0X2B // i2c addr
73 #define MPU60X0_REG_I2C_SLV2_REG 0X2C // slave reg
74 #define MPU60X0_REG_I2C_SLV2_CTRL 0X2D // set-bits
75 #define MPU60X0_REG_I2C_SLV2_DO 0X65 // DO
76 // Slave 3
77 #define MPU60X0_REG_I2C_SLV3_ADDR 0X2E // i2c addr
78 #define MPU60X0_REG_I2C_SLV3_REG 0X2F // slave reg
79 #define MPU60X0_REG_I2C_SLV3_CTRL 0X30 // set-bits
80 #define MPU60X0_REG_I2C_SLV3_DO 0X66 // DO
81 // Slave 4 - special
82 #define MPU60X0_REG_I2C_SLV4_ADDR 0X31 // i2c addr
83 #define MPU60X0_REG_I2C_SLV4_REG 0X32 // slave reg
84 #define MPU60X0_REG_I2C_SLV4_DO 0X33 // DO
85 #define MPU60X0_REG_I2C_SLV4_CTRL 0X34 // set-bits
86 #define MPU60X0_REG_I2C_SLV4_DI 0X35 // DI
87 
88 // Interrupt
89 #define MPU60X0_REG_INT_PIN_CFG 0x37
90 #define MPU60X0_REG_INT_ENABLE 0x38
91 #define MPU60X0_REG_INT_STATUS 0x3A
92 
93 // Accelero
94 #define MPU60X0_REG_ACCEL_XOUT_H 0x3B
95 #define MPU60X0_REG_ACCEL_XOUT_L 0x3C
96 #define MPU60X0_REG_ACCEL_YOUT_H 0x3D
97 #define MPU60X0_REG_ACCEL_YOUT_L 0x3E
98 #define MPU60X0_REG_ACCEL_ZOUT_H 0x3F
99 #define MPU60X0_REG_ACCEL_ZOUT_L 0x40
100 
101 // Temperature
102 #define MPU60X0_REG_TEMP_OUT_H 0x41
103 #define MPU60X0_REG_TEMP_OUT_L 0x42
104 
105 // Gyro
106 #define MPU60X0_REG_GYRO_XOUT_H 0x43
107 #define MPU60X0_REG_GYRO_XOUT_L 0x44
108 #define MPU60X0_REG_GYRO_YOUT_H 0x45
109 #define MPU60X0_REG_GYRO_YOUT_L 0x46
110 #define MPU60X0_REG_GYRO_ZOUT_H 0x47
111 #define MPU60X0_REG_GYRO_ZOUT_L 0x48
112 
113 // External Sensor Data
114 #define MPU60X0_EXT_SENS_DATA 0x49
115 #define MPU60X0_EXT_SENS_DATA_SIZE 24
116 
117 // Different sensor WHOAMI replies
118 #define MPU60X0_REG_WHO_AM_I 0x75
119 #define MPU60X0_WHOAMI_REPLY 0x68
120 #define ICM20600_WHOAMI_REPLY 0x11
121 #define ICM20608_WHOAMI_REPLY 0xAF
122 #define ICM20602_WHOAMI_REPLY 0x12
123 #define ICM20689_WHOAMI_REPLY 0x98
124 
125 // Bit positions
126 #define MPU60X0_I2C_BYPASS_EN 1
127 
128 // in MPU60X0_REG_USER_CTRL
129 #define MPU60X0_SIG_COND_RESET 0
130 #define MPU60X0_I2C_MST_RESET 1
131 #define MPU60X0_FIFO_RESET 2
132 #define MPU60X0_I2C_IF_DIS 4
133 #define MPU60X0_I2C_MST_EN 5
134 #define MPU60X0_FIFO_EN 6
135 
136 // in MPU60X0_REG_I2C_MST_STATUS
137 #define MPU60X0_I2C_SLV4_DONE 6
138 
144  MPU60X0_DLPF_256HZ = 0x0, // internal sampling rate 8kHz
145  MPU60X0_DLPF_188HZ = 0x1, // internal sampling rate 1kHz
151 };
152 
157  MPU60X0_DLPF_ACC_1046HZ = 0x0, // internal sampling rate 4kHz
158  MPU60X0_DLPF_ACC_218HZ = 0x1, // internal sampling rate 1kHz
165 };
166 
175 };
176 
185 };
186 
207 };
208 
209 #endif /* MPU60X0_REGS_H */
MPU60X0_DLPF_10HZ
@ MPU60X0_DLPF_10HZ
Definition: mpu60x0_regs.h:149
MPU60X0_MST_CLK_254KHZ
@ MPU60X0_MST_CLK_254KHZ
Definition: mpu60x0_regs.h:206
MPU60X0_DLPF_256HZ
@ MPU60X0_DLPF_256HZ
Definition: mpu60x0_regs.h:144
MPU60X0_DLPF_ACC_99HZ
@ MPU60X0_DLPF_ACC_99HZ
Definition: mpu60x0_regs.h:159
MPU60X0_MST_CLK_421KHZ
@ MPU60X0_MST_CLK_421KHZ
Definition: mpu60x0_regs.h:194
MPU60X0_MST_CLK_333KHZ
@ MPU60X0_MST_CLK_333KHZ
Definition: mpu60x0_regs.h:199
MPU60X0_GYRO_RANGE_500
@ MPU60X0_GYRO_RANGE_500
Definition: mpu60x0_regs.h:172
MPU60X0_DLPF_20HZ
@ MPU60X0_DLPF_20HZ
Definition: mpu60x0_regs.h:148
MPU60X0_ACCEL_RANGE_16G
@ MPU60X0_ACCEL_RANGE_16G
Definition: mpu60x0_regs.h:184
MPU60X0_DLPF_ACC_44HZ
@ MPU60X0_DLPF_ACC_44HZ
Definition: mpu60x0_regs.h:160
MPU60X0_DLPF_ACC_10HZ
@ MPU60X0_DLPF_ACC_10HZ
Definition: mpu60x0_regs.h:162
MPU60X0_GYRO_RANGE_250
@ MPU60X0_GYRO_RANGE_250
Definition: mpu60x0_regs.h:171
MPU60X0_MST_CLK_320KHZ
@ MPU60X0_MST_CLK_320KHZ
Definition: mpu60x0_regs.h:200
MPU60X0_MST_CLK_276KHZ
@ MPU60X0_MST_CLK_276KHZ
Definition: mpu60x0_regs.h:204
MPU60X0_DLPF_98HZ
@ MPU60X0_DLPF_98HZ
Definition: mpu60x0_regs.h:146
MPU60X0_MST_CLK_286KHZ
@ MPU60X0_MST_CLK_286KHZ
Definition: mpu60x0_regs.h:203
MPU60X0_MST_CLK_400KHZ
@ MPU60X0_MST_CLK_400KHZ
Definition: mpu60x0_regs.h:195
MPU60X0_MST_CLK_500KHZ
@ MPU60X0_MST_CLK_500KHZ
Definition: mpu60x0_regs.h:191
Mpu60x0MstClk
Mpu60x0MstClk
I2C Master clock.
Definition: mpu60x0_regs.h:190
MPU60X0_DLPF_ACC_05HZ
@ MPU60X0_DLPF_ACC_05HZ
Definition: mpu60x0_regs.h:163
MPU60X0_MST_CLK_308KHZ
@ MPU60X0_MST_CLK_308KHZ
Definition: mpu60x0_regs.h:201
MPU60X0_DLPF_188HZ
@ MPU60X0_DLPF_188HZ
Definition: mpu60x0_regs.h:145
MPU60X0_ACCEL_RANGE_4G
@ MPU60X0_ACCEL_RANGE_4G
Definition: mpu60x0_regs.h:182
MPU60X0_DLPF_42HZ
@ MPU60X0_DLPF_42HZ
Definition: mpu60x0_regs.h:147
MPU60X0_DLPF_ACC_1046HZ
@ MPU60X0_DLPF_ACC_1046HZ
Definition: mpu60x0_regs.h:157
MPU60X0_ACCEL_RANGE_2G
@ MPU60X0_ACCEL_RANGE_2G
Definition: mpu60x0_regs.h:181
Mpu60x0DLPF
Mpu60x0DLPF
Digital Low Pass Filter Options DLFP is affecting both gyro and accels (on MPU not ICM),...
Definition: mpu60x0_regs.h:143
MPU60X0_MST_CLK_381KHZ
@ MPU60X0_MST_CLK_381KHZ
Definition: mpu60x0_regs.h:196
MPU60X0_MST_CLK_296KHZ
@ MPU60X0_MST_CLK_296KHZ
Definition: mpu60x0_regs.h:202
MPU60X0_MST_CLK_267KHZ
@ MPU60X0_MST_CLK_267KHZ
Definition: mpu60x0_regs.h:205
Mpu60x0GyroRanges
Mpu60x0GyroRanges
Selectable gyro range.
Definition: mpu60x0_regs.h:170
MPU60X0_DLPF_ACC_21HZ
@ MPU60X0_DLPF_ACC_21HZ
Definition: mpu60x0_regs.h:161
MPU60X0_GYRO_RANGE_1000
@ MPU60X0_GYRO_RANGE_1000
Definition: mpu60x0_regs.h:173
MPU60X0_DLPF_ACC_420HZ
@ MPU60X0_DLPF_ACC_420HZ
Definition: mpu60x0_regs.h:164
MPU60X0_DLPF_ACC_218HZ
@ MPU60X0_DLPF_ACC_218HZ
Definition: mpu60x0_regs.h:158
MPU60X0_ACCEL_RANGE_8G
@ MPU60X0_ACCEL_RANGE_8G
Definition: mpu60x0_regs.h:183
MPU60X0_MST_CLK_348KHZ
@ MPU60X0_MST_CLK_348KHZ
Definition: mpu60x0_regs.h:198
MPU60X0_DLPF_05HZ
@ MPU60X0_DLPF_05HZ
Definition: mpu60x0_regs.h:150
MPU60X0_GYRO_RANGE_2000
@ MPU60X0_GYRO_RANGE_2000
Definition: mpu60x0_regs.h:174
Mpu60x0ACCDLPF
Mpu60x0ACCDLPF
Digital Low Pass Filter Options DLFP specifically for the ICM device accelerometer.
Definition: mpu60x0_regs.h:156
MPU60X0_MST_CLK_444KHZ
@ MPU60X0_MST_CLK_444KHZ
Definition: mpu60x0_regs.h:193
MPU60X0_MST_CLK_364KHZ
@ MPU60X0_MST_CLK_364KHZ
Definition: mpu60x0_regs.h:197
Mpu60x0AccelRanges
Mpu60x0AccelRanges
Selectable accel range.
Definition: mpu60x0_regs.h:180
MPU60X0_MST_CLK_471KHZ
@ MPU60X0_MST_CLK_471KHZ
Definition: mpu60x0_regs.h:192