Skip to content

Conversation

@haslinghuis
Copy link
Member

@haslinghuis haslinghuis commented Dec 26, 2025

  • CAMERA_CONTROL does not need DMA
  • MOTOR 7 and 8 were using N channel timer

Summary by CodeRabbit

  • Chores

    • Updated hardware timer pin mappings to improve peripheral routing.
  • Bug Fixes

    • Switched default motor signal handling to bit‑banged mode for more reliable output.
    • Removed an obsolete pin assignment to prevent conflicts.

✏️ Tip: You can customize this high-level summary in your review settings.

@haslinghuis haslinghuis self-assigned this Dec 26, 2025
@haslinghuis haslinghuis added the Bugfix Fixes a problem label Dec 26, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Walkthrough

Adjust board config: change TIMER_PIN_MAPPING entries for PA0, PB1, PB0; replace DEFAULT_DSHOT_BURST/DMAR with DEFAULT_DSHOT_BITBANG = DSHOT_BITBANG_ON; remove PINIO4_BOX macro in configs/GEPRCF722_BT_HD/config.h.

Changes

Cohort / File(s) Summary
Board configuration (timer, DSHOT, pins)
configs/GEPRCF722_BT_HD/config.h
- TIMER_PIN_MAPPING: PA0 first entry changed from TIMER_PIN_MAP(0, PA0, 2, 0) to TIMER_PIN_MAP(0, PA0, 2, -1); PB1/PB0 mappings updated from (2, 0) to (1, 0).
- DSHOT: removed DEFAULT_DSHOT_BURST/DSHOT_DMAR_ON, added DEFAULT_DSHOT_BITBANG set to DSHOT_BITBANG_ON.
- Removed #define PINIO4_BOX 42.

Sequence Diagram(s)

(omitted — change set is configuration-level and does not introduce a multi-component runtime control flow requiring a sequence diagram)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ot0tot
  • nerdCopter

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides minimal information about the changes but does not follow the mandatory template structure required for flight controller configuration submissions, which includes hardware compliance requirements and a checklist. Complete the required template with hardware compliance sections, manufacturer design guideline adherence confirmation, testing details, and the mandatory checklist items to meet repository standards.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: fixing TIMER_PIN_MAPPING configuration for the GEPRCF722_BT_HD device, which aligns with the core objective of correcting pin timer mappings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 121e173 and d42de6c.

📒 Files selected for processing (1)
  • configs/GEPRCF722_BT_HD/config.h
🧰 Additional context used
🧠 Learnings (33)
📓 Common learnings
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T17:15:05.111Z
Learning: For Betaflight board configuration reviews, when analyzing TIMER_PIN_MAPPING definitions in config.h files, perform a comprehensive verification by: (1) Clone or access the betaflight/betaflight repository and look up each pin's timer definitions from the appropriate timer_stm32*.c file (e.g., timer_stm32h7xx.c for STM32H743, timer_stm32f4xx.c for STM32F405, etc.). (2) For each TIMER_PIN_MAP entry, verify that the timer occurrence index specified actually exists in the timer definition file for that pin. Non-existent occurrences will cause build or runtime errors. (3) Check if any timer occurrence being used is a complementary channel (ending in "N" like TIM1_CH2N, TIM8_CH3N). Complementary channels are not suitable for motor/servo control and must not be actively selected. (4) Verify that each timer channel uses a unique DMA index on MCUs with DMAMUX (like STM32H7). For MCUs without DMAMUX (like STM32F4/F7), verify non-conflicting DMA stream requests according to the appropriate DMA r...
Learnt from: haslinghuis
Repo: betaflight/config PR: 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: osirisinferi
Repo: betaflight/config PR: 972
File: configs/AXISFLYING_H743PRO/config.h:0-0
Timestamp: 2025-12-03T20:45:27.890Z
Learning: In Betaflight board configurations, always verify that TIMER_PIN_MAP entries do not use the same pin macro name multiple times. Each physical pin should appear only once in the TIMER_PIN_MAP definitions. For example, GYRO_1_CLKIN_PIN and GYRO_2_CLKIN_PIN should each appear exactly once, not have GYRO_1_CLKIN_PIN appear twice. This is a blocking issue that must be resolved before approval.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews, motor channels must be prioritized above all other peripherals when assigning timers/DMA according to section 3.2 of the Manufacturer Design Guidelines. Designs that cannot allocate sufficient timer/DMA resources for motors/DShot will be rejected.
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T16:50:57.069Z
Learning: In Betaflight board configurations, when GYRO_1_CLKIN_PIN (or GYRO_2_CLKIN_PIN) is defined, it must be included in the TIMER_PIN_MAPPING with appropriate timer and DMA settings, typically with DMA index -1. Check similar boards from the same manufacturer for the correct pattern.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews, TIM1 and TIM8 are "advanced" timers used by DShot bitbang and can drive any GPIO in bitbang mode. Do not assign TIM1/TIM8 to other critical functions when bitbanged DShot is expected, as this will create resource conflicts.
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T17:04:49.273Z
Learning: For STM32H743 and other MCUs with DMAMUX in Betaflight, LED_STRIP_PIN must have a valid DMA index in TIMER_PIN_MAPPING (not -1) because WS2812/addressable LEDs require DMA for precise timing control. Using DMA -1 for LED strip will cause the feature to be non-functional.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews on STM32F7/H7/G4/AT32F435 MCUs, bitbanged DShot is preferred because DMAMUX avoids many DMA conflicts. Bitbanged DShot always uses TIM1 and/or TIM8, so at least one of those timers must be available for motor control.
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T16:56:51.341Z
Learning: In TIMER_PIN_MAPPING definitions for STM32H743, even though the chip has DMAMUX, each timer channel must still use a unique DMA index to avoid resource conflicts. Using the same DMA index (e.g., 0) for multiple timer channels will cause DMA conflicts. Proper H743 configurations use sequential or varied DMA indices (e.g., 0, 1, 2, 3, 4, 5, 6, 7, etc.) with -1 reserved for special pins without DMA like camera control or gyro clock input.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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.
Learnt from: osirisinferi
Repo: betaflight/config PR: 972
File: configs/AXISFLYING_H743PRO/config.h:98-98
Timestamp: 2025-12-03T20:50:01.374Z
Learning: In Betaflight board configurations, if PINIOx_BOX or PINIOx_CONFIG defines are present in a config.h file, the corresponding PINIOx_PIN define must also be present to specify the actual pin assignment. Each PINIO instance requires a pin definition before it can be configured or assigned to a box.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews on STM32F4, prefer PWM-based DShot by default due to DMA2/SPI1 limitations and errata. Bitbanged DShot uses DMA2 and TIM1/TIM8 which conflicts with SPI1 (gyro) DMA. Avoid using TIM1/TIM8 for other functions on F4 if bitbanged DShot is needed.
📚 Learning: 2025-12-27T17:15:05.111Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T17:15:05.111Z
Learning: For Betaflight board configuration reviews, when analyzing TIMER_PIN_MAPPING definitions in config.h files, perform a comprehensive verification by: (1) Clone or access the betaflight/betaflight repository and look up each pin's timer definitions from the appropriate timer_stm32*.c file (e.g., timer_stm32h7xx.c for STM32H743, timer_stm32f4xx.c for STM32F405, etc.). (2) For each TIMER_PIN_MAP entry, verify that the timer occurrence index specified actually exists in the timer definition file for that pin. Non-existent occurrences will cause build or runtime errors. (3) Check if any timer occurrence being used is a complementary channel (ending in "N" like TIM1_CH2N, TIM8_CH3N). Complementary channels are not suitable for motor/servo control and must not be actively selected. (4) Verify that each timer channel uses a unique DMA index on MCUs with DMAMUX (like STM32H7). For MCUs without DMAMUX (like STM32F4/F7), verify non-conflicting DMA stream requests according to the appropriate DMA r...

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-03T20:45:27.890Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 972
File: configs/AXISFLYING_H743PRO/config.h:0-0
Timestamp: 2025-12-03T20:45:27.890Z
Learning: In Betaflight board configurations, always verify that TIMER_PIN_MAP entries do not use the same pin macro name multiple times. Each physical pin should appear only once in the TIMER_PIN_MAP definitions. For example, GYRO_1_CLKIN_PIN and GYRO_2_CLKIN_PIN should each appear exactly once, not have GYRO_1_CLKIN_PIN appear twice. This is a blocking issue that must be resolved before approval.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-07-14T16:16:56.822Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-30T20:23:04.046Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews, TIM1 and TIM8 are "advanced" timers used by DShot bitbang and can drive any GPIO in bitbang mode. Do not assign TIM1/TIM8 to other critical functions when bitbanged DShot is expected, as this will create resource conflicts.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-27T16:50:57.069Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T16:50:57.069Z
Learning: In Betaflight board configurations, when GYRO_1_CLKIN_PIN (or GYRO_2_CLKIN_PIN) is defined, it must be included in the TIMER_PIN_MAPPING with appropriate timer and DMA settings, typically with DMA index -1. Check similar boards from the same manufacturer for the correct pattern.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-27T16:56:51.341Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T16:56:51.341Z
Learning: In TIMER_PIN_MAPPING definitions for STM32H743, even though the chip has DMAMUX, each timer channel must still use a unique DMA index to avoid resource conflicts. Using the same DMA index (e.g., 0) for multiple timer channels will cause DMA conflicts. Proper H743 configurations use sequential or varied DMA indices (e.g., 0, 1, 2, 3, 4, 5, 6, 7, etc.) with -1 reserved for special pins without DMA like camera control or gyro clock input.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-09-26T16:32:46.694Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-09-26T16:32:46.694Z
Learning: When reviewing hardware configuration files like Betaflight configs, always check for pin assignment conflicts by verifying that no physical pins (like PB10, PB11, etc.) are assigned to multiple peripheral functions simultaneously.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-27T16:50:57.069Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T16:50:57.069Z
Learning: In TIMER_PIN_MAPPING definitions, each timer channel must have a unique DMA index. Multiple entries using the same timer (e.g., timer 1 or timer 2) with the same DMA index (e.g., 0) will cause DMA conflicts. Proper configurations use sequential or varied DMA indices to avoid resource conflicts between motors, servos, and other peripherals.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-05-31T17:01:39.423Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-27T16:56:51.341Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T16:56:51.341Z
Learning: When defining TIMER_PIN_MAPPING entries, specifying a timer occurrence index that doesn't exist for a given pin will cause build or runtime errors. For example, on STM32H743, pins PD12-PD15 map to TIM4 channels (occurrence 1 only), so using occurrence 2 or 3 is invalid. Always verify the correct timer occurrence index by checking similar board configurations or the timer definition file (timer_stm32h7xx.c) for the specific MCU platform.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-07-14T15:41:14.364Z
Learnt from: ot0tot
Repo: betaflight/config PR: 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/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 PB0 in Betaflight, there are three timer options: TIM1_CH2N, TIM3_CH3, and TIM8_CH2N. Only TIM3_CH3 (timer index 2) is suitable for GYRO_CLKIN as the other two are complementary (N) channels. This is confirmed in timer_stm32h7xx.c.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 881
File: configs/GEPRC_TAKER_H743MINI/config.h:86-99
Timestamp: 2025-09-01T19:58:52.049Z
Learning: For STM32H743 in Betaflight, PB0 has multiple timer options but only timer index 2 provides a non-complementary output suitable for GYRO_CLKIN functionality. The other timer options for PB0 are N channels (complementary outputs) which are not appropriate for CLKIN usage.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-08-28T20:45:36.652Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 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/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:06:07.492Z
Learning: BMP280 and DPS310 barometer drivers in Betaflight do not require USE_I2C to be explicitly defined in board configurations. Many existing boards successfully use USE_BARO_BMP280 and USE_BARO_DPS310 without defining USE_I2C, indicating that the I2C dependency is handled automatically by the build system or these sensors support alternative communication methods.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-07-25T20:06:07.492Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 719
File: configs/SPEDIXG473/config.h:29-38
Timestamp: 2025-07-25T20:06:07.492Z
Learning: BMP280 and DPS310 barometer drivers in Betaflight do not require USE_I2C to be explicitly defined in board configurations. Out of 264 boards using these drivers, 259 (98%) work without USE_I2C defined, indicating that the I2C dependency is handled automatically by the build system.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 822
File: configs/AXISFLYINGH7MINI/config.h:29-37
Timestamp: 2025-06-23T18:43:31.746Z
Learning: In Betaflight configuration files, feature enablement macros like USE_MAG are build options that can be controlled at compile time, while hardware instance definitions like MAG_I2C_INSTANCE are predefined in board configurations to assist with hardware mapping when those features are enabled at build time.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-30T20:23:04.046Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews on STM32F4, prefer PWM-based DShot by default due to DMA2/SPI1 limitations and errata. Bitbanged DShot uses DMA2 and TIM1/TIM8 which conflicts with SPI1 (gyro) DMA. Avoid using TIM1/TIM8 for other functions on F4 if bitbanged DShot is needed.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-30T20:23:04.046Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews on STM32F7/H7/G4/AT32F435 MCUs, bitbanged DShot is preferred because DMAMUX avoids many DMA conflicts. Bitbanged DShot always uses TIM1 and/or TIM8, so at least one of those timers must be available for motor control.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-07-03T15:17:30.040Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-07-03T15:17:30.040Z
Learning: In Betaflight configurations, when a target name suggests dual IMUs (like JHEF7DUAL) but specific hardware variants only have one gyro available, the preferred solution is to use DEFAULT_GYRO_TO_USE macro to specify which gyro to use by default rather than pruning gyro defines or creating redundant configurations. This approach maintains compatibility when the same target is used by multiple hardware variants from the same manufacturer.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-07-23T13:43:50.456Z
Learnt from: ot0tot
Repo: betaflight/config PR: 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/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-06-02T16:16:20.197Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: For Betaflight configurations, blackbox logging via SPI3 and LED_STRIP functionality can be mutually exclusive due to DMA stream conflicts on STM32F4 targets. This hardware limitation should be identified during timer configuration reviews.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-08-22T17:08:23.283Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 879
File: configs/AIRBOTSUPERF4V2/config.h:42-45
Timestamp: 2025-08-22T17:08:23.283Z
Learning: In Betaflight board configurations, OSD feature flags like USE_OSD_SD (analog/MAX7456) and USE_OSD_HD (digital/MSP DisplayPort) are typically defined at build time by the build system, not in the individual board config.h files. Board configs can conditionally define OSD-related settings based on these build-time flags.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-30T20:23:04.046Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews, avoid sharing blocking SPI devices (e.g., MAX7456 OSD, blackbox flash) on the same SPI bus used by the gyro, as blocking operations degrade flight performance. Place the gyro on a dedicated or reliable SPI bus. On STM32F4, avoid enabling DMA on the same DMA controller when using bitbanged motors.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-12-03T20:50:01.374Z
Learnt from: osirisinferi
Repo: betaflight/config PR: 972
File: configs/AXISFLYING_H743PRO/config.h:98-98
Timestamp: 2025-12-03T20:50:01.374Z
Learning: In Betaflight board configurations, if PINIOx_BOX or PINIOx_CONFIG defines are present in a config.h file, the corresponding PINIOx_PIN define must also be present to specify the actual pin assignment. Each PINIO instance requires a pin definition before it can be configured or assigned to a box.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-05-28T15:45:15.608Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/MERAKRCF722/config.h:32-32
Timestamp: 2025-05-28T15:45:15.608Z
Learning: The presence of GYRO_2_SPI_INSTANCE definition in a board config does not necessarily mean the board uses dual gyros. Some boards have GYRO_2_SPI_INSTANCE defined but it's not actually used, so they should not receive GYRO_COUNT or other dual-gyro related definitions. Only boards that actually utilize dual gyros should get these definitions.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-06-08T22:02:28.961Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 814
File: configs/JHEF405PRO/config.h:109-109
Timestamp: 2025-06-08T22:02:28.961Z
Learning: The JHEF405PRO board does not actually use dual gyros despite having GYRO_2_SPI_INSTANCE defined in its configuration. It should not receive GYRO_COUNT or other dual-gyro related definitions since only the first gyro is supported.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-05-28T15:48:18.449Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/FLYWOOF411/config.h:33-33
Timestamp: 2025-05-28T15:48:18.449Z
Learning: The FLYWOOF411 board does not actually use dual gyros despite having GYRO_2_SPI_INSTANCE defined in its configuration. It was incorrectly targeted for GYRO_COUNT and dual gyro support.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition to specify the number of available gyros.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
📚 Learning: 2025-07-14T16:16:50.628Z
Learnt from: haslinghuis
Repo: betaflight/config PR: 835
File: configs/HDZERO_HALO_MPU6000/config.h:29-35
Timestamp: 2025-07-14T16:16:50.628Z
Learning: GYRO_1_SPI_CLOCK_DIVIDER is not used in any Betaflight target configuration files. SPI clock frequency settings are not commonly configured at the target level.

Applied to files:

  • configs/GEPRCF722_BT_HD/config.h
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Process Target GEPRCF722_BT_HD
🔇 Additional comments (4)
configs/GEPRCF722_BT_HD/config.h (4)

87-87: LGTM! Camera control DMA removal is correct.

Camera control uses PWM signaling and doesn't require DMA. Changing the DMA index from 0 to -1 is appropriate and frees up DMA resources for motor outputs.


115-118: LGTM! PINIO4_BOX removal is correct.

The removal of PINIO4_BOX is appropriate since there is no corresponding PINIO4_PIN defined. Based on learnings, each PINIO box requires a corresponding pin definition.


106-106: Bitbanged DShot conflicts with SPI1 gyro on STM32F722 due to shared DMA2 resources.

On STM32F722, both SPI1 (used by both gyros) and the TIM1/TIM8 timers used by bitbanged DShot are serviced by DMA2. Enabling bitbanged DShot creates contention for DMA2 streams and can degrade or disable SPI1 DMA transfers, impacting gyro sampling reliability.

Consider either:

  • Disable bitbanged DShot and use PWM-based DShot with TIM3/TIM4 (DMA1), or
  • Move a gyro or other SPI1 device to SPI2/SPI3 to reduce DMA2 pressure.
⛔ Skipped due to learnings
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews on STM32F4, prefer PWM-based DShot by default due to DMA2/SPI1 limitations and errata. Bitbanged DShot uses DMA2 and TIM1/TIM8 which conflicts with SPI1 (gyro) DMA. Avoid using TIM1/TIM8 for other functions on F4 if bitbanged DShot is needed.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews on STM32F7/H7/G4/AT32F435 MCUs, bitbanged DShot is preferred because DMAMUX avoids many DMA conflicts. Bitbanged DShot always uses TIM1 and/or TIM8, so at least one of those timers must be available for motor control.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews, avoid sharing blocking SPI devices (e.g., MAX7456 OSD, blackbox flash) on the same SPI bus used by the gyro, as blocking operations degrade flight performance. Place the gyro on a dedicated or reliable SPI bus. On STM32F4, avoid enabling DMA on the same DMA controller when using bitbanged motors.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews, motor channels must be prioritized above all other peripherals when assigning timers/DMA according to section 3.2 of the Manufacturer Design Guidelines. Designs that cannot allocate sufficient timer/DMA resources for motors/DShot will be rejected.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:23:04.046Z
Learning: For Betaflight board configuration reviews, TIM1 and TIM8 are "advanced" timers used by DShot bitbang and can drive any GPIO in bitbang mode. Do not assign TIM1/TIM8 to other critical functions when bitbanged DShot is expected, as this will create resource conflicts.
Learnt from: osirisinferi
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-27T17:15:05.111Z
Learning: For Betaflight board configuration reviews, when analyzing TIMER_PIN_MAPPING definitions in config.h files, perform a comprehensive verification by: (1) Clone or access the betaflight/betaflight repository and look up each pin's timer definitions from the appropriate timer_stm32*.c file (e.g., timer_stm32h7xx.c for STM32H743, timer_stm32f4xx.c for STM32F405, etc.). (2) For each TIMER_PIN_MAP entry, verify that the timer occurrence index specified actually exists in the timer definition file for that pin. Non-existent occurrences will cause build or runtime errors. (3) Check if any timer occurrence being used is a complementary channel (ending in "N" like TIM1_CH2N, TIM8_CH3N). Complementary channels are not suitable for motor/servo control and must not be actively selected. (4) Verify that each timer channel uses a unique DMA index on MCUs with DMAMUX (like STM32H7). For MCUs without DMAMUX (like STM32F4/F7), verify non-conflicting DMA stream requests according to the appropriate DMA request mapping for that platform. Use sequential indices (0,1,2,3,4,5,6,7...) with -1 reserved only for pins that don't require DMA. (5) Verify that LED_STRIP_PIN has a valid DMA index (not -1) on platforms with DMAMUX, because WS2812/addressable LEDs require DMA for timing-critical operations. (6) Check that all defined CLKIN pins (like GYRO_1_CLKIN_PIN, GYRO_2_CLKIN_PIN) are included in the TIMER_PIN_MAPPING with appropriate timer occurrence and DMA -1. This systematic verification must be performed for all new or modified TIMER_PIN_MAPPING definitions before approval.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-06-02T16:16:20.197Z
Learning: For Betaflight configurations, blackbox logging via SPI3 and LED_STRIP functionality can be mutually exclusive due to DMA stream conflicts on STM32F4 targets. This hardware limitation should be identified during timer configuration reviews.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:17:04.545Z
Learning: For Betaflight board configuration reviews, bidirectional DShot (RPM telemetry) support is expected for ESC connections. Modern ESC firmware (Bluejay, etc.) is preferred for AIO designs. Legacy ESCs require user configuration changes.
Learnt from: haslinghuis
Repo: betaflight/config PR: 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
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-12-30T20:09:11.644Z
Learning: For Betaflight board configuration reviews, F411 MCU, SPI-based RX, and BMI270 gyro are deprecated platforms as of September 16, 2024. New target submissions using these should be flagged.
Learnt from: haslinghuis
Repo: betaflight/config PR: 0
File: :0-0
Timestamp: 2025-07-03T15:17:30.040Z
Learning: In Betaflight configurations, when a target name suggests dual IMUs (like JHEF7DUAL) but specific hardware variants only have one gyro available, the preferred solution is to use DEFAULT_GYRO_TO_USE macro to specify which gyro to use by default rather than pruning gyro defines or creating redundant configurations. This approach maintains compatibility when the same target is used by multiple hardware variants from the same manufacturer.
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition to specify the number of available gyros.
Learnt from: haslinghuis
Repo: betaflight/config PR: 792
File: configs/BEEROTORF4/config.h:30-30
Timestamp: 2025-05-28T15:42:05.402Z
Learning: The DEFAULT_GYRO_ENABLED macro with both gyros enabled (GYRO_MASK(0) | GYRO_MASK(1)) should only be added to board configurations that have DEFAULT_GYRO_TO_USE set to GYRO_CONFIG_USE_GYRO_BOTH. Boards without this setting should only get the GYRO_COUNT definition.
Learnt from: haslinghuis
Repo: betaflight/config PR: 757
File: configs/HAKRCH743/config.h:134-134
Timestamp: 2025-08-05T16:56:44.200Z
Learning: In Betaflight board configurations, when DEFAULT_GYRO_TO_USE is set to GYRO_CONFIG_USE_GYRO_BOTH, the firmware automatically establishes GYRO_COUNT during initialization for backwards compatibility. Therefore, explicit GYRO_COUNT definitions are not needed in board config files when using DEFAULT_GYRO_TO_USE.

86-97: No action required. This DMA configuration is standard across all STM32F722 boards in betaflight/config (including GEPRCF722, MAMBAF722, ATOMRCF722, EACHINEF722, and HAKRCF722). Multiple motor channels using the same DMA index is acceptable on F722 because the DMA index in TIMER_PIN_MAPPING is abstracted through timer definitions rather than representing a direct physical DMA stream. Actual stream conflicts are resolved at the timer definition level, not at this configuration layer.

Likely an incorrect or invalid review 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

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

ot0tot and others added 2 commits January 5, 2026 21:27
Default to bitbang, and remove PINIO4 as it is not defined.
@haslinghuis haslinghuis requested a review from ot0tot January 6, 2026 16:54
@haslinghuis haslinghuis merged commit 2cc4bcc into master Jan 6, 2026
5 checks passed
@haslinghuis haslinghuis deleted the haslinghuis-patch-3 branch January 6, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Fixes a problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants