-
Notifications
You must be signed in to change notification settings - Fork 0
/
stm32_svd-dcmi.ads
390 lines (351 loc) · 12.3 KB
/
stm32_svd-dcmi.ads
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
pragma Style_Checks (Off);
-- This spec has been automatically generated from STM32L4R9.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package STM32_SVD.DCMI is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_FCRC_Field is HAL.UInt2;
subtype CR_EDM_Field is HAL.UInt2;
subtype CR_BSM_Field is HAL.UInt2;
-- control register 1
type CR_Register is record
CAPTURE : Boolean := False;
-- Capture enable
CM : Boolean := False;
-- Capture mode
CROP : Boolean := False;
-- Crop feature
JPEG : Boolean := False;
-- JPEG format
ESS : Boolean := False;
-- Embedded synchronization select
PCKPOL : Boolean := False;
-- Pixel clock polarity
HSPOL : Boolean := False;
-- Horizontal synchronization polarity
VSPOL : Boolean := False;
-- Vertical synchronization polarity
FCRC : CR_FCRC_Field := 16#0#;
-- Frame capture rate control
EDM : CR_EDM_Field := 16#0#;
-- Extended data mode
Reserved_12_13 : HAL.UInt2 := 16#0#;
-- unspecified
ENABLE : Boolean := False;
-- DCMI enable
Reserved_15_15 : HAL.Bit := 16#0#;
-- unspecified
BSM : CR_BSM_Field := 16#0#;
-- Byte Select mode
OEBS : Boolean := False;
-- Odd/Even Byte Select (Byte Select Start)
LSM : Boolean := False;
-- Line Select mode
OELS : Boolean := False;
-- Odd/Even Line Select (Line Select Start)
Reserved_21_31 : HAL.UInt11 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
CAPTURE at 0 range 0 .. 0;
CM at 0 range 1 .. 1;
CROP at 0 range 2 .. 2;
JPEG at 0 range 3 .. 3;
ESS at 0 range 4 .. 4;
PCKPOL at 0 range 5 .. 5;
HSPOL at 0 range 6 .. 6;
VSPOL at 0 range 7 .. 7;
FCRC at 0 range 8 .. 9;
EDM at 0 range 10 .. 11;
Reserved_12_13 at 0 range 12 .. 13;
ENABLE at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
BSM at 0 range 16 .. 17;
OEBS at 0 range 18 .. 18;
LSM at 0 range 19 .. 19;
OELS at 0 range 20 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
-- status register
type SR_Register is record
HSYNC : Boolean;
-- Read-only. HSYNC
VSYNC : Boolean;
-- Read-only. VSYNC
FNE : Boolean;
-- Read-only. FIFO not empty
Reserved_3_31 : HAL.UInt29;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
HSYNC at 0 range 0 .. 0;
VSYNC at 0 range 1 .. 1;
FNE at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
-- raw interrupt status register
type RIS_Register is record
FRAME_RIS : Boolean;
-- Read-only. Capture complete raw interrupt status
OVR_RIS : Boolean;
-- Read-only. Overrun raw interrupt status
ERR_RIS : Boolean;
-- Read-only. Synchronization error raw interrupt status
VSYNC_RIS : Boolean;
-- Read-only. VSYNC raw interrupt status
LINE_RIS : Boolean;
-- Read-only. Line raw interrupt status
Reserved_5_31 : HAL.UInt27;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RIS_Register use record
FRAME_RIS at 0 range 0 .. 0;
OVR_RIS at 0 range 1 .. 1;
ERR_RIS at 0 range 2 .. 2;
VSYNC_RIS at 0 range 3 .. 3;
LINE_RIS at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-- interrupt enable register
type IER_Register is record
FRAME_IE : Boolean := False;
-- Capture complete interrupt enable
OVR_IE : Boolean := False;
-- Overrun interrupt enable
ERR_IE : Boolean := False;
-- Synchronization error interrupt enable
VSYNC_IE : Boolean := False;
-- VSYNC interrupt enable
LINE_IE : Boolean := False;
-- Line interrupt enable
Reserved_5_31 : HAL.UInt27 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for IER_Register use record
FRAME_IE at 0 range 0 .. 0;
OVR_IE at 0 range 1 .. 1;
ERR_IE at 0 range 2 .. 2;
VSYNC_IE at 0 range 3 .. 3;
LINE_IE at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-- masked interrupt status register
type MIS_Register is record
FRAME_MIS : Boolean;
-- Read-only. Capture complete masked interrupt status
OVR_MIS : Boolean;
-- Read-only. Overrun masked interrupt status
ERR_MIS : Boolean;
-- Read-only. Synchronization error masked interrupt status
VSYNC_MIS : Boolean;
-- Read-only. VSYNC masked interrupt status
LINE_MIS : Boolean;
-- Read-only. Line masked interrupt status
Reserved_5_31 : HAL.UInt27;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for MIS_Register use record
FRAME_MIS at 0 range 0 .. 0;
OVR_MIS at 0 range 1 .. 1;
ERR_MIS at 0 range 2 .. 2;
VSYNC_MIS at 0 range 3 .. 3;
LINE_MIS at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
-- interrupt clear register
type ICR_Register is record
FRAME_ISC : Boolean := False;
-- Write-only. Capture complete interrupt status clear
OVR_ISC : Boolean := False;
-- Write-only. Overrun interrupt status clear
ERR_ISC : Boolean := False;
-- Write-only. Synchronization error interrupt status clear
VSYNC_ISC : Boolean := False;
-- Write-only. Vertical synch interrupt status clear
LINE_ISC : Boolean := False;
-- Write-only. line interrupt status clear
Reserved_5_31 : HAL.UInt27 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ICR_Register use record
FRAME_ISC at 0 range 0 .. 0;
OVR_ISC at 0 range 1 .. 1;
ERR_ISC at 0 range 2 .. 2;
VSYNC_ISC at 0 range 3 .. 3;
LINE_ISC at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
subtype ESCR_FSC_Field is HAL.UInt8;
subtype ESCR_LSC_Field is HAL.UInt8;
subtype ESCR_LEC_Field is HAL.UInt8;
subtype ESCR_FEC_Field is HAL.UInt8;
-- embedded synchronization code register
type ESCR_Register is record
FSC : ESCR_FSC_Field := 16#0#;
-- Frame start delimiter code
LSC : ESCR_LSC_Field := 16#0#;
-- Line start delimiter code
LEC : ESCR_LEC_Field := 16#0#;
-- Line end delimiter code
FEC : ESCR_FEC_Field := 16#0#;
-- Frame end delimiter code
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ESCR_Register use record
FSC at 0 range 0 .. 7;
LSC at 0 range 8 .. 15;
LEC at 0 range 16 .. 23;
FEC at 0 range 24 .. 31;
end record;
subtype ESUR_FSU_Field is HAL.UInt8;
subtype ESUR_LSU_Field is HAL.UInt8;
subtype ESUR_LEU_Field is HAL.UInt8;
subtype ESUR_FEU_Field is HAL.UInt8;
-- embedded synchronization unmask register
type ESUR_Register is record
FSU : ESUR_FSU_Field := 16#0#;
-- Frame start delimiter unmask
LSU : ESUR_LSU_Field := 16#0#;
-- Line start delimiter unmask
LEU : ESUR_LEU_Field := 16#0#;
-- Line end delimiter unmask
FEU : ESUR_FEU_Field := 16#0#;
-- Frame end delimiter unmask
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ESUR_Register use record
FSU at 0 range 0 .. 7;
LSU at 0 range 8 .. 15;
LEU at 0 range 16 .. 23;
FEU at 0 range 24 .. 31;
end record;
subtype CWSTRT_HOFFCNT_Field is HAL.UInt14;
subtype CWSTRT_VST_Field is HAL.UInt13;
-- crop window start
type CWSTRT_Register is record
HOFFCNT : CWSTRT_HOFFCNT_Field := 16#0#;
-- Horizontal offset count
Reserved_14_15 : HAL.UInt2 := 16#0#;
-- unspecified
VST : CWSTRT_VST_Field := 16#0#;
-- Vertical start line count
Reserved_29_31 : HAL.UInt3 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CWSTRT_Register use record
HOFFCNT at 0 range 0 .. 13;
Reserved_14_15 at 0 range 14 .. 15;
VST at 0 range 16 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype CWSIZE_CAPCNT_Field is HAL.UInt14;
subtype CWSIZE_VLINE_Field is HAL.UInt14;
-- crop window size
type CWSIZE_Register is record
CAPCNT : CWSIZE_CAPCNT_Field := 16#0#;
-- Capture count
Reserved_14_15 : HAL.UInt2 := 16#0#;
-- unspecified
VLINE : CWSIZE_VLINE_Field := 16#0#;
-- Vertical line count
Reserved_30_31 : HAL.UInt2 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CWSIZE_Register use record
CAPCNT at 0 range 0 .. 13;
Reserved_14_15 at 0 range 14 .. 15;
VLINE at 0 range 16 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
-- DR_Byte array element
subtype DR_Byte_Element is HAL.UInt8;
-- DR_Byte array
type DR_Byte_Field_Array is array (0 .. 3) of DR_Byte_Element
with Component_Size => 8, Size => 32;
-- data register
type DR_Register
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
Val : HAL.UInt32;
-- Byte as a value
when True =>
Arr : DR_Byte_Field_Array;
-- Byte as an array
end case;
end record
with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for DR_Register use record
Val at 0 range 0 .. 31;
Arr at 0 range 0 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Digital camera interface
type DCMI_Peripheral is record
CR : aliased CR_Register;
-- control register 1
SR : aliased SR_Register;
-- status register
RIS : aliased RIS_Register;
-- raw interrupt status register
IER : aliased IER_Register;
-- interrupt enable register
MIS : aliased MIS_Register;
-- masked interrupt status register
ICR : aliased ICR_Register;
-- interrupt clear register
ESCR : aliased ESCR_Register;
-- embedded synchronization code register
ESUR : aliased ESUR_Register;
-- embedded synchronization unmask register
CWSTRT : aliased CWSTRT_Register;
-- crop window start
CWSIZE : aliased CWSIZE_Register;
-- crop window size
DR : aliased DR_Register;
-- data register
end record
with Volatile;
for DCMI_Peripheral use record
CR at 16#0# range 0 .. 31;
SR at 16#4# range 0 .. 31;
RIS at 16#8# range 0 .. 31;
IER at 16#C# range 0 .. 31;
MIS at 16#10# range 0 .. 31;
ICR at 16#14# range 0 .. 31;
ESCR at 16#18# range 0 .. 31;
ESUR at 16#1C# range 0 .. 31;
CWSTRT at 16#20# range 0 .. 31;
CWSIZE at 16#24# range 0 .. 31;
DR at 16#28# range 0 .. 31;
end record;
-- Digital camera interface
DCMI_Periph : aliased DCMI_Peripheral
with Import, Address => DCMI_Base;
end STM32_SVD.DCMI;