Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(hardwaretimer): avoid glitch when PWM configuration changed#2572

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 4 commits intostm32duino:mainfromfpistm:HT_FIX
Nov 21, 2024

Conversation

fpistm
Copy link
Member

@fpistmfpistm commentedNov 19, 2024
edited
Loading

Fixes#2575

issue is thatTIM_OCx_SetConfig() disable unconditionally the N state output (TIM_CCER_CCxNE), preventing to
callsetMode() fix the issue and avoid glitch.

Note

This PR include some hardening and enhancement.

  • get API using uint32_t
  • renameTIMER_DISABLED toTIMER_OUTPUT_DISABLED
  • resume depending of channels mode

@fpistmfpistm added the fix 🩹Bug fix labelNov 19, 2024
@fpistmfpistm added this to the2.9.0 milestoneNov 19, 2024
As all get API's use error handler if an error occur,then no need to use int as return type.Moreover, all HAL API uses uint32_tfor those value. This avoid cast issue.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
to avoid confusion.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Allow to properly set handle state.Start TIM base only if required.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Fixesstm32duino#2575.Note that the issue is that TIM_OCx_SetConfig() disablein unconditionally the N state output (TIM_CCER_CCxNE).Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistmfpistm changed the titlefix(timer): pause the channel before new PWM configfix(hardwaretimer): avoid glitch when PWM configuration changedNov 21, 2024
@fpistmfpistm added the enhancementNew feature or request labelNov 21, 2024
Copy link
Contributor

@ABOSTMABOSTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@fpistmfpistm merged commit32b6654 intostm32duino:mainNov 21, 2024
24 checks passed
@fpistmfpistm deleted the HT_FIX branchNovember 21, 2024 16:06
fpistm added a commit to fpistm/STM32Examples that referenced this pull requestNov 21, 2024
TIMER_DISABLED replaced by TIMER_OUTPUT_DISABLEDSeestm32duino/Arduino_Core_STM32#2572Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit to stm32duino/STM32Examples that referenced this pull requestNov 21, 2024
TIMER_DISABLED replaced by TIMER_OUTPUT_DISABLEDSeestm32duino/Arduino_Core_STM32#2572Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ABOSTMABOSTMABOSTM approved these changes

Assignees
No one assigned
Labels
enhancementNew feature or requestfix 🩹Bug fix
Projects
Milestone
2.9.0
Development

Successfully merging this pull request may close these issues.

HardwareTimer: using setPWM twice with a channel N stop the pwm
2 participants
@fpistm@ABOSTM

[8]ページ先頭

©2009-2025 Movatter.jp