-
Notifications
You must be signed in to change notification settings - Fork 161
Add AIKONF4V3 #715
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 AIKONF4V3 #715
Conversation
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
""" WalkthroughA new configuration header file for the AIKON4V3 flight controller board has been added. This file defines hardware features, pin assignments, sensor and peripheral enablement, timer and ADC settings, I2C and SPI assignments, as well as default protocol and logging options specific to this board. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Firmware
participant AIKON4V3_Config
User->>Firmware: Builds firmware for AIKON4V3
Firmware->>AIKON4V3_Config: Loads config.h
AIKON4V3_Config-->>Firmware: Provides hardware definitions and settings
Firmware-->>User: Firmware operates with AIKON4V3-specific features enabled
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
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. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (1)
configs/AIKONF4V3/config.h (1)
91-92
: Fix trailing whitespace and approve I2C assignments.The I2C device assignments are correct - both barometer and magnetometer on I2C1 is a standard configuration.
Fix the trailing whitespace:
-#define MAG_I2C_INSTANCE I2CDEV_1 +#define MAG_I2C_INSTANCE I2CDEV_1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/AIKONF4V3/config.h
(1 hunks)
🔇 Additional comments (10)
configs/AIKONF4V3/config.h (10)
1-22
: LGTM! Standard license header and include guards.The GPL v3 license header and pragma once directive follow Betaflight conventions correctly.
24-27
: LGTM! Board identification is properly configured.The target MCU, board name, and manufacturer ID are correctly defined for the AIKONF4V3 board.
29-38
: LGTM! Comprehensive sensor and peripheral enablement.The enabled features represent a well-rounded set of sensors and peripherals typical for a modern flight controller board:
- ICM42688P IMU for high-performance motion sensing
- W25Q128FV flash for blackbox logging
- Dual barometer support (BMP280 and DPS310)
- MAX7456 OSD controller for analog video systems
40-77
: LGTM! Comprehensive and conflict-free pin assignments.The pin assignments are well-organized and cover all necessary peripherals:
- Motor outputs on Timer 2 capable pins (PC6-PC9)
- Multiple UART interfaces for versatile connectivity
- Proper SPI pin assignments matching the intended instances
- ADC pins on port C for analog measurements
- Appropriate CS pins for SPI device selection
No pin conflicts detected in the assignments.
79-86
: LGTM! Timer assignments are appropriate for the pin functions.The timer pin mapping correctly assigns:
- Motors to Timer 2 with DMA support for smooth PWM output
- PPM input to Timer 1 (appropriate for input capture)
- Servos to Timer 2 without DMA (sufficient for servo control)
The DMA stream distribution helps optimize performance.
88-89
: LGTM! ADC configuration matches the assigned pins.ADC3 with DMA option 1 is correctly configured for the ADC pins (PC1-PC3) assigned earlier.
94-99
: LGTM! Well-configured PINIO boxes for auxiliary functions.The PINIO configuration provides useful auxiliary functions:
- PINIO1 for "10V BEC" control (likely voltage regulator switching)
- PINIO2 for "Cam1,2" control (likely camera switching)
The box numbers and configuration values are appropriate for user-defined functions.
101-107
: LGTM! Default settings align well with hardware configuration.The default settings are well-chosen:
- Flash-based blackbox logging matches the enabled W25Q128FV chip
- Standard DSHOT configuration for reliable ESC communication
- ADC-based metering aligns with the configured ADC pins
- Inverted beeper output suggests proper hardware interface
- 8MHz system clock is appropriate for this board design
109-112
: LGTM! SPI assignments and gyro alignment are correctly configured.The SPI instance assignments properly match the earlier pin definitions:
- Gyro on SPI1 with appropriate CS pin (PA4)
- Flash on SPI2 with appropriate CS pin (PB12)
- MAX7456 on SPI3 with appropriate CS pin (PA15)
The CW270_DEG gyro alignment accounts for the physical orientation of the IMU on the board.
113-114
: LGTM! Comprehensive and well-structured board configuration.This configuration file provides a complete and professional setup for the AIKONF4V3 flight controller board. It includes all necessary hardware definitions, follows Betaflight conventions, and demonstrates thoughtful pin assignment and peripheral configuration.
@coderabbitai full review |
✅ Actions performedFull review triggered. |
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 (1)
configs/AIKONF4V3/config.h (1)
79-87
: TIMER_PIN_MAPPING Review
The timer mapping macro entries for PWM outputs appear consistent. Consider adding inline comments to clarify channel ordering and motor/servo index associations for future maintainers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/AIKONF4V3/config.h
(1 hunks)
🔇 Additional comments (14)
configs/AIKONF4V3/config.h (14)
1-20
: GPL License Header Looks Good
The standard GPLv3 header is correctly included.
22-28
: Verify BOARD_NAME and MANUFACTURER_ID Conventions
Please confirm thatBOARD_NAME
(AIKONF4V3) andMANUFACTURER_ID
(AIKO) match the existing naming conventions and do not conflict with other boards in the repository.
29-38
: Confirm Sensor and Barometer Support
You have enabled both BMP280 and DPS310 barometers along with the ICM42688P IMU. Please verify that the hardware on AIKONF4V3 supports both barometers simultaneously and thatACC_ORIENTATION
(if required) is correctly handled by the default gyro alignment.
40-45
: Motor Pin Assignments Verified
Motor pins PC6–PC9 align with PWM-capable timers on STM32F405. No issues found.
46-49
: Check Servo and PPM Input Mapping
RX_PPM_PIN
andSERVO1_PIN
/SERVO2_PIN
(PB6, PB0, PB1) must support input capture (PPM) and PWM output. Ensure these are correctly mapped inTIMER_PIN_MAPPING
.
50-56
: Missing UART5 TX Definition
UART1–4 TX/RX are defined, and UART5 RX is set toPD2
but noUART5_TX_PIN
is specified. Confirm whether UART5 TX is intentionally omitted or if a pin assignment is missing.
57-59
: I2C and LED Pin Configuration
I2C1_SCL/SDA
on PB8/PB9 andLED0_PIN
on PB4 look correct and consistent with other STM32F4 boards.
60-68
: SPI Pin Assignments Aligned
SPI1/2/3 SCK, SDI, and SDO pins are mapped correctly to PA5–PA7 (SPI1), PB13–PB15 (SPI2), and PC10–PC12 (SPI3).
69-78
: Pin I/O, ADC, Flash CS, OSD CS, Gyro CS/EXTI Check
Pin definitions forPINIO1_PIN
,PINIO2_PIN
, ADC inputs, flash CS (PB12
), OSD CS (PA15
), and gyro EXTI/CS (PC4
/PA4
) match expected hardware wiring.
88-90
: ADC Instance and DMA Configuration
Selection ofADC3
withADC3_DMA_OPT = 1
aligns with your ADC pin mappings and DMA availability.
91-93
: I2C Device Instance Consistency
Both barometer and magnetometer I2C instances are set toI2CDEV_1
. If these devices share the bus, confirm address conflicts are handled or isolated.
94-100
: PINIO Box Configuration
PINIO1_BOX
/PINIO2_BOX
values (40/41) and user names look reasonable. Ensure these box IDs do not collide with existing pin I/O box assignments in the Betaflight configuration system.
101-108
: Default Device and Protocol Settings
Blackbox default to flash, DSHOT burst/bitbang off, ADC current/voltage meters, and inverted beeper are appropriate defaults for AIKONF4V3.
109-113
: SPI Instances and Gyro Alignment Set
Gyro onSPI1
withCW270_DEG
alignment, flash onSPI2
, and OSD onSPI3
match the physical layout.
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; unable to test
Summary by CodeRabbit