<h3>Contribution description</h3>
<p>This PR adds a simple test to figure out the correct value for <code>RTT_MIN_VALUE</code></p>
<p>IMO this is also a good reason to make <code>RTT_MIN_VALUE</code> public and not only in <code>ztimer</code> code.</p>
<h3>Testing procedure</h3>
<p><code>BOARD=<board>make -C tests/periph_rtt_min/ flash test</code></p>
<pre><code>main(): This is RIOT! (Version: 2020.07-devel-774-g243984-pr_rtt_min_value_test)
Evaluate RTT_MIN_VALUE over 1024 samples
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
RTT_MIN_VALUE for samr21-xpro: 10
</code></pre>
<pre><code>main(): This is RIOT! (Version: 2020.07-devel-774-g243984-pr_rtt_min_value_test)
Evaluate RTT_MIN_VALUE over 1024 samples
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
RTT_MIN_VALUE for iotlab-m3: 2

</code></pre>
<p>You can also see that if in <code>tests/periph_rtt</code> <code>TICKS_TO_WAIT</code> is set lower than <code>RTT_MIN_VALUE</code> the test does not work.</p>
<p>Note hardware specification may suggest a value different than the one resolved by the test, e.g. <code>cc2538</code> points out a value of 5. It will also depend on the <code>RTT_FREQUENCY</code>, should be ran at the highest possible frequency.</p>
<h3>Issues/PRs references</h3>
<p>Figure out while debugging why changing to <code>ztimer</code> broke support for <code>samr21-xpro</code> in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="595344789" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/13824" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/13824/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/13824">#13824</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/14146'>https://github.com/RIOT-OS/RIOT/pull/14146</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>tests/periph_rtt_min: add test to figure out RTT_MIN_VALUE</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/14146/files#diff-f0f47ac89ba8d7996d3e4f7804edf299">tests/periph_rtt_min/Makefile</a>
    (20)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/14146/files#diff-139b42f3444afe3a603d48dc7d00c6b9">tests/periph_rtt_min/README.md</a>
    (7)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/14146/files#diff-3f58c391eacea7b99501a4a8a41335b7">tests/periph_rtt_min/main.c</a>
    (74)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/14146/files#diff-fe9005a5da35a08b859a7f3d62bbf2d8">tests/periph_rtt_min/tests/01-run.py</a>
    (24)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/14146.patch'>https://github.com/RIOT-OS/RIOT/pull/14146.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/14146.diff'>https://github.com/RIOT-OS/RIOT/pull/14146.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/14146">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYGY57WRNXW5UOWIXHDRTPBEZANCNFSM4NKKFR6A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYC7OOX6YMBO2S4AMDTRTPBEZA5CNFSM4NKKFR6KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JJ7DEPA.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/14146",
"url": "https://github.com/RIOT-OS/RIOT/pull/14146",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>