altineller 4 Posted July 27, 2014 Share Posted July 27, 2014 Hello, I managed to port the MPU9150Lib at https://github.com/richards-tech/MPU9150Lib to Energia. I had to make few changes in defines in dmp code, and the provided CalLib, and now it compiles for MSP430G2553, MSP430F5xx, Stellaris Launchpad, and the Tiva-C series (TM4C123) launchpad. CalLib writes to either flash or eeprom depending on architecture. It has failed for MSP430G2553, due to code size. It compiles for MSP430F5xx although I dont have a board yet to test. I have not tested the stellaris launchpad but I suspect it works, it does WORK on the Tiva-C series launchpad. Here is the picture of the setup: On one side I have an arduino nano v3 connected to a MPU9150 module (The cheap GY 9150) and on the other side I have a Tiva-C series launchpad with a sensorhub booster pack. (that contains a MPU9150 as well) and I have hooked up a usbee logic analyzer to i2c (sda, scl) of both mcus For some reason, it is running slow on the TM4C123 then the arduino. It is supposed to work much faster on the Tiva-C launchpad, but on the contrary it does not. I measured mpu.read() times, and on Energia it wont go less then 50ms, where on arduino I have tested up to 200hz sensor read rates with no problem. Here are two screenshots from the logic analyzer: The top two signals are from arduino sda scl, the bottom is the sda(3) scl(3) of the Tiva-C The MPU9150 is configured to update at 20Hz for both systems. however the i2c bus activity seems quite different. I am thinking there might be a problem with the i2c speed on Energia, or that it works different. And finally here is my code: MPU9150LibEnergia.rar I will be posting all the code on github later - for now I made a zip file for all. Best Regards, Can jph6066 1 Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.