fix: correct IOQSPI SS control mask handling on RP2040#5264
Open
rdon-key wants to merge 1 commit intotinygo-org:devfrom
Open
fix: correct IOQSPI SS control mask handling on RP2040#5264rdon-key wants to merge 1 commit intotinygo-org:devfrom
rdon-key wants to merge 1 commit intotinygo-org:devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix a bug where logical NOT (!) was used instead of bitwise NOT (~) when clearing the OUTOVER field in the GPIO_QSPI_SS_CTRL register.
As per the RP2040 datasheet, this register contains multiple control fields (such as OEOVER, INOVER, and IRQOVER). Using !mask evaluates to 0 or 1, which causes the entire register to be corrupted instead of just the targeted bits.
While the current behavior might appear to work by coincidence (if other fields are intended to be 0), this fix ensures proper bitwise manipulation and prevents potential side effects.
Reference: RP2040 Datasheet
https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf