Skip to content

cpu/sam3: optimize gpio ISR processing#21179

Merged
dylad merged 1 commit intoRIOT-OS:masterfrom
dylad:pr/cpu/sam3/optimize_gpio_isr
Feb 5, 2025
Merged

cpu/sam3: optimize gpio ISR processing#21179
dylad merged 1 commit intoRIOT-OS:masterfrom
dylad:pr/cpu/sam3/optimize_gpio_isr

Conversation

@dylad
Copy link
Copy Markdown
Member

@dylad dylad commented Jan 31, 2025

Contribution description

This PR makes use of bitarithm_test_and_clear to process gpio ISR instead of looping through every bits inside the register.
It will use CLZ ARM instruction to catch the position of all bits set and clear them one by one which is faster than checking every bits every time.

Testing procedure

Tested on arduino-due with tests/buttons (I've wired up 4 external buttons with a breadboard for this).

Issues/PRs references

None

@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: cpu Area: CPU/MCU ports labels Jan 31, 2025
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 5, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Feb 5, 2025

Murdock results

✔️ PASSED

193390b cpu/sam3: optimize gpio ISR processing

Success Failures Total Runtime
10271 0 10271 09m:22s

Artifacts

@dylad dylad added this pull request to the merge queue Feb 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 5, 2025
@dylad dylad added this pull request to the merge queue Feb 5, 2025
Merged via the queue into RIOT-OS:master with commit 17bceab Feb 5, 2025
2 checks passed
@dylad dylad deleted the pr/cpu/sam3/optimize_gpio_isr branch February 6, 2025 08:27
@dylad
Copy link
Copy Markdown
Member Author

dylad commented Feb 6, 2025

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants