Skip to content

Conversation

@ot0tot
Copy link
Contributor

@ot0tot ot0tot commented Apr 11, 2025

Summary by CodeRabbit

  • New Features
    • Added support for the SKYSTARSF435PRO flight controller board.
    • Includes onboard sensor and peripheral support, complete hardware pin mappings (motors, servos, beeper, LEDs, UART/I2C/SPI/ADC/GPIO), timer and DMA configurations, and sensible default device and system settings for out-of-the-box use.

ot0tot and others added 2 commits April 11, 2025 16:53
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
@ot0tot ot0tot marked this pull request as ready for review May 17, 2025 04:40
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 17, 2025

Walkthrough

Adds 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

Cohort / File(s) Change Summary
New board config
configs/SKYSTARSF435PRO/config.h
Added new board configuration header defining MCU, board name, manufacturer ID, feature flags (accel/gyro/baro/flash/OSD), comprehensive pin mappings (motors/servos/beeper/LEDs/UART/I2C/SPI/ADC/GPIO), timer pin mapping macro, DMA/I2C/SPI instance selections, pin-IO box configs, default device and meter sources, system HSE, and gyro alignment.

Sequence Diagram(s)

(omitted — changes are a static board configuration header; no control-flow modifications)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Areas to focus on:
    • Verify all pin mappings and timer/channel assignments for conflicts or typos.
    • Confirm SPI/I2C instance selections and DMA options match MCU wiring and driver expectations.
    • Check sensor/peripheral feature flags align with hardware (ICM42688P, BMP280, DPS310, M25P16, MAX7456).
    • Review box/pinio mappings and default device meter selections.

Possibly related PRs

  • Add OXBOTF43512AAIO target #913 — Adds a similar AT32F435-based board config header with matching macro patterns and device/pin declarations.
  • Add HAKRCH743 #757 — Adds another board config that uses ICM42688P, BMP280/DPS310 baros, MAX7456 OSD, and 270° gyro alignment, closely related in content.

Suggested reviewers

  • haslinghuis
  • nerdCopter
  • sugaarK

Poem

In burrows of silicon I hop and code,
A header sprouts where pin-maps flowed.
Sensors sing and SPI lights gleam,
Motors hum in a rabbit’s dream.
SKYSTARS set—let the flights explode! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description is completely empty, with no content provided by the author. The repository's description template mandates comprehensive information for all new flight controller submissions, including mandatory review requirements, hardware compliance statements, housekeeping notes, and a detailed checklist covering schematics review, hardware testing, guideline compliance, and flight testing. None of these required sections or checklist items have been addressed. The author must provide a complete pull request description following the repository's template for new flight controller submissions. This should include confirmation that the hardware has passed the Betaflight team's schematics review, passed hardware samples testing, follows design guidelines and connector standards, has been flight tested, and that all comments or issues have been resolved. Each checklist item should be explicitly marked as completed or addressed.
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 (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add SKYSTARSF435PRO" directly and accurately describes the main change in the changeset—adding a new configuration header file for the SKYSTARSF435PRO flight controller. The title is concise, specific, and clear enough that a teammate scanning the repository history would immediately understand the primary purpose of this change. It avoids vague terminology and directly references the hardware being added.
✨ 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: 1

🧹 Nitpick comments (3)
configs/SKYSTARSF435PRO/config.h (3)

40-49: Clarify shared RX/LED strip pin
The RX_PPM_PIN on PA8 is commented out in favor of LED_STRIP_PIN on 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) and ADC_CURR_PIN (PC1) are wired to the proper voltage divider/current-sense circuits.
  • Ensure PINIO1_PIN (PC0) and PINIO2_PIN (PC5) are uncommitted GPIOs, and their BOX_USER?_NAME labels match the silkscreen.
  • Confirm GYRO_1_EXTI_PIN = PC4 supports EXTI and doesn’t clash with other interrupt lines.

102-108: Reduce magic numbers in PINIO configuration
PINIO1_CONFIG and PINIO2_CONFIG use 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

📥 Commits

Reviewing files that changed from the base of the PR and between d01892d and 3fa82ed.

📒 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 that AT32F435M is 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 both USE_BARO_BMP280 and USE_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 that USE_ACC_SPI_ICM42688P and USE_GYRO_SPI_ICM42688P are correct.


50-62: Verify UART5_RX pin availability
UART5_RX is assigned to PD2. 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 to PH2/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_PIN is on PC3—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 and MAG_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_DEG gyro alignment) appear consistent. Please validate that these align with the hardware wiring and board documentation.

@sugaarK
Copy link
Member

sugaarK commented Jul 26, 2025

what do we need to do to get this finished

Copy link
Member

@nerdCopter nerdCopter left a 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
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/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

📥 Commits

Reviewing files that changed from the base of the PR and between 3fa82ed and 77a8f76.

📒 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 once directive 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 -1 to 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

@ot0tot ot0tot merged commit c84279e into betaflight:master Oct 29, 2025
2 checks passed
@ot0tot ot0tot deleted the Add-SKYSF435 branch October 29, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants