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: PodmanH7 FC board target #27086

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

Conversation

burgeruser
Copy link
Contributor

@burgeruser burgeruser commented May 17, 2024

A new flight controller (PodmanH7).
We added a board definition file and etc.

ardupilot_wiki

Thank you.

# we can automatically update the IOMCU firmware on boot. The format
# is "ROMFS ROMFS-filename source-filename". Paths are relative to the
# ardupilot root.
ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_f103_8MHz_lowpolh.bin
Copy link
Collaborator

Choose a reason for hiding this comment

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

if you have an f103 and don't have level shifters then you can also support the iomcu bdshot feature. Please see the Pixhawk6X hwdef for an example

Copy link
Collaborator

Choose a reason for hiding this comment

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

It requires providing an extra iomcu firmware

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you.
I have an f103 with 8Mhz IOMCU.And don't have level shifters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have finished build iofirmware_f103_8MHz_dshot_lowpolh iomcu firmware.
#27087

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if you have an f103 and don't have level shifters then you can also support the iomcu bdshot feature. Please see the Pixhawk6X hwdef for an example

My local testing on this computer has resulted in no issues.
I must wait for Pull Request (PR) number 27087 to merge into the master branch before making changes; otherwise, the compilation will fail.

To integrate this code snippet correctly, it should be appended at the end of the hwdef.dat file.

  # enable support for dshot on iomcu
  ROMFS io_firmware_dshot.bin Tools/IO_Firmware/iofirmware_f103_8MHz_dshot_lowpolh.bin
  define HAL_WITH_IO_MCU_BIDIR_DSHOT 1

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label May 17, 2024
@burgeruser burgeruser requested a review from andyp1per May 25, 2024 12:45
@Hwurzburg Hwurzburg self-requested a review May 25, 2024 13:07
@burgeruser
Copy link
Contributor Author

I have completed testing and it works well.

20240525211533

Due to the inclusion of default parameters, after reflashing the firmware, only a six-axis accelerometer calibration is required for normal unlocking.

20240525211727

The flight controller was tested by utilizing the 8 outputs from the IOMCU in DShot format, and it demonstrated stable and reliable performance during test flights with an octocopter setup.

@burgeruser
Copy link
Contributor Author

After a careful compilation on my computer, I successfully tested with the Podman H7 flight controller using the iomcu output for the 8-channel DShot signal on an octocopter. The results were flawless, allowing for proper motor speed feedback.
I have recently recompiled the bootloader, opting for the stable version of Copter-4.5.2.

test

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

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

You need to remove the merge commits.

Many of the settings you have in defaults.parm can be moved to the hwdef - that is the common thing to do, but your board

@burgeruser burgeruser force-pushed the new-ChibiOS-Board-podmanH7 branch 2 times, most recently from 6ef3ade to 2ca3f99 Compare May 29, 2024 01:06
@burgeruser burgeruser requested a review from andyp1per May 29, 2024 01:07
@andyp1per
Copy link
Collaborator

You now need to split the commits across subsystems - use Tools/gittools/git-subsystems-split

@@ -0,0 +1,36 @@
# Now setup the default battery pins driver analog pins and default
SERIAL0_BAUD 460
SERIAL1_BAUD 115
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can do these with define DEFAULT_SERIALx_BAUD y etc in hwdef - please don't define the ones that have the right defaults

SERIAL6_BAUD 460
SERIAL6_PROTOCOL 2

COMPASS_EXTERNAL 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should not change these - they should be down to the user.

COMPASS_EXTERN3 1
COMPASS_ORIENT 4

GPS_TYPE 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should not change these


GPS_TYPE 1
GPS_TYPE2 1
GPS_RATE_MS 100
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should not change these


BRD_SAFETY_DEFLT 0
FS_THR_ENABLE 0
ARMING_CHECK 10256
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should not change this

@burgeruser
Copy link
Contributor Author

burgeruser commented May 29, 2024

You now need to split the commits across subsystems - use Tools/gittools/git-subsystems-split

I've made the necessary changes, and after compiling, it successfully passed the tests on my own flight controller.

Thank you so much for your patience, It really shows your patience to guide me through all those submissions!

@burgeruser burgeruser requested a review from andyp1per May 29, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants