richardgedwards / guava

MIT License
1 stars 0 forks source link

Implement Interrupt Service Routine (ISR) #4

Open richardgedwards opened 3 years ago

richardgedwards commented 3 years ago

Implement an interrupt service routine to read data from the ICM20948 instead of pulling data.

rkedward commented 3 years ago

Hardware reference

IMU breakout board: https://www.adafruit.com/product/4554

image

image

rkedward commented 3 years ago

IMU Interrupt configuration

Datasheet for the IMU ICM-20948 9-DoF: https://invensense.tdk.com/wp-content/uploads/2016/06/DS-000189-ICM-20948-v1.3.pdf

4.18 INTERRUPTS
Interrupt functionality is configured via the Interrupt Configuration register. Items that are configurable include the
INT pin configuration, the interrupt latching, and clearing method, and triggers for the interrupt. Section 5 provides a
summary of interrupt sources. The interrupt status can be read from the Interrupt Status register.

See section 7.1 page 32 for bank 0 configuration. The interrupts are configured in bank 0 register map starting address 15 (0x0F) to ending address 28 (0x1C). Each address is a 1 byte (8 bits) register. Starting on page 38 explains each bit for each register.

image

Address Reset Value Config Value
15 0x00 ??
17 0x00 ??
18 0x00 ??
19 0x00 ??
20 0x00 ??
21 0x00 ??
22 0x00 ??
23 0x00 ??
24 0x00 ??
25 0x00 ??
26 0x00 ??
27 0x00 ??
28 0x00 ??