Skip to content

Conversation

@HAKRC8899
Copy link

@HAKRC8899 HAKRC8899 commented Dec 15, 2025

User description

User description

Added support for the HAKRCH743 flight control board.

Board hardware verification

Item Value
Board name HAKRCH743
Target ID HK743
MCU STM32H743
Base board Custom design
Max PWM outputs 12
LED Strip PA8 (TIM1_CH1)
Status LEDs PE3, PE4
Beeper PE9 (active low)
VBAT ADC PC0
Current ADC PC1
RSSI ADC PC5
UART count 8 + VCP

Folder Structure

src/main/target/HAKRCH743/
 ├── CMakeLists.txt
 ├── target.c
 └── target.h

Hardware Verification

  • Dual ICM42688 IMUs
  • **OSD is not working properly !!****(Betaflight can work properly!!)
  • SD card blackbox via SDIO (4-bit)
  • 12 motor outputs configured (PWM/DSHOT)
  • All 8 UARTs + VCP mapped and available
  • I2C peripherals (baro/mag) on separate buses
  • ADC inputs (VBAT/Current) operational
  • LED strip and beeper functional

Notes

  • Dual gyro configuration with IMU0 at 0° and IMU1 at 270° alignment
  • SBUS configured on UART7 by default
  • PinIO functionality available on PD10 and PD11
  • Blackbox logging to SD card enabled by default
  • Uses separate SPI buses for IMUs and OSD for optimal performance

Description

  • Adds support for HAKRCH743 STM32H743 flight controller board
  • Implements dual ICM42688 IMU configuration with independent SPI buses
  • Defines 12 PWM/DSHOT motor outputs with full timer utilization
  • Configures comprehensive I/O including 8 UARTs, I2C, SPI, ADC, and SDIO
  • Enables advanced features: OSD, blackbox, telemetry, LED strip, and PinIO

Problem Description

I have checked both the hardware and software parts and found no issues, but the OSD still does not work properly. Therefore, I would like to create this new task to seek help from the development team. I can provide all relevant materials, including test samples.

Before this, I created the related issue: Building the new HAKRCH743 target, OSD cannot function properly · Issue #11135 · iNavFlight/inav


PR Type

Enhancement


Description

  • Adds support for HAKRCH743 STM32H743 flight controller board

  • Configures dual ICM42688 IMU sensors on separate SPI buses

  • Defines 12 PWM/DSHOT motor outputs with timer configuration

  • Implements comprehensive I/O: 8 UARTs, dual I2C, SPI, ADC, SDIO

  • Enables OSD, blackbox logging, LED strip, and PinIO features


Diagram Walkthrough

flowchart LR
  A["HAKRCH743<br/>STM32H743"] --> B["Dual IMU<br/>ICM42688"]
  A --> C["12 PWM<br/>Outputs"]
  A --> D["8 UARTs<br/>+ VCP"]
  A --> E["OSD<br/>MAX7456"]
  A --> F["Blackbox<br/>SDIO"]
  A --> G["Sensors<br/>Baro/Mag"]
Loading

File Walkthrough

Relevant files
Configuration changes
target.h
Complete hardware configuration and pin definitions           

src/main/target/HAKRCH743/target.h

  • Defines board identifier HK743 and USB product string
  • Configures three SPI buses (SPI1, SPI3, SPI4) with respective pins
  • Sets up dual I2C buses for barometer and magnetometer
  • Defines dual ICM42688 IMU configuration with CW0 and CW270 alignments
  • Configures MAX7456 OSD on SPI3 bus
  • Maps all 8 UART ports plus VCP with pin assignments
  • Configures ADC channels for VBAT, current, and RSSI measurements
  • Enables LED strip, SDIO blackbox, and PinIO functionality
  • Sets default features including OSD, telemetry, and blackbox logging
+178/-0 
target.c
Timer hardware and IMU bus device registration                     

src/main/target/HAKRCH743/target.c

  • Registers ICM42688 IMU on SPI1 bus with CS pin PC15
  • Defines 12 timer hardware entries for motor PWM outputs
  • Configures TIM5 for outputs S1-S4 on PA0-PA3
  • Configures TIM4 for outputs S5-S8 on PD12-PD15
  • Configures TIM15 for outputs S9-S10 on PE5-PE6
  • Configures TIM3 for outputs S11-S12 on PB0-PB1
  • Assigns TIM1 CH1 for LED strip on PA8
  • Assigns TIM1 CH1 for beeper on PE9
+51/-0   
config.c
Target-specific configuration initialization                         

src/main/target/HAKRCH743/config.c

  • Implements targetConfiguration() function for board-specific setup
  • Configures PinIO box permanent IDs for USER1 and USER2 functions
+28/-0   
CMakeLists.txt
Build system configuration                                                             

src/main/target/HAKRCH743/CMakeLists.txt

  • Adds CMake build configuration for HAKRCH743 target
  • Specifies STM32H743XI MCU variant
+1/-0     

@github-actions
Copy link

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Dec 15, 2025

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

Copy link
Contributor

Choose a reason for hiding this comment

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

High-level Suggestion

The PR adds a new hardware target with a known critical bug (broken OSD). It is suggested to close the PR and not merge it until the issue is fixed in a separate fork. [High-level, importance: 10]

Solution Walkthrough:

Before:

// src/main/target/HAKRCH743/target.h
// The PR adds configuration for a new hardware target,
// including enabling the OSD feature.

/*** OSD ***/
#define USE_MAX7456
#define MAX7456_SPI_BUS         BUS_SPI3
#define MAX7456_CS_PIN          PE2

...

#define DEFAULT_FEATURES        (FEATURE_OSD | FEATURE_TELEMETRY | ...)

// However, the PR author explicitly states in the description:
// "OSD is not working properly !!"

After:

// No code is merged into the main branch.

// The PR is closed, as it introduces a non-functional hardware target.
// Development on the HAKRCH743 target should continue in a separate fork.
// The PR should only be re-submitted once all critical features,
// including the OSD, are fully functional and verified.

Comment on lines 47 to 48
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 9), // LED_2812
DEF_TIM(TIM1, CH1, PE9, TIM_USE_BEEPER, 0, 0), // BEEPER
Copy link
Contributor

@qodo-code-review qodo-code-review bot Dec 15, 2025

Choose a reason for hiding this comment

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

Suggestion: Change the beeper's timer from TIM1, CH1 to TIM1, CH2 to resolve a resource conflict with the LED strip, which uses the same timer channel. [possible issue, importance: 9]

Suggested change
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 9), // LED_2812
DEF_TIM(TIM1, CH1, PE9, TIM_USE_BEEPER, 0, 0), // BEEPER
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 9), // LED_2812
DEF_TIM(TIM1, CH2, PE9, TIM_USE_BEEPER, 0, 0), // BEEPER

HAKRC8899 and others added 2 commits December 16, 2025 08:32
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
@HAKRC8899
Copy link
Author

Thank you for the automated reply from the robot. Based on the feedback you provided, I have further optimized target.c and conducted testing. All functions work normally except for OSD. Therefore, I hope someone from the development team can help check whether there is any problem with my hardware design.

@sensei-hacker
Copy link
Member

The bot's suggestion "Correct the duplicated motor output indices" is incorrect and should be ignored.

For the OSD, are you using a MAX7456 chip, or a simulation?

@HAKRC8899
Copy link
Author

HAKRC8899 commented Dec 16, 2025

The bot's suggestion "Correct the duplicated motor output indices" is incorrect and should be ignored.

For the OSD, are you using a MAX7456 chip, or a simulation?

Thank you for your reply. We are using the MAX7456 chip mounted on the flight controller.

@sensei-hacker
Copy link
Member

Okay, we can poke around with the OSD using the test sample board. Have you already sent one to a developer?

That may sound like a silly question if this FC happens to be the one in the box on my workbench right now. :)

@HAKRC8899
Copy link
Author

Okay, we can poke around with the OSD using the test sample board. Have you already sent one to a developer?

That may sound like a silly question if this FC happens to be the one in the box on my workbench right now. :)

No, I haven't sent the test sample to the development team yet. I emailed this coredev@inavflight.com address, and once I get the mailing address, I will send the test sample as soon as possible.

@sensei-hacker
Copy link
Member

No, I haven't sent the test sample to the development team yet. I emailed this coredev@inavflight.com address, and once I get the mailing address, I will send the test sample as soon as possible.

Can you ping me or another developer on the Discord, please?

@HAKRC8899
Copy link
Author

No, I haven't sent the test sample to the development team yet. I emailed this coredev@inavflight.com address, and once I get the mailing address, I will send the test sample as soon as possible.

Can you ping me or another developer on the Discord, please?

No problem, I sent you a message on Discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants