Skip to content

Add VELOF722AIO #797

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

ot0tot
Copy link
Contributor

@ot0tot ot0tot commented May 30, 2025

Need to create manufacturer ID as well.

Summary by CodeRabbit

  • New Features
    • Added support for the VWING_F722AIO flight controller, including hardware component configuration and pin assignments.
    • Added a new manufacturer, "Huizhou Xinchuang Technology Co., Ltd." (ID: VWIN), to the official manufacturer list.

Copy link

coderabbitai bot commented May 30, 2025

Error: Could not generate a valid Mermaid diagram after multiple attempts.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or `` to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@yuxuanRC
Copy link

yuxuanRC commented Jun 2, 2025

VWINGF722AIO

#define USE_BARO_BMP280 Change to DPS310

@yuxuanRC
Copy link

yuxuanRC commented Jun 2, 2025

Hello, please change the target name to: VWINF722AIO.
#define FC_TARGET_MCU STM32F7X2

#define BOARD_NAME VWINF722AIO
#define MANUFACTURER_ID VWIN

@yuxuanRC
Copy link

yuxuanRC commented Jun 4, 2025

,#define BOARD_NAME VWINF722AIO modify to #define BOARD_NAME VWING_F722AIO
#define MANUFACTURER_ID VWIN manufacturer ID does not need to be changed

@ot0tot ot0tot marked this pull request as ready for review June 7, 2025 03:07
Copy link

@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: 2

🧹 Nitpick comments (1)
Manufacturers.md (1)

128-128: Review manufacturer entry completeness

The new VWIN entry correctly follows the existing table format and naming conventions. Consider adding a contact URL (e.g., the official website or support page) for Huizhou Xinchuang Technology Co., Ltd. to improve usability in the configurator.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ce3bf0 and 06d5c06.

📒 Files selected for processing (2)
  • Manufacturers.md (1 hunks)
  • configs/VWINF722AIO/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
configs/VWINF722AIO/config.h (1)
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.
🔇 Additional comments (7)
configs/VWINF722AIO/config.h (7)

22-28: Confirm board identity macros

BOARD_NAME VWING_F722AIO and MANUFACTURER_ID VWIN align with the final naming conventions, and FC_TARGET_MCU STM32F7X2 correctly targets the F7 series MCU.


29-38: Hardware feature enables appear correct

Accelerometer/gyro (ICM42688P), flash (M25P16), barometer (DPS310), and OSD (MAX7456) definitions all match the board’s components.


39-55: Pin assignments for motors, beeper, LED strip, UARTs

Mappings for PC13 (beeper), PBx (motor outputs), PA8 (LED strip), and UART1/2/3/4/6 pins look consistent with common F7 dev-board layouts.


57-69: I2C/SPI pin configuration matches hardware

I2C1 on PB8/PB9, SPI1 (ICM42688P), SPI2 (MAX7456), and SPI3 (flash) pin assignments are correctly routed.


72-74: ADC inputs configured correctly

ADC_VBAT_PIN PC2 and ADC_CURR_PIN PC1 align with ADC1 channels on the STM32F7.


83-89: Validate timer pin mapping for DMA

Double-check that the TIMER_PIN_MAPPING entries on PB4, PB5, PB0, PB1, and PA8 do not conflict with DMA streams used by the motor timers, LED strip, or SPI peripherals.


90-102: Default peripheral instance macros look correct

DMA options, I2C/SPI instances, DSHOT settings, blackbox device, meter sources, beeper inversion, and gyro alignment macros adhere to Betaflight conventions.

Comment on lines +75 to +77
#define LED0_PIN PA13
#define LED1_PIN PA14

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

LED pins conflict with SWD interface

LED0_PIN PA13 and LED1_PIN PA14 occupy the SWDIO/SWCLK pins, disabling debug access. Please confirm this is intentional or remap to non-SWD GPIOs.

🤖 Prompt for AI Agents
In configs/VWINF722AIO/config.h around lines 75 to 77, the LED0_PIN and LED1_PIN
are assigned to PA13 and PA14, which conflict with the SWD interface pins used
for debugging. To fix this, remap LED0_PIN and LED1_PIN to GPIO pins that do not
overlap with SWDIO/SWCLK to preserve debug access, or confirm and document if
disabling debug access is intentional.

Comment on lines +78 to +82
#define MAX7456_SPI_CS_PIN PB12
#define FLASH_CS_PIN PD2
#define GYRO_1_CS_PIN PB2
#define GYRO_1_EXTI_PIN PC4

Copy link

@coderabbitai coderabbitai bot Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Verify bootloader pin usage

FLASH_CS_PIN PD2 is also the BOOT0 pin on STM32F7. If the flash’s CS line holds PD2 high at reset, the MCU may enter the system bootloader. Ensure the hardware design prevents unintended high levels on BOOT0.

🤖 Prompt for AI Agents
In configs/VWINF722AIO/config.h around lines 78 to 82, the FLASH_CS_PIN is
assigned to PD2, which is also the BOOT0 pin on STM32F7. To prevent the MCU from
unintentionally entering the system bootloader at reset, verify the hardware
design ensures that the FLASH_CS_PIN line does not hold PD2 high during reset.
If necessary, change the FLASH_CS_PIN assignment to a different pin that does
not conflict with BOOT0 or modify the hardware to avoid this issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai PD2 is not BOOT0 or any boot pin on STM32F7.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🌐 Web query:

STM32F7 BOOT0 pin assignment which GPIO pin

💡 Result:

Based on the search results provided, there is no specific information about which GPIO pin corresponds to the BOOT0 pin on STM32F7 series microcontrollers.

The BOOT0 pin on STM32 microcontrollers is a dedicated pin that is not multiplexed with GPIO functionality. Unlike the BOOT1 pin, which is typically multiplexed with a GPIO pin (for example, on the STM32F103 series, BOOT1 is multiplexed with PB2), the BOOT0 pin is a special function pin that is used specifically for selecting the boot mode of the microcontroller[2][4].

The BOOT0 pin is used to determine the boot mode:

  • When BOOT0 is LOW (0), the microcontroller boots from the main flash memory
  • When BOOT0 is HIGH (1), the boot mode depends on the state of the BOOT1 pin[2]

For hardware design, it's recommended to pull the BOOT0 pin low during reset for normal operation using a pull-down resistor (typically 10kΩ, though values from 10k to 1M will work)[2][4]. Leaving the BOOT0 pin floating is not recommended as it can catch external noise and lead to unpredictable behavior on reset[1].

If you're using an ST-Link device with SWD connection for programming, it's worth noting that you don't need to manipulate the BOOT0 pin, as the ST-Link will reset the MCU without any need to change the BOOT0 state[4].

For specific pin assignment information for the STM32F7 series, you would need to refer to the datasheet or reference manual for that specific microcontroller model.

Citations:


@ot0tot Thank you for the correction! You're absolutely right. I apologize for the error in my previous comment.

BOOT0 is indeed a dedicated pin on STM32F7 microcontrollers, not multiplexed with GPIO functionality. PD2 is a regular GPIO pin and has no relation to the boot configuration. My concern about FLASH_CS_PIN on PD2 potentially interfering with boot behavior was unfounded.

I appreciate you taking the time to clarify this - it helps ensure accurate information in the review.


✏️ Learnings added
Learnt from: ot0tot
PR: betaflight/config#797
File: configs/VWINF722AIO/config.h:78-82
Timestamp: 2025-06-07T03:25:49.381Z
Learning: BOOT0 on STM32F7 (and other STM32 series) is a dedicated pin, not multiplexed with GPIO pins. GPIO pins like PD2 cannot be BOOT0. Only BOOT1 can sometimes be multiplexed with GPIO pins on some STM32 series.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

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.

2 participants