Skip to content

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Jun 16, 2025

Checklist

  • passed schematics review
  • passed hardware samples testing
  • follows guidelines
  • follows connector standards
  • flight tested
  • comments/issues resolved

Summary by CodeRabbit

  • New Features
    • Added support for the DRONEERF722 flight controller board, including hardware-specific configurations for sensors, motor outputs, OSD, Blackbox logging, and peripheral pin assignments.

Copy link
Contributor

coderabbitai bot commented Jun 16, 2025

Walkthrough

A new configuration header file for the DRONEERF722 flight controller board has been added. This file defines the MCU, board name, manufacturer ID, and assigns pins for LEDs, beeper, USB detection, user IO, UARTs, I2C, SPI peripherals, sensors, motor outputs, battery monitoring, OSD, and debug. It also enables relevant features and sets hardware-specific macros for Betaflight firmware integration.

Changes

File(s) Change Summary
configs/DRONEERF722/config.h Added new board configuration header defining MCU, board name, pin mappings, sensors, peripherals, motor outputs, and feature macros for DRONEERF722.

Sequence Diagram(s)

sequenceDiagram
    participant Betaflight
    participant DRONEERF722_Config
    participant Hardware

    Betaflight->>DRONEERF722_Config: Load board configuration macros
    DRONEERF722_Config->>Hardware: Define pin mappings (LEDs, UARTs, SPI, I2C, etc.)
    DRONEERF722_Config->>Hardware: Enable peripherals (IMU, Baro, OSD, Blackbox, etc.)
    DRONEERF722_Config->>Hardware: Set up motor outputs and timers
    Betaflight->>Hardware: Initialize and operate using configured hardware resources
Loading

Possibly related PRs

  • Add AXISFLYINGF745AIO config #581: Adds a new board configuration header file with MCU, sensor, and peripheral assignments, similar in structure and purpose.
  • KonexH743 motor output order #783: Introduces a configuration header for another board, including ICM42688P IMU and Blackbox flash settings, closely related in hardware setup.
  • add HDZERO_AIO15 #784: Adds a configuration file for a different board with similar sensor, pin, and timer definitions, showing a parallel approach for distinct hardware.

Suggested reviewers

  • ot0tot
  • sugaarK
✨ 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.

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ec42951 and 548938f.

📒 Files selected for processing (1)
  • configs/DRONEERF722/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
configs/DRONEERF722/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 (4)
configs/DRONEERF722/config.h (4)

81-83: Compass is referenced but no sensor is enabled – intentional?

MAG_I2C_INSTANCE is set, which is only consumed when some USE_MAG_* flag is defined (e.g. USE_MAG_HMC5883, USE_MAG_IST8310, …).
If this board really has no magnetometer, the line should be removed to avoid dead code; if it does, add the proper USE_MAG_… define.


140-147: Timer/DMA mapping deserves a second look

You neatly avoided CH3 overlap between the gyro CLK-IN (TIM3-CH3 on PB0) and motor outputs by pushing motors 3/4 to TIM8, 👍.
However, all four motors (TIM1 + TIM8) and SPI1 (IMU) share DMA2; add the LED strip (TIM2, DMA1) and ADC (DMA1 opt 1) and you are at the edge of F722 DMA bandwidth.

Please run tools/check-timer-conflicts.py (or the equivalent CI step) to ensure:

• DMA2 stream allocations for TIM1, TIM8 and SPI1 do not collide
• TIM2-CH2 (LED) does not starve TIM1/TIM8 at high DSHOT rates

If conflicts appear, consider moving the LED strip to a spare TIM3/TIM4 pin or enabling DSHOT_BITBANG_OFF.


151-152: Verify ADC1_DMA_OPT 1

ADC1_DMA_OPT value “1” selects the second DMA request line on F7.
Double-check that:

  1. DMA stream 0 isn’t already taken by another peripheral, and
  2. The board routing actually connects VBAT / CURR to ADC1, not ADC2/3.

Mis-selection leads to silent ADC zeros.


24-27: ```shell
#!/bin/bash
set -e

echo "=== Searching for USE_PINIO references ==="
rg -n "USE_PINIO"

echo "=== Searching for PINIO1_PIN in repository ==="
rg -n "PINIO1_PIN"

echo "=== Searching for PINIO2_PIN in repository ==="
rg -n "PINIO2_PIN"

echo "=== Searching for PINIO subsystem implementation files ==="
rg -n "PINIO" -C2


</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@haslinghuis haslinghuis self-assigned this Jul 26, 2025
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