This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

RNG Functionalities are not working with SOFT DEVICE

Hi Team,

We are working on NRF52840 module with BLE functionalities.Tested the RNG functionalities alone with example project (examples\peripherals\rng ) it is working fine.When we integrated with our project RNG functionalities are not working.

While running we are getting error code "NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES" from the function "nrf_drv_rng_rand". we have enabled the macro "SOFTDEVICE_PRESENT".

Could any one have idea on this issue, or is there any other way we can integrate the RNG functionalities along with crypto MBDELTS Library. It is very urgent for us to deliver the things to customer.

Regards,

Srinivas.V

Parents
  • I just answered a similar question here, so my notes might help; maybe look at something like nrf_crypto_rng_init() in nrf_crypto_rng.c tosee if that makes clear the restrictions

    // Access type Definition
    // ======================
    // Restricted
    //   The hardware peripheral is used by the SoftDevice and is outside
    //   the application sandbox. When the SoftDevice is enabled, it shall
    //   only be accessed through the SoftDevice API. Through this API, the
    //   application has limited access.
    // Blocked
    //   The hardware peripheral is used by the SoftDevice and is outside the
    //   application sandbox.
    //   The application has no access. Interrupts from blocked peripherals
    //   are forwarded to the SoftDevice by the MBR and are not available to
    //   the application, even inside a Radio Timeslot API timeslot.
    // Open
    //   The hardware peripheral is not used by the SoftDevice.
    //   The application has full access.
    //
    // Table 3: Hardware access type definitions
    //
    // Instance SD Enabled  SD Disabled Restrictions
    // ======== ==========  =========== ======================================================
    // CLOCK    Restricted    Open
    // POWER    Restricted    Open
    // BPROT    Restricted    Open
    // RADIO    Blocked       Open      Available through the Radio Timeslot API
    // TIMER0   Blocked       Open      Available through the Radio Timeslot API
    // RTC0     Blocked       Open
    // TEMP     Restricted    Open
    // RNG      Restricted    Open
    // ECB      Restricted    Open
    // CCM      Blocked       Open      Available during a Radio Timeslot API
    // AAR      Blocked       Open      Available during a Radio Timeslot API
    // EGU/SWI1 Restricted    Open      Blocked only when Radio Notification signal is enabled
    // Radio    Restricted    Open      Blocked only when Radio Notification signal is enabled
    // EGU/SWI5 Blocked       Open
    // NVMC     Restricted    Open
    // MWU      Restricted    Open      Limitations on use of MWU when SoftDevice is enabled
    // FICR     Blocked       Blocked
    // UICR     Restricted    Open
    // NVIC     Restricted    Open      Use SoftDevice NVIC API for configuration when SoftDevice enable

Reply
  • I just answered a similar question here, so my notes might help; maybe look at something like nrf_crypto_rng_init() in nrf_crypto_rng.c tosee if that makes clear the restrictions

    // Access type Definition
    // ======================
    // Restricted
    //   The hardware peripheral is used by the SoftDevice and is outside
    //   the application sandbox. When the SoftDevice is enabled, it shall
    //   only be accessed through the SoftDevice API. Through this API, the
    //   application has limited access.
    // Blocked
    //   The hardware peripheral is used by the SoftDevice and is outside the
    //   application sandbox.
    //   The application has no access. Interrupts from blocked peripherals
    //   are forwarded to the SoftDevice by the MBR and are not available to
    //   the application, even inside a Radio Timeslot API timeslot.
    // Open
    //   The hardware peripheral is not used by the SoftDevice.
    //   The application has full access.
    //
    // Table 3: Hardware access type definitions
    //
    // Instance SD Enabled  SD Disabled Restrictions
    // ======== ==========  =========== ======================================================
    // CLOCK    Restricted    Open
    // POWER    Restricted    Open
    // BPROT    Restricted    Open
    // RADIO    Blocked       Open      Available through the Radio Timeslot API
    // TIMER0   Blocked       Open      Available through the Radio Timeslot API
    // RTC0     Blocked       Open
    // TEMP     Restricted    Open
    // RNG      Restricted    Open
    // ECB      Restricted    Open
    // CCM      Blocked       Open      Available during a Radio Timeslot API
    // AAR      Blocked       Open      Available during a Radio Timeslot API
    // EGU/SWI1 Restricted    Open      Blocked only when Radio Notification signal is enabled
    // Radio    Restricted    Open      Blocked only when Radio Notification signal is enabled
    // EGU/SWI5 Blocked       Open
    // NVMC     Restricted    Open
    // MWU      Restricted    Open      Limitations on use of MWU when SoftDevice is enabled
    // FICR     Blocked       Blocked
    // UICR     Restricted    Open
    // NVIC     Restricted    Open      Use SoftDevice NVIC API for configuration when SoftDevice enable

Children
No Data
Related