Skip to content

fix: correct IOQSPI SS control mask handling on RP2040#5264

Merged
deadprogram merged 1 commit intotinygo-org:devfrom
rdon-key:fix/ioqspi-ss-ctrl-mask
Mar 27, 2026
Merged

fix: correct IOQSPI SS control mask handling on RP2040#5264
deadprogram merged 1 commit intotinygo-org:devfrom
rdon-key:fix/ioqspi-ss-ctrl-mask

Conversation

@rdon-key
Copy link
Copy Markdown
Contributor

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

@deadprogram
Copy link
Copy Markdown
Member

Thanks for the fix @rdon-key now merging.

@deadprogram deadprogram merged commit d52d163 into tinygo-org:dev Mar 27, 2026
37 checks passed
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.

2 participants