Hi, I'm using the MotionDriver SDK version 5.1, and setting the DMP on, setting the DMP to interrupt in CONTINUOUS mode with no other interrupts, and then setting the FIFO rate to 20hz and I'm still getting interrupts on the interrupt pin at a frequency of 200hz, with the interrupt status flag set to: 0x0103 (which would be correct), except that only 1 out of every 10 times I try and read the FIFO stream is there a payload. If I up the FIFO rate to 200hz, then I get a payload every time I try and read the FIFO stream. So, everything is looking right except that when I'm in 20hz FIFO mode, why am I still getting interrupts triggered on that pin 200 times a second?
The specific problem I'm trying to solve is that I expect to get 20 interrupts a second when the fifo is configured to 20hz, not 200 interrupts a second. My setup is pretty standard, but I've pasted it below anyway.
/* Wake up all sensors. */
mpu_set_sensors(INV_XYZ_GYRO | INV_XYZ_ACCEL);
/* Push both gyro and accel data into the FIFO. */
mpu_configure_fifo(INV_XYZ_GYRO | INV_XYZ_ACCEL);
mpu_set_sample_rate(200);
/* Read back configuration in case it was set improperly. */
mpu_get_sample_rate(&gyro_rate);
mpu_get_gyro_fsr(&gyro_fsr);
mpu_get_accel_fsr(&accel_fsr);
memset(&hal, 0, sizeof(hal));
hal.sensors = ACCEL_ON | GYRO_ON;
hal.report = PRINT_QUAT;
if(0!=dmp_load_motion_driver_firmware()) blink_red_FATAL();
dmp_set_orientation(inv_orientation_matrix_to_scalar(gyro_orientation));
hal.dmp_features = DMP_FEATURE_6X_LP_QUAT
| DMP_FEATURE_SEND_RAW_ACCEL;
if(0!=dmp_enable_feature(hal.dmp_features)) blink_red_FATAL();
if(0!=dmp_set_fifo_rate(20)) blink_red_FATAL();
if(0!=dmp_set_interrupt_mode(DMP_INT_CONTINUOUS)) blink_red_FATAL();
mpu_set_dmp_state(1);
hal.dmp_on = 1;
- Log in to post comments
phpbb Topic ID
15921