Skip to content

Commit 77458a7

Browse files
authored
Merge pull request #1220 from stm32-rs/rng
RNG enums
2 parents d6c98d0 + ef87fbe commit 77458a7

File tree

104 files changed

+261
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+261
-203
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
* Add DAC enums
8080
* DCMI enums
8181
* DFSDM enums and fixes
82+
* RNG enums
8283
* SDIO/SDMMC v1
8384
* TSC enums and arrays
8485
* USB v2

devices/fields/rng/rng_f4.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

devices/fields/rng/rng_f4_ced.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

devices/fields/rng/rng_v1.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

devices/fields/rng/rng_v1_ced.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

devices/fields/rng/v1.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
CR:
2+
RNGEN:
3+
Disabled: [0, Random number generator is disabled]
4+
Enabled: [1, Random number generator is enabled]
5+
IE:
6+
Disabled: [0, RNG interrupt is disabled]
7+
Enabled: [1, RNG interrupt is enabled]
8+
"?~CED":
9+
Enabled: [0, Clock error detection is enabled]
10+
Disabled: [1, Clock error detection is disabled]
11+
12+
SR:
13+
"[CS]EIS":
14+
_W0C:
15+
Clear: [0, Clear flag]
16+
SEIS:
17+
_read:
18+
NoFault: [0, No faulty sequence detected]
19+
Fault:
20+
[
21+
1,
22+
"At least one faulty sequence has been detected. See **SECS** bit description for details.\nAn interrupt is pending if IE = 1 in the RNG_CR register.",
23+
]
24+
CEIS:
25+
_read:
26+
Correct: [0, The RNG clock is correct]
27+
Slow: [1, "The RNG has been detected too slow\nAn interrupt is pending if IE = 1 in the RNG_CR register"]
28+
SECS:
29+
NoFault:
30+
[
31+
0,
32+
"No faulty sequence has currently been detected. If the SEIS bit is set, this means that a faulty sequence was detected and the situation has been recovered.",
33+
]
34+
Fault: [1, At least one faulty sequence has been detected - see ref manual for details]
35+
CECS:
36+
Correct:
37+
[
38+
0,
39+
"The RNG clock is correct. If the CEIS bit is set, this means that a slow clock was detected and the situation has been recovered.",
40+
]
41+
Slow: [1, The RNG clock is too slow]
42+
DRDY:
43+
Invalid: [0, "The RNG_DR register is not yet valid, no random data is available"]
44+
Valid:
45+
[
46+
1,
47+
"The RNG_DR register contains valid random data.\nOnce the RNG_DR register has been read, this bit returns to 0 until a new random value is generated.",
48+
]
49+
50+
DR:
51+
RNDATA: [0, 0xFFFFFFFF]

devices/fields/rng/rng_wl.yaml renamed to devices/fields/rng/v2.yaml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
_include:
2-
- ./rng_v1.yaml
3-
- ./rng_v1_ced.yaml
2+
- ./v1.yaml
43

54
CR:
65
CONFIGLOCK:
@@ -40,28 +39,6 @@ CR:
4039
]
4140
Custom: [1, Custom values for NIST compliant RNG]
4241

43-
SR:
44-
SEIS:
45-
NoFault: [0, No faulty sequence detected]
46-
Fault: [1, At least one faulty sequence has been detected]
47-
CEIS:
48-
Correct: [0, "The RNG clock is correct (fRNGCLK> fHCLK/32)"]
49-
Slow: [1, "The RNG clock before internal divider has been detected too slow (fRNGCLK< fHCLK/32)"]
50-
SECS:
51-
_read:
52-
NoFault:
53-
[
54-
0,
55-
"No faulty sequence has currently been detected. If the SEIS bit is set, this means that a faulty sequence was detected and the situation has been recovered",
56-
]
57-
Fault: [1, At least one faulty sequence has been detected - see ref manual for details]
58-
CECS:
59-
_read:
60-
Correct: [0, "The RNG clock is correct (fRNGCLK> fHCLK/32)"]
61-
Slow: [1, "The RNG clock before internal divider has been detected too slow (fRNGCLK< fHCLK/32)"]
62-
DRDY:
63-
Invalid: [0, "The RNG_DR register is not yet valid, no random data is available"]
64-
Valid: [1, The RNG_DR register contains valid random data]
6542
HTCR:
6643
HTCFG:
6744
Magic: [0x1759_0ABC, Magic number to be written before any write (0x1759_0ABC)]

devices/patches/rcc/h7_common_singlecore.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
_include: h7_usb1otghs.yaml
12
_modify:
23
CIFR:
34
access: read-only

devices/stm32f215.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ RCC:
184184
- fields/rcc/v2/i2s.yaml
185185
- fields/rcc/v2/i2s_pll.yaml
186186

187-
RNG: {}
187+
RNG:
188+
_include:
189+
- fields/rng/v1.yaml
188190

189191
RTC:
190192
_derive:

devices/stm32f217.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ RCC:
184184
- fields/rcc/v2/i2s.yaml
185185
- fields/rcc/v2/i2s_pll.yaml
186186

187-
RNG: {}
187+
RNG:
188+
_include:
189+
- fields/rng/v1.yaml
188190

189191
RTC:
190192
_derive:

devices/stm32f405.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ RCC:
234234
- fields/rcc/v2/i2s_pll.yaml
235235

236236
RNG:
237-
_include: fields/rng/rng_f4.yaml
237+
_include: fields/rng/v1.yaml
238238

239239
RTC:
240240
_include:

devices/stm32f407.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ RCC:
214214
- fields/rcc/v2/i2s_pll.yaml
215215

216216
RNG:
217-
_include: fields/rng/rng_f4.yaml
217+
_include: fields/rng/v1.yaml
218218

219219
RTC:
220220
_include:

devices/stm32f410.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ RCC:
180180
- fields/rcc/v2/dckcfgr2_i2csel.yaml
181181

182182
RNG:
183-
_include: fields/rng/rng_f4_ced.yaml
183+
_include: fields/rng/v1.yaml
184184
CR:
185185
_add:
186186
CED:

devices/stm32f412.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ RCC:
272272
- fields/rcc/v2/ckgatenr.yaml
273273

274274
RNG:
275-
_include: fields/rng/rng_f4_ced.yaml
275+
_include: fields/rng/v1.yaml
276276
CR:
277277
_add:
278278
CED:

devices/stm32f427.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ RCC:
265265

266266
RNG:
267267
_include:
268-
- fields/rng/rng_v1.yaml
268+
- fields/rng/v1.yaml
269269

270270
RTC:
271271
_include:

devices/stm32f429.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ RCC:
258258

259259
RNG:
260260
_include:
261-
- fields/rng/rng_v1.yaml
261+
- fields/rng/v1.yaml
262262

263263
RTC:
264264
_include:

devices/stm32f469.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ RCC:
289289
- fields/rcc/v2/dckcfgr_dsisel.yaml
290290

291291
RNG:
292-
_include: fields/rng/rng_f4_ced.yaml
292+
_include: fields/rng/v1.yaml
293293
CR:
294294
_add:
295295
CED:

devices/stm32f722.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ RCC:
185185
- patches/rcc/rcc_merge_rtcsel.yaml
186186
- fields/rcc/v2/f7.yaml
187187

188-
RNG: {}
188+
RNG:
189+
_include:
190+
- fields/rng/v1.yaml
189191

190192
RTC:
191193
_include:

devices/stm32f723.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ RCC:
187187
- patches/rcc/rcc_merge_rtcsel.yaml
188188
- fields/rcc/v2/f7.yaml
189189

190-
RNG: {}
190+
RNG:
191+
_include:
192+
- fields/rng/v1.yaml
191193

192194
RTC:
193195
_include:

devices/stm32f730.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ RCC:
193193
- patches/rcc/rcc_merge_rtcsel.yaml
194194
- fields/rcc/v2/f7.yaml
195195

196+
RNG:
197+
_include:
198+
- fields/rng/v1.yaml
199+
196200
RTC:
197201
_include:
198202
- patches/rtc/alarm.yaml

devices/stm32f732.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ RCC:
187187
- patches/rcc/rcc_merge_rtcsel.yaml
188188
- fields/rcc/v2/f7.yaml
189189

190-
RNG: {}
190+
RNG:
191+
_include:
192+
- fields/rng/v1.yaml
191193

192194
RTC:
193195
_include:

devices/stm32f733.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ RTC:
195195
- collect/rtc/alarm.yaml
196196
- collect/rtc/bkpr.yaml
197197

198-
RNG: {}
198+
RNG:
199+
_include:
200+
- fields/rng/v1.yaml
199201

200202
SAI1:
201203
_include:

devices/stm32f745.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ RCC:
272272
- fields/rcc/v2/dckcfgr_saidivr.yaml
273273
- fields/rcc/v2/dckcfgr2_cecsel.yaml
274274

275-
RNG: {}
275+
RNG:
276+
_include:
277+
- fields/rng/v1.yaml
276278

277279
RTC:
278280
_include:

devices/stm32f746.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ RCC:
247247
- fields/rcc/v2/dckcfgr_saidivr.yaml
248248
- fields/rcc/v2/dckcfgr2_cecsel.yaml
249249

250-
RNG: {}
250+
RNG:
251+
_include:
252+
- fields/rng/v1.yaml
251253

252254
RTC:
253255
_include:

devices/stm32f750.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ RCC:
228228
- fields/rcc/v2/dckcfgr_saidivr.yaml
229229
- fields/rcc/v2/dckcfgr2_cecsel.yaml
230230

231-
RNG: {}
231+
RNG:
232+
_include:
233+
- fields/rng/v1.yaml
232234

233235
RTC:
234236
_include:

devices/stm32f756.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ RCC:
255255
- fields/rcc/v2/dckcfgr_saidivr.yaml
256256
- fields/rcc/v2/dckcfgr2_cecsel.yaml
257257

258-
RNG: {}
258+
RNG:
259+
_include:
260+
- fields/rng/v1.yaml
259261

260262
RTC:
261263
_include:

devices/stm32f765.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,9 @@ RCC:
279279
- fields/rcc/v2/dckcfgr_dsisel.yaml
280280
- fields/rcc/v2/dckcfgr2_cecsel.yaml
281281

282-
RNG: {}
282+
RNG:
283+
_include:
284+
- fields/rng/v1.yaml
283285

284286
RTC:
285287
_include:

devices/stm32f767.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ RCC:
308308
- fields/rcc/v2/dckcfgr_dsisel.yaml
309309
- fields/rcc/v2/dckcfgr2_cecsel.yaml
310310

311-
RNG: {}
311+
RNG:
312+
_include:
313+
- fields/rng/v1.yaml
312314

313315
RTC:
314316
_include:

devices/stm32f769.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ RCC:
312312
- fields/rcc/v2/dckcfgr_dsisel.yaml
313313
- fields/rcc/v2/dckcfgr2_cecsel.yaml
314314

315-
RNG: {}
315+
RNG:
316+
_include:
317+
- fields/rng/v1.yaml
316318

317319
RTC:
318320
_include:

0 commit comments

Comments
 (0)