-
Notifications
You must be signed in to change notification settings - Fork 161
Add BROTHERHOBBYH743 #753
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?
Add BROTHERHOBBYH743 #753
Conversation
213d845
to
e37c196
Compare
e37c196
to
55163d4
Compare
WalkthroughA new configuration header file for the BROTHERHOBBYH743 flight controller is introduced. This file specifies hardware mappings, sensor configurations, peripheral assignments, timer mappings, DMA options, and board identification macros for the STM32H743 MCU platform, enabling support for board-specific features and components. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Firmware
participant BROTHERHOBBYH743 Board
User->>Firmware: Select BROTHERHOBBYH743 target
Firmware->>BROTHERHOBBYH743 Board: Apply config.h hardware mappings
Firmware->>BROTHERHOBBYH743 Board: Initialize peripherals (motors, servos, sensors, OSD, SD card)
Firmware->>BROTHERHOBBYH743 Board: Configure timers, DMA, and IO
BROTHERHOBBYH743 Board-->>Firmware: Board ready for operation
Possibly related PRs
Suggested reviewers
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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/BROTHERHOBBYH743/config.h (1)
145-158
: Fix inconsistent indentation in timer pin mapping.The timer pin mapping has inconsistent indentation - line 146 uses spaces while other lines use tabs.
#define TIMER_PIN_MAPPING \ - TIMER_PIN_MAP( 0, MOTOR1_PIN, 2, 0 ) \ + TIMER_PIN_MAP( 0, MOTOR1_PIN, 2, 0 ) \ TIMER_PIN_MAP( 1, MOTOR2_PIN, 2, 1 ) \
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/BROTHERHOBBYH743/config.h
(1 hunks)
🔇 Additional comments (10)
configs/BROTHERHOBBYH743/config.h (10)
1-28
: LGTM! Board identification and basic configuration are correctly defined.The license header, pragma guard, MCU target, and board identification macros follow standard Betaflight conventions.
29-50
: LGTM! LED, beeper, motor, and servo pin assignments are well-structured.The pin assignments for LEDs, beeper (with proper inversion flag), 8 motor outputs, and 4 servo outputs are clearly defined and follow consistent naming conventions.
51-67
: LGTM! SPI bus configurations are comprehensive and correctly defined.All four SPI buses are properly configured with SCK, SDI, and SDO pin assignments following consistent naming patterns.
68-82
: LGTM! Dual gyro/accelerometer configuration is correctly implemented.The dual ICM42688P sensor setup with different SPI instances, chip select pins, external interrupt pins, and alignment settings (CW90_DEG vs CW0_DEG) provides redundancy and proper hardware integration.
83-99
: LGTM! OSD and SD card configurations are properly defined.The MAX7456 OSD configuration and SDIO-based SD card setup with 4-bit mode and proper pin assignments follow Betaflight standards.
100-109
: LGTM! I2C sensor configurations are correctly implemented.The I2C bus configurations for barometer (DPS310 on I2C2) and magnetometer (on I2C1) with proper pin assignments are well-defined.
127-143
: LGTM! ADC and PINIO configurations are properly defined.The ADC channels for battery voltage, RSSI, and current sensing with appropriate default scales, plus the two configurable PINIO pins with box assignments, are correctly configured.
160-169
: LGTM! DMA configurations are appropriately defined.The ADC and timer DMA options are properly configured for the STM32H743 platform.
110-126
: Verify UART5 availability on this board.The UART configuration defines UARTs 1,2,3,4,6,7,8 but UART5 is missing. Please confirm if UART5 is intentionally omitted due to hardware constraints or if this is an oversight.
#!/bin/bash # Description: Check if other STM32H743 boards in the repository also omit UART5 # Expected: Find patterns of UART5 usage or omission in similar boards echo "Searching for UART5 usage in STM32H743 configurations:" fd -e h . configs/ | xargs rg "STM32H743" -l | xargs rg "UART5" -A 2 -B 2 echo -e "\nSearching for UART5 patterns in all configs:" fd -e h . configs/ | xargs rg "UART5_" | head -10
152-158
: ```shell
#!/bin/bashInspect Blackbox/SPI DMA settings in BROTHERHOBBYH743 config
echo "Checking DMA options in BROTHERHOBBYH743/config.h:"
rg -n "DMA" configs/BROTHERHOBBYH743/config.h || echo "No DMA definitions found."echo -e "\nChecking SPI settings in BROTHERHOBBYH743/config.h:"
rg -n "SPI" configs/BROTHERHOBBYH743/config.h || echo "No SPI settings found."echo -e "\nChecking Blackbox log interface definitions:"
rg -n "BLACKBOX" configs/BROTHERHOBBYH743/config.h || echo "No BLACKBOX definitions found."</details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
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/BROTHERHOBBYH743/config.h (1)
136-142
: Clarify PINIO configuration values.The PINIO pins use config value 129 and box assignments 40/41. Consider adding comments to explain what these specific values represent in the Betaflight context for future maintainability.
// PINIO +// PINIO config 129: [Add description of what this config enables] +// Box 40/41: [Add description of the box function assignments] #define PINIO1_PIN PD10 #define PINIO1_CONFIG 129 #define PINIO1_BOX 40 #define PINIO2_PIN PD11 #define PINIO2_CONFIG 129 #define PINIO2_BOX 41
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/BROTHERHOBBYH743/config.h
(1 hunks)
🔇 Additional comments (6)
configs/BROTHERHOBBYH743/config.h (6)
1-27
: LGTM! Well-structured header and board identification.The file follows proper Betaflight conventions with correct GPL licensing, pragma once guard, and appropriate MCU target definition for the STM32H743 platform.
68-81
: Excellent dual gyro setup for redundancy.The dual ICM42688P configuration provides excellent redundancy with proper SPI instance separation (SPI1 and SPI4), distinct chip select pins, and appropriate alignment settings. The CW90_DEG and CW0_DEG alignments suggest different physical orientations for each sensor.
88-98
: Excellent SD card configuration using SDIO.The SDIO interface configuration with 4-bit mode provides superior performance compared to SPI-based storage. The pin assignments and default blackbox device setting are appropriate for this high-performance flight controller.
110-125
: Note: UART5 is not configured.The configuration includes UART1-4, 6-8 but omits UART5. This might be intentional if UART5 conflicts with other peripherals or is reserved for internal use on this STM32H743 implementation.
#!/bin/bash # Description: Check if UART5 is intentionally omitted or if it's used elsewhere # Expected: Either find UART5 usage or confirm it's intentionally omitted echo "Searching for any UART5 references in Betaflight configs..." rg -r "UART5" configs/ --type h | head -10 echo -e "\nChecking STM32H743 UART5 availability in other configs..." fd "config.h" configs/ --exec rg -l "STM32H743" {} \; | xargs rg "UART5" || echo "No UART5 found in other H743 configs"
36-49
: Verify 8-motor configuration requirements.The configuration supports 8 motor outputs (MOTOR1-MOTOR8), which is typical for octocopter setups. Ensure this aligns with the intended board capabilities and that the pin assignments don't conflict with other critical functions.
#!/bin/bash # Description: Verify motor pin assignments don't conflict with other configurations # Expected: No pin conflicts between motor pins and other peripheral pins echo "Checking for pin conflicts in motor assignments..." rg -A 2 -B 2 "P[A-E][0-9]+" configs/BROTHERHOBBYH743/config.h | \ grep -E "(PB0|PB1|PA0|PA1|PA2|PA3|PD12|PD13)" | \ sort | uniq -c | awk '$1 > 1 {print "Potential conflict: " $2}'
145-158
: Verify timer channel assignments for motors.The timer mapping uses channel indices 0-7 for motors, with some motors sharing timer 2. Ensure these channel assignments are valid for the STM32H743 timer configuration and don't exceed hardware limits.
#!/bin/bash # Description: Verify timer channel assignments are within STM32H743 capabilities # Expected: Confirm timer channels don't exceed hardware limits echo "Analyzing timer channel assignments..." grep "TIMER_PIN_MAP" configs/BROTHERHOBBYH743/config.h | \ awk '{print $4, $5}' | \ sort | uniq -c | \ awk '$1 > 4 {print "Warning: Timer " $2 " has " $1 " channels assigned"}' echo -e "\nChecking similar H743 configurations for reference..." fd "config.h" configs/ --exec rg -l "STM32H743" {} \; | \ head -3 | xargs rg -A 15 "TIMER_PIN_MAPPING" | head -20
@ot0tot should be ready now |
Summary by CodeRabbit