I am using Motion Driver 6.12 package and I have ported it to NXP's LPC11U68 Xpresso board.
I am not able to get the MPL running due to failures: 1] NAK for reg_addr=0 AND 2] dmp_load_motion_driver_firmware() fails.
I tried with two units of MPU9150 and I am getting the same error, I am using the code from the STM32F4 board example.
I am also using Motion driver 6.12 package and tried to ported it Nordic Semiconductor platform.
I also fail to get the dmp run because the failure of dmp_load_motion_driver_firmware().
for (ii = 0; ii < length; ii += this_write) {
this_write = min(LOAD_CHUNK, length - ii);
if (mpu_write_mem(ii, this_write, (unsigned char*)&firmware[ii]))
return -1;
if (mpu_read_mem(ii, this_write, cur))
return -1;
if (memcmp(firmware+ii, cur, this_write))
return -2;
}
I found the read mem value is different with the write value.
I've solved the problem. I2c problem.
I am having a similar symptom. What did you change about I2C to fix your problem? My I2C appears to be working correctly, as the previous calls to setup the 9250 succeed, but the call to load the firmware to the dmp fails.
I also had i2c problem. There was a problem in the i2c read routine which was filling the read buffer starting from index 1 which was wrong.
On LPC Xpresso this should be the i2c_read function that MPL expects:
Hello,
I have the same issue than you lisaliu and i work with a Nordic too. What did you do about I2C please ?
Thank you.
Found, Nordic nRF5x does not accept I2C write with flash memory as source, you have to copy chunck in RAM then do I2C write.
It just fix I2C errors but read back is wrong...