Jump to content
I2Cdevlib Forums

Recommended Posts

I've been playing with the 4.1 library.  Thank you very much by the way.

 

After a varying amount of time it stops producing data packets.  Some times it's as short as 10 seconds, sometimes it's 10s of minutes. 

 

The 2.0 library doesn't hang like this.

 

Am I the only one, or have others seen this?  Any thoughts on what this might be?

 

Link to comment
Share on other sites

And I'll follow up immediately to say.

 

I did some some printf() debuging in the "other program behavior stuff"  (run) loop and found that after some time the fifo overflowed and then the run loop stopped being entered.  I'm not sure which condition was causing to be skipped, I'm assuming it was the length condition.  After some additional time it would stop.

 

Again I don't know where it stopped and why.  There were no loops in loop() that didn't output something and the only path through loop() that didn't produce output was the "if (!dmpReady) return;" line at the top.  Perhaps in the library there was a stuck loop.

 

I added a loop "    while (fifoCount) {" around the main body of loop() and while I haven't caught it having to process more than one packet I also haven't seen it stop transmitting.  

 

Is this magical thinking on my part or a real fix?   We'll find out in a couple hours of running I guess.
Link to comment
Share on other sites

  • 4 weeks later...

Hi @rreay,

 

Sorry for the long delay; I've been swamped with work and traveling a lot. In your tests, can you verify that whatever is causing the problem, the issue has to do with the FIFO overflowing? So as long as the FIFO is fine, then it continues, but when it overflows, that's what breaks the loop? I recall from earlier tests that the FIFO check loop as written wasn't bullet-proof.

Link to comment
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...