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

Problem getting SparkFun VR BNO080 working with the Portenta #80

Open
cvoalex opened this issue Mar 7, 2021 · 27 comments
Open

Problem getting SparkFun VR BNO080 working with the Portenta #80

cvoalex opened this issue Mar 7, 2021 · 27 comments

Comments

@cvoalex
Copy link

cvoalex commented Mar 7, 2021

I can't for the life of me get this working I am using the new Portenta H7 and and trying to run the samples for the BNO080.
I am using the Qwiic Cable - Breadboard Jumper (4-pin) to connect to the Portenta.

I get the following:
18:40:29.452 -> BNO080 Read Example
18:40:30.352 -> BNO080 not detected at default I2C address. Check your jumpers and the hookup guide. Freezing...

I have multiple IMUs all with the same issue. I checked the cables. Added the delay and flushed the buffer. I also did the sample I2C scanner and it see the address.

Any ideas?

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 7, 2021

Hi @cvoalex ,
Do you have another 3.3V Arduino board you can try - with a different processor?
I'm worried that this might be the same as issue #72 where the BNO080 refuses to play nicely with the Artemis (Apollo3) on I2C.
Try setting the I2C clock frequency to 400kHz - that helps...
Let me know how you get on,
Paul

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 7, 2021

More info about compatibility problems here:
SAMD21: https://forum.sparkfun.com/viewtopic.php?p=223687#p223687

@cvoalex
Copy link
Author

cvoalex commented Mar 7, 2021 via email

@cvoalex
Copy link
Author

cvoalex commented Mar 7, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 7, 2021

Hi @cvoalex ,
I suspect you could end up going down a rabbit hole here...
If you have an (inexpensive) logic analyzer you can look at the I2C traffic and try and work out what is going on. But brace yourself for weirdness. I spent hours looking at the Artemis (Apollo3) issue and couldn't solve it. It crashes the Apollo3 I2C hardware at a very low level causing it to timeout. You see normal bus traffic and then it just stops dead with no clues as to why...
I'll leave this issue open for a while in case anyone else can help.
All the best,
Paul

@cvoalex
Copy link
Author

cvoalex commented Mar 7, 2021 via email

@cvoalex
Copy link
Author

cvoalex commented Mar 7, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 7, 2021

Hi Alex,
So have you tried Adafruit's library? Does it work on your Portenta?
Thanks,
Paul

@cvoalex
Copy link
Author

cvoalex commented Mar 7, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 7, 2021

Hi Alex,
Perfect- thanks! I might stand a chance of debugging it now - if the same hardware works with the Adafruit library but doesn’t work with the SF version.
All the best,
Paul

@cvoalex
Copy link
Author

cvoalex commented Mar 7, 2021 via email

@cvoalex
Copy link
Author

cvoalex commented Mar 8, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 8, 2021

Hi Alex,
If you're familiar with GitHub (Git) branches, can you please pull or download the release_candidate branch and give it a try?
I've made some changes there and it now seems to start reliably on Artemis using I2C. I'd be very interested to see if it works on Portenta too.
Many thanks!
Paul

@cvoalex
Copy link
Author

cvoalex commented Mar 9, 2021 via email

@cvoalex
Copy link
Author

cvoalex commented Mar 26, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 26, 2021

Hi Alex,
Are there any clues about where the Portenta goes into panic? Can you trace it to a line of code? (I'm wondering if I have done something silly like doing a debug print when the debug serial port has not been specified.)
The BNO does work fine on SPI on a RedBoard, but you do need to follow the instructions carefully. Please check you have closed the PS1 jumper and have opened both sides of the the I2C jumper.
https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library/blob/master/examples/SPI/Example1-RotationVector/Example1-RotationVector.ino#L20-L36
Cheers,
Paul

@cvoalex
Copy link
Author

cvoalex commented Mar 26, 2021 via email

@cvoalex
Copy link
Author

cvoalex commented Mar 27, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 27, 2021

Hi Alex,
Your image didn't make it through. Which SPI jumpers?
Thanks,
Paul

@adamgarbo
Copy link

Interesting that the STM32H747 experiences the same I2C issues with the BNO080. I had thought it supported clock-stretching out of the box. So far, the only processor I've had complete success using with the BNO080 is Nordic's nRF52480.

If I recall correctly, wasn't the reason for the BNO085 update specifically because of SPI-related issues?

I'm tempted to try to use the BNO080 over serial, but I worry it's just another rabbit-hole.

@cvoalex
Copy link
Author

cvoalex commented Mar 27, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 28, 2021

Thanks Alex,
Please try clearing the solder from the ADR split pad. ADR is connected to the SI (SPI In) pin. The solder will be holding the line low.
If this works - and I'm sure it will - I'll add a note about it in the SPI examples.
Best wishes,
Paul

@cvoalex
Copy link
Author

cvoalex commented Mar 28, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Mar 28, 2021

No problem Alex,
When you get back, please try the release_candidate branch again on Portenta. I had made a silly mistake with the debug prints...
9e983de
Fixed now.
Many thanks for your help and patience,
Paul

@cvoalex
Copy link
Author

cvoalex commented Apr 1, 2021 via email

@PaulZC
Copy link
Collaborator

PaulZC commented Apr 1, 2021

Thanks Alex,
Unfortunately I don't have a Portenta...
Has the Portenta "panic" gone away? What error do you see now?
Thanks,
Paul

@cvoalex
Copy link
Author

cvoalex commented Apr 1, 2021 via email

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