Skip to content

FLYFISHRCF405: fix flash SPI instance and driver - #1133

Draft
nerdCopter wants to merge 4 commits into
betaflight:masterfrom
nerdCopter:fix/FLYFISHRCF405-flash-spi
Draft

nerdCopter wants to merge 4 commits into
betaflight:masterfrom
nerdCopter:fix/FLYFISHRCF405-flash-spi

Conversation

@nerdCopter

@nerdCopter nerdCopter commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

AI Generated pull-request

Summary

define non-quadspi:

#define USE_FLASH_W25Q128FV
+#define USE_FLASH_M25P16

revert to legacy defines for SPI2 and 3

-#define FLASH_SPI_INSTANCE SPI2
-#define MAX7456_SPI_INSTANCE SPI3
+#define FLASH_SPI_INSTANCE SPI3
+#define MAX7456_SPI_INSTANCE SPI2

Fixes #1132

Test plan

  • Flash 2025.12.x firmware on FLYFISHRCF405
  • Confirm blackbox writes to flash without any manual set flash_spi_bus CLI override
  • Confirm OSD (MAX7456) still functional

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated FLYFISHRCF405 board configuration with revised flash memory support and optimized peripheral resource allocation.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Walkthrough

Corrects the FLYFISHRCF405 board config: replaces the flash chip macro USE_FLASH_W25Q128FV with USE_FLASH_M25P16, moves FLASH_SPI_INSTANCE from SPI2 to SPI3, and moves MAX7456_SPI_INSTANCE from SPI3 to SPI2.

Changes

FLYFISHRCF405 flash chip and SPI instance fix

Layer / File(s) Summary
Flash chip driver and SPI instance reassignment
configs/FLYFISHRCF405/config.h
USE_FLASH_W25Q128FV replaced with USE_FLASH_M25P16; FLASH_SPI_INSTANCE changed from SPI2 to SPI3; MAX7456_SPI_INSTANCE changed from SPI3 to SPI2.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description lacks required mandatory sections specified in the template, including hardware compliance checklist items, Betaflight review status, and design guideline adherence confirmations. Add the required checklist items from the template (schematics review, hardware testing, guidelines compliance, connector standards, flight testing, and comments resolution). Confirm adherence to Betaflight manufacturer design guidelines and requirements.
✅ Passed checks (4 passed)

Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: fixing flash SPI instance assignment and selecting the correct flash driver for the FLYFISHRCF405 board.
Linked Issues check ✅ Passed The PR directly addresses all coding requirements from issue #1132: correcting FLASH_SPI_INSTANCE (SPI2→SPI3), MAX7456_SPI_INSTANCE (SPI3→SPI2), and flash driver selection (W25Q128FV→M25P16) to restore flash detection functionality.
Out of Scope Changes check ✅ Passed All changes in the PR are directly scoped to fixing the hardware configuration issues identified in issue #1132, with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Finishing Touches

🧪 Generate unit tests (beta)

  • Create PR with unit tests
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@nerdCopter
nerdCopter force-pushed the fix/FLYFISHRCF405-flash-spi branch from 82b8ff8 to c1b3c13 Compare June 18, 2026 19:00
@nerdCopter
nerdCopter marked this pull request as draft June 22, 2026 13:24
@nerdCopter

Copy link
Copy Markdown
Member Author

setting as "draft" until testing success.

- FLASH_SPI_INSTANCE SPI2 → SPI3: PA15 (FLASH_CS_PIN) is SPI3 NSS,
  not SPI2. This caused flash_spi_bus to default to 2 in 2025.12.x,
  breaking blackbox. User workaround was manual 'set flash_spi_bus=3'.
- MAX7456_SPI_INSTANCE SPI3 → SPI2: PB12 (MAX7456_SPI_CS_PIN) is
  SPI2 NSS.
- USE_FLASH_W25Q128FV → USE_FLASH_M25P16: actual hardware is
  Macronix MX25L12835F (JEDEC 0xC22018), not Winbond W25Q128.

Fixes betaflight#1132

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nerdCopter
nerdCopter force-pushed the fix/FLYFISHRCF405-flash-spi branch from 7155fa4 to c423ca2 Compare July 30, 2026 13:51
@nerdCopter

Copy link
Copy Markdown
Member Author

requesting @hakrc1 verification / resolution

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.

FLYFISHRCF405 — onboard SPI flash (Macronix MX25L12835F) not detected on 2025.12.x, works on 4.5.2

2 participants