38#define K_ICM20948_TASK_PRIORITY 4U
39#define K_ICM20948_CONFIG_TASK_PRIORITY 5U
40#define K_ICM20948_READ_SENSORS_PRIORITY 4U
41#define K_ICM20948_TASK_TIMEOUT_MS 5000U
42#define K_ICM20948_SERVICE_APID (0x0002U)
45#define K_ICM20948_SPI_HOST_USED (1U)
46#define K_ICM20948_PIN_NUM_CS 21U
47#define K_ICM20948_PIN_NUM_CIPO 47U
48#define K_ICM20948_PIN_NUM_COPI 38U
49#define K_ICM20948_PIN_NUM_CLK 48U
50#define K_ICM20948_READ_OP 0x80U
51#define K_ICM20948_WRITE_OP 0x00U
52#define K_ICM20948_EMPTY_MESSAGE 0x00U
55#define K_ICM20948_INT_PIN_NUM 4U
56#define K_ICM20948_INT_INTR_TYPE 1U
57#define K_ICM20948_INT_PULL 0U
60#define K_ICM20948_REG_BANK_SEL 0x7FU
63#define K_ICM20948_REG_WHO_AM_I 0x00U
64#define K_ICM20948_REG_USER_CTRL 0x03U
65#define K_ICM20948_REG_LP_CONF 0x05U
66#define K_ICM20948_REG_PWR_MGMT_1 0x06U
67#define K_ICM20948_REG_PWR_MGMT_2 0x07U
68#define K_ICM20948_REG_INT_ENABLE 0x10U
69#define K_ICM20948_REG_INT_ENABLE_1 0x11U
70#define K_ICM20948_REG_INT_ENABLE_2 0x12U
71#define K_ICM20948_REG_DMP_INT_STATUS 0x18U
72#define K_ICM20948_REG_INT_STATUS 0x19U
73#define K_ICM20948_REG_SINGLE_FIFO_PRIORITY_SEL 0x26U
74#define K_ICM20948_REG_PERIPH_SENS_DATA_00 0x3BU
75#define K_ICM20948_REG_FIFO_EN_1 0x66U
76#define K_ICM20948_REG_FIFO_EN_2 0x67U
77#define K_ICM20948_REG_FIFO_RST 0x68U
78#define K_ICM20948_REG_FIFO_MODE 0x69U
79#define K_ICM20948_REG_FIFO_COUNTH 0x70U
80#define K_ICM20948_REG_FIFO_COUNTL 0x71U
81#define K_ICM20948_REG_FIFO_R_W 0x72U
82#define K_ICM20948_REG_HW_FIX_DISABLE 0x75U
83#define K_ICM20948_REG_FIFO_CFG 0x76U
86#define K_ICM20948_REG_TIMEBASE_CORRECTION_PLL 0x28U
89#define K_ICM20948_REG_GYRO_SMPLRT_DIV 0x00U
90#define K_ICM20948_REG_GYRO_CONFIG 0x01U
91#define K_ICM20948_REG_ACCEL_SMPLRT_DIV_1 0x10U
92#define K_ICM20948_REG_ACCEL_SMPLRT_DIV_2 0x11U
93#define K_ICM20948_REG_ACCEL_CONFIG 0x14U
94#define K_ICM20948_REG_ACCEL_CONFIG_2 0x15U
95#define K_ICM20948_REG_DMP_ADDR_MSB 0x50U
96#define K_ICM20948_REG_DMP_ADDR_LSB 0x51U
99#define K_ICM20948_I2C_MST_ODR_CONFIG 0x00U
100#define K_ICM20948_REG_I2C_CTRL 0x01U
101#define K_ICM20948_REG_SLV0_ADDR 0x03U
102#define K_ICM20948_REG_SLV0_REG 0x04U
103#define K_ICM20948_REG_SLV0_CTRL 0x05U
104#define K_ICM20948_REG_SLV0_DO 0x06U
105#define K_ICM20948_I2C_SLV1_ADDR 0x07U
106#define K_ICM20948_I2C_SLV1_REG 0x08U
107#define K_ICM20948_I2C_SLV1_CTRL 0x09U
108#define K_ICM20948_I2C_SLV1_DO 0x0AU
111#define K_ICM20948_REG_MEM_START_ADDR 0x7CU
112#define K_ICM20948_REG_MEM_R_W 0x7DU
113#define K_ICM20948_REG_MEM_BANK_SEL 0x7EU
114#define K_ICM20948_DMP_LOAD_START 0x0090U
117#define K_ICM20948_DMP_DATA_OUT_CTL1 (4U * 16U)
118#define K_ICM20948_DMP_DATA_OUT_CTL2 (4U * 16U + 2U)
119#define K_ICM20948_DMP_DATA_INTR_CTL (4U * 16U + 12U)
120#define K_ICM20948_DMP_MOTION_EVENT_CTL (4U * 16U + 14U)
121#define K_ICM20948_DMP_DATA_RDY_STATUS (8U * 16U + 10U)
122#define K_ICM20948_DMP_ODR_QUAT6 (10U * 16U + 12U)
123#define K_ICM20948_DMP_ODR_QUAT9 (10U * 16U + 8U)
124#define K_ICM20948_DMP_ODR_GYRO (11U * 16U + 10U)
125#define K_ICM20948_DMP_ODR_CPASS (11U * 16U + 6U)
126#define K_ICM20948_DMP_ODR_ACCEL (11U * 16U + 14U)
127#define K_ICM20948_DMP_CPASS_TIME_BUFFER (29U * 16U + 8U)
128#define K_ICM20948_DMP_GYRO_SF (19U * 16U)
129#define K_ICM20948_DMP_ACC_SCALE (30U * 16U)
130#define K_ICM20948_DMP_FIFO_WATERMARK (31U * 16U + 14U)
131#define K_ICM20948_DMP_BAC_RATE (48U * 16U + 10U)
132#define K_ICM20948_DMP_B2S_RATE (48U * 16U + 8U)
133#define K_ICM20948_DMP_ACCEL_ONLY_GAIN (16U * 16U + 12U)
134#define K_ICM20948_DMP_ACC_SCALE2 (79U * 16U + 4U)
135#define K_ICM20948_DMP_CPASS_MTX_00 (23U * 16U)
136#define K_ICM20948_DMP_CPASS_MTX_01 (23U * 16U + 4U)
137#define K_ICM20948_DMP_CPASS_MTX_02 (23U * 16U + 8U)
138#define K_ICM20948_DMP_CPASS_MTX_10 (23U * 16U + 12U)
139#define K_ICM20948_DMP_CPASS_MTX_11 (24U * 16U)
140#define K_ICM20948_DMP_CPASS_MTX_12 (24U * 16U + 4U)
141#define K_ICM20948_DMP_CPASS_MTX_20 (24U * 16U + 8U)
142#define K_ICM20948_DMP_CPASS_MTX_21 (24U * 16U + 12U)
143#define K_ICM20948_DMP_CPASS_MTX_22 (25U * 16U)
144#define K_ICM20948_DMP_GYRO_FULLSCALE (72U * 16U + 12U)
145#define K_ICM20948_DMP_ACCEL_ALPHA_VAR (91U * 16U)
146#define K_ICM20948_DMP_ACCEL_A_VAR (92U * 16U)
147#define K_ICM20948_DMP_ACCEL_CAL_INIT (94U * 16U + 4U)
148#define K_ICM20948_DMP_B2S_MTX_00 (208U * 16U)
149#define K_ICM20948_DMP_B2S_MTX_01 (208U * 16U + 4U)
150#define K_ICM20948_DMP_B2S_MTX_02 (208U * 16U + 8U)
151#define K_ICM20948_DMP_B2S_MTX_10 (208U * 16U + 12U)
152#define K_ICM20948_DMP_B2S_MTX_11 (209U * 16U)
153#define K_ICM20948_DMP_B2S_MTX_12 (209U * 16U + 4U)
154#define K_ICM20948_DMP_B2S_MTX_20 (209U * 16U + 8U)
155#define K_ICM20948_DMP_B2S_MTX_21 (209U * 16U + 12U)
156#define K_ICM20948_DMP_B2S_MTX_22 (210U * 16U)
159#define K_ICM20948_MAG_WR_ADDR 0x0CU
160#define K_ICM20948_MAG_RD_ADDR 0x8CU
161#define K_ICM20948_MAG_CTRL_2 0x31U
164#define K_ICM20948_REG_ACCEL_X_H 0x2DU
165#define K_ICM20948_REG_ACCEL_X_L 0x2EU
166#define K_ICM20948_REG_ACCEL_Y_H 0x2FU
167#define K_ICM20948_REG_ACCEL_Y_L 0x30U
168#define K_ICM20948_REG_ACCEL_Z_H 0x31U
169#define K_ICM20948_REG_ACCEL_Z_L 0x32U
170#define K_ICM20948_REG_GYRO_X_H 0x33U
171#define K_ICM20948_REG_GYRO_X_L 0x34U
172#define K_ICM20948_REG_GYRO_Y_H 0x35U
173#define K_ICM20948_REG_GYRO_Y_L 0x36U
174#define K_ICM20948_REG_GYRO_Z_H 0x37U
175#define K_ICM20948_REG_GYRO_Z_L 0x38U
176#define K_ICM20948_REG_MAGNETO_X_L 0x3CU
177#define K_ICM20948_REG_MAGNETO_X_H 0x3DU
178#define K_ICM20948_REG_MAGNETO_Y_L 0x3EU
179#define K_ICM20948_REG_MAGNETO_Y_H 0x3FU
180#define K_ICM20948_REG_MAGNETO_Z_L 0x40U
181#define K_ICM20948_REG_MAGNETO_Z_H 0x41U
SPP GPIO HAL API — dispatches through the registered HAL port.
const SPP_SERVICE_ProducerContract_t * SPP_SERVICES_ICM20948_getProducerContract(void)
Returns a pointer to the ICM20948 producer contract.
ICM20948_RegBank_t
ICM20948 register bank selector.
ICM20948_AccelFsSel_t
Accelerometer full-scale range selection.
@ K_ICM20948_ACCEL_FS_16G
ICM20948_GyroFsSel_t
Gyroscope full-scale range selection.
@ K_ICM20948_GYRO_FS_2000DPS
@ K_ICM20948_GYRO_FS_500DPS
@ K_ICM20948_GYRO_FS_1000DPS
@ K_ICM20948_GYRO_FS_250DPS
ICM20948_ClockSel_t
Clock source selection for PWR_MGMT_1.
@ K_ICM20948_CLK_INTERNAL_20MHZ
SPP module descriptor and registry API.
ICM20948 interrupt and GPIO context.
volatile spp_bool_t drdyFlag
spp_uint8_t fifoOverflowEn1
spp_uint8_t fifoOverflowEn0
spp_uint8_t fifoOverflowEn3
spp_uint8_t fifoOverflowEn2
spp_uint8_t disableAccelZ
spp_uint8_t disableAccelY
spp_uint8_t disableAccelX
Parsed sensor sample from the DMP FIFO.
ICM20948 sensor instance.
ICM20948_SensorData_t lastData
Context passed to the GPIO ISR handler.
Describes the contract of a producer module. This module needs to have:
Portable integer types and SPI/storage configuration types for SPP.
ACCEL_CONFIG_2 register bit layout.
ACCEL_CONFIG register bit layout.
REG_BANK_SEL register bit layout.
DMP_INT_STATUS register bit layout.
FIFO_CFG register bit layout.
FIFO_EN_1 register bit layout.
FIFO_EN_2 register bit layout.
FIFO_MODE register bit layout.
FIFO_RST register bit layout.
GYRO_CONFIG_1 register bit layout.
HW_FIX_DISABLE register bit layout.
I2C_MST_CTRL register bit layout.
I2C_MST_ODR_CONFIG register bit layout.
I2C_SLVx_ADDR register bit layout.
I2C_SLVx_CTRL register bit layout.
INT_ENABLE_2 register bit layout.
INT_ENABLE register bit layout.
INT_STATUS register bit layout.
LP_CONFIG register bit layout.
PWR_MGMT_1 register bit layout.
PWR_MGMT_2 register bit layout.
SINGLE_FIFO_PRIORITY_SEL register bit layout.
USER_CTRL register bit layout.