-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Enable I2C2 bus of auav x21 #8138
Conversation
Enable the I2C2 bus of auav x2.1. This change came after a MAG registering 3 times on the I2C bus due to messed initialization script on the x21 board. We slightly moded the board so we could use the I2C2 bus but now there was no initialization of the bus.
@nkhoit can you review this? |
@tubeme How are you connecting to I2C2? It's not broken out to any header. |
We need to be careful with these defines. There are implications for internal/external buses that go beyond arbitrary naming.
Is there any LED on the regular auav/mRo x2.1? |
@dagar It is not arbitrary. You can see what are the changes introduced in #7496. I just reverse the changes with a small correction. This correction was one the reasons for not proper initialization of I2C thus registering the external Mag hmc5883 registering as 3 devices. The problem was rather at a different place. in the rc.sensors. Also the line the same as in FMUv2 driver script. The FMUv2 and auav are the same in terms of cpu thus with the same IOs. |
@tubeme Have you tested if this works on your hardware? I ran it on my X2.1 and nothing seemed too wrong. But it's not easy for me to check if I2C2 works. |
@nkhoit That was my point. I have no way to compile the px4. So if you could share the auav x21 binary that you compiled, I will flash it and test it with my hardware? I will appreciate it. Then I will report back here. And you are correct we have to edit the file you gave me... Without your proposal it will not enable the I2C2... |
You'll also need to add
to https://github.com/PX4/Firmware/blob/master/nuttx-configs/auav-x21/include/board.h |
Here's a binary file you can upload and try. auav-x21_PR8138.zip |
Hey @nkhoit I want to thank you very very much! It works perfect, the LEDs are showing the status :). I tried the firmware to un-moded X21 and it does not create a problem if there is no I2C2 connected. I checked carefully to see if there is going to be a problem with the Mag and Airspeed. Everything is perfect. Can this be added to the master? Otherwise we have to create this custom hack every time there is new version. |
Is this still wanted? |
Yes e want this. :) |
Can you verify this is harmless for a regular mRo X21? |
Hello @nkhoit can you please verify if there is no problem with this i2c2 enabled with regular AUAV X2.1 board. We test it and there are no problems... Thanks in advance |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is this still needed? |
@dagar Yes Daniel if possible? |
From what I see on the Schematic AUAV_X21_FMU_V2_R01 - 11/10/2017 PB10 is now used as KILL. What will happen for the users with something connected to KILL? @pkocmoud - is the above the "as shipped" Schematic? |
@davids5 - That snip is correct for the shipping x2.1 |
@davids5 - It is just a GPIO, the idea was for it to be connected to a power switch to allow the FC to disable the vehicle or deploy a independent recovery device in case of emergency. It did not seem to get much traction. To the best of my knowledge, nobody has ever used it nor suggested code to enable it. You can just treat it as an available IO pin. |
Needs to be rebased. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Enable the I2C2 bus of auav x2.1. This change came after a MAG registering 3 times on the I2C bus due to messed initialization script on the x21 board.
We slightly moded the board so we could use the I2C2 bus but now there was no initialization of the bus.