Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
invensense3_456_regs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 Freek van Tienen <freek.v.tienen@gmail.com>
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 INVENSENSE3_456_REGS_H
29#define INVENSENSE3_456_REGS_H
30
31#define INV3_456_READ_FLAG 0x80
32
33
34#define ACCEL_ODR_SHIFT 0x00
35#define GYRO_ODR_SHIFT 0x00
36#define GYRO_FS_SEL_SHIFT 0x04
37#define ACCEL_FS_SEL_SHIFT 0x04
38
39// WHOAMI values
40#define INV3_456_WHOAMI_ICM45686 0xE9 // REF: https://invensense.tdk.com/wp-content/uploads/documentation/DS-000577_ICM-45686.pdf
41
42#define INV3REG_456_WHOAMI 0x72
43#define INV3REG_456_PWR_MGMT0 0x10
44#define INV3REG_456_INT1_STATUS0 0x19
45#define INV3REG_456_ACCEL_CONFIG0 0x1B
46#define INV3REG_456_GYRO_CONFIG0 0x1C
47#define INV3REG_456_FIFO_CONFIG0 0x1D
48#define INV3REG_456_FIFO_CONFIG2 0x20
49#define INV3REG_456_FIFO_CONFIG3 0x21
50#define INV3REG_456_FIFO_CONFIG4 0x22
51#define INV3REG_456_RTC_CONFIG 0x26
52#define INV3REG_456_FIFO_COUNTH 0x12
53#define INV3REG_456_FIFO_COUNTL 0x13
54#define INV3REG_456_FIFO_DATA 0x14
55#define INV3REG_456_INTF_CONFIG0 0x2C
56#define INV3REG_456_IOC_PAD_SCENARIO 0x2F
57#define INV3REG_456_IOC_PAD_SCENARIO_AUX_OVRD 0x30
58#define INV3REG_456_IOC_PAD_SCENARIO_OVRD 0x31
59#define INV3REG_456_PWR_MGMT_AUX1 0x54
60#define INV3REG_456_IREG_ADDRH 0x7C
61#define INV3REG_456_IREG_ADDRL 0x7D
62#define INV3REG_456_IREG_DATA 0x7E
63#define INV3REG_456_REG_MISC2 0x7F
64#define INV3REG_456_SREG_CTRL 0x63
65
66#define INV3BANK_456_IMEM_SRAM_ADDR 0x0000
67#define INV3BANK_456_IPREG_BAR_ADDR 0xA000
68#define INV3BANK_456_IPREG_TOP1_ADDR 0xA200
69#define INV3BANK_456_IPREG_SYS1_ADDR 0xA400
70#define INV3BANK_456_IPREG_SYS2_ADDR 0xA500
71
72#define INV_456_BASE_FIFO3_CONFIG_VALUE (1U<<3 | 1U<<2 | 1U<<1) // FIFO_HIRES_EN | FIFO_GYRO_EN | FIFO_ACCEL_EN
73#define INV_456_FIFO_IF_EN (1U<<0) // INV_456_FIFO_IF_EN
74
75
76
77#endif /* INVENSENSE3_456_REGS_H */