-
Notifications
You must be signed in to change notification settings - Fork 205
Add AIRBOTSUPERF4V2 #879
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 AIRBOTSUPERF4V2 #879
Conversation
WalkthroughAdds a new AIRBOTSUPERF4V2 Betaflight board configuration header defining MCU (AT32F435M), board/manufacturer IDs, enabled sensors/peripherals (ICM42688P, LSM6DSV16X, DPS310, M25P16), conditional OSD, and full pin/timer/UART/I2C/SPI/ADC mappings plus flash/blackbox and meter defaults. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, 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: 2
🧹 Nitpick comments (4)
configs/AIRBOTSUPERF4V2/config.h (4)
29-38: Two IMU driver families enabled; trim to actual hardware to save flash and avoid ambiguity.You enable ICM42688P (ACC+GYRO over SPI) and also LSM6DSV16X (I2C/SPI). Unless the board really ships with both, carrying both drivers bloats firmware and can complicate sensor probing.
If the hardware is ICM42688P-only, remove the LSM6 driver:
#define USE_GYRO #define USE_GYRO_SPI_ICM42688P -#define USE_ACCGYRO_LSM6DSV16XIf both variants exist, consider a separate config directory or feature flag to keep per-board binaries minimal.
107-116: Double-check TIMER_PIN_MAPPING vs. AT32 timer/DMAMUX constraints.Motor PWM, LED strip, and SPI DMA must not collide. Please validate timer indices, channels, and DMA routing for:
- LED_STRIP on PA15 (often repurposes JTDI — acceptable if by design),
- Motors on PB6/7, PB0/1, PC6/7/8/9,
- SPI3 (flash) and SPI1 (gyro) DMA selections.
Given prior DMA conflict issues on F4-class MCUs, cross-verify against the AT32 timer/DMA mapping referenced in the PR description. Also confirm that mapping indices align with the expected resource order (note MOTOR8 before MOTOR7 here is fine functionally, but verify it’s intentional).
117-117: Verify ADC1_DMA_OPT value.Ensure ADC1_DMA_OPT=9 is the recommended option for your chosen ADC channel(s) and doesn’t overlap with timers/SPI DMA streams used above.
You can leave a short comment indicating the rationale (DMAMUX line/stream selection) to aid future maintenance.
81-91: PC14/PC15 usage: confirm LSE is not required.LED0 uses PC15 and GYRO_1_CS uses PC14. On many MCUs these are LSE pins; on AT32F435 they can be GPIO, but if LSE is ever enabled these assignments could conflict. Confirm LSE isn’t used or document that LSE is intentionally disabled on this board.
Also applies to: 103-106
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
configs/AIRBOTSUPERF4V2/config.h(1 hunks)
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the `BOARD_NAME` define in config.h files exactly matches the directory name where the config file is located. For example, if the config file is in configs/AXISFLYINGF7AIO/config.h, then the BOARD_NAME should be defined as "AXISFLYINGF7AIO". This ensures proper board identification and configuration loading in Betaflight.
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.
📚 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/AIRBOTSUPERF4V2/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.
Applied to files:
configs/AIRBOTSUPERF4V2/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the `BOARD_NAME` define in config.h files exactly matches the directory name where the config file is located. For example, if the config file is in configs/AXISFLYINGF7AIO/config.h, then the BOARD_NAME should be defined as "AXISFLYINGF7AIO". This ensures proper board identification and configuration loading in Betaflight.
Applied to files:
configs/AIRBOTSUPERF4V2/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
PR: betaflight/config#822
File: configs/AXISFLYINGH7MINI/config.h:29-37
Timestamp: 2025-06-23T18:43:31.746Z
Learning: In Betaflight configuration files, feature enablement macros like USE_MAG are build options that can be controlled at compile time, while hardware instance definitions like MAG_I2C_INSTANCE are predefined in board configurations to assist with hardware mapping when those features are enabled at build time.
Applied to files:
configs/AIRBOTSUPERF4V2/config.h
📚 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/AIRBOTSUPERF4V2/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.
Applied to files:
configs/AIRBOTSUPERF4V2/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.
Applied to files:
configs/AIRBOTSUPERF4V2/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.
Applied to files:
configs/AIRBOTSUPERF4V2/config.h
🔇 Additional comments (3)
configs/AIRBOTSUPERF4V2/config.h (3)
26-28: BOARD_NAME matches directory — good catch kept.BOARD_NAME equals the directory name (AIRBOTSUPERF4V2) and MANUFACTURER_ID is set. This aligns with our board-naming requirement.
60-62: UART2_RX not defined; PA3 is used for ADC current — intentional one-wire SA/IRC?UART2 TX is PA2 but RX isn’t mapped (PA3 is CURRENT ADC). This is okay if UART2 is TX-only (SmartAudio/IRC Tramp), but please confirm intent and document to avoid confusion.
Optionally annotate the intent:
#define UART2_TX_PIN PA2 +// No UART2_RX_PIN: PA3 is used for CURRENT ADC; UART2 intended as TX-only.Also applies to: 69-70, 96-97
39-41: Flash/Blackbox wiring looks coherent.SPI3 on PB3/PB4/PB5 with CS=PC13 and DEFAULT_BLACKBOX_DEVICE=FLASH is consistent with common designs.
Also applies to: 100-105, 122-125
|
Can you point me to the schematic for this please? I couldn't find it in the Discord. |
Summary by CodeRabbit