-
Notifications
You must be signed in to change notification settings - Fork 205
Add SKYSTARSF435PRO #750
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 SKYSTARSF435PRO #750
Conversation
Co-authored-by: Mark Haslinghuis <[email protected]>
WalkthroughAdds a new board configuration header for SKYSTARSF435PRO that declares MCU/board identifiers, enables sensors/peripherals, and provides complete pin, timer, DMA, I2C/SPI, ADC, and default system/device mappings for the board. Changes
Sequence Diagram(s)(omitted — changes are a static board configuration header; no control-flow modifications) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 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: 1
🧹 Nitpick comments (3)
configs/SKYSTARSF435PRO/config.h (3)
40-49: Clarify shared RX/LED strip pin
TheRX_PPM_PINonPA8is commented out in favor ofLED_STRIP_PINon the same pad. Consider adding a comment above to explain this repurpose for future clarity.
77-85: Review ADC, PINIO, and CS/EXTI pin usage
- Verify
ADC_VBAT_PIN(PC2) andADC_CURR_PIN(PC1) are wired to the proper voltage divider/current-sense circuits.- Ensure
PINIO1_PIN(PC0) andPINIO2_PIN(PC5) are uncommitted GPIOs, and theirBOX_USER?_NAMElabels match the silkscreen.- Confirm
GYRO_1_EXTI_PIN = PC4supports EXTI and doesn’t clash with other interrupt lines.
102-108: Reduce magic numbers in PINIO configuration
PINIO1_CONFIGandPINIO2_CONFIGuse raw values (1,129). Consider defining named constants or bitfield macros for clarity, e.g.:#define PINIO_INPUT_PULLDOWN 1 #define PINIO_OUTPUT_OPENDRAIN 129
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
configs/SKYSTARSF435PRO/config.h(1 hunks)
🔇 Additional comments (7)
configs/SKYSTARSF435PRO/config.h (7)
22-28: Verify target MCU, board name, and manufacturer ID
Ensure thatAT32F435Mis indeed the MCU used on this board and that"SKST"is a unique, 4-character manufacturer ID that doesn’t collide with existing entries.
29-38: Confirm sensor and peripheral availability
You’ve enabled bothUSE_BARO_BMP280andUSE_BARO_DPS310—please verify that both barometer sensors are physically present and intended for simultaneous operation. Similarly, confirm that the ICM42688P is wired for SPI so thatUSE_ACC_SPI_ICM42688PandUSE_GYRO_SPI_ICM42688Pare correct.
50-62: Verify UART5_RX pin availability
UART5_RXis assigned toPD2. Please confirm that Port D Pin 2 is accessible on the SKYSTARSF435PRO layout and not used by another peripheral (e.g., I²C or sensor EXTI).
63-66: Validate I2C2 pin mapping on Port H
I²C2 is mapped toPH2/PH3. Ensure that Port H Pins 2 and 3 are exposed on your chosen package and not reserved by boot mode straps or external components.
67-76: Confirm LED0 and SPI pin assignments
LED0_PINis onPC3—verify it doesn’t conflict with ADC or EXTI.- SPI1/2/3 SCK, SDI, SDO pins look standard; please double-check the alternate-function (AF) mapping on AT32F435M to ensure each pin is set to the correct AF number.
97-101: Approve DMA and I²C instance selections
ADC1_DMA_OPT= 8 matches the default ADC1 DMA stream.BARO_I2C_INSTANCE= I2CDEV_2 andMAG_I2C_INSTANCE= I2CDEV_1 align with the pin mappings above.
110-119: Verify default system and peripheral settings
The defaults (flash blackbox, DSHOT bitbang on, ADC meters, inverted beeper, 8 MHz HSE, SPI instances,CW270_DEGgyro alignment) appear consistent. Please validate that these align with the hardware wiring and board documentation.
|
what do we need to do to get this finished |
nerdCopter
left a 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.
- approving for workflow, but seems to need code attention
Remove unused PWM define
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/SKYSTARSF435PRO/config.h (2)
95-95: Consider removing unnecessary blank line.This blank line appears to be extraneous. It may be what the maintainer was referring to with "Remove or implement :)".
Apply this diff to remove the blank line:
TIMER_PIN_MAP( 8, PA8, 1, 7 ) - #define ADC1_DMA_OPT 8
108-108: Consider removing unnecessary blank line.This blank line appears to be extraneous, similar to line 95.
Apply this diff to remove the blank line:
#define BOX_USER2_NAME "12V BEC" - #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/SKYSTARSF435PRO/config.h(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 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/SKYSTARSF435PRO/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/SKYSTARSF435PRO/config.h
🔇 Additional comments (8)
configs/SKYSTARSF435PRO/config.h (8)
1-22: LGTM: License header and include guard are correct.The GPL v3 license header is complete and properly formatted. The
#pragma oncedirective is appropriate for this codebase.
24-27: LGTM: MCU and board identification correctly defined.The AT32F435M MCU target, board name, and SKST manufacturer ID are properly configured.
29-38: LGTM: Feature flags appropriately defined.The sensor and peripheral feature flags are correctly configured. Supporting both BMP280 and DPS310 barometers provides flexibility for different hardware variants.
40-83: LGTM: Pin definitions are complete and consistent.All pin assignments are unique with no conflicts detected. The configuration provides comprehensive coverage of motors, servos, UARTs, I2C, SPI, ADC, and auxiliary pins.
85-93: LGTM: Timer pin mappings are correctly configured.The timer and DMA assignments are appropriate. Servo pins correctly use
-1to disable DMA as confirmed in previous review discussions. No DMA stream conflicts detected.Based on learnings
96-96: LGTM: ADC DMA option correctly set.The ADC1_DMA_OPT value of 8 is correct as confirmed by the maintainer in previous review comments.
98-106: LGTM: I2C and PINIO configurations are correct.I2C instance assignments match the pin definitions. PINIO configurations for camera and BEC control are properly defined with appropriate box IDs and user-friendly names.
109-118: LGTM: Default device settings are correctly configured.All default settings are properly defined and consistent with the hardware configuration:
- Blackbox, gyro, MAX7456, and flash SPI instance assignments match their respective chip select pins
- ADC-based metering aligns with the defined VBAT and CURR pins
- DSHOT bitbanging and beeper inversion are appropriate for this board
- 8MHz system clock matches the MCU configuration
Summary by CodeRabbit