-
Couldn't load subscription status.
- Fork 198
Add JHEF722PRO #891
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?
Add JHEF722PRO #891
Conversation
WalkthroughAdds a new board configuration header for the JHEF722PRO: MCU/board identifiers, enabled peripherals (ICM42688P, DPS310, flash, MAX7456), full pin and timer mappings, ADC/I2C/SPI instances, default devices/metrics, PINIO/box definitions, and gyro alignment. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
6424c23 to
625277a
Compare
0cc866e to
75e8ff0
Compare
75e8ff0 to
b518704
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/JHEF722PRO/config.h (2)
91-100: Default DSHOT bitbang ON — consider AUTO if supportedIf the F722 DMA layout is clean with this mapping, using AUTO (or OFF) can reduce CPU overhead versus always bitbanging. Keep ON if this target needs it for compatibility.
101-106: PINIO boxes/config — document semanticsValues (PINIO1_BOX=40, PINIO2_BOX=41, PINIO1_CONFIG=129) look fine; add a brief comment mapping 129’s bit fields to the intended behavior, and confirm box IDs don’t collide with target‑wide assignments.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/JHEF722PRO/config.h(1 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/config#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.
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/JHEF722PRO/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/JHEF722PRO/config.h
📚 Learning: 2025-07-03T15:17:30.040Z
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.
Applied to files:
configs/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/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/JHEF722PRO/config.h
🔇 Additional comments (8)
configs/JHEF722PRO/config.h (8)
24-28: BOARD_NAME/MCU/Manufacturer — OKBOARD_NAME matches directory (JHEF722PRO) and MCU is correct for F722.
29-39: Feature set looks consistent with the hardware; confirm MAX7456 is present on all unitsGood enables for ICM42688P, DPS310, flash, and MAX7456. If some production batches omit MAX7456, consider documenting or gating via build flag.
40-60: Motor/PPM/LED pin choices look standardPC6–PC9 for motors and PA8 for LED strip are typical; PPM on PA3 sharing with UART2_RX is expected.
Please confirm the user docs note that PA3 is shared (PPM vs UART2 RX are mutually exclusive at runtime).
70-76: ADC pins and PC14 usageADC on ADC3 with PC0/1/2 is fine. PC14 as PINIO1 is okay on many boards; confirm this design does not populate an LSE crystal.
77-80: Gyro DRDY/CS/CLKIN — confirm CLKin timer/channel is validPB8 for GYRO_1_CLKIN is mapped below; ensure the chosen timer/channel can generate the target gyro clock (e.g., 24 MHz) within spec and board routing tolerances.
107-111: Instances and gyro alignment — verify orientationSPI instances align with pin wiring; confirm GYRO_1_ALIGN=CW90_DEG matches the silkscreen orientation on shipped boards.
81-90: Missing JHEF722PRO config — verify F7 timer indices & DMA streams
- configs/JHEF722PRO/config.h not found in the checked repo — cannot map the numeric timer indices in your TIMER_PIN_MAP to specific TIMx entries; provide the file or confirm which timer option each index selects.
- Relevant timer mappings in src/platform/STM32/timer_stm32f7xx.c: PA3 → TIM2_CH4; PA8 → TIM1_CH1; PC6–PC9 → TIM3_CH1–CH4 (alternatively TIM8 CH1–CH4); PB8 → TIM10_CH1; PB0 → TIM3_CH3 or TIM1_CH2N (CH2N is a complementary output).
- Action: ensure the numeric index in each TIMER_PIN_MAP selects a non‑complementary channel where motors/DSHOT are used (avoid CHxN), and check the DMA stream table in timer_stm32f7xx.c for conflicts between motor DMA, LED_STRIP and SPI (blackbox) before enabling hardware DSHOT.
61-69: SPI3 MOSI on PB5 — confirmed (F7 mapping present)
Confirmed: src/platform/common/stm32/bus_spi_pinconfig.c contains PB5 entries mapped to SPI3 (GPIO_AF6_SPI3 / GPIO_AF7_SPI3); SPI3_SDO = PB5 is valid. See src/platform/common/stm32/bus_spi_pinconfig.c:150,232,339,480.
Co-authored-by: ot0tot <[email protected]>
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.
- pre-approving for workflow
Checklist
Summary by CodeRabbit