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

Fixes SAMD PDMIn #5842

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Fixes SAMD PDMIn #5842

merged 1 commit into from
Jan 12, 2022

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Jan 12, 2022

SAMD PDMIn has not worked right for a while.

  • The main problem was that the needed IRQ was never actually enabled.
  • Made a flag variable volatile, as it should have been.
  • Called to pdmin_reset() was commented out, maybe left over from some debugging.

I will probably backport this to 7.1.x, but there is maybe one other unrelated regression that should be checked for a 7.1.1 release first.

@dhalbert dhalbert requested review from tannewt and jepler January 12, 2022 16:47
Copy link
Member

@ladyada ladyada left a comment

Choose a reason for hiding this comment

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

didnt test but.... is there any linter that will warn if irq code is accessing a non-volatile variable? i feel like its such a killer bug that keeps popping up in microcontroller code :/

@dhalbert
Copy link
Collaborator Author

didnt test but.... is there any linter that will warn if irq code is accessing a non-volatile variable? i feel like its such a killer bug that keeps popping up in microcontroller code :/

Totally agree. I looked at the ones in https://github.com/caramelomartins/awesome-linters and also did some general searching; I could not find any checkers, but it would not be so hard as long as IRQ routines were labeled as such.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metro-m4 call to PDMIn.record() never returns
3 participants