Paparazzi UAS
v5.12_stable-4-g9b43e9b
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
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
55
// I2C Slave settings
56
#define MPU60X0_REG_I2C_MST_CTRL 0x24
57
#define MPU60X0_REG_I2C_MST_STATUS 0x36
58
#define MPU60X0_REG_I2C_MST_DELAY 0x67
59
// Slave 0
60
#define MPU60X0_REG_I2C_SLV0_ADDR 0X25 // i2c addr
61
#define MPU60X0_REG_I2C_SLV0_REG 0X26 // slave reg
62
#define MPU60X0_REG_I2C_SLV0_CTRL 0X27 // set-bits
63
#define MPU60X0_REG_I2C_SLV0_DO 0X63 // DO
64
// Slave 1
65
#define MPU60X0_REG_I2C_SLV1_ADDR 0X28 // i2c addr
66
#define MPU60X0_REG_I2C_SLV1_REG 0X29 // slave reg
67
#define MPU60X0_REG_I2C_SLV1_CTRL 0X2A // set-bits
68
#define MPU60X0_REG_I2C_SLV1_DO 0X64 // DO
69
// Slave 2
70
#define MPU60X0_REG_I2C_SLV2_ADDR 0X2B // i2c addr
71
#define MPU60X0_REG_I2C_SLV2_REG 0X2C // slave reg
72
#define MPU60X0_REG_I2C_SLV2_CTRL 0X2D // set-bits
73
#define MPU60X0_REG_I2C_SLV2_DO 0X65 // DO
74
// Slave 3
75
#define MPU60X0_REG_I2C_SLV3_ADDR 0X2E // i2c addr
76
#define MPU60X0_REG_I2C_SLV3_REG 0X2F // slave reg
77
#define MPU60X0_REG_I2C_SLV3_CTRL 0X30 // set-bits
78
#define MPU60X0_REG_I2C_SLV3_DO 0X66 // DO
79
// Slave 4 - special
80
#define MPU60X0_REG_I2C_SLV4_ADDR 0X31 // i2c addr
81
#define MPU60X0_REG_I2C_SLV4_REG 0X32 // slave reg
82
#define MPU60X0_REG_I2C_SLV4_DO 0X33 // DO
83
#define MPU60X0_REG_I2C_SLV4_CTRL 0X34 // set-bits
84
#define MPU60X0_REG_I2C_SLV4_DI 0X35 // DI
85
86
// Interrupt
87
#define MPU60X0_REG_INT_PIN_CFG 0x37
88
#define MPU60X0_REG_INT_ENABLE 0x38
89
#define MPU60X0_REG_INT_STATUS 0x3A
90
91
// Accelero
92
#define MPU60X0_REG_ACCEL_XOUT_H 0x3B
93
#define MPU60X0_REG_ACCEL_XOUT_L 0x3C
94
#define MPU60X0_REG_ACCEL_YOUT_H 0x3D
95
#define MPU60X0_REG_ACCEL_YOUT_L 0x3E
96
#define MPU60X0_REG_ACCEL_ZOUT_H 0x3F
97
#define MPU60X0_REG_ACCEL_ZOUT_L 0x40
98
99
// Temperature
100
#define MPU60X0_REG_TEMP_OUT_H 0x41
101
#define MPU60X0_REG_TEMP_OUT_L 0x42
102
103
// Gyro
104
#define MPU60X0_REG_GYRO_XOUT_H 0x43
105
#define MPU60X0_REG_GYRO_XOUT_L 0x44
106
#define MPU60X0_REG_GYRO_YOUT_H 0x45
107
#define MPU60X0_REG_GYRO_YOUT_L 0x46
108
#define MPU60X0_REG_GYRO_ZOUT_H 0x47
109
#define MPU60X0_REG_GYRO_ZOUT_L 0x48
110
111
// External Sensor Data
112
#define MPU60X0_EXT_SENS_DATA 0x49
113
#define MPU60X0_EXT_SENS_DATA_SIZE 24
114
115
116
#define MPU60X0_REG_WHO_AM_I 0x75
117
#ifdef ICM20608
118
#define MPU60X0_WHOAMI_REPLY 0xAF
119
#else
120
#define MPU60X0_WHOAMI_REPLY 0x68
121
#endif
122
123
// Bit positions
124
#define MPU60X0_I2C_BYPASS_EN 1
125
126
// in MPU60X0_REG_USER_CTRL
127
#define MPU60X0_SIG_COND_RESET 0
128
#define MPU60X0_I2C_MST_RESET 1
129
#define MPU60X0_FIFO_RESET 2
130
#define MPU60X0_I2C_IF_DIS 4
131
#define MPU60X0_I2C_MST_EN 5
132
#define MPU60X0_FIFO_EN 6
133
134
// in MPU60X0_REG_I2C_MST_STATUS
135
#define MPU60X0_I2C_SLV4_DONE 6
136
141
enum
Mpu60x0DLPF
{
142
MPU60X0_DLPF_256HZ
= 0x0,
// internal sampling rate 8kHz
143
MPU60X0_DLPF_188HZ
= 0x1,
// internal sampling rate 1kHz
144
MPU60X0_DLPF_98HZ
= 0x2,
145
MPU60X0_DLPF_42HZ
= 0x3,
146
MPU60X0_DLPF_20HZ
= 0x4,
147
MPU60X0_DLPF_10HZ
= 0x5,
148
MPU60X0_DLPF_05HZ
= 0x6
149
};
150
154
enum
Mpu60x0GyroRanges
{
155
MPU60X0_GYRO_RANGE_250
= 0x00,
156
MPU60X0_GYRO_RANGE_500
= 0x01,
157
MPU60X0_GYRO_RANGE_1000
= 0x02,
158
MPU60X0_GYRO_RANGE_2000
= 0x03
159
};
160
164
enum
Mpu60x0AccelRanges
{
165
MPU60X0_ACCEL_RANGE_2G
= 0x00,
166
MPU60X0_ACCEL_RANGE_4G
= 0x01,
167
MPU60X0_ACCEL_RANGE_8G
= 0x02,
168
MPU60X0_ACCEL_RANGE_16G
= 0x03
169
};
170
174
enum
Mpu60x0MstClk
{
175
MPU60X0_MST_CLK_500KHZ
= 0x9,
176
MPU60X0_MST_CLK_471KHZ
= 0xA,
177
MPU60X0_MST_CLK_444KHZ
= 0xB,
178
MPU60X0_MST_CLK_421KHZ
= 0xC,
179
MPU60X0_MST_CLK_400KHZ
= 0xD,
180
MPU60X0_MST_CLK_381KHZ
= 0xE,
181
MPU60X0_MST_CLK_364KHZ
= 0xF,
182
MPU60X0_MST_CLK_348KHZ
= 0x0,
183
MPU60X0_MST_CLK_333KHZ
= 0x1,
184
MPU60X0_MST_CLK_320KHZ
= 0x2,
185
MPU60X0_MST_CLK_308KHZ
= 0x3,
186
MPU60X0_MST_CLK_296KHZ
= 0x4,
187
MPU60X0_MST_CLK_286KHZ
= 0x5,
188
MPU60X0_MST_CLK_276KHZ
= 0x6,
189
MPU60X0_MST_CLK_267KHZ
= 0x7,
190
MPU60X0_MST_CLK_254KHZ
= 0x8
191
};
192
193
#endif
/* MPU60X0_REGS_H */
MPU60X0_DLPF_10HZ
Definition:
mpu60x0_regs.h:147
Mpu60x0AccelRanges
Mpu60x0AccelRanges
Selectable accel range.
Definition:
mpu60x0_regs.h:164
MPU60X0_GYRO_RANGE_1000
Definition:
mpu60x0_regs.h:157
MPU60X0_MST_CLK_400KHZ
Definition:
mpu60x0_regs.h:179
MPU60X0_DLPF_05HZ
Definition:
mpu60x0_regs.h:148
MPU60X0_MST_CLK_364KHZ
Definition:
mpu60x0_regs.h:181
MPU60X0_MST_CLK_320KHZ
Definition:
mpu60x0_regs.h:184
MPU60X0_GYRO_RANGE_250
Definition:
mpu60x0_regs.h:155
MPU60X0_MST_CLK_500KHZ
Definition:
mpu60x0_regs.h:175
MPU60X0_MST_CLK_444KHZ
Definition:
mpu60x0_regs.h:177
MPU60X0_GYRO_RANGE_500
Definition:
mpu60x0_regs.h:156
MPU60X0_MST_CLK_381KHZ
Definition:
mpu60x0_regs.h:180
MPU60X0_MST_CLK_296KHZ
Definition:
mpu60x0_regs.h:186
MPU60X0_DLPF_256HZ
Definition:
mpu60x0_regs.h:142
MPU60X0_MST_CLK_267KHZ
Definition:
mpu60x0_regs.h:189
Mpu60x0GyroRanges
Mpu60x0GyroRanges
Selectable gyro range.
Definition:
mpu60x0_regs.h:154
MPU60X0_MST_CLK_276KHZ
Definition:
mpu60x0_regs.h:188
MPU60X0_DLPF_20HZ
Definition:
mpu60x0_regs.h:146
MPU60X0_DLPF_42HZ
Definition:
mpu60x0_regs.h:145
Mpu60x0DLPF
Mpu60x0DLPF
Digital Low Pass Filter Options DLFP is affecting both gyro and accels, with slightly different bandw...
Definition:
mpu60x0_regs.h:141
MPU60X0_MST_CLK_333KHZ
Definition:
mpu60x0_regs.h:183
Mpu60x0MstClk
Mpu60x0MstClk
I2C Master clock.
Definition:
mpu60x0_regs.h:174
MPU60X0_MST_CLK_286KHZ
Definition:
mpu60x0_regs.h:187
MPU60X0_MST_CLK_421KHZ
Definition:
mpu60x0_regs.h:178
MPU60X0_ACCEL_RANGE_4G
Definition:
mpu60x0_regs.h:166
MPU60X0_ACCEL_RANGE_16G
Definition:
mpu60x0_regs.h:168
MPU60X0_DLPF_98HZ
Definition:
mpu60x0_regs.h:144
MPU60X0_ACCEL_RANGE_2G
Definition:
mpu60x0_regs.h:165
MPU60X0_MST_CLK_308KHZ
Definition:
mpu60x0_regs.h:185
MPU60X0_MST_CLK_348KHZ
Definition:
mpu60x0_regs.h:182
MPU60X0_GYRO_RANGE_2000
Definition:
mpu60x0_regs.h:158
MPU60X0_MST_CLK_254KHZ
Definition:
mpu60x0_regs.h:190
MPU60X0_ACCEL_RANGE_8G
Definition:
mpu60x0_regs.h:167
MPU60X0_MST_CLK_471KHZ
Definition:
mpu60x0_regs.h:176
MPU60X0_DLPF_188HZ
Definition:
mpu60x0_regs.h:143
sw
airborne
peripherals
mpu60x0_regs.h
Generated on Sat Feb 9 2019 06:44:04 for Paparazzi UAS by
1.8.8