MPU-9250 Teensy Library

I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.
 
I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.

Hi Brian - thanks for making the change but no joy as they say.

I tested 3 MPU-9250 breakout boards I pick up off of ebay and amazon ( https://www.amazon.com/gp/product/B06XHJKR8C/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) all 3 work with your lib version I posted but fail at 2 different spots in the begin:
1. 1 fails at reading the MPU9250 whoAmI - gets 0x72 vs 0x73 or 0x75
and
2. The other 2 fail when it tries to enable I2C mode.

Will do a little more digging - in the middle of somthing that I want to finish before I forget what I had to do :)
 
I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.

Sorry for the late night reply - well - I got it working with one minor change on the T4.1 and T3.2 with one minor change but when I did some regression testing with an Uno or mega it failed - the old version did run with out issue on the UNO. So will go back to the drawing board but you may not like the approach I am going to take but if it works.
 
Hi Brian
Taking a break from my other distractions and just gave you latest library changes a try with one of those generic mpu-9250 boards and I am having problems. Haven't had a chance to debug yet but this is all I am getting with the Basic_SPI example:
Code:
IMU initialization unsuccessful

Now if I use the last version of the library I was using it works without an issue even at 600Mhz. I am attaching the version I have that works. As time permits will do some debugging.

@ora_jago you are free to give the version I just attached to see if it works - might help with the debugging.

hi mjs513 thanks for your sharing....it's work for me....
 
I just updated the library with an increased delayNanoseconds time, should hopefully be a little more robust now.

thanks for your support brian...

if I will increase the sampling rate to 4000 hz is it just by editing Register 29 – Accelerometer Configuration 2 into 0x08 and disable the gyrometer or adding new code?

// enable accelerometer and gyro
//if(writeRegister(PWR_MGMNT_2,SEN_ENABLE) < 0){
// return -6;
//}

// Disable gyro
if(writeRegister(PWR_MGMNT_2,DIS_GYRO) < 0){
return -6;
}


Thanks
 
The old emsensor boards modified to work with SPI.

Tested that board ("The old emsensor boards modified to work with SPI.") this morning and its working for me with your current lib. But if I use one of the ebay/amazon mpu-9250's thats when I run into problems.
 
Tested that board ("The old emsensor boards modified to work with SPI.") this morning and its working for me with your current lib. But if I use one of the ebay/amazon mpu-9250's thats when I run into problems.

I wonder if it's an issue with counterfeits?
 
Sorry was off doing errands - could be. I did check the markings but can't tell - the ones I have are marked correctly according the spec but I can not say for sure.
 
Back
Top