[riot-notifications] [RIOT-OS/RIOT] cpu/nrf5x_common: map hwrng to SoC library if SoftDevice is present (#11559)

Peter Kietzmann notifications at github.com
Tue May 21 12:15:02 CEST 2019


### Contribution description

According to [this comment](https://github.com/RIOT-OS/RIOT/issues/11091#issuecomment-470456909) which bases on Nordic documentation, the hardware RNG can't be accessed when the SoftDevice is used. The fix maps our `hwrng_read()` function the the respective library function call (see [here](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v3.0.0%2Fgroup___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html) for reference)


### Testing procedure
#### (i)
Build/flash/term *examples/gnrc_networking* for an nrf5X based board.

#### (ii)
Build/flash/term *tests/periph_hwrng* for an nrf5x based board and include the SoftDevice package. E.g.:
`USEPKG=nordic_softdevice_ble BOARD=nrf52dk make -C tests/periph_hwrng flash term`

W/o this fix, there is no output as the initialization hangs before main() is called. W/ this fix, everything should works as expected.

### Issues/PRs references

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

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

-- Commit Summary --

  * cpu/nrf5x_common: map hwrng to SoC library if SoftDevice is present

-- File Changes --

    M cpu/nrf5x_common/periph/hwrng.c (18)

-- Patch Links --

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


More information about the notifications mailing list