1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
//! RAM ECC monitoring
//!
//! Used by: stm32h743, stm32h743v, stm32h747cm4, stm32h747cm7, stm32h753, stm32h753v
use crate::RWRegister;
#[cfg(not(feature = "nosync"))]
use core::marker::PhantomData;
/// RAMECC interrupt enable register
pub mod IER {
/// Global ECC double error on byte write interrupt enable
pub mod GECCDEBWIE {
/// Offset (3 bits)
pub const offset: u32 = 3;
/// Mask (1 bit: 1 << 3)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// Global ECC double error interrupt enable
pub mod GECCDEIE {
/// Offset (2 bits)
pub const offset: u32 = 2;
/// Mask (1 bit: 1 << 2)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// Global ECC single error interrupt enable
pub mod GECCSEIE {
/// Offset (1 bits)
pub const offset: u32 = 1;
/// Mask (1 bit: 1 << 1)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// Global interrupt enable
pub mod GIE {
/// Offset (0 bits)
pub const offset: u32 = 0;
/// Mask (1 bit: 1 << 0)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// RAMECC monitor 1 configuration register
pub mod M1CR {
/// ECC error context latching enable
pub mod ECCELEN {
/// Offset (5 bits)
pub const offset: u32 = 5;
/// Mask (1 bit: 1 << 5)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// ECC double error on byte write interrupt enable
pub mod ECCDEBWIE {
/// Offset (4 bits)
pub const offset: u32 = 4;
/// Mask (1 bit: 1 << 4)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// ECC double error interrupt enable
pub mod ECCDEIE {
/// Offset (3 bits)
pub const offset: u32 = 3;
/// Mask (1 bit: 1 << 3)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// ECC single error interrupt enable
pub mod ECCSEIE {
/// Offset (2 bits)
pub const offset: u32 = 2;
/// Mask (1 bit: 1 << 2)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// RAMECC monitor 1 status register
pub mod M1SR {
/// ECC double error on byte write flag
pub mod DEBWDF {
/// Offset (2 bits)
pub const offset: u32 = 2;
/// Mask (1 bit: 1 << 2)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// ECC double error detected flag
pub mod DEDF {
/// Offset (1 bits)
pub const offset: u32 = 1;
/// Mask (1 bit: 1 << 1)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// ECC single error detected flag
pub mod SEDCF {
/// Offset (0 bits)
pub const offset: u32 = 0;
/// Mask (1 bit: 1 << 0)
pub const mask: u32 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// RAMECC monitor 1 failing address register
pub mod M1FAR {
/// ECC failing address
pub mod FADD {
/// Offset (0 bits)
pub const offset: u32 = 0;
/// Mask (32 bits: 0xffffffff << 0)
pub const mask: u32 = 0xffffffff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// RAMECC monitor 1 failing data low register
pub mod M1FDRL {
/// ECC failing data low
pub mod FDATAL {
/// Offset (0 bits)
pub const offset: u32 = 0;
/// Mask (32 bits: 0xffffffff << 0)
pub const mask: u32 = 0xffffffff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// RAMECC monitor 1 failing data high register
pub mod M1FDRH {
/// ECC failing data high
pub mod FDATAH {
/// Offset (0 bits)
pub const offset: u32 = 0;
/// Mask (32 bits: 0xffffffff << 0)
pub const mask: u32 = 0xffffffff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// RAMECC monitor 1 failing error code register
pub mod M1FECR {
/// ECC failing code
pub mod FEC {
/// Offset (0 bits)
pub const offset: u32 = 0;
/// Mask (32 bits: 0xffffffff << 0)
pub const mask: u32 = 0xffffffff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// RAMECC monitor 2 configuration register
pub mod M2CR {
pub use super::M1CR::ECCDEBWIE;
pub use super::M1CR::ECCDEIE;
pub use super::M1CR::ECCELEN;
pub use super::M1CR::ECCSEIE;
}
/// RAMECC monitor 2 status register
pub mod M2SR {
pub use super::M1SR::DEBWDF;
pub use super::M1SR::DEDF;
pub use super::M1SR::SEDCF;
}
/// RAMECC monitor 2 failing address register
pub mod M2FAR {
pub use super::M1FAR::FADD;
}
/// RAMECC monitor 2 failing data low register
pub mod M2FDRL {
pub use super::M1FDRL::FDATAL;
}
/// RAMECC monitor 2 failing data high register
pub mod M2FDRH {
pub use super::M1FDRH::FDATAH;
}
/// RAMECC monitor 2 failing error code register
pub mod M2FECR {
pub use super::M1FECR::FEC;
}
/// RAMECC monitor 3 configuration register
pub mod M3CR {
pub use super::M1CR::ECCDEBWIE;
pub use super::M1CR::ECCDEIE;
pub use super::M1CR::ECCELEN;
pub use super::M1CR::ECCSEIE;
}
/// RAMECC monitor 3 status register
pub mod M3SR {
pub use super::M1SR::DEBWDF;
pub use super::M1SR::DEDF;
pub use super::M1SR::SEDCF;
}
/// RAMECC monitor 3 failing address register
pub mod M3FAR {
pub use super::M1FAR::FADD;
}
/// RAMECC monitor 3 failing data low register
pub mod M3FDRL {
pub use super::M1FDRL::FDATAL;
}
/// RAMECC monitor 3 failing data high register
pub mod M3FDRH {
pub use super::M1FDRH::FDATAH;
}
/// RAMECC monitor 3 failing error code register
pub mod M3FECR {
pub use super::M1FECR::FEC;
}
/// RAMECC monitor 4 configuration register
pub mod M4CR {
pub use super::M1CR::ECCDEBWIE;
pub use super::M1CR::ECCDEIE;
pub use super::M1CR::ECCELEN;
pub use super::M1CR::ECCSEIE;
}
/// RAMECC monitor 4 status register
pub mod M4SR {
pub use super::M1SR::DEBWDF;
pub use super::M1SR::DEDF;
pub use super::M1SR::SEDCF;
}
/// RAMECC monitor 4 failing address register
pub mod M4FAR {
pub use super::M1FAR::FADD;
}
/// RAMECC monitor 4 failing data low register
pub mod M4FDRL {
pub use super::M1FDRL::FDATAL;
}
/// RAMECC monitor 4 failing data high register
pub mod M4FDRH {
pub use super::M1FDRH::FDATAH;
}
/// RAMECC monitor 4 failing error code register
pub mod M4FECR {
pub use super::M1FECR::FEC;
}
/// RAMECC monitor 5 configuration register
pub mod M5CR {
pub use super::M1CR::ECCDEBWIE;
pub use super::M1CR::ECCDEIE;
pub use super::M1CR::ECCELEN;
pub use super::M1CR::ECCSEIE;
}
/// RAMECC monitor 5 status register
pub mod M5SR {
pub use super::M1SR::DEBWDF;
pub use super::M1SR::DEDF;
pub use super::M1SR::SEDCF;
}
/// RAMECC monitor 5 failing address register
pub mod M5FAR {
pub use super::M1FAR::FADD;
}
/// RAMECC monitor 5 failing data low register
pub mod M5FDRL {
pub use super::M1FDRL::FDATAL;
}
/// RAMECC monitor 5 failing data high register
pub mod M5FDRH {
pub use super::M1FDRH::FDATAH;
}
/// RAMECC monitor 5 failing error code register
pub mod M5FECR {
pub use super::M1FECR::FEC;
}
#[repr(C)]
pub struct RegisterBlock {
/// RAMECC interrupt enable register
pub IER: RWRegister<u32>,
_reserved1: [u32; 7],
/// RAMECC monitor 1 configuration register
pub M1CR: RWRegister<u32>,
/// RAMECC monitor 1 status register
pub M1SR: RWRegister<u32>,
/// RAMECC monitor 1 failing address register
pub M1FAR: RWRegister<u32>,
/// RAMECC monitor 1 failing data low register
pub M1FDRL: RWRegister<u32>,
/// RAMECC monitor 1 failing data high register
pub M1FDRH: RWRegister<u32>,
/// RAMECC monitor 1 failing error code register
pub M1FECR: RWRegister<u32>,
_reserved2: [u32; 2],
/// RAMECC monitor 2 configuration register
pub M2CR: RWRegister<u32>,
/// RAMECC monitor 2 status register
pub M2SR: RWRegister<u32>,
/// RAMECC monitor 2 failing address register
pub M2FAR: RWRegister<u32>,
/// RAMECC monitor 2 failing data low register
pub M2FDRL: RWRegister<u32>,
/// RAMECC monitor 2 failing data high register
pub M2FDRH: RWRegister<u32>,
/// RAMECC monitor 2 failing error code register
pub M2FECR: RWRegister<u32>,
_reserved3: [u32; 2],
/// RAMECC monitor 3 configuration register
pub M3CR: RWRegister<u32>,
/// RAMECC monitor 3 status register
pub M3SR: RWRegister<u32>,
/// RAMECC monitor 3 failing address register
pub M3FAR: RWRegister<u32>,
/// RAMECC monitor 3 failing data low register
pub M3FDRL: RWRegister<u32>,
/// RAMECC monitor 3 failing data high register
pub M3FDRH: RWRegister<u32>,
/// RAMECC monitor 3 failing error code register
pub M3FECR: RWRegister<u32>,
_reserved4: [u32; 2],
/// RAMECC monitor 4 configuration register
pub M4CR: RWRegister<u32>,
/// RAMECC monitor 4 status register
pub M4SR: RWRegister<u32>,
/// RAMECC monitor 4 failing address register
pub M4FAR: RWRegister<u32>,
/// RAMECC monitor 4 failing data low register
pub M4FDRL: RWRegister<u32>,
/// RAMECC monitor 4 failing data high register
pub M4FDRH: RWRegister<u32>,
/// RAMECC monitor 4 failing error code register
pub M4FECR: RWRegister<u32>,
_reserved5: [u32; 2],
/// RAMECC monitor 5 configuration register
pub M5CR: RWRegister<u32>,
/// RAMECC monitor 5 status register
pub M5SR: RWRegister<u32>,
/// RAMECC monitor 5 failing address register
pub M5FAR: RWRegister<u32>,
/// RAMECC monitor 5 failing data low register
pub M5FDRL: RWRegister<u32>,
/// RAMECC monitor 5 failing data high register
pub M5FDRH: RWRegister<u32>,
/// RAMECC monitor 5 failing error code register
pub M5FECR: RWRegister<u32>,
}
pub struct ResetValues {
pub IER: u32,
pub M1CR: u32,
pub M1SR: u32,
pub M1FAR: u32,
pub M1FDRL: u32,
pub M1FDRH: u32,
pub M1FECR: u32,
pub M2CR: u32,
pub M2SR: u32,
pub M2FAR: u32,
pub M2FDRL: u32,
pub M2FDRH: u32,
pub M2FECR: u32,
pub M3CR: u32,
pub M3SR: u32,
pub M3FAR: u32,
pub M3FDRL: u32,
pub M3FDRH: u32,
pub M3FECR: u32,
pub M4CR: u32,
pub M4SR: u32,
pub M4FAR: u32,
pub M4FDRL: u32,
pub M4FDRH: u32,
pub M4FECR: u32,
pub M5CR: u32,
pub M5SR: u32,
pub M5FAR: u32,
pub M5FDRL: u32,
pub M5FDRH: u32,
pub M5FECR: u32,
}
#[cfg(not(feature = "nosync"))]
pub struct Instance {
pub(crate) addr: u32,
pub(crate) _marker: PhantomData<*const RegisterBlock>,
}
#[cfg(not(feature = "nosync"))]
impl ::core::ops::Deref for Instance {
type Target = RegisterBlock;
#[inline(always)]
fn deref(&self) -> &RegisterBlock {
unsafe { &*(self.addr as *const _) }
}
}
#[cfg(feature = "rtic")]
unsafe impl Send for Instance {}