I found the other half of the solution today. The first half as I mentioned was having another thread be a middle man for data since, for some reason I still can't explain, I was having delays in the hundreds of seconds running the exact same code but running it on the worker thread instead of the dedicated data handling thread.
For some reason the code to query the IMUs status wasnt working properly. It just reads a register and when the IMU is booted it will match the register value with a constant for ready state, otherwise it'll loop back and do it again. It's a while loop with a single condition. Only it wasn't working. So I added a 2 second delay at the top of the IMU thread, to make sure it started up, and now it works just fine.
Optimization level issues
-
- XCore Addict
- Posts: 129
- Joined: Wed May 11, 2016 3:50 pm
-
- XCore Legend
- Posts: 1126
- Joined: Thu May 27, 2010 10:08 am
Good to hear! Thanks for sharing the root cause.and now it works just fine.