OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [doc/] [html/] [integration.html] - Blame information for rev 58

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 50 olivier.gi
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
<head>
4
<title>openMSP430 Integration and Connectivity</title>
5
</head>
6
<body>
7
<a name="TOC"></a>
8
<h3>Table of content</h3>
9
<ul>
10
        <li><a href="#1. Overview">              1. Overview</a></li>
11
        <li><a href="#2. Clocks">                2. Clocks</a></li>
12
        <li><a href="#3. Resets">                3. Resets</a></li>
13
        <li><a href="#4. Program Memory">        4. Program Memory</a></li>
14
        <li><a href="#5. Data Memory">           5. Data Memory</a></li>
15
        <li><a href="#6. Peripherals">           6. Peripherals</a></li>
16
        <li><a href="#7. Interrupts">            7. Interrupts</a></li>
17
        <li><a href="#8. Serial Debug Interface">8. Serial Debug Interface</a></li>
18
</ul>
19
 
20
<a name="1. Overview"></a>
21
<h1>1. Overview</h1>
22
 
23
This chapter aims to give a comprehensive description of all openMSP430 core interfaces in order to facilitates its integration within an ASIC or FPGA.<br /><br />
24
 
25
The following diagram shows an overview of the openMSP430 core connectivity:<br /><br />
26
<img src="getimg.php?1264010073" width="100%" alt="Core Integration - 23 Jan 2010" title="Core Integration - 23 Jan 2010" />
27
<br /><br />
28
The full pinout of the core is summarized in the following table.<br />
29
<br />
30
<table border="1">
31
        <tr> <td align="center"><b>Port Name</b></td> <td align="center"><b>Direction</b></td> <td align="center"><b>Width</b>    </td> <td align="center"><b>Description</b></td> </tr>
32
 
33
        <tr> <td colspan="4" align="center"> <b><i>Clocks</i></b>                         </td></tr>
34
        <tr>
35
             <td> <a href="#2. Clocks">dco_clk</a>                                </td>
36
             <td> Input                                                            </td>
37
             <td> 1                                                                </td>
38
             <td> Fast oscillator (fast clock), CPU clock                          </td>
39
        </tr>
40
        <tr>
41
             <td> <a href="#2. Clocks">lfxt_clk</a>                               </td>
42
             <td> Input                                                            </td>
43
             <td> 1                                                                </td>
44
             <td> Low frequency oscillator (typ. 32kHz)                            </td>
45
   </tr>
46
        <tr>
47
             <td> <a href="#2. Clocks">mclk</a>                                   </td>
48
             <td> Output                                                           </td>
49
             <td> 1                                                                </td>
50
             <td> Main system clock                                                </td>
51
        </tr>
52
        <tr>
53
             <td> <a href="#2. Clocks">aclk_en</a>                                </td>
54
             <td> Output                                                           </td>
55
             <td> 1                                                                </td>
56
             <td> ACLK enable                                                      </td>
57
   </tr>
58
        <tr>
59
             <td> <a href="#2. Clocks">smclk_en</a>                               </td>
60
             <td> Output                                                           </td>
61
             <td> 1                                                                </td>
62
             <td> SMCLK enable                                                     </td>
63
   </tr>
64
 
65
        <tr> <td colspan="4" align="center"> <b><i>Resets</i></b>                         </td></tr>
66
        <tr>
67
             <td> <a href="#3. Resets">puc</a>                                    </td>
68
             <td> Output                                                           </td>
69
             <td> 1                                                                </td>
70
             <td> Main system reset                                                </td>
71
   </tr>
72
        <tr>
73
             <td> <a href="#3. Resets">reset_n</a>                                </td>
74
             <td> Input                                                            </td>
75
             <td> 1                                                                </td>
76
             <td> Reset Pin (low active)                                           </td>
77
        </tr>
78
 
79
 
80
        <tr> <td colspan="4" align="center"> <b><i>Program Memory interface</i></b>       </td></tr>
81
        <tr>
82
             <td> <a href="#4. Program Memory">pmem_addr</a>                      </td>
83
             <td> Output                                                           </td>
84
             <td> `PMEM_AWIDTH<sup>1</sup>                                        </td>
85
             <td> Program Memory address                                           </td>
86
        </tr>
87
        <tr>
88
             <td> <a href="#4. Program Memory">pmem_cen</a>                       </td>
89
             <td> Output                                                           </td>
90
             <td> 1                                                                </td>
91
             <td> Program Memory chip enable (low active)                          </td>
92
        </tr>
93
        <tr>
94
             <td> <a href="#4. Program Memory">pmem_din</a>                       </td>
95
             <td> Output                                                           </td>
96
             <td> 16                                                               </td>
97
             <td> Program Memory data input                                        </td>
98
        </tr>
99
        <tr>
100
             <td> <a href="#4. Program Memory">pmem_dout</a>                      </td>
101
             <td> Input                                                            </td>
102
             <td> 16                                                               </td>
103
             <td> Program Memory data output                                       </td>
104
        </tr>
105
        <tr>
106
             <td> <a href="#4. Program Memory">pmem_wen</a>                       </td>
107
             <td> Output                                                           </td>
108
             <td> 2                                                                </td>
109
             <td> Program Memory write enable (low active)                         </td>
110
        </tr>
111
 
112
        <tr> <td colspan="4" align="center"> <b><i>Data Memory interface</i></b>          </td></tr>
113
        <tr>
114
             <td> <a href="#5. Data Memory">dmem_addr</a>                         </td>
115
             <td> Output                                                           </td>
116
             <td> `DMEM_AWIDTH<sup>1</sup>                                        </td>
117
             <td> Data Memory address                                              </td>
118
        </tr>
119
        <tr>
120
             <td> <a href="#5. Data Memory">dmem_cen</a>                          </td>
121
             <td> Output                                                           </td>
122
             <td> 1                                                                </td>
123
             <td> Data Memory chip enable (low active)                             </td>
124
        </tr>
125
        <tr>
126
             <td> <a href="#5. Data Memory">dmem_din</a>                          </td>
127
             <td> Output                                                           </td>
128
             <td> 16                                                               </td>
129
             <td> Data Memory data input                                           </td>
130
        </tr>
131
        <tr>
132
             <td> <a href="#5. Data Memory">dmem_dout</a>                         </td>
133
             <td> Input                                                            </td>
134
             <td> 16                                                               </td>
135
             <td> Data Memory data output                                          </td>
136
        </tr>
137
        <tr>
138
             <td> <a href="#5. Data Memory">dmem_wen</a>                          </td>
139
             <td> Output                                                           </td>
140
             <td> 2                                                                </td>
141
             <td> Data Memory write enable (low active)                            </td>
142
        </tr>
143
 
144
        <tr> <td colspan="4" align="center"> <b><i>External Peripherals interface</i></b> </td></tr>
145
        <tr>
146
             <td> <a href="#6. Peripherals">per_addr</a>                          </td>
147
             <td> Output                                                           </td>
148
             <td> 8                                                                </td>
149
             <td> Peripheral address                                               </td>
150
        </tr>
151
        <tr>
152
             <td> <a href="#6. Peripherals">per_din</a>                           </td>
153
             <td> Output                                                           </td>
154
             <td> 16                                                               </td>
155
             <td> Peripheral data input                                            </td>
156
   </tr>
157
        <tr>
158
             <td> <a href="#6. Peripherals">per_dout</a>                          </td>
159
             <td> Input                                                            </td>
160
             <td> 16                                                               </td>
161
             <td> Peripheral data output                                           </td>
162
        </tr>
163
        <tr>
164
             <td> <a href="#6. Peripherals">per_en</a>                            </td>
165
             <td> Output                                                           </td>
166
             <td> 1                                                                </td>
167
             <td> Peripheral enable (high active)                                  </td>
168
        </tr>
169
        <tr>
170
             <td> <a href="#6. Peripherals">per_wen</a>                           </td>
171
             <td> Output                                                           </td>
172
             <td> 2                                                                </td>
173
             <td> Peripheral write enable (high active)                            </td>
174
        </tr>
175
 
176
        <tr> <td colspan="4" align="center"> <b><i>Interrupts</i></b>                     </td></tr>
177
        <tr>
178
                  <td> <a href="#7. Interrupts">irq</a>                                </td>
179
                  <td> Input                                                            </td>
180
                  <td> 14                                                               </td>
181
                  <td> Maskable interrupts (one-hot signal)                             </td>
182
   </tr>
183
        <tr>
184
             <td> <a href="#7. Interrupts">nmi</a>                                </td>
185
             <td> Input                                                            </td>
186
             <td> 1                                                                </td>
187
             <td> Non-maskable interrupt (asynchronous)                            </td>
188
        </tr>
189
        <tr>
190
             <td> <a href="#7. Interrupts">irq_acc</a>                            </td>
191
             <td> Output                                                           </td>
192
             <td> 14                                                               </td>
193
             <td> Interrupt request accepted (one-hot signal)                      </td>
194
        </tr>
195
 
196
        <tr> <td colspan="4" align="center"> <b><i>Serial Debug interface</i></b>         </td></tr>
197
        <tr>
198
             <td> <a href="#8. Serial Debug Interface">dbg_freeze</a>             </td>
199
             <td> Output                                                           </td>
200
             <td> 1                                                                </td>
201
             <td> Freeze peripherals                                               </td>
202
        </tr>
203
        <tr>
204
             <td> <a href="#8. Serial Debug Interface">dbg_uart_txd</a>           </td>
205
             <td> Output                                                           </td>
206
             <td> 1                                                                </td>
207
             <td> Debug interface: UART TXD                                        </td>
208
        </tr>
209
        <tr>
210
             <td> <a href="#8. Serial Debug Interface">dbg_uart_rxd</a>           </td>
211
             <td> Input                                                            </td>
212
             <td> 1                                                                </td>
213
             <td> Debug interface: UART RXD                                        </td>
214
        </tr>
215
</table>
216
<br />
217
<sup>1</sup>: This parameter is declared in the "openMSP430_defines.v" file and defines the RAM/ROM size.<br />
218
<br />
219
 
220
 
221
<a name="2. Clocks"></a>
222
<div style="text-align: right"><a href="#TOC">Top</a></div>
223
<h1>2. Clocks</h1>
224
 
225
The different clocks in the design are managed by the Basic Clock Module:
226
<br /><br />
227
<img src="getimg.php?1246434498" width="75%" alt="Clock structure diagram" title="Clock structure diagram" />
228
<br />
229
<ul>
230
        <li><b><font color="#0000b0">DCO_CLK</font></b>: this input port is typically connected to a PLL, RC oscillator or any clock resource the target FPGA might provide.<br />
231
         From a synthesis tool perspective (ISE, Quartus, Libero, Design Compiler...), this the only port where a clock needs to be declared.
232
             <br /><br />
233
        </li>
234
        <li>
235
            <b><font color="#0000b0">LFXT_CLK</font></b>: if ACLK_EN or SMCLK_EN are going to be used in the project (for example through the Watchdog or TimerA peripherals), then this port needs to be connected to a clock running at least two time slower as DCO_CLK (typically 32kHz). It can be connected to 0 or 1 otherwise.
236
             <br /><br />
237
        </li>
238
        <li>
239
            <b><font color="#00b000">MCLK</font></b>: the main system clock drives the complete openMSP430 clock domain, including program/data memories and the peripheral interfaces.
240
             <br /><br />
241
        </li>
242
        <li>
243
            <b><font color="#00b000">ACLK_EN / SMCLK_EN</font></b>: these two clock enable signals can be used in order to emulate the original ACLK and SMCLK from the MSP430 specification.<br />
244
            An example of this can be found in the Watchdog and TimerA modules, where it is implemented as following:<br /><br />
245
<img src="getimg.php?1246434793" alt="Clock implementation example" title="Clock implementation example" />
246
             <br /><br />
247
        </li>
248
</ul>
249
 
250
As an illustration, the following waveform shows the different clocks where the software running on the openMSP430 configures the BCSCTL1 and BCSCTL2 registers so that <i>ACLK_EN</i> and <i>SMCLK_EN</i> are respectively running at <i>LFXT_CLK/2</i> and <i>DCO_CLK/4</i>.<br /><br />
251
<img src="getimg.php?1263320613" width="100%" alt="Waveforms: Clocks - Jan 12. 2010" title="Waveforms: Clocks - Jan 12. 2010" />
252
<br /><br />
253
 
254
<a name="3. Resets"></a>
255
<div style="text-align: right"><a href="#TOC">Top</a></div>
256
<h1>3. Resets</h1>
257
 
258
<ul>
259
        <li><b><font color="#0000b0">RESET_N</font></b>: this input port is typically connected to a board push button and is generally combined with the system power-on-reset.
260
             <br /><br />
261
        </li>
262
        <li>
263
            <b><font color="#00b000">PUC</font></b>: the Power-Up-Clear signal is asynchronously set with the reset pin (<i>RESET_N</i>), the watchdog reset or the serial debug interface reset. In order to get clean timings, it is synchronously cleared with MCLK's falling edge. As a general rule, this signal should be used as the reset of the <i>MCLK</i> clock domain.
264
             <br /><br />
265
        </li>
266
</ul>
267
The following waveform illustrates this:<br /><br />
268
<img src="getimg.php?1263320655" width="100%" alt="Waveforms: Resets - Jan 12. 2010" title="Waveforms: Resets - Jan 12. 2010" />
269
 <br /><br />
270
 
271
<a name="4. Program Memory"></a>
272
<div style="text-align: right"><a href="#TOC">Top</a></div>
273
<h1>4. Program Memory</h1>
274
 
275
Depending on the project needs, the program memory can be either implemented as a ROM or RAM.<br />
276
<br />
277
If a ROM is selected then the <i>PMEM_DIN</i> and <i>PMEM_WEN</i> ports won't be connected. In that case, the software debug capabilities are limited because the serial debug interface can only use hardware breakpoints in order to stop the program execution. In addition, updating the software will require a reprogramming of the FPGA.<br />
278
<br />
279
If the program memory is a RAM, the developer gets full flexibility regarding software debugging. The serial debug interface can be used to update the program memory and software breakpoints can be used.<br />
280
<br /><br />
281
That said, the protocol between the openMSP430 and the program memory is quite standard. Signal description goes as following:
282
<ul>
283
        <li><b><font color="#00b000">PMEM_CEN</font></b>: when this signal is active, the read/write access will be executed with the next <i>MCLK</i> rising edge. Note that this signal is LOW ACTIVE.
284
             <br /><br />
285
        </li>
286
        <li>
287
            <b><font color="#00b000">PMEM_ADDR</font></b>: Memory address of the 16 bit word which is going to be accessed.<br />
288
            <b>Note:</b> in order to calculate the core logical address from the program memory physical address, the formula goes as following: <i>LOGICAL@=2*PHYSICAL@+0x10000-PMEM_SIZE</i>
289
             <br /><br />
290
        </li>
291
        <li>
292
            <b><font color="#0000b0">PMEM_DOUT</font></b>: the memory output word will be updated with every valid read/write access (i.e. <i>PMEM_DOUT</i> is not updated if <i>PMEM_CEN</i>=1).
293
             <br /><br />
294
        </li>
295
        <li>
296
            <b><font color="#00b000">PMEM_WEN</font></b>: this signal selects which byte should be written during a valid access. PMEM_WEN[0] will activate a write on the lower byte, PMEM_WEN[1] a write on the upper byte. Note that these signals are LOW ACTIVE.
297
             <br /><br />
298
        </li>
299
        <li>
300
            <b><font color="#00b000">PMEM_DIN</font></b>: the memory input word will be written with the valid write access according to the <i>PMEM_WEN</i> value.
301
             <br /><br />
302
        </li>
303
</ul>
304
The following waveform illustrates some read accesses of the program memory (write access are illustrated in the data memory section):<br /><br />
305
<img src="getimg.php?1263320706" width="100%" alt="Waveforms: Program memory - Jan " title="Waveforms: Program memory - Jan " />
306
<br /><br />
307
<a name="5. Data Memory"></a>
308
<div style="text-align: right"><a href="#TOC">Top</a></div>
309
<h1>5. Data Memory</h1>
310
 
311
The data memory is always implemented as a RAM.<br />
312
<br />
313
The protocol between the openMSP430 and the data memory is the same as the one of the program memory. Therefore, the signal description is the same:
314
<ul>
315
        <li><b><font color="#00b000">DMEM_CEN</font></b>: when this signal is active, the read/write access will be executed with the next <i>MCLK</i> rising edge. Note that this signal is LOW ACTIVE.
316
             <br /><br />
317
        </li>
318
        <li>
319
            <b><font color="#00b000">DMEM_ADDR</font></b>: Memory address of the 16 bit word which is going to be accessed.<br />
320
            <b>Note:</b> in order to calculate the core logical address from the data memory physical address, the formula goes as following: <i>LOGICAL@=2*PHYSICAL@+0x200</i>
321
             <br /><br />
322
        </li>
323
        <li>
324
            <b><font color="#0000b0">DMEM_DOUT</font></b>: the memory output word will be updated with every valid read/write access (i.e. <i>DMEM_DOUT</i> is not updated if <i>DMEM_CEN</i>=1).
325
             <br /><br />
326
        </li>
327
        <li>
328
            <b><font color="#00b000">DMEM_WEN</font></b>: this signal selects which byte should be written during a valid access. DMEM_WEN[0] will activate a write on the lower byte, DMEM_WEN[1] a write on the upper byte. Note that these signals are LOW ACTIVE.
329
             <br /><br />
330
        </li>
331
        <li>
332
            <b><font color="#00b000">DMEM_DIN</font></b>: the memory input word will be written with the valid write access according to the <i>DMEM_WEN</i> value.
333
             <br /><br />
334
        </li>
335
</ul>
336
The following waveform illustrates some read/write access to the data memory:<br /><br />
337
<img src="getimg.php?1263320770" width="100%" alt="Waveforms: Data memory - Jan 12." title="Waveforms: Data memory - Jan 12." />
338
<br /><br />
339
 
340
<a name="6. Peripherals"></a>
341
<div style="text-align: right"><a href="#TOC">Top</a></div>
342
<h1>6. Peripherals</h1>
343
 
344
The protocol between the openMSP430 core and its peripherals is the exactly same as the one with the data and program memories in regards to write access and differs slightly for read access.<br />
345
<br />
346
On the connectivity side, the specificity is that the read data bus of all peripherals should be ORed together before being connected to the core, as showed in the diagram of the <a href="#1. Overview">Overview</a> section.<br />
347
From the logical point of view, during a read access, each peripheral outputs the combinatorial value of its read mux and returns 0 if it doesn't contain the addressed register. On the waveforms, this translates by seeing the register value on <i>PER_DOUT</i> while <i>PER_EN</i> is valid and not one clock cycle afterwards as it is the case with the program and data memories.<br />
348
In any case, it is recommended to use the templates provided with the core in order to develop your own custom peripherals.<br />
349
The signal description therefore goes as following:
350
<ul>
351
        <li><b><font color="#00b000">PER_EN</font></b>: when this signal is active, read access are executed during the current <i>MCLK</i> cycle while write access will be executed with the next <i>MCLK</i> rising edge. Note that this signal is HIGH ACTIVE.
352
             <br /><br />
353
        </li>
354
        <li>
355
            <b><font color="#00b000">PER_ADDR</font></b>: peripheral register address of the 16 bit word which is going to be accessed.<br />
356
            <b>Note:</b> in order to calculate the core logical address from the peripheral register physical address, the formula goes as following: <i>LOGICAL@=2*PHYSICAL@</i>
357
             <br /><br />
358
        </li>
359
        <li>
360
            <b><font color="#0000b0">PER_DOUT</font></b>: the peripheral output word will be updated with every valid read/write access, it will be set to 0 otherwise.
361
             <br /><br />
362
        </li>
363
        <li>
364
            <b><font color="#00b000">PER_WE</font></b>: this signal selects which byte should be written during a valid access. PER_WEN[0] will activate a write on the lower byte, PER_WEN[1] a write on the upper byte. Note that these signals are HIGH ACTIVE.
365
             <br /><br />
366
        </li>
367
        <li>
368
            <b><font color="#00b000">PER_DIN</font></b>: the peripheral input word will be written with the valid write access according to the <i>PER_WEN</i> value.
369
             <br /><br />
370
        </li>
371
</ul>
372
The following waveform illustrates some read/write access to the peripheral registers:<br /><br />
373
<img src="getimg.php?1263320825" width="100%" alt="Waveforms: Peripherals - Jan 12." title="Waveforms: Peripherals - Jan 12." />
374
<br /><br />
375
 
376
 
377
<a name="7. Interrupts"></a>
378
<div style="text-align: right"><a href="#TOC">Top</a></div>
379
<h1>7. Interrupts</h1>
380
 
381
As with the original MSP430, the interrupt priorities of the openMSP430 are fixed in hardware accordingly to the connectivity of the <i>NMI</i> and <i>IRQ</i> ports.<br />
382
If two interrupts are pending simultaneously, the higher priority interrupt will be serviced first.<br />
383
The following table summarize this:<br /><br />
384
<table border="1">
385
<tr>
386
   <td align="center"><b>&nbsp;&nbsp;Interrupt Port&nbsp;&nbsp;</b></td>
387
   <td align="center"><b>&nbsp;&nbsp;Vector address&nbsp;&nbsp;</b></td>
388
   <td align="center"><b>&nbsp;&nbsp;Priority&nbsp;&nbsp;</b></td>
389
</tr>
390
<tr>
391
   <td align="center">RESET_N</td>
392
   <td align="center">0xFFFE</td>
393
   <td align="center">15 (highest)</td>
394
</tr>
395
<tr>
396
   <td align="center">NMI</td>
397
   <td align="center">0xFFFC</td>
398
   <td align="center">14</td>
399
</tr>
400
<tr>
401
   <td align="center">IRQ[13]</td>
402
   <td align="center">0xFFFA</td>
403
   <td align="center">13</td>
404
</tr>
405
<tr>
406
   <td align="center">IRQ[12]</td>
407
   <td align="center">0xFFF8</td>
408
   <td align="center">12</td>
409
</tr>
410
<tr>
411
   <td align="center">IRQ[11]</td>
412
   <td align="center">0xFFF6</td>
413
   <td align="center">11</td>
414
</tr>
415
<tr>
416
   <td align="center">IRQ[10]</td>
417
   <td align="center">0xFFF4</td>
418
   <td align="center">10</td>
419
</tr>
420
<tr>
421
   <td align="center">IRQ[9]</td>
422
   <td align="center">0xFFF2</td>
423
   <td align="center">9</td>
424
</tr>
425
<tr>
426
   <td align="center">IRQ[8]</td>
427
   <td align="center">0xFFF0</td>
428
   <td align="center">8</td>
429
</tr>
430
<tr>
431
   <td align="center">IRQ[7]</td>
432
   <td align="center">0xFFEE</td>
433
   <td align="center">7</td>
434
</tr>
435
<tr>
436
   <td align="center">IRQ[6]</td>
437
   <td align="center">0xFFEC</td>
438
   <td align="center">6</td>
439
</tr>
440
<tr>
441
   <td align="center">IRQ[5]</td>
442
   <td align="center">0xFFEA</td>
443
   <td align="center">5</td>
444
</tr>
445
<tr>
446
   <td align="center">IRQ[4]</td>
447
   <td align="center">0xFFE8</td>
448
   <td align="center">4</td>
449
</tr>
450
<tr>
451
   <td align="center">IRQ[3]</td>
452
   <td align="center">0xFFE6</td>
453
   <td align="center">3</td>
454
</tr>
455
<tr>
456
   <td align="center">IRQ[2]</td>
457
   <td align="center">0xFFE4</td>
458
   <td align="center">2</td>
459
</tr>
460
<tr>
461
   <td align="center">IRQ[1]</td>
462
   <td align="center">0xFFE2</td>
463
   <td align="center">1</td>
464
</tr>
465
<tr>
466
   <td align="center">IRQ[0]</td>
467
   <td align="center">0xFFE0</td>
468
   <td align="center">0 (lowest)</td>
469
</tr>
470
</table>
471
<br /><br />
472
The signal description goes as following:
473
<ul>
474
        <li>
475
            <b><font color="#0000b0">NMI</font></b>: The <b>N</b>on-<b>M</b>askable <b>I</b>nterrupt has higher priority than other IRQs and is masked by the NMIIE bit instead of GIE.<br />
476
It is internally synchronized to the <i>MCLK</i> domain and can therefore be connected to any asynchronous signal of the chip (which could for example be a pin of the FPGA). If unused, this signal should be connected to 0.
477
            <br /><br />
478
        </li>
479
        <li>
480
            <b><font color="#0000b0">IRQ</font></b>: The standard interrupts can be connected to any signal coming from the <i>MCLK</i> domain (typically a peripheral). Priorities can be chosen by selecting the proper bit of the <i>IRQ</i> bus as shown in the table above. Unused interrupts should be connected to 0.<br />
481
<b>Note</b>: <i>IRQ[10]</i> is internally connected to the Watchdog interrupt. If this bit is also used by an external peripheral, they will both share the same interrupt vector.
482
            <br /><br />
483
        </li>
484
        <li>
485
            <b><font color="#00b000">IRQ_ACC</font></b>: Whenever an interrupt request is serviced, some peripheral automatically clear their pending flag in hardware. In order to do so, the <i>IRQ_ACC</i> bus can be used by using the bit matching the corresponding <i>IRQ</i> bit. An example of this is shown in the implementation of the TACCR0 Timer A interrupt.
486
            <br /><br />
487
        </li>
488
</ul>
489
The following waveform illustrates a TAIV interrupt issued by the Timer-A, which is connected to <i>IRQ[8]</i> :<br /><br />
490
<img src="getimg.php?1263320861" width="100%" alt="Waveforms: Interrupts - Jan 12. " title="Waveforms: Interrupts - Jan 12. " />
491
 
492
<br /><br />
493
 
494
 
495
<a name="8. Serial Debug Interface"></a>
496
<div style="text-align: right"><a href="#TOC">Top</a></div>
497
<h1>8. Serial Debug Interface</h1>
498
 
499
The serial debug interface module provides a two-wires communication bus for remote debugging and an additional freeze signal which might be useful for some peripherals.<br />
500
<br />
501
<ul>
502
        <li>
503
            <b><font color="#00b000">DBG_FREEZE</font></b>: this signal will be set whenever the debug interface stops the CPU (and if the <i>FRZ_BRK_EN</i> field of the <a href="http://www.opencores.org/project,openmsp430,serial%20debug%20interface#2.2.2%20CPU_CTL">CPU_CTL</a> debug register is set). As its name implies, the purpose of <i>DBG_FREEZE</i> is to freeze a peripheral whenever the CPU is stopped by the software debugger.<br />
504
For example, it is used by the Watchdog timer in order to stop its free-running counter. This prevents the CPU from being reseted by the watchdog every times the user stops the CPU during a debugging session.
505
            <br /><br />
506
        </li>
507
        <li>
508
            <b><font color="#00b000">DBG_UART_TXD</font>&nbsp;/&nbsp;<font color="#0000b0">DBG_UART_RXD</font></b>: these signals are typically connected to an RS-232 transceiver and will allow a PC to communicate with the openMSP430 core.
509
            <br /><br />
510
        </li>
511
</ul>
512
The following waveform shows some communication traffic on the serial bus :<br /><br />
513
<img src="getimg.php?1263320887" width="100%" alt="Waveforms: SDI - Jan 12. 2010" title="Waveforms: SDI - Jan 12. 2010" />
514
<br /><br />
515
</body>
516
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.