summaryrefslogtreecommitdiff
path: root/CMSIS/Documentation/Pack/html/pdsc__sequence_name_enum_pg.html
blob: f7b8d527a981a9ee4ca72a80817c30d06e7b4601 (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Debug Access Sequences</title>
<title>CMSIS-Pack: Debug Access Sequences</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="stylsheetf" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-Pack
   &#160;<span id="projectnumber">Version 1.4.1</span>
   </div>
   <div id="projectbrief">Delivery Mechanism for Software Packs</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('pdsc__sequence_name_enum_pg.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Debug Access Sequences </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Operations executed by tools for debugging and flash programming.<br/>
 <br/>
</p>
<p>Debug Access Sequences define the activities of development tools to connect to a device using the debug channel for debugging, tracing, or flash programming.</p>
<p>Several Debug Access Sequences are pre-defined and executed in specific context. Refer to <a class="el" href="pdsc_family_pg.html#element_sequences">/package/devices/family/.../sequences</a> for a details.</p>
<p>The development tools should implement <a class="el" href="pdsc__sequence_name_enum_pg.html#default_sequences">Default Debug Access Sequences</a> for these Pre-defined Debug Access Sequences. These <a class="el" href="pdsc__sequence_name_enum_pg.html#default_sequences">Default Debug Access Sequences</a> can be overwritten by Debug Access Sequences specified with the <a class="el" href="pdsc_family_pg.html#element_sequence">sequence</a> element in the PDSC file. Additionally, a PDSC file can contain user-defined sequences, for example to reuse access sequence fragments.</p>
<h1><a class="anchor" id="usage_of_sequences"></a>
Usage of Debug Access Sequences</h1>
<p>Pre-defined Debug Access Sequences are used in the following context:</p>
<ul>
<li><b>Connect Debugger to Device</b> is executed when debugging or flash programming with the target starts.</li>
<li><b>Reset Device</b> is executed to reset the target.</li>
<li><b>Verify Code</b> is executed to verify the content after flash programming.</li>
<li><b>Disconnect Debugger</b> is executed when debugging or flash programming with the target stops.</li>
</ul>
<p>The following diagrams show how the Debug Access Sequences are executed by a development tool.</p>
<p><b>Connect Debugger to Device</b> is executed when debugging or flash programming with the target starts.</p>
<div class="image">
<img src="DebugConnect.png" alt="DebugConnect.png"/>
</div>
<p><b>Reset Device</b> is executed to reset the target.</p>
<div class="image">
<img src="Reset.png" alt="Reset.png"/>
</div>
<p><b>Verify Code</b> is executed to verify the content after flash programming.</p>
<div class="image">
<img src="CodeVerify.png" alt="CodeVerify.png"/>
</div>
<p><b>Disconnect Debugger</b> is executed when debugging or flash programming with the target stops.</p>
<div class="image">
<img src="DebugDisconnect.png" alt="DebugDisconnect.png"/>
</div>
<h1><a class="anchor" id="default_sequences"></a>
Default Debug Access Sequences</h1>
<p>Debug Access Sequences get defined in the <a class="el" href="pdsc_family_pg.html#element_sequence">sequence</a> element. A list of all available pre-defined sequence names is provided in the table <a class="el" href="pdsc_family_pg.html#sequences_names">Pre-defined Debug Access Sequences</a>. The following default sequences should be implemented in a tool. They are executed when no sequence definition exists in the PDSC file.</p>
<dl class="section note"><dt>Note</dt><dd>Default Debug Access Sequences read the System Control Space (SCS) of the processor and assume that the SCS offset is implemented as defined in the ARMv6-M/ARMv7-M architecture reference manual.</dd></dl>
<p>The following Default Debug Access Sequences are implemented:</p>
<ul>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#DebugPortSetup">DebugPortSetup</a> : Prepare the target debug port for connection.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#DebugPortStart">DebugPortStart</a> : Connect to the target debug port and power it up.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#DebugPortStop">DebugPortStop</a> : Power down and disconnect from target debug port.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#DebugCoreStart">DebugCoreStart</a> : Initialize core debug system.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#DebugCoreStop">DebugCoreStop</a> : Uninitialize core debug system.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#ResetSystem">ResetSystem</a> : Execute a system-wide reset via software mechanisms.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#ResetProcessor">ResetProcessor</a> : Execute a processor reset via software mechanisms.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#ResetHardware">ResetHardware</a> : Execute a system-wide reset via the dedicated debugger reset line nRST.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#ResetHardwareAssert">ResetHardwareAssert</a> : Assert a system-wide reset line nRST.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#ResetHardwareDeassert">ResetHardwareDeassert</a> : De-Assert a system-wide reset line nRST.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#ResetCatchSet">ResetCatchSet</a> : Configure the target to stop code execution after a reset.</li>
<li><a class="el" href="pdsc__sequence_name_enum_pg.html#ResetCatchClear">ResetCatchClear</a> : Free hardware resources allocated by ResetCatchSet.</li>
</ul>
<p><b>DebugPortSetup</b> <a class="anchor" id="DebugPortSetup"></a> </p>
<pre class="fragment">  &lt;sequence name="DebugPortSetup"&gt;
    &lt;block&gt;
      __var isSWJ    = ((__protocol &amp;amp; 0x00010000) != 0);
      __var protType = __protocol &amp;amp; 0x0000FFFF;
    &lt;/block&gt;
  
    &lt;!-- JTAG Protocol --&gt;
    &lt;control if="protType == 1"&gt;
    
      &lt;control if="isSWJ"&gt;
      
        &lt;block atomic="1"&gt;
          // Ensure current debug interface is in reset state
          DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);
          
          // Execute SWJ-DP Switch Sequence SWD to JTAG (0xE73C)
          // Change if SWJ-DP uses deprecated switch code (0xAEAE)
          DAP_SWJ_Sequence(16, 0xE73C);
          
          // Ensure JTAG interface is reset
          DAP_SWJ_Sequence(6, 0x3F);
        &lt;/block&gt;
        
      &lt;/control&gt;
    
      &lt;block atomic="1"&gt;
        // JTAG "Soft" Reset
        DAP_JTAG_Sequence(6, 1, 0x3F);
        DAP_JTAG_Sequence(1, 0, 0x01);
      &lt;/block&gt;

    &lt;/control&gt;
    
    &lt;!-- SWD Protocol --&gt;
    &lt;control if="protType == 2"&gt;
    
      &lt;control if="isSWJ"&gt;
        
        &lt;block atomic="1"&gt;
          // Ensure current debug interface is in reset state
          DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);
          
          // Execute SWJ-DP Switch Sequence JTAG to SWD (0xE79E)
          // Change if SWJ-DP uses deprecated switch code (0xEDB6)
          DAP_SWJ_Sequence(16, 0xE79E);
          
          // Enter SWD Line Reset State
          DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);  // &amp;gt; 50 cycles SWDIO/TMS High
          DAP_SWJ_Sequence(3,  0x00);                // At least 2 idle cycles (SWDIO/TMS Low)
      &lt;/block&gt;
      
      &lt;/control&gt;
    
      &lt;control if="!isSWJ"&gt;
      
        &lt;block&gt;
          // Enter SWD Line Reset State
          DAP_SWJ_Sequence(51, 0x0007FFFFFFFFFFFF);  // &amp;gt; 50 cycles SWDIO/TMS High
          DAP_SWJ_Sequence(3,  0x00);                // At least 2 idle cycles (SWDIO/TMS Low)
        &lt;/block&gt;
        
      &lt;/control&gt;
      
      &lt;block&gt;
        // Read DPIDR to enable SWD interface (SW-DPv1 and SW-DPv2)
        ReadDP(0x0);
      &lt;/block&gt;

    &lt;/control&gt;
    
  &lt;/sequence&gt;
</pre><p><b>DebugPortStart</b> <a class="anchor" id="DebugPortStart"></a> </p>
<pre class="fragment">  &lt;sequence name="DebugPortStart"&gt;
    
    &lt;block&gt;
      __var SW_DP_ABORT  = 0x0;
      __var DP_CTRL_STAT = 0x4;
      __var DP_SELECT    = 0x8;
      __var powered_down = 0;

      // Switch to DP Register Bank 0
      WriteDP(DP_SELECT, 0x00000000);
    
      // Read DP CTRL/STAT Register and check if CSYSPWRUPACK and CDBGPWRUPACK bits are set
      powered_down = ((ReadDP(DP_CTRL_STAT) &amp;amp; 0xA0000000) != 0xA0000000);
    &lt;/block&gt;
    
    &lt;control if="powered_down"&gt;
    
      &lt;block&gt;
        // Request Debug/System Power-Up
        WriteDP(DP_CTRL_STAT, 0x50000000);
      &lt;/block&gt;
      
      &lt;!-- Wait for Power-Up Request to be acknowledged --&gt;
      &lt;control while="(ReadDP(DP_CTRL_STAT) &amp;amp; 0xA0000000) == 0xA0000000" timeout="1000000"/&gt;
      
      &lt;block&gt;
        // Request Debug Reset
        WriteDP(DP_CTRL_STAT, 0x54000000);
      &lt;/block&gt;
      
      &lt;!-- Wait for Debug Reset to be acknowledged, don't issue error on timeout to deal with improperly connected Debug Reset --&gt;
      &lt;control while="(ReadDP(DP_CTRL_STAT) &amp;amp; 0xA8000000) == 0xA8000000" timeout="300000"/&gt;
      
      &lt;!-- JTAG Specific Part of sequence --&gt;
      &lt;control if="__protocol == 1"&gt;
      
        &lt;block&gt;
          // Init AP Transfer Mode, Transaction Counter, and Lane Mask (Normal Transfer Mode, Include all Byte Lanes)
          // Additionally clear STICKYORUN, STICKYCMP, and STICKYERR bits by writing '1'
          WriteDP(DP_CTRL_STAT, 0x50000F32);
        &lt;/block&gt;
        
      &lt;/control&gt;
      
      &lt;!-- SWD Specific Part of sequence --&gt;
      &lt;control if="__protocol == 2"&gt;
      
        &lt;block&gt;
          // Init AP Transfer Mode, Transaction Counter, and Lane Mask (Normal Transfer Mode, Include all Byte Lanes)
          WriteDP(DP_CTRL_STAT, 0x50000F00);
          
          // Clear WDATAERR, STICKYORUN, STICKYCMP, and STICKYERR bits of CTRL/STAT Register by write to ABORT register
          WriteDP(SW_DP_ABORT, 0x0000001E);
        &lt;/block&gt;

      &lt;/control&gt;
      
    &lt;/control&gt;
    
  &lt;/sequence&gt;
</pre><p><b>DebugPortStop</b> <a class="anchor" id="DebugPortStop"></a> </p>
<pre class="fragment">  &lt;sequence name="DebugPortStop"&gt;
  
    &lt;block&gt;
      __var DP_CTRL_STAT = 0x4;
      __var DP_SELECT    = 0x8;
      
      // Switch to DP Register Bank 0
      WriteDP(DP_SELECT, 0x00000000);
      
      // Power Down Debug port
      WriteDP(DP_CTRL_STAT, 0x00000000);
    &lt;/block&gt;
  
  &lt;/sequence&gt;
</pre><p><b>DebugCoreStart</b> <a class="anchor" id="DebugCoreStart"></a> </p>
<pre class="fragment">  &lt;sequence name="DebugCoreStart"&gt;
  
    &lt;block&gt;
      // System Control Space (SCS) offset as defined in ARMv6-M/ARMv7-M.
    
      __var SCS_Addr   = 0xE000E000;
      __var DHCSR_Addr = SCS_Addr + 0xDF0;

      // Enable Core Debug via DHCSR
      Write32(DHCSR_Addr, 0xA05F0001);
    &lt;/block&gt;
    
  &lt;/sequence&gt;
</pre><p><b>DebugCoreStop</b> <a class="anchor" id="DebugCoreStop"></a> </p>
<pre class="fragment">  &lt;sequence name="DebugCoreStop"&gt;
  
    &lt;block&gt;
      // System Control Space (SCS) offset as defined in ARMv6-M/ARMv7-M.
      
      __var SCS_Addr   = 0xE000E000;
      __var DHCSR_Addr = SCS_Addr + 0xDF0;
      __var DEMCR_Addr = SCS_Addr + 0xDFC;
      
      // Disable Core Debug via DHCSR
      Write32(DHCSR_Addr, 0xA05F0000);
      
      // Disable DWT and ITM blocks, DebugMonitor handler,
      // halting debug traps, and Reset Vector Catch.
      Write32(DEMCR_Addr, 0x00000000);
    &lt;/block&gt;
    
  &lt;/sequence&gt;
</pre><p><b>ResetSystem</b> <a class="anchor" id="ResetSystem"></a> </p>
<pre class="fragment">  &lt;sequence name="ResetSystem"&gt;
  
    &lt;block&gt;
      // System Control Space (SCS) offset as defined in ARMv6-M/ARMv7-M.

      __var SCS_Addr   = 0xE000E000;
      __var AIRCR_Addr = SCS_Addr + 0xD0C;
      __var DHCSR_Addr = SCS_Addr + 0xDF0;
    
      // Execute SYSRESETREQ via AIRCR
      Write32(AIRCR_Addr, 0xA05F0004);
    &lt;/block&gt;

    &lt;!-- Reset Recovery: Wait for DHCSR.S_RESET_ST bit to clear on read --&gt;
    &lt;control while="(Read32(DHCSR_Addr) &amp;amp; 0x02000000) == 0" timeout="500000"/&gt;
    
  &lt;/sequence&gt;
</pre><p><b>ResetProcessor</b> <a class="anchor" id="ResetProcessor"></a> </p>
<dl class="section note"><dt>Note</dt><dd>This Default Debug Access Sequence is empty for ARMv6-M based processors.</dd></dl>
<pre class="fragment">  &lt;sequence name="ResetProcessor"&gt;
  
    &lt;block&gt;
      // System Control Space (SCS) offset as defined in ARMv7-M.

      __var SCS_Addr   = 0xE000E000;
      __var AIRCR_Addr = SCS_Addr + 0xD0C;
      __var DHCSR_Addr = SCS_Addr + 0xDF0;
    
      // Execute VECTRESET via AIRCR
      Write32(AIRCR_Addr, 0xA05F0001);
    &lt;/block&gt;
    
    &lt;!-- Reset Recovery: Wait for DHCSR.S_RESET_ST bit to clear on read --&gt;
    &lt;control while="(Read32(DHCSR_Addr) &amp;amp; 0x02000000) == 0" timeout="500000"/&gt;

  &lt;/sequence&gt;
</pre><p><b>ResetHardware</b> <a class="anchor" id="ResetHardware"></a> </p>
<pre class="fragment">  &lt;sequence name="ResetHardware"&gt;
    
    &lt;block&gt;
      __var nReset      = 0x80;
      __var canReadPins = 0;
    
      // Deassert nRESET line
      canReadPins = (DAP_SWJ_Pins(0x00, nReset, 0) != 0xFFFFFFFF);
    &lt;/block&gt;
    
    &lt;!-- Keep reset active for 50 ms --&gt;
    &lt;control while="1" timeout="50000"/&gt;

    &lt;control if="canReadPins"&gt;
    
      &lt;!-- Assert nRESET line and wait for recovery --&gt;
      &lt;control while="(DAP_SWJ_Pins(nReset, nReset, 0) &amp;amp; nReset) == 0" timeout="1000000"/&gt;
      
    &lt;/control&gt;
    
    &lt;control if="!canReadPins"&gt;
    
      &lt;block&gt;
        // Assert nRESET line
        DAP_SWJ_Pins(nReset, nReset, 0);
      &lt;/block&gt;
      
      &lt;!-- Wait 100ms for recovery if nRESET not readable --&gt;
      &lt;control while="1" timeout="1000000"/&gt;
      
    &lt;/control&gt;
    
  &lt;/sequence&gt;
</pre><p><b>ResetHardwareAssert</b> <a class="anchor" id="ResetHardwareAssert"></a> </p>
<pre class="fragment">  &lt;sequence name="ResetHardwareAssert"&gt;

    &lt;block&gt;
        __var nReset = 0x80;
      
        // Deassert nRESET line to activate the hardware reset
        DAP_SWJ_Pins(0, nReset, 0);
    &lt;/block&gt;
    
  &lt;/sequence&gt;
</pre><p><b>ResetHardwareDeassert</b> <a class="anchor" id="ResetHardwareDeassert"></a> </p>
<pre class="fragment">  &lt;sequence name="ResetHardwareDeassert"&gt;

    &lt;block&gt;
      __var nReset      = 0x80;
      __var canReadPins = 0;
      
      // Assert nRESET line and check if nRESET is readable
      canReadPins = (DAP_SWJ_Pins(nReset, nReset, 0) != 0xFFFFFFFF);
    &lt;/block&gt;

    &lt;!-- Wait for nRESET to recover from reset if readable--&gt;
    &lt;control if="canReadPins" while="(DAP_SWJ_Pins(nReset, nReset, 0) &amp;amp; nReset) == 0" timeout="1000000"/&gt;
    
    &lt;!-- Wait 100ms for recovery if nRESET not readable --&gt;
    &lt;control if="!canReadPins" while="1" timeout="1000000"/&gt;
  
  &lt;/sequence&gt;</pre><p><b>ResetCatchSet</b> <a class="anchor" id="ResetCatchSet"></a> </p>
<pre class="fragment">  &lt;sequence name="ResetCatchSet"&gt;
  
    &lt;block&gt;
      // System Control Space (SCS) offset as defined
      // in ARMv6-M/ARMv7-M. Reimplement this sequence
      // if the SCS is located at a different offset.

      __var SCS_Addr   = 0xE000E000;
      __var DHCSR_Addr = SCS_Addr + 0xDF0;
      __var DEMCR_Addr = SCS_Addr + 0xDFC;
      __var value      = 0;
    
      // Enable Reset Vector Catch in DEMCR
      value = Read32(DEMCR_Addr);
      Write32(DEMCR_Addr, (value | 0x00000001));

      // Read DHCSR to clear potentially set DHCSR.S_RESET_ST bit
      Read32(DHCSR_Addr);
    &lt;/block&gt;
  
  &lt;/sequence&gt;
</pre><p><b>ResetCatchClear</b> <a class="anchor" id="ResetCatchClear"></a> </p>
<pre class="fragment">  &lt;sequence name="ResetCatchClear"&gt;
  
    &lt;block&gt;
      // System Control Space (SCS) offset as defined
      // in ARMv6-M/ARMv7-M. Reimplement this sequence
      // if the SCS is located at a different offset.
      
      __var SCS_Addr   = 0xE000E000;
      __var DEMCR_Addr = SCS_Addr + 0xDFC;
      __var value      = 0;
      
      // Disable Reset Vector Catch in DEMCR
      value = Read32(DEMCR_Addr);
      Write32(DEMCR_Addr, (value &amp;amp; (~0x00000001)));
    &lt;/block&gt;
    
  &lt;/sequence&gt;
</pre> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="_pack_format.html">Pack Description (*.PDSC) Format</a></li>
    <li class="footer">Generated on Tue Oct 27 2015 14:35:43 for CMSIS-Pack by ARM Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 
	-->
	</li>
  </ul>
</div>
</body>
</html>