-
Notifications
You must be signed in to change notification settings - Fork 191
Add AIRBOTRACINGSUPERH7 #908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Warning Rate limit exceeded@haslinghuis has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 2 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughAdds a new STM32H743 board configuration header for AIRBOTRACINGSUPERH7 defining MCU/board/manufacturer macros, enabling sensors/flash/display, and declaring complete pin, UART/I2C/SPI/ADC/timer/DMA mappings, peripheral instances, defaults, box/beeper metadata, and gyro alignment (header-only). Changes
Sequence Diagram(s)(omitted — configuration/header-only change; no runtime control flow to visualize) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
45fff31
to
a2721d9
Compare
There was a problem hiding this 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 (2)
configs/AIRBOTRACINGSUPERH7/config.h (2)
37-44
: MSP DisplayPort UART under USE_OSD_SD is confusingMSP DP is relevant to digital OSD builds. Recommend setting MSP_DISPLAYPORT_UART only under USE_OSD_HD; keep USE_MSP_DISPLAYPORT_FONT where needed.
-#ifdef USE_OSD_SD -#define USE_MSP_DISPLAYPORT_FONT -#define MSP_DISPLAYPORT_UART SERIAL_PORT_UART4 -#endif +#ifdef USE_OSD_SD +#define USE_MSP_DISPLAYPORT_FONT +#endif + #ifdef USE_OSD_HD #define MSP_DISPLAYPORT_UART SERIAL_PORT_USART1 #endif
37-44
: MSP DisplayPort UART selection vs. physical portsIf MSP DisplayPort (HD) is intended on USART1, ensure UART1 remains free in default port ordering, and that UART4 (analog block) isn’t inadvertently consumed. Consider a brief comment noting intended external connectors for UART1/UART4.
Also applies to: 52-67
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/AIRBOTRACINGSUPERH7/config.h
(1 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#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
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.
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#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.
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: 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.
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: haslinghuis
PR: betaflight/config#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.
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#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.
📚 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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/config.h
📚 Learning: 2025-08-22T17:08:23.283Z
Learnt from: haslinghuis
PR: betaflight/config#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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/config.h
📚 Learning: 2025-06-23T18:43:31.746Z
Learnt from: haslinghuis
PR: betaflight/config#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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/config.h
📚 Learning: 2025-09-01T19:58:52.049Z
Learnt from: haslinghuis
PR: betaflight/config#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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/config.h
🔇 Additional comments (9)
configs/AIRBOTRACINGSUPERH7/config.h (9)
68-71
: I2C pins align with standard H7 optionsI2C2 on PB10/PB11 and I2C3 on PA8/PC9 are typical. BARO_I2C_INSTANCE = I2CDEV_2 is consistent. LGTM.
72-84
: SPI bus assignments are conventionalSPI1/2/3/4 pin triplets are standard. FLASH on SPI2 and GYRO on SPI3 look good. No conflicts observed.
Also applies to: 113-114
85-87
: ADC choices look coherentVBAT=PC3 and CURR=PC2 are ADC1-capable; ADC_INSTANCE=ADC1 matches. Default meter sources set to ADC are consistent.
Also applies to: 103-108
46-51
: Confirm beeper hardware is active‑low — BEEPER_INVERTED is setconfigs/AIRBOTRACINGSUPERH7/config.h: BEEPER_PIN = PC0 (line 46); BEEPER_INVERTED defined (line 109). Verify the PCB beeper circuit on PC0 is low‑true (transistor/open‑collector). If the beeper is driven high, remove BEEPER_INVERTED or invert the driver logic.
24-27
: Fix BOARD_NAME to exactly match the directory nameconfigs/AIRBOTRACINGSUPERH7/config.h (lines 24-27): BOARD_NAME is "25:AIRBOTRACINGSUPERH7" but the directory basename is "AIRBOTRACINGSUPERH7" — change to:
#define BOARD_NAME AIRBOTRACINGSUPERH7⛔ Skipped due to learnings
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.
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.
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.
Learnt from: ot0tot PR: betaflight/config#681 File: configs/NYX405V1/config.h:26-28 Timestamp: 2025-07-14T15:47:16.394Z Learning: In Betaflight configuration files, MANUFACTURER_ID values must be exactly 4 ASCII characters long, not 3 characters. All manufacturer IDs in the codebase consistently use 4-character identifiers like AIRB, FOSS, SPBE, MTKS, NERC, etc.
98-102
: Verify H7 DMA option indices for collisionsADC1_DMA_OPT=8, ADC3_DMA_OPT=9, TIMUP1_DMA_OPT=10, TIMUP3_DMA_OPT=11 in configs/AIRBOTRACINGSUPERH7/config.h (lines 98–102) — confirm these indices do not collide with SPI2/SPI3 DMA (flash/gyro) or motor timer DMA streams per the STM32H7 DMA map used by Betaflight. Sandbox repo search failed (src missing).
Run locally: rg -nP 'DMA_OPT|TIMUP[1-8]_DMA_OPT|ADC[1-3]_DMA_OPT|SPI[23].*DMA' -S -C3
Compare results to the STM32H7 DMA mapping (e.g., timer_stm32h7xx.c / dma_stm32h7xx.c or equivalent board DMA map) and adjust indices if any stream/channel conflicts are found.
52-67
: Validate UART4/5 pin mappings in Betaflight coreRepo doesn't include the STM32 H7 UART mapping source — manually confirm in the Betaflight core (src/platform/STM32/serial_uart_stm32h7xx.c or the platform-specific serial_uart_*.c) that UART4 = PA0 (TX) / PA1 (RX) and UART5 = PB6 (TX) / PB5 (RX). If unsupported, MSP/DisplayPort, GPS or VTX control will fail.
92-97
: Motor TIMER_PIN_MAPPING channels/indices appear wrong — verify and correctconfigs/AIRBOTRACINGSUPERH7/config.h (lines 92–97): timer driver (timer_stm32h7xx.c or equivalent) was not found in the repo, so manual verification is required. Confirm pin→timer mappings and LED_STRIP timer suitability:
- PB0 → TIM3_CH3 (timer index 2)
- PB1 → TIM3_CH4 (timer index 2)
- PE9 → TIM1_CH1 (timer index 0)
- PE11 → TIM1_CH2 (timer index 0)
- PF6 → valid timer/channel for WS2812 (LED_STRIP)
If mappings are confirmed, apply the following patch:
-#define TIMER_PIN_MAPPING TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 0 ) \ - TIMER_PIN_MAP( 4, MOTOR1_PIN, 2, 1 ) \ - TIMER_PIN_MAP( 3, MOTOR2_PIN, 2, 2 ) \ - TIMER_PIN_MAP( 2, MOTOR3_PIN, 1, 3 ) \ - TIMER_PIN_MAP( 1, MOTOR4_PIN, 1, 4 ) +#define TIMER_PIN_MAPPING TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, 0 ) \ + /* PB0 -> TIM3_CH3 (index 2, AF2, CH3) */ \ + TIMER_PIN_MAP( 2, MOTOR1_PIN, 2, 3 ) \ + /* PB1 -> TIM3_CH4 (index 2, AF2, CH4) */ \ + TIMER_PIN_MAP( 2, MOTOR2_PIN, 2, 4 ) \ + /* PE9 -> TIM1_CH1 (index 0, AF1, CH1) */ \ + TIMER_PIN_MAP( 0, MOTOR3_PIN, 1, 1 ) \ + /* PE11 -> TIM1_CH2 (index 0, AF1, CH2) */ \ + TIMER_PIN_MAP( 0, MOTOR4_PIN, 1, 2 )
87-91
: PINIO1 assignment is fine — confirm PINIO1_CONFIG flagsPA15 is used for PINIO1 and won’t interfere with SWD. configs/AIRBOTRACINGSUPERH7/config.h sets PINIO1_PIN = PA15 (around line 87) and PINIO1_CONFIG = 129 (0x81, around line 111). 0x81 is used elsewhere to mean PINIO_CONFIG_MODE_OUT_PP + 10V enable (see configs/PRINCIPIOTF7/config.h:163). Confirm 129 is the intended mode (initial state/polarity/open‑drain/10V enable) for the VTX power switch or change to the correct flags.
a2721d9
to
0ad6531
Compare
There was a problem hiding this 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 (2)
configs/AIRBOTRACINGSUPERH7/config.h (2)
28-36
: Sensor driver selection: confirm if multiple gyro/accel variants exist across batches.If earlier/other batches used different IMUs, enable both drivers so runtime auto‑detect works (per prior learning). Otherwise this is fine as-is.
Would you like me to propose the additional driver defines if needed?
77-83
: ADC/Cs/gyro INT pins look fine; minor debug caveat.PC2/PC3 for current/vbat are ADC-capable; FLASH on SPI2 with PD10 CS and GYRO on SPI3 with PD7 CS are coherent. PB3 (gyro EXTI) overlaps TRACESWO; acceptable if production disables SWO.
Confirm SWO usage expectations; if SWO is required during bring-up, document the conflict.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/AIRBOTRACINGSUPERH7/config.h
(1 hunks)
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
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.
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: 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.
Learnt from: haslinghuis
PR: betaflight/config#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.
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: 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.
Learnt from: haslinghuis
PR: betaflight/config#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.
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: 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#656
File: configs/IFLIGHT_F745_AIO/config.h:31-35
Timestamp: 2025-07-28T16:44:59.686Z
Learning: In Betaflight board configurations, when a board design uses the same physical gyro socket but different sensor variants across production batches (e.g., MPU6000 in older batches, ICM42688P in newer batches), the correct approach is to enable both sensor drivers (USE_GYRO_SPI_MPU6000 and USE_GYRO_SPI_ICM42688P) in the same configuration. This allows runtime auto-detection of which sensor is actually present without requiring separate board configurations for each hardware variant.
📚 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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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 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.
Applied to files:
configs/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/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/AIRBOTRACINGSUPERH7/config.h
🔇 Additional comments (10)
configs/AIRBOTRACINGSUPERH7/config.h (10)
24-27
: BOARD_NAME matches directory — good.BOARD_NAME equals AIRBOTRACINGSUPERH7 and aligns with the folder name per our checklist. MANUFACTURER_ID length is 4 chars. FC_TARGET_MCU is correct for H743.
38-43
: Motors/LED/beeper pin picks look plausible; verify BEEPER polarity with hardware.BEEPER_PIN is later marked inverted; just confirm transistor stage is active-low on PC0.
60-63
: I2C2/I2C3 pins look standard for H7.PB10/PB11 (I2C2) and PA8/PC9 (I2C3) are valid/common.
65-76
: SPI pinouts are textbook.SPI1..SPI4 SCK/SDI/SDO selections are consistent with H743 AFs and typical Betaflight usage.
95-107
: Defaults look consistent; verify FLASH part and PINIO semantics.
- BLACKBOX_DEVICE_FLASH with SPI2/M25P16 is fine if the board indeed ships that part or a JEDEC‑compatible equivalent.
- PINIO1 config (129) for VTX power is common; confirm desired default polarity and boot state for PA15.
1-21
: License header and guard — OK.Standard GPL header and #pragma once present.
84-88
: Timer mapping: confirm TIMER_PIN_MAP numeric indices correspond to the intended TIMx/CHy.Expected: PF6→TIM10_CH1, PB0→TIM3_CH3, PB1→TIM3_CH4, PE9→TIM1_CH1, PE11→TIM1_CH2 — verify the 3rd/4th args in configs/AIRBOTRACINGSUPERH7/config.h:84-88 map to those entries in timer_stm32h7xx.c (STM32H7 timer table).
44-59
: Incorrect — PB6/PB5 are valid UART5 pins on STM32H743 (AF14).Betaflight's STM32H7 UART mapping supports UART5 on PB6 (TX) / PB5 (RX) using AF14; keep the current defines in configs/AIRBOTRACINGSUPERH7/config.h (lines 44–59) unless the PCB actually requires PC12/PD2 — verify in src/platform/STM32/serial_uart_stm32h7xx.c.
Likely an incorrect or invalid review comment.
108-109
: Approve — serial identifiers valid.
MSP_UART = SERIAL_PORT_USART1 and MSP_DISPLAYPORT_UART = SERIAL_PORT_UART4 are defined in betaflight/src/main/io/serial.h; no changes required.
90-94
: ```shell
#!/bin/bash
set -euo pipefail
echo "CWD: $(pwd)"
echo "Git top-level (if any):"
git rev-parse --show-toplevel 2>/dev/null || true
echo
echo "Looking for the board config and DMA option macros..."show the file referenced in the review if it exists
if [ -f "configs/AIRBOTRACINGSUPERH7/config.h" ]; then
echo "----- configs/AIRBOTRACINGSUPERH7/config.h (first 200 lines) -----"
sed -n '1,200p' configs/AIRBOTRACINGSUPERH7/config.h || true
else
echo "configs/AIRBOTRACINGSUPERH7/config.h not found"
fi
echo
echo "Searching repository for DMA option macros and H7 DMA mappings..."
rg -n --hidden --no-ignore -S 'ADC1_DMA_OPT|ADC3_DMA_OPT|TIMUP1_DMA_OPT|TIMUP3_DMA_OPT|ADC[123]_DMA_OPT|TIMUP[0-9]+DMA_OPT' || true
echo
echo "Search for generic DMA option / request maps and H7/DMAMUX mentions (files likely under src/main)..."
rg -n --hidden --no-ignore -S 'DMA.*REQUEST|DMA_REQUEST|DMAMUX|dma request|DMA_REQUEST|DMA_OPT|dma_opt' || true
echo
echo "Show common dma driver/header files if present:"
for f in src/main/drivers/dma.h src/main/drivers/dma.c src/main/target//dma src/main/targets//dma; do
if [ -f "$f" ]; then
echo "----- $f -----"
sed -n '1,240p' "$f" || true
fi
done
echo
echo "Searching configs for other H7 boards that might define ADC/TIMUP DMA opts:"
rg -n --hidden --no-ignore -S 'ADC1_DMA_OPT|ADC3_DMA_OPT|TIMUP1_DMA_OPT|TIMUP3_DMA_OPT' configs || true
echo
echo "Completed."</blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
bcd3918
to
6b5ce24
Compare
6b5ce24
to
44087be
Compare
Checklist
Summary by CodeRabbit