IMU3000 DMP Configuration

By angelo_lobo , 14 July 2011

All,

I am new to IMU3000 programming and am working on a program to access quaternion data on the DMP via the on-board FIFO. We are unable to use the API as-is because we are using a PIC18F25K22 host, and we run out of instruction memory or data memory when compiling in the API as-is with our routines for accessing the HW interfaces on the PIC device. We are trying to compare a simple test program we are writing to the API to get only the code snippets needed to initialize the device and read DMP data from the FIFO. At present, we follow the steps below. We are able to read gyro data from the FIFO when the GYRO output is enabled in the FIFO. This data matches the GYRO data we obtain when reading the sensor registers directly. When setting the FIFO to 0x0 similar to the configuration in the API (i.e., the API doesn't write MPUREG_FIFO_EN{1,2} and this register defaults to 0x00), we get fixed-pattern data in the FIFO and zero entries. It would seem that the DMP is on but not adding new entries to the FIFO. Are the following steps in the initialization sequence correct? From reading the userguide, the next step would appear to be to check the I2C_MST_ERR flag in the interrupt status register because the device may not be getting accelerometer data needed to calculate position to be placed in the FIFO.


// Clear Sleep and Standby Bits in Power Management
// Register (0x3E). Set CLK_SEL to 0x5
// (PLL with external 19.2MHz reference).

// Set Sample Rate Divider register to 0x7 to
// enable a sampling rate of 125 Hz or 8ms per sample.

// Set DLPF, Full Scale register to 0x05 to enable
// FS_SEL to be +/- 250 deg/sec and DLPF_CFG to
// 10Hz LPF and 10 kHz sample rate.

// Enable Accelerometer

// Set User Control Register (1 Write)
// Enable FIFO and AUX
// Reset AUX, DMP, FIFO, and GYRO

// Set FIFO Enable Register to 0x0

// Read User Control Register

// Force clear on FIFO. Read FIFO level, force FIFO reset,
// and continue until the length is zero.

// Save Start Address from DMP Registers 0x35 and 0x36.

// Load Start Address from DMP Registers 0x35 and 0x36.


// Enable and Reset DMP
// Set User Control Register to value
// read prior to FIFO clear cycle.

Gary

phpbb Topic ID
13659