Skip to content
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

cpu/stm32/periph_timer: fix spurious IRQs and race conditions [backport 2022.10] #18972

Conversation

maribu
Copy link
Member

@maribu maribu commented Nov 25, 2022

Backport of #18969

Contribution description

This fixes in the periph_timer implementation of STM32:

  • race conditions when two threads share the same timer peripheral, but distinct sets of timer channel
  • spurious IRQs

Testing procedure

The test in #18963 should now pass

Issues/PRs references

#18963

Allow two threads to share the same timer - provided they use distinct
sets of timer channels - without occasionally corrupting registers or
state flags.

(cherry picked from commit 93c5755)
@maribu maribu added Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Nov 25, 2022
Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

backport ACK.

@riot-ci
Copy link

riot-ci commented Nov 25, 2022

Murdock results

✔️ PASSED

6673c3a cpu/stm32/periph_timer: fix spurious IRQs

Success Failures Total Runtime
115835 0 115836 01h:58m:40s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@kaspar030 kaspar030 merged commit aad9734 into RIOT-OS:2022.10-branch Nov 25, 2022
@maribu maribu deleted the backport/2022.10/cpu/stm32/periph_timer/fix_spurious_irqs branch November 25, 2022 11:47
@maribu
Copy link
Member Author

maribu commented Nov 25, 2022

thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants