[riot-notifications] [RIOT-OS/RIOT] tests/periph_rtt_min: add test to figure out RTT_MIN_VALUE (#14146)

Francisco notifications at github.com
Tue May 26 15:40:28 CEST 2020


### Contribution description

This PR adds a simple test to figure out the correct value for `RTT_MIN_VALUE`

IMO this is also a good reason to make `RTT_MIN_VALUE` public and not only in `ztimer` code.

### Testing procedure

`BOARD=<board>make -C tests/periph_rtt_min/ flash test`

```
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
```

```
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

```


You can also see that if in `tests/periph_rtt` `TICKS_TO_WAIT` is set lower than `RTT_MIN_VALUE` the test does not work.

Note hardware specification may suggest a value different than the one resolved by the test, e.g. `cc2538` points out a value of 5. It will also depend on the `RTT_FREQUENCY`, should be ran at the highest possible frequency.

### Issues/PRs references

Figure out while debugging why changing to `ztimer` broke support for `samr21-xpro` in https://github.com/RIOT-OS/RIOT/pull/13824.

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/14146

-- Commit Summary --

  * tests/periph_rtt_min: add test to figure out RTT_MIN_VALUE

-- File Changes --

    A tests/periph_rtt_min/Makefile (20)
    A tests/periph_rtt_min/README.md (7)
    A tests/periph_rtt_min/main.c (74)
    A tests/periph_rtt_min/tests/01-run.py (24)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/14146.patch
https://github.com/RIOT-OS/RIOT/pull/14146.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14146
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200526/acc21b45/attachment.htm>


More information about the notifications mailing list