Skip to content

Conversation

HGLRC-T
Copy link
Contributor

@HGLRC-T HGLRC-T commented Aug 19, 2025

Checklist

  • passed schematics review
  • passed hardware samples testing
  • follows guidelines
  • follows connector standards
  • flight tested
  • comments/issues resolved

Summary by CodeRabbit

  • New Features
    • Added support for the HGLRC H743 LITE flight controller board.
    • Board features integrated accelerometer, gyroscope, barometer, and on-screen display (OSD) capabilities.
    • Includes multiple serial ports, I2C connectivity, onboard flash storage for blackbox logging, and configurable I/O pins for external accessories.

Copy link
Contributor

coderabbitai bot commented Aug 19, 2025

Walkthrough

Adds a new board configuration header for HGLRC_H743_LITE targeting the STM32H743 MCU. Defines hardware mappings via preprocessor macros including MCU/board identifiers, feature toggles (accelerometer, gyroscope, barometer, MAX7456, flash), SPI/UART/I2C pin assignments, timer configurations, ADC sources, and PINIO definitions.

Changes

Cohort / File(s) Summary
New HGLRC_H743_LITE board configuration
configs/HGLRC_H743_LITE/config.h
Adds comprehensive board configuration header defining MCU target (STM32H743), feature flags for sensors (ICM42688P accel/gyro, DPS310 barometer, W25Q128FV flash, MAX7456 OSD), SPI/I2C/UART pin mappings, timer assignments, ADC DMA options, barometer/magnetometer I2C instances, voltage/current meter sources, and four-pin PINIO group with auxiliary box names ("12V BEC", "CAM 1,2") and inverted beeper logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Straightforward single-file addition consisting predominantly of homogeneous macro definitions (pin assignments, feature toggles, and hardware constants). Review effort focuses on verifying pin correctness against board schematics and ensuring consistent patterns across similar macro families.

Possibly related PRs

  • Add HWH7 (STM32H743) config – initial #893: Adds another STM32H743 board configuration header with identical macro structure (MCU/board IDs, SPI/gyro/sensor pins, TIMER_PIN_MAPPING, ADC, PINIO).
  • Add HAKRCH743 #757: Adds STM32H743 board config.h with nearly identical hardware macros (sensors, SPI/UART/I2C pins, timers, DMA options).
  • Add New Target DAKEFPVH743Pro #793: Adds STM32H743 board configuration defining the same macro families (FC_TARGET_MCU, BOARD_NAME, feature flags, pin assignments, TIMER_PIN_MAPPING, PINIO/BOX settings).

Suggested reviewers

  • ot0tot
  • haslinghuis

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description only contains the unchecked generic checklist and omits all required sections from the repository’s template, such as a detailed PR summary, hardware compliance details, links to schematics, and context for the changes. It fails to explain the purpose of the new target, its hardware design considerations, or progress on the checklist items, leaving reviewers without the necessary information to assess compliance. Please populate the template by adding a descriptive summary of the new board, hardware compliance details with links to schematics and guidelines, and update each checklist item with its status or relevant notes so that reviewers can verify completion.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title concisely captures the primary change of adding a new HGLRC H743 board configuration and is directly related to the main changeset; it is clear and focused on the essential update. Although it omits the “Lite” suffix present in the board’s full identifier, it still communicates the main purpose of the pull request without ambiguity. Its brevity and relevance make it easy for a teammate to skim history and understand that a new target is being added.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b21fe3 and 8abd92f.

📒 Files selected for processing (1)
  • configs/HGLRC_H743_LITE/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (16)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-19T18:34:22.887Z
Learnt from: osirisinferi
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-19T18:34:22.887Z
Learning: For STM32H743, both UART5_TX (PB6) and UART5_RX (PB5) use alternate function AF14, not AF8. The Port B alternate functions table in the STM32H743 datasheet confirms PB5 supports UART5_RX and PB6 supports UART5_TX, both using AF14.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) with GPIO_AF8_UART4, as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This is a valid pin mapping despite what some generic STM32 documentation might suggest.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-26T14:26:11.863Z
Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 can use PH2 (UART4_RX) and PH3 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c lines 183-212. This is a valid pin mapping for the AT32F435 platform.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-26T14:26:11.863Z
Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 supports multiple pin options including PH2 (UART4_RX) and PH3 (UART4_TX) with GPIO_MUX_8, as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c. The AT32 platform has broader pin support than initially apparent from basic searches.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-09-26T16:32:46.694Z
Learnt from: osirisinferi
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-09-26T16:32:46.694Z
Learning: When reviewing hardware configuration files like Betaflight configs, always check for pin assignment conflicts by verifying that no physical pins (like PB10, PB11, etc.) are assigned to multiple peripheral functions simultaneously.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-07-14T15:38:06.837Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:52-53
Timestamp: 2025-07-14T15:38:06.837Z
Learning: In Betaflight flight controller configurations, it's common and intentional for UART2_RX_PIN and RX_PPM_PIN to share the same GPIO pin (like PA3) because they represent mutually exclusive receiver input protocols. The pin can be configured for either serial receiver input (UART2) or PPM input, but not both simultaneously. This is a standard design pattern in flight controller hardware.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 in Betaflight, PB0 has multiple timer options but only timer index 2 provides a non-complementary output suitable for GYRO_CLKIN functionality. The other timer options for PB0 are N channels (complementary outputs) which are not appropriate for CLKIN usage.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.

Applied to files:

  • configs/HGLRC_H743_LITE/config.h
🔇 Additional comments (4)
configs/HGLRC_H743_LITE/config.h (4)

29-37: Well-structured board configuration.

The overall configuration is well-organized with appropriate feature enables, peripheral mappings, and PINIO definitions. The user-friendly names for PINIO3 ("12V BEC") and PINIO4 ("CAM 1,2") provide clear indication of their function.

Also applies to: 39-66, 83-93, 104-114, 116-135


1-135: Configuration blocked on schematic review.

Per the PR comments, the maintainer is still waiting for the updated schematics that were requested on June 30, 2025. Without the schematics, the pin assignments and hardware mappings in this configuration cannot be definitively validated against the actual PCB design. Please provide the updated schematics before this PR can be merged.

Based on PR objectives.


74-75: No changes needed: UART4 TX=PD1 and RX=PA1 are valid and already used by multiple STM32H7 boards in Betaflight; mapping is supported.


95-102: Manual verification required: unable to locate timer_stm32h7xx.c in the codebase to confirm TIM1 support for PE9, PE11, PE13, PE14, PA0, PC6, and PE5. Ensure these pins and DMA channels map correctly to TIM1 channels in the STM32H743 timer definitions.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
configs/HGLRCH743/config.h (3)

107-121: TIMER_PIN_MAPPING: suspicious entry for PD15 (value 14) and mixed flags; verify channels/AF/DMA.

  • Most entries have the last field -1 or 0, but PD15 (Line 119) uses 14, which stands out. Make sure this aligns with the timer/channel and DMA/AF expectations for H743.
  • Ensure LED_STRIP on PA0 (index 12) does not conflict with motor timers in terms of DMA usage/DMAMUX. H7 improves DMAMUX flexibility, but practical conflicts can still occur depending on driver assumptions.

Please confirm timer instances and channels for:

  • PE9/11/13/14 (TIM1 CH1–CH4) for motors 1–4,
  • PA2/PA3/PB0/PB1 (TIM2/TIM3 channels) for motors 5–8,
  • PD12–PD15 (likely TIM4 CH1–CH4) for servos,
  • PA0 for LED_STRIP.

If PD15 truly requires a non-default selector (14), consider adding a brief comment noting the reason for maintainability.


100-103: ADC channels and default scales: please calibrate/confirm.

  • VBAT: PC0, CURRENT: PC1, RSSI: PC4 are plausible ADC inputs for H743.
  • DEFAULT_CURRENT_METER_SCALE=200 and DEFAULT_VOLTAGE_METER_SCALE=210 are board-specific. Please confirm these against resistor dividers and shunt specs; otherwise users will see inaccurate OSD values. If uncertain, consider leaving defaults closer to known-good Betaflight baselines and document expected CLI calibration.

Also applies to: 128-131


68-68: LED_STRIP on PA0 shares AFs with UART4_TX; callout for future maintenance.

You’ve placed LED_STRIP on PA0, which is also a common UART4_TX pin. That’s fine if intended by hardware, but worth noting to avoid future remaps that inadvertently collide.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between df10848 and 7cf4478.

📒 Files selected for processing (1)
  • configs/HGLRCH743/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the `BOARD_NAME` define in config.h files exactly matches the directory name where the config file is located. For example, if the config file is in configs/AXISFLYINGF7AIO/config.h, then the BOARD_NAME should be defined as "AXISFLYINGF7AIO". This ensures proper board identification and configuration loading in Betaflight.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-05-31T17:01:39.423Z
Learnt from: haslinghuis
PR: betaflight/config#798
File: configs/FURYF4OSD/config.h:88-88
Timestamp: 2025-05-31T17:01:39.423Z
Learning: For STM32F4xx platforms, PB1 pin timer definitions are:
1 = DEF_TIM(TIM1, CH3N, PB1, 0, 0)
2 = DEF_TIM(TIM3, CH4, PB1, 0, 0) 
3 = DEF_TIM(TIM8, CH3N, PB1, 0, 0)
Timer instance 2 (TIM3, CH4) is the correct mapping for PB1 motor control on STM32F4xx platforms as defined in src/platform/STM32/timer_stm32f4xx.c

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-14T15:41:14.364Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:79-88
Timestamp: 2025-07-14T15:41:14.364Z
Learning: In STM32F405 configurations, PB1 typically maps to TIM3_CH4 and PC9 typically maps to TIM8_CH4. These are different timers and do not share DMA resources, so there is no conflict when both pins are used simultaneously (e.g., PB1 for LED_STRIP and PC9 for MOTOR4).

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/HGLRCH743/config.h
🔇 Additional comments (9)
configs/HGLRCH743/config.h (9)

24-28: BOARD_NAME and MCU look consistent.

BOARD_NAME matches the directory (HGLRCH743) and MCU is correctly set to STM32H743.


80-81: UART4 TX on PD1 looks unsupported; please verify and select a valid AF pair.

For STM32H743, UART4 TX/RX are commonly on PA0/PA1 or PC10/PC11. PD1 is not a known UART4 TX pin. If LED_STRIP is already on PA0, consider mapping UART4 to PC10/PC11 instead—provided that matches the actual hardware wiring.

If the PCB does not use UART4 on these pins, adjust the UART index here to match the real peripheral routed to PD1/PA1 (if any). Please confirm against the hardware schematic.


39-45: Gyro over SPI1 mapping looks sane.

SPI1 pins and GYRO CS/EXTI are commonly used and consistent with ICM42688P on SPI1.


46-51: MAX7456 on SPI2 mapping looks standard.

PB13/14/15 with PB12 as CS is the typical SPI2 assignment for MAX7456.


91-95: I2C assignments look fine; instance selection for BARO/MAG is reasonable.

I2C1 on PB8/PB7 and I2C2 on PB10/PB11 are usual. BARO on I2CDEV_1 is common. MAG instance is set but USE_MAG isn’t enabled—okay if the board has no magnetometer; enable USE_MAG if present.


59-59: Beeper polarity: verify matches hardware transistor drive.

BEEPER_INVERTED is correct only if the beeper drive is active-low. Please confirm to avoid silent or constantly-on beeper behavior.

Also applies to: 136-136


37-38: Flash device selection looks correct.

USE_FLASH with W25Q128FV and SPI3 CS on PA15 is in line with common H7 designs. Pending the MOSI fix, this should enable BLACKBOX_DEVICE_FLASH as default.

Also applies to: 55-58


52-57: Ignore SPI3_SDO_PIN change: PB2 is a valid SPI3 MOSI pin on STM32H743 (AF7). No update needed.

Likely an incorrect or invalid review comment.


52-57: Confirm STM32H743 package & AF mappings for SPI3, UART4 and UART5

Before merging, please verify that the pin assignments in configs/HGLRCH743/config.h truly exist on your STM32H743 part–number and package (e.g. H743ZIT6, Vx, GIx). According to the ST community and datasheet references, some mappings are only available on specific packages:

  • SPI3_SDO_PIN = PB2 (lines 52–57)
    • Official AF6 (SPI3_MOSI) is valid on PB5 and PC12; PB2 (and PD6) appear only on certain packages¹².
    → Confirm PB2 supports AF6/SPI3_MOSI on your package via the STM32H743 datasheet or STM32CubeMX.

  • UART4 TX/RX pins (lines 80–81)
    • Valid mappings are PA0/PA1 or PC10/PC11³⁴.
    → Ensure your board’s pins match one of these pairs.

  • UART5 TX/RX pins (lines 82–83)
    • Valid mappings are PC12 (TX) and PD2 (RX)⁵⁶.
    → Verify these are routed and enabled in your package’s AF tables.

Please supply your MCU part-number/package and cite the exact “Pin/ball definition” table lines from the STM32H743 datasheet (or a CubeMX screenshot) to finalize these assignments.

References:

  1. https://community.st.com/t5/stm32-mcus-products/nucleo-h745ziq-spi-1-and-spi-3-mosi-pin-mapping-issue/td-p/174416
  2. https://pdf.elecfans.com/STMICROELECTRONICS/STM32H743XIH6.html
  3. https://community.st.com/t5/stm32-mcus-products/what-are-the-exact-pins-and-ports-for-uart1-uart4-in-stm32h745i/td-p/108331
  4. https://pdf.elecfans.com/STMICROELECTRONICS/STM32H743XIH6.html
  5. https://pdf.elecfans.com/STMICROELECTRONICS/STM32H743XIH6.html
  6. https://www.digikey.com/en/htmldatasheets/production/3038075/0/0/1/stm32h753xi-datasheet

@HGLRC-T
Copy link
Contributor Author

HGLRC-T commented Sep 6, 2025

Will fix soon...

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
configs/HGLRCH743/config.h (1)

52-58: Nit: fix stray tab alignment on FLASH_CS line.
Pure formatting; prevents diff churn later.

-#define FLASH_CS_PIN 						PA15
+#define FLASH_CS_PIN            PA15
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7cf4478 and 7908dbe.

📒 Files selected for processing (1)
  • configs/HGLRCH743/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (21)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 PB0 in Betaflight, there are three timer options: TIM1_CH2N, TIM3_CH3, and TIM8_CH2N. Only TIM3_CH3 (timer index 2) is suitable for GYRO_CLKIN as the other two are complementary (N) channels. This is confirmed in timer_stm32h7xx.c.
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 in Betaflight, PB0 has multiple timer options but only timer index 2 provides a non-complementary output suitable for GYRO_CLKIN functionality. The other timer options for PB0 are N channels (complementary outputs) which are not appropriate for CLKIN usage.
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.
Learnt from: haslinghuis
PR: betaflight/config#656
File: configs/IFLIGHT_F745_AIO/config.h:31-35
Timestamp: 2025-07-28T16:44:59.686Z
Learning: In Betaflight board configurations, when a board design uses the same physical gyro socket but different sensor variants across production batches (e.g., MPU6000 in older batches, ICM42688P in newer batches), the correct approach is to enable both sensor drivers (USE_GYRO_SPI_MPU6000 and USE_GYRO_SPI_ICM42688P) in the same configuration. This allows runtime auto-detection of which sensor is actually present without requiring separate board configurations for each hardware variant.
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the `BOARD_NAME` define in config.h files exactly matches the directory name where the config file is located. For example, if the config file is in configs/AXISFLYINGF7AIO/config.h, then the BOARD_NAME should be defined as "AXISFLYINGF7AIO". This ensures proper board identification and configuration loading in Betaflight.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-19T18:34:22.887Z
Learnt from: osirisinferi
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-19T18:34:22.887Z
Learning: For STM32H743, both UART5_TX (PB6) and UART5_RX (PB5) use alternate function AF14, not AF8. The Port B alternate functions table in the STM32H743 datasheet confirms PB5 supports UART5_RX and PB6 supports UART5_TX, both using AF14.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) with GPIO_AF8_UART4, as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This is a valid pin mapping despite what some generic STM32 documentation might suggest.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-26T14:26:11.863Z
Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 can use PH2 (UART4_RX) and PH3 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c lines 183-212. This is a valid pin mapping for the AT32F435 platform.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-26T14:26:11.863Z
Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 supports multiple pin options including PH2 (UART4_RX) and PH3 (UART4_TX) with GPIO_MUX_8, as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c. The AT32 platform has broader pin support than initially apparent from basic searches.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-14T15:41:14.364Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:79-88
Timestamp: 2025-07-14T15:41:14.364Z
Learning: In STM32F405 configurations, PB1 typically maps to TIM3_CH4 and PC9 typically maps to TIM8_CH4. These are different timers and do not share DMA resources, so there is no conflict when both pins are used simultaneously (e.g., PB1 for LED_STRIP and PC9 for MOTOR4).

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 in Betaflight, PB0 has multiple timer options but only timer index 2 provides a non-complementary output suitable for GYRO_CLKIN functionality. The other timer options for PB0 are N channels (complementary outputs) which are not appropriate for CLKIN usage.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-14T15:38:06.837Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:52-53
Timestamp: 2025-07-14T15:38:06.837Z
Learning: In Betaflight flight controller configurations, it's common and intentional for UART2_RX_PIN and RX_PPM_PIN to share the same GPIO pin (like PA3) because they represent mutually exclusive receiver input protocols. The pin can be configured for either serial receiver input (UART2) or PPM input, but not both simultaneously. This is a standard design pattern in flight controller hardware.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-05-31T17:01:39.423Z
Learnt from: haslinghuis
PR: betaflight/config#798
File: configs/FURYF4OSD/config.h:88-88
Timestamp: 2025-05-31T17:01:39.423Z
Learning: For STM32F4xx platforms, PB1 pin timer definitions are:
1 = DEF_TIM(TIM1, CH3N, PB1, 0, 0)
2 = DEF_TIM(TIM3, CH4, PB1, 0, 0) 
3 = DEF_TIM(TIM8, CH3N, PB1, 0, 0)
Timer instance 2 (TIM3, CH4) is the correct mapping for PB1 motor control on STM32F4xx platforms as defined in src/platform/STM32/timer_stm32f4xx.c

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-14T15:47:16.394Z
Learnt from: ot0tot
PR: betaflight/config#681
File: configs/NYX405V1/config.h:26-28
Timestamp: 2025-07-14T15:47:16.394Z
Learning: In Betaflight configuration files, MANUFACTURER_ID values must be exactly 4 ASCII characters long, not 3 characters. All manufacturer IDs in the codebase consistently use 4-character identifiers like AIRB, FOSS, SPBE, MTKS, NERC, etc.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 PB0 in Betaflight, there are three timer options: TIM1_CH2N, TIM3_CH3, and TIM8_CH2N. Only TIM3_CH3 (timer index 2) is suitable for GYRO_CLKIN as the other two are complementary (N) channels. This is confirmed in timer_stm32h7xx.c.

Applied to files:

  • configs/HGLRCH743/config.h
🔇 Additional comments (16)
configs/HGLRCH743/config.h (16)

26-28: BOARD_NAME matches folder; MANUFACTURER_ID is 4 chars — good.
Meets the standard checks from prior reviews.


29-37: Feature enables look consistent with hardware intent.
ICM42688P, DPS310, MAX7456, and W25Q128FV selections are coherent.


39-45: SPI1 + gyro wiring looks standard.
CS/EXTI and SPI pins align with common H7 layouts.


46-51: MAX7456 on SPI2 is fine.
Pin choices align with typical OSD wiring.


59-73: Motor/servo/LED/beeper pins look sane.
Servos don’t request DMA (correct), LED_STRIP is provided a dedicated DMA opt later.


91-95: I2C pins and BARO/MAG instances are coherent.
No obvious conflicts with other functions.


96-99: Status LEDs on PE6/PE4/PE3 look fine.
No overlap with timers or SPI here.


100-103: ADC VBAT/CURR/RSSI pins are typical for H7.
Scales are set later; channels are ADC-capable pins.


104-106: PINIO1/2 assignments are OK.
Common utility GPIOs; no clashes observed.


122-124: ADC DMA opts chosen (8,9) don’t collide — good.
Matches the timer map plan.


125-127: BARO_I2C_INSTANCE and MAG_I2C_INSTANCE defined without forcing USE_MAG — fine.
Common pattern to aid builds where MAG is optionally enabled.


128-131: Confirm defaults: current/voltage meter sources and scales.
If this FC isn’t part of a stack with known shunt/amp gain, consider omitting DEFAULT_CURRENT_METER_SCALE to avoid misleading defaults.

Would you like me to remove the default current scale or tune it to your hardware’s shunt/gain values?


133-135: PINIO boxes defined — OK.
Matches common AUX usage.


136-136: BEEPER_INVERTED set — OK.
Aligns with many PE5 beeper circuits.


107-121: Approve — TIMER_PIN_MAPPING and DMA opts look correct
Motors (entries 0–7) use DMA opts 0–7; servos (entries 8–11) use -1; entry 12 (PA0) uses DMA opt 10; ADC1/ADC3 are 8 and 9; no TIMUPx DMA opts in this file — no collisions detected. Do not add TIMUPx DMA opts that reuse 10 or 8/9.


74-90: UARTs: UART5 PB6/PB5 valid; UART4 PD1/PA1 not verifiable in this repo

  • UART5 PB6/PB5 matches other H7 board configs.
  • The platform mapping file (serial_uart_stm32h7xx.c) with STM32H7 UART pin tables is not present here, so PD1/PA1 cannot be confirmed — confirm PD1/PA1 are listed in Betaflight's src/platform/STM32/serial_uart_stm32h7xx.c.
  • If PD1/PA1 are not supported upstream, switch UART4 to PB9/PB8 (TX/RX) if the PCB routes them.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
configs/HGLRCH743/config.h (5)

55-55: Normalize spacing on FLASH_CS line.

Use a single space for consistency.

-#define FLASH_CS_PIN 						PA15
+#define FLASH_CS_PIN            PA15

107-121: Timer map content looks correct; tiny whitespace nits.

  • Servo entries correctly use DMA -1.
  • Motor/LED indices increment cleanly with unique DMA opts.
-    TIMER_PIN_MAP(9,  PD13,  1,  -1) \
+    TIMER_PIN_MAP(9,  PD13,  1, -1) \
-    TIMER_PIN_MAP(12, PA0,   1,  10) 
+    TIMER_PIN_MAP(12, PA0,   1, 10)

122-123: DMA option constants: confirm intended values and consider defining TIMUPx.

If TIM1/TIM5 update DMAs are used (common when mixing motors/LED), define them and shift ADC opts to avoid future collisions as per typical H7 targets.

+#define TIMUP1_DMA_OPT      9
+#define TIMUP5_DMA_OPT      10
-#define ADC1_DMA_OPT        8
-#define ADC3_DMA_OPT        9
+#define ADC1_DMA_OPT        11
+#define ADC3_DMA_OPT        12

If updates are not needed, keeping current values is fine—please confirm build-time DMA allocation.


59-59: Optional: put beeper on TIMER_PIN_MAPPING (if using timer beeper).

If this board expects timer-driven beeper, add PE5 to the map (DMA -1). If not, ignore.

 #define TIMER_PIN_MAPPING \
-    TIMER_PIN_MAP(0,  PE9,   1,  0) \
+    /* Optional: timer beeper */ \
+    /* TIMER_PIN_MAP(0,  PE5,   1, -1) */ \
+    TIMER_PIN_MAP(0,  PE9,   1,  0) \

Also applies to: 107-121


136-136: Ensure newline at EOF.

Minor tooling/style nit.

-#define BEEPER_INVERTED
+#define BEEPER_INVERTED
+
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7cf4478 and 7908dbe.

📒 Files selected for processing (1)
  • configs/HGLRCH743/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (25)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 PB0 in Betaflight, there are three timer options: TIM1_CH2N, TIM3_CH3, and TIM8_CH2N. Only TIM3_CH3 (timer index 2) is suitable for GYRO_CLKIN as the other two are complementary (N) channels. This is confirmed in timer_stm32h7xx.c.
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 in Betaflight, PB0 has multiple timer options but only timer index 2 provides a non-complementary output suitable for GYRO_CLKIN functionality. The other timer options for PB0 are N channels (complementary outputs) which are not appropriate for CLKIN usage.
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the `BOARD_NAME` define in config.h files exactly matches the directory name where the config file is located. For example, if the config file is in configs/AXISFLYINGF7AIO/config.h, then the BOARD_NAME should be defined as "AXISFLYINGF7AIO". This ensures proper board identification and configuration loading in Betaflight.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
PR: betaflight/config#822
File: configs/AXISFLYINGH7MINI/config.h:29-37
Timestamp: 2025-06-23T18:43:31.746Z
Learning: In Betaflight configuration files, feature enablement macros like USE_MAG are build options that can be controlled at compile time, while hardware instance definitions like MAG_I2C_INSTANCE are predefined in board configurations to assist with hardware mapping when those features are enabled at build time.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-22T17:08:23.283Z
Learnt from: haslinghuis
PR: betaflight/config#879
File: configs/AIRBOTSUPERF4V2/config.h:42-45
Timestamp: 2025-08-22T17:08:23.283Z
Learning: In Betaflight board configurations, OSD feature flags like USE_OSD_SD (analog/MAX7456) and USE_OSD_HD (digital/MSP DisplayPort) are typically defined at build time by the build system, not in the individual board config.h files. Board configs can conditionally define OSD-related settings based on these build-time flags.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-03T15:17:30.040Z
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T15:17:30.040Z
Learning: In Betaflight configurations, when a target name suggests dual IMUs (like JHEF7DUAL) but specific hardware variants only have one gyro available, the preferred solution is to use DEFAULT_GYRO_TO_USE macro to specify which gyro to use by default rather than pruning gyro defines or creating redundant configurations. This approach maintains compatibility when the same target is used by multiple hardware variants from the same manufacturer.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-28T16:44:59.686Z
Learnt from: haslinghuis
PR: betaflight/config#656
File: configs/IFLIGHT_F745_AIO/config.h:31-35
Timestamp: 2025-07-28T16:44:59.686Z
Learning: In Betaflight board configurations, when a board design uses the same physical gyro socket but different sensor variants across production batches (e.g., MPU6000 in older batches, ICM42688P in newer batches), the correct approach is to enable both sensor drivers (USE_GYRO_SPI_MPU6000 and USE_GYRO_SPI_ICM42688P) in the same configuration. This allows runtime auto-detection of which sensor is actually present without requiring separate board configurations for each hardware variant.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-19T18:34:22.887Z
Learnt from: osirisinferi
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-19T18:34:22.887Z
Learning: For STM32H743, both UART5_TX (PB6) and UART5_RX (PB5) use alternate function AF14, not AF8. The Port B alternate functions table in the STM32H743 datasheet confirms PB5 supports UART5_RX and PB6 supports UART5_TX, both using AF14.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) with GPIO_AF8_UART4, as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This is a valid pin mapping despite what some generic STM32 documentation might suggest.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-26T14:26:11.863Z
Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 can use PH2 (UART4_RX) and PH3 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c lines 183-212. This is a valid pin mapping for the AT32F435 platform.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-26T14:26:11.863Z
Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 supports multiple pin options including PH2 (UART4_RX) and PH3 (UART4_TX) with GPIO_MUX_8, as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c. The AT32 platform has broader pin support than initially apparent from basic searches.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-14T15:41:14.364Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:79-88
Timestamp: 2025-07-14T15:41:14.364Z
Learning: In STM32F405 configurations, PB1 typically maps to TIM3_CH4 and PC9 typically maps to TIM8_CH4. These are different timers and do not share DMA resources, so there is no conflict when both pins are used simultaneously (e.g., PB1 for LED_STRIP and PC9 for MOTOR4).

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 in Betaflight, PB0 has multiple timer options but only timer index 2 provides a non-complementary output suitable for GYRO_CLKIN functionality. The other timer options for PB0 are N channels (complementary outputs) which are not appropriate for CLKIN usage.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-14T15:38:06.837Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:52-53
Timestamp: 2025-07-14T15:38:06.837Z
Learning: In Betaflight flight controller configurations, it's common and intentional for UART2_RX_PIN and RX_PPM_PIN to share the same GPIO pin (like PA3) because they represent mutually exclusive receiver input protocols. The pin can be configured for either serial receiver input (UART2) or PPM input, but not both simultaneously. This is a standard design pattern in flight controller hardware.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-05-31T17:01:39.423Z
Learnt from: haslinghuis
PR: betaflight/config#798
File: configs/FURYF4OSD/config.h:88-88
Timestamp: 2025-05-31T17:01:39.423Z
Learning: For STM32F4xx platforms, PB1 pin timer definitions are:
1 = DEF_TIM(TIM1, CH3N, PB1, 0, 0)
2 = DEF_TIM(TIM3, CH4, PB1, 0, 0) 
3 = DEF_TIM(TIM8, CH3N, PB1, 0, 0)
Timer instance 2 (TIM3, CH4) is the correct mapping for PB1 motor control on STM32F4xx platforms as defined in src/platform/STM32/timer_stm32f4xx.c

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-07-14T15:47:16.394Z
Learnt from: ot0tot
PR: betaflight/config#681
File: configs/NYX405V1/config.h:26-28
Timestamp: 2025-07-14T15:47:16.394Z
Learning: In Betaflight configuration files, MANUFACTURER_ID values must be exactly 4 ASCII characters long, not 3 characters. All manufacturer IDs in the codebase consistently use 4-character identifiers like AIRB, FOSS, SPBE, MTKS, NERC, etc.

Applied to files:

  • configs/HGLRCH743/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
PR: betaflight/config#881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 PB0 in Betaflight, there are three timer options: TIM1_CH2N, TIM3_CH3, and TIM8_CH2N. Only TIM3_CH3 (timer index 2) is suitable for GYRO_CLKIN as the other two are complementary (N) channels. This is confirmed in timer_stm32h7xx.c.

Applied to files:

  • configs/HGLRCH743/config.h
🔇 Additional comments (4)
configs/HGLRCH743/config.h (4)

26-28: BOARD_NAME and MANUFACTURER_ID look correct.

Name matches directory and MANUFACTURER_ID is 4 chars.


82-83: UART5 PB6/PB5 mapping LGTM.

Matches STM32H7 platform support (AF14). No change needed.


52-57: Please verify SPI3 MOSI on PB2.

On H743, SPI3_MOSI is commonly PB5 or PC12. PB2 as SPI3_SDO/MOSI seems unusual; confirm it’s supported by Betaflight’s SPI pin map for H7 to avoid a nonfunctional flash bus. If PB2 isn’t valid, consider PB5 or PC12.


128-131: Confirm product scope; drop DEFAULT_CURRENT_METER_SCALE if not a stack.

Per earlier thread, remove the scale unless the board ships with a fixed, known shunt. Otherwise users can calibrate.

 #define DEFAULT_CURRENT_METER_SOURCE    CURRENT_METER_ADC
-#define DEFAULT_CURRENT_METER_SCALE     200
 #define DEFAULT_VOLTAGE_METER_SOURCE    VOLTAGE_METER_ADC
 #define DEFAULT_VOLTAGE_METER_SCALE     210

@HGLRC-T HGLRC-T force-pushed the HGLRCH743 branch 3 times, most recently from cf062d4 to 8b21fe3 Compare September 11, 2025 13:51
@HGLRC-T
Copy link
Contributor Author

HGLRC-T commented Sep 11, 2025

Fix all.

@HGLRC-T
Copy link
Contributor Author

HGLRC-T commented Sep 11, 2025

Yes. Modified according to his request. @osirisinferi

Copy link
Contributor

@osirisinferi osirisinferi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@HGLRC-T
Copy link
Contributor Author

HGLRC-T commented Sep 20, 2025

What is the current progress? Can merge it? Because the product is about to be launched... @ot0tot

@ot0tot
Copy link
Contributor

ot0tot commented Sep 20, 2025

What is the current progress? Can merge it? Because the product is about to be launched... @ot0tot

Still waiting on you to supply the updated schematics that were requested June 30, 2025.

@ot0tot
Copy link
Contributor

ot0tot commented Oct 19, 2025

Additional feedback provided in Discord

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants