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

AP_HAL_ChibiOS: hwdef: ARK_FPV board support #28603

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dakejahl
Copy link
Contributor

@dakejahl dakejahl commented Nov 13, 2024

Adds board support for the ARK FPV.
https://arkelectron.com/product/ark-fpv-flight-controller/

Testing Checklist

From https://ardupilot.org/dev/docs/porting.html

  • the board boots and connects to a GCS via USB (Mission Planner, QGC, MAVProxy,etc.)
  • the GPS and Compass is recognized.
  • the RC is recognized and RC input follows the TX
  • the pitch and roll reports (ie HUD horizon) follows autopilot movement correctly (ie IMU is oriented properly and working). test each IMU individually using the INSx_USE parameters.
  • the board arms with default arming checks (may need to force arm if GPS is indoors)
  • attach a battery either directly if onboard power sensors or via external power module and make sure voltage is correctly displayed and current indication present
  • attach a test servo to each output after setting the output to a normal function like elevator, and exercise each one with TX while in MANUAL mode to check output functionality. Bdshot capable outputs should be tested with a BLHeli32 esc for passthrough mode communication (non-IOMCU outputs).
  • move the GPS to each UART output after setting all other UART protocols to NONE and the tested UART to GPS to assure the UART is functioning.
  • UARTs with CTS/RTS lines should use a telemetry radio with those connected to be sure they function with BRD_SERx__CTSRTS=1

From my own notes

  • FW upload on USB
  • FW upload on serial port (GPS)
  • Flash based params functional
  • Telem port test (mavlink)
  • GPS port test (mavlink)
  • RCIN port test (SBUS)
  • PWM 1-4 test (Bidir-DSHOT)
  • ESC Telem test
  • Analog current measurement (ESC pin CURR_IN)
  • CAN port test (DroneCAN via MAVCAN over USB)
  • VTX OSD port test (MSP Displayport)
  • PWM AUX (5 - 9) port test
    • Servo9 doesn't go back to 0 when disabled, it stays at the disarmed PWM value
  • SPI port test (SCH16T IMU AP_InertialSensor: Murata SCH16T IMU  #26876)
  • 12V ADC measurement

Requires

IIS2MDC compass driver PR
#28602

@dakejahl
Copy link
Contributor Author

dakejahl commented Nov 18, 2024

I want to reduce the clock speed to 320MHz to reduce heat but adding MCU_CLOCKRATE_MHZ 320 to the hwdef causes the build to fail. Any ideas?

From Andy

The only value supported is 480 on H7, its a way of raising the clockrate from the default of 400. bit of history the rev X&Y versions of the H7 had silicon bugs which meant they would only work at 400MHz, that's why its an option - and should only be used with rev V

@dakejahl dakejahl marked this pull request as draft November 21, 2024 20:27
@AlexKlimaj
Copy link
Contributor

Just built and flashed. Looks like it is working.

@dakejahl dakejahl force-pushed the pr-ark_fpv branch 2 times, most recently from cbfd219 to 20bfdc2 Compare December 10, 2024 18:51
@dakejahl dakejahl marked this pull request as ready for review December 10, 2024 18:56
@dakejahl dakejahl force-pushed the pr-ark_fpv branch 2 times, most recently from 20bfdc2 to f83ba71 Compare December 11, 2024 00:41
@dakejahl dakejahl marked this pull request as draft December 12, 2024 00:44
@dakejahl dakejahl marked this pull request as ready for review December 12, 2024 03:12
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
define HAL_IMUHEAT_P_DEFAULT 50
define HAL_IMUHEAT_I_DEFAULT 0.07
# TODO: should we use this?
# define HAL_IMU_TEMP_MARGIN_LOW_DEFAULT 5
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good practice to set an IMU temp low margin? Or just pre-arm annoyance?

@dakejahl
Copy link
Contributor Author

ESC Bidir DShot passthrough works using BIDIR on Channels 1 - 4
image

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Dec 13, 2024
@Hwurzburg Hwurzburg self-requested a review December 13, 2024 16:31
@Hwurzburg
Copy link
Collaborator

@dakejahl readme will need images of board with connectors labeled

@dakejahl
Copy link
Contributor Author

@dakejahl readme will need images of board with connectors labeled

@Hwurzburg I've added top/bottom images of the silkscreen which has the pin 1 indicator next to each connector
Screenshot from 2024-12-13 11-11-33

@Hwurzburg
Copy link
Collaborator

@dakejahl ping me when testing is complete and I will reveiw

@dakejahl
Copy link
Contributor Author

dakejahl commented Jan 3, 2025

@Hwurzburg testing is complete. I've uploaded a log of a flight test here.
https://drive.google.com/file/d/1FsKDafLm5o2UE7yZUbidiRbH3OhbslD0/view?usp=sharing

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should consider adding SD card to bootloader for SD card firmware updating

libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/README.md Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/defaults.parm Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat Outdated Show resolved Hide resolved
@dakejahl dakejahl requested a review from Hwurzburg January 7, 2025 23:04
@Hwurzburg Hwurzburg force-pushed the pr-ark_fpv branch 2 times, most recently from 4886d66 to f57d833 Compare January 9, 2025 17:56
@Hwurzburg
Copy link
Collaborator

@dakejahl I have made a few tweaks to the readme and squashed and library split into the form we need for merging...marked for devcall....still needs @andyp1per to give approval.

@dakejahl
Copy link
Contributor Author

dakejahl commented Jan 9, 2025

@Hwurzburg Thanks for that. Appreciate all of the help so far

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

Successfully merging this pull request may close these issues.

5 participants