Skip to content

cpu/sam0_common: clear tamper wake on gpio_irq_disable()#21846

Merged
crasbe merged 1 commit intoRIOT-OS:masterfrom
benpicco:cpu/sam0-gpio_tamper
Nov 7, 2025
Merged

cpu/sam0_common: clear tamper wake on gpio_irq_disable()#21846
crasbe merged 1 commit intoRIOT-OS:masterfrom
benpicco:cpu/sam0-gpio_tamper

Conversation

@benpicco
Copy link
Copy Markdown
Contributor

@benpicco benpicco commented Nov 5, 2025

Contribution description

We register the tamper pin in gpio_init_int(), so also disable it in gpio_irq_disable() (and re-enable it in gpio_irq_enable()).

Testing procedure

Issues/PRs references

@benpicco benpicco changed the title cpu/sam0_common: clear tamper wake on gpio_irq_disable() cpu/sam0_common: clear tamper wake on gpio_irq_disable() Nov 5, 2025
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: cpu Area: CPU/MCU ports labels Nov 5, 2025
Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't have any SAM hardware, so I can't test it.

return 0;
}

int rtc_tamper_pin_enable(gpio_t pin)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to use this function for rtc_tamper_register? That would reduce duplicate code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would result in +/- 0 lines since only the line setting the bit could be shared.

@crasbe crasbe added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 5, 2025
@benpicco benpicco force-pushed the cpu/sam0-gpio_tamper branch from cfad137 to c5426df Compare November 5, 2025 13:40
@benpicco benpicco force-pushed the cpu/sam0-gpio_tamper branch from c5426df to 15ffad4 Compare November 5, 2025 13:43
@riot-ci
Copy link
Copy Markdown

riot-ci commented Nov 5, 2025

Murdock results

✔️ PASSED

15ffad4 cpu/sam0_common: clear tamper wake on gpio_irq_disable()

Success Failures Total Runtime
10916 0 10916 09m:58s

Artifacts

@benpicco benpicco requested a review from maribu November 6, 2025 16:14
@crasbe crasbe added this pull request to the merge queue Nov 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2025
@crasbe crasbe added this pull request to the merge queue Nov 6, 2025
Merged via the queue into RIOT-OS:master with commit 84aad99 Nov 7, 2025
27 checks passed
@benpicco benpicco deleted the cpu/sam0-gpio_tamper branch November 7, 2025 10:25
@leandrolanzieri leandrolanzieri added this to the Release 2026.01 milestone Jan 13, 2026
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 Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants