[riot-notifications] [RIOT-OS/RIOT] boards/common/nrf5x: add configurable RTT_FREQUENCY (#14025)

Francisco notifications at github.com
Tue May 5 14:57:36 CEST 2020


### Contribution description

This PR make `RTT_FREQUENCY` configurable for these platforms as well as defining there max an min values.

I didn't move this to `periph_cpu` because they could use an external oscilotr for the RTT which would make it a `BOARD` configuration.

Same default have been kept.

### Testing procedure

- base test works `BOARD=nrf52dk make -C tests/periph_rtt flash test -j3`

```
main(): This is RIOT! (Version: 2020.07-devel-412-g409185-pr_nrf5x_rtt_conf)

RIOT RTT low-level driver test
This test will display 'Hello' every 5 seconds

Initializing the RTT driver
RTT now: 0
Setting initial alarm to now + 5 s (5120)
Done setting up the RTT, wait for many Hellos
Hello
Hello
Hello
Hello
Hello
```

- can change frequency `CFLAGS=-DRTT_FREQUENCY=32768 BOARD=nrf52dk make -C tests/periph_rtt flash test -j3`

```
main(): This is RIOT! (Version: 2020.07-devel-412-g409185-pr_nrf5x_rtt_conf)

RIOT RTT low-level driver test
This test will display 'Hello' every 5 seconds

Initializing the RTT driver
RTT now: 0
Setting initial alarm to now + 5 s (163840)
Done setting up the RTT, wait for many Hellos
Hello
Hello
Hello
Hello

```

### Issues/PRs references

Split from # #13874
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * boards/common/nrf5x: add configurable RTT_FREQUENCY

-- File Changes --

    M boards/common/nrf51/include/cfg_rtt_default.h (16)
    M boards/common/nrf52/include/cfg_rtt_default.h (15)
    M cpu/nrf5x_common/periph/rtt.c (4)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/14025.patch
https://github.com/RIOT-OS/RIOT/pull/14025.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/14025
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200505/dbd2eefd/attachment.htm>


More information about the notifications mailing list