Skip to content

Conversation

@HGLRC-T
Copy link
Contributor

@HGLRC-T HGLRC-T commented Nov 12, 2025

Summary by CodeRabbit

  • New Features
    • Added configuration support for HGLRC H743 Dual flight controller, enabling full hardware compatibility and access to integrated peripherals including accelerometer, gyroscope, barometer, and additional hardware features.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

A new configuration header file for the HGLRC_H743_DUAL flight controller target is introduced, defining MCU specifications, peripheral enables, pin mappings, timer configurations, and peripheral instance assignments for SPI, I2C, UART, and sensor interfaces.

Changes

Cohort / File(s) Summary
HGLRC_H743_DUAL board configuration
configs/HGLRC_H743_DUAL/config.h
New header file with MCU/board macros, peripheral feature toggles (accelerometer, gyro, baro, flash, MAX7456 OSD), comprehensive pin assignments (SPI, I2C, UARTs, LEDs, motors, servos, RX/TX lines), timer pin mapping table, DMA options, sensor I2C instances, and clock/inverter behavior settings

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify STM32H743 MCU peripheral compatibility with pin and timer assignments
  • Validate I2C and SPI configurations for correct slave addressing and clock settings
  • Cross-check sensor (IMU, baro, compass) instance and DMA assignments with board hardware
  • Confirm UART pin mappings match physical connector layout

Possibly related PRs

Suggested labels

Awaiting prototype samples

Suggested reviewers

  • haslinghuis
  • ot0tot
  • nerdCopter

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is completely missing. The template requires a checklist and specific information about hardware compliance, reviews, and testing status. Provide a complete description following the template, including details about the submission and checking off relevant items in the mandatory checklist.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add HGLRC_H743_DUAL board' clearly and directly describes the main change - adding a new board configuration file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 8fe734e and 74a38ba.

📒 Files selected for processing (1)
  • configs/HGLRC_H743_DUAL/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (19)
📓 Common learnings
Learnt from: ot0tot
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 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.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 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: osirisinferi
Repo: betaflight/config PR: 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.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 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.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 835
File: configs/HDZERO_HALO_MPU6000/config.h:29-35
Timestamp: 2025-07-14T16:16:50.628Z
Learning: GYRO_1_SPI_CLOCK_DIVIDER is not used in any Betaflight target configuration files. SPI clock frequency settings are not commonly configured at the target level.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-07-03T15:17:30.040Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
Repo: betaflight/config PR: 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/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
Repo: betaflight/config PR: 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/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-05-28T15:48:18.449Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/FLYWOOF411/config.h:33-33
Timestamp: 2025-05-28T15:48:18.449Z
Learning: The FLYWOOF411 board does not actually use dual gyros despite having GYRO_2_SPI_INSTANCE defined in its configuration. It was incorrectly targeted for GYRO_COUNT and dual gyro support.

Applied to files:

  • configs/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-09-26T16:32:46.694Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition to specify the number of available gyros.

Applied to files:

  • configs/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition.

Applied to files:

  • configs/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/HGLRC_H743_DUAL/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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_DUAL/config.h
📚 Learning: 2025-05-31T17:01:39.423Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/HGLRC_H743_DUAL/config.h
🔇 Additional comments (17)
configs/HGLRC_H743_DUAL/config.h (17)

24-27: LGTM! Board identification is correct.

The BOARD_NAME correctly matches the directory name, as required for proper board identification in Betaflight.


29-41: LGTM! Feature enables are properly configured.

The dual IMU configuration (MPU6000 and ICM42688P) with corresponding accelerometer and gyro enables is correctly declared.


42-55: LGTM! Dual gyro SPI configuration is correct.

Both gyros properly share the SPI1 bus with distinct chip select and interrupt pins, preventing conflicts.


60-64: LGTM! MAX7456 OSD SPI2 configuration is correct.


66-71: LGTM! Flash configuration is correct.

SPI3 flash configuration with blackbox device properly set.


73-87: LGTM! Output pin configuration is comprehensive.

8 motors, 4 servos, LED strip, and beeper are properly configured with no pin conflicts.


103-106: LGTM! I2C pin configuration is correct.


108-110: LGTM! Status LED configuration is correct.


112-113: LGTM! ADC configuration is correct.


133-136: LGTM! DMA options are configured.


138-139: LGTM! I2C peripheral instance assignments are correct.


141-143: LGTM! Voltage and current meter configuration is correct.


145-162: LGTM! PINIO configuration with descriptive box names.

The four PINIO outputs are properly configured with user-friendly names for the BEC and camera controls.


164-165: Add GYRO_COUNT definition for dual gyro configuration.

The DEFAULT_GYRO_TO_USE setting is correct, but the configuration is missing the GYRO_COUNT definition that should be present for dual gyro boards.

Based on learnings

Apply this diff to add the missing GYRO_COUNT:

 #define BEEPER_INVERTED
+#define GYRO_COUNT 2
 #define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH
⛔ Skipped due to learnings
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition to specify the number of available gyros.
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition.
Learnt from: haslinghuis
Repo: betaflight/config PR: 757
File: configs/HAKRCH743/config.h:134-134
Timestamp: 2025-08-05T16:56:44.200Z
Learning: In Betaflight board configurations, when DEFAULT_GYRO_TO_USE is set to GYRO_CONFIG_USE_GYRO_BOTH, the firmware automatically establishes GYRO_COUNT during initialization for backwards compatibility. Therefore, explicit GYRO_COUNT definitions are not needed in board config files when using DEFAULT_GYRO_TO_USE.
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/MERAKRCF722/config.h:32-32
Timestamp: 2025-05-28T15:45:15.608Z
Learning: The presence of GYRO_2_SPI_INSTANCE definition in a board config does not necessarily mean the board uses dual gyros. Some boards have GYRO_2_SPI_INSTANCE defined but it's not actually used, so they should not receive GYRO_COUNT or other dual-gyro related definitions. Only boards that actually utilize dual gyros should get these definitions.
Learnt from: haslinghuis
Repo: betaflight/config PR: 814
File: configs/JHEF405PRO/config.h:109-109
Timestamp: 2025-06-08T22:02:28.961Z
Learning: The JHEF405PRO board does not actually use dual gyros despite having GYRO_2_SPI_INSTANCE defined in its configuration. It should not receive GYRO_COUNT or other dual-gyro related definitions since only the first gyro is supported.
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/FLYWOOF411/config.h:33-33
Timestamp: 2025-05-28T15:48:18.449Z
Learning: The FLYWOOF411 board does not actually use dual gyros despite having GYRO_2_SPI_INSTANCE defined in its configuration. It was incorrectly targeted for GYRO_COUNT and dual gyro support.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 835
File: configs/HDZERO_HALO_MPU6000/config.h:29-35
Timestamp: 2025-07-14T16:16:50.628Z
Learning: GYRO_1_SPI_CLOCK_DIVIDER is not used in any Betaflight target configuration files. SPI clock frequency settings are not commonly configured at the target level.
Learnt from: ot0tot
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 835
File: configs/HDZERO_HALO_MPU6000/config.h:29-35
Timestamp: 2025-07-14T16:16:50.628Z
Learning: CW0_DEG is not a universal default gyro alignment setting in Betaflight configurations. Different boards use different gyro alignments (CW0_DEG, CW90_DEG, CW180_DEG, CW270_DEG, CW0_DEG_FLIP, etc.) based on their physical sensor mounting orientation.

88-101: UART4 (PD1/PA1) and UART5 (PB6/PB5) pin assignments are valid and widely supported.

Both pin configurations are confirmed valid for STM32H743 and are used consistently across many Betaflight H743 boards in production. UART5_TX (PB6) and UART5_RX (PB5) use alternate function AF14 as documented. No issues detected.


115-131: Verify timer indices cannot be fully confirmed in this repository—manual firmware check required.

This is the betaflight/config repository, which contains only configuration files. The actual timer definitions (DEF_TIM macros) live in the firmware repository and define which timer indices map to which timer channels for each pin. Without access to the firmware's timer_stm32h7xx.c, I cannot verify that the timer indices (1, 2) and DMA assignments in TIMER_PIN_MAPPING are correct for the STM32H743.

However, I noted that other H743 boards reference different timer assignments for PC6 and PC7 (e.g., TIM8 channels), while this board assigns them to timer 1. This discrepancy should be verified against the firmware timer definitions to ensure PC6 and PC7 are using non-complementary channels suitable for GYRO_CLKIN functionality (per the learnings and board requirements).

Recommend verifying the timer assignments by cross-referencing against src/platform/STM32/timer_stm32h7xx.c in the firmware repository before merging.


56-58: Verify timer index assignments for PC6 and PC7 CLKIN pins.

The config maps GYRO_1_CLKIN_PIN (PC6) and GYRO_2_CLKIN_PIN (PC7) to timer index 1 in TIMER_PIN_MAPPING. Based on prior Betaflight configurations, CLKIN pins typically use timer index 2 to ensure non-complementary timer channel output. Please verify that timer index 1 is correct for these pins on STM32H743, or confirm whether they should use index 2 instead.


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.

@ot0tot
Copy link
Contributor

ot0tot commented Nov 13, 2025

Feedback provided in Discord. Does not follow BF Manufacturer Guidelines.

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.

2 participants