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

redo pin never resetting for mimxrt10xx #7345

Merged
merged 2 commits into from Dec 15, 2022
Merged

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Dec 15, 2022

Fixes #7312.

Redo pin resetting logic to never ever reset vital pins. Thanks to @RetiredWizard for diagnosis.

The only board I had to test is the Teensy 4.1, which does come up in the REPL. I did make it blink board.LED.

@dhalbert
Copy link
Collaborator Author

@RetiredWizard let us know if this build works for you

@RetiredWizard
Copy link

I also only have the teensy41 to test on but this PR did result in a build that boots on my teensy41. I ran my standard tests and everything seems to work fine.

@dhalbert
Copy link
Collaborator Author

Reviewers might note that the forbidden pin checking is O(num_special_pins*num_all_pins) when resetting all pins. That's not ideal, but I think it's not really a problem.

I was aware of this: I haven't yet figured out a clean way to make a compile-time boolean bit-mask table with pin numbers > 64, as I did for Espressif.

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.

Thanks for fixing this! One refactoring request.

Could you make the pin check work at the port level? Maybe using a weak pin array?

ports/mimxrt10xx/boards/feather_m7_1011/board.c Outdated Show resolved Hide resolved
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.

Much better. Thank you!

@tannewt tannewt merged commit c6ea3e8 into adafruit:main Dec 15, 2022
@dhalbert dhalbert deleted the mimx-fix-build branch December 15, 2022 20:49
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.

Teensy 4.1 doesn't boot since 8.0.0 beta 1
3 participants