-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstm32_svd-iwdg.ads
137 lines (113 loc) · 3.65 KB
/
stm32_svd-iwdg.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
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.IWDG is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype KR_KEY_Field is HAL.UInt16;
-- Key register
type KR_Register is record
KEY : KR_KEY_Field := 16#0#;
-- Write-only. Key value (write only, read 0x0000)
Reserved_16_31 : HAL.UInt16 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for KR_Register use record
KEY at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype PR_PR_Field is HAL.UInt3;
-- Prescaler register
type PR_Register is record
PR : PR_PR_Field := 16#0#;
-- Prescaler divider
Reserved_3_31 : HAL.UInt29 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PR_Register use record
PR at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype RLR_RL_Field is HAL.UInt12;
-- Reload register
type RLR_Register is record
RL : RLR_RL_Field := 16#FFF#;
-- Watchdog counter reload value
Reserved_12_31 : HAL.UInt20 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for RLR_Register use record
RL at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-- Status register
type SR_Register is record
PVU : Boolean;
-- Read-only. Watchdog prescaler value update
RVU : Boolean;
-- Read-only. Watchdog counter reload value update
WVU : Boolean;
-- Read-only. Watchdog counter window value update
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
PVU at 0 range 0 .. 0;
RVU at 0 range 1 .. 1;
WVU at 0 range 2 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
subtype WINR_WIN_Field is HAL.UInt12;
-- Window register
type WINR_Register is record
WIN : WINR_WIN_Field := 16#FFF#;
-- Watchdog counter window value
Reserved_12_31 : HAL.UInt20 := 16#0#;
-- unspecified
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for WINR_Register use record
WIN at 0 range 0 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Independent watchdog
type IWDG_Peripheral is record
KR : aliased KR_Register;
-- Key register
PR : aliased PR_Register;
-- Prescaler register
RLR : aliased RLR_Register;
-- Reload register
SR : aliased SR_Register;
-- Status register
WINR : aliased WINR_Register;
-- Window register
end record
with Volatile;
for IWDG_Peripheral use record
KR at 16#0# range 0 .. 31;
PR at 16#4# range 0 .. 31;
RLR at 16#8# range 0 .. 31;
SR at 16#C# range 0 .. 31;
WINR at 16#10# range 0 .. 31;
end record;
-- Independent watchdog
IWDG_Periph : aliased IWDG_Peripheral
with Import, Address => IWDG_Base;
end STM32_SVD.IWDG;