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

auav-x21:Delete PX4_I2C_BUS_ONBOARD #7496

Merged
merged 2 commits into from
Jun 29, 2017
Merged

auav-x21:Delete PX4_I2C_BUS_ONBOARD #7496

merged 2 commits into from
Jun 29, 2017

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Jun 28, 2017

Continuation of #7487

I removed the onboard definition. @tubeme Please test this.

@tubeme
Copy link

tubeme commented Jun 28, 2017

@mhkabir @davids5 Sorry for the request, can you make me a binary for testing?

@davids5
Copy link
Member Author

davids5 commented Jun 28, 2017

@tubeme
Copy link

tubeme commented Jun 28, 2017

Thank you very much @mhkabir @davids5 @LorenzMeier

RESOLVED :) Everything works perfect. The external mag is now at "No Rotation"(not "Internal Mag"). We were able to change the CAL_MAG0_ROT to 180 yaw and back to 0 and it was correct. The internal compass is correct as well.

P.S. @davids5 Sorry but just want to understand what happened.

By deleting the
#define PX4_I2C_BUS_ONBOARD 1
You disabled the I2C2 bus??
If I want to enable both I2C1 and I2C2 buses do I have to change the line to:
#define PX4_I2C_BUS_ONBOARD 2

Is the I2C2 refered as Internal I2C?

Thanks again.

@mhkabir
Copy link
Member

mhkabir commented Jun 29, 2017

I don't have the schematics, but from the board config, I see that there is only 1 physical bus on the STM32 which is routed out to the connectors. I2C1 and I2C2 are just the connectors - that is irrelevant here. Some board have different physical buses routed to different I2C connectors, which is why we define PX4_I2C_BUS_ONBOARD ,PX4_I2C_BUS_EXTERNAL, etc.

For the X2.1, I think that I2C1 and I2C2 connectors are just bridged. Everything should work on both ports.

@mhkabir mhkabir merged commit fc25213 into master Jun 29, 2017
@mhkabir mhkabir deleted the master_auavx21 branch June 29, 2017 02:30
@davids5
Copy link
Member Author

davids5 commented Jun 29, 2017

For the X2.1, I think that I2C1 and I2C2 connectors are just bridged. Everything should work on both ports.

@mhkabir The short answer is: No they are not. The AUAV 2.1 HW only bring's out 1 i2c port I2C1 - I2C2 is not enabled on the HW config.

@tubeme - no.

The AUAV X2.1 not FMUv2 compatible at the HW level.

FMUv2 HW has 2 i2c buses I2C1 and I2C2 . One is internal, the other is external.

AUAV X2.1 only has one and it is external.

There reason the V2 FW "Ran" was because the init of I2C2 failed. So you only get one device instance of the MAG. But the mistake I made was to assigning the Internal bus to the External bus. So the init of was done 2 time on a working bus. (Boy that seems dumb now that I say it out loud) That gave you 2 instance of the MAG. My Bad! At the time I did not consider un-defining it. Because I thought the build would fail like it does when the external is undefined. I am sorry for the problem it caused.

@mhkabir
Copy link
Member

mhkabir commented Jun 29, 2017

Ah thanks for the clarification. Any specific reason why we don't enable I2C2?

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

Successfully merging this pull request may close these issues.

3 participants