[riot-notifications] [RIOT-OS/RIOT] cpu/nrf5x: implement periph_timer_periodic (#15529)

chrysn notifications at github.com
Mon Nov 30 17:49:03 CET 2020


### Contribution description

This adds the periph_timer_periodic feature to nrf5x boards.

I have little experience with the nrf5x hardware registers, but the documentation seems to be quite straightforward.

### Testing procedure

With any nrf5x board, run

```
$ make -C tests/periph_timer_periodic all flash test
```

Quite weirdly, it fails for the nrf52840dongle I'm developing this on by hanging; adding

```
    for (volatile int i = 0; i < 4000000; ++i) {
    }
```

to `tests/periph_timer_periodic/main.c` in main before mutex_lock makes it pass up to the point where the added time messes things up.

It does work with a particle-xenon however, leading me to assume that there may be some interference between this test and the USB stdio; any experimentation by someone who has a board with pre-existing periph_timer_periodic and USB stdio would be appreciated.

### Issues/PRs references

Inspiration for the implementation was drawn from https://github.com/RIOT-OS/RIOT/pull/13902 (although no inline functions were used to set/clear the periodic flag to stay consistent with the "channel active" flags present right next there).
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * cpu/nrf5x: implement periph_timer_periodic

-- File Changes --

    M cpu/nrf5x_common/Makefile.features (1)
    M cpu/nrf5x_common/periph/timer.c (34)

-- Patch Links --

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


More information about the notifications mailing list