Modified GPIO code to prevent low pulse when switching to Hi-Z mode. #1074
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.
When code attempted to release the ports by placing them into Hi-Z mode, it would first clear the out register (so that weak pull-up would be disabled) then made the switch to Hi-Z. Since the signals were initially in output mode, clearing the out register caused a low pulse on the pins. One of the pins is the RESETN line which caused an unwanted device reset.
This PR changes the code to use the "NORMAL_HI_Z" mode that the MAX32625 supports. This mode places the pins in Hi-Z (no pull-up) regardless of the state of the out register.
See section 5.4.3 of the MAX32625 user guide for the I/O modes supported.