MPU-9150 DMP registers

By ngnnoftt , 24 July 2013

Are the DMP registers mentioned in section 7.10 of the MPU-9150 product spec the same as the Gyro and Accel registers in the MPU-9150 Register Map and Descriptions document section 3?

guy_mcilroy

12 years 7 months ago

The Accel / Gyro data registers contain the result of the sensor AD conversion. The DMP is an on-chip peripheral which will compute on-chip 6 axis quaternions, once firmware is written to the device. It uses an internal memory bus to access the sensor data.

phpbb Post ID
23502

dfolz

12 years 6 months ago

how to put the accel and gyro bias into the DMP and how to read the calibration values back out of the DMP after the calibration completes.
am using concerto F28m35h52c1...i dont have any idea about DMP please help me...

phpbb Post ID
23505

habaibeh

12 years 6 months ago

If you have downloaded Embedded_MotionDriver_5.1.zip from the downloads section, you can find the motion_driver_test.c source file for initializing & configuring the ACCEL, GYRO & DMP as well.

...Embedded_MotionDriver_5.1simple_appsmsp430

This download also has CCS project. The MPU9150 library eMPL has good documentation of each function. Go through it. You can read & set the bias data for the accel & gyro with the available functions in eMPL.
Also download & read EmbeddedMotionDriver-APISpecification_pdf file.
inv_mpu.c : The following functions are from this source file.

static int accel_self_test(long *bias_regular, long *bias_st)
int mpu_set_accel_bias(const long *accel_bias)
static int gyro_self_test(long *bias_regular, long *bias_st)
static int get_st_biases(long *gyro, long *accel, unsigned char hw_test)
int mpu_run_self_test(long *gyro, long *accel)

inv_mpu_dmp_motion_driver.c : This following functions are from this source file.
int dmp_set_gyro_bias(long *bias)
int dmp_set_accel_bias(long *bias)
int dmp_enable_gyro_cal(unsigned char enable)

Example: Does the automatic bias calculation. Then puts the accel and gyro biases into the DMP. You must not move the sensor after the following piece of code is activated. Note that the sensor should be face-up or face-down position.

int result;
long gyro[3], accel[3];
result = mpu_run_self_test(gyro, accel);
/* Bit 2: Compass, Bit 1: Accel , Bit 0: Gyro */
if (result == 0x7) { // if result == 0x3, only gyro & accel bias calculation was successful.
/* Test passed. We can trust the gyro data here, so let's push it down
* to the DMP.
*/
float sens;
unsigned short accel_sens;
mpu_get_gyro_sens(&sens);
gyro[0] = (long)(gyro[0] * sens);
gyro[1] = (long)(gyro[1] * sens);
gyro[2] = (long)(gyro[2] * sens);
dmp_set_gyro_bias(gyro);
mpu_get_accel_sens(&accel_sens);
accel[0] *= accel_sens;
accel[1] *= accel_sens;
accel[2] *= accel_sens;
dmp_set_accel_bias(accel);
}
phpbb Post ID
23508
phpbb Topic ID
15477