Skip to content

AP_HAL_ChibiOS: Add HGLRC_H743_EVO board support - #33883

Open
HGLRC-T wants to merge 3 commits into
ArduPilot:masterfrom
HGLRC-T:HGLRC_H743_EVO
Open

AP_HAL_ChibiOS: Add HGLRC_H743_EVO board support#33883
HGLRC-T wants to merge 3 commits into
ArduPilot:masterfrom
HGLRC-T:HGLRC_H743_EVO

Conversation

@HGLRC-T

@HGLRC-T HGLRC-T commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

Testing

  • ./waf configure --board HGLRC_H743_EVO: passed
  • ./waf copter: passed
  • ArduPilot CI: passed
  • Firmware flashed successfully using the generated bootloader
  • Verified USB connection and parameter access
  • Verified onboard ICM42688-P and BMI270 IMUs
  • Verified onboard DPS368 barometer
  • Verified onboard IST8310 compass
  • Verified microSD card and data logging
  • Verified RC input
  • Verified motor outputs
  • Verified analog OSD
  • Verified status LEDs and serial LED output
  • Verified CAN1 with a DroneCAN peripheral

Description

HGLRC H743 EVO Flight Controller

The HGLRC H743 EVO is an STM32H743-based flight controller for FPV
multirotors. It has dual IMUs, an analog OSD, a microSD slot, an on-board
barometer and compass, CAN, and ten PWM outputs.

Features

  • STM32H743VIT6 microcontroller (480 MHz, 2 MiB flash)
  • ICM-42688-P (SPI1) and BMI270 (SPI4) IMUs
  • DPS368 barometer (I2C2, supported by the DPS310 driver)
  • IST8310 compass (I2C2)
  • AT7456E analog OSD (SPI2)
  • microSD card slot (SDMMC, 4-bit)
  • One CAN port (FDCAN1)
  • Eight motor outputs, two auxiliary PWM outputs, and one serial LED output
  • Analog battery voltage and current sensing
  • Switchable 12 V VTX power output
  • Two-input camera switch
  • USB Type-C

UART Mapping

ArduPilot port Connector/function TX pin RX pin
SERIAL0 USB - -
SERIAL1 VTX PA9 PA10
SERIAL2 CRSF receiver PD5 PD6
SERIAL3 Expansion PD8 PD9
SERIAL4 SBUS receiver PD1 PA1
SERIAL5 Telemetry PB6 PB5
SERIAL6 GPS PE8 PE7
SERIAL7 Expansion PE1 PE0

The default parameter file configures SERIAL2 for an RC input, SERIAL5 for
MAVLink2 telemetry, and SERIAL6 for GPS. SERIAL1 defaults to MSP DisplayPort
for a compatible VTX.

Motor and Servo Outputs

Output Board label Pin Timer channel DShot
1 M1 PE9 TIM1_CH1 Yes
2 M2 PE11 TIM1_CH2 Yes
3 M3 PE13 TIM1_CH3 Yes
4 M4 PE14 TIM1_CH4 Yes
5 M5 PD12 TIM4_CH1 Yes
6 M6 PD13 TIM4_CH2 Yes
7 M7 PC6 TIM8_CH1 Yes
8 M8 PC7 TIM8_CH2 Yes
9 PWM9 PA2 TIM2_CH3 Yes
10 PWM10 PA3 TIM2_CH4 Yes

Outputs on the same timer must use the same protocol and update rate. The
serial LED output is on PA0 (TIM5_CH1).

Battery Monitoring

The board uses PC0 for battery voltage sensing and PC1 for current sensing.
The hwdef sets the default voltage multiplier to 21.0 and the current scale to
40.0 A/V. Both scales should be calibrated against reference instruments
before use.

I2C, Compass, and Barometer

I2C1 is available on the GPS connector for external peripherals. The on-board
IST8310 compass and DPS368 barometer are connected to I2C2. External compasses
on I2C1 are also probed automatically.

OSD and Video Switching

The AT7456E analog OSD is enabled by default. The board has two camera inputs;
GPIO 82 selects CAM1 or CAM2 through Relay 3. The VTX connector is powered by
the switchable 12 V BEC on GPIO 81 through Relay 2 and is enabled by default.

Loading Firmware

Firmware can be loaded with a compatible ground station or built from the
ArduPilot repository root:

./waf configure --board HGLRC_H743_EVO
./waf copter

@peterbarker

Copy link
Copy Markdown
Contributor

@HGLRC-T no way this is going to pass CI.

Commit list must comply with our standards.

@HGLRC-T

HGLRC-T commented Jul 30, 2026

Copy link
Copy Markdown
Author

@HGLRC-T no way this is going to pass CI.

Commit list must comply with our standards.

@peterbarker Thanks for the reminder. I have fixed the issue and force-pushed the changes; please submit it for review again. Start to CI check and build.

@andyp1per

Copy link
Copy Markdown
Contributor

Automated hwdef review (/hwdef-check)

PR 33883 · base upstream/master · new board HGLRC_H743_EVO

Build

  • ./waf configure --board HGLRC_H743_EVO: pass
  • ./waf copter: pass (1537608 B used, 166324 B free)
  • Three commits, cleanly split per subsystem. Board ID 1525 is unique.

Must-fix

The three status LEDs are never driven. hwdef.dat:102-103 sets HAL_GPIO_A_LED_PIN / HAL_GPIO_B_LED_PIN, but none of the AP_NOTIFY_GPIO_LED_*_ENABLED flags is set. They all default to 0 (AP_Notify_config.h:55,59), and AP_Notify.cpp:274-283 only instantiates a board-LED backend when one of them is on - the generated header confirms none is defined. So PE3/PD3/PD7 do nothing. Your HGLRC_H743_PRO PR (#33873) sets define AP_NOTIFY_GPIO_LED_2_ENABLED 1; this board needs the same, or AP_NOTIFY_GPIO_LED_3_ENABLED 1 plus define HAL_GPIO_C_LED_PIN 2 to use all three. Related: these pins are OUTPUT LOW where the PRO uses OUTPUT HIGH, and HAL_GPIO_LED_ON defaults to 0 (active low) - so as it stands the board boots with the LEDs lit and nothing ever changes them. Worth confirming the polarity for this hardware.

README:19 says 480 MHz, but the firmware runs at 400 MHz. MCU_CLOCKRATE_MHZ isn't set, so the build gets HAL_EXPECTED_SYSCLOCK 400000000. Either add MCU_CLOCKRATE_MHZ 480 or fix the README - 26 H743 boards in tree set 480.

The PR template at the top is unfilled with no testing checkbox ticked. The board description below it is good, but for a new board the testing statement is what reviewers lean on - please say what was verified on hardware. Same ask as on #33873.

Should-fix

hwdef.dat:168 - HAL_DEFAULT_INS_FAST_SAMPLE 3, but IMU2 is a BMI270 and that driver has no fast-sampling path at all (AP_InertialSensor_BMI270.cpp never references enable_fast_sampling). Bit 1 is a no-op; use 1.

defaults.parm carries settings that belong in hwdef.dat (§7.6):

  • BATT_MONITOR 4 should be define HAL_BATT_MONITOR_DEFAULT 4. Your PRO board already does it that way (HGLRC_H743_PRO/hwdef.dat:109), so the two PRs currently disagree with each other.
  • OSD_TYPE 1 duplicates HAL_OSD_TYPE_DEFAULT 1 at hwdef.dat:175 - drop it.
  • The SERIALn_PROTOCOL lines want define DEFAULT_SERIALn_PROTOCOL in hwdef. To be fair ~50 boards do put serial protocols in defaults.parm, so that part isn't unprecedented; the duplicated OSD_TYPE is.

The serial LED output doesn't work out of the box. README:26 and :65 advertise it and hwdef.dat:95 assigns PWM(11) on TIM5_CH1, but nothing sets SERVO11_FUNCTION 120 and the NeoPixel notify type is never enabled. AEDROXH7 is the pattern to copy - SERVO9_FUNCTION 120 in defaults.parm plus define DEFAULT_NTF_LED_TYPES 455 in hwdef.dat. Identical gap to #33873.

hwdef.dat:28 - SERIAL_ORDER skips USART6 without a placeholder, so SERIAL6 is UART7 and SERIAL7 is UART8. Comparable boards insert EMPTY to keep the numbering aligned (BROTHERHOBBYH743/hwdef.dat:90, AEDROXH7/hwdef.dat:30, BeastF7v2/hwdef.dat:26). This README is at least self-consistent, since it gives explicit TX/RX pins per port rather than claiming SERIALn maps to UARTn - so it's less acute than on #33873 - but if the silkscreen labels pads by UART number users will trip over it. Worth settling once for both boards.

hwdef.dat:108,109 - HAL_BUZZER_ON / HAL_BUZZER_OFF are dead; neither name is read anywhere in the tree. Same as #33873.

No DMA_NOSHARE or DMA_PRIORITY at all. SPI1 carries the primary IMU: its RX shares DMA2 stream 6 with SPI4_RX and UART5/7/8 TX, and its TX shares DMA2 stream 1 with SPI2_TX, USART1_TX (the MSP DisplayPort VTX link) and USART2_TX (CRSF). §13.4 recommends NOSHARE for IMU SPI; DMA_NOSHARE SPI1* SPI4* would cover both IMUs.

README gaps: no CAN section despite CAN1 being defined and listed under Features (§6.3 asks for one), and "Loading Firmware" only gives build commands rather than how to actually flash the board (the standard DFU / .apj text).

SPIDEV icm42688 ... 8*MHZ - §7.3 recommends 16*MHZ for ICM4xxxx parts on H7 (it rounds to 24 MHz, within the chip's rating). Matters for FIFO read bandwidth once fast sampling is on. Same on the PRO board.

Notes

STM32_ST_USE_TIMER 12 with CH_CFG_ST_RESOLUTION 16 is correct here, and I am deliberately not repeating the advice I gave on #33873. There I suggested TIM2 because it was free; on this board TIM2 drives PWM 9/10 and TIM5 drives the LED strip, so both 32-bit timers are taken and a 16-bit timer is the only option. Leave it as is.

The helper's bootloader STM32_ST_USE_TIMER mismatch is the usual false positive - the bootloader has no PWM and virtually no board sets it in hwdef-bl.dat.

HAL_INS_HIGHRES_SAMPLE is unset (helper advisory). Only the ICM42688 could use it, so 1 is the value if you want it; declining is legitimate, just make it deliberate.

Checked and correct, so nobody "fixes" them:

  • The committed bootloader is genuine. Both this PR and AP_HAL_ChibiOS: Add HGLRC_H743_PRO board support #33873 ship _bl.bin files of exactly 20524 bytes, which looked like a copy-paste, so I extracted the embedded APJ board ID - it is 1525 (this board), not 1526 (the PRO). Coincidence, not a mistake.
  • AP_COMPASS_IST8310_INTERNAL_BUS_PROBING_ENABLED 0 alongside an explicit COMPASS IST8310 I2C:ALL_INTERNAL:0x0F line is fine. The generated HAL_MAG_PROBE2 is emitted unguarded, so the explicit line still runs; the define only suppresses the generic auto-prober, which is exactly what avoids a duplicate registration of the onboard mag.
  • No HAL_I2C_INTERNAL_MASK is needed - it defaults to 1 (AP_HAL/board/chibios.h:130), and I2C_ORDER I2C2 I2C1 already puts the internal baro/mag bus at index 0.
  • BARO DPS310 for a DPS368 works - the driver gates on product ID 0x10, which the DPS368 reports.
  • BIDIR placement is right: one per channel pair on TIM1, TIM4 and TIM8, and nothing on TIM4_CH4.
  • Battery pins 10 and 11 match HAL_ANALOG_PINS and the README.

Minor: Tools: add HGLRC H743 EVO bootloader binaries - the playbook prefix for Tools/bootloaders/ is bootloaders:.

Generated by Claude via /hwdef-check. Not a substitute for a human review pass.

@andyp1per andyp1per left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See comment

@Hwurzburg
Hwurzburg self-requested a review July 30, 2026 21:53
@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Jul 30, 2026
HGLRC-T added 3 commits July 31, 2026 10:12
Allocate the HGLRC H743 EVO board ID for bootloader and firmware builds.
Add the hardware definition, bootloader hardware definition, default parameters, and board documentation for the HGLRC H743 EVO flight controller.
@HGLRC-T

HGLRC-T commented Jul 31, 2026

Copy link
Copy Markdown
Author

See comment

OK. Done.

@HGLRC-T
HGLRC-T requested a review from andyp1per July 31, 2026 02:45
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.

4 participants