Part Number: LAUNCHXL-CC1352R1
Tool/software: TI C/C++ Compiler
Hi,
TRNG didn't want to start because TRNG_count and TRNG_config were missing from board specific file. I tried to add those stuff to a board specific .c file and here is the result.
/*
* =============================== TRNG ===============================
*/
#include <ti/drivers/TRNG.h>
#include <ti/drivers/trng/TRNGCC26X2.h>
TRNGCC26X2_Object trngObjects[CC1352R1_LAUNCHXL_TRNGCOUNT];
const TRNGCC26X2_HWAttrs trngHWAttrs[CC1352R1_LAUNCHXL_TRNGCOUNT] = {
{
.intPriority = ~0,
.swiPriority = 0
}
};
const TRNG_Config TRNG_config[CC1352R1_LAUNCHXL_TRNGCOUNT] = {
{
.object = &trngObjects[CC1352R1_LAUNCHXL_TRNG0],
.hwAttrs = &trngHWAttrs[CC1352R1_LAUNCHXL_TRNG0]
}
};
const uint_least8_t TRNG_count = CC1352R1_LAUNCHXL_TRNGCOUNT;
/*!
* @def CC1352R1_LAUNCHXL_TRNG
* @brief Enum of TRNG modules
*/
typedef enum CC1352R1_LAUNCHXL_TRNGName {
CC1352R1_LAUNCHXL_TRNG0 = 0,
CC1352R1_LAUNCHXL_TRNGCOUNT
} CC1352R1_LAUNCHXL_TRNGName;
The program finally compiled but at the end, no matter which TRNG generator I use, I get only zeroes. The problem is that TRNG_config struct is missing .baseAddr parameter and I cannot set it during board specific configuration declaration - maybe that's the issue here? Maybe I got something extremly wrong? Can you help me out with this?
