Skip to content

Add GEETAC591_V1 target#1129

Open
blckmn wants to merge 2 commits into
betaflight:masterfrom
blckmn:geetac591v1
Open

Add GEETAC591_V1 target#1129
blckmn wants to merge 2 commits into
betaflight:masterfrom
blckmn:geetac591v1

Conversation

@blckmn

@blckmn blckmn commented Jun 15, 2026

Copy link
Copy Markdown
Member

GEETAC591_V1 — GEETA STM32C591 flight controller (LQFP64; silk reads "C593" but the placed part is a C591RGT6).

Peripherals: LSM6DSK320X / ICM-42688P IMU on SPI1 (compile-both auto-detect), AT7456E OSD on SPI2, W25Q flash on SPI3, LPS22DF baro + external mag on I2C1, TIM8 motors, ADC, LED strip, PINIO, beeper. Config persists in internal flash.

Depends on betaflight/betaflight#15335 for the UART1/3/7 pin options on C591.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added support for the GEETAC591_V1 STM32C591 flight controller board, including USB VCP, configurable UART/SPI/I2C peripheral mappings, IMU/flash/OSD integration, barometer and compass support, motor output and LED strip control, VBAT/current ADC sensing, buzzer output, and camera/VTX power switching.
    • Updated startup behavior by documenting safer configuration persistence in internal flash to avoid early external flash access.

Copilot AI review requested due to automatic review settings June 15, 2026 14:56
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4b614ef3-da4d-4426-a94a-cdd2db576c2b

📥 Commits

Reviewing files that changed from the base of the PR and between a294275 and 7370c08.

📒 Files selected for processing (1)
  • configs/GEETAC591_V1/config.h
🚧 Files skipped from review as they are similar to previous changes (1)
  • configs/GEETAC591_V1/config.h

Walkthrough

Adds a new board configuration header configs/GEETAC591_V1/config.h for the GEETAC591_V1 STM32C591 flight controller. The file contains 200 lines of macro definitions covering all hardware peripherals: USB, six UARTs, SPI1/SPI3 sensors and flash, SPI2 OSD, I2C1 baro/mag, four motor outputs, LED strip, ADC, beeper, and PINIO power switches.

Changes

GEETAC591_V1 Board Configuration

Layer / File(s) Summary
Complete peripheral and pin definitions
configs/GEETAC591_V1/config.h
Introduces the full board config: MCU/board identity (FC_TARGET_MCU, BOARD_NAME, MANUFACTURER_ID), HSE crystal at 8 MHz, USB VCP with detect pin, LED0, UART1–5/7 TX/RX mappings, SPI1 gyro pins (USE_SPI_DEVICE_1), SPI3 external flash (USE_FLASH*, FLASH_CS_PIN), SPI2 MAX7456 OSD (USE_MAX7456, MAX7456_SPI_CS_PIN), I2C1 LPS22DF barometer and external MAG (USE_BARO_LPS22DF, MAG_I2C_INSTANCE), MOTOR1–4 pins with TIMER_PIN_MAPPING, LED_STRIP_PIN, ADC VBAT/current with default meter sources, BEEPER_PIN, and PINIO1/PINIO2 for VTX and camera power switching.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • ot0tot
  • haslinghuis
  • sugaarK
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. It lacks evidence of mandatory Betaflight review compliance, including the required checklist items (schematics review, hardware testing, guidelines adherence, connector standards, flight testing, and issue resolution). Add the mandatory checklist with clear indicators (✓/✕) for all required items: schematics review, hardware samples testing, guidelines compliance, connector standards, flight testing, and issue resolution.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add GEETAC591_V1 target' accurately reflects the main change: adding a new flight controller configuration header for the GEETAC591_V1 STM32C591 board.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configs/GEETAC591_V1/config.h`:
- Around line 37-41: The configuration file contains conflicting references to
the external flash memory type: the comment block at lines 37-41 mentions
W25Q128, the comments at lines 93-96 reference W25Q256JV with JEDEC identifier
0xEF4019, and the macro definition at lines 102-106 enables USE_FLASH_W25Q128FV.
Determine the actual flash part installed on the board, then make all references
consistent by updating the descriptive comments at lines 37-41 and lines 93-96
to correctly name the flash part model and capacity, and ensure the macro
configuration at lines 102-106 (USE_FLASH_W25Q128FV or equivalent) accurately
reflects the actual part in use. This prevents confusion during device bring-up
and maintenance when capacity assumptions must be correct.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6b22cd17-b003-44e0-a313-2c2b0373d379

📥 Commits

Reviewing files that changed from the base of the PR and between b6288da and a294275.

📒 Files selected for processing (1)
  • configs/GEETAC591_V1/config.h

Comment on lines +37 to +41
// Config persists in the C591 internal flash (CONFIG_IN_FLASH, the default
// backend -- __config_start = 0x080FC000, a 16 KB region in the last two 8 KB
// pages of the 1 MB part). This avoids the early boot-time SPI3 read that the
// external flash (W25Q128) needs, which the C5 polled-SPI path corrupts before
// DMA is up. The W25Q128 still serves the blackbox.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Resolve conflicting external-flash identity (W25Q128 vs W25Q256).

Line 40 describes W25Q128, while Lines 93–96 describe W25Q256JV (JEDEC 0xEF4019), and Line 104 enables USE_FLASH_W25Q128FV. Please make the part/capacity declaration consistent across comments and macros to prevent bring-up confusion and incorrect capacity assumptions during maintenance.

Also applies to: 93-96, 102-106

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@configs/GEETAC591_V1/config.h` around lines 37 - 41, The configuration file
contains conflicting references to the external flash memory type: the comment
block at lines 37-41 mentions W25Q128, the comments at lines 93-96 reference
W25Q256JV with JEDEC identifier 0xEF4019, and the macro definition at lines
102-106 enables USE_FLASH_W25Q128FV. Determine the actual flash part installed
on the board, then make all references consistent by updating the descriptive
comments at lines 37-41 and lines 93-96 to correctly name the flash part model
and capacity, and ensure the macro configuration at lines 102-106
(USE_FLASH_W25Q128FV or equivalent) accurately reflects the actual part in use.
This prevents confusion during device bring-up and maintenance when capacity
assumptions must be correct.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Betaflight target configuration for the GEETAC591_V1 flight controller (STM32C591), defining the board’s MCU, peripherals, and pin mappings so it can be built and used within the Betaflight target-config system.

Changes:

  • Introduces a new target config header for GEETAC591_V1.
  • Defines peripheral buses/devices (SPI IMU + OSD + flash, I2C baro/mag) and core IO (UARTs, ADC, beeper, LED strip, PINIO).
  • Adds timer pin mapping intended for TIM8 motor outputs and LED strip output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +32
#define BOARD_NAME GEETAC591_V1
#define MANUFACTURER_ID GEET
Comment on lines +24 to +28
// GEETAC591_V1 -- GEETA STM32C591 FC. Silkscreen reads "C593" but the placed
// part is an STM32C591RGT6 (LQFP64). C593 and C591 share an identical GPIO/USART
// alternate-function map, so the C591 platform target applies unchanged.
// Schematic: ~/src/ref/C591_2/STM32C593RGT6(0505).pdf

Comment on lines +37 to +41
// Config persists in the C591 internal flash (CONFIG_IN_FLASH, the default
// backend -- __config_start = 0x080FC000, a 16 KB region in the last two 8 KB
// pages of the 1 MB part). This avoids the early boot-time SPI3 read that the
// external flash (W25Q128) needs, which the C5 polled-SPI path corrupts before
// DMA is up. The W25Q128 still serves the blackbox.
Comment thread configs/GEETAC591_V1/config.h Outdated
Comment on lines +89 to +91
#define GYRO_1_EXTI_PIN PC4
// Placeholder orientation -- verify against the physical board and adjust.
#define GYRO_1_ALIGN CW0_DEG
Comment on lines +154 to +159
#define TIMER_PIN_MAPPING \
TIMER_PIN_MAP(0, PC6, 2, -1) \
TIMER_PIN_MAP(1, PC7, 2, -1) \
TIMER_PIN_MAP(2, PC8, 2, -1) \
TIMER_PIN_MAP(3, PC9, 2, -1) \
TIMER_PIN_MAP(4, PA9, 1, -1)
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.

2 participants