Jump to content
I2Cdevlib Forums

No new fifo data after inital read with dmp


Recommended Posts

Hello,
 
My name is Robert, I'm a 3'rd year computer science student i i'm working on a bracelet using the MPU 6050 and PSOC 4 BLE chip.
I am in need of a bit of help as i have very little knowledge on programming hardware like this.
The problem i have is that the chip doesn't produce data.
So a standard run works like this:
 
1. it initializes ok, err is 0
2. fifo count and packet count = 42 dec, 2a hex but isDataReady is false first pass in the for loop so it skips the if
3. second pass in the for isDataReady is true so it processes the data (no new data in the fifo meanwhile, still 42)
4. reads the data from fifo into the buffer and outputs a quaternion, now fifo is empty
5. 3'rd pass fifo count still 0 and isDataReady is true
7. it gets trapped on line 144 at the while loop for reading the fifo count as 0 forever
 
And i have no idea why.
 
Some of the code for the dmp i translated myself from c++ but i'm pretty sure it's ok because i didn't modify the logic behind.
 
P.S. i have some random variables that i use for debugging around there and i know it's dirty but i'm just testing

main.c

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...
 Share

×
×
  • Create New...