Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2d DHI corrector causes program to get stuck in start up #5

Open
SethEArnold opened this issue May 10, 2021 · 6 comments
Open

2d DHI corrector causes program to get stuck in start up #5

SethEArnold opened this issue May 10, 2021 · 6 comments

Comments

@SethEArnold
Copy link

I'm using the Dragonfly board and everything works fine with the 3d DHI correction or no DHI correction but when I enable 2d DHI correction it gets stuck during the initialization steps.

The serial debug output looks like this:

Scanning...
I2C device found at address 0x57!
I2C scan complete

Initializing USFSMAX_0...
USFSMAX_0:

Configuring the coprocessor...

Fusion status: 0

USFSMAX sensor fusion running!


USFSMAX Sensor Status: 0 (Should be 0)

Coprocessor configured! Reading sensor calibrations...

And then it hangs forever.

@gregtomasch
Copy link
Owner

Hi Seth,

I have never seen this before... A few questions:

  1. Do you have more than one unit? If so, do both units do this?
  2. How are you connecting to the USFSMAX board? Soldered connections or with mechanical push-in machine header pins?
  3. Approximately when did you purchase this unit?

Best Regards,
Greg

@SethEArnold
Copy link
Author

  1. My group got a few boards. After some testing I was able to confirm that this works correctly on at least 2 other boards and only the one I was using for testing isn't working.
  2. Soldered connection.
  3. About 3 weeks ago.

Thanks for the help, seems this isn't a software issue so I'll close the issue.

@SethEArnold
Copy link
Author

This afternoon when I went to do some tests with these boards I found that when I reset the DHI correction the previously working boards stopped working with 2D DHI correction. So I guess this issue actually still exists I just hadn't noticed it earlier when I did my brief tests with the other boards.

@SethEArnold SethEArnold reopened this May 18, 2021
@gregtomasch
Copy link
Owner

Hi Seth, is this problem still on0going?

@Architeuthis-Flux
Copy link

I'm also have the same issue with both of the modules I bought recently (~2 months ago.) They worked at first but it seems after a few 2D DHI resets, it hangs as soon as I write 0x50 to the Calibration Request register. I2C stops and doesn't work again until a power cycle. But, it works fine if I write 0x10 for 3D DHI.

Oddly, I tried settling the MSB that's marked in the register map as N/A and writing 0xD0 and that worked a few times but then stopped working after roughly the same number of times that the original 0x50 worked.

It's going in a car so 3D DHI probably won't work. Let me know if you can think of a workaround or if you'd like me to test things and tell you the results.

Thanks!

@Architeuthis-Flux
Copy link

After some throwing some code against the wall and seeing what sticks, I think I may have found the issue.

It seems like enabling the 2D DHI at startup without a current valid HI offset in memory is what's causing it to hang. Not sure why the 2D DHI checks for this while the 3D DHI doesn't.

The workaround I just found is to upload the code with the 3D DHI enabled, reset the DHI and get a valid offset, then upload the code again with 2D DHI enabled and then reset DHI again to get a valid 2D offset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants