@@ -76,32 +76,8 @@ const (
76
76
SCS_BASE = 0xE000E000
77
77
SYST_BASE = SCS_BASE + 0x0010
78
78
NVIC_BASE = SCS_BASE + 0x0100
79
- SCB_BASE = SCS_BASE + 0x0D00
80
79
)
81
80
82
- const (
83
- SCB_AIRCR_VECTKEY_Pos = 16
84
- SCB_AIRCR_SYSRESETREQ_Pos = 2
85
- SCB_AIRCR_SYSRESETREQ_Msk = 1 << SCB_AIRCR_SYSRESETREQ_Pos
86
- )
87
-
88
- // System Control Block (SCB)
89
- //
90
- // SCB_Type provides the definitions for the System Control Block Registers.
91
- type SCB_Type struct {
92
- CPUID volatile.Register32 // CPUID Base Register
93
- ICSR volatile.Register32 // Interrupt Control and State Register
94
- VTOR volatile.Register32 // Vector Table Offset Register
95
- AIRCR volatile.Register32 // Application Interrupt and Reset Control Register
96
- SCR volatile.Register32 // System Control Register
97
- CCR volatile.Register32 // Configuration Control Register
98
- _ volatile.Register32 // RESERVED1;
99
- SHP [2 ]volatile.Register32 // System Handlers Priority Registers. [0] is RESERVED
100
- SHCSR volatile.Register32 // System Handler Control and State Register
101
- }
102
-
103
- var SCB = (* SCB_Type )(unsafe .Pointer (uintptr (SCB_BASE )))
104
-
105
81
// Nested Vectored Interrupt Controller (NVIC).
106
82
//
107
83
// Source:
@@ -213,17 +189,6 @@ func EnableInterrupts(mask uintptr) {
213
189
})
214
190
}
215
191
216
- // SystemReset performs a hard system reset.
217
- func SystemReset () {
218
- // SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) |
219
- // SCB_AIRCR_SYSRESETREQ_Msk);
220
- SCB .AIRCR .Set ((0x5FA << SCB_AIRCR_VECTKEY_Pos ) | SCB_AIRCR_SYSRESETREQ_Msk )
221
-
222
- for {
223
- Asm ("wfi" )
224
- }
225
- }
226
-
227
192
// Set up the system timer to generate periodic tick events.
228
193
// This will cause SysTick_Handler to fire once per tick.
229
194
// The cyclecount parameter is a counter value which can range from 0 to
0 commit comments