#include <stdint.h>
#include <ti/drivers/crypto/CryptoCC26X4_s.h>
#include <ti/drivers/TRNG.h>
#include <ti/drivers/tfm/SecureCallback.h>
#include <third_party/tfm/interface/include/psa/error.h>
#include <third_party/tfm/interface/include/psa/service.h>
Go to the source code of this file.
§ TRNG_S_MSG_TYPE_CONSTRUCT
§ TRNG_S_MSG_TYPE_OPEN
§ TRNG_S_MSG_TYPE_REGISTER_CALLBACKS
§ TRNG_S_MSG_TYPE_CLOSE
§ TRNG_S_MSG_TYPE_GENERATE_KEY
§ TRNG_S_MSG_TYPE_GET_RANDOM_BYTES
§ TRNG_S_MSG_TYPE_CANCEL_OPERATION
§ CONFIG_TRNG_S_CONFIG_POOL_SIZE
#define CONFIG_TRNG_S_CONFIG_POOL_SIZE 1 |
§ TRNG_SECURE_CALLBACK_COUNT
§ TRNG_s_handlePsaMsg()
psa_status_t TRNG_s_handlePsaMsg |
( |
psa_msg_t * |
msg | ) |
|
Handles PSA messages for TRNG secure driver.
- Note
- This function should be called by secure partition thread only.
- Parameters
-
[in] | msg | pointer to PSA message |
- Return values
-
PSA_SUCCESS | if successful. |
PSA_ERROR_PROGRAMMER_ERROR | if any args point to secure addresses. |
§ TRNG_s_init()
void TRNG_s_init |
( |
void |
| ) |
|
Initializes the TRNG secure driver.
- Note
- This function should be called by the non-secure client and power to TRNG HW must be enabled first.
§ TRNGCC26XX_s_setSamplesPerCycle()
int_fast16_t TRNGCC26XX_s_setSamplesPerCycle |
( |
TRNG_Handle |
handle, |
|
|
uint32_t |
samplesPerCycle |
|
) |
| |
Fast veneer to set the number of entropy generation cycles before the results are returned.
- Parameters
-
handle | A valid TRNGCC26XX handle returned from TRNGCC26XX_open |
samplesPerCycle | Number of 48MHz clock cycles to sample. Must be between 2^8 and 2^24. |
- Return values
-
PSA_ERROR_PROGRAMMER_ERROR | if the handle is invalid. |
TRNG_STATUS_SUCCESS | if successful. |