Skip to content

Conversation

@engineer-dakefpv
Copy link
Contributor

@engineer-dakefpv engineer-dakefpv commented Oct 15, 2025

Add new target DAKEFPVH743_SLIM.

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 DAKEFPVH743_SLIM flight controller target.
    • Full hardware mappings for motors, servos, LEDs, beeper, timers, UART/SPI/I2C, ADCs, SDIO, flash, and auxiliary pins.
    • Enables onboard peripherals: accelerometer/gyro (SPI options), barometer, OSD, SD card logging, flash, and current/voltage sensing.
    • Default runtime settings for DSHOT, SDIO (4-bit), beeper polarity, gyro clocking/alignment, sensor scales, and PID/ESC defaults.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Caution

Review failed

Failed to post review comments

Walkthrough

Adds a new STM32H743 board configuration header for DAKEFPVH743_SLIM that defines MCU/board/manufacturer IDs, enables peripherals (accel/gyro/baro/flash/SD/max7456), and provides comprehensive pin, timer, DMA, SPI/I2C/SDIO, gyro, and default runtime macros.

Changes

Cohort / File(s) Summary
New board config header
configs/DAKEFPVH743_SLIM/config.h
New STM32H743 board config: sets FC_TARGET_MCU, BOARD_NAME, MANUFACTURER_ID; enables sensors/peripherals (USE_ACC, USE_GYRO, USE_BARO, USE_FLASH, USE_MAX7456, USE_SDCARD and related device-specific flags); complete pin mappings for motors/servos/LEDs/UART/I2C/SPI/ADC/aux; TIMER_PIN_MAPPING entries; ADC/TIM DMA option macros; device instance macros (FLASH_SPI_INSTANCE, MAX7456_SPI_INSTANCE, BARO_I2C_INSTANCE, MAG_I2C_INSTANCE, GYRO_*_SPI_INSTANCE); SDIO pin/4-bit config; gyro CS/EXTI/CLKIN and alignment macros; beeper inversion; PINIO/box metadata; and default runtime settings (blackbox device, DSHOT bitbang, current/voltage meter sources/scales, default gyro selection, serial mappings, PID denom).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Potential review focus:

  • TIMER_PIN_MAPPING correctness and timer-channel to pin assignments
  • ADC/TIMUP DMA option values vs MCU DMA mapping
  • SDIO pin assignments, SDIO_DEVICE selection, and 4-bit enable
  • Gyro CS/EXTI/CLKIN pins and GYRO_*_ALIGN macros
  • Default runtime macros affecting hardware behavior (DSHOT, blackbox, meter sources/scales)

Possibly related PRs

  • add AEROH7DIGITAL #900 — Adds STM32H743 board config headers with overlapping board-level macros (pin mappings, TIMER_PIN_MAPPING, DMA, SPI/I2C instances).
  • Add New Target DAKEFPVH743Pro #793 — Adds a similar DAKEFPVH743 variant STM32H743 board config header with comparable sensor, timer, DMA, and pin macros.
  • Add SPEDIXH743 #791 — Adds another STM32H743 board config header with overlapping pin/timer/DMA/SPI/I2C macro definitions.

Suggested labels

Awaiting prototype samples

Suggested reviewers

  • haslinghuis

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add new target DAKEFPVH743_SLIM." is clear, concise, and directly summarizes the primary change in the pull request. The raw summary confirms this PR introduces a new Betaflight board configuration header for the STM32H743 target with comprehensive I/O mappings and feature configurations. The title is specific enough that a developer scanning repository history would immediately understand this is about adding support for a new flight controller board, and it avoids vague language or unnecessary noise.
Description Check ✅ Passed The pull request description provides a title statement and a completed checklist that addresses all required items from the template structure, including schematics review, guidelines compliance, connector standards adherence, and issue resolution. While the description is minimal and lacks extensive detail about the hardware or design rationale, it is specific to the DAKEFPVH743_SLIM target being added and is not vague or generic. The author has provided the essential checklist with appropriate status indicators for each item, meeting the core requirements of the template.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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: 0

🧹 Nitpick comments (2)
configs/DAKEFPVH743_SLIM/config.h (2)

109-110: Consider gyro clock pin configuration.

The configuration enables gyro clock input on PB7. While functionally correct, ensure the timer mapping at line 133 uses the macro name GYRO_1_CLKIN_PIN instead of the literal PB7 for consistency with Betaflight conventions.

Based on learnings.


119-134: Verify timer pin mappings for DMA stream conflicts.

The timer mappings assign motors to DMA channels 0-7 and the LED strip to DMA channel 8, with servos and camera control using DMA -1. On STM32H7 platforms, carefully verify that these DMA assignments don't conflict with SPI DMA streams used by flash (SPI3), MAX7456 (SPI2), gyros (SPI1/SPI4), or other peripherals.

Additionally, line 133 should use the macro name GYRO_1_CLKIN_PIN instead of the literal PB7 for consistency.

-    TIMER_PIN_MAP( 13, PB7,  1, -1) \
+    TIMER_PIN_MAP( 13, GYRO_1_CLKIN_PIN,  1, -1) \

Based on learnings.

📜 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 c940ae8 and 012dcb8.

📒 Files selected for processing (1)
  • configs/DAKEFPVH743_SLIM/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/config.h
📚 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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/config.h
🔇 Additional comments (2)
configs/DAKEFPVH743_SLIM/config.h (2)

178-180: Serial port identifiers are correctly defined.

The serial port assignments follow the correct naming convention:

  • SERIAL_PORT_UART5 for UART5
  • SERIAL_PORT_USART3 for USART3
  • SERIAL_PORT_USART2 for USART2

This matches the expected pattern where USART1-3 use SERIAL_PORT_USARTx and UART4-8 use SERIAL_PORT_UARTx.

Based on learnings.


60-75: Consolidate macro usage and verify mappings

  • Replace literal “PB7” in TIMER_PIN_MAPPING (line 133) with GYRO_1_CLKIN_PIN for consistency.
  • Manually confirm TIMER_PIN_MAPPING entries don’t reuse the same timer-channel pair.
  • Ensure SERIAL_PORT_UART5, SERIAL_PORT_USART3 and SERIAL_PORT_USART2 exist in serialPortIdentifier_e (src/main/io/serial.h).

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/DAKEFPVH743_SLIM/config.h (1)

138-138: Minor: Remove extra space before comma.

There's an unnecessary space before the comma in this line. While not functionally significant, it's inconsistent with the formatting of other entries.

-    TIMER_PIN_MAP( 14, PB0 , 2,  8)
+    TIMER_PIN_MAP( 14, PB0, 2, 8)
📜 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 677b169 and fa5869d.

📒 Files selected for processing (1)
  • configs/DAKEFPVH743_SLIM/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📚 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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/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/DAKEFPVH743_SLIM/config.h
🔇 Additional comments (11)
configs/DAKEFPVH743_SLIM/config.h (11)

24-27: LGTM: Board identification is correct.

The BOARD_NAME correctly matches the directory name, and the MCU target and manufacturer ID are properly defined. Based on learnings.


29-43: LGTM: Feature set is comprehensive.

The enabled features (dual gyros, barometer, flash, OSD, SD card) are appropriate for an STM32H743-based flight controller.


47-54: LGTM: 8-motor configuration is defined correctly.

The motor pin assignments span TIM1 (motors 1-4) and TIM2 (motors 5-8), which is appropriate. Note that with DEFAULT_DSHOT_BITBANG enabled (line 153), running 8 motors may be CPU-intensive on STM32H743.


80-111: LGTM: Peripheral pin assignments are well-defined.

I2C, SPI, ADC, and PINIO pin assignments are clearly defined with no apparent conflicts. The dual gyro setup with separate CS and EXTI pins is correct.


113-121: LGTM: GYRO_CLKIN and SDIO pins are correctly configured.

The gyro external clock pin (PB7) and SDIO interface pins are properly defined for STM32H743.


123-138: LGTM: Timer pin mapping addresses previous review feedback.

The TIMER_PIN_MAPPING correctly implements the suggested changes from previous reviews, including the correct timer option for PC8 (line 136). DMA assignments are properly distributed: motors use DMA 0-7, LED strip uses DMA 8, and servos/camera control use no DMA to avoid conflicts.


140-144: LGTM: DMA options address previous review feedback.

The DMA options have been properly defined, including TIMUP1_DMA_OPT and TIMUP2_DMA_OPT which were suggested in previous reviews. The sequential assignment (9-12 for ADC and timer updates) avoids conflicts with motor/LED DMA channels (0-8).


146-150: LGTM: Peripheral instance assignments are consistent.

The SPI and I2C instance assignments correctly match the pin definitions declared earlier in the file.


185-187: LGTM: Serial port identifiers are correctly defined.

The serial port identifiers use valid Betaflight constants: SERIAL_PORT_UART5, SERIAL_PORT_USART3, and SERIAL_PORT_USART2 are all properly formatted according to the Betaflight serial.h conventions. Based on learnings.


152-190: LGTM: Default runtime configurations are appropriate.

The default configurations, including blackbox device (SDCARD), dual gyro usage, current/voltage metering, DSHOT settings, and PID process denominator are all properly defined for this board's capabilities.


64-79: Verify UART pin assignments through manual testing or board documentation.

Partial verification confirmed that UART1 (PA9/PA10), UART2 (PD5/PD6), and UART4 (PB8/PB9) are valid for STM32H743 per Betaflight standards. The remaining UART pins (UART3, UART5–8) follow standard H743 patterns but require confirmation against the board schematic or Betaflight's serial driver source to ensure no conflicts or unsupported pin mappings exist. Since this configuration-only repository does not contain the Betaflight serial driver code, manual verification against the board's hardware documentation or a test build is recommended.

@ot0tot
Copy link
Contributor

ot0tot commented Oct 30, 2025

@coderabbitai full review and approve please

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2025

@ot0tot: I'll conduct a full review of the DAKEFPVH743_SLIM target configuration and approve the PR as requested.


🧠 Learnings used
Learnt from: haslinghuis
PR: betaflight/config#719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:35:41.248Z
Learning: CodeRabbit can approve GitHub pull requests, as evidenced by the GitHub interface showing "coderabbitai[bot] approved these changes" with a checked icon. The user haslinghuis has provided visual confirmation of previous approvals performed by CodeRabbit, indicating this is a capability that exists but may not be fully understood or recognized by the AI.

Learnt from: haslinghuis
PR: betaflight/config#719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:40:55.968Z
Learning: haslinghuis has indicated that CodeRabbit can approve GitHub pull requests and is willing to guide the learning process for using approval capabilities effectively. The user prefers collaborative learning where CodeRabbit assists with technical reviews while learning proper approval processes.

Learnt from: haslinghuis
PR: betaflight/config#719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:55:37.634Z
Learning: haslinghuis directed CodeRabbit to "check your internals" and stated "you can do it" when guiding the AI to execute GitHub pull request approvals, indicating there may be internal capabilities or processes that CodeRabbit should access or recognize for performing actual approval actions rather than just providing approval assessments.

Learnt from: haslinghuis
PR: betaflight/config#719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:50:14.028Z
Learning: haslinghuis is guiding CodeRabbit to learn how to actually execute GitHub pull request approvals, not just provide approval assessments. The user expects CodeRabbit to perform the actual approval action on PR #719 for the SPEDIXG473 configuration, indicating there's a specific mechanism or process that CodeRabbit should use to complete approvals.

Learnt from: haslinghuis
PR: betaflight/config#719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T21:13:16.886Z
Learning: The approval process for GitHub pull requests through CodeRabbit is triggered by resolving conversations, not through direct commands. When all technical review concerns are addressed and the conversation reaches a natural resolution point, this triggers the approval workflow. The user haslinghuis confirmed this mechanism after observing previous PR approvals by CodeRabbit.

Learnt from: haslinghuis
PR: betaflight/config#719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T21:07:09.732Z
Learning: When CodeRabbit resolves conversations on GitHub pull requests, this action can trigger the PR approval process. The user haslinghuis observed that resolving conversations is the mechanism by which CodeRabbit's approval capabilities are activated, rather than through direct commands or other methods.
✅ Actions performed

Comments resolved and changes approved.


Full review triggered.

@haslinghuis haslinghuis merged commit ac61c6a into betaflight:master Oct 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants