-
Notifications
You must be signed in to change notification settings - Fork 3k
TRNG support for nRF5x devices #4588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Update: I downloaded the Nordic SDK version 11 and copied the HAL and driver files mentioned above into my project source dir and was able to use the RNG module directly. |
@nvlsianpu have You a POC for look at? |
@nvlsianpu I have this small C++ wrapper. It may not be robust and may cause an infinite loop, but it's working for me on nRF52832. The buffer depth of the RNG seems to be 32 bytes:
|
Thanks for the snipped. I wanted to know whether rng driver work out-off-the-box for nRF52. So answer is yes. |
Yes, it works. Chip code is QFAA B0. Unfortunately I was not able to run my applicaiton on nRF51. Do you happen to know if mbed works on Rev. 2 nRF51822 chips? |
mbed-os apps are supposed to work since rev. 3 of nRF51822. I never tested it with rev. 2 |
I've ordered a couple of what seems to be Rev 3 nRF51822 modules. Will test this code on them when I get them. |
Mbed OS SDK updates happening here |
New TRNG driver has been merged to master: #6116 |
I am working on a BLE-based car alarm using nRF52832, and I need secure random key generation for a custom communication protocol. The nRF51x and nRF52x devices all contain a hardware RNG core, and the HAL and drivers are available in the Nordic SDK. However, the mbed OS doesn't seem to support trng_api for Nordic targets. I tried to directly call the Nordic HAL methods, but I found out that the corresponding files are missing from the TARGET_SDK11 folder. Those files (drivers_nrf/hal/nrf_rng.h, drivers_nrf/rng/nrf_drv_rng.h, drivers_nrf/rng/nrf_drv_rng.c) do exist in the TARGET_SDK13 folder, but for some reason it is not used with the nRF52832 device.
It would be nice to support TRNG HAL for nRF51 and nRF52 devices.
The text was updated successfully, but these errors were encountered: