-
Notifications
You must be signed in to change notification settings - Fork 192
Add target for Matek F411-WTE #905
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
Conversation
WalkthroughAdds a new MATEKF411WTE target header that defines MCU/board/manufacturer, enables sensors/peripherals, maps pins and timers, selects I2C/SPI instances, and sets defaults for DSHOT, meters, PID denom, beeper inversion, HSE=8MHz, 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
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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 |
Co-authored-by: Mark Haslinghuis <[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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
configs/MATEKF411WTE/config.h (3)
29-44
: Trim baro drivers to protect F411 flash budget.F411 targets are tight on flash; enabling BMP085 (and sometimes MS5611) is usually unnecessary today and risks build-size overflows. Suggest at least dropping BMP085.
Apply this diff if acceptable:
-#define USE_BARO_BMP085
If you need more headroom later, consider also removing MS5611:
-#define USE_BARO_MS5611
56-56
: Pins overlap SWD/JTAG/BOOT — verify board behavior.
- PB2 (BEEPER) doubles as BOOT1; confirm strapping avoids boot-mode issues.
- PA15/PB3 (SOFTSERIAL2) are JTAG pins by default on F4; ensure JTAG is disabled early so SoftSerial works.
- PA13/PA14 (LED1/LED0) are SWD; using them for LEDs can break on-target debugging. If hardware is wired this way, fine—just confirm you can still enter DFU/SWD when needed and add a note in docs.
Would you like a doc snippet added to call out these debug-pin tradeoffs?
Also applies to: 66-71, 82-83
77-79
: ADC channels OK; confirm scaling values.PA4/5/6 are valid ADC1 inputs. Please confirm DEFAULT_CURRENT_METER_SCALE=250 and VBAT/RSSI dividers match measured calibration on hardware samples.
I can provide a quick CLI procedure to capture logs and compute scale from a DMM reading.
Also applies to: 104-106
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/MATEKF411WTE/config.h
(1 hunks)
🧰 Additional context used
🧠 Learnings (10)
📚 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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/config.h
🔇 Additional comments (6)
configs/MATEKF411WTE/config.h (6)
24-28
: Board metadata OK (matches folder; MCU correct).BOARD_NAME equals directory name (MATEKF411WTE) and MCU is F411 as expected.
64-70
: UART mapping looks right; confirm identifiers and RX default.PA9/PA10→USART1 and PA2/PA3→USART2 are standard; SERIAL_PORT_USART2 is the correct identifier set. Please confirm MSP/SerialRX defaults match intended wiring.
You can validate identifiers against src/main/io/serial.h in Betaflight with the script above.
Also applies to: 98-98
74-76
: Gyro and OSD share SPI2 — validate bus speed and DMA coexistence.Sharing SPI2 is fine if CS lines are distinct (PB12, PC13) and DMA channels don’t clash under load. Confirm SPI2 clock is set to meet ICM426xx requirements while not starving MAX7456.
If issues arise, we can consider moving LED strip to a non-conflicting timer or revisiting SPI/LED DMA preferences.
Also applies to: 84-85, 109-111
54-54
: DSHOT bitbang disabled by default — good.Keeps DMA path preferred on F4.
100-100
: Runtime defaults OK.DEFAULT_PID_PROCESS_DENOM=2 and SYSTEM_HSE_MHZ=8 are appropriate for F411.
Also applies to: 108-108
87-94
: Timers & DMA: verification failed — confirm TIMER_PIN_MAPPING & DMA streamsVerification script couldn't locate the expected betaflight driver files (src/main/drivers/timer_stm32f4xx.c missing), so I could not confirm timer/channel mappings or DMA overlaps.
- Confirm configs/MATEKF411WTE/config.h (lines 87–94) maps: PB6→TIM4_CH1, PB7→TIM4_CH2; PB0→TIM3_CH3, PB1→TIM3_CH4, PB4→TIM3_CH1, PB5→TIM3_CH2; PA8→TIM1_CH1.
- Inspect betaflight DMA driver (e.g., dma_stm32f4xx.c or platform equivalent) to ensure TIM1 (LED), TIM3 (servos), TIM4 (motors) do not share DMA streams with SPI2 (gyro/OSD).
- To re-run locally from the repo root: rg -nP 'DEF_TIM|PB6|PB7|PB0|PB1|PB4|PB5|PA8|TIM1|TIM3|TIM4|SPI2' -S
Co-authored-by: ot0tot <[email protected]>
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
configs/MATEKF411WTE/config.h (1)
84-86
: Gyro/OSD chip‑select and EXTI pins.CS on PC13 and DRDY on PC14 align with earlier suggestion; good.
🧹 Nitpick comments (3)
configs/MATEKF411WTE/config.h (3)
82-83
: LED0/LED1 on SWD pins (PA14/PA13).Using SWCLK/SWDIO for LEDs disables SWD when LEDs are active. If this mirrors real hardware, keep it; just document for debugging.
Confirm that this is intentional and add a note to the target docs.
88-96
: Timer map: channels align with intended owners; watch servo DMA flags.Servos mapped with “-1” (no DMA) is correct; motors marked with DMA capable entries. Combined with SPI2 load, reinforces recommendation to default to bitbang DSHOT.
Please bench‑test DSHOT300/600 with OSD active and log for any motor desyncs.
105-108
: Current/voltage meter defaults: verify scale.DEFAULT_CURRENT_METER_SCALE = 250 may not match the board’s shunt/amp gain. Incorrect scale confuses users.
Please provide shunt value and op‑amp gain (or Matek’s spec) to validate the 250 setting.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
configs/MATEKF411WTE/config.h
(1 hunks)
🧰 Additional context used
🧠 Learnings (18)
📚 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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/config.h
📚 Learning: 2025-05-28T15:45:15.608Z
Learnt from: haslinghuis
PR: betaflight/config#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/MATEKF411WTE/config.h
📚 Learning: 2025-06-08T22:02:28.961Z
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.
Applied to files:
configs/MATEKF411WTE/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
PR: betaflight/config#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/MATEKF411WTE/config.h
📚 Learning: 2025-05-28T15:42:05.402Z
Learnt from: haslinghuis
PR: betaflight/config#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.
Applied to files:
configs/MATEKF411WTE/config.h
📚 Learning: 2025-07-14T16:16:50.628Z
Learnt from: haslinghuis
PR: betaflight/config#835
File: configs/HDZERO_HALO_MPU6000/config.h:29-35
Timestamp: 2025-07-14T16:16:50.628Z
Learning: CW0_DEG is not a universal default gyro alignment setting in Betaflight configurations. Different boards use different gyro alignments (CW0_DEG, CW90_DEG, CW180_DEG, CW270_DEG, CW0_DEG_FLIP, etc.) based on their physical sensor mounting orientation.
Applied to files:
configs/MATEKF411WTE/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: 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/MATEKF411WTE/config.h
📚 Learning: 2025-05-28T15:48:18.449Z
Learnt from: haslinghuis
PR: betaflight/config#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/MATEKF411WTE/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/MATEKF411WTE/config.h
📚 Learning: 2025-07-28T16:44:59.686Z
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.
Applied to files:
configs/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/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/MATEKF411WTE/config.h
🔇 Additional comments (10)
configs/MATEKF411WTE/config.h (10)
24-27
: BOARD_NAME/MCU/manufacturer look correct.
- BOARD_NAME matches directory name (MATEKF411WTE).
- MCU and manufacturer ID look appropriate for Matek F411.
29-44
: Sensor driver set is appropriate for batch variability.Enabling ICM42605/42688P and BMI270 (acc/gyro) plus common baros aligns with guidance for mixed-component production runs. Good use of compile‑time gating.
46-53
: Wing/servo feature guards are fine.Using guards prevents accidental omission when building variant images.
56-71
: I/O mappings look plausible; confirm against schematic silkscreen.
- Motors on PB6/PB7 (TIM4 CH1/CH2), servos on TIM3 channels: OK for F411.
- UART1 (PA9/PA10) and UART2 (PA2/PA3): valid pins per BF UART mapping.
Please confirm these match the production PCB labels so resource remapping isn’t required by users.
99-99
: Default RX on USART2 is reasonable.Common for CRSF/SBUS on F411 wings.
101-104
: I2C instances for MAG/BARO set to I2C1.Matches PB8/PB9; OK.
109-109
: HSE = 8 MHz is correct for F411 boards.
110-112
: Gyro and OSD share SPI2; gyro alignment set to CW180_DEG_FLIP.Shared bus is acceptable if tested; alignment must match sensor orientation.
Please confirm gyro orientation with a sensor test (Gyro visualizer) and note any bus‑load issues at 8k/4k PID rates with OSD enabled.
113-118
: PINIO boxes and labels are helpful.Good out‑of‑box UX for VTX power and camera switch.
54-54
: Enable DSHOT bitbang by default on MATEKF411WTE to avoid SPI2/TIM4 DMA contentionSPI2 (gyro/OSD) and TIM4 CH2 (PB7 — MOTOR2) can share DMA on STM32F411; default to bitbang DShot to avoid contention.
File: configs/MATEKF411WTE/config.h (≈line 54)
-#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_OFF +#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON
Co-authored-by: ot0tot <[email protected]>
Co-authored-by: ot0tot <[email protected]>
Co-authored-by: ot0tot <[email protected]>
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.
Please remove non documented sensors
Co-authored-by: Mark Haslinghuis <[email protected]>
Co-authored-by: Mark Haslinghuis <[email protected]>
Co-authored-by: Mark Haslinghuis <[email protected]>
Co-authored-by: Mark Haslinghuis <[email protected]>
Co-authored-by: Mark Haslinghuis <[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.
@blckmn Do we need to add some sort of notation that this is a Wing-only target?
* Add target for Matek F411-WTE * Update configs/MATEKF411TE/config.h Co-authored-by: Mark Haslinghuis <[email protected]> * Change name to better reflect board and change timer parameters for servo * Update configs/MATEKF411WTE/config.h Co-authored-by: ot0tot <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: ot0tot <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: ot0tot <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: ot0tot <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: ot0tot <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: ot0tot <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: Mark Haslinghuis <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: Mark Haslinghuis <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: Mark Haslinghuis <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: Mark Haslinghuis <[email protected]> * Update configs/MATEKF411WTE/config.h Co-authored-by: Mark Haslinghuis <[email protected]> --------- Co-authored-by: Mark Haslinghuis <[email protected]> Co-authored-by: ot0tot <[email protected]>
Pull-Request requirements
Mandatory Review for All New Flight Controllers
The FC is the Matek F411-WTE that I forked over from INAV. The main components work, but I would like review to ensure servos and timer selection is correct. Thank you.
Hardware Compliance Requirements
These measures help maintain high standards and ensure compatibility within the Betaflight ecosystem.
If you have any questions or need guidance, feel free to reach out to the Betaflight development team.
Housekeeping
In the previous PR, I forgot to rename the branch,
Checklist (✓/✕, or y/n)
Summary by CodeRabbit