-
Notifications
You must be signed in to change notification settings - Fork 205
Add new target DAKEFPVH743_SLIM. #926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new target DAKEFPVH743_SLIM. #926
Conversation
|
Caution Review failedFailed to post review comments WalkthroughAdds 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Potential review focus:
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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_PINinstead of the literalPB7for 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_PINinstead of the literalPB7for 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
📒 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_UART5for UART5SERIAL_PORT_USART3for USART3SERIAL_PORT_USART2for USART2This matches the expected pattern where USART1-3 use
SERIAL_PORT_USARTxand UART4-8 useSERIAL_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).
Co-authored-by: ot0tot <[email protected]>
Co-authored-by: ot0tot <[email protected]>
There was a problem hiding this 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
📒 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.
|
@coderabbitai full review and approve please |
|
@ot0tot: I'll conduct a full review of the DAKEFPVH743_SLIM target configuration and approve the PR as requested. 🧠 Learnings used✅ Actions performedComments resolved and changes approved. Full review triggered. |
Add new target DAKEFPVH743_SLIM.
Checklist
Summary by CodeRabbit