Skip to content

New target: FRSKYF405#11366

Open
sensei-hacker wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
sensei-hacker:feature-frskyf405-target
Open

New target: FRSKYF405#11366
sensei-hacker wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
sensei-hacker:feature-frskyf405-target

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Feb 26, 2026

Summary

Add new hardware target for the FrSky F405 flight controller (STM32F405RGT6).

Hardware

  • MCU: STM32F405RGT6 (1MB flash)
  • Gyro/Accel: IIM-42688P (compatible with ICM42605 driver) on SPI1
  • OSD: AT7456E on SPI2
  • Blackbox: SD card on SPI3 (CS: PC14)
  • Baro: SPL06 on I2C1 (address 0x76)
  • RC Input: SBUS via hardware inverter on UART2 RX
  • UARTs: 6x hardware UARTs + VCP
  • Motor outputs: 9x (S1–S9); S7/S8 on TIM12 (PWM/OneShot only, no DShot — TIM12 has no DMA on F405)
  • LED strip: PA15 (TIM2_CH1)
  • Current sensor: INA139 with 0.25mΩ shunt on PC1

Changes

  • src/main/target/FRSKYF405/CMakeLists.txt — STM32F405xg target
  • src/main/target/FRSKYF405/target.h — pin definitions, peripheral configuration
  • src/main/target/FRSKYF405/target.c — timer/motor output definitions
  • src/main/target/FRSKYF405/config.c — sets serialrx_inverted = 1 for hardware SBUS inverter

Pin Conflicts (documented in target.h)

The board has hardware-level pin conflicts that the user must choose between:

  • UART3 TX/RX (PB10/PB11) vs I2C2 SCL/SDA — enable one or the other
  • UART4 RX (PC5) is shared with RSSI ADC input

Notes

  • USB VBUS sensing pin not confirmed from schematic; omitted pending hardware verification

FrSky F405 flight controller based on STM32F405RGT6.

Hardware: IIM-42688P gyro (SPI1), AT7456E OSD (SPI2), SD card (SPI3),
SPL06 barometer (I2C1), 9 motor outputs, hardware SBUS inverter on UART2,
LED strip on PA15. S7/S8 use TIM12 (PWM only, no DShot).
@sensei-hacker sensei-hacker added this to the 9.1 milestone Feb 26, 2026
@sensei-hacker sensei-hacker added Testing Required New target This PR adds a new target labels Feb 26, 2026
@sensei-hacker
Copy link
Member Author

sensei-hacker commented Feb 26, 2026

Testing checklist:

  • Samples received
  • Flash firmware
  • Calibrate
  • Orientation matches
  • Gyro working
  • Accel working
  • Baro working
  • Blackbox
  • UART1
  • UART2
  • UART3
  • UART4
  • UART6
  • UART7
  • UART8
  • 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

- Fix UART5_RX: PD12 → PD2 (only valid pin for UART5_RX on STM32F405)
- Move SPI3 to PB3/PB4/PB5, freeing PC10/PC11/PC12 for UART3 and UART5_TX
- Move UART3 to PC10/PC11 (was conflicting with I2C2 on PB10/PB11)
- Fix UART4_RX: PC5 → PA1 (PC5 is shared with RSSI ADC)
- Re-enable I2C2 on PB10/PB11 (now free after UART3 move)
- Add TARGET_IO_PORTD for PD2 (UART5_RX)
- Update SERIAL_PORT_COUNT to 7 (includes UART5)
- Remove config.c: UART2 has both standard and hardware-inverted SBUS pads
@sensei-hacker sensei-hacker force-pushed the feature-frskyf405-target branch from 7234b3f to 623fe7a Compare March 1, 2026 18:25
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Test firmware build ready — commit 8ba58cc

Download firmware for PR #11366

224 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.

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

Labels

New target This PR adds a new target Testing Required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant