-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
Board support : Pixhawk Pro #6473
Conversation
@@ -63,6 +63,7 @@ class AP_BoardConfig { | |||
PX4_BOARD_PIXRACER = 4, | |||
PX4_BOARD_PHMINI = 5, | |||
PX4_BOARD_PH2SLIM = 6, | |||
PX4_BOARD_PIXHAWK_PRO = 7, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought 7 was used somewhere hidden which is why AEROFC moved up to 13? Need to double-check this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, 7 to 12 is occupied with VRBrain boards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is now corrected, thanks!
libraries/AP_Compass/AP_Compass.cpp
Outdated
AP_Compass_AK8963::name, false); | ||
// ADD_BACKEND(AP_Compass_LIS3MDL::probe(*this, hal.spi->get_device(HAL_COMPASS_LIS3MDL_NAME), | ||
// false, ROTATION_PITCH_180), | ||
// AP_Compass_LIS3MDL::name, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a rule, we don't like to add code that is commented out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also corrected.
Thank you very much for this, you've saved me a lot of time!
I haven't tried external i2c or any other peripherals yet. Great start though, thanks! |
we should also add this to travis |
Thanks!
|
@tridge There was an issue with DMA configuration that is now solved. LIS3MDL now gives correct output. Right now the SPI bus is used at 1 MHz, we could go up to 10 MHz according to the datasheet, I haven't tested yet. |
LIS3MDL now works correctly, I had to decrease SPI speed down to 500 KHz, otherwise there are constant communication errors on the first bit of OUT_XXX_L registers. The LIS3MDL sensor has an intrinsic bigger offset on Z axis, hence the MAX_OFFSET modification. Should we make this change specific to this sensor or let the modification for all compasses? |
I don't mind increasing that default to 850. |
I've done some commit msg cleanup to follow our coding guidelines, plus pushed the PX4Firmware and PX4NuttX changes |
looks like it breaks the build for px4-v1: error ARMV7M_PERIPHERAL_INTERRUPTS must be defined to the number of I/O interrupts to be supported |
I've updated your PR branch with a patch to PX4Firmware that fixes the FMUv1 build. Note that I only fixed the build, I haven't yet tested the build and run on FMUv1, FMUv2 and FMUv4. We'll need to carefully test all boards before merging. |
disable lis3mdl for now
Add SPI prescalers for 180 MHz and decrease LIS3MDL SPI speed
I've now done basic testing on FMUv1, FMUv2, FMUv4 and the v4pro |
I have found the bug with px4io on fmuv1. It is an existing bug, not related to this PR. It is caused by the way px4io update uses a uart instead of i2c for the update, and that uart is already registered in HAL_PX4. That is unique to the v1 boards. |
this PR fixes the FMUv1 problem: |
this has now been merged into master |
This pull request brings changes in order to use ArduPilot on Pixhawk Pro hardware. As this board uses a different processor (with more flash and RAM, but also different register definitions), it also needs subsequent changes in PX4NuttX and PX4Firmware : these two pull requests should be tested and validated before considering merging :
ArduPilot/archived-PX4NuttX#11
ArduPilot/archived-PX4Firmware#76