Hello,
I'm trying to drive a MPU-6050 using the embedded MotionDriver 5.1. I configured the device as in the end. When I call the function dmp_read_fifo to read the quaternion, I have only half a chance to get the correct data. Moreover, I can never detect a tap with these configurations. In the function decode_gesture, the (gesture[1] & INT_SRC_TAP) is always 0. Can you please help me with this issue? I don't know if it comes from my configuration or the hardware. Thank you.
Yijun
Here are my codes of configuration:
test_error = mpu_init(&int_param);
test_error = mpu_set_sensors(INV_XYZ_GYRO | INV_XYZ_ACCEL);
test_error = mpu_configure_fifo(INV_XYZ_GYRO | INV_XYZ_ACCEL);
test_error = mpu_set_sample_rate(DEFAULT_MPU_HZ);
memset(&hal, 0, sizeof(hal));
hal.sensors = ACCEL_ON | GYRO_ON;
hal.report = PRINT_QUAT | PRINT_ACCEL | PRINT_GYRO;
test_error = dmp_load_motion_driver_firmware();
test_error = dmp_set_orientation(
inv_orientation_matrix_to_scalar(gyro_orientation));
test_error = dmp_register_tap_cb(tap_cb);
hal.dmp_features = DMP_FEATURE_6X_LP_QUAT | DMP_FEATURE_TAP |
DMP_FEATURE_SEND_RAW_ACCEL | DMP_FEATURE_SEND_CAL_GYRO | DMP_FEATURE_GYRO_CAL;
test_error = dmp_enable_feature(hal.dmp_features);
test_error = dmp_set_fifo_rate(DEFAULT_MPU_HZ);
test_error = mpu_set_dmp_state(1);
hal.dmp_on = 1;
- Log in to post comments
phpbb Topic ID
15324
Re: Re: Initialisation issue for MotionDriver 5.1
In fact, there's always an overflow of fifo when I get the incorrect data. I tried to change the fifo rate but this didn't solve the problem.
Re: Re: Initialisation issue for MotionDriver 5.1
Always no reply? Have you done any changes in the device to make it compatible with some new features of the MotionDriver 5.1, just as the tap detection?
Re: Re: Initialisation issue for MotionDriver 5.1
Sorry for the delay in response. Your start-up configuration appears correct. The motionDriver example is set up for MPU-9150, which is an equivalent to the MPU-6050. You should not have to change configuration registers provided in the example.
The tap detection is a feature of the DMP peripheral on chip, which calculates when a tap occurs. Your bringup again, looks correct.
What platform are you bringing this up on?
Re: Re: Initialisation issue for MotionDriver 5.1
@sectionsbest wrote:
I'am using AVR32 platform. It works well with your Embedded MotionApps v2.02. But now we want to improve our old product by optimizing the software and develop a new product using the MPU-9150. So it will be helpful for us if the new motionDriver5.1 works well too in our platform.
Re: Re: Initialisation issue for MotionDriver 5.1
Do you have a solution for this issue?
Re: Re: Initialisation issue for MotionDriver 5.1
The overflow on fifo should not be occuring, but your bringup appears correct. We may not have enough information to resolve the problem for you, but I would recommend to track down the FIFO state when reading, to verify that the device is always being read correctly. A cause might be the processing power of the microcontroller, may not be able to handle the code quickly enough to process all of the fifo data. you could try to reduce the quaternion reporting rate.