-
Notifications
You must be signed in to change notification settings - Fork 197
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
base: master
Are you sure you want to change the base?
Conversation
Caution Review failedFailed to post review comments WalkthroughAdds a new STM32H743 board configuration header for DAKEFPVH743_SLIM defining MCU/board/manufacturer IDs, enabled peripherals (sensors, baro, flash, OSD, SDIO), detailed pin/timer/DMA mappings, device instances, gyro/SDIO specifics, and default runtime settings. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
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_PIN
instead of the literalPB7
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 literalPB7
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
📒 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 UART5SERIAL_PORT_USART3
for USART3SERIAL_PORT_USART2
for USART2This matches the expected pattern where USART1-3 use
SERIAL_PORT_USARTx
and 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).
configs/DAKEFPVH743_SLIM/config.h
Outdated
#define MOTOR1_PIN PA0 // M1 TIM2 CH1 | ||
#define MOTOR2_PIN PA1 // M2 TIM2 CH2 | ||
#define MOTOR3_PIN PA2 // M3 TIM2 CH3 | ||
#define MOTOR4_PIN PA3 // M4 TIM2 CH4 | ||
#define MOTOR5_PIN PD12 // M5 TIM4 CH1 | ||
#define MOTOR6_PIN PD13 // M6 TIM4 CH2 | ||
#define MOTOR7_PIN PD14 // M7 TIM4 CH3 | ||
#define MOTOR8_PIN PD15 // M8 TIM4 CH4 | ||
|
||
#define SERVO1_PIN PE9 // S1 TIM1 CH1 | ||
#define SERVO2_PIN PE11 // S2 TIM1 CH2 | ||
#define SERVO3_PIN PC8 // S3 TIM8 CH3 | ||
#define SERVO4_PIN PC9 // S4 TIM8 CH4 |
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.
This configuration is not valid as explained in the Discord.
Add new target DAKEFPVH743_SLIM.
Checklist
Summary by CodeRabbit