BLUEBERRYF405: add missing PWM beeper timer entry for PB9#11531
Merged
sensei-hacker merged 1 commit intoiNavFlight:maintenance-9.xfrom May 3, 2026
Merged
Conversation
TIM11/CH1 is the correct timer mapping for PB9 on STM32F405. Without this DEF_TIM entry, beeperPwmInit() silently fails because timerGetByTag(PB9, TIM_USE_BEEPER) returns NULL, leaving the beeper non-functional when beeper_pwm_mode is enabled. Fixes beeper_pwm_mode regression on this target. Same fix was previously applied to BLUEBERRYH743 (commit a66b346).
Contributor
Review Summary by QodoBLUEBERRYF405: Add missing PWM beeper timer entry
WalkthroughsDescription• Adds missing PWM beeper timer entry for PB9 • Fixes beeper_pwm_mode regression on BLUEBERRYF405 target • Enables timerGetByTag() to locate beeper timer correctly • Aligns with BLUEBERRYH743 fix (commit a66b346c) Diagramflowchart LR
A["Missing DEF_TIM entry"] -->|"timerGetByTag returns NULL"| B["beeperPwmInit fails silently"]
B -->|"beeperPwm stays NULL"| C["beeper_pwm_mode produces no sound"]
D["Add TIM11 CH1 PB9 entry"] -->|"timerGetByTag finds timer"| E["beeperPwmInit succeeds"]
E -->|"beeperPwm initialized"| F["beeper_pwm_mode works correctly"]
File Changes1. src/main/target/BLUEBERRYF405/target.c
|
Contributor
|
Test firmware build ready — commit Download firmware for PR #11531 1 targets built. Find your board's
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DEF_TIM(TIM11, CH1, PB9, TIM_USE_BEEPER, 0, 0)entry toBLUEBERRYF405/target.ctimerGetByTag()returns NULL for the beeper pin andbeeperPwmInit()silently leavesbeeperPwm = NULL, sobeeper_pwm_mode = ONproduces no soundFixes part of #11492 (
beeper_pwm_moderegression in 9.x maintenance builds).Note: A second root cause also exists for boards where the beeper timer entry is present but
timer_output_modeis set to reassign that peripheral (e.g. MATEKH743 withtimer_output_mode 1 SERVOS). That issue is intimerHardwareOverride()inpwm_mapping.cand is being handled separately.Test plan
beeper_pwm_mode = ONproduces tone on PB9 hardware