| 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 Serial Debug Interface</title>
|
| 5 |
|
|
</head>
|
| 6 |
|
|
<body>
|
| 7 |
|
|
<a name="TOC"></a>
|
| 8 |
|
|
<h3>Table of content</h3>
|
| 9 |
|
|
<ul>
|
| 10 |
|
|
<li><a href="#1. Introduction"> 1. Introduction</a></li>
|
| 11 |
|
|
<li><a href="#2. Debug Unit"> 2. Debug Unit</a>
|
| 12 |
|
|
<ul>
|
| 13 |
|
|
<li><a href="#2.1 Register Mapping"> 2.1 Register Mapping</a></li>
|
| 14 |
|
|
<li><a href="#2.2 CPU Control/Status Registers"> 2.2 CPU Control/Status Registers</a></li>
|
| 15 |
|
|
<ul>
|
| 16 |
|
|
<li><a href="#2.2.1 CPU_ID"> 2.2.1 CPU_ID</a></li>
|
| 17 |
|
|
<li><a href="#2.2.2 CPU_CTL"> 2.2.2 CPU_CTL</a></li>
|
| 18 |
|
|
<li><a href="#2.2.3 CPU_STAT"> 2.2.3 CPU_STAT</a></li>
|
| 19 |
|
|
</ul>
|
| 20 |
|
|
<li><a href="#2.3 Memory Access Registers"> 2.3 Memory Access Registers</a></li>
|
| 21 |
|
|
<ul>
|
| 22 |
|
|
<li><a href="#2.3.1 MEM_CTL"> 2.3.1 MEM_CTL</a></li>
|
| 23 |
|
|
<li><a href="#2.3.2 MEM_ADDR"> 2.3.2 MEM_ADDR</a></li>
|
| 24 |
|
|
<li><a href="#2.3.3 MEM_DATA"> 2.3.3 MEM_DATA</a></li>
|
| 25 |
|
|
<li><a href="#2.3.4 MEM_CNT"> 2.3.4 MEM_CNT</a></li>
|
| 26 |
|
|
</ul>
|
| 27 |
|
|
<li><a href="#2.4 Hardware Breakpoint Unit Registers">2.4 Hardware Breakpoint Unit Registers</a></li>
|
| 28 |
|
|
<ul>
|
| 29 |
|
|
<li><a href="#2.4.1 BRKx_CTL"> 2.4.1 BRKx_CTL</a></li>
|
| 30 |
|
|
<li><a href="#2.4.2 BRKx_STAT"> 2.4.2 BRKx_STAT</a></li>
|
| 31 |
|
|
<li><a href="#2.4.3 BRKx_ADDR0"> 2.4.3 BRKx_ADDR0</a></li>
|
| 32 |
|
|
<li><a href="#2.4.4 BRKx_ADDR1"> 2.4.4 BRKx_ADDR1</a></li>
|
| 33 |
|
|
</ul>
|
| 34 |
|
|
</ul>
|
| 35 |
|
|
</li>
|
| 36 |
|
|
<li><a href="#3. Debug Communication Interface: UART"> 3. Debug Communication Interface: UART</a>
|
| 37 |
|
|
<ul>
|
| 38 |
|
|
<li><a href="#3.1 Serial communication protocol: 8N1"> 3.1 Serial communication protocol: 8N1</a></li>
|
| 39 |
|
|
<li><a href="#3.2 Synchronization frame"> 3.2 Synchronization frame</a></li>
|
| 40 |
|
|
<li><a href="#3.3 Read/Write access to the debug registers"> 3.3 Read/Write access to the debug registers</a></li>
|
| 41 |
|
|
<ul>
|
| 42 |
|
|
<li><a href="#3.3.1 Command Frame"> 3.3.1 Command Frame</a></li>
|
| 43 |
|
|
<li><a href="#3.3.2 Write access"> 3.3.2 Write access</a></li>
|
| 44 |
|
|
<li><a href="#3.3.3 Read access"> 3.3.3 Read access</a></li>
|
| 45 |
|
|
</ul>
|
| 46 |
|
|
<li><a href="#3.4 Read/Write burst implementation for the CPU Memory access">3.4 Read/Write burst implementation for the CPU Memory access</a></li>
|
| 47 |
|
|
<ul>
|
| 48 |
|
|
<li><a href="#3.4.1 Write Burst access"> 3.4.1 Write Burst access</a></li>
|
| 49 |
|
|
<li><a href="#3.4.2 Read Burst access"> 3.4.2 Read Burst access</a></li>
|
| 50 |
|
|
</ul>
|
| 51 |
|
|
</ul>
|
| 52 |
|
|
</ul>
|
| 53 |
|
|
|
| 54 |
|
|
<a name="1. Introduction"></a>
|
| 55 |
|
|
<h1>1. Introduction</h1>
|
| 56 |
|
|
|
| 57 |
|
|
The original MSP430 from TI provides a serial debug interface to give a simple path to software development. In that case, the communication with the host computer is typically build on a JTAG or Spy-Bi-Wire serial protocol. However, the global debug architecture from the MSP430 is unfortunately poorly documented on the web (and is also probably tightly linked with the internal core architecture).
|
| 58 |
|
|
<br /><br />
|
| 59 |
|
|
A custom module has therefore been implemented for the openMSP430. The communication with the host is done with a simple RS232 cable (8N1 serial protocol) and the debug unit provides all the required features for Nexus Class 3 debugging (beside trace), namely:
|
| 60 |
|
|
<ul>
|
| 61 |
|
|
<li>CPU control (run, stop, step, reset).</li>
|
| 62 |
|
|
<li>Software & hardware breakpoint support.</li>
|
| 63 |
|
|
<li>Memory read/write on-the-fly (no need to halt execution).</li>
|
| 64 |
|
|
<li>CPU registers read/write on-the-fly (no need to halt execution).</li>
|
| 65 |
|
|
</ul>
|
| 66 |
|
|
|
| 67 |
|
|
<a name="2. Debug Unit"></a>
|
| 68 |
|
|
<div style="text-align: right"><a href="#TOC">Top</a></div>
|
| 69 |
|
|
<h1>2. Debug Unit</h1>
|
| 70 |
|
|
|
| 71 |
|
|
<a name="2.1 Register Mapping"></a>
|
| 72 |
|
|
<h2>2.1 Register Mapping</h2>
|
| 73 |
|
|
|
| 74 |
|
|
The following table summarize the complete debug register set accessible through the debug communication interface:
|
| 75 |
|
|
<br /><br />
|
| 76 |
|
|
<table border="1">
|
| 77 |
|
|
<tr align="center">
|
| 78 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 79 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 80 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 81 |
|
|
</tr>
|
| 82 |
|
|
<tr align="center">
|
| 83 |
|
|
<td><font size="-1">15</font></td><td><font size="-1">14</font></td>
|
| 84 |
|
|
<td><font size="-1">13</font></td><td><font size="-1">12</font></td>
|
| 85 |
|
|
<td><font size="-1">11</font></td><td><font size="-1">10</font></td>
|
| 86 |
|
|
<td><font size="-1"> 9</font></td><td><font size="-1"> 8</font></td>
|
| 87 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 88 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 89 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 90 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 91 |
|
|
</tr>
|
| 92 |
|
|
<tr align="center">
|
| 93 |
|
|
<td><font size="-1"><a href="#2.2.1 CPU_ID">CPU_ID_LO</a></font></td>
|
| 94 |
|
|
<td><font size="-1">0x00</font></td>
|
| 95 |
116 |
olivier.gi |
<td colspan="7"><font size="-5">PER_SPACE</font></td>
|
| 96 |
|
|
<td colspan="5"><font size="-5">USER_VERSION</font></td>
|
| 97 |
|
|
<td colspan="1"><font size="-5">ASIC</font></td>
|
| 98 |
|
|
<td colspan="3"><font size="-5">CPU_VERSION</font></td>
|
| 99 |
50 |
olivier.gi |
</tr>
|
| 100 |
|
|
<tr align="center">
|
| 101 |
|
|
<td><font size="-1"><a href="#2.2.1 CPU_ID">CPU_ID_HI</a></font></td>
|
| 102 |
|
|
<td><font size="-1">0x01</font></td>
|
| 103 |
116 |
olivier.gi |
<td colspan="6"><font size="-5">PMEM_SIZE</font></td>
|
| 104 |
|
|
<td colspan="9"><font size="-5">DMEM_SIZE</font></td>
|
| 105 |
|
|
<td colspan="1"><font size="-5">MPY</font></td>
|
| 106 |
50 |
olivier.gi |
</tr>
|
| 107 |
|
|
<tr align="center">
|
| 108 |
|
|
<td><font size="-1"><a href="#2.2.2 CPU_CTL">CPU_CTL</a></font></td>
|
| 109 |
|
|
<td><font size="-1">0x02</font></td>
|
| 110 |
|
|
<td colspan="9"><font size="-5">Reserved</font></td>
|
| 111 |
|
|
<td><font size="-5">CPU_RST</font></td>
|
| 112 |
|
|
<td><font size="-5">RST_BRK_EN</font></td>
|
| 113 |
|
|
<td><font size="-5">FRZ_BRK_EN</font></td>
|
| 114 |
|
|
<td><font size="-5">SW_BRK_EN</font></td>
|
| 115 |
|
|
<td><font size="-5">ISTEP</font></td>
|
| 116 |
|
|
<td><font size="-5">RUN</font></td>
|
| 117 |
|
|
<td><font size="-5">HALT</font></td>
|
| 118 |
|
|
</tr>
|
| 119 |
|
|
<tr align="center">
|
| 120 |
|
|
<td><font size="-1"><a href="#2.2.3 CPU_STAT">CPU_STAT</a></font></td>
|
| 121 |
|
|
<td><font size="-1">0x03</font></td>
|
| 122 |
|
|
<td colspan="8"><font size="-5">Reserved</font></td>
|
| 123 |
|
|
<td><font size="-5">HWBRK3_PND</font></td>
|
| 124 |
|
|
<td><font size="-5">HWBRK2_PND</font></td>
|
| 125 |
|
|
<td><font size="-5">HWBRK1_PND</font></td>
|
| 126 |
|
|
<td><font size="-5">HWBRK0_PND</font></td>
|
| 127 |
|
|
<td><font size="-5">SWBRK_PND</font></td>
|
| 128 |
|
|
<td><font size="-5">PUC_PND</font></td>
|
| 129 |
|
|
<td><font size="-5">Res.</font></td>
|
| 130 |
|
|
<td><font size="-5">HALT_RUN</font></td>
|
| 131 |
|
|
</tr>
|
| 132 |
|
|
<tr align="center">
|
| 133 |
|
|
<td><font size="-1"><a href="#2.3.1 MEM_CTL">MEM_CTL</a></font></td>
|
| 134 |
|
|
<td><font size="-1">0x04</font></td>
|
| 135 |
|
|
<td colspan="12"><font size="-5">Reserved</font></td>
|
| 136 |
|
|
<td><font size="-5">B/W</font></td>
|
| 137 |
|
|
<td><font size="-5">MEM/REG</font></td>
|
| 138 |
|
|
<td><font size="-5">RD/WR</font></td>
|
| 139 |
|
|
<td><font size="-5">START</font></td>
|
| 140 |
|
|
</tr>
|
| 141 |
|
|
<tr align="center">
|
| 142 |
|
|
<td><font size="-1"><a href="#2.3.2 MEM_ADDR">MEM_ADDR</a></font></td>
|
| 143 |
|
|
<td><font size="-1">0x05</font></td>
|
| 144 |
|
|
<td colspan="16"><font size="-5">MEM_ADDR[15:0]</font></td>
|
| 145 |
|
|
</tr>
|
| 146 |
|
|
<tr align="center">
|
| 147 |
|
|
<td><font size="-1"><a href="#2.3.3 MEM_DATA">MEM_DATA</a></font></td>
|
| 148 |
|
|
<td><font size="-1">0x06</font></td>
|
| 149 |
|
|
<td colspan="16"><font size="-5">MEM_DATA[15:0]</font></td>
|
| 150 |
|
|
</tr>
|
| 151 |
|
|
<tr align="center">
|
| 152 |
|
|
<td><font size="-1"><a href="#2.3.4 MEM_CNT">MEM_CNT</a></font></td>
|
| 153 |
|
|
<td><font size="-1">0x07</font></td>
|
| 154 |
|
|
<td colspan="16"><font size="-5">MEM_CNT[15:0]</font></td>
|
| 155 |
|
|
</tr>
|
| 156 |
|
|
<tr align="center">
|
| 157 |
|
|
<td><font size="-1"><a href="#2.4.1 BRKx_CTL">BRK0_CTL</a></font></td>
|
| 158 |
|
|
<td><font size="-1">0x08</font></td>
|
| 159 |
|
|
<td colspan="11"><font size="-5">Reserved</font></td>
|
| 160 |
|
|
<td><font size="-5">RANGE_MODE</font></td>
|
| 161 |
|
|
<td><font size="-5">INST_EN</font></td>
|
| 162 |
|
|
<td><font size="-5">BREAK_EN</font></td>
|
| 163 |
|
|
<td colspan="2"><font size="-5">ACCESS_MODE</font></td>
|
| 164 |
|
|
</tr>
|
| 165 |
|
|
<tr align="center">
|
| 166 |
|
|
<td><font size="-1"><a href="#2.4.2 BRKx_STAT">BRK0_STAT</a></font></td>
|
| 167 |
|
|
<td><font size="-1">0x09</font></td>
|
| 168 |
|
|
<td colspan="10"><font size="-5">Reserved</font></td>
|
| 169 |
|
|
<td><font size="-5">RANGE_WR</font></td>
|
| 170 |
|
|
<td><font size="-5">RANGE_RD</font></td>
|
| 171 |
|
|
<td><font size="-5">ADDR1_WR</font></td>
|
| 172 |
|
|
<td><font size="-5">ADDR1_RD</font></td>
|
| 173 |
|
|
<td><font size="-5">ADDR0_WR</font></td>
|
| 174 |
|
|
<td><font size="-5">ADDR0_RD</font></td>
|
| 175 |
|
|
</tr>
|
| 176 |
|
|
<tr align="center">
|
| 177 |
|
|
<td><font size="-1"><a href="#2.4.3 BRKx_ADDR0">BRK0_ADDR0</a></font></td>
|
| 178 |
|
|
<td><font size="-1">0x0A</font></td>
|
| 179 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR0[15:0]</font></td>
|
| 180 |
|
|
</tr>
|
| 181 |
|
|
<tr align="center">
|
| 182 |
|
|
<td><font size="-1"><a href="#2.4.4 BRKx_ADDR1">BRK0_ADDR1</a></font></td>
|
| 183 |
|
|
<td><font size="-1">0x0B</font></td>
|
| 184 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR1[15:0]</font></td>
|
| 185 |
|
|
</tr>
|
| 186 |
|
|
<tr align="center">
|
| 187 |
|
|
<td><font size="-1"><a href="#2.4.1 BRKx_CTL">BRK1_CTL</a></font></td>
|
| 188 |
|
|
<td><font size="-1">0x0C</font></td>
|
| 189 |
|
|
<td colspan="11"><font size="-5">Reserved</font></td>
|
| 190 |
|
|
<td><font size="-5">RANGE_MODE</font></td>
|
| 191 |
|
|
<td><font size="-5">INST_EN</font></td>
|
| 192 |
|
|
<td><font size="-5">BREAK_EN</font></td>
|
| 193 |
|
|
<td colspan="2"><font size="-5">ACCESS_MODE</font></td>
|
| 194 |
|
|
</tr>
|
| 195 |
|
|
<tr align="center">
|
| 196 |
|
|
<td><font size="-1"><a href="#2.4.2 BRKx_STAT">BRK1_STAT</a></font></td>
|
| 197 |
|
|
<td><font size="-1">0x0D</font></td>
|
| 198 |
|
|
<td colspan="10"><font size="-5">Reserved</font></td>
|
| 199 |
|
|
<td><font size="-5">RANGE_WR</font></td>
|
| 200 |
|
|
<td><font size="-5">RANGE_RD</font></td>
|
| 201 |
|
|
<td><font size="-5">ADDR1_WR</font></td>
|
| 202 |
|
|
<td><font size="-5">ADDR1_RD</font></td>
|
| 203 |
|
|
<td><font size="-5">ADDR0_WR</font></td>
|
| 204 |
|
|
<td><font size="-5">ADDR0_RD</font></td>
|
| 205 |
|
|
</tr>
|
| 206 |
|
|
<tr align="center">
|
| 207 |
|
|
<td><font size="-1"><a href="#2.4.3 BRKx_ADDR0">BRK1_ADDR0</a></font></td>
|
| 208 |
|
|
<td><font size="-1">0x0E</font></td>
|
| 209 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR0[15:0]</font></td>
|
| 210 |
|
|
</tr>
|
| 211 |
|
|
<tr align="center">
|
| 212 |
|
|
<td><font size="-1"><a href="#2.4.4 BRKx_ADDR1">BRK1_ADDR1</a></font></td>
|
| 213 |
|
|
<td><font size="-1">0x0F</font></td>
|
| 214 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR1[15:0]</font></td>
|
| 215 |
|
|
</tr>
|
| 216 |
|
|
<tr align="center">
|
| 217 |
|
|
<td><font size="-1"><a href="#2.4.1 BRKx_CTL">BRK2_CTL</a></font></td>
|
| 218 |
|
|
<td><font size="-1">0x10</font></td>
|
| 219 |
|
|
<td colspan="11"><font size="-5">Reserved</font></td>
|
| 220 |
|
|
<td><font size="-5">RANGE_MODE</font></td>
|
| 221 |
|
|
<td><font size="-5">INST_EN</font></td>
|
| 222 |
|
|
<td><font size="-5">BREAK_EN</font></td>
|
| 223 |
|
|
<td colspan="2"><font size="-5">ACCESS_MODE</font></td>
|
| 224 |
|
|
</tr>
|
| 225 |
|
|
<tr align="center">
|
| 226 |
|
|
<td><font size="-1"><a href="#2.4.2 BRKx_STAT">BRK2_STAT</a></font></td>
|
| 227 |
|
|
<td><font size="-1">0x11</font></td>
|
| 228 |
|
|
<td colspan="10"><font size="-5">Reserved</font></td>
|
| 229 |
|
|
<td><font size="-5">RANGE_WR</font></td>
|
| 230 |
|
|
<td><font size="-5">RANGE_RD</font></td>
|
| 231 |
|
|
<td><font size="-5">ADDR1_WR</font></td>
|
| 232 |
|
|
<td><font size="-5">ADDR1_RD</font></td>
|
| 233 |
|
|
<td><font size="-5">ADDR0_WR</font></td>
|
| 234 |
|
|
<td><font size="-5">ADDR0_RD</font></td>
|
| 235 |
|
|
</tr>
|
| 236 |
|
|
<tr align="center">
|
| 237 |
|
|
<td><font size="-1"><a href="#2.4.3 BRKx_ADDR0">BRK2_ADDR0</a></font></td>
|
| 238 |
|
|
<td><font size="-1">0x12</font></td>
|
| 239 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR0[15:0]</font></td>
|
| 240 |
|
|
</tr>
|
| 241 |
|
|
<tr align="center">
|
| 242 |
|
|
<td><font size="-1"><a href="#2.4.4 BRKx_ADDR1">BRK2_ADDR1</a></font></td>
|
| 243 |
|
|
<td><font size="-1">0x13</font></td>
|
| 244 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR1[15:0]</font></td>
|
| 245 |
|
|
</tr>
|
| 246 |
|
|
<tr align="center">
|
| 247 |
|
|
<td><font size="-1"><a href="#2.4.1 BRKx_CTL">BRK3_CTL</a></font></td>
|
| 248 |
|
|
<td><font size="-1">0x14</font></td>
|
| 249 |
|
|
<td colspan="11"><font size="-5">Reserved</font></td>
|
| 250 |
|
|
<td><font size="-5">RANGE_MODE</font></td>
|
| 251 |
|
|
<td><font size="-5">INST_EN</font></td>
|
| 252 |
|
|
<td><font size="-5">BREAK_EN</font></td>
|
| 253 |
|
|
<td colspan="2"><font size="-5">ACCESS_MODE</font></td>
|
| 254 |
|
|
</tr>
|
| 255 |
|
|
<tr align="center">
|
| 256 |
|
|
<td><font size="-1"><a href="#2.4.2 BRKx_STAT">BRK3_STAT</a></font></td>
|
| 257 |
|
|
<td><font size="-1">0x15</font></td>
|
| 258 |
|
|
<td colspan="10"><font size="-5">Reserved</font></td>
|
| 259 |
|
|
<td><font size="-5">RANGE_WR</font></td>
|
| 260 |
|
|
<td><font size="-5">RANGE_RD</font></td>
|
| 261 |
|
|
<td><font size="-5">ADDR1_WR</font></td>
|
| 262 |
|
|
<td><font size="-5">ADDR1_RD</font></td>
|
| 263 |
|
|
<td><font size="-5">ADDR0_WR</font></td>
|
| 264 |
|
|
<td><font size="-5">ADDR0_RD</font></td>
|
| 265 |
|
|
</tr>
|
| 266 |
|
|
<tr align="center">
|
| 267 |
|
|
<td><font size="-1"><a href="#2.4.3 BRKx_ADDR0">BRK3_ADDR0</a></font></td>
|
| 268 |
|
|
<td><font size="-1">0x16</font></td>
|
| 269 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR0[15:0]</font></td>
|
| 270 |
|
|
</tr>
|
| 271 |
|
|
<tr align="center">
|
| 272 |
|
|
<td><font size="-1"><a href="#2.4.4 BRKx_ADDR1">BRK3_ADDR1</a></font></td>
|
| 273 |
|
|
<td><font size="-1">0x17</font></td>
|
| 274 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR1[15:0]</font></td>
|
| 275 |
|
|
</tr>
|
| 276 |
|
|
</table>
|
| 277 |
|
|
|
| 278 |
|
|
<a name="2.2 CPU Control/Status Registers"></a>
|
| 279 |
|
|
<div style="text-align: right"><a href="#TOC">Top</a></div>
|
| 280 |
|
|
<h2>2.2 CPU Control/Status Registers</h2>
|
| 281 |
|
|
|
| 282 |
|
|
<a name="2.2.1 CPU_ID"></a>
|
| 283 |
|
|
<h3>2.2.1 CPU_ID</h3>
|
| 284 |
74 |
olivier.gi |
This 32 bit read-only register holds the program and data memory size information of the implemented openMSP430.
|
| 285 |
50 |
olivier.gi |
<br /><br />
|
| 286 |
|
|
<table border="1">
|
| 287 |
|
|
<tr align="center">
|
| 288 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 289 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 290 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 291 |
|
|
</tr>
|
| 292 |
|
|
<tr align="center">
|
| 293 |
|
|
<td><font size="-1">15</font></td><td><font size="-1">14</font></td>
|
| 294 |
|
|
<td><font size="-1">13</font></td><td><font size="-1">12</font></td>
|
| 295 |
|
|
<td><font size="-1">11</font></td><td><font size="-1">10</font></td>
|
| 296 |
|
|
<td><font size="-1"> 9</font></td><td><font size="-1"> 8</font></td>
|
| 297 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 298 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 299 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 300 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 301 |
|
|
</tr>
|
| 302 |
|
|
<tr align="center">
|
| 303 |
|
|
<td><font size="-1">CPU_ID_LO</font></td>
|
| 304 |
|
|
<td><font size="-1">0x00</font></td>
|
| 305 |
116 |
olivier.gi |
<td colspan="7"><font size="-5">PER_SPACE</font></td>
|
| 306 |
|
|
<td colspan="5"><font size="-5">USER_VERSION</font></td>
|
| 307 |
|
|
<td colspan="1"><font size="-5">ASIC</font></td>
|
| 308 |
|
|
<td colspan="3"><font size="-5">CPU_VERSION</font></td>
|
| 309 |
50 |
olivier.gi |
</tr>
|
| 310 |
|
|
<tr align="center">
|
| 311 |
|
|
<td><font size="-1">CPU_ID_HI</font></td>
|
| 312 |
|
|
<td><font size="-1">0x01</font></td>
|
| 313 |
116 |
olivier.gi |
<td colspan="6"><font size="-5">PMEM_SIZE</font></td>
|
| 314 |
|
|
<td colspan="9"><font size="-5">DMEM_SIZE</font></td>
|
| 315 |
|
|
<td colspan="1"><font size="-5">MPY</font></td>
|
| 316 |
50 |
olivier.gi |
</tr>
|
| 317 |
|
|
</table>
|
| 318 |
|
|
<br />
|
| 319 |
|
|
<table border="0">
|
| 320 |
|
|
<tr>
|
| 321 |
116 |
olivier.gi |
<td> </td><td valign="top"><li><b>CPU_VERSION</b></li></td>
|
| 322 |
|
|
<td>: Current CPU version (currently 1)</td>
|
| 323 |
50 |
olivier.gi |
</tr>
|
| 324 |
|
|
<tr>
|
| 325 |
116 |
olivier.gi |
<td> </td><td valign="top"><li><b>ASIC</b></li></td>
|
| 326 |
|
|
<td>: Defines if the ASIC specific features are enabled in the current openMSP430 implementation.</td>
|
| 327 |
50 |
olivier.gi |
</tr>
|
| 328 |
116 |
olivier.gi |
<tr>
|
| 329 |
|
|
<td> </td><td valign="top"><li><b>USER_VERSION</b></li></td>
|
| 330 |
|
|
<td>: Reflects the value defined in the <b>openMSP430_defines.v</b> file.</td>
|
| 331 |
|
|
</tr>
|
| 332 |
|
|
<tr>
|
| 333 |
|
|
<td> </td><td valign="top"><li><b>PER_SPACE</b></li></td>
|
| 334 |
|
|
<td>: Peripheral address space for the current implementation (byte size = PER_SPACE*512)</td>
|
| 335 |
|
|
</tr>
|
| 336 |
|
|
<tr>
|
| 337 |
|
|
<td> </td><td valign="top"><li><b>MPY</b></li></td>
|
| 338 |
|
|
<td>: This bit is set if the hardware multiplier is included in the current implementation</td>
|
| 339 |
|
|
</tr>
|
| 340 |
|
|
<tr>
|
| 341 |
|
|
<td> </td><td valign="top"><li><b>DMEM_SIZE</b></li></td>
|
| 342 |
|
|
<td>: Data memory size for the current implementation (byte size = DMEM_SIZE*128)</td>
|
| 343 |
|
|
</tr>
|
| 344 |
|
|
<tr>
|
| 345 |
|
|
<td> </td><td valign="top"><li><b>PMEM_SIZE</b></li></td>
|
| 346 |
|
|
<td>: Progam memory size for the current implementation (byte size = PMEM_SIZE*1024)</td>
|
| 347 |
|
|
</tr>
|
| 348 |
50 |
olivier.gi |
</table>
|
| 349 |
|
|
|
| 350 |
|
|
<a name="2.2.2 CPU_CTL"></a>
|
| 351 |
|
|
<h3>2.2.2 CPU_CTL</h3>
|
| 352 |
|
|
|
| 353 |
|
|
This 8 bit read-write register is used to control the CPU and to configure some basic debug features. After a POR, this register is set to 0x00.
|
| 354 |
|
|
<br /><br />
|
| 355 |
|
|
<table border="1">
|
| 356 |
|
|
<tr align="center">
|
| 357 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 358 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 359 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 360 |
|
|
</tr>
|
| 361 |
|
|
<tr align="center">
|
| 362 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 363 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 364 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 365 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 366 |
|
|
</tr>
|
| 367 |
|
|
<tr align="center">
|
| 368 |
|
|
<td><font size="-1">CPU_CTL</font></td>
|
| 369 |
|
|
<td><font size="-1">0x02</font></td>
|
| 370 |
|
|
<td><font size="-5">Res.</font></td>
|
| 371 |
|
|
<td><font size="-5">CPU_RST</font></td>
|
| 372 |
|
|
<td><font size="-5">RST_BRK_EN</font></td>
|
| 373 |
|
|
<td><font size="-5">FRZ_BRK_EN</font></td>
|
| 374 |
|
|
<td><font size="-5">SW_BRK_EN</font></td>
|
| 375 |
|
|
<td><font size="-5">ISTEP</font></td>
|
| 376 |
|
|
<td><font size="-5">RUN</font></td>
|
| 377 |
|
|
<td><font size="-5">HALT</font></td>
|
| 378 |
|
|
</tr>
|
| 379 |
|
|
</table>
|
| 380 |
|
|
<br />
|
| 381 |
|
|
<table border="0">
|
| 382 |
|
|
<tr>
|
| 383 |
|
|
<td> </td><td valign="top"><li><b>CPU_RST</b></li></td>
|
| 384 |
|
|
<td>: Setting this bit to 1 will activate the PUC reset. Setting it back to 0 will release it.</td>
|
| 385 |
|
|
</tr>
|
| 386 |
|
|
<tr>
|
| 387 |
|
|
<td> </td><td valign="top"><li><b>RST_BRK_EN</b></li></td>
|
| 388 |
|
|
<td>: If set to 1, the CPU will automatically break after a PUC occurrence.</td>
|
| 389 |
|
|
</tr>
|
| 390 |
|
|
<tr>
|
| 391 |
|
|
<td> </td><td valign="top"><li><b>FRZ_BRK_EN</b></li></td>
|
| 392 |
|
|
<td>: If set to 1, the timers and watchdog are frozen when the CPU is halted.</td>
|
| 393 |
|
|
</tr>
|
| 394 |
|
|
<tr>
|
| 395 |
|
|
<td> </td><td valign="top"><li><b>SW_BRK_EN</b></li></td>
|
| 396 |
|
|
<td>: Enables the software breakpoint detection.</td>
|
| 397 |
|
|
</tr>
|
| 398 |
|
|
<tr>
|
| 399 |
|
|
<td> </td><td valign="top"><li><b>ISTEP</b><sup>1</sup></li></td>
|
| 400 |
|
|
<td>: Writing 1 to this bit will perform a single instruction step if the CPU is halted.</td>
|
| 401 |
|
|
</tr>
|
| 402 |
|
|
<tr>
|
| 403 |
|
|
<td> </td><td valign="top"><li><b>RUN</b><sup>1</sup></li></td>
|
| 404 |
|
|
<td>: Writing 1 to this bit will get the CPU out of halt state.</td>
|
| 405 |
|
|
</tr>
|
| 406 |
|
|
<tr>
|
| 407 |
|
|
<td> </td><td valign="top"><li><b>HALT</b><sup>1</sup></li></td>
|
| 408 |
|
|
<td>: Writing 1 to this bit will put the CPU in halt state.</td>
|
| 409 |
|
|
</tr>
|
| 410 |
|
|
</table>
|
| 411 |
|
|
<br /><sup>1</sup>:this field is write-only and always reads back 0.
|
| 412 |
|
|
<br />
|
| 413 |
|
|
<a name="2.2.3 CPU_STAT"></a>
|
| 414 |
|
|
<h3>2.2.3 CPU_STAT</h3>
|
| 415 |
|
|
|
| 416 |
|
|
This 8 bit read-write register gives the global status of the debug interface. After a POR, this register is set to 0x00.
|
| 417 |
|
|
<br /><br />
|
| 418 |
|
|
<table border="1">
|
| 419 |
|
|
<tr align="center">
|
| 420 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 421 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 422 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 423 |
|
|
</tr>
|
| 424 |
|
|
<tr align="center">
|
| 425 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 426 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 427 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 428 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 429 |
|
|
</tr>
|
| 430 |
|
|
<tr align="center">
|
| 431 |
|
|
<td><font size="-1">CPU_STAT</font></td>
|
| 432 |
|
|
<td><font size="-1">0x03</font></td>
|
| 433 |
|
|
<td><font size="-5">HWBRK3_PND</font></td>
|
| 434 |
|
|
<td><font size="-5">HWBRK2_PND</font></td>
|
| 435 |
|
|
<td><font size="-5">HWBRK1_PND</font></td>
|
| 436 |
|
|
<td><font size="-5">HWBRK0_PND</font></td>
|
| 437 |
|
|
<td><font size="-5">SWBRK_PND</font></td>
|
| 438 |
|
|
<td><font size="-5">PUC_PND</font></td>
|
| 439 |
|
|
<td><font size="-5">Res.</font></td>
|
| 440 |
|
|
<td><font size="-5">HALT_RUN</font></td>
|
| 441 |
|
|
</tr>
|
| 442 |
|
|
</table>
|
| 443 |
|
|
<br />
|
| 444 |
|
|
<table border="0">
|
| 445 |
|
|
<tr>
|
| 446 |
|
|
<td> </td><td valign="top"><li><b>HWBRK3_PND</b></li></td>
|
| 447 |
|
|
<td>: This bit reflects if one of the Hardware Breakpoint Unit 3 status bit is set (i.e. BRK3_STAT≠0).</td>
|
| 448 |
|
|
</tr>
|
| 449 |
|
|
<tr>
|
| 450 |
|
|
<td> </td><td valign="top"><li><b>HWBRK2_PND</b></li></td>
|
| 451 |
|
|
<td>: This bit reflects if one of the Hardware Breakpoint Unit 2 status bit is set (i.e. BRK2_STAT≠0).</td>
|
| 452 |
|
|
</tr>
|
| 453 |
|
|
<tr>
|
| 454 |
|
|
<td> </td><td valign="top"><li><b>HWBRK1_PND</b></li></td>
|
| 455 |
|
|
<td>: This bit reflects if one of the Hardware Breakpoint Unit 1 status bit is set (i.e. BRK1_STAT≠0).</td>
|
| 456 |
|
|
</tr>
|
| 457 |
|
|
<tr>
|
| 458 |
|
|
<td> </td><td valign="top"><li><b>HWBRK0_PND</b></li></td>
|
| 459 |
|
|
<td>: This bit reflects if one of the Hardware Breakpoint Unit 0 status bit is set (i.e. BRK0_STAT≠0).</td>
|
| 460 |
|
|
</tr>
|
| 461 |
|
|
<tr>
|
| 462 |
|
|
<td> </td><td valign="top"><li><b>SWBRK_PND</b></li></td>
|
| 463 |
|
|
<td>: This bit is set to 1 when a software breakpoint occurred. It can be cleared by writing 1 to it.</td>
|
| 464 |
|
|
</tr>
|
| 465 |
|
|
<tr>
|
| 466 |
|
|
<td> </td><td valign="top"><li><b>PUC_PND</b></li></td>
|
| 467 |
|
|
<td>: This bit is set to 1 when a PUC reset occured. It can be cleared by writing 1 to it.</td>
|
| 468 |
|
|
</tr>
|
| 469 |
|
|
<tr>
|
| 470 |
|
|
<td> </td><td valign="top"><li><b>HALT_RUN</b></li></td>
|
| 471 |
|
|
<td>: This read-only bit gives the current status of the CPU:
|
| 472 |
|
|
</td>
|
| 473 |
|
|
</tr>
|
| 474 |
|
|
<tr>
|
| 475 |
|
|
<td> </td><td> </td>
|
| 476 |
|
|
<td> 0 - CPU is running.
|
| 477 |
|
|
<br /> 1 - CPU is stopped.
|
| 478 |
|
|
</td>
|
| 479 |
|
|
</tr>
|
| 480 |
|
|
</table>
|
| 481 |
|
|
|
| 482 |
|
|
<a name="2.3 Memory Access Registers"></a>
|
| 483 |
|
|
<div style="text-align: right"><a href="#TOC">Top</a></div>
|
| 484 |
|
|
<h2>2.3 Memory Access Registers</h2>
|
| 485 |
|
|
|
| 486 |
|
|
The following four registers enable single and burst read/write access to both CPU-Registers and full memory address range.
|
| 487 |
|
|
<br />In order to perform an access, the following sequences are typically done:
|
| 488 |
|
|
<ul>
|
| 489 |
|
|
<li>single read access (MEM_CNT=0):</li>
|
| 490 |
|
|
<ol>
|
| 491 |
|
|
<li>set MEM_ADDR with the memory address (or register number) to be read</li>
|
| 492 |
|
|
<li>set MEM_CTL (in particular RD/WR=0 and START=1)</li>
|
| 493 |
|
|
<li>read MEM_DATA</li>
|
| 494 |
|
|
</ol>
|
| 495 |
|
|
<li>single write access (MEM_CNT=0):</li>
|
| 496 |
|
|
<ol>
|
| 497 |
|
|
<li>set MEM_ADDR with the memory address (or register number) to be written</li>
|
| 498 |
|
|
<li>set MEM_DATA with the data to be written</li>
|
| 499 |
|
|
<li>set MEM_CTL (in particular RD/WR=1 and START=1)</li>
|
| 500 |
|
|
</ol>
|
| 501 |
|
|
<li>burst read/write access (MEM_CNT≠0):</li>
|
| 502 |
|
|
<ul>
|
| 503 |
|
|
<li>burst access are optimized for the communication interface used (i.e. for the UART).
|
| 504 |
|
|
The burst sequence are therefore described in the corresponding section (<a href="#3.4 Read/Write burst implementation for the CPU Memory access">3.4 Read/Write burst implementation for the CPU Memory access</a>)</li>
|
| 505 |
|
|
</ul>
|
| 506 |
|
|
</ul>
|
| 507 |
|
|
<a name="2.3.1 MEM_CTL"></a>
|
| 508 |
|
|
<h3>2.3.1 MEM_CTL</h3>
|
| 509 |
|
|
|
| 510 |
|
|
This 8 bit read-write register is used to control the Memory and CPU-Register read/write access. After a POR, this register is set to 0x00.
|
| 511 |
|
|
<br /><br />
|
| 512 |
|
|
<table border="1">
|
| 513 |
|
|
<tr align="center">
|
| 514 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 515 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 516 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 517 |
|
|
</tr>
|
| 518 |
|
|
<tr align="center">
|
| 519 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 520 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 521 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 522 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 523 |
|
|
</tr>
|
| 524 |
|
|
<tr align="center">
|
| 525 |
|
|
<td><font size="-1">MEM_CTL</font></td>
|
| 526 |
|
|
<td><font size="-1">0x04</font></td>
|
| 527 |
|
|
<td colspan="4"><font size="-5">Reserved</font></td>
|
| 528 |
|
|
<td><font size="-5">B/W</font></td>
|
| 529 |
|
|
<td><font size="-5">MEM/REG</font></td>
|
| 530 |
|
|
<td><font size="-5">RD/WR</font></td>
|
| 531 |
|
|
<td><font size="-5">START</font></td>
|
| 532 |
|
|
</tr>
|
| 533 |
|
|
</table>
|
| 534 |
|
|
<br />
|
| 535 |
|
|
<table border="0">
|
| 536 |
|
|
<tr>
|
| 537 |
|
|
<td> </td><td valign="top"><li><b>B/W</b></li></td>
|
| 538 |
|
|
<td>: 0 - 16 bit access.</td>
|
| 539 |
|
|
</tr>
|
| 540 |
|
|
<tr>
|
| 541 |
|
|
<td> </td><td> </td>
|
| 542 |
|
|
<td> 1 - 8 bit access (not valid for CPU-Registers).</td>
|
| 543 |
|
|
</tr>
|
| 544 |
|
|
<tr>
|
| 545 |
|
|
<td> </td><td valign="top"><li><b>MEM/REG</b></li></td>
|
| 546 |
|
|
<td>: 0 - Memory access.</td>
|
| 547 |
|
|
</tr>
|
| 548 |
|
|
<tr>
|
| 549 |
|
|
<td> </td><td> </td>
|
| 550 |
|
|
<td> 1 - CPU-Register access.</td>
|
| 551 |
|
|
</tr>
|
| 552 |
|
|
<tr>
|
| 553 |
|
|
<td> </td><td valign="top"><li><b>RD/WR</b></li></td>
|
| 554 |
|
|
<td>: 0 - Read access.</td>
|
| 555 |
|
|
</tr>
|
| 556 |
|
|
<tr>
|
| 557 |
|
|
<td> </td><td> </td>
|
| 558 |
|
|
<td> 1 - Write access.</td>
|
| 559 |
|
|
</tr>
|
| 560 |
|
|
<tr>
|
| 561 |
|
|
<td> </td><td valign="top"><li><b>START</b></li></td>
|
| 562 |
|
|
<td>: 0- Do nothing</td>
|
| 563 |
|
|
</tr>
|
| 564 |
|
|
<tr>
|
| 565 |
|
|
<td> </td><td> </td>
|
| 566 |
|
|
<td> 1 - Initiate memory transfer.</td>
|
| 567 |
|
|
</tr>
|
| 568 |
|
|
</table>
|
| 569 |
|
|
|
| 570 |
|
|
<a name="2.3.2 MEM_ADDR"></a>
|
| 571 |
|
|
<h3>2.3.2 MEM_ADDR</h3>
|
| 572 |
|
|
|
| 573 |
|
|
This 16 bit read-write register specifies the Memory or CPU-Register address to be used for the next read/write transfer. After a POR, this register is set to 0x0000.
|
| 574 |
|
|
<br />
|
| 575 |
|
|
<strong>Note:</strong> in case of burst (i.e. MEM_CNT≠0), this register specifies the first address of the burst transfer and will be incremented automatically as the burst goes (by 1 for 8-bit access and by 2 for 16-bit access).
|
| 576 |
|
|
<br /><br />
|
| 577 |
|
|
<table border="1">
|
| 578 |
|
|
<tr align="center">
|
| 579 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 580 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 581 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 582 |
|
|
</tr>
|
| 583 |
|
|
<tr align="center">
|
| 584 |
|
|
<td><font size="-1">15</font></td><td><font size="-1">14</font></td>
|
| 585 |
|
|
<td><font size="-1">13</font></td><td><font size="-1">12</font></td>
|
| 586 |
|
|
<td><font size="-1">11</font></td><td><font size="-1">10</font></td>
|
| 587 |
|
|
<td><font size="-1"> 9</font></td><td><font size="-1"> 8</font></td>
|
| 588 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 589 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 590 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 591 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 592 |
|
|
</tr>
|
| 593 |
|
|
<tr align="center">
|
| 594 |
|
|
<td><font size="-1">MEM_ADDR</font></td>
|
| 595 |
|
|
<td><font size="-1">0x05</font></td>
|
| 596 |
|
|
<td colspan="16"><font size="-5">MEM_ADDR[15:0]</font></td>
|
| 597 |
|
|
</tr>
|
| 598 |
|
|
</table>
|
| 599 |
|
|
<br />
|
| 600 |
|
|
<table border="0">
|
| 601 |
|
|
<tr>
|
| 602 |
|
|
<td> </td><td valign="top"><li><b>MEM_ADDR</b></li></td>
|
| 603 |
|
|
<td>: Memory or CPU-Register address to be used for the next read/write transfer.</td>
|
| 604 |
|
|
</tr>
|
| 605 |
|
|
</table>
|
| 606 |
|
|
|
| 607 |
|
|
<a name="2.3.3 MEM_DATA"></a>
|
| 608 |
|
|
<h3>2.3.3 MEM_DATA</h3>
|
| 609 |
|
|
|
| 610 |
|
|
This 16 bit read-write register specifies (wr) or receive (rd) the Memory or CPU-Register data for the the next transfer. After a POR, this register is set to 0x0000.
|
| 611 |
|
|
<br /><br />
|
| 612 |
|
|
<table border="1">
|
| 613 |
|
|
<tr align="center">
|
| 614 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 615 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 616 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 617 |
|
|
</tr>
|
| 618 |
|
|
<tr align="center">
|
| 619 |
|
|
<td><font size="-1">15</font></td><td><font size="-1">14</font></td>
|
| 620 |
|
|
<td><font size="-1">13</font></td><td><font size="-1">12</font></td>
|
| 621 |
|
|
<td><font size="-1">11</font></td><td><font size="-1">10</font></td>
|
| 622 |
|
|
<td><font size="-1"> 9</font></td><td><font size="-1"> 8</font></td>
|
| 623 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 624 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 625 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 626 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 627 |
|
|
</tr>
|
| 628 |
|
|
<tr align="center">
|
| 629 |
|
|
<td><font size="-1">MEM_DATA</font></td>
|
| 630 |
|
|
<td><font size="-1">0x06</font></td>
|
| 631 |
|
|
<td colspan="16"><font size="-5">MEM_DATA[15:0]</font></td>
|
| 632 |
|
|
</tr>
|
| 633 |
|
|
</table>
|
| 634 |
|
|
<br />
|
| 635 |
|
|
<table border="0">
|
| 636 |
|
|
<tr>
|
| 637 |
|
|
<td> </td><td valign="top"><li><b>MEM_DATA</b></li></td>
|
| 638 |
|
|
<td>: if MEM_CTL.WR - data to be written during the next write transfer.</td>
|
| 639 |
|
|
</tr>
|
| 640 |
|
|
<tr>
|
| 641 |
|
|
<td> </td><td> </td>
|
| 642 |
|
|
<td> if MEM_CTL.RD - updated with the data from the read transfer</td>
|
| 643 |
|
|
</tr>
|
| 644 |
|
|
</table>
|
| 645 |
|
|
|
| 646 |
|
|
<a name="2.3.4 MEM_CNT"></a>
|
| 647 |
|
|
<h3>2.3.4 MEM_CNT</h3>
|
| 648 |
|
|
|
| 649 |
|
|
This 16 bit read-write register controls the burst access to the Memory or CPU-Registers. If set to 0, a single access will occur, otherwise, a burst will be performed. The burst being optimized for the communication interface, more details are given <a href="#3.4 Read/Write burst implementation for the CPU Memory access">there</a>. After a POR, this register is set to 0x0000.
|
| 650 |
|
|
<br /><br />
|
| 651 |
|
|
<table border="1">
|
| 652 |
|
|
<tr align="center">
|
| 653 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 654 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 655 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 656 |
|
|
</tr>
|
| 657 |
|
|
<tr align="center">
|
| 658 |
|
|
<td><font size="-1">15</font></td><td><font size="-1">14</font></td>
|
| 659 |
|
|
<td><font size="-1">13</font></td><td><font size="-1">12</font></td>
|
| 660 |
|
|
<td><font size="-1">11</font></td><td><font size="-1">10</font></td>
|
| 661 |
|
|
<td><font size="-1"> 9</font></td><td><font size="-1"> 8</font></td>
|
| 662 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 663 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 664 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 665 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 666 |
|
|
</tr>
|
| 667 |
|
|
<tr align="center">
|
| 668 |
|
|
<td><font size="-1">MEM_CNT</font></td>
|
| 669 |
|
|
<td><font size="-1">0x07</font></td>
|
| 670 |
|
|
<td colspan="16"><font size="-5">MEM_CNT[15:0]</font></td>
|
| 671 |
|
|
</tr>
|
| 672 |
|
|
</table>
|
| 673 |
|
|
<br />
|
| 674 |
|
|
<table border="0">
|
| 675 |
|
|
<tr>
|
| 676 |
|
|
<td> </td><td valign="top"><li><b>MEM_CNT</b></li></td>
|
| 677 |
|
|
<td>: =0 - a single access will be performed with the next transfer.</td>
|
| 678 |
|
|
</tr>
|
| 679 |
|
|
<tr>
|
| 680 |
|
|
<td> </td><td> </td>
|
| 681 |
|
|
<td> ≠0 - specifies the burst size for the next transfer (i.e number of data access). This field will be automatically decremented as the burst goes.</td>
|
| 682 |
|
|
</tr>
|
| 683 |
|
|
</table>
|
| 684 |
|
|
|
| 685 |
|
|
<a name="2.4 Hardware Breakpoint Unit Registers"></a>
|
| 686 |
|
|
<div style="text-align: right"><a href="#TOC">Top</a></div>
|
| 687 |
|
|
<h2>2.4 Hardware Breakpoint Unit Registers</h2>
|
| 688 |
|
|
Depending on the <a href="http://www.opencores.org/project/openmsp430/core#2.1.3 Configuration">defines</a> located in the "openmsp430_defines.v" file, up to four hardware breakpoint units can be included in the design. These units can be individually controlled with the following registers.
|
| 689 |
|
|
<a name="2.4.1 BRKx_CTL"></a>
|
| 690 |
|
|
<h3>2.4.1 BRKx_CTL</h3>
|
| 691 |
|
|
|
| 692 |
|
|
This 8 bit read-write register controls the hardware breakpoint unit x. After a POR, this register is set to 0x00.
|
| 693 |
|
|
<br /><br />
|
| 694 |
|
|
<table border="1">
|
| 695 |
|
|
<tr align="center">
|
| 696 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 697 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 698 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 699 |
|
|
</tr>
|
| 700 |
|
|
<tr align="center">
|
| 701 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 702 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 703 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 704 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 705 |
|
|
</tr>
|
| 706 |
|
|
<tr align="center">
|
| 707 |
|
|
<td><font size="-1">BRKx_CTL</font></td>
|
| 708 |
|
|
<td><font size="-1">0x08, 0x0C, 0x10, 0x14</font></td>
|
| 709 |
|
|
<td colspan="3"><font size="-5">Reserved</font></td>
|
| 710 |
|
|
<td><font size="-5">RANGE_MODE</font></td>
|
| 711 |
|
|
<td><font size="-5">INST_EN</font></td>
|
| 712 |
|
|
<td><font size="-5">BREAK_EN</font></td>
|
| 713 |
|
|
<td colspan="2"><font size="-5">ACCESS_MODE</font></td>
|
| 714 |
|
|
</tr>
|
| 715 |
|
|
</table>
|
| 716 |
|
|
<br />
|
| 717 |
|
|
<table border="0">
|
| 718 |
|
|
<tr>
|
| 719 |
|
|
<td> </td><td valign="top"><li><b>RANGE_MODE</b></li></td>
|
| 720 |
|
|
<td>: 0 - Address match on BRK_ADDR0 or BRK_ADDR1 (normal mode)</td>
|
| 721 |
|
|
</tr>
|
| 722 |
|
|
<tr>
|
| 723 |
|
|
<td> </td><td> </td>
|
| 724 |
58 |
olivier.gi |
<td> 1 - Address match on BRK_ADDR0→BRK_ADDR1 range (range mode)
|
| 725 |
116 |
olivier.gi |
<br /><font color="red"><b>Note</b>: range mode is not supported by the core unless the `DBG_HWBRK_RANGE define is set to 1'b1 in the <i>openMSP430_define.v</i> file.</font></td>
|
| 726 |
58 |
olivier.gi |
</td>
|
| 727 |
50 |
olivier.gi |
</tr>
|
| 728 |
|
|
<tr>
|
| 729 |
|
|
<td> </td><td valign="top"><li><b>INST_EN</b></li></td>
|
| 730 |
|
|
<td>: 0 - Checks are done on the execution unit (data flow).</td>
|
| 731 |
|
|
</tr>
|
| 732 |
|
|
<tr>
|
| 733 |
|
|
<td> </td><td> </td>
|
| 734 |
|
|
<td> 1 - Checks are done on the frontend (instruction flow).</td>
|
| 735 |
|
|
</tr>
|
| 736 |
|
|
|
| 737 |
|
|
<tr>
|
| 738 |
|
|
<td> </td><td valign="top"><li><b>BREAK_EN</b></li></td>
|
| 739 |
|
|
<td>: 0 - Watchpoint mode enable (don't stop on address match).</td>
|
| 740 |
|
|
</tr>
|
| 741 |
|
|
<tr>
|
| 742 |
|
|
<td> </td><td> </td>
|
| 743 |
|
|
<td> 1 - Breakpoint mode enable (stop on address match).</td>
|
| 744 |
|
|
</tr>
|
| 745 |
|
|
|
| 746 |
|
|
<tr>
|
| 747 |
|
|
<td> </td><td valign="top"><li><b>ACCESS_MODE</b></li></td>
|
| 748 |
|
|
<td>: 00 - Disabled</td>
|
| 749 |
|
|
</tr>
|
| 750 |
|
|
<tr>
|
| 751 |
|
|
<td> </td><td> </td>
|
| 752 |
|
|
<td> 01 - Detect read access.
|
| 753 |
|
|
<br /> 10 - Detect write access.
|
| 754 |
|
|
<br /> 11 - Detect read/write access
|
| 755 |
|
|
<br /><b>Note</b>: '10' & '11' modes are not supported on the instruction flow</td>
|
| 756 |
|
|
</tr>
|
| 757 |
|
|
</table>
|
| 758 |
|
|
|
| 759 |
|
|
<a name="2.4.2 BRKx_STAT"></a>
|
| 760 |
|
|
<h3>2.4.2 BRKx_STAT</h3>
|
| 761 |
|
|
|
| 762 |
|
|
This 8 bit read-write register gives the status of the hardware breakpoint unit x. Each status bit can be cleared by writing 1 to it. After a POR, this register is set to 0x00.
|
| 763 |
|
|
<br /><br />
|
| 764 |
|
|
<table border="1">
|
| 765 |
|
|
<tr align="center">
|
| 766 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 767 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 768 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 769 |
|
|
</tr>
|
| 770 |
|
|
<tr align="center">
|
| 771 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 772 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 773 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 774 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 775 |
|
|
</tr>
|
| 776 |
|
|
<tr align="center">
|
| 777 |
|
|
<td><font size="-1">BRKx_STAT</font></td>
|
| 778 |
|
|
<td><font size="-1">0x09, 0x0D, 0x11, 0x15</font></td>
|
| 779 |
|
|
<td colspan="2"><font size="-5">Reserved</font></td>
|
| 780 |
|
|
<td><font size="-5">RANGE_WR</font></td>
|
| 781 |
|
|
<td><font size="-5">RANGE_RD</font></td>
|
| 782 |
|
|
<td><font size="-5">ADDR1_WR</font></td>
|
| 783 |
|
|
<td><font size="-5">ADDR1_RD</font></td>
|
| 784 |
|
|
<td><font size="-5">ADDR0_WR</font></td>
|
| 785 |
|
|
<td><font size="-5">ADDR0_RD</font></td>
|
| 786 |
|
|
</tr>
|
| 787 |
|
|
</table>
|
| 788 |
|
|
<br />
|
| 789 |
|
|
<table border="0">
|
| 790 |
|
|
<tr>
|
| 791 |
|
|
<td> </td><td valign="top"><li><b>RANGE_WR</b></li></td>
|
| 792 |
|
|
<td>: This bit is set whenever the CPU performs a write access within the BRKx_ADDR0→BRKx_ADDR1 range (valid if RANGE_MODE=1 and ACCESS_MODE[1]=1).</td>
|
| 793 |
|
|
</tr>
|
| 794 |
|
|
<tr>
|
| 795 |
|
|
<td> </td><td valign="top"><li><b>RANGE_RD</b></li></td>
|
| 796 |
58 |
olivier.gi |
<td>: This bit is set whenever the CPU performs a read access within the BRKx_ADDR0→BRKx_ADDR1 range (valid if RANGE_MODE=1 and ACCESS_MODE[0]=1).
|
| 797 |
116 |
olivier.gi |
<br /><font color="red"><b>Note</b>: range mode is not supported by the core unless the `DBG_HWBRK_RANGE define is set to 1'b1 in the <i>openMSP430_define.v</i> file.</font></td>
|
| 798 |
50 |
olivier.gi |
</tr>
|
| 799 |
|
|
<tr>
|
| 800 |
|
|
<td> </td><td valign="top"><li><b>ADDR1_WR</b></li></td>
|
| 801 |
|
|
<td>: This bit is set whenever the CPU performs a write access at the BRKx_ADDR1 address (valid if RANGE_MODE=0 and ACCESS_MODE[1]=1).</td>
|
| 802 |
|
|
</tr>
|
| 803 |
|
|
<tr>
|
| 804 |
|
|
<td> </td><td valign="top"><li><b>ADDR1_RD</b></li></td>
|
| 805 |
|
|
<td>: This bit is set whenever the CPU performs a read access at the BRKx_ADDR1 address (valid if RANGE_MODE=0 and ACCESS_MODE[0]=1).</td>
|
| 806 |
|
|
</tr>
|
| 807 |
|
|
<tr>
|
| 808 |
|
|
<td> </td><td valign="top"><li><b>ADDR0_WR</b></li></td>
|
| 809 |
|
|
<td>: This bit is set whenever the CPU performs a write access at the BRKx_ADDR0 address (valid if RANGE_MODE=0 and ACCESS_MODE[1]=1).</td>
|
| 810 |
|
|
</tr>
|
| 811 |
|
|
<tr>
|
| 812 |
|
|
<td> </td><td valign="top"><li><b>ADDR0_RD</b></li></td>
|
| 813 |
|
|
<td>: This bit is set whenever the CPU performs a read access at the BRKx_ADDR0 address (valid if RANGE_MODE=0 and ACCESS_MODE[0]=1).</td>
|
| 814 |
|
|
</tr>
|
| 815 |
|
|
</table>
|
| 816 |
|
|
|
| 817 |
|
|
<a name="2.4.3 BRKx_ADDR0"></a>
|
| 818 |
|
|
<h3>2.4.3 BRKx_ADDR0</h3>
|
| 819 |
|
|
|
| 820 |
|
|
This 16 bit read-write register holds the value which is compared against the address value currently present on the program or data address bus. After a POR, this register is set to 0x0000.
|
| 821 |
|
|
<br /><br />
|
| 822 |
|
|
<table border="1">
|
| 823 |
|
|
<tr align="center">
|
| 824 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 825 |
|
|
<td rowspan="2" ><b><font size="-1">Address</font></b></td>
|
| 826 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 827 |
|
|
</tr>
|
| 828 |
|
|
<tr align="center">
|
| 829 |
|
|
<td><font size="-1">15</font></td><td><font size="-1">14</font></td>
|
| 830 |
|
|
<td><font size="-1">13</font></td><td><font size="-1">12</font></td>
|
| 831 |
|
|
<td><font size="-1">11</font></td><td><font size="-1">10</font></td>
|
| 832 |
|
|
<td><font size="-1"> 9</font></td><td><font size="-1"> 8</font></td>
|
| 833 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 834 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 835 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 836 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 837 |
|
|
</tr>
|
| 838 |
|
|
<tr align="center">
|
| 839 |
|
|
<td><font size="-1">BRKx_ADDR0</font></td>
|
| 840 |
|
|
<td><font size="-1">0x0A, 0x0E, 0x12, 0x16</font></td>
|
| 841 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR0[15:0]</font></td>
|
| 842 |
|
|
</tr>
|
| 843 |
|
|
</table>
|
| 844 |
|
|
<br />
|
| 845 |
|
|
<table border="0">
|
| 846 |
|
|
<tr>
|
| 847 |
|
|
<td> </td><td valign="top"><li><b>BRK_ADDR0</b></li></td>
|
| 848 |
|
|
<td>: Value compared against the address value currently present on the program or data address bus.</td>
|
| 849 |
|
|
</tr>
|
| 850 |
|
|
</table>
|
| 851 |
|
|
|
| 852 |
|
|
<a name="2.4.4 BRKx_ADDR1"></a>
|
| 853 |
|
|
<h3>2.4.4 BRKx_ADDR1</h3>
|
| 854 |
|
|
|
| 855 |
|
|
This 16 bit read-write register holds the value which is compared against the address value currently present on the program or data address bus. After a POR, this register is set to 0x0000.
|
| 856 |
|
|
<br /><br />
|
| 857 |
|
|
<table border="1">
|
| 858 |
|
|
<tr align="center">
|
| 859 |
|
|
<td rowspan="2" ><b><font size="-1">Register Name</font></b></td>
|
| 860 |
|
|
<td rowspan="2" ><b><font size="-1">Addresses</font></b></td>
|
| 861 |
|
|
<td colspan="16"><b><font size="-1">Bit Field</font></b></td>
|
| 862 |
|
|
</tr>
|
| 863 |
|
|
<tr align="center">
|
| 864 |
|
|
<td><font size="-1">15</font></td><td><font size="-1">14</font></td>
|
| 865 |
|
|
<td><font size="-1">13</font></td><td><font size="-1">12</font></td>
|
| 866 |
|
|
<td><font size="-1">11</font></td><td><font size="-1">10</font></td>
|
| 867 |
|
|
<td><font size="-1"> 9</font></td><td><font size="-1"> 8</font></td>
|
| 868 |
|
|
<td><font size="-1"> 7</font></td><td><font size="-1"> 6</font></td>
|
| 869 |
|
|
<td><font size="-1"> 5</font></td><td><font size="-1"> 4</font></td>
|
| 870 |
|
|
<td><font size="-1"> 3</font></td><td><font size="-1"> 2</font></td>
|
| 871 |
|
|
<td><font size="-1"> 1</font></td><td><font size="-1"> 0</font></td>
|
| 872 |
|
|
</tr>
|
| 873 |
|
|
<tr align="center">
|
| 874 |
|
|
<td><font size="-1">BRKx_ADDR1</font></td>
|
| 875 |
|
|
<td><font size="-1">0x0B, 0x0F, 0x13, 0x17</font></td>
|
| 876 |
|
|
<td colspan="16"><font size="-5">BRK_ADDR1[15:0]</font></td>
|
| 877 |
|
|
</tr>
|
| 878 |
|
|
</table>
|
| 879 |
|
|
<br />
|
| 880 |
|
|
<table border="0">
|
| 881 |
|
|
<tr>
|
| 882 |
|
|
<td> </td><td valign="top"><li><b>BRK_ADDR1</b></li></td>
|
| 883 |
|
|
<td>: Value compared against the address value currently present on the program or data address bus.</td>
|
| 884 |
|
|
</tr>
|
| 885 |
|
|
</table>
|
| 886 |
|
|
|
| 887 |
|
|
<a name="3. Debug Communication Interface: UART"></a>
|
| 888 |
|
|
<div style="text-align: right"><a href="#TOC">Top</a></div>
|
| 889 |
|
|
<h1>3. Debug Communication Interface: UART</h1>
|
| 890 |
|
|
With its UART interface, the openMSP430 debug unit can communicate with the host computer using a simple RS232 cable (connected to the <a href="http://www.opencores.org/project/openmsp430/core#2.1.4 Pinout">dbg_uart_txd</a> and <a href="http://www.opencores.org/project/openmsp430/core#2.1.4 Pinout">dbg_uart_rxd</a> ports of the IP).<br />
|
| 891 |
|
|
Using an standard <a href="http://www.google.com/search?q=usb+to+rs232+converter">USB to RS232 adaptor</a>, the interface provides a reliable communication link up to 1,5Mbps.
|
| 892 |
|
|
|
| 893 |
|
|
<a name="3.1 Serial communication protocol: 8N1"></a>
|
| 894 |
|
|
<h2>3.1 Serial communication protocol: 8N1</h2>
|
| 895 |
|
|
There are plenty tutorials on Internet regarding RS232 based protocols. However, here is quick recap about 8N1 (1 Start bit, 8 Data bits, No Parity, 1 Stop bit):<br />
|
| 896 |
|
|
<br />
|
| 897 |
|
|
<img src="getimg.php?1247419201" alt="8N1 Serial Protocol" title="8N1 Serial Protocol" />
|
| 898 |
|
|
<br />
|
| 899 |
|
|
As you can see in the above diagram, data transmission starts with a Start bit, followed by the data bits (LSB sent first and MSB sent last), and ends with a "Stop" bit.
|
| 900 |
|
|
|
| 901 |
|
|
<a name="3.2 Synchronization frame"></a>
|
| 902 |
|
|
<h2>3.2 Synchronization frame</h2>
|
| 903 |
|
|
After a POR, the Serial Debug Interface expects a synchronization frame from the host computer in order to determine the communication speed (i.e. the baud rate).<br />
|
| 904 |
|
|
The synchronization frame looks as following:
|
| 905 |
|
|
<br />
|
| 906 |
|
|
<img src="getimg.php?1247420610" alt="Debug Synchronization Frame" title="Debug Synchronization Frame" />
|
| 907 |
|
|
<br />
|
| 908 |
|
|
As you can see, the host simply sends the 0x80 value. The openMSP430 will then measure the time between the falling and rising edge, divide it by 8 and automatically deduce the baud rate it should use to properly communicate with the host.
|
| 909 |
|
|
<br /><br />
|
| 910 |
|
|
<b>Important note</b>: if you want to change the communication speed between two debugging sessions, the openMSP430 needs to go over a POR cycle and a new synchronization frame needs to be send.
|
| 911 |
|
|
|
| 912 |
|
|
<a name="3.3 Read/Write access to the debug registers"></a>
|
| 913 |
|
|
<h2>3.3 Read/Write access to the debug registers</h2>
|
| 914 |
|
|
In order to perform a read / write access to a debug register, the host needs to send a command frame to the openMSP430.<br />
|
| 915 |
|
|
In case of write access, this command frame will be followed by 1 or 2 data frames and in case of read access, the openMSP430 will send 1 or 2 data frames after receiving the command.
|
| 916 |
|
|
|
| 917 |
|
|
<a name="3.3.1 Command Frame"></a>
|
| 918 |
|
|
<h3>3.3.1 Command Frame</h3>
|
| 919 |
|
|
The command frame looks as following:
|
| 920 |
|
|
<br />
|
| 921 |
|
|
<img src="getimg.php?1247427400" alt="Debug Command Frame" title="Debug Command Frame" />
|
| 922 |
|
|
<br />
|
| 923 |
|
|
<table border="0">
|
| 924 |
|
|
<tr>
|
| 925 |
|
|
<td> </td><td valign="top"><li><b>WR</b></li></td>
|
| 926 |
|
|
<td>: Perform a Write access when set. Read otherwise.</td>
|
| 927 |
|
|
</tr>
|
| 928 |
|
|
<tr>
|
| 929 |
|
|
<td> </td><td valign="top"><li><b>B/W</b></li></td>
|
| 930 |
|
|
<td>: Perform a 8-bit data access when set (one data frame). 16-bit otherwise (two data frame).<tr>
|
| 931 |
|
|
</tr>
|
| 932 |
|
|
<tr>
|
| 933 |
|
|
<td> </td><td valign="top"><li><b>Address</b></li></td>
|
| 934 |
|
|
<td>: Debug register address.<tr>
|
| 935 |
|
|
</tr>
|
| 936 |
|
|
</table>
|
| 937 |
|
|
|
| 938 |
|
|
<a name="3.3.2 Write access"></a>
|
| 939 |
|
|
<h3>3.3.2 Write access</h3>
|
| 940 |
|
|
A write access transaction looks like this:
|
| 941 |
|
|
<br />
|
| 942 |
|
|
<img src="getimg.php?1247428987" alt="Debug Write Transaction" title="Debug Write Transaction" />
|
| 943 |
|
|
|
| 944 |
|
|
<a name="3.3.3 Read access"></a>
|
| 945 |
|
|
<h3>3.3.3 Read access</h3>
|
| 946 |
|
|
A read access transaction looks like this:
|
| 947 |
|
|
<br />
|
| 948 |
|
|
<img src="getimg.php?1247429086" alt="Debug Read Transaction" title="Debug Read Transaction" />
|
| 949 |
|
|
|
| 950 |
|
|
<a name="3.4 Read/Write burst implementation for the CPU Memory access"></a>
|
| 951 |
|
|
<h2>3.4 Read/Write burst implementation for the CPU Memory access</h2>
|
| 952 |
|
|
In order to optimize the data burst transactions for the UART, read/write access are not done by reading or writing the MEM_DATA register.<br />
|
| 953 |
|
|
Instead, the data transfer starts immediately after the MEM_CTL.START bit has been set.
|
| 954 |
|
|
|
| 955 |
|
|
<a name="3.4.1 Write Burst access"></a>
|
| 956 |
|
|
<h3>3.4.1 Write Burst access</h3>
|
| 957 |
|
|
A write burst transaction looks like this:
|
| 958 |
|
|
<br />
|
| 959 |
|
|
<img src="getimg.php?1247430408" alt="Debug Write Burst Transaction" title="Debug Write Burst Transaction" />
|
| 960 |
|
|
|
| 961 |
|
|
<a name="3.4.2 Read Burst access"></a>
|
| 962 |
|
|
<h3>3.4.2 Read Burst access</h3>
|
| 963 |
|
|
A read burst transaction looks like this:
|
| 964 |
|
|
<br />
|
| 965 |
|
|
<img src="getimg.php?1247430449" alt="Debug Read Burst Transaction" title="Debug Read Burst Transaction" />
|
| 966 |
|
|
|
| 967 |
|
|
<div style="text-align: right"><a href="#TOC">Top</a></div>
|
| 968 |
|
|
</body>
|
| 969 |
|
|
</html>
|