Add open source target PULPYF405PRO#1099
Conversation
WalkthroughThis pull request adds a complete board configuration file for the PULPYF405PRO flight controller. The configuration specifies the STM32F405 MCU, enables sensor peripherals (IMU, barometer, video module), maps GPIO pins for all interfaces and actuators, and defines default subsystem parameters for blackbox storage, barometer/magnetometer bus selection, and voltage/current measurement sources. ChangesPULPYF405PRO Board Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Warning
CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.
Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@configs/PULPYF405PRO/config.h`:
- Around line 80-92: The GYRO_1_CLKIN_PIN macro (GYRO_1_CLKIN_PIN = PB9)
conflicts with the TIMER_PIN_MAPPING entry that also lists PB9; remove PB9 from
the timer mapping so the gyro clock pin isn’t double-assigned. Edit the
TIMER_PIN_MAPPING block to eliminate or replace the TIMER_PIN_MAP(...) entry
that references PB9 (the one currently mapping index 9 or the PB9 occurrence),
leaving that timer slot with no pin (e.g., use -1) or choose an alternate unused
pin, ensuring only GYRO_1_CLKIN_PIN uses PB9.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 321db865-9f18-4b42-9d20-fd0b3f1bfc1c
📒 Files selected for processing (1)
configs/PULPYF405PRO/config.h
| #define GYRO_1_CLKIN_PIN PB9 | ||
|
|
||
| #define TIMER_PIN_MAPPING \ | ||
| TIMER_PIN_MAP( 0, PB8 , 2, -1) \ | ||
| TIMER_PIN_MAP( 1, PC6 , 2, 1) \ | ||
| TIMER_PIN_MAP( 2, PC7 , 2, 1) \ | ||
| TIMER_PIN_MAP( 3, PC8 , 2, 1) \ | ||
| TIMER_PIN_MAP( 4, PC9 , 2, 0) \ | ||
| TIMER_PIN_MAP( 5, PB0 , 2, -1) \ | ||
| TIMER_PIN_MAP( 6, PB1 , 2, -1) \ | ||
| TIMER_PIN_MAP( 7, PA0 , 2, -1) \ | ||
| TIMER_PIN_MAP( 8, PA15, 1, 0) \ | ||
| TIMER_PIN_MAP( 9, PB9 , 2, -1) |
There was a problem hiding this comment.
Remove PB9 from timer mapping to avoid gyro clock pin conflict.
PB9 is declared as GYRO_1_CLKIN_PIN (Line 80) and also exposed in TIMER_PIN_MAPPING (Line 92). That creates a dual-role conflict on a critical gyro signal pin.
Proposed fix
`#define` TIMER_PIN_MAPPING \
TIMER_PIN_MAP( 0, PB8 , 2, -1) \
TIMER_PIN_MAP( 1, PC6 , 2, 1) \
TIMER_PIN_MAP( 2, PC7 , 2, 1) \
TIMER_PIN_MAP( 3, PC8 , 2, 1) \
TIMER_PIN_MAP( 4, PC9 , 2, 0) \
TIMER_PIN_MAP( 5, PB0 , 2, -1) \
TIMER_PIN_MAP( 6, PB1 , 2, -1) \
TIMER_PIN_MAP( 7, PA0 , 2, -1) \
- TIMER_PIN_MAP( 8, PA15, 1, 0) \
- TIMER_PIN_MAP( 9, PB9 , 2, -1)
+ TIMER_PIN_MAP( 8, PA15, 1, 0)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@configs/PULPYF405PRO/config.h` around lines 80 - 92, The GYRO_1_CLKIN_PIN
macro (GYRO_1_CLKIN_PIN = PB9) conflicts with the TIMER_PIN_MAPPING entry that
also lists PB9; remove PB9 from the timer mapping so the gyro clock pin isn’t
double-assigned. Edit the TIMER_PIN_MAPPING block to eliminate or replace the
TIMER_PIN_MAP(...) entry that references PB9 (the one currently mapping index 9
or the PB9 occurrence), leaving that timer slot with no pin (e.g., use -1) or
choose an alternate unused pin, ensuring only GYRO_1_CLKIN_PIN uses PB9.
There was a problem hiding this comment.
The gyro clock pin requires a timer assignment.
There was a problem hiding this comment.
@ot0tot, thank you for the clarification! You're absolutely right — when USE_GYRO_CLKIN is enabled, the firmware needs to drive a clock signal to the gyro via a timer output, so having PB9 in both GYRO_1_CLKIN_PIN and TIMER_PIN_MAPPING is intentional and required for correct operation. My concern was mistaken. I'll disregard this comment.
(◕‿◕✿)
✏️ Learnings added
Learnt from: ot0tot
Repo: betaflight/config PR: 1099
File: configs/PULPYF405PRO/config.h:80-92
Timestamp: 2026-05-08T01:40:09.346Z
Learning: In Betaflight board configurations (betaflight/config), when `USE_GYRO_CLKIN` is defined and a `GYRO_1_CLKIN_PIN` is assigned, that same pin **must** also appear in `TIMER_PIN_MAPPING`. The timer entry is required so the firmware can drive a clock signal to the gyro via a timer/PWM output. Having the CLKIN pin in both `GYRO_1_CLKIN_PIN` and `TIMER_PIN_MAPPING` is intentional and correct — it is not a dual-role conflict. Do not flag this as an issue during code review.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: haslinghuis
Repo: betaflight/config PR: 1051
File: configs/DEEPSPACEF722MINI/config.h:35-35
Timestamp: 2026-03-15T13:09:34.824Z
Learning: In Betaflight board configuration reviews, when a target is a rebranding of an existing hardware design (e.g., Skystar targets rebranded to Deepspace), you may retain deprecated components (e.g., BMI270 gyro) in the configuration to maintain hardware compatibility. The deprecation policy applies only to genuinely new target submissions, not to rebrands of already-produced hardware. This guidance should be checked whenever reviewing config.h files under betaflight/config and any rewritten or renamed targets that are rebrands.
Learnt from: osirisinferi
Repo: betaflight/config PR: 1072
File: configs/PILOTIXF405V3BF/config.h:89-91
Timestamp: 2026-04-23T14:45:46.186Z
Learning: In Betaflight board configuration reviews, ensure `config.h` only overrides settings when the value differs from the firmware/platform defaults. Do not define macros solely to repeat the default value (e.g., adding a `#define` that matches the default behavior). When the default behavior is acceptable, omitting the corresponding macro (for example, omitting `PINIO3_CONFIG` when the default behavior suffices) should not be flagged as a review issue. Reviewers should focus on meaningful overrides vs. redundant default-redefinitions.
Custom FC from Nayel (@medic4950) on the Betaflight Discord
Checklist (✓/✕, or y/n)
Summary by CodeRabbit