Skip to content

Add new target: PAURCF405V2#11497

Merged
sensei-hacker merged 2 commits intoiNavFlight:maintenance-9.xfrom
sensei-hacker:target/paurcf405v2
Apr 13, 2026
Merged

Add new target: PAURCF405V2#11497
sensei-hacker merged 2 commits intoiNavFlight:maintenance-9.xfrom
sensei-hacker:target/paurcf405v2

Conversation

@sensei-hacker
Copy link
Copy Markdown
Member

Summary

Adds INAV firmware support for the PauRC F405 V2 flight controller.

Hardware

  • MCU: STM32F405RGT6
  • IMU: ICM42605/ICM42688P or BMI270 (production variant; both on SPI1, CS=PC14)
  • OSD: AT7456E (MAX7456-compatible) on SPI1
  • Blackbox: 16MB SPI NOR flash on SPI2
  • Barometer: SPL06 / DPS310 / BMP280 / MS5611 (I2C1)
  • UARTs: 6x hardware UART + 1x SoftSerial (PA2, shared with UART2 TX)
  • Outputs: 11x PWM with DShot/DMAR support
  • Extras: LED strip, 2x PINIO, airspeed ADC, 30.5×30.5mm M4 mounting

Changes

  • src/main/target/PAURCF405V2/CMakeLists.txt — STM32F405XG build target
  • src/main/target/PAURCF405V2/target.h — pin mapping and hardware configuration
  • src/main/target/PAURCF405V2/target.c — timer/DMA assignments (all streams verified conflict-free)
  • src/main/target/PAURCF405V2/config.c — default PINIO box configuration

Testing

  • Built successfully against current maintenance-9.x
  • Flash: 67.5% (619 KB / 896 KB) — good headroom for future features
  • RAM: 88.3% (115 KB / 128 KB) — typical for full-featured F405
  • Zero compiler warnings

Notes

  • SoftSerial1 TX/RX share PA2 with UART2 TX — mutually exclusive (documented in target.h)
  • The ICM42605 driver auto-detects ICM42688P via WHO_AM_I register at runtime; USE_IMU_ICM42605 covers both variants
  • Documentation not needed (new hardware target only)

Closes #11089

STM32F405RGT6-based flight controller by PauRC.

Hardware features:
- IMU: ICM42605/ICM42688P or BMI270 (board variant, same CS pin PC14)
- OSD: MAX7456 on SPI1
- Blackbox: 16MB SPI flash on SPI2
- Baro: SPL06/DPS310/BMP280/MS5611 (I2C1)
- 6x UART + 1x SoftSerial (PA2, shared with UART2 TX)
- 11x PWM outputs with DShot/DMAR support
- LED strip, PINIO (2 channels), airspeed ADC
- 30.5x30.5mm mounting pattern

Closes iNavFlight#11089
@qodo-code-review
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Add new target: PAURCF405V2 flight controller

Grey Divider

Walkthroughs

Description
• Adds INAV firmware support for PauRC F405 V2 flight controller
• Configures STM32F405RGT6 MCU with dual IMU support (ICM42605/ICM42688P or BMI270)
• Defines 11 PWM outputs with DShot/DMAR, 6 UARTs plus SoftSerial, and comprehensive sensor support
• Sets up timer/DMA assignments, SPI peripherals (OSD, Blackbox), I2C sensors, and PINIO
  configuration
Diagram
flowchart LR
  MCU["STM32F405RGT6 MCU"]
  IMU["Dual IMU Support<br/>ICM42605/ICM42688P<br/>or BMI270"]
  OSD["MAX7456 OSD<br/>on SPI1"]
  FLASH["16MB SPI Flash<br/>Blackbox on SPI2"]
  BARO["Barometer<br/>SPL06/DPS310<br/>BMP280/MS5611<br/>on I2C1"]
  UART["6x UART<br/>+ SoftSerial"]
  PWM["11x PWM Outputs<br/>DShot/DMAR Support"]
  
  MCU --> IMU
  MCU --> OSD
  MCU --> FLASH
  MCU --> BARO
  MCU --> UART
  MCU --> PWM
Loading

Grey Divider

File Changes

1. src/main/target/PAURCF405V2/CMakeLists.txt ⚙️ Configuration changes +1/-0

Build configuration for target

• Defines build target for STM32F405XG MCU variant

src/main/target/PAURCF405V2/CMakeLists.txt


2. src/main/target/PAURCF405V2/target.h ⚙️ Configuration changes +166/-0

Hardware pin mapping and configuration

• Defines pin mappings for all peripherals (SPI1/SPI2, I2C1, 6x UART, SoftSerial)
• Configures dual IMU support (ICM42605 and BMI270) with CW270_DEG_FLIP alignment
• Sets up OSD (MAX7456), Blackbox flash (M25P16), barometer, and ADC channels
• Defines PINIO (2 channels), LED strip, beeper, and default feature flags

src/main/target/PAURCF405V2/target.h


3. src/main/target/PAURCF405V2/target.c ⚙️ Configuration changes +48/-0

Timer and DMA configuration

• Defines 11 PWM output timer/DMA assignments with conflict-free stream allocation
• Configures LED strip (TIM3 CH4), beeper (TIM11 CH1), and SoftSerial1 TX (TIM5 CH3)
• Includes detailed DMA stream references for each output (e.g., D(2,7,7) for S1)

src/main/target/PAURCF405V2/target.c


View more (1)
4. src/main/target/PAURCF405V2/config.c ⚙️ Configuration changes +28/-0

Default PINIO box configuration

• Initializes PINIO box configuration with USER1 and USER2 permanent IDs
• Sets default PINIO channel assignments for auxiliary functions

src/main/target/PAURCF405V2/config.c


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review bot commented Apr 12, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 12, 2026

Test firmware build ready — commit c49b564

Download firmware for PR #11497

1 targets built. Find your board's .hex file by name on that page (e.g. MATEKF405SE.hex). Files are individually downloadable — no GitHub login required.

Development build for testing only. Use Full Chip Erase when flashing.

@sensei-hacker
Copy link
Copy Markdown
Member Author

sensei-hacker commented Apr 12, 2026

  • Samples received
  • Flash firmware
  • Calibrate
  • Orientation matches
  • Gyro working
  • Accel working
  • Baro working
  • Blackbox
  • UART1
  • UART2
  • UART3
  • UART4
  • UART5
  • UART6
  • Buzzer working
  • DShot support on m1-4
  • Additional motor / servo outputs
  • Voltage sensor
  • Current sensor
  • I2C Bus
  • Analog Camera working
  • Video Out working
  • OSD working
  • LEDs working
  • PINIO1
  • PINIO2

@sensei-hacker sensei-hacker merged commit 1086f9d into iNavFlight:maintenance-9.x Apr 13, 2026
9 checks passed
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.

1 participant