Skip to content

Conversation

@functionpointer
Copy link
Contributor

@functionpointer functionpointer commented Oct 25, 2025

User description

Adds support for FrSky/Rotorflight Vantac RF007.

This is a similar flight controller to the Nexus X, but it comes with a FrSky receiver instead. While originally designed for helicopters, its form factor is also appealing for fixed wing aircraft running INAV.

Testing

I have tested:

  • all 9 servo pins
  • "A" port UART
  • "C" port UART
  • UART1 on AUX/SBUS pins
  • internal receiver binds and works using FBUS
  • calibrated external voltage input using a multimeter
  • verified both gyro and accelerometer work and are oriented correctly
  • verified barometer works
  • verified Blackbox works

Choice of pin functions

Many pins can have multiple roles.
I have created three targets VANTAC_RF007, VANTAC_RF007_9SERVOS and VANTAC_RF007_NOI2C.
VANTAC_RF007 has 7 servo outputs, 2 UARTs and 1 non-shared I2C.
VANTAC_RF007_9SERVOS has 9 servo outputs, 1 UART and non-shared I2C.
VANTAC_RF007_9SERVOS has 9 servo outputs, 2 UARTs and no I2C.

I hope this covers most use cases without creating too many targets. I am happy to modify the targets if a different set of tradeoffs is preferred.
The targets are inspired by #11047.


PR Type

New Target


Description

  • Adds support for FrSky/Rotorflight Vantac RF007 flight controller

  • Provides three target variants with different pin configurations

    • VANTAC_RF007: 7 servo outputs, 2 UARTs, shared I2C
    • VANTAC_RF007_9SERVOS: 9 servo outputs, 1 UART, I2C
    • VANTAC_RF007_NOI2C: 9 servo outputs, 2 UARTs, no I2C
  • Includes built-in FrSky FBUS receiver on UART5

  • Supports ICM42688P gyro/accelerometer, SPL06 barometer, W25N01G flash storage


Diagram Walkthrough

flowchart LR
  A["Vantac RF007<br/>Flight Controller"] --> B["STM32F722XE"]
  B --> C["ICM42688P<br/>IMU"]
  B --> D["SPL06<br/>Barometer"]
  B --> E["W25N01G<br/>Flash Storage"]
  B --> F["FrSky FBUS<br/>Receiver"]
  B --> G["3 Target<br/>Variants"]
Loading

File Walkthrough

Relevant files
Configuration changes
target.h
Target hardware configuration and pin definitions               

src/main/target/VANTAC_RF007/target.h

  • Defines board identifier F7B5 and USB product string
  • Configures SPI1 for ICM42688P IMU with CW90_DEG alignment
  • Sets up I2C devices with conditional compilation for three variants
  • Defines UART configurations (UART1, UART3, UART4, UART5) with
    variant-specific pins
  • Configures ADC for battery voltage monitoring on PC2
  • Enables DShot, SerialShot, ESC sensor, and SmartPort master features
  • Sets MAX_PWM_OUTPUT_PORTS to 7 or 9 depending on variant
+160/-0 
target.c
Timer hardware and servo output mappings                                 

src/main/target/VANTAC_RF007/target.c

  • Defines timer hardware mappings for 7-9 servo outputs
  • Maps S1-S3 to TIM3 channels, TAIL to TIM2, ESC to TIM1
  • Configures RPM and TLM outputs on TIM5 (clash with UART2)
  • Conditionally adds AUX and SBUS outputs on TIM4 for 9-servo variants
  • Uses TIM_USE_OUTPUT_AUTO for flexible servo assignment
+45/-0   
CMakeLists.txt
CMake build configuration for variants                                     

src/main/target/VANTAC_RF007/CMakeLists.txt

  • Defines build targets for all three Vantac RF007 variants
  • All variants use STM32F722XE microcontroller
+3/-0     
Miscellaneous
config.c
Target configuration function stub                                             

src/main/target/VANTAC_RF007/config.c

  • Provides empty targetConfiguration function for future customization
+28/-0   
Documentation
README.md
Comprehensive documentation and pin reference                       

src/main/target/VANTAC_RF007/README.md

  • Documents three flight controller variants and their differences
  • Provides pin configuration tables for all three target variants
  • Includes hardware layout with STM32 pin mappings and timer assignments
  • Notes Port C data pin swap discrepancy with manufacturer documentation
  • References Rotorflight documentation and FrSky manual
  • Explains built-in FrSky FBUS receiver on UART5 and bind procedure
+69/-0   

Quite similar to NEXUSX, but with FrSky built-in receiver
@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Oct 25, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
- [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true -->

</details></td></tr>
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Oct 25, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Assign barometer to the correct I2C bus

Change the barometer's I2C bus from BUS_I2C1 to DEFAULT_I2C to match the
externally available I2C port.

src/main/target/VANTAC_RF007/target.h [59-62]

 #define USE_BARO
-#define BARO_I2C_BUS            BUS_I2C1
+#define BARO_I2C_BUS            DEFAULT_I2C
 #define USE_BARO_SPL06
 #define SPL06_I2C_ADDR 119
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that the barometer is configured on an internal-only I2C bus (BUS_I2C1), making it unusable. Changing it to DEFAULT_I2C correctly assigns it to the externally accessible bus, which is a critical fix for barometer functionality.

High
High-level
Consider a unified target approach

Instead of creating three separate build targets for the board's different pin
configurations, consolidate them into a single target. The pinout variations
should be managed through runtime configuration, such as CLI presets.

Examples:

src/main/target/VANTAC_RF007/CMakeLists.txt [1-3]
target_stm32f722xe(VANTAC_RF007)
target_stm32f722xe(VANTAC_RF007_9SERVOS)
target_stm32f722xe(VANTAC_RF007_NOI2C)
src/main/target/VANTAC_RF007/target.h [50-119]
#if defined(VANTAC_RF007) || defined(VANTAC_RF007_9SERVOS)
#define USE_I2C_DEVICE_2 // clashes with UART3
#define I2C2_SCL                PB10
#define I2C2_SDA                PB11
#define DEFAULT_I2C BUS_I2C2
#else
#define DEFAULT_I2C BUS_I2C1
#endif

#define USE_BARO

 ... (clipped 60 lines)

Solution Walkthrough:

Before:

// src/main/target/VANTAC_RF007/CMakeLists.txt
target_stm32f722xe(VANTAC_RF007)
target_stm32f722xe(VANTAC_RF007_9SERVOS)
target_stm32f722xe(VANTAC_RF007_NOI2C)

// src/main/target/VANTAC_RF007/target.h
#if defined(VANTAC_RF007)
#define MAX_PWM_OUTPUT_PORTS        7
#define USE_UART1
...
#elif defined(VANTAC_RF007_9SERVOS)
#define MAX_PWM_OUTPUT_PORTS        9
...
#elif defined(VANTAC_RF007_NOI2C)
#define MAX_PWM_OUTPUT_PORTS        9
#define USE_UART3
...
#endif

After:

// src/main/target/VANTAC_RF007/CMakeLists.txt
target_stm32f722xe(VANTAC_RF007)

// src/main/target/VANTAC_RF007/target.h
// Define all possible resources for a single target
#define MAX_PWM_OUTPUT_PORTS 9
#define USE_UART1
#define USE_UART3
#define USE_I2C_DEVICE_1
#define USE_I2C_DEVICE_2
...

// In a configuration file or via CLI presets, users can select the desired pinout.
// Example preset for "VANTAC_RF007" default:
// resource MOTOR 8 NONE
// resource MOTOR 9 NONE
// resource SERIAL_TX 3 NONE
// resource SERIAL_RX 3 NONE
Suggestion importance[1-10]: 8

__

Why: The suggestion addresses a significant architectural choice, proposing a unified target which improves maintainability and user experience over the PR's multi-target approach using compile-time flags.

Medium
  • Update

@robthomson
Copy link

Great work!

I will get a unit up and running with this tonight.

@sensei-hacker
Copy link
Collaborator

The second suggestion from the bot can be ignored.

@functionpointer
Copy link
Contributor Author

The first suggestion "assign barometer to correct I2C bus" is factually incorrect.
The flight controller comes with a built-in barometer, which is connected to BUS_I2C1. I have confirmed that it works. Implementing the suggestion would cause the barometer to stop working.

@MrD-RC MrD-RC added this to the 9.0 milestone Oct 26, 2025
@MrD-RC MrD-RC added New target This PR adds a new target Testing Required labels Oct 26, 2025
@robthomson
Copy link

robthomson commented Oct 28, 2025

Been testing here and I dont seem to get all the ports?

configuratoir only shows port 3/4/5 despite using the noi2c version or base version.

I think this is by design.. but It would be good to have a target with 4 ports.

VANTAC_RF007_NOI2C but with 7 servos.

@functionpointer
Copy link
Contributor Author

functionpointer commented Oct 28, 2025

Indeed, there is no target with 3 exposed UARTs (i.e. 5 in total, including the internal UART5 for the receiver and the USB port).
Adding such a target is easy, the problem is if the number of targets gets too high.
Ultimately, there are 36 possible targets:

NAME Port A Port C RPM/TLM AUX/SBUS Servo amount external UART amount
Servo Servo Servo Servo 13 0
Servo Servo Servo UART1 11 1
Servo Servo Servo I2C1 11 0
Servo Servo UART2 Servo 11 1
Servo Servo UART2 UART1 9 1
Servo Servo UART2 I2C1 9 1
Servo UART3 Servo Servo 11 1
Servo UART3 Servo UART1 9 2
Servo UART3 Servo I2C1 9 1
Servo UART3 UART2 Servo 9 2
Servo UART3 UART2 UART1 7 3
Servo UART3 UART2 I2C1 7 2
Servo I2C2 Servo Servo 11 0
Servo I2C2 Servo UART1 9 1
Servo I2C2 Servo I2C1 9 0
Servo I2C2 UART2 Servo 9 1
Servo I2C2 UART2 UART1 7 2
Servo I2C2 UART2 I2C1 7 1
UART4 Servo Servo Servo 13 1
UART4 Servo Servo UART1 11 2
UART4 Servo Servo I2C1 11 1
UART4 Servo UART2 Servo 9 2
UART4 Servo UART2 UART1 7 3
UART4 Servo UART2 I2C1 7 2
VANTAC_RF007_NOI2C UART4 UART3 Servo Servo 9 2
UART4 UART3 Servo UART1 7 3
UART4 UART3 Servo I2C1 7 2
UART4 UART3 UART2 Servo 7 3
UART4 UART3 UART2 UART1 5 4
UART4 UART3 UART2 I2C1 5 3
VANTAC_RF007_9SERVOS UART4 I2C2 Servo Servo 9 1
VANTAC_RF007 UART4 I2C2 Servo UART1 7 2
UART4 I2C2 Servo I2C1 7 1
UART4 I2C2 UART2 Servo 7 2
UART4 I2C2 UART2 UART1 5 3
UART4 I2C2 UART2 I2C1 5 2

How many and which ones we choose to actually implement is an open question. I have chosen 3 I thought would be good. But maybe a different choice is better.

@robthomson
Copy link

With 3.. we have a base issue

  • esc telemetry
  • receiver
  • gps

Zero ability for an osd.

@robthomson
Copy link

Looking at this and pin-out.

We coud achieve:

THR
AIL
ELV
RUDD
PAN
TILT
ROLL

*7 channels all up

4 uarts.

This would essentially be a good combo for many

@sensei-hacker
Copy link
Collaborator

It may be worth noting targets can actually be combined, just one target can cover multiple options if a pair of pins just switches between functions. For example if a pair can be used for either a uart or I2C.

Where a new target WOULD be needed is if the same function gets shifted around to different pins.

So you could have two pins that can either be the last two servos, or be a uart, or be I2C. Defining the pins as available as a uart doesn't do anything if the user doesn't actually use it as a UART.

@functionpointer
Copy link
Contributor Author

Very interesting, in my test this didn't work. But maybe i did something wrong. I will revisit the targets and retest this week

@sensei-hacker
Copy link
Collaborator

sensei-hacker commented Oct 29, 2025

Very interesting, in my test this didn't work. But maybe i did something wrong. I will revisit the targets and retest this week

The resource command can be useful to see what actually got allocated at runtime, based on the current configuration.

@MrD-RC
Copy link
Member

MrD-RC commented Oct 29, 2025

Firmware flashed fine after using ImpulseRC Driver Fixer

VANTAC_RF007 target

  • Flash firmware
  • Calibrate accelerometer
  • Correct board orientation
  • Gyro working
  • Accelerometer working
  • Barometer working
  • I2C working
  • UART 1 working
  • UART 2 working
  • UART 3 working
  • UART 4 working
  • UART 5 working (internal RX)
  • Servos and motors correctly assigned and working
  • Blackbox (Flash)

Note

Hardware

  • There is no arrow on the FC. I understand that this was made for helis. But if it is intended to also be used with LOS fixed wing. A small forward arrow on the FC case would be nice. I assume that the servo plug ports are the front for my testing.
  • I think it would have been nicer if port A (UART 4) had a 6 pin connector to incorporate the UART and an I2C breakout. This would have been the perfect place for a GNSS module with compass. Rather than having to use the servo ports at the end to access the I2C and have some wanky cabling.

Firmware

  • As a suggestion for the default motor/servo assignment. It may be better to assign servos on Timers 3 and 5 and have motors on Timers 1 and 2. This will give 5 servos and 2 motors by default.
image

@robthomson
Copy link

For traditional heli use, the servo ports will always be at the rear of the heli.

@MrD-RC
Copy link
Member

MrD-RC commented Oct 29, 2025

It would be nice to have a definitive arrow. The default orientation can be setup however the arrow directs it. I just figured the easier it is to set up, for someone who has never used an FC before. The better.

@robthomson
Copy link

I will raise it with frsky tomorrow

@functionpointer
Copy link
Contributor Author

functionpointer commented Nov 1, 2025

It seems sharing pins works, but has strange priorities:

  1. UART RX
  2. I2C
  3. UART sensor and peripheral
  4. Servo/Motor

This means any pins defined as I2C cannot be used for a UART sensor or peripheral like GPS, OSD, FrSky Master or external Blackbox. That is because the pins will be used as I2C instead. There doesn't seem to be a way to disable I2C from the configurator. I found this by testing with an external serial rx, FrSky Master mode + oscilloscope, and using the resource command suggested by @sensei-hacker.

On this particular hardware, the priority issue only affects port "C".
Therefore, I have chosen to create a unified target anyway.
It enables 4 of the rows in my table to be reached with a single target.
Specifically, RPM/TLM pins can be Servo or UART2, and AUX/SBUS can be Servo or UART1.
Port "C" is I2C2 by default. It can become UART3, but will currently only do so for a serial rx.

I have updated the README to explain how the pin assignment works.

Thanks to @sensei-hacker for pointing out that combining targets like this is possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants