<h3>Contribution description</h3>
<p>The INTFLAGS register is cleared by writing a 1 to the corresponding interrupt flag bit. From the samr21's manual:</p>
<blockquote>
<p>Writing a zero to this bit has no effect.<br>
Writing a one to this bit clears the Compare 0 interrupt flag.</p>
</blockquote>
<p>This is a common pattern in flag registers.</p>
<p>This RTT driver is using or-equal to clear the flags, which means it can possibly clear other interrupts. There's a small chance that one event is missed if it happens very close to another event.</p>
<h3>Testing procedure</h3>
<p>I did not test this, I just read the manual and did what it says. I'm opening this PR because I think it does not make sense to have an open issue whose fix is only two lines.</p>
<h3>Issues/PRs references</h3>
<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #10351.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="378766480" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/10351" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/10351/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/10351">#10351</a>.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/12188'>https://github.com/RIOT-OS/RIOT/pull/12188</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>cpu/sam0_common/../rtt: correcly clear flags.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12188/files#diff-0">cpu/sam0_common/periph/rtt.c</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12188.patch'>https://github.com/RIOT-OS/RIOT/pull/12188.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12188.diff'>https://github.com/RIOT-OS/RIOT/pull/12188.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12188?email_source=notifications&email_token=ABE7WYGIO2OILP7D5OD7HN3QI5TWLA5CNFSM4IVFLW4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKMVHPQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYF52MYYA5HJ7Q6ZEMDQI5TWLANCNFSM4IVFLW4A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYBOMXZEJ4MXMEYBJWDQI5TWLA5CNFSM4IVFLW4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKMVHPQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12188?email_source=notifications\u0026email_token=ABE7WYGIO2OILP7D5OD7HN3QI5TWLA5CNFSM4IVFLW4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKMVHPQ",
"url": "https://github.com/RIOT-OS/RIOT/pull/12188?email_source=notifications\u0026email_token=ABE7WYGIO2OILP7D5OD7HN3QI5TWLA5CNFSM4IVFLW4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKMVHPQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>