CPARKTX Posted August 16, 2014 Report Share Posted August 16, 2014 The demo DMP sketch continually locks up after anywhere between 3-20 seconds into running. The demo code is unmodified in any way other than commenting out a few of the #define's to limit the output. I get no errors and no FIFO overflows, results appear on the serial monitor...but then the program just hangs. I have a clean setup here...nothing else attached to the Arduino. Suggestions?? Quote Link to comment Share on other sites More sharing options...
CPARKTX Posted August 22, 2014 Author Report Share Posted August 22, 2014 I was never able to solve this issue (demo DMP code randomly locks up), but I rewrote the code to repeatedly poll on its own without using the interrupt and that works flawlessly, no FIFO overflows or lock ups Quote Link to comment Share on other sites More sharing options...
ilane Posted September 6, 2014 Report Share Posted September 6, 2014 Hi, I experience the same problem. Would you, kindly, share the rewritten code that does not use interrupts? BTW, being totally new to this forum, I don't know how you would do that. In case my email address is required I will gladly give it. Cheers Quote Link to comment Share on other sites More sharing options...
CPARKTX Posted September 8, 2014 Author Report Share Posted September 8, 2014 Hi, I experience the same problem. Would you, kindly, share the rewritten code that does not use interrupts? BTW, being totally new to this forum, I don't know how you would do that. In case my email address is required I will gladly give it. Cheers Sure, he is sample code rewritten for rapid polling of the DMP with no interrupt. Just call it at least as often as the DMP outputs data (which you can set by editing the Motion_Apps header file). In a test sketch I had this working at 100 Hz with no errors, and in my full project have it working at 20 Hz reliably with no FIFO errors and stable data. MPU6050_DMP_Polling.txt Quote Link to comment Share on other sites More sharing options...
ggallant Posted September 21, 2014 Report Share Posted September 21, 2014 I am experiencing the same problem. My setup is 3.3V at 8MHz. Serial.print appears to be a contributing factor. I have been dumping the fifoCount variable and if it stays at 0 all is ok. Sometimes it starts higher and we get a "FIFO Overflow!" message and then it resumes ok. Other times the fifoCount grows and then nothing. Both Arduino and MPU6050 are new to me. Have some MPU's with voltage regulators on order to try with a faster CPU. I am wondering if the mpuInterrupt flag and while loop are at fault. If there are multiple messages available we should get them all so as to catche up the the device. Looks to me that we never eat more than packetSize element per interrupt. Quote Link to comment Share on other sites More sharing options...
ggallant Posted September 21, 2014 Report Share Posted September 21, 2014 I forgot to mention that I am also occasionally locking up during the I2C Initialization. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.