Skip to content

Conversation

haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Aug 25, 2025

Summary by CodeRabbit

  • New Features
    • Added support for the GEPRC TAKER H743 Mini flight controller.
    • Enabled accelerometer/gyro (ICM42688P), multiple barometers (BMP280/DPS310/MS5611), and MAX7456 OSD.
    • Added onboard flash logging support and gyro clock-in compatibility.
    • Provided ready-to-use pinouts for 8 motors, beeper, LED strip, UARTs, I2C/SPI, ADC, and auxiliary GPIO.
    • Set sensible defaults for voltage/current sensing and Blackbox logging.
    • Optimized peripheral timing and data handling for improved stability.

@haslinghuis haslinghuis self-assigned this Aug 25, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Walkthrough

Adds a new board configuration header for GEPRC_TAKER_H743MINI on STM32H743, defining sensors, peripherals, pin mappings, SPI/I2C/UART instances, timers/DMA options, default meter sources, and feature flags (gyro clkin, MAX7456, flash). Introduces TIMER_PIN_MAPPING and sets device-specific GPIO assignments and peripheral bindings.

Changes

Cohort / File(s) Summary
New STM32H743 board config: GEPRC_TAKER_H743MINI
configs/GEPRC_TAKER_H743MINI/config.h
Adds board header defining MCU/board IDs; enables ACC/GYRO (ICM42688P), BARO (BMP280/DPS310/MS5611), MAX7456, W25Q128FV flash, gyro CLKIN; declares pin mappings (beeper, 8 motors, LEDs, UART1/2/3/4/7/8, I2C1/2, SPI2/3/4, ADCs, PINIOs); sets SPI/I2C/UART instances; TIMER_PIN_MAPPING; DMA opts (ADC1/3, TIMUP1/3); default meters and flash/blackbox settings; specific CS/EXTI/CLKIN pins for gyro/MAX7456/flash.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ot0tot
  • nerdCopter
  • osirisinferi
  • KarateBrot
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary or `` to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@haslinghuis haslinghuis force-pushed the GEPRCTAKER_H743_MINI branch from 4d9ab02 to 4c8f9bf Compare August 25, 2025 09:37
Co-authored-by: ot0tot <36753790+ot0tot@users.noreply.github.com>
@haslinghuis haslinghuis changed the title Add GEPRCTAKER_H743_MINI Add GEPRC_TAKER_H743_MINI Sep 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
configs/GEPRC_TAKER_H743_MINI/config.h (3)

61-61: Potentially invalid: UART5_RX on PB5

PB5 is unlikely to be a valid UART5_RX on H743 per typical Betaflight mappings (UART5_RX is commonly PD2). If UART5 isn’t used on this board, drop the define; if it is, switch to a supported pin and adjust any conflicting GPIO (beeper currently on PD2).

Possible fixes (pick one that matches the hardware):

-#define UART5_RX_PIN         PB5
+// Option A (if UART5 needed): move beeper elsewhere and use PD2 for UART5_RX
+//#define BEEPER_PIN           <NEW_PIN>
+#define UART5_RX_PIN         PD2

-#define UART5_RX_PIN         PB5
+// Option B (if UART5 not routed): remove undefined mapping to avoid confusion
+// #define UART5_RX_PIN      <not connected>

111-115: Current meter scale likely board-specific

Scale 100 is a placeholder on many targets. Confirm against the board’s shunt/amp and ADC divider so default OOB current isn’t way off.


41-41: Trim trailing whitespace

Small formatting nit to keep diffs clean.

-#define BEEPER_PIN           PD2 
+#define BEEPER_PIN           PD2
-#define SPI2_SDI_PIN         PC2  
-#define SPI2_SDO_PIN         PC3 
+#define SPI2_SDI_PIN         PC2
+#define SPI2_SDO_PIN         PC3
-#define SPI4_SDI_PIN         PE5   
+#define SPI4_SDI_PIN         PE5

Also applies to: 70-71, 76-76

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bf51ac0 and bda5dc3.

📒 Files selected for processing (1)
  • configs/GEPRC_TAKER_H743_MINI/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) with GPIO_AF8_UART4, as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This is a valid pin mapping despite what some generic STM32 documentation might suggest.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-05-31T17:01:39.423Z
Learnt from: haslinghuis
PR: betaflight/config#798
File: configs/FURYF4OSD/config.h:88-88
Timestamp: 2025-05-31T17:01:39.423Z
Learning: For STM32F4xx platforms, PB1 pin timer definitions are:
1 = DEF_TIM(TIM1, CH3N, PB1, 0, 0)
2 = DEF_TIM(TIM3, CH4, PB1, 0, 0) 
3 = DEF_TIM(TIM8, CH3N, PB1, 0, 0)
Timer instance 2 (TIM3, CH4) is the correct mapping for PB1 motor control on STM32F4xx platforms as defined in src/platform/STM32/timer_stm32f4xx.c

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-07-14T15:41:14.364Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:79-88
Timestamp: 2025-07-14T15:41:14.364Z
Learning: In STM32F405 configurations, PB1 typically maps to TIM3_CH4 and PC9 typically maps to TIM8_CH4. These are different timers and do not share DMA resources, so there is no conflict when both pins are used simultaneously (e.g., PB1 for LED_STRIP and PC9 for MOTOR4).

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.

Applied to files:

  • configs/GEPRC_TAKER_H743_MINI/config.h
🔇 Additional comments (8)
configs/GEPRC_TAKER_H743_MINI/config.h (8)

24-26: BOARD_NAME/target IDs look correct

BOARD_NAME matches the directory name and MANUFACTURER_ID is 4 chars. No issues.


51-63: Verify UART pin mappings against serial_uart_stm32h7xx.c

Most UART mappings look standard for H743 (USART1 PA9/PA10, USART2 PD5/PD6, USART3 PD8/PD9, UART4 PA0/PA1, UART7 PE8/PE7, UART8 PE1/PE0). Please double-check these against Betaflight’s STM32H7 UART map to avoid AF mismatches.


86-99: Confirm GYRO_1_CLKIN timer index matches PB0’s timer

You’ve set GYRO_1_CLKIN_PIN to PB0 and mapped it with timer index 2. Ensure that “2” corresponds to the timer instance/channel PB0 actually supports (e.g., TIM3_CH3 on H743) per timer_stm32h7xx.c. A mismatch here will break the external gyro clock.


88-98: Motor timer groups look coherent (TIM3 on PC6–PC9, TIM1 on PE9/11/13/14)

Mapping aligns with common H743 pin/timer capabilities (PC6-9→TIM3, PE9/11/13/14→TIM1). Nice separation across timer groups for motors 1–8.


100-104: DMA options: validate no conflicts with timers/SPI/ADC

Please verify ADC1/ADC3 and TIMUP1/TIMUP3 DMA options align with your chosen timer groups and SPI DMA lines to avoid contention under load (motors + LED + blackbox).


80-80: PA15 as FLASH CS: confirm JTAG disabled (SWD-only)

PA15 is JTAG TDI on H7. This is fine if the board uses SWD-only. Confirm debug config won’t clash with FLASH CS.


82-82: PC14 as PINIO2: verify LSE crystal not populated

PC14/PC15 are LSE pins on H7. If an LSE is present, using PC14 as GPIO can cause issues. Please confirm hardware.


69-77: SPI bus/pin selections look consistent

SPI2 (PB13/PC2/PC3) for gyro and SPI4 (PE2/PE5/PE6 + PE4 CS) for MAX7456, and SPI3 for flash align well. Good separation across buses.

@osirisinferi
Copy link
Contributor

@coderabbitai

PB5 is unlikely to be a valid UART5_RX on H743 per typical Betaflight mappings (UART5_RX is commonly PD2). If UART5 isn’t used on this board, drop the define; if it is, switch to a supported pin and adjust any conflicting GPIO (beeper currently on PD2).

Previously, in #872, you were instructed to use the pin mappings in the serial_uart_{platform}.c file (in this case serial_uart_stm32h7xx.c) to see if a pin was valid for a certain UART. You even added a learning with timestamp 2025-08-20T02:54:58.553Z about it.

In serial_uart_stm32h7xx.c we see the pin PB5 is perfectly valid for UART5_RX, being mapped to GPIO_AF14_UART5.

Please use your learnings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 1, 2025

Tip

For best results, initiate chat on the files or code changes.

@osirisinferi You are absolutely correct, and I apologize for the error. Looking at my retrieved learnings, I can see that I have established knowledge that:

  1. Learning ID 93de549f-429c-43ce-a3f8-76bec5c2b2cc: "For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets."

  2. Learning ID 1082f390-38bb-43b6-9cf6-6f1d505a3fca: "For STM32H743, both UART5_TX (PB6) and UART5_RX (PB5) use alternate function AF14, not AF8. The Port B alternate functions table in the STM32H743 datasheet confirms PB5 supports UART5_RX and PB6 supports UART5_TX, both using AF14."

You are right that PB5 is perfectly valid for UART5_RX on STM32H743 as confirmed by the official Betaflight serial_uart_stm32h7xx.c file with GPIO_AF14_UART5. I should have applied these learnings consistently instead of making assumptions based on "typical" mappings.

Thank you for the correction and for holding me accountable to use the established knowledge base properly. The UART5_RX_PIN definition using PB5 in the configuration is correct and should not be flagged as an issue.


🧠 Learnings used
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) with GPIO_AF8_UART4, as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This is a valid pin mapping despite what some generic STM32 documentation might suggest.

Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.

Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Learnt from: osirisinferi
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-19T18:34:22.887Z
Learning: For STM32H743, both UART5_TX (PB6) and UART5_RX (PB5) use alternate function AF14, not AF8. The Port B alternate functions table in the STM32H743 datasheet confirms PB5 supports UART5_RX and PB6 supports UART5_TX, both using AF14.

Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 can use PH2 (UART4_RX) and PH3 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c lines 183-212. This is a valid pin mapping for the AT32F435 platform.

Learnt from: haslinghuis
PR: betaflight/config#883
File: configs/HGLRCF435_AIO/config.h:50-58
Timestamp: 2025-08-26T14:26:11.863Z
Learning: For AT32F435 in Betaflight, UART4 supports multiple pin options including PH2 (UART4_RX) and PH3 (UART4_TX) with GPIO_MUX_8, as confirmed in the official Betaflight codebase at src/platform/AT32/serial_uart_at32f43x.c. The AT32 platform has broader pin support than initially apparent from basic searches.

Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:52-53
Timestamp: 2025-07-14T15:38:06.837Z
Learning: In Betaflight flight controller configurations, it's common and intentional for UART2_RX_PIN and RX_PPM_PIN to share the same GPIO pin (like PA3) because they represent mutually exclusive receiver input protocols. The pin can be configured for either serial receiver input (UART2) or PPM input, but not both simultaneously. This is a standard design pattern in flight controller hardware.

Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines use valid identifiers from the serialPortIdentifier_e enum in src/main/io/serial.h. Valid identifiers include: SERIAL_PORT_USB_VCP (20), SERIAL_PORT_SOFTSERIAL1 (30), SERIAL_PORT_SOFTSERIAL2 (31), SERIAL_PORT_LPUART1 (40), SERIAL_PORT_UART0 (50, if SERIAL_UART_FIRST_INDEX == 0), SERIAL_PORT_USART1 (51 or 50), SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, SERIAL_PORT_USART6, SERIAL_PORT_USART7, SERIAL_PORT_USART8, SERIAL_PORT_UART9, SERIAL_PORT_USART10. While some aliases exist (like SERIAL_PORT_UART3 = SERIAL_PORT_USART3), prefer using the primary identifiers as referenced in the serialPortIdentifiers array to avoid build failures.

Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.

@haslinghuis haslinghuis changed the title Add GEPRC_TAKER_H743_MINI Add GEPRC_TAKER_H743MINI Sep 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
configs/GEPRC_TAKER_H743MINI/config.h (2)

41-41: Trim trailing whitespace.

Minor formatting nits.

-#define BEEPER_PIN           PD2 
+#define BEEPER_PIN           PD2
-#define SPI2_SDI_PIN         PC2  
-#define SPI2_SDO_PIN         PC3 
+#define SPI2_SDI_PIN         PC2
+#define SPI2_SDO_PIN         PC3
-#define SPI4_SDI_PIN         PE5   
+#define SPI4_SDI_PIN         PE5

Also applies to: 70-71, 76-76


41-62: Remove unused UART5_RX_PIN define
UART5 isn’t bound to any SERIAL_PORT in this board config; drop the stray RX define to avoid confusion.

-#define UART5_RX_PIN         PB5
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bda5dc3 and 5078636.

📒 Files selected for processing (1)
  • configs/GEPRC_TAKER_H743MINI/config.h (1 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:44-56
Timestamp: 2025-07-14T16:16:56.822Z
Learning: For Betaflight board configurations of boards already in production, pin assignments in config.h files reflect the actual hardware design and cannot be changed, even if they present potential conflicts with debug interfaces. The configuration must match the physical board layout, not ideal software design preferences.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the BOARD_NAME define in each config.h matches the directory name it resides in (e.g., configs/AXISFLYINGF7AIO/config.h must have #define BOARD_NAME AXISFLYINGF7AIO). This check is required for all Betaflight board configuration reviews.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-07-03T04:33:57.480Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-03T04:33:57.480Z
Learning: Always verify that the `BOARD_NAME` define in config.h files exactly matches the directory name where the config file is located. For example, if the config file is in configs/AXISFLYINGF7AIO/config.h, then the BOARD_NAME should be defined as "AXISFLYINGF7AIO". This ensures proper board identification and configuration loading in Betaflight.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: In STM32F405-based flight controller configurations, timer pin mappings must be carefully analyzed for DMA stream conflicts, especially between motor timers, LED strip timers, and SPI DMA assignments. Changes to TIMER_PIN_MAPPING should include verification that all required peripherals (motors, LED strip, blackbox SPI) can coexist without DMA conflicts.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PA15 maps to TIM2_CH1 (timer index 2) as defined in timer_stm32h7xx.c. When used for GYRO_CLKIN functionality, it's recommended to use the macro name GYRO_1_CLKIN_PIN in TIMER_PIN_MAPPING for consistency with other pin definitions.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
PR: betaflight/config#888
File: configs/ZEX_ATHENA_MINI/config.h:0-0
Timestamp: 2025-08-28T20:45:36.652Z
Learning: In STM32H743 Betaflight configurations, PB0 can use multiple timer options including TIM1_CH2N, TIM3_CH3, and TIM8_CH2N as defined in timer_stm32h7xx.c. For CAMERA_CONTROL_PIN assignments, TIM3_CH3 (timer index 3) is the appropriate choice.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-08-20T02:54:58.596Z
Learnt from: ot0tot
PR: betaflight/config#872
File: configs/HGLRCH743/config.h:82-83
Timestamp: 2025-08-20T02:54:58.596Z
Learning: For Betaflight board configuration reviews, the definitive source for validating UART pin assignments is the serial_uart_{platform}.c file in the Betaflight codebase (e.g., serial_uart_stm32h7xx.c for STM32H7xx platforms), not generic MCU datasheets. These files contain the exact pin mappings that Betaflight supports for each UART peripheral.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) with GPIO_AF8_UART4, as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This is a valid pin mapping despite what some generic STM32 documentation might suggest.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-05-31T17:01:39.423Z
Learnt from: haslinghuis
PR: betaflight/config#798
File: configs/FURYF4OSD/config.h:88-88
Timestamp: 2025-05-31T17:01:39.423Z
Learning: For STM32F4xx platforms, PB1 pin timer definitions are:
1 = DEF_TIM(TIM1, CH3N, PB1, 0, 0)
2 = DEF_TIM(TIM3, CH4, PB1, 0, 0) 
3 = DEF_TIM(TIM8, CH3N, PB1, 0, 0)
Timer instance 2 (TIM3, CH4) is the correct mapping for PB1 motor control on STM32F4xx platforms as defined in src/platform/STM32/timer_stm32f4xx.c

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
PR: betaflight/config#0
File: :0-0
Timestamp: 2025-07-23T13:43:50.456Z
Learning: For Betaflight board configuration reviews, always verify that serial port defines (like ESC_SENSOR_UART, MSP_UART, GPS_UART, etc.) use valid SERIAL_PORT identifiers that match those defined in the Betaflight codebase at src/main/io/serial.h. Common valid identifiers include SERIAL_PORT_USART1, SERIAL_PORT_USART2, SERIAL_PORT_USART3, SERIAL_PORT_UART4, SERIAL_PORT_UART5, etc. Invalid identifiers like SERIAL_PORT_UART3 (should be SERIAL_PORT_USART3) will cause build failures.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-07-14T15:41:14.364Z
Learnt from: ot0tot
PR: betaflight/config#834
File: configs/RADIOLINKF405/config.h:79-88
Timestamp: 2025-07-14T15:41:14.364Z
Learning: In STM32F405 configurations, PB1 typically maps to TIM3_CH4 and PC9 typically maps to TIM8_CH4. These are different timers and do not share DMA resources, so there is no conflict when both pins are used simultaneously (e.g., PB1 for LED_STRIP and PC9 for MOTOR4).

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
📚 Learning: 2025-08-21T11:11:19.213Z
Learnt from: haslinghuis
PR: betaflight/config#870
File: configs/ZEX_ATHENA_STD_PRO/config.h:54-55
Timestamp: 2025-08-21T11:11:19.213Z
Learning: For STM32H743 in Betaflight, UART4 can use PB8 (UART4_RX) and PB9 (UART4_TX) as confirmed in the official Betaflight codebase at src/platform/STM32/serial_uart_stm32h7xx.c. This contradicts some generic STM32 documentation that might not show all supported pin configurations used by Betaflight.

Applied to files:

  • configs/GEPRC_TAKER_H743MINI/config.h
🔇 Additional comments (5)
configs/GEPRC_TAKER_H743MINI/config.h (5)

24-26: BOARD_NAME matches directory — good.

BOARD_NAME equals GEPRC_TAKER_H743MINI and aligns with configs/GEPRC_TAKER_H743MINI/.


100-104: Verify DMA OPT selections match chosen timers and ADCs.

Confirm ADC1_DMA_OPT=9, ADC3_DMA_OPT=10, TIMUP1_DMA_OPT=11, TIMUP3_DMA_OPT=12 correspond to valid streams and don’t collide with motor/LED timers for BDShot/DShot.

Pointers:

  • Cross‑check against src/main/drivers/stm32/dma_reqmap_mcu.c and dma_stm32h7xx.c.
  • Build logs will print resolved DMA routes; please skim for “TIMUP” and “ADC”.

69-76: SPI wiring consistency looks correct.

  • FLASH on SPI3 with CS=PA15 and SCK/MISO/MOSI on PC10/PC11/PC12 is consistent.
  • MAX7456 on SPI4 with CS=PE4 and PE2/PE5/PE6 looks correct.

Also applies to: 80-80, 83-83, 116-117, 120-121


105-110: Serial port identifiers are valid.

SERIAL_PORT_USART1/2/8 are correct enum values for MSP_DISPLAYPORT_UART, SERIALRX_UART, MSP_UART.


88-97: TIMER_PIN_MAPPING verification required
Mapping file timer_stm32h7xx.c wasn’t found—manually confirm that PC6–PC9 (M1–M4) and PE9/11/13/14 (M5–M8) map to the correct TIMx instances and channels to match indices 1/2 in your configs/GEPRC_TAKER_H743MINI/config.h.

@haslinghuis haslinghuis merged commit 02572ab into betaflight:master Sep 14, 2025
2 checks passed
@haslinghuis haslinghuis deleted the GEPRCTAKER_H743_MINI branch September 14, 2025 14:41
@coderabbitai coderabbitai bot mentioned this pull request Sep 23, 2025
6 tasks
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.

5 participants