13#ifndef T32CZ20_TRNG_H_
14#define T32CZ20_TRNG_H_
35#define CHIP_MEMORY_MAP_SECURITY_CTRL_BASE 0x50003000
39 __IO uint32_t reserved[18];
44#define SECURITY_CTRL_CHIP_REGISTERS ((SECURITY_CTRL_REGISTERS_T *) CHIP_MEMORY_MAP_SECURITY_CTRL_BASE)
46#define OTP_WRITE_ENABLE_KEY (0x28514260)
47#define OTP_WRITE_DISABLE_KEY (0x00000000)
62#ifdef PUF_OTP_SECURE_EN
63 #define CHIP_MEMORY_MAP_TRNG_BASE (0x50044A00UL)
65 #define CHIP_MEMORY_MAP_TRNG_BASE (0x40044A00UL)
78 __IO uint32_t reserved1[3];
82 __IO uint32_t reserved2[3];
86 __IO uint32_t reserved3[19];
97#define REG_TRNG_EXPECTED_VERSION 0x39304200
103#define REG_TRNG_STATUS_BUSY 0x01
104#define REG_TRNG_STATUS_FIFO_CLEARED 0x02
105#define REG_TRNG_STATUS_ENTROPY_SRC_AVAIL 0x04
107#define REG_TRNG_STATUS_NOT_ENABLED 0x100
108#define REG_TRNG_STATUS_HEALTH_TEST_ACTIVE 0x200
109#define REG_TRNG_STATUS_DATA_READY 0x400
110#define REG_TRNG_STATUS_HALTED_ERROR 0x800
116#define REG_CONTROL_ENABLE_TRNG_FUNCTION 0x01
117#define REG_CONTROL_ENABLE_TRNG_CLOCK 0x02
124#define TRNG_CHIP_REGISTERS ((TRNG_REGISTERS_T *) CHIP_MEMORY_MAP_TRNG_BASE)
130#define TRNG_TIMEOUT_COUNT 20000
136 uint32_t* busy_cycles);
tr_hal_status_t
Definition tr_hal_common.h:25
tr_hal_status_t tr_hal_trng_debug(uint32_t *version, uint32_t *status, uint32_t *data, uint32_t *control)
tr_hal_status_t tr_hal_trng_read_internal(uint32_t *result, uint32_t *busy_cycles)
Definition T32CZ20_trng.h:38
__IO uint32_t sec_otp_write_key
Definition T32CZ20_trng.h:40
Definition T32CZ20_trng.h:75
__IO uint32_t version
Definition T32CZ20_trng.h:77
__IO uint32_t status
Definition T32CZ20_trng.h:81
__IO uint32_t data
Definition T32CZ20_trng.h:89
__IO uint32_t control
Definition T32CZ20_trng.h:85