EFM32 Jade Gecko 12 Software Documentation  efm32jg12-doc-5.1.2
efm32jg12b_trng.h
Go to the documentation of this file.
1 /**************************************************************************/
32 /**************************************************************************/
36 /**************************************************************************/
41 typedef struct
42 {
43  __IOM uint32_t CONTROL;
44  __IM uint32_t FIFOLEVEL;
45  uint32_t RESERVED0[1];
46  __IM uint32_t FIFODEPTH;
47  __IOM uint32_t KEY0;
48  __IOM uint32_t KEY1;
49  __IOM uint32_t KEY2;
50  __IOM uint32_t KEY3;
51  __IOM uint32_t TESTDATA;
53  uint32_t RESERVED1[3];
54  __IOM uint32_t STATUS;
55  __IOM uint32_t INITWAITVAL;
56  uint32_t RESERVED2[50];
57  __IM uint32_t FIFO;
58 } TRNG_TypeDef;
60 /**************************************************************************/
65 /* Bit fields for TRNG CONTROL */
66 #define _TRNG_CONTROL_RESETVALUE 0x00000000UL
67 #define _TRNG_CONTROL_MASK 0x00003FFDUL
68 #define TRNG_CONTROL_ENABLE (0x1UL << 0)
69 #define _TRNG_CONTROL_ENABLE_SHIFT 0
70 #define _TRNG_CONTROL_ENABLE_MASK 0x1UL
71 #define _TRNG_CONTROL_ENABLE_DEFAULT 0x00000000UL
72 #define _TRNG_CONTROL_ENABLE_DISABLED 0x00000000UL
73 #define _TRNG_CONTROL_ENABLE_ENABLED 0x00000001UL
74 #define TRNG_CONTROL_ENABLE_DEFAULT (_TRNG_CONTROL_ENABLE_DEFAULT << 0)
75 #define TRNG_CONTROL_ENABLE_DISABLED (_TRNG_CONTROL_ENABLE_DISABLED << 0)
76 #define TRNG_CONTROL_ENABLE_ENABLED (_TRNG_CONTROL_ENABLE_ENABLED << 0)
77 #define TRNG_CONTROL_TESTEN (0x1UL << 2)
78 #define _TRNG_CONTROL_TESTEN_SHIFT 2
79 #define _TRNG_CONTROL_TESTEN_MASK 0x4UL
80 #define _TRNG_CONTROL_TESTEN_DEFAULT 0x00000000UL
81 #define _TRNG_CONTROL_TESTEN_NOISE 0x00000000UL
82 #define _TRNG_CONTROL_TESTEN_TESTDATA 0x00000001UL
83 #define TRNG_CONTROL_TESTEN_DEFAULT (_TRNG_CONTROL_TESTEN_DEFAULT << 2)
84 #define TRNG_CONTROL_TESTEN_NOISE (_TRNG_CONTROL_TESTEN_NOISE << 2)
85 #define TRNG_CONTROL_TESTEN_TESTDATA (_TRNG_CONTROL_TESTEN_TESTDATA << 2)
86 #define TRNG_CONTROL_CONDBYPASS (0x1UL << 3)
87 #define _TRNG_CONTROL_CONDBYPASS_SHIFT 3
88 #define _TRNG_CONTROL_CONDBYPASS_MASK 0x8UL
89 #define _TRNG_CONTROL_CONDBYPASS_DEFAULT 0x00000000UL
90 #define _TRNG_CONTROL_CONDBYPASS_NORMAL 0x00000000UL
91 #define _TRNG_CONTROL_CONDBYPASS_BYPASS 0x00000001UL
92 #define TRNG_CONTROL_CONDBYPASS_DEFAULT (_TRNG_CONTROL_CONDBYPASS_DEFAULT << 3)
93 #define TRNG_CONTROL_CONDBYPASS_NORMAL (_TRNG_CONTROL_CONDBYPASS_NORMAL << 3)
94 #define TRNG_CONTROL_CONDBYPASS_BYPASS (_TRNG_CONTROL_CONDBYPASS_BYPASS << 3)
95 #define TRNG_CONTROL_REPCOUNTIEN (0x1UL << 4)
96 #define _TRNG_CONTROL_REPCOUNTIEN_SHIFT 4
97 #define _TRNG_CONTROL_REPCOUNTIEN_MASK 0x10UL
98 #define _TRNG_CONTROL_REPCOUNTIEN_DEFAULT 0x00000000UL
99 #define TRNG_CONTROL_REPCOUNTIEN_DEFAULT (_TRNG_CONTROL_REPCOUNTIEN_DEFAULT << 4)
100 #define TRNG_CONTROL_APT64IEN (0x1UL << 5)
101 #define _TRNG_CONTROL_APT64IEN_SHIFT 5
102 #define _TRNG_CONTROL_APT64IEN_MASK 0x20UL
103 #define _TRNG_CONTROL_APT64IEN_DEFAULT 0x00000000UL
104 #define TRNG_CONTROL_APT64IEN_DEFAULT (_TRNG_CONTROL_APT64IEN_DEFAULT << 5)
105 #define TRNG_CONTROL_APT4096IEN (0x1UL << 6)
106 #define _TRNG_CONTROL_APT4096IEN_SHIFT 6
107 #define _TRNG_CONTROL_APT4096IEN_MASK 0x40UL
108 #define _TRNG_CONTROL_APT4096IEN_DEFAULT 0x00000000UL
109 #define TRNG_CONTROL_APT4096IEN_DEFAULT (_TRNG_CONTROL_APT4096IEN_DEFAULT << 6)
110 #define TRNG_CONTROL_FULLIEN (0x1UL << 7)
111 #define _TRNG_CONTROL_FULLIEN_SHIFT 7
112 #define _TRNG_CONTROL_FULLIEN_MASK 0x80UL
113 #define _TRNG_CONTROL_FULLIEN_DEFAULT 0x00000000UL
114 #define TRNG_CONTROL_FULLIEN_DEFAULT (_TRNG_CONTROL_FULLIEN_DEFAULT << 7)
115 #define TRNG_CONTROL_SOFTRESET (0x1UL << 8)
116 #define _TRNG_CONTROL_SOFTRESET_SHIFT 8
117 #define _TRNG_CONTROL_SOFTRESET_MASK 0x100UL
118 #define _TRNG_CONTROL_SOFTRESET_DEFAULT 0x00000000UL
119 #define _TRNG_CONTROL_SOFTRESET_NORMAL 0x00000000UL
120 #define _TRNG_CONTROL_SOFTRESET_RESET 0x00000001UL
121 #define TRNG_CONTROL_SOFTRESET_DEFAULT (_TRNG_CONTROL_SOFTRESET_DEFAULT << 8)
122 #define TRNG_CONTROL_SOFTRESET_NORMAL (_TRNG_CONTROL_SOFTRESET_NORMAL << 8)
123 #define TRNG_CONTROL_SOFTRESET_RESET (_TRNG_CONTROL_SOFTRESET_RESET << 8)
124 #define TRNG_CONTROL_PREIEN (0x1UL << 9)
125 #define _TRNG_CONTROL_PREIEN_SHIFT 9
126 #define _TRNG_CONTROL_PREIEN_MASK 0x200UL
127 #define _TRNG_CONTROL_PREIEN_DEFAULT 0x00000000UL
128 #define TRNG_CONTROL_PREIEN_DEFAULT (_TRNG_CONTROL_PREIEN_DEFAULT << 9)
129 #define TRNG_CONTROL_ALMIEN (0x1UL << 10)
130 #define _TRNG_CONTROL_ALMIEN_SHIFT 10
131 #define _TRNG_CONTROL_ALMIEN_MASK 0x400UL
132 #define _TRNG_CONTROL_ALMIEN_DEFAULT 0x00000000UL
133 #define TRNG_CONTROL_ALMIEN_DEFAULT (_TRNG_CONTROL_ALMIEN_DEFAULT << 10)
134 #define TRNG_CONTROL_FORCERUN (0x1UL << 11)
135 #define _TRNG_CONTROL_FORCERUN_SHIFT 11
136 #define _TRNG_CONTROL_FORCERUN_MASK 0x800UL
137 #define _TRNG_CONTROL_FORCERUN_DEFAULT 0x00000000UL
138 #define _TRNG_CONTROL_FORCERUN_NORMAL 0x00000000UL
139 #define _TRNG_CONTROL_FORCERUN_RUN 0x00000001UL
140 #define TRNG_CONTROL_FORCERUN_DEFAULT (_TRNG_CONTROL_FORCERUN_DEFAULT << 11)
141 #define TRNG_CONTROL_FORCERUN_NORMAL (_TRNG_CONTROL_FORCERUN_NORMAL << 11)
142 #define TRNG_CONTROL_FORCERUN_RUN (_TRNG_CONTROL_FORCERUN_RUN << 11)
143 #define TRNG_CONTROL_BYPNIST (0x1UL << 12)
144 #define _TRNG_CONTROL_BYPNIST_SHIFT 12
145 #define _TRNG_CONTROL_BYPNIST_MASK 0x1000UL
146 #define _TRNG_CONTROL_BYPNIST_DEFAULT 0x00000000UL
147 #define _TRNG_CONTROL_BYPNIST_NORMAL 0x00000000UL
148 #define _TRNG_CONTROL_BYPNIST_BYPASS 0x00000001UL
149 #define TRNG_CONTROL_BYPNIST_DEFAULT (_TRNG_CONTROL_BYPNIST_DEFAULT << 12)
150 #define TRNG_CONTROL_BYPNIST_NORMAL (_TRNG_CONTROL_BYPNIST_NORMAL << 12)
151 #define TRNG_CONTROL_BYPNIST_BYPASS (_TRNG_CONTROL_BYPNIST_BYPASS << 12)
152 #define TRNG_CONTROL_BYPAIS31 (0x1UL << 13)
153 #define _TRNG_CONTROL_BYPAIS31_SHIFT 13
154 #define _TRNG_CONTROL_BYPAIS31_MASK 0x2000UL
155 #define _TRNG_CONTROL_BYPAIS31_DEFAULT 0x00000000UL
156 #define _TRNG_CONTROL_BYPAIS31_NORMAL 0x00000000UL
157 #define _TRNG_CONTROL_BYPAIS31_BYPASS 0x00000001UL
158 #define TRNG_CONTROL_BYPAIS31_DEFAULT (_TRNG_CONTROL_BYPAIS31_DEFAULT << 13)
159 #define TRNG_CONTROL_BYPAIS31_NORMAL (_TRNG_CONTROL_BYPAIS31_NORMAL << 13)
160 #define TRNG_CONTROL_BYPAIS31_BYPASS (_TRNG_CONTROL_BYPAIS31_BYPASS << 13)
162 /* Bit fields for TRNG FIFOLEVEL */
163 #define _TRNG_FIFOLEVEL_RESETVALUE 0x00000000UL
164 #define _TRNG_FIFOLEVEL_MASK 0xFFFFFFFFUL
165 #define _TRNG_FIFOLEVEL_VALUE_SHIFT 0
166 #define _TRNG_FIFOLEVEL_VALUE_MASK 0xFFFFFFFFUL
167 #define _TRNG_FIFOLEVEL_VALUE_DEFAULT 0x00000000UL
168 #define TRNG_FIFOLEVEL_VALUE_DEFAULT (_TRNG_FIFOLEVEL_VALUE_DEFAULT << 0)
170 /* Bit fields for TRNG FIFODEPTH */
171 #define _TRNG_FIFODEPTH_RESETVALUE 0x00000040UL
172 #define _TRNG_FIFODEPTH_MASK 0xFFFFFFFFUL
173 #define _TRNG_FIFODEPTH_VALUE_SHIFT 0
174 #define _TRNG_FIFODEPTH_VALUE_MASK 0xFFFFFFFFUL
175 #define _TRNG_FIFODEPTH_VALUE_DEFAULT 0x00000040UL
176 #define TRNG_FIFODEPTH_VALUE_DEFAULT (_TRNG_FIFODEPTH_VALUE_DEFAULT << 0)
178 /* Bit fields for TRNG KEY0 */
179 #define _TRNG_KEY0_RESETVALUE 0x00000000UL
180 #define _TRNG_KEY0_MASK 0xFFFFFFFFUL
181 #define _TRNG_KEY0_VALUE_SHIFT 0
182 #define _TRNG_KEY0_VALUE_MASK 0xFFFFFFFFUL
183 #define _TRNG_KEY0_VALUE_DEFAULT 0x00000000UL
184 #define TRNG_KEY0_VALUE_DEFAULT (_TRNG_KEY0_VALUE_DEFAULT << 0)
186 /* Bit fields for TRNG KEY1 */
187 #define _TRNG_KEY1_RESETVALUE 0x00000000UL
188 #define _TRNG_KEY1_MASK 0xFFFFFFFFUL
189 #define _TRNG_KEY1_VALUE_SHIFT 0
190 #define _TRNG_KEY1_VALUE_MASK 0xFFFFFFFFUL
191 #define _TRNG_KEY1_VALUE_DEFAULT 0x00000000UL
192 #define TRNG_KEY1_VALUE_DEFAULT (_TRNG_KEY1_VALUE_DEFAULT << 0)
194 /* Bit fields for TRNG KEY2 */
195 #define _TRNG_KEY2_RESETVALUE 0x00000000UL
196 #define _TRNG_KEY2_MASK 0xFFFFFFFFUL
197 #define _TRNG_KEY2_VALUE_SHIFT 0
198 #define _TRNG_KEY2_VALUE_MASK 0xFFFFFFFFUL
199 #define _TRNG_KEY2_VALUE_DEFAULT 0x00000000UL
200 #define TRNG_KEY2_VALUE_DEFAULT (_TRNG_KEY2_VALUE_DEFAULT << 0)
202 /* Bit fields for TRNG KEY3 */
203 #define _TRNG_KEY3_RESETVALUE 0x00000000UL
204 #define _TRNG_KEY3_MASK 0xFFFFFFFFUL
205 #define _TRNG_KEY3_VALUE_SHIFT 0
206 #define _TRNG_KEY3_VALUE_MASK 0xFFFFFFFFUL
207 #define _TRNG_KEY3_VALUE_DEFAULT 0x00000000UL
208 #define TRNG_KEY3_VALUE_DEFAULT (_TRNG_KEY3_VALUE_DEFAULT << 0)
210 /* Bit fields for TRNG TESTDATA */
211 #define _TRNG_TESTDATA_RESETVALUE 0x00000000UL
212 #define _TRNG_TESTDATA_MASK 0xFFFFFFFFUL
213 #define _TRNG_TESTDATA_VALUE_SHIFT 0
214 #define _TRNG_TESTDATA_VALUE_MASK 0xFFFFFFFFUL
215 #define _TRNG_TESTDATA_VALUE_DEFAULT 0x00000000UL
216 #define TRNG_TESTDATA_VALUE_DEFAULT (_TRNG_TESTDATA_VALUE_DEFAULT << 0)
218 /* Bit fields for TRNG STATUS */
219 #define _TRNG_STATUS_RESETVALUE 0x00000000UL
220 #define _TRNG_STATUS_MASK 0x000003F1UL
221 #define TRNG_STATUS_TESTDATABUSY (0x1UL << 0)
222 #define _TRNG_STATUS_TESTDATABUSY_SHIFT 0
223 #define _TRNG_STATUS_TESTDATABUSY_MASK 0x1UL
224 #define _TRNG_STATUS_TESTDATABUSY_DEFAULT 0x00000000UL
225 #define _TRNG_STATUS_TESTDATABUSY_IDLE 0x00000000UL
226 #define _TRNG_STATUS_TESTDATABUSY_BUSY 0x00000001UL
227 #define TRNG_STATUS_TESTDATABUSY_DEFAULT (_TRNG_STATUS_TESTDATABUSY_DEFAULT << 0)
228 #define TRNG_STATUS_TESTDATABUSY_IDLE (_TRNG_STATUS_TESTDATABUSY_IDLE << 0)
229 #define TRNG_STATUS_TESTDATABUSY_BUSY (_TRNG_STATUS_TESTDATABUSY_BUSY << 0)
230 #define TRNG_STATUS_REPCOUNTIF (0x1UL << 4)
231 #define _TRNG_STATUS_REPCOUNTIF_SHIFT 4
232 #define _TRNG_STATUS_REPCOUNTIF_MASK 0x10UL
233 #define _TRNG_STATUS_REPCOUNTIF_DEFAULT 0x00000000UL
234 #define TRNG_STATUS_REPCOUNTIF_DEFAULT (_TRNG_STATUS_REPCOUNTIF_DEFAULT << 4)
235 #define TRNG_STATUS_APT64IF (0x1UL << 5)
236 #define _TRNG_STATUS_APT64IF_SHIFT 5
237 #define _TRNG_STATUS_APT64IF_MASK 0x20UL
238 #define _TRNG_STATUS_APT64IF_DEFAULT 0x00000000UL
239 #define TRNG_STATUS_APT64IF_DEFAULT (_TRNG_STATUS_APT64IF_DEFAULT << 5)
240 #define TRNG_STATUS_APT4096IF (0x1UL << 6)
241 #define _TRNG_STATUS_APT4096IF_SHIFT 6
242 #define _TRNG_STATUS_APT4096IF_MASK 0x40UL
243 #define _TRNG_STATUS_APT4096IF_DEFAULT 0x00000000UL
244 #define TRNG_STATUS_APT4096IF_DEFAULT (_TRNG_STATUS_APT4096IF_DEFAULT << 6)
245 #define TRNG_STATUS_FULLIF (0x1UL << 7)
246 #define _TRNG_STATUS_FULLIF_SHIFT 7
247 #define _TRNG_STATUS_FULLIF_MASK 0x80UL
248 #define _TRNG_STATUS_FULLIF_DEFAULT 0x00000000UL
249 #define TRNG_STATUS_FULLIF_DEFAULT (_TRNG_STATUS_FULLIF_DEFAULT << 7)
250 #define TRNG_STATUS_PREIF (0x1UL << 8)
251 #define _TRNG_STATUS_PREIF_SHIFT 8
252 #define _TRNG_STATUS_PREIF_MASK 0x100UL
253 #define _TRNG_STATUS_PREIF_DEFAULT 0x00000000UL
254 #define TRNG_STATUS_PREIF_DEFAULT (_TRNG_STATUS_PREIF_DEFAULT << 8)
255 #define TRNG_STATUS_ALMIF (0x1UL << 9)
256 #define _TRNG_STATUS_ALMIF_SHIFT 9
257 #define _TRNG_STATUS_ALMIF_MASK 0x200UL
258 #define _TRNG_STATUS_ALMIF_DEFAULT 0x00000000UL
259 #define TRNG_STATUS_ALMIF_DEFAULT (_TRNG_STATUS_ALMIF_DEFAULT << 9)
261 /* Bit fields for TRNG INITWAITVAL */
262 #define _TRNG_INITWAITVAL_RESETVALUE 0x000000FFUL
263 #define _TRNG_INITWAITVAL_MASK 0x000000FFUL
264 #define _TRNG_INITWAITVAL_VALUE_SHIFT 0
265 #define _TRNG_INITWAITVAL_VALUE_MASK 0xFFUL
266 #define _TRNG_INITWAITVAL_VALUE_DEFAULT 0x000000FFUL
267 #define TRNG_INITWAITVAL_VALUE_DEFAULT (_TRNG_INITWAITVAL_VALUE_DEFAULT << 0)
269 /* Bit fields for TRNG FIFO */
270 #define _TRNG_FIFO_RESETVALUE 0x00000000UL
271 #define _TRNG_FIFO_MASK 0xFFFFFFFFUL
272 #define _TRNG_FIFO_VALUE_SHIFT 0
273 #define _TRNG_FIFO_VALUE_MASK 0xFFFFFFFFUL
274 #define _TRNG_FIFO_VALUE_DEFAULT 0x00000000UL
275 #define TRNG_FIFO_VALUE_DEFAULT (_TRNG_FIFO_VALUE_DEFAULT << 0)
__IOM uint32_t KEY1
__IM uint32_t FIFO
__IOM uint32_t KEY2
__IOM uint32_t KEY3
__IM uint32_t FIFODEPTH
__IOM uint32_t INITWAITVAL
__IOM uint32_t STATUS
__IOM uint32_t CONTROL
__IM uint32_t FIFOLEVEL
__IOM uint32_t KEY0
__IOM uint32_t TESTDATA