atreyu187

Dreamcast Guides : SH-4 Hardware Manual

Jan 4th, 2013
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 MB | None | 0 0
  1. ----------------------- Page 1-----------------------
  2.  
  3. SH-4
  4.  
  5. Hardware Manual
  6. Preliminary
  7.  
  8. Version 1.1
  9. 7/31/98
  10. Hitachi, Ltd.
  11.  
  12. ----------------------- Page 2-----------------------
  13.  
  14. Notice
  15.  
  16. When using this document, keep the following in mind:
  17.  
  18. 1. This document may, wholly or partially, be subject to change without notice.
  19.  
  20. 2. All rights are reserved: No one is permitted to reproduce or duplicate, in any form, the
  21. whole or part of this document without Hitachi’s permission.
  22.  
  23. 3. Hitachi will not be held responsible for any damage to the user that may result from
  24. accidents or any other reasons during operation of the user’s unit according to this document.
  25.  
  26. 4. Circuitry and other examples described herein are meant merely to indicate the
  27. characteristics and performance of Hitachi’s semiconductor products. Hitachi assumes no
  28. responsibility for any intellectual property claims or other problems that may result from
  29. applications based on the examples described herein.
  30.  
  31. 5. No license is granted by implication or otherwise under any patents or other rights of any
  32. third party or Hitachi, Ltd.
  33.  
  34. 6. MEDICAL APPLICATIONS: Hitachi’s products are not authorized for use in MEDICAL
  35. APPLICATIONS without the written consent of the appropriate officer of Hitachi’s sales
  36. company. Such use includes, but is not limited to, use in life support systems. Buyers of
  37. Hitachi’s products are requested to notify the relevant Hitachi sales offices when planning to
  38. use the products in MEDICAL APPLICATIONS.
  39.  
  40. ----------------------- Page 3-----------------------
  41.  
  42. Contents
  43.  
  44. Contents ..... .....................................................................................................i
  45.  
  46. Section 1 Overview ........................................................................................13
  47. 1.1 SH7750 Features .............................................................................................................. 13
  48. 1.2 Block Diagram ................................................................................................................. 20
  49.  
  50. Section 2 Programming Model .......................................................................21
  51. 2.1 Data Formats.................................................................................................................... 2 1
  52. 2.2 Register Configuration ..................................................................................................... 22
  53. 2.2.1 Privileged Mode and Banks ................................................................................ 22
  54. 2.2.2 General Registers................................................................................................ 25
  55. 2.2.3 Floating-Point Registers...................................................................................... 27
  56. 2.2.4 Control Registers ................................................................................................ 29
  57. 2.2.5 System Registers................................................................................................. 30
  58. 2.3 Memory-Mapped Registers .............................................................................................. 32
  59. 2.4 Data Format in Registers.................................................................................................. 33
  60. 2.5 Data Formats in Memory ................................................................................................. 33
  61. 2.6 Processor States ............................................................................................................... 34
  62. 2.7 Processor Modes .............................................................................................................. 36
  63. 3.1 Overview ......................................................................................................................... 37
  64. 3.1.1 Features .............................................................................................................. 37
  65. 3.1.2 Role of the MMU................................................................................................ 37
  66. 3.1.3 Register Configuration ........................................................................................ 40
  67. 3.1.4 Caution ............................................................................................................... 40
  68. 3.2 Register Descriptions ....................................................................................................... 41
  69. 3.3 Memory Space ................................................................................................................. 44
  70. 3.3.1 Physical Memory Space ...................................................................................... 44
  71. 3.3.2 External Memory Space ...................................................................................... 47
  72. 3.3.3 Virtual Memory Space ........................................................................................ 48
  73. 3.3.4 On-Chip RAM Space .......................................................................................... 49
  74. 3.3.5 Address Translation ............................................................................................ 49
  75. 3.3.6 Single Virtual Memory Mode and Multiple Virtual Memory Mode..................... 50
  76. 3.3.7 Address Space Identifier (ASID) ......................................................................... 50
  77. 3.4 TLB Functions ................................................................................................................. 51
  78. 3.4.1 Unified TLB (UTLB) Configuration ................................................................... 51
  79. 3.4.2 Instruction TLB (ITLB) Configuration ................................................................ 55
  80. 3.4.3 Address Translation Method ............................................................................... 56
  81. 3.5 MMU Functions ............................................................................................................... 58
  82. 3.5.1 MMU Hardware Management............................................................................. 58
  83.  
  84. Rev. 2.0, 02/99, page i of xii
  85.  
  86. ----------------------- Page 4-----------------------
  87.  
  88. 3.5.2 MMU Software Management .............................................................................. 58
  89. 3.5.3 MMU Instruction (LDTLB) ................................................................................ 58
  90. 3.5.4 Hardware ITLB Miss Handling ........................................................................... 59
  91. 3.5.5 Avoiding Synonym Problems.............................................................................. 60
  92. 3.6 MMU Exceptions............................................................................................................. 61
  93. 3.6.1 Instruction TLB Multiple Hit Exception ............................................................. 61
  94. 3.6.2 Instruction TLB Miss Exception ......................................................................... 62
  95. 3.6.3 Instruction TLB Protection Violation Exception ................................................. 63
  96. 3.6.4 Data TLB Multiple Hit Exception ....................................................................... 64
  97. 3.6.5 Data TLB Miss Exception................................................................................... 64
  98. 3.6.6 Data TLB Protection Violation Exception........................................................... 65
  99. 3.6.7 Initial Page Write Exception ............................................................................... 66
  100. 3.7 Memory-Mapped TLB Configuration .............................................................................. 67
  101. 3.7.1 ITLB Address Array ........................................................................................... 68
  102. 3.7.2 ITLB Data Array 1 ............................................................................................. 69
  103. 3.7.3 ITLB Data Array 2 ............................................................................................. 70
  104. 3.7.4 UTLB Address Array .......................................................................................... 71
  105. 3.7.5 UTLB Data Array 1............................................................................................ 72
  106. 3.7.6 UTLB Data Array 2 ............................................................................................ 73
  107. 4.1 Overview ......................................................................................................................... 75
  108. 4.1.1 Features .............................................................................................................. 75
  109. 4.1.2 Register Configuration ........................................................................................ 76
  110. 4.2 Register Descriptions ....................................................................................................... 76
  111. 4.3 Operand Cache (OC)........................................................................................................ 79
  112. 4.3.1 Configuration...................................................................................................... 79
  113. 4.3.2 Read Operation ................................................................................................... 80
  114. 4.3.3 Write Operation .................................................................................................. 81
  115. 4.3.4 Write-Back Buffer .............................................................................................. 83
  116. 4.3.5 Write-Through Buffer ......................................................................................... 83
  117. 4.3.6 RAM Mode......................................................................................................... 83
  118. 4.3.7 OC Index Mode .................................................................................................. 84
  119. 4.3.8 Coherency between Cache and External Memory ............................................... 85
  120. 4.3.9 Prefetch Operation .............................................................................................. 85
  121. 4.4 Instruction Cache (IC)...................................................................................................... 86
  122. 4.4.1 Configuration...................................................................................................... 86
  123. 4.4.2 Read Operation ................................................................................................... 87
  124. 4.4.3 IC Index Mode.................................................................................................... 88
  125. 4.5 Memory-Mapped Cache Configuration ............................................................................ 88
  126. 4.5.1 IC Address Array ................................................................................................ 88
  127. 4.5.2 IC Data Array ..................................................................................................... 90
  128. 4.5.3 OC Address Array .............................................................................................. 91
  129. 4.5.4 OC Data Array .................................................................................................... 92
  130. 4.6 Store Queues.................................................................................................................... 93
  131.  
  132. Rev. 2.0, 02/99, page ii of xii
  133.  
  134. ----------------------- Page 5-----------------------
  135.  
  136. 4.6.1 SQ Configuration ................................................................................................ 93
  137. 4.6.2 SQ Writes ........................................................................................................... 94
  138. 4.6.3 Transfer to External Memory .............................................................................. 94
  139. 4.6.4 SQ Protection...................................................................................................... 95
  140.  
  141. Section 5 Exceptions ......................................................................................97
  142. 5.1 Overview ......................................................................................................................... 97
  143. 5.1.1 Features .............................................................................................................. 97
  144. 5.1.2 Register Configuration ........................................................................................ 97
  145. 5.2 Register Descriptions ....................................................................................................... 98
  146. 5.3 Exception Handling Functions ......................................................................................... 99
  147. 5.3.1 Exception Handling Flow ................................................................................... 99
  148. 5.3.2 Exception Handling Vector Addresses ................................................................ 99
  149. 5.4 Exception Types and Priorities......................................................................................... 100
  150. 5.5 Exception Flow ................................................................................................................ 103
  151. 5.5.1 Exception Flow ................................................................................................... 103
  152. 5.5.2 Exception Source Acceptance ............................................................................. 104
  153. 5.5.3 Exception Requests and BL Bit........................................................................... 106
  154. 5.5.4 Return from Exception Handling ........................................................................ 106
  155. 5.6 Description of Exceptions ................................................................................................ 107
  156. 5.6.1 Resets ................................................................................................................. 107
  157. 5.6.2 General Exceptions ............................................................................................. 112
  158. 5.6.3 Interrupts ............................................................................................................ 126
  159. 5.6.4 Priority Order with Multiple Exceptions ............................................................. 129
  160. 5.7 Usage Notes ..................................................................................................................... 130
  161. 5.8 Restrictions ...................................................................................................................... 131
  162.  
  163. Section 6 Floating-Point Unit .........................................................................133
  164. 6.1 Overview ......................................................................................................................... 133
  165. 6.2 Data Formats.................................................................................................................... 133
  166. 6.2.1 Floating-Point Format ......................................................................................... 133
  167. 6.2.2 Non-Numbers (NaN)........................................................................................... 135
  168. 6.2.3 Denormalized Numbers ...................................................................................... 136
  169. 6.3 Registers .......................................................................................................................... 137
  170. 6.3.1 Floating-Point Registers...................................................................................... 137
  171. 6.3.2 Floating-Point Status/Control Register (FPSCR) ................................................. 139
  172. 6.3.3 Floating-Point Communication Register (FPUL)................................................. 140
  173. 6.4 Rounding ......................................................................................................................... 140
  174. 6.5 Floating-Point Exceptions ................................................................................................ 141
  175. 6.6 Graphics Support Functions ............................................................................................. 143
  176. 6.6.1 Geometric Operation Instructions ....................................................................... 143
  177. 6.6.2 Pair Single-Precision Data Transfer .................................................................... 144
  178. 7.1 Execution Environment .................................................................................................... 145
  179.  
  180. Rev. 2.0, 02/99, page iii of xii
  181.  
  182. ----------------------- Page 6-----------------------
  183.  
  184. 7.2 Addressing Modes............................................................................................................ 147
  185. 7.3 Instruction Set .................................................................................................................. 151
  186.  
  187. Section 8 Pipelining ....................................................................................... 165
  188. 8.1 Pipelines .......................................................................................................................... 165
  189. 8.2 Parallel-Executability....................................................................................................... 172
  190. 8.3 Execution Cycles and Pipeline Stalling ............................................................................ 176
  191. 9.1 Overview ......................................................................................................................... 193
  192. 9.1.1 Types of Power-Down Modes ............................................................................. 193
  193. 9.1.2 Register Configuration ........................................................................................ 195
  194. 9.1.3 Pin Configuration ............................................................................................... 195
  195. 9.2 Register Descriptions ....................................................................................................... 195
  196. 9.2.1 Standby Control Register (STBCR) .................................................................... 195
  197. 9.2.2 Peripheral Module Pin High Impedance Control ................................................. 198
  198. 9.2.3 Peripheral Module Pin Pull-Up Control .............................................................. 198
  199. 9.2.4 Standby Control Register 2 (STBCR2)................................................................ 199
  200. 9.3 Sleep Mode ...................................................................................................................... 200
  201. 9.3.1 Transition to Sleep Mode .................................................................................... 200
  202. 9.3.2 Exit from Sleep Mode ......................................................................................... 200
  203. 9.4 Deep Sleep Mode ............................................................................................................. 200
  204. 9.4.1 Transition to Deep Sleep Mode ........................................................................... 200
  205. 9.4.2 Exit from Deep Sleep Mode................................................................................ 200
  206. 9.5 Standby Mode .................................................................................................................. 201
  207. 9.5.1 Transition to Standby Mode ................................................................................ 201
  208. 9.5.2 Exit from Standby Mode ..................................................................................... 202
  209. 9.5.3 Clock Pause Function ......................................................................................... 202
  210. 9.6 Module Standby Function ................................................................................................ 203
  211. 9.6.1 Transition to Module Standby Function .............................................................. 203
  212. 9.6.2 Exit from Module Standby Function ................................................................... 203
  213. 9.7 STATUS Pin Change Timing ........................................................................................... 204
  214. 9.7.1 In Reset .............................................................................................................. 204
  215. 9.7.2 In Exit from Standby Mode................................................................................. 205
  216. 9.7.3 In Exit from Sleep Mode..................................................................................... 207
  217. 9.7.4 In Exit from Deep Sleep Mode ........................................................................... 210
  218.  
  219. Section 10 Clock Oscillation Circuits.............................................................213
  220. 10.1 Overview ....................................................................................................................... 2 13
  221. 10.1.1 Features ............................................................................................................ 2 13
  222. 10.2 Overview of CPG ........................................................................................................... 215
  223. 10.2.1 Block Diagram of CPG ..................................................................................... 215
  224. 10.2.2 CPG Pin Configuration ..................................................................................... 217
  225. 10.2.3 CPG Register Configuration ............................................................................. 217
  226. 10.3 Clock Operating Modes ................................................................................................. 218
  227.  
  228. Rev. 2.0, 02/99, page iv of xii
  229.  
  230. ----------------------- Page 7-----------------------
  231.  
  232. 10.4 CPG Register Description .............................................................................................. 220
  233. 10.4.1 Frequency Control Register (FRQCR)............................................................... 220
  234. 10.5 Changing the Frequency ................................................................................................. 222
  235. 10.5.1 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is Off) ........... 222
  236. 10.5.2 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is On) ........... 223
  237. 10.5.3 Changing Bus Clock Division Ratio (When PLL Circuit 2 is On) ..................... 223
  238. 10.5.4 Changing Bus Clock Division Ratio (When PLL Circuit 2 is Off) ..................... 223
  239. 10.5.5 Changing CPU or Peripheral Module Clock Division Ratio .............................. 224
  240. 10.6 Output Clock Control ..................................................................................................... 224
  241. 10.7 Overview of Watchdog Timer ........................................................................................ 224
  242. 10.7.1 Block Diagram .................................................................................................. 224
  243. 10.7.2 Register Configuration ...................................................................................... 225
  244. 10.8 WDT Register Descriptions............................................................................................ 225
  245. 10.8.1 Watchdog Timer Counter (WTCNT) ................................................................ 225
  246. 10.8.2 Watchdog Timer Control/Status Register (WTCSR) ......................................... 226
  247. 10.8.3 Notes on Register Access .................................................................................. 228
  248. 10.9 Using the WDT .............................................................................................................. 229
  249. 10.9.1 Standby Clearing Procedure .............................................................................. 229
  250. 10.9.2 Frequency Changing Procedure......................................................................... 229
  251. 10.9.3 Using Watchdog Timer Mode ........................................................................... 230
  252. 10.9.4 Using Interval Timer Mode ............................................................................... 230
  253. 10.10 Notes on Board Design ................................................................................................. 231
  254. 11.1 Overview ....................................................................................................................... 233
  255. 11.1.1 Features ............................................................................................................ 233
  256. 11.1.2 Block Diagram .................................................................................................. 234
  257. 11.1.3 Pin Configuration .............................................................................................. 235
  258. 11.1.4 Register Configuration ...................................................................................... 235
  259. 11.2 Register Descriptions ..................................................................................................... 237
  260. 11.2.1 64 Hz Counter (R64CNT) ................................................................................. 237
  261. 11.2.2 Second Counter (RSECCNT) ............................................................................ 237
  262. 11.2.3 Minute Counter (RMINCNT) ............................................................................ 238
  263. 11.2.4 Hour Counter (RHRCNT) ................................................................................. 238
  264. 11.2.5 Day-of-Week Counter (RWKCNT) ................................................................... 239
  265. 11.2.6 Day Counter (RDAYCNT)................................................................................ 240
  266. 11.2.7 Month Counter (RMONCNT) ........................................................................... 241
  267. 11.2.8 Year Counter (RYRCNT) ................................................................................. 242
  268. 11.2.9 Second Alarm Register (RSECAR) ................................................................... 243
  269. 11.2.10 Minute Alarm Register (RMINAR) ................................................................. 244
  270. 11.2.11 Hour Alarm Register (RHRAR) ...................................................................... 245
  271. 11.2.12 Day-of-Week Alarm Register (RWKAR) ........................................................ 246
  272. 11.2.13 Day Alarm Register (RDAYAR) ..................................................................... 247
  273. 11.2.14 Month Alarm Register (RMONAR) ................................................................ 248
  274. 11.2.15 RTC Control Register 1 (RCR1) ..................................................................... 249
  275.  
  276. Rev. 2.0, 02/99, page v of xii
  277.  
  278. ----------------------- Page 8-----------------------
  279.  
  280. 11.2.16 RTC Control Register 2 (RCR2) ..................................................................... 251
  281. 11.3 Operation ....................................................................................................................... 253
  282. 11.3.1 Time Setting Procedures ................................................................................... 253
  283. 11.3.2 Time Reading Procedures ................................................................................. 254
  284. 11.3.3 Alarm Function ................................................................................................. 255
  285. 11.4 Interrupts ....................................................................................................................... 256
  286. 11.5 Usage Notes ................................................................................................................... 256
  287. 11.5.1 Register Initialization........................................................................................ 256
  288. 11.5.2 Crystal Oscillator Circuit .................................................................................. 256
  289. 12.1 Overview ....................................................................................................................... 259
  290. 12.1.1 Features ............................................................................................................ 259
  291. 12.1.2 Block Diagram.................................................................................................. 260
  292. 12.1.3 Pin Configuration.............................................................................................. 260
  293. 12.1.4 Register Configuration ...................................................................................... 261
  294. 12.2 Register Descriptions ..................................................................................................... 262
  295. 12.2.1 Timer Output Control Register (TOCR) ............................................................ 262
  296. 12.2.2 Timer Start Register (TSTR) ............................................................................. 263
  297. 12.2.3 Timer Constant Registers (TCOR) .................................................................... 264
  298. 12.2.4 Timer Counters (TCNT) ................................................................................... 264
  299. 12.2.5 Timer Control Registers (TCR) ......................................................................... 265
  300. 12.2.6 Input Capture Register (TCPR2) ....................................................................... 268
  301. 12.3 Operation ...................................................................................................................... 269
  302. 12.3.1 Counter Operation ............................................................................................ 269
  303. 12.3.2 Input Capture Function ..................................................................................... 272
  304. 12.4 Interrupts ....................................................................................................................... 274
  305. 12.5 Usage Notes ................................................................................................................... 275
  306. 12.5.1 Register Writes ................................................................................................. 275
  307. 12.5.2 TCNT Register Reads ....................................................................................... 275
  308. 12.5.3 Resetting the RTC Frequency Divider............................................................... 275
  309. 12.5.4 External Clock Frequency ................................................................................. 275
  310.  
  311. Section 13 Bus State Controller (BSC)...........................................................277
  312. 13.1 Overview ....................................................................................................................... 277
  313. 13.1.1 Features ............................................................................................................ 277
  314. 13.1.2 Block Diagram.................................................................................................. 279
  315. 13.1.3 Pin Configuration.............................................................................................. 280
  316. 13.1.4 Register Configuration ...................................................................................... 283
  317. 13.1.5 Overview of Areas ............................................................................................ 284
  318. 13.1.6 PCMCIA Support.............................................................................................. 287
  319. 13.2 Register Descriptions ..................................................................................................... 291
  320. 13.2.1 Bus Control Register 1 (BCR1) ......................................................................... 291
  321. 13.2.2 Bus Control Register 2 (BCR2) ......................................................................... 299
  322. 13.2.3 Wait Control Register 1 (WCR1) ...................................................................... 300
  323.  
  324. Rev. 2.0, 02/99, page vi of xii
  325.  
  326. ----------------------- Page 9-----------------------
  327.  
  328. 13.2.4 Wait Control Register 2 (WCR2) ...................................................................... 303
  329. 13.2.5 Wait Control Register 3 (WCR3) ...................................................................... 311
  330. 13.2.6 Memory Control Register (MCR)...................................................................... 313
  331. 13.2.7 PCMCIA Control Register (PCR) ..................................................................... 320
  332. 13.2.8 Synchronous DRAM Mode Register (SDMR) ................................................... 323
  333. 13.2.9 Refresh Timer Control/Status Register (RTSCR) .............................................. 325
  334. 13.2.10 Refresh Timer Counter (RTCNT).................................................................... 327
  335. 13.2.11 Refresh Time Constant Register (RTCOR)...................................................... 328
  336. 13.2.12 Refresh Count Register (RFCR) ...................................................................... 329
  337. 13.2.13 Notes on Accessing Refresh Control Registers ................................................ 330
  338. 13.3 Operation ....................................................................................................................... 331
  339. 13.3.1 Endian/Access Size and Data Alignment........................................................... 331
  340. 13.3.2 Areas ................................................................................................................ 342
  341. 13.3.3 Basic Interface .................................................................................................. 347
  342. 13.3.4 DRAM Interface ............................................................................................... 355
  343. 13.3.5 Synchronous DRAM Interface .......................................................................... 372
  344. 13.3.6 Burst ROM Interface......................................................................................... 396
  345. 13.3.7 PCMCIA Interface ............................................................................................ 399
  346. 13.3.8 MPX Interface .................................................................................................. 408
  347. 13.3.9 Byte Control SRAM.......................................................................................... 415
  348. 13.3.10 Waits between Access Cycles ......................................................................... 420
  349. 13.3.11 Bus Arbitration ............................................................................................... 421
  350. 13.3.12 Master Mode ................................................................................................... 424
  351. 13.3.13 Slave Mode ..................................................................................................... 425
  352. 13.3.14 Partial-Sharing Master Mode........................................................................... 426
  353. 13.3.15 Cooperation between Master and Slave ........................................................... 427
  354.  
  355. Section 14 Direct Memory Access Controller (DMAC) ..................................429
  356. 14.1 Overview ....................................................................................................................... 429
  357. 14.1.1 Features ............................................................................................................ 429
  358. 14.1.2 Block Diagram .................................................................................................. 431
  359. 14.1.3 Pin Configuration .............................................................................................. 432
  360. 14.1.4 Register Configuration ...................................................................................... 433
  361. 14.2 Register Descriptions ..................................................................................................... 435
  362. 14.2.1 DMA Source Address Registers 0–3 (SAR0–SAR3) ......................................... 435
  363. 14.2.2 DMA Destination Address Registers 0–3 (DAR0–DAR3) ................................. 436
  364. 14.2.3 DMA Transfer Count Registers 0–3 (DMATCR0–DMATCR3) ........................ 437
  365. 14.2.4 DMA Channel Control Registers 0–3 (CHCR0–CHCR3) .................................. 438
  366. 14.2.5 DMA Operation Register (DMAOR)................................................................. 446
  367. 14.3 Operation ....................................................................................................................... 448
  368. 14.3.1 DMA Transfer Procedure .................................................................................. 448
  369. 14.3.2 DMA Transfer Requests.................................................................................... 450
  370. 14.3.3 Channel Priorities ............................................................................................. 453
  371.  
  372. Rev. 2.0, 02/99, page vii of xii
  373.  
  374. ----------------------- Page 10-----------------------
  375.  
  376. 14.3.4 Types of DMA Transfer .................................................................................... 456
  377. 14.3.5 Number of Bus Cycle States and DREQ Pin Sampling Timing ......................... 464
  378. 14.3.6 Ending DMA Transfer ...................................................................................... 479
  379. 14.4 Examples of Use ............................................................................................................ 482
  380. 14.4.1 Examples of Transfer between External Memory and an External Device with
  381. DACK .482
  382. 14.5 On-Demand Data Transfer Mode ................................................................................... 483
  383. 14.5.1 Operation .......................................................................................................... 483
  384. 14.5.2 Notes on Use of DDT Module........................................................................... 485
  385. 14.6 Usage Notes ................................................................................................................... 487
  386.  
  387. Section 15 Serial Communication Interface (SCI) ..........................................489
  388. 15.1 Overview ....................................................................................................................... 489
  389. 15.1.1 Features ............................................................................................................ 489
  390. 15.1.2 Block Diagram.................................................................................................. 491
  391. 15.1.3 Pin Configuration.............................................................................................. 492
  392. 15.1.4 Register Configuration ...................................................................................... 492
  393. 15.2 Register Descriptions ..................................................................................................... 493
  394. 15.2.1 Receive Shift Register (SCRSR1) ..................................................................... 493
  395. 15.2.2 Receive Data Register (SCRDR1) ..................................................................... 493
  396. 15.2.3 Transmit Shift Register (SCTSR1) .................................................................... 494
  397. 15.2.4 Transmit Data Register (SCTDR1) ................................................................... 494
  398. 15.2.5 Serial Mode Register (SCSMR1) ...................................................................... 495
  399. 15.2.6 Serial Control Register (SCSCR1) .................................................................... 498
  400. 15.2.7 Serial Status Register (SCSSR1) ....................................................................... 501
  401. 15.2.8 Serial Port Register (SCSPTR1) ........................................................................ 505
  402. 15.2.9 Bit Rate Register (SCBRR1) ............................................................................. 509
  403. 15.3 Operation ....................................................................................................................... 516
  404. 15.3.1 Overview .......................................................................................................... 516
  405. 15.3.2 Operation in Asynchronous Mode ..................................................................... 519
  406. 15.3.3 Multiprocessor Communication Function.......................................................... 529
  407. 15.3.4 Operation in Synchronous Mode ....................................................................... 537
  408. 15.4 SCI Interrupt Sources and DMAC .................................................................................. 547
  409. 15.5 Usage Notes ................................................................................................................... 548
  410.  
  411. Section 16 Serial Communication Interface with FIFO (SCIF) ...................... 553
  412. 16.1 Overview ....................................................................................................................... 553
  413. 16.1.1 Features ............................................................................................................ 553
  414. 16.1.2 Block Diagram.................................................................................................. 555
  415. 16.1.3 Pin Configuration.............................................................................................. 556
  416. 16.1.4 Register Configuration ...................................................................................... 557
  417.  
  418. Rev. 2.0, 02/99, page viii of xii
  419.  
  420. ----------------------- Page 11-----------------------
  421.  
  422. 16.2 Register Descriptions ..................................................................................................... 558
  423. 16.2.1 Receive Shift Register (SCRSR2) ..................................................................... 558
  424. 16.2.2 Receive FIFO Data Register (SCFRDR2).......................................................... 558
  425. 16.2.3 Transmit Shift Register (SCTSR2) .................................................................... 559
  426. 16.2.4 Transmit FIFO Data Register (SCFTDR2) ........................................................ 559
  427. 16.2.5 Serial Mode Register (SCSMR2) ...................................................................... 560
  428. 16.2.6 Serial Control Register (SCSCR2) .................................................................... 562
  429. 16.2.7 Serial Status Register (SCFSR2) ....................................................................... 565
  430. 16.2.8 Bit Rate Register (SCBRR2) ............................................................................. 572
  431. 16.2.9 FIFO Control Register (SCFCR2) ..................................................................... 573
  432. 16.2.10 FIFO Data Count Register (SCFDR2) ............................................................. 575
  433. 16.2.11 Serial Port Register (SCSPTR2) ...................................................................... 576
  434. 16.2.12 Line Status Register (SCLSR2) ....................................................................... 581
  435. 16.3 Operation ....................................................................................................................... 582
  436. 16.3.1 Overview .......................................................................................................... 582
  437. 16.3.2 Serial Operation ................................................................................................ 584
  438. 16.4 SCIF Interrupt Sources and the DMAC .......................................................................... 594
  439. 16.5 Usage Notes ................................................................................................................... 595
  440.  
  441. Section 17 Smart Card Interface .....................................................................599
  442. 17.1 Overview ....................................................................................................................... 599
  443. 17.1.1 Features ............................................................................................................ 599
  444. 17.1.2 Block Diagram .................................................................................................. 600
  445. 17.1.3 Pin Configuration .............................................................................................. 601
  446. 17.1.4 Register Configuration ...................................................................................... 601
  447. 17.2 Register Descriptions ..................................................................................................... 602
  448. 17.2.1 Smart Card Mode Register (SCSCMR1) ........................................................... 602
  449. 17.2.2 Serial Mode Register (SCSMR1) ...................................................................... 603
  450. 17.2.3 Serial Control Register (SCSCR1) .................................................................... 604
  451. 17.2.4 Serial Status Register (SCSSR1) ....................................................................... 605
  452. 17.3 Operation ....................................................................................................................... 607
  453. 17.3.1 Overview .......................................................................................................... 607
  454. 17.3.2 Pin Connections ................................................................................................ 608
  455. 17.3.3 Data Format ...................................................................................................... 609
  456. 17.3.4 Register Settings ............................................................................................... 610
  457. 17.3.5 Clock ................................................................................................................ 613
  458. 17.3.6 Data Transfer Operations .................................................................................. 616
  459. 17.4 Usage Notes ................................................................................................................... 623
  460.  
  461. Section 18 I/O Ports .......................................................................................629
  462. 18.1 Overview ....................................................................................................................... 629
  463. 18.1.1 Features ............................................................................................................ 629
  464. 18.1.2 Block Diagrams ................................................................................................ 630
  465.  
  466. Rev. 2.0, 02/99, page ix of xii
  467.  
  468. ----------------------- Page 12-----------------------
  469.  
  470. 18.1.3 Pin Configuration.............................................................................................. 636
  471. 18.1.4 Register Configuration ...................................................................................... 638
  472. 18.2 Register Descriptions ..................................................................................................... 639
  473. 18.2.1 Port Control Register A (PCTRA) ..................................................................... 639
  474. 18.2.2 Port Data Register A (PDTRA) ......................................................................... 640
  475. 18.2.3 Port Control Register B (PCTRB) ..................................................................... 641
  476. 18.2.4 Port Data Register B (PDTRB) ......................................................................... 642
  477. 18.2.5 GPIO Interrupt Control Register (GPIOIC) ....................................................... 643
  478. 18.2.6 Serial Port Register (SCSPTR1) ........................................................................ 644
  479. 18.2.7 Serial Port Register (SCSPTR2) ........................................................................ 645
  480. 19.1 Overview ....................................................................................................................... 649
  481. 19.1.1 Features ............................................................................................................ 649
  482. 19.1.2 Block Diagram.................................................................................................. 650
  483. 19.1.3 Pin Configuration.............................................................................................. 651
  484. 19.1.4 Register Configuration ...................................................................................... 651
  485. 19.2 Interrupt Sources ............................................................................................................ 652
  486. 19.2.1 NMI Interrupt ................................................................................................... 652
  487. 19.2.2 IRL Interrupts ................................................................................................... 653
  488. 19.2.3 On-Chip Peripheral Module Interrupts .............................................................. 655
  489. 19.2.4 Interrupt Exception Handling and Priority......................................................... 656
  490. 19.3 Register Descriptions ..................................................................................................... 659
  491. 19.3.1 Interrupt Priority Registers A to C (IPRA–IPRC) .............................................. 659
  492. 19.3.2 Interrupt Control Register (ICR) ....................................................................... 660
  493. 19.4 INTC Operation ............................................................................................................. 662
  494. 19.4.1 Interrupt Operation Sequence............................................................................ 662
  495. 19.4.2 Multiple Interrupts ............................................................................................ 664
  496. 19.4.3 Interrupt Masking with MAI Bit ....................................................................... 664
  497. 19.5 Interrupt Response Time ................................................................................................ 665
  498. 20.1 Overview ....................................................................................................................... 667
  499. 20.1.1 Features ............................................................................................................ 667
  500. 20.1.2 Block Diagram.................................................................................................. 668
  501. 20.2 Register Descriptions ..................................................................................................... 670
  502. 20.2.1 Access to UBC Control Registers...................................................................... 670
  503. 20.2.2 Break Address Register A (BARA) ................................................................... 671
  504. 20.2.3 Break ASID Register A (BASRA) .................................................................... 672
  505. 20.2.4 Break Address Mask Register A (BAMRA) ...................................................... 672
  506. 20.2.5 Break Bus Cycle Register A (BBRA)................................................................ 673
  507. 20.2.6 Break Address Register B (BARB) ................................................................... 675
  508. 20.2.7 Break ASID Register B (BASRB) ..................................................................... 675
  509. 20.2.8 Break Address Mask Register B (BAMRB) ...................................................... 675
  510. 20.2.9 Break Data Register B (BDRB) ........................................................................ 675
  511. 20.2.10 Break Data Mask Register B (BDMRB) .......................................................... 676
  512. 20.2.11 Break Bus Cycle Register B (BBRB) .............................................................. 677
  513.  
  514. Rev. 2.0, 02/99, page x of xii
  515.  
  516. ----------------------- Page 13-----------------------
  517.  
  518. 20.2.12 Break Control Register (BRCR) ...................................................................... 677
  519. 20.3 Operation ....................................................................................................................... 680
  520. 20.3.1 Explanation of Terms Relating to Accesses....................................................... 680
  521. 20.3.2 Explanation of Terms Relating to Instruction Intervals ..................................... 681
  522. 20.3.3 User Break Operation Sequence ........................................................................ 681
  523. 20.3.4 Instruction Access Cycle Break ......................................................................... 682
  524. 20.3.5 Operand Access Cycle Break ............................................................................ 683
  525. 20.3.6 Condition Match Flag Setting ........................................................................... 684
  526. 20.3.7 Program Counter (PC) Value Saved .................................................................. 684
  527. 20.3.8 Contiguous A and B Settings for Sequential Conditions .................................... 685
  528. 20.3.9 Usage Notes ...................................................................................................... 686
  529. 20.4 User Break Debug Support Function .............................................................................. 687
  530. 20.5 Examples of Use ............................................................................................................ 689
  531.  
  532. Section 21 Hitachi User Debug Interface (Hitachi-UDI) .................................691
  533. 21.1 Overview ....................................................................................................................... 691
  534. 21.1.1 Features ............................................................................................................ 691
  535. 21.1.2 Block Diagram .................................................................................................. 692
  536. 21.1.3 Pin Configuration .............................................................................................. 693
  537. 21.1.4 Register Configuration ...................................................................................... 694
  538. 21.2 Register Descriptions ..................................................................................................... 695
  539. 21.2.1 Instruction Register (SDIR)............................................................................... 695
  540. 21.2.2 Data Register (SDDR)....................................................................................... 696
  541. 21.2.3 Bypass Register (SDBPR) ................................................................................. 696
  542. 21.3 Operation ....................................................................................................................... 697
  543. 21.3.1 TAP Control ..................................................................................................... 697
  544. 21.3.2 Hitachi-UDI Reset ............................................................................................ 698
  545. 21.3.3 Hitachi-UDI Interrupt ....................................................................................... 698
  546. 21.3.4 Bypass .............................................................................................................. 698
  547. 21.4 Usage Notes ................................................................................................................... 699
  548.  
  549. Section 22 Pin Description .............................................................................700
  550. 22.1 Pin Arrangement ............................................................................................................ 700
  551. 22.2 Pin Functions ................................................................................................................. 702
  552. 22.2.1 Pin Functions (256-Pin BGA) ........................................................................... 702
  553. 22.2.2 Pin Functions (208-Pin QFP)............................................................................. 712
  554.  
  555. Section 23 Electrical Characteristics...............................................................721
  556. 23.1 Absolute Maximum Ratings ........................................................................................... 721
  557. 23.2 DC Characteristics ......................................................................................................... 722
  558. 23.3 AC Characteristics ......................................................................................................... 724
  559. 23.3.1 Clock and Control Signal Timing...................................................................... 725
  560. 23.3.2 Control Signal Timing ...................................................................................... 732
  561.  
  562. Rev. 2.0, 02/99, page xi of xii
  563.  
  564. ----------------------- Page 14-----------------------
  565.  
  566. 23.3.3. Bus Timing ...................................................................................................... 734
  567. 23.3.4 Peripheral Module Signal Timing ..................................................................... 783
  568. 23.3.5 AC Characteristic Test Conditions .................................................................... 788
  569. 23.3.6 Delay Time Variation Due to Load Capacitance ............................................. 789
  570.  
  571. Appendix A Address List ...............................................................................791
  572.  
  573. Appendix B Package Dimensions...................................................................795
  574.  
  575. Appendix C Mode Pin Settings ......................................................................797
  576.  
  577. Appendix D CKIO2ENB Pin Configuration ...................................................799
  578.  
  579. Appendix E Pin Functions ............................................................................. 801
  580. E.1 Pin States......................................................................................................................... 801
  581. E.2 Handling of Unused Pins ................................................................................................. 804
  582.  
  583. Appendix F Synchronous DRAM Address Multiplexing Tables.................... 805
  584.  
  585. Appendix G SH7750 On-Demand Data Transfer Mode.................................. 823
  586. G.1 Pins in DDT Mode .......................................................................................................... 823
  587. G.2 Transfer Request Acceptance on Each Channel ............................................................... 826
  588.  
  589. Rev. 2.0, 02/99, page xii of xii
  590.  
  591. ----------------------- Page 15-----------------------
  592.  
  593. Section 1 Overview
  594.  
  595. 1.1 SH7750 Features
  596.  
  597. The SH7750 is a 32-bit RISC (reduced instruction set computer) microprocessor, featuring
  598. object code upward-compatibility with SH-1, SH-2, SH-3, and SH-3E microcomputers. It
  599. includes an 8-kbyte instruction cache, a 16-kbyte operand cache with a choice of copy-back or
  600. write-through mode, and an MMU (memory management unit) with a 64-entry fully-associative
  601. unified TLB (translation lookaside buffer).
  602.  
  603. The SH7750 has an on-chip bus state controller (BSC) that allows direct connection to DRAM
  604. and synchronous DRAM without external circuitry. Its 16-bit fixed-length instruction set enables
  605. program code size to be reduced by almost 50% compared with 32-bit instructions.
  606.  
  607. The features of the SH7750 are summarized in table 1.1.
  608.  
  609. Rev. 2.0, 02/99, page 1 of 830
  610.  
  611. ----------------------- Page 16-----------------------
  612.  
  613. Table 1.1 SH7750 Features
  614.  
  615. Item Features
  616.  
  617. LSI • Operating frequency: 200 MHz
  618.  
  619. • Performance:
  620.  
  621.  360 MIPS (200 MHz)
  622.  
  623.  1.4 GFLOPS (200 MHz)
  624.  
  625. • Superscalar architecture: Parallel execution of two instructions
  626.  
  627. • Voltage: 1.8 V (internal), 3.3 V (I/O)
  628.  
  629. • Packages: 256-pin BGA, 208-pin QFP
  630.  
  631. • External buses
  632.  
  633.  Separate 26-bit address and 64-bit data buses
  634.  
  635.  External bus frequency of 1/2, 1/3, 1/4, 1/6, or 1/8 times internal bus
  636. frequency
  637.  
  638. CPU • Original Hitachi SH architecture
  639.  
  640. • 32-bit internal data bus
  641.  
  642. • General register file:
  643.  
  644.  Sixteen 32-bit general registers (and eight 32-bit shadow registers)
  645.  
  646.  Seven 32-bit control registers
  647.  
  648.  Four 32-bit system registers
  649.  
  650. • RISC-type instruction set (upward-compatible with SH Series)
  651.  
  652.  Fixed 16-bit instruction length for improved code efficiency
  653.  
  654.  Load-store architecture
  655.  
  656.  Delayed branch instructions
  657.  
  658.  Conditional execution
  659.  
  660.  C-based instruction set
  661.  
  662. • Superscalar architecture (providing simultaneous execution of two
  663. instructions) including FPU
  664.  
  665. • Instruction execution time: Maximum 2 instructions/cycle
  666.  
  667. • Virtual address space: 4 Gbytes (448-Mbyte external memory space)
  668.  
  669. • Space identifier ASIDs: 8 bits, 256 virtual address spaces
  670.  
  671. • On-chip multiplier
  672.  
  673. • Five-stage pipeline
  674.  
  675. Rev. 2.0, 02/99, page 2 of 830
  676.  
  677. ----------------------- Page 17-----------------------
  678.  
  679. Table 1.1 SH7750 Features (cont)
  680.  
  681. Item Features
  682.  
  683. FPU • On-chip floating-point coprocessor
  684.  
  685. • Supports single-precision (32 bits) and double-precision (64 bits)
  686.  
  687. • Supports IEEE754-compliant data types and exceptions
  688.  
  689. • Two rounding modes: Round to Nearest and Round to Zero
  690.  
  691. • Handling of denormalized numbers: Truncation to zero or interrupt
  692. generation for compliance with IEEE754
  693.  
  694. • Floating-point registers: 32 bits × 16 words × 2 banks
  695. (single-precision × 16 words or double-precision × 8 words) × 2 banks
  696.  
  697. • 32-bit CPU-FPU floating-point communication register (FPUL)
  698.  
  699. • Supports FMAC (multiply-and-accumulate) instruction
  700.  
  701. • Supports FDIV (divide) and FSQRT (square root) instructions
  702.  
  703. • Supports FLDI0/FLDI1 (load constant 0/1) instructions
  704.  
  705. • Instruction execution times
  706.  
  707.  Latency (FMAC/FADD/FSUB/FMUL): 3 cycles (single-precision), 8
  708. cycles (double-precision)
  709.  
  710.  Pitch (FMAC/FADD/FSUB/FMUL): 1 cycle (single-precision), 6 cycles
  711. (double-precision)
  712.  
  713. Note: FMAC is supported for single-precision only.
  714.  
  715. • 3-D graphics instructions (single-precision only):
  716.  
  717.  4-dimensional vector conversion and matrix operations (FTRV): 4
  718. cycles (pitch), 7 cycles (latency)
  719.  
  720.  4-dimensional vector (FIPR) inner product: 1 cycle (pitch), 4 cycles
  721. (latency)
  722.  
  723. • Five-stage pipeline
  724.  
  725. Rev. 2.0, 02/99, page 3 of 830
  726.  
  727. ----------------------- Page 18-----------------------
  728.  
  729. Table 1.1 SH7750 Features (cont)
  730.  
  731. Item Features
  732.  
  733. Clock pulse • Choice of main clock: 1/2, 1, 3, or 6 times EXTAL
  734. generator (CPG) • Clock modes:
  735.  
  736.  CPU frequency: 1, 1/2, 1/3, 1/4, 1/6, or 1/8 times main clock:
  737. maximum 200 MHz
  738.  
  739.  Bus frequency: 1/2, 1/3, 1/4, 1/6, or 1/8 times main clock: maximum
  740. 100 MHz
  741.  
  742.  Peripheral frequency: 1/2, 1/3, 1/4, 1/6, or 1/8 times main clock:
  743. maximum 50 MHz
  744.  
  745. • Power-down modes
  746.  
  747.  Sleep mode
  748.  
  749.  Standby mode
  750.  
  751.  Module standby function
  752.  
  753. • Single-channel watchdog timer
  754.  
  755. Memory • 4-Gbyte address space, 256 address space identifiers (8-bit ASIDs)
  756. management
  757. • Single virtual mode and multiple virtual memory mode
  758. unit (MMU)
  759. • Supports multiple page sizes: 1 kbyte, 4 kbytes, 64 kbytes, 1 Mbyte
  760.  
  761. • 4-entry fully-associative TLB for instructions
  762.  
  763. • 64-entry fully-associative TLB for instructions and operands
  764.  
  765. • Supports software-controlled replacement and random-counter
  766. replacement algorithm
  767.  
  768. • TLB contents can be accessed directly by address mapping
  769.  
  770. Rev. 2.0, 02/99, page 4 of 830
  771.  
  772. ----------------------- Page 19-----------------------
  773.  
  774. Table 1.1 SH7750 Features (cont)
  775.  
  776. Item Features
  777.  
  778. Cache memory • Instruction cache (IC)
  779.  
  780.  8 kbytes, direct mapping
  781.  
  782.  256 entries, 32-byte block length
  783.  
  784.  Normal mode (8-kbyte cache)
  785.  
  786.  Index mode
  787.  
  788. • Operand cache (OC)
  789.  
  790.  16 kbytes, direct mapping
  791.  
  792.  512 entries, 32-byte block length
  793.  
  794.  Normal mode (16-kbyte cache)
  795.  
  796.  Index mode
  797.  
  798.  RAM mode (8-kbyte cache + 8-kbyte RAM)
  799.  
  800.  Choice of write method (copy-back or write-through)
  801.  
  802. • Single-stage copy-back buffer, single-stage write-through buffer
  803.  
  804. • Cache memory contents can be accessed directly by address mapping
  805. (usable as on-chip memory)
  806.  
  807. • Store queue (32 bytes × 2 entries)
  808.  
  809. Interrupt controller • Five independent external interrupts (NMI, IRL3 to IRL0)
  810. (INTC)
  811. • 15-level signed external interrupts: IRL3 to IRL0
  812.  
  813. • On-chip peripheral module interrupts: Priority level can be set for each
  814. module
  815.  
  816. User break • Supports debugging by means of user break interrupts
  817. controller (UBC) • Two break channels
  818.  
  819. • Address, data value, access type, and data size can all be set as break
  820. conditions
  821.  
  822. • Supports sequential break function
  823.  
  824. Rev. 2.0, 02/99, page 5 of 830
  825.  
  826. ----------------------- Page 20-----------------------
  827.  
  828. Table 1.1 SH7750 Features (cont)
  829.  
  830. Item Features
  831.  
  832. Bus state • Supports external memory access
  833. controller (BSC)  64/32/16/8-bit external data bus
  834.  
  835. • External memory space divided into seven areas, each of up to 64
  836. Mbytes, with the following parameters settable for each area:
  837.  
  838.  Bus size (8, 16, 32, or 64 bits)
  839.  
  840.  Number of wait cycles (hardware wait function also supported)
  841.  
  842.  Direct connection of DRAM, synchronous DRAM, and burst ROM
  843. possible by setting space type
  844.  
  845.  Supports fast page mode and DRAM EDO
  846.  
  847.  Supports PCMCIA interface
  848.  
  849.  Chip select signals (&6 to &6) output for relevant areas
  850.  
  851. • DRAM/synchronous DRAM refresh functions
  852.  
  853.  Programmable refresh interval
  854.  
  855.  Supports CAS-before-RAS refresh mode and self-refresh mode
  856.  
  857. • DRAM/synchronous DRAM burst access function
  858.  
  859. • Big endian or little endian mode can be set
  860.  
  861. Direct memory • 4-channel physical address DMA controller
  862. access controller
  863. • Transfer data size: 8, 16, 32, or 64 bits, or 32 bytes
  864. (DMAC)
  865. • Address modes:
  866.  
  867.  1-bus-cycle single address mode
  868.  
  869.  2-bus-cycle dual address mode
  870.  
  871. • Transfer requests: External, on-chip module, or auto-requests
  872.  
  873. • Bus modes: Cycle-steal or burst mode
  874.  
  875. • Supports on-demand data transfer
  876.  
  877. Timer unit (TMU) • 3-channel auto-reload 32-bit timer
  878.  
  879. • Input capture function
  880.  
  881. • Choice of seven counter input clocks
  882.  
  883. Realtime clock • On-chip clock and calendar functions
  884. (RTC)
  885. • Built-in 32 kHz crystal oscillator with maximum 1/256 second resolution
  886. (cycle interrupts)
  887.  
  888. Rev. 2.0, 02/99, page 6 of 830
  889.  
  890. ----------------------- Page 21-----------------------
  891.  
  892. Table 1.1 SH7750 Features (cont)
  893.  
  894. Item Features
  895.  
  896. Serial • Two full-duplex communication channels (SCI, SCIF)
  897. communication
  898. • Channel 1 (SCI):
  899. interface
  900. (SCI, SCIF)  Choice of asynchronous mode or synchronous mode
  901.  
  902.  Supports smart card interface
  903.  
  904. • Channel 2 (SCIF):
  905.  
  906.  Supports asynchronous mode
  907.  
  908.  Separate 16-byte FIFOs provided for transmitter and receiver
  909.  
  910. Packages • 256-pin BGA, 208-pin QFP
  911.  
  912. Rev. 2.0, 02/99, page 7 of 830
  913.  
  914. ----------------------- Page 22-----------------------
  915.  
  916. 1.2 Block Diagram
  917.  
  918. Figure 1.1 shows an internal block diagram of the SH7750.
  919.  
  920. CPU UBC FPU
  921.  
  922. )
  923. s
  924. n )
  925. s
  926. o )
  927. i n
  928. t a ) ) )
  929. c o t a
  930. i e e t
  931. u t a d r r a
  932. r c d a o Lower 32-bit data o
  933. t u ( o t t d
  934. s r l s s t
  935. n t s ( ( ( i
  936. i s s b
  937. ( n e a a a -
  938. t
  939. s i r t t 2
  940. s ( d a a a 3
  941. d
  942. e a d d d
  943. r t t t t r
  944. d a a i i i e
  945. d t b b b p
  946. d i - - -
  947. t b 2 p
  948. a i - 2 4
  949. t b 2 3 3 Lower 32-bit data 6 U
  950. i - 3
  951. b 2
  952. 2- 3
  953. 3
  954.  
  955. I cache O cache
  956. ITLB CCN UTLB
  957. (8 kB) (16 kB)
  958.  
  959. s
  960. s
  961. e a a
  962. t t
  963. r a a
  964. d
  965. CPG d d d
  966. t t
  967. a i i
  968. t b b
  969. i - -
  970. b 2 2
  971. 9- 3 3
  972. 2
  973. INTC s
  974. u
  975. b
  976.  
  977. a
  978. t
  979. a
  980. d s
  981.  
  982. l u BSC
  983. SCI a b DMAC
  984. r
  985. e s
  986. (SCIF) h s
  987. p e
  988. i r
  989. r d
  990. e d
  991. p a
  992. t
  993. i l
  994. b a
  995. - r
  996. RTC 6 e
  997. 1 h a a
  998. p s t t
  999. i s a a
  1000. r e d d
  1001. e
  1002. r t t
  1003. P d i i
  1004. d b- b-
  1005. TMU A 4 4
  1006. 6 6
  1007.  
  1008. External
  1009. bus interface
  1010.  
  1011. 26-bit
  1012. 64-bit
  1013. address
  1014. data
  1015.  
  1016. CCN: Cache and TLB controller UTLB: Unified TLB (translation lookaside buffer)
  1017. BSC: Bus state controller RTC: Realtime clock
  1018. CPG: Clock pulse generator SCI: Serial communication interface
  1019. DMAC: Direct memory access controller SCIF: Serial communication interface with FIFO
  1020. FPU: Floating-point unit TMU: Timer unit
  1021. INTC: Interrupt controller UBC: User break controller
  1022. ITLB: Instruction TLB (translation lookaside buffer)
  1023.  
  1024.  
  1025. Figure 1.1 Block Diagram of SH7750 Functions
  1026.  
  1027. Rev. 2.0, 02/99, page 8 of 830
  1028.  
  1029. ----------------------- Page 23-----------------------
  1030.  
  1031. Section 2 Programming Model
  1032.  
  1033. 2.1 Data Formats
  1034.  
  1035. The data formats handled by the SH7750 are shown in figure 2.1.
  1036.  
  1037. 7 0
  1038. Byte (8 bits)
  1039.  
  1040. 15 0
  1041. Word (16 bits)
  1042.  
  1043. 31 0
  1044. Longword (32 bits)
  1045.  
  1046. 31 30 22 0
  1047. Single-precision floating-point (32 bits) s exp fraction
  1048.  
  1049. 63 62 51 0
  1050. Double-precision floating-point (64 bits) s exp fraction
  1051.  
  1052. Figure 2.1 Data Formats
  1053.  
  1054. Rev. 2.0, 02/99, page 9 of 830
  1055.  
  1056. ----------------------- Page 24-----------------------
  1057.  
  1058. 2.2 Register Configuration
  1059.  
  1060. 2.2.1 Privileged Mode and Banks
  1061.  
  1062. Processor Modes: The SH7750 has two processor modes, user mode and privileged mode. The
  1063. SH7750 normally operates in user mode, and switches to privileged mode when an exception
  1064. occurs or an interrupt is accepted. There are four kinds of registers—general registers, system
  1065. registers, control registers, and floating-point registers—and the registers that can be accessed
  1066. differ in the two processor modes.
  1067.  
  1068. General Registers: There are 16 general registers, designated R0 to R15. General registers R0
  1069. to R7 are banked registers which are switched by a processor mode change.
  1070.  
  1071. In privileged mode, the register bank bit (RB) in the status register (SR) defines which banked
  1072. register set is accessed as general registers, and which set is accessed only through the load
  1073. control register (LDC) and store control register (STC) instructions.
  1074.  
  1075. When the RB bit is 1 (that is, when bank 1 is selected), the 16 registers comprising bank 1
  1076. general registers R0_BANK1 to R7_BANK1 and non-banked general registers R8 to R15 can be
  1077. accessed as general registers R0 to R15. In this case, the eight registers comprising bank 0
  1078. general registers R0_BANK0 to R7_BANK0 are accessed by the LDC/STC instructions. When
  1079. the RB bit is 0 (that is, when bank 0 is selected), the 16 registers comprising bank 0 general
  1080. registers R0_BANK0 to R7_BANK0 and non-banked general registers R8 to R15 can be
  1081. accessed as general registers R0 to R15. In this case, the eight registers comprising bank 1
  1082. general registers R0_BANK1 to R7_BANK1 are accessed by the LDC/STC instructions.
  1083.  
  1084. In user mode, the 16 registers comprising bank 0 general registers R0_BANK0 to R7_BANK0
  1085. and non-banked general registers R8 to R15 can be accessed as general registers R0 to R15. The
  1086. eight registers comprising bank 1 general registers R0_BANK1 to R7_BANK1 cannot be
  1087. accessed.
  1088.  
  1089. Control Registers: Control registers comprise the global base register (GBR) and status register
  1090. (SR), which can be accessed in both processor modes, and the saved status register (SSR), saved
  1091. program counter (SPC), vector base register (VBR), saved general register 15 (SGR), and debug
  1092. base register (DBR), which can only be accessed in privileged mode. Some bits of the status
  1093. register (such as the RB bit) can only be accessed in privileged mode.
  1094.  
  1095. System Registers: System registers comprise the multiply-and-accumulate registers
  1096. (MACH/MACL), the procedure register (PR), the program counter (PC), the floating-point
  1097. status/control register (FPSCR), and the floating-point communication register (FPUL). Access
  1098. to these registers does not depend on the processor mode.
  1099.  
  1100. Rev. 2.0, 02/99, page 10 of 830
  1101.  
  1102. ----------------------- Page 25-----------------------
  1103.  
  1104. Floating-Point Registers: There are thirty-two floating-point registers, FR0–FR15 and XF0–
  1105. XF15. FR0–FR15 and XF0–XF15 can be assigned to either of two banks (FPR0_BANK0–
  1106. FPR15_BANK0 or FPR0_BANK1–FPR15_BANK1).
  1107.  
  1108. FR0–FR15 can be used as the eight registers DR0/2/4/6/8/10/12/14 (double-precision floating-
  1109. point registers, or pair registers) or the four registers FV0/4/8/12 (register vectors), while XF0–
  1110. XF15 can be used as the eight registers XD0/2/4/6/8/10/12/14 (register pairs) or register matrix
  1111. XMTRX.
  1112.  
  1113. Register values after a reset are shown in table 2.1.
  1114.  
  1115. Table 2.1 Initial Register Values
  1116.  
  1117. Type Registers Initial Value*
  1118.  
  1119. General registers R0_BANK0–R7_BANK0, Undefined
  1120. R0_BANK1–R7_BANK1,
  1121. R8–R15
  1122.  
  1123. Control registers SR MD bit = 1, RB bit = 1, BL bit = 1, FD bit = 0,
  1124. I3–I0 = 1111 (H'F), reserved bits = 0, others
  1125. undefined
  1126.  
  1127. GBR, SSR, SPC, SGR, Undefined
  1128. DBR
  1129.  
  1130. VBR H'00000000
  1131.  
  1132. System registers MACH, MACL, PR, FPUL Undefined
  1133.  
  1134. PC H'A0000000
  1135.  
  1136. FPSCR H'00040001
  1137.  
  1138. Floating-point FR0–FR15, XF0–XF15 Undefined
  1139. registers
  1140.  
  1141. Note: * Initialized by a power-on reset and manual reset.
  1142.  
  1143. The register configuration in each processor is shown in figure 2.2.
  1144.  
  1145. Switching between user mode and privileged mode is controlled by the processor mode bit (MD)
  1146. in the status register.
  1147.  
  1148. Rev. 2.0, 02/99, page 11 of 830
  1149.  
  1150. ----------------------- Page 26-----------------------
  1151.  
  1152. 31 0 31 0 31 0
  1153. 1, 2 1, 3 1, 4
  1154. _ _ _
  1155. R0 BANK0* * R0 BANK1* * R0 BANK0* *
  1156. 2 3 4
  1157. _ _ _
  1158. R1 BANK0* R1 BANK1* R1 BANK0*
  1159. 2 3 4
  1160. _ _ _
  1161. R2 BANK0* R2 BANK1* R2 BANK0*
  1162. 2 3 4
  1163. _ _ _
  1164. R3 BANK0* R3 BANK1* R3 BANK0*
  1165. 2 3 4
  1166. _ _ _
  1167. R4 BANK0* R4 BANK1* R4 BANK0*
  1168. 2 3 4
  1169. _ _ _
  1170. R5 BANK0* R5 BANK1* R5 BANK0*
  1171. 2 3 4
  1172. _ _ _
  1173. R6 BANK0* R6 BANK1* R6 BANK0*
  1174. 2 3 4
  1175. _ _ _
  1176. R7 BANK0* R7 BANK1* R7 BANK0*
  1177. R8 R8 R8
  1178. R9 R9 R9
  1179. R10 R10 R10
  1180. R11 R11 R11
  1181. R12 R12 R12
  1182. R13 R13 R13
  1183. R14 R14 R14
  1184. R15 R15 R15
  1185.  
  1186. SR SR SR
  1187. SSR SSR
  1188.  
  1189. GBR GBR GBR
  1190. MACH MACH MACH
  1191. MACL MACL MACL
  1192. PR PR PR
  1193. VBR VBR
  1194.  
  1195. PC PC PC
  1196. SPC SPC
  1197.  
  1198. SGR SGR
  1199.  
  1200. DBR DBR
  1201.  
  1202. 1, 4 1, 3
  1203. _
  1204. R0 BANK0* * _ *
  1205. R0 BANK1*
  1206. 4 3
  1207. _ _
  1208. R1 BANK0* R1 BANK1*
  1209. 4 3
  1210. _ _
  1211. R2 BANK0* R2 BANK1*
  1212. 4 3
  1213. _ _
  1214. R3 BANK0* R3 BANK1*
  1215. 4 3
  1216. _ _
  1217. R4 BANK0* R4 BANK1*
  1218. 4 3
  1219. _ _
  1220. R5 BANK0* R5 BANK1*
  1221. 4 3
  1222. _ _
  1223. R6 BANK0* R6 BANK1*
  1224. 4 3
  1225. _ _
  1226. R7 BANK0* R7 BANK1*
  1227. (a) Register configuration (b) Register configuration in (c) Register configuration in
  1228. in user mode privileged mode (RB = 1) privileged mode (RB = 0)
  1229.  
  1230. Notes: 1. The R0 register is used as the index register in indexed register-indirect addressing mode and
  1231. indexed GBR indirect addressing mode.
  1232. 2. Banked registers
  1233. 3. Banked registers
  1234. Accessed as general registers when the RB bit is set to 1 in the SR register. Accessed only by
  1235. LDC/STC instructions when the RB bit is cleared to 0.
  1236. 4. Banked registers
  1237. Accessed as general registers when the RB bit is cleared to 0 in the SR register. Accessed only by
  1238. LDC/STC instructions when the RB bit is set to 1.
  1239.  
  1240. Figure 2.2 CPU Register Configuration in Each Processor Mode
  1241.  
  1242. Rev. 2.0, 02/99, page 12 of 830
  1243.  
  1244. ----------------------- Page 27-----------------------
  1245.  
  1246. 2.2.2 General Registers
  1247.  
  1248. Figure 2.3 shows the relationship between the processor modes and general registers. The
  1249. SH7750 has twenty-four 32-bit general registers (R0_BANK0–R7_BANK0, R0_BANK1–
  1250. R7_BANK1, and R8–R15). However, only 16 of these can be accessed as general registers R0–
  1251. R15 in one processor mode. The SH7750 has two processor modes, user mode and privileged
  1252. mode, in which R0–R7 are assigned as shown below.
  1253.  
  1254. • R0_BANK0–R7_BANK0
  1255. In user mode (SR.MD = 0), R0–R7 are always assigned to R0_BANK0–R7_BANK0.
  1256. In privileged mode (SR.MD = 1), R0–R7 are assigned to R0_BANK0–R7_BANK0 only
  1257. when SR.RB = 0.
  1258. • R0_BANK1–R7_BANK1
  1259. In user mode, R0_BANK1–R7_BANK1 cannot be accessed.
  1260. In privileged mode, R0–R7 are assigned to R0_BANK1–R7_BANK1 only when SR.RB = 1.
  1261.  
  1262. Rev. 2.0, 02/99, page 13 of 830
  1263.  
  1264. ----------------------- Page 28-----------------------
  1265.  
  1266. SR.MD = 0 or
  1267. (SR.MD = 1, SR.RB = 0) (SR.MD = 1, SR.RB = 1)
  1268.  
  1269. R0 R0_BANK0 R0_BANK0
  1270. R1 R1_BANK0 R1_BANK0
  1271. R2 R2_BANK0 R2_BANK0
  1272. R3 R3_BANK0 R3_BANK0
  1273. R4 R4_BANK0 R4_BANK0
  1274. R5 R5_BANK0 R5_BANK0
  1275. R6 R6_BANK0 R6_BANK0
  1276. R7 R7_BANK0 R7_BANK0
  1277.  
  1278. R0_BANK1 R0_BANK1 R0
  1279. R1_BANK1 R1_BANK1 R1
  1280. R2_BANK1 R2_BANK1 R2
  1281. R3_BANK1 R3_BANK1 R3
  1282. R4_BANK1 R4_BANK1 R4
  1283. R5_BANK1 R5_BANK1 R5
  1284. R6_BANK1 R6_BANK1 R6
  1285. R7_BANK1 R7_BANK1 R7
  1286.  
  1287. R8 R8 R8
  1288. R9 R9 R9
  1289. R10 R10 R10
  1290. R11 R11 R11
  1291. R12 R12 R12
  1292. R13 R13 R13
  1293. R14 R14 R14
  1294. R15 R15 R15
  1295.  
  1296. Figure 2.3 General Registers
  1297.  
  1298. Programming Note: As the user’s R0–R7 are assigned to R0_BANK0–R7_BANK0, and after
  1299. an exception or interrupt R0–R7 are assigned to R0_BANK1–R7_BANK1, it is not necessary for
  1300. the interrupt handler to save and restore the user’s R0–R7 (R0_BANK0–R7_BANK0).
  1301.  
  1302. After a reset, the values of R0_BANK0–R7_BANK0, R0_BANK1–R7_BANK1, and R8–R15
  1303. are undefined.
  1304.  
  1305. Rev. 2.0, 02/99, page 14 of 830
  1306.  
  1307. ----------------------- Page 29-----------------------
  1308.  
  1309. 2.2.3 Floating-Point Registers
  1310.  
  1311. Figure 2.4 shows the floating-point registers. There are thirty-two 32-bit floating-point registers,
  1312. divided into two banks (FPR0_BANK0–FPR15_BANK0 and FPR0_BANK1–FPR15_BANK1).
  1313. These 32 registers are referenced as FR0–FR15, DR0/2/4/6/8/10/12/14, FV0/4/8/12, XF0–XF15,
  1314. XD0/2/4/6/8/10/12/14, or XMTRX. The correspondence between FPRn_BANKi and the
  1315. reference name is determined by the FR bit in FPSCR (see figure 2.4).
  1316.  
  1317. • Floating-point registers, FPRn_BANKi (32 registers)
  1318. FPR0_BANK0, FPR1_BANK0, FPR2_BANK0, FPR3_BANK0, FPR4_BANK0,
  1319. FPR5_BANK0, FPR6_BANK0, FPR7_BANK0, FPR8_BANK0, FPR9_BANK0,
  1320. FPR10_BANK0, FPR11_BANK0, FPR12_BANK0, FPR13_BANK0, FPR14_BANK0,
  1321. FPR15_BANK0
  1322. FPR0_BANK1, FPR1_BANK1, FPR2_BANK1, FPR3_BANK1, FPR4_BANK1,
  1323. FPR5_BANK1, FPR6_BANK1, FPR7_BANK1, FPR8_BANK1, FPR9_BANK1,
  1324. FPR10_BANK1, FPR11_BANK1, FPR12_BANK1, FPR13_BANK1, FPR14_BANK1,
  1325. FPR15_BANK1
  1326. • Single-precision floating-point registers, FRi (16 registers)
  1327. When FPSCR.FR = 0, FR0–FR15 are assigned to FPR0_BANK0–FPR15_BANK0.
  1328. When FPSCR.FR = 1, FR0–FR15 are assigned to FPR0_BANK1–FPR15_BANK1.
  1329. • Double-precision floating-point registers or single-precision floating-point register pairs, DRi
  1330. (8 registers): A DR register comprises two FR registers.
  1331. DR0 = {FR0, FR1}, DR2 = {FR2, FR3}, DR4 = {FR4, FR5}, DR6 = {FR6, FR7},
  1332. DR8 = {FR8, FR9}, DR10 = {FR10, FR11}, DR12 = {FR12, FR13}, DR14 = {FR14, FR15}
  1333. • Single-precision floating-point vector registers, FVi (4 registers): An FV register comprises
  1334. four FR registers
  1335. FV0 = {FR0, FR1, FR2, FR3}, FV4 = {FR4, FR5, FR6, FR7},
  1336. FV8 = {FR8, FR9, FR10, FR11}, FV12 = {FR12, FR13, FR14, FR15}
  1337. • Single-precision floating-point extended registers, XFi (16 registers)
  1338. When FPSCR.FR = 0, XF0–XF15 are assigned to FPR0_BANK1–FPR15_BANK1.
  1339. When FPSCR.FR = 1, XF0–XF15 are assigned to FPR0_BANK0–FPR15_BANK0.
  1340. • Single-precision floating-point extended register pairs, XDi (8 registers): An XD register
  1341. comprises two XF registers
  1342. XD0 = {XF0, XF1}, XD2 = {XF2, XF3}, XD4 = {XF4, XF5}, XD6 = {XF6, XF7},
  1343. XD8 = {XF8, XF9}, XD10 = {XF10, XF11}, XD12 = {XF12, XF13}, XD14 = {XF14,
  1344. XF15}
  1345. • Single-precision floating-point extended register matrix, XMTRX: XMTRX comprises all 16
  1346. XF registers
  1347.  
  1348. Rev. 2.0, 02/99, page 15 of 830
  1349.  
  1350. ----------------------- Page 30-----------------------
  1351.  
  1352. XMTRX = XF0 XF4 XF8 XF12
  1353. XF1 XF5 XF9 XF13
  1354. XF2 XF6 XF10 XF14
  1355. XF3 XF7 XF11 XF15
  1356.  
  1357. FPSCR.FR = 0 FPSCR.FR = 1
  1358.  
  1359. FV0 DR0 FR0 FPR0_BANK0 XF0 XD0 XMTRX
  1360. FR1 FPR1_BANK0 XF1
  1361. DR2 FR2 FPR2_BANK0 XF2 XD2
  1362. FR3 FPR3_BANK0 XF3
  1363. FV4 DR4 FR4 FPR4_BANK0 XF4 XD4
  1364. FR5 FPR5_BANK0 XF5
  1365. DR6 FR6 FPR6_BANK0 XF6 XD6
  1366. FR7 FPR7_BANK0 XF7
  1367. FV8 DR8 FR8 FPR8_BANK0 XF8 XD8
  1368. FR9 FPR9_BANK0 XF9
  1369. DR10 FR10 FPR10_BANK0 XF10 XD10
  1370. FR11 FPR11_BANK0 XF11
  1371. FV12 DR12 FR12 FPR12_BANK0 XF12 XD12
  1372. FR13 FPR13_BANK0 XF13
  1373. DR14 FR14 FPR14_BANK0 XF14 XD14
  1374. FR15 FPR15_BANK0 XF15
  1375.  
  1376. XMTRX XD0 XF0 FPR0_BANK1 FR0 DR0 FV0
  1377. XF1 FPR1_BANK1 FR1
  1378. XD2 XF2 FPR2_BANK1 FR2 DR2
  1379. XF3 FPR3_BANK1 FR3
  1380. XD4 XF4 FPR4_BANK1 FR4 DR4 FV4
  1381. XF5 FPR5_BANK1 FR5
  1382. XD6 XF6 FPR6_BANK1 FR6 DR6
  1383. XF7 FPR7_BANK1 FR7
  1384. XD8 XF8 FPR8_BANK1 FR8 DR8 FV8
  1385. XF9 FPR9_BANK1 FR9
  1386. XD10 XF10 FPR10_BANK1 FR10 DR10
  1387. XF11 FPR11_BANK1 FR11
  1388. XD12 XF12 FPR12_BANK1 FR12 DR12 FV12
  1389. XF13 FPR13_BANK1 FR13
  1390. XD14 XF14 FPR14_BANK1 FR14 DR14
  1391. XF15 FPR15_BANK1 FR15
  1392.  
  1393. Figure 2.4 Floating-Point Registers
  1394.  
  1395. Rev. 2.0, 02/99, page 16 of 830
  1396.  
  1397. ----------------------- Page 31-----------------------
  1398.  
  1399. Programming Note: After a reset, the values of FPR0_BANK0–FPR15_BANK0 and
  1400. FPR0_BANK1–FPR15_BANK1 are undefined.
  1401.  
  1402. 2.2.4 Control Registers
  1403.  
  1404. Status register, SR (32 bits, privilege protection, initial value = 0111 0000 0000 0000 0000
  1405. 00XX 1111 00XX)
  1406.  
  1407. 31 30 29 28 27 16 15 14 10 9 8 7 4 3 2 1 0
  1408.  
  1409. — MD RB BL — FD — M Q IMASK — S T
  1410.  
  1411. Note: —: Reserved. These bits are always read as 0, and should only be written with 0.
  1412. X: Undefined
  1413.  
  1414. • MD: Processor mode
  1415. MD = 0: User mode (some instructions cannot be executed, and some resources cannot be
  1416. accessed)
  1417. MD = 1: Privileged mode
  1418. • RB: General register bank specifier in privileged mode (set to 1 by a reset, exception, or
  1419. interrupt)
  1420. RB = 0: R0_BANK0–R7_BANK0 are accessed as general registers R0–R7. (R0_BANK1–
  1421. R7_BANK1 can be accessed using LDC/STC R0_BANK–R7_BANK instructions.)
  1422. RB = 1: R0_BANK1–R7_BANK1 are accessed as general registers R0–R7. (R0_BANK0–
  1423. R7_BANK0 can be accessed using LDC/STC R0_BANK–R7_BANK instructions.)
  1424. • BL: Exception/interrupt block bit (set to 1 by a reset, exception, or interrupt)
  1425. BL = 1: Interrupt requests are masked. If a general exception other than a user break occurs
  1426. while BL = 1, the processor switches to the reset state.
  1427. • FD: FPU disable bit (cleared to 0 by a reset)
  1428. FD = 1: An FPU instruction causes a general FPU disable exception, and if the FPU
  1429. instruction is in a delay slot, a slot FPU disable exception is generated. (FPU instructions:
  1430. H'F*** instructions, LDC(.L)/STS(.L) instructions for FPUL/FPSCR)
  1431. • M, Q: Used by the DIV0S, DIV0U, and DIV1 instructions.
  1432. • IMASK: Interrupt mask level
  1433. External interrupts of a lower level than IMASK are masked.
  1434. • S: Specifies a saturation operation for a MAC instruction.
  1435. • T: True/false condition or carry/borrow bit
  1436.  
  1437. Saved status register, SSR (32 bits, privilege protection, initial value undefined): The current
  1438. contents of SR are saved to SSR in the event of an exception or interrupt.
  1439.  
  1440. Saved program counter, SPC (32 bits, privilege protection, initial value undefined): The
  1441. address of an instruction at which an interrupt or exception occurs is saved to SPC.
  1442.  
  1443. Rev. 2.0, 02/99, page 17 of 830
  1444.  
  1445. ----------------------- Page 32-----------------------
  1446.  
  1447. Global base register, GBR (32 bits, initial value undefined): GBR is referenced as the base
  1448. address in a GBR-referencing MOV instruction.
  1449.  
  1450. Vector base register, VBR (32 bits, privilege protection, initial value = H'0000 0000): VBR
  1451. is referenced as the branch destination base address in the event of an exception or interrupt. For
  1452. details, see section 5, Exceptions.
  1453.  
  1454. Saved general register 15, SGR (32 bits, privilege protection, initial value undefined): The
  1455. contents of R15 are saved to SGR in the event of an exception or interrupt.
  1456.  
  1457. Debug base register, DBR (32 bits, privilege protection, initial value undefined): When the
  1458. user break debug function is enabled (BRCR.UBDE = 1), DBR is referenced as the user break
  1459. handler branch destination address instead of VBR.
  1460.  
  1461. 2.2.5 System Registers
  1462.  
  1463. Multiply-and-accumulate register high, MACH (32 bits, initial value undefined)
  1464. Multiply-and-accumulate register low, MACL (32 bits, initial value undefined)
  1465. MACH/MACL is used for the added value in a MAC instruction, and to store a MAC instruction
  1466. or MUL operation result.
  1467.  
  1468. Procedure register, PR (32 bits, initial value undefined): The return address is stored in PR in
  1469. a subroutine call using a BSR, BSRF, or JSR instruction, and PR is referenced by the subroutine
  1470. return instruction (RTS).
  1471.  
  1472. Program counter, PC (32 bits, initial value = H'A000 0000): PC indicates the instruction fetch
  1473. address.
  1474.  
  1475. Rev. 2.0, 02/99, page 18 of 830
  1476.  
  1477. ----------------------- Page 33-----------------------
  1478.  
  1479. Floating-point status/control register, FPSCR (32 bits, initial value = H'0004 0001)
  1480.  
  1481. 31 22 21 20 19 18 17 12 11 7 6 2 1 0
  1482.  
  1483. — FR SZ PR DN Cause Enable Flag RM
  1484.  
  1485. Note: —: Reserved. These bits are always read as 0, and should only be written with 0.
  1486.  
  1487. • FR: Floating-point register bank
  1488. FR = 0: FPR0_BANK0–FPR15_BANK0 are assigned to FR0–FR15; FPR0_BANK1–
  1489. FPR15_BANK1 are assigned to XF0–XF15.
  1490. FR = 1: FPR0_BANK0–FPR15_BANK0 are assigned to XF0–XF15; FPR0_BANK1–
  1491. FPR15_BANK1 are assigned to FR0–FR15.
  1492. • SZ: Transfer size mode
  1493. SZ = 0: The data size of the FMOV instruction is 32 bits.
  1494. SZ = 1: The data size of the FMOV instruction is a 32-bit register pair (64 bits).
  1495. • PR: Precision mode
  1496. PR = 0: Floating-point instructions are executed as single-precision operations.
  1497. PR = 1: Floating-point instructions are executed as double-precision operations (the result of
  1498. instructions for which double-precision is not supported is undefined).
  1499. Do not set SZ and PR to 1 simultaneously; this setting is reserved.
  1500. [SZ, PR = 11]: Reserved (FPU operation instruction is undefined.)
  1501. • DN: Denormalization mode
  1502. DN = 0: A denormalized number is treated as such.
  1503. DN = 1: A denormalized number is treated as zero.
  1504.  
  1505. FPU Invalid Division Overflow Underflow Inexact
  1506. Error (E) Operation (V) by Zero (Z) (O) (U) (I)
  1507.  
  1508. Cause FPU exception Bit 17 Bit 16 Bit 15 Bit 14 Bit 13 Bit 12
  1509. cause field
  1510.  
  1511. Enable FPU exception None Bit 11 Bit 10 Bit 9 Bit 8 Bit 7
  1512. enable field
  1513.  
  1514. Flag FPU exception None Bit 6 Bit 5 Bit 4 Bit 3 Bit 2
  1515. flag field
  1516.  
  1517. When an FPU operation instruction is executed, the cause field is cleared to zero first. When
  1518. the next FPU exception is requested, the corresponding bits in the cause field and flag field
  1519. are set to 1. The flag field holds the status of the exception generated after the field was last
  1520. cleared.
  1521.  
  1522. Rev. 2.0, 02/99, page 19 of 830
  1523.  
  1524. ----------------------- Page 34-----------------------
  1525.  
  1526. • RM: Rounding mode
  1527. RM = 00: Round to Nearest
  1528. RM = 01: Round to Zero
  1529. RM = 10: Reserved
  1530. RM = 11: Reserved
  1531. • Bits 22 to 31: Reserved
  1532.  
  1533. Floating-point communication register, FPUL (32 bits, initial value undefined): Data
  1534. transfer between FPU registers and CPU registers is carried out via the FPUL register.
  1535.  
  1536. Programming Note: When SZ = 1 and big endian mode is selected, FMOV can be used for
  1537. double-precision floating-point load or store operations. In little endian mode, two 32-bit data
  1538. size moves must be executed, with SZ = 0, to load or store a double-precision floating-point
  1539. number.
  1540.  
  1541. 2.3 Memory-Mapped Registers
  1542.  
  1543. Appendix A shows the control registers mapped to memory. The control registers are double-
  1544. mapped to the following two memory areas. All registers have two addresses.
  1545.  
  1546. H'1F00 0000–H'1FFF FFFF
  1547. H'FF00 0000–H'FFFF FFFF
  1548.  
  1549. These two areas are used as follows.
  1550.  
  1551. • H'1F00 0000–H'1FFF FFFF
  1552. This area must be accessed in address translation mode using the TLB. Since external
  1553. memory is defined as a 29-bit address space in the SH7750 architecture, the TLB’s physical
  1554. page numbers do not cover a 32-bit address space. In address translation, the page numbers
  1555. of this area can be set in the corresponding field of the TLB by accessing a memory-mapped
  1556. register. The page numbers of this area should be used as the actual page numbers set in the
  1557. TLB. When address translation is not performed, the operation of accesses to this area is
  1558. undefined.
  1559. • H'FF00 0000–H'FFFF FFFF
  1560. This area must be accessed without address translation.
  1561. Do not access undefined locations in either area The operation of an access to an undefined
  1562. location is undefined. Also, memory-mapped registers must be accessed using a fixed data
  1563. size. The operation of an access using an invalid data size is undefined.
  1564.  
  1565. Rev. 2.0, 02/99, page 20 of 830
  1566.  
  1567. ----------------------- Page 35-----------------------
  1568.  
  1569. Programming Note: Access to area H'FF00 0000–H'FFFF FFFF in user mode will cause an
  1570. address error. Memory-mapped registers can be referenced in user mode by means of access that
  1571. involves address translation.
  1572.  
  1573. 2.4 Data Format in Registers
  1574.  
  1575. Register operands are always longwords (32 bits). When a memory operand is only a byte (8
  1576. bits) or a word (16 bits), it is sign-extended into a longword when loaded into a register.
  1577.  
  1578. 31 0
  1579. Longword
  1580.  
  1581. 2.5 Data Formats in Memory
  1582.  
  1583. Memory data formats are classified into bytes, words, and longwords. Memory can be accessed
  1584. in 8-bit byte, 16-bit word, or 32-bit longword form. A memory operand less than 32 bits in
  1585. length is sign-extended before being loaded into a register.
  1586.  
  1587. A word operand must be accessed starting from a word boundary (even address of a 2-byte unit:
  1588. address 2n), and a longword operand starting from a longword boundary (even address of a 4-
  1589. byte unit: address 4n). An address error will result if this rule is not observed. A byte operand
  1590. can be accessed from any address.
  1591.  
  1592. Big endian or little endian byte order can be selected for the data format. The endian should be
  1593. set with the MD5 external pin in a power-on reset. Big endian is selected when the MD5 pin is
  1594. low, and little endian when high. The endian cannot be changed dynamically. Bit positions are
  1595. numbered left to right from most-significant to least-significant. Thus, in a 32-bit longword, the
  1596. leftmost bit, bit 31, is the most significant bit and the rightmost bit, bit 0, is the least significant
  1597. bit.
  1598.  
  1599. The data format in memory is shown in figure 2.5. In little endian mode, data written as byte-
  1600. size (8 bits) should be read as byte size, and data written as word-size (16 bits) should be read as
  1601. word size.
  1602.  
  1603. Rev. 2.0, 02/99, page 21 of 830
  1604.  
  1605. ----------------------- Page 36-----------------------
  1606.  
  1607. A A + 1 A + 2 A + 3 A + 11 A + 10 A + 9 A + 8
  1608.  
  1609. 31 23 15 7 0 31 23 15 7 0
  1610.  
  1611. 7 0 7 0 7 0 7 0 7 0 7 0 7 0 7 0
  1612. Address A Byte 0 Byte 1 Byte 2 Byte 3 Byte 3 Byte 2 Byte 1 Byte 0 Address A + 8
  1613.  
  1614. 15 0 15 0 15 0 15 0
  1615. Address A + 4 Word 0 Word 1 Word 1 Word 0 Address A + 4
  1616.  
  1617. 31 0 31 0
  1618. Address A + 8 Longword Longword Address A
  1619.  
  1620. Big endian Little endian
  1621.  
  1622. Figure 2.5 Data Formats In Memory
  1623.  
  1624. Note: The SH7750 does not support endian conversion for the 64-bit data format. Therefore, if
  1625. double-precision floating-point format (64-bit) access is performed in little endian mode,
  1626. the upper and lower 32 bits will be reversed.
  1627.  
  1628. 2.6 Processor States
  1629.  
  1630. The SH7750 has five processor states: the reset state, exception-handling state, bus-released
  1631. state, program execution state, and power-down state.
  1632.  
  1633. Reset State: In this state the CPU is reset. The reset state is entered when the 5(6(7 pin goes
  1634. low. The CPU enters the power-on reset state if the 05(6(7 pin is high, and the manual reset
  1635. state if the 05(6(7 pin is low. For more information on resets, see section 5, Exceptions.
  1636.  
  1637. In the power-on reset state, the internal state of the CPU and the on-chip peripheral module
  1638. registers are initialized. In the manual reset state, the internal state of the CPU and registers of
  1639. on-chip peripheral modules other than the bus state controller (BSC) are initialized. Since the
  1640. bus state controller (BSC) is not initialized in the manual reset state, refreshing operations
  1641. continue. Refer to the register configurations in the relevant sections for further details.
  1642.  
  1643. Exception-Handling State: This is a transient state during which the CPU’s processor state flow
  1644. is altered by a reset, general exception, or interrupt exception handling source.
  1645.  
  1646. In the case of a reset, the CPU branches to address H'A000 0000 and starts executing the user-
  1647. coded exception handling program.
  1648.  
  1649. In the case of a general exception or interrupt, the program counter (PC) contents are saved in
  1650. the saved program counter (SPC), the status register (SR) contents are saved in the saved status
  1651. register (SSR), and the R15 contents are saved in saved general register 15 (SGR). The CPU
  1652. branches to the start address of the user-coded exception service routine found from the sum of
  1653. the contents of the vector base address and the vector offset. See section 5, Exceptions, for more
  1654. information on resets, general exceptions, and interrupts.
  1655.  
  1656. Rev. 2.0, 02/99, page 22 of 830
  1657.  
  1658. ----------------------- Page 37-----------------------
  1659.  
  1660. Program Execution State: In this state the CPU executes program instructions in sequence.
  1661.  
  1662. Power-Down State: In the power-down state, CPU operation halts and power consumption is
  1663. reduced. The power-down state is entered by executing a SLEEP instruction. There are two
  1664. modes in the power-down state: sleep mode and standby mode. For details, see section 9, Power-
  1665. Down Modes.
  1666.  
  1667. Bus-Released State: In this state the CPU has released the bus to a device that requested it.
  1668.  
  1669. Transitions between the states are shown in figure 2.6.
  1670.  
  1671. From any state when From any state when
  1672. RESET = 0 and MRESET = 1 RESET = 0 and MRESET = 0
  1673.  
  1674.  
  1675. Power-on reset state Manual reset state
  1676. RESET = 0,
  1677. MRESET = 1
  1678. Reset state
  1679.  
  1680. RESET = 1, RESET = 1,
  1681. MRESET = 1 MRESET = 0
  1682.  
  1683. Exception-handling state
  1684.  
  1685. Bus request
  1686. Bus request
  1687. clearance
  1688. Interrupt Interrupt
  1689.  
  1690. Exception End of exception
  1691. Bus-released state interrupt transition
  1692. processing
  1693.  
  1694. Bus request
  1695. Bus
  1696. clearance
  1697. request
  1698.  
  1699. Bus request Bus request Program execution state
  1700. clearance
  1701.  
  1702. SLEEP instruction SLEEP instruction
  1703. with STBY bit with STBY bit set
  1704. cleared
  1705.  
  1706. Sleep mode Standby mode
  1707.  
  1708. Power-down state
  1709.  
  1710. Figure 2.6 Processor State Transitions
  1711.  
  1712. Rev. 2.0, 02/99, page 23 of 830
  1713.  
  1714. ----------------------- Page 38-----------------------
  1715.  
  1716. 2.7 Processor Modes
  1717.  
  1718. There are two processor modes: user mode and privileged mode. The processor mode is
  1719. determined by the processor mode bit (MD) in the status register (SR). User mode is selected
  1720. when the MD bit is cleared to 0, and privileged mode when the MD bit is set to 1. When the
  1721. reset state or exception state is entered, the MD bit is set to 1. When exception handling ends,
  1722. the MD bit is cleared to 0 and user mode is entered. There are certain registers and bits which
  1723. can only be accessed in privileged mode.
  1724.  
  1725. Rev. 2.0, 02/99, page 24 of 830
  1726.  
  1727. ----------------------- Page 39-----------------------
  1728.  
  1729. Section 3 Memory Management Unit (MMU)
  1730.  
  1731. 3.1 Overview
  1732.  
  1733. 3.1.1 Features
  1734.  
  1735. The SH7750 can handle 29-bit external memory space from an 8-bit address space identifier and
  1736. 32-bit logical (virtual) address space. Address translation from virtual address to physical
  1737. address is performed using the memory management unit (MMU) built into the SH7750. The
  1738. MMU performs high-speed address translation by caching user-created address translation table
  1739. information in an address translation buffer (translation lookaside buffer: TLB). The SH7750 has
  1740. four instruction TLB (ITLB) entries and 64 unified TLB (UTLB) entries. UTLB copies are
  1741. stored in the ITLB by hardware. A paging system is used for address translation, with support for
  1742. four page sizes (1, 4, and 64 kbytes, and 1 Mbyte). It is possible to set the virtual address space
  1743. access right and implement storage protection independently for privileged mode and user mode.
  1744.  
  1745. 3.1.2 Role of the MMU
  1746.  
  1747. The MMU was conceived as a means of making efficient use of physical memory. As shown in
  1748. figure 3.1, when a process is smaller in size than the physical memory, the entire process can be
  1749. mapped onto physical memory, but if the process increases in size to the point where it does not
  1750. fit into physical memory, it becomes necessary to divide the process into smaller parts, and map
  1751. the parts requiring execution onto physical memory on an ad hoc basis ((1)). Having this
  1752. mapping onto physical memory executed consciously by the process itself imposes a heavy
  1753. burden on the process. The virtual memory system was devised as a means of handling all
  1754. physical memory mapping to reduce this burden ((2)). With a virtual memory system, the size of
  1755. the available virtual memory is much larger than the actual physical memory, and processes are
  1756. mapped onto this virtual memory. Thus processes only have to consider their operation in virtual
  1757. memory, and mapping from virtual memory to physical memory is handled by the MMU. The
  1758. MMU is normally managed by the OS, and physical memory switching is carried out so as to
  1759. enable the virtual memory required by a task to be mapped smoothly onto physical memory.
  1760. Physical memory switching is performed via secondary storage, etc.
  1761.  
  1762. The virtual memory system that came into being in this way works to best effect in a time
  1763. sharing system (TSS) that allows a number of processes to run simultaneously ((3)). Running a
  1764. number of processes in a TSS did not increase efficiency since each process had to take account
  1765. of physical memory mapping. Efficiency is improved and the load on each process reduced by
  1766. the use of a virtual memory system ((4)). In this system, virtual memory is allocated to each
  1767. process. The task of the MMU is to map a number of virtual memory areas onto physical
  1768. memory in an efficient manner. It is also provided with memory protection functions to prevent
  1769. a process from inadvertently accessing another process’s physical memory.
  1770.  
  1771. Rev. 2.0, 02/99, page 25 of 830
  1772.  
  1773. ----------------------- Page 40-----------------------
  1774.  
  1775. When address translation from virtual memory to physical memory is performed using the
  1776. MMU, it may happen that the translation information has not been recorded in the MMU, or the
  1777. virtual memory of a different process is accessed by mistake. In such cases, the MMU will
  1778. generate an exception, change the physical memory mapping, and record the new address
  1779. translation information.
  1780.  
  1781. Although the functions of the MMU could be implemented by software alone, having address
  1782. translation performed by software each time a process accessed physical memory would be very
  1783. inefficient. For this reason, a buffer for address translation (the translation lookaside buffer:
  1784. TLB) is provided in hardware, and frequently used address translation information is placed
  1785. here. The TLB can be described as a cache for address translation information. However, unlike
  1786. a cache, if address translation fails—that is, if an exception occurs—switching of the address
  1787. translation information is normally performed by software. Thus memory management can be
  1788. performed in a flexible manner by software.
  1789.  
  1790. There are two methods by which the MMU can perform mapping from virtual memory to
  1791. physical memory: the paging method, using fixed-length address translation, and the segment
  1792. method, using variable-length address translation. With the paging method, the unit of
  1793. translation is a fixed-size address space called a page (usually from 1 to 64 kbytes in size).
  1794.  
  1795. In the following descriptions, the address space in virtual memory in the SH7750 is referred to
  1796. as virtual address space, and the address space in physical memory as physical address space.
  1797.  
  1798. Rev. 2.0, 02/99, page 26 of 830
  1799.  
  1800. ----------------------- Page 41-----------------------
  1801.  
  1802. Virtual
  1803. memory MMU Physical
  1804. Process 1
  1805. Physical memory
  1806. Physical Process 1
  1807. memory
  1808. memory
  1809. Process 1
  1810.  
  1811. (1) (2)
  1812.  
  1813. Virtual
  1814. Physical
  1815. Process 1 Process 1 memory
  1816. memory
  1817.  
  1818. MMU Physical
  1819. memory
  1820.  
  1821. Process 2 Process 2
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827. Process 3 Process 3
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834. (3) (4)
  1835.  
  1836. Figure 3.1 Role of the MMU
  1837.  
  1838.  
  1839.  
  1840. Rev. 2.0, 02/99, page 27 of 830
  1841.  
  1842. ----------------------- Page 42-----------------------
  1843.  
  1844. 3.1.3 Register Configuration
  1845.  
  1846. The MMU registers are shown in table 3.1.
  1847.  
  1848. Table 3.1 MMU Registers
  1849.  
  1850. Abbrevia- Initial P4 Area 7 Access
  1851. Name tion R/W Value*1 Address*2 Address*2 Size
  1852.  
  1853. Page table entry high PTEH R/W Undefined H'FF00 0000 H'1F00 0000 32
  1854. register
  1855.  
  1856. Page table entry low PTEL R/W Undefined H'FF00 0004 H'1F00 0004 32
  1857. register
  1858.  
  1859. Page table entry PTEA R/W Undefined H'FF00 0034 H'1F00 0034 32
  1860. assistance register
  1861.  
  1862. Translation table base TTB R/W Undefined H'FF00 0008 H'1F00 0008 32
  1863. register
  1864.  
  1865. TLB exception address TEA R/W Undefined H'FF00 000C H'1F00 000C 32
  1866. register
  1867.  
  1868. MMU control register MMUCR R/W H'0000 0000 H'FF00 0010 H'1F00 0010 32
  1869.  
  1870. Notes: 1. The initial value is the value after a power-on reset or manual reset.
  1871. 2. This is the address when using the virtual/physical address space P4 area. When
  1872. making an access from physical address space area 7 using the TLB, the upper 3 bits
  1873. of the address are ignored.
  1874.  
  1875. 3.1.4 Caution
  1876.  
  1877. Operation is not guaranteed if an area designated as a reserved area in this manual is accessed.
  1878.  
  1879. Rev. 2.0, 02/99, page 28 of 830
  1880.  
  1881. ----------------------- Page 43-----------------------
  1882.  
  1883. 3.2 Register Descriptions
  1884.  
  1885. There are six MMU-related registers.
  1886.  
  1887. 1. PTEH
  1888.  
  1889. 31 10 9 8 7 0
  1890.  
  1891. VPN — — ASID
  1892.  
  1893. 2. PTEL
  1894.  
  1895. 31 30 29 28 10 9 8 7 6 5 4 3 2 1 0
  1896.  
  1897. — — — PPN — V SZ PR SZ C D SH WT
  1898.  
  1899. 3. PTEA
  1900.  
  1901. 31 4 3 2 0
  1902.  
  1903. TC SA
  1904.  
  1905. 4. TTB
  1906.  
  1907. 31 0
  1908.  
  1909. TTB
  1910.  
  1911. 5. TEA
  1912.  
  1913. 31
  1914.  
  1915. Virtual address at which MMU exception or address error occurred
  1916.  
  1917. 6. MMUCR
  1918.  
  1919. 31 26 25 24 23 18 17 16 15 10 9 8 7 6 5 4 3 2 1 0
  1920.  
  1921. LRUI — — URB — — URC SV — — — — — TI — AT
  1922.  
  1923. SQMD
  1924.  
  1925. — indicates a reserved bit: the write value must be 0, and a read will return an undefined value.
  1926.  
  1927. Figure 3.2 MMU-Related Registers
  1928.  
  1929. Rev. 2.0, 02/99, page 29 of 830
  1930.  
  1931. ----------------------- Page 44-----------------------
  1932.  
  1933. 1. Page table entry high register (PTEH): Longword access to PTEH can be performed from
  1934. H'FF00 0000 in the P4 area and H'1F00 0000 in area 7. PTEH consists of the virtual page
  1935. number (VPN) and address space identifier (ASID). When an MMU exception or address error
  1936. exception occurs, the VPN of the virtual address at which the exception occurred is set in the
  1937. VPN field by hardware. VPN varies according to the page size, but the VPN set by hardware
  1938. when an exception occurs consists of the upper 22 bits of the virtual address which caused the
  1939. exception. VPN setting can also be carried out by software. The number of the currently
  1940. executing process is set in the ASID field by software. ASID is not updated by hardware. VPN
  1941. and ASID are recorded in the UTLB by means of the LDLTB instruction.
  1942.  
  1943. 2. Page table entry low register (PTEL): Longword access to PTEL can be performed from
  1944. H'FF00 0004 in the P4 area and H'1F00 0004 in area 7. PTEL is used to hold the physical page
  1945. number and page management information to be recorded in the UTLB by means of the LDTLB
  1946. instruction. The contents of this register are not changed unless a software directive is issued.
  1947.  
  1948. 3. Page table entry assistance register (PTEA): Longword access to PTEA can be performed
  1949. from H'FF00 0034 in the P4 area and H'1F00 0034 in area 7. PTEL is used to store assistance
  1950. bits for PCMCIA access to the UTLB by means of the LDTLB instruction. The contents of this
  1951. register are not changed unless a software directive is issued.
  1952.  
  1953. 4. Translation table base register (TTB): Longword access to TTB can be performed from
  1954. H'FF00 0008 in the P4 area and H'1F00 0008 in area 7. TTB is used, for example, to hold the
  1955. base address of the currently used page table. The contents of TTB are not changed unless a
  1956. software directive is issued. This register can be freely used by software.
  1957.  
  1958. 5. TLB exception address register (TEA): Longword access to TEA can be performed from
  1959. H'FF00 000C in the P4 area and H'1F00 000C in area 7. After an MMU exception or address
  1960. error exception occurs, the virtual address at which the exception occurred is set in TEA by
  1961. hardware. The contents of this register can be changed by software.
  1962.  
  1963. 6. MMU control register (MMUCR): MMUCR contains the following bits:
  1964. LRUI: Least recently used ITLB
  1965. URB: UTLB replace boundary
  1966. URC: UTLB replace counter
  1967. SQMD: Store queue mode bit
  1968. SV: Single virtual mode bit
  1969. TI: TLB invalidate
  1970. AT: Address translation bit
  1971.  
  1972. Longword access to MMUCR can be performed from H'FF00 0010 in the P4 area and H'1F00
  1973. 0010 in area 7. The individual bits perform MMU settings as shown below. Therefore, MMUCR
  1974. rewriting should be performed by a program in the P1 or P2 area. After MMUCR is updated, an
  1975. instruction that performs data access to the P0, P3, U0, or store queue area should be located at
  1976. least four instructions after the MMUCR update instruction. Also, a branch instruction to the P0,
  1977.  
  1978. Rev. 2.0, 02/99, page 30 of 830
  1979.  
  1980. ----------------------- Page 45-----------------------
  1981.  
  1982. P3, or U0 area should be located at least eight instructions after the MMUCR update instruction.
  1983. MMUCR contents can be changed by software. The LRUI bits and URC bits may also be
  1984. updated by hardware.
  1985.  
  1986. • LRUI: The LRU (least recently used) method is used to decide the ITLB entry to be replaced
  1987. in the event of an ITLB miss. The entry to be purged from the ITLB can be confirmed using
  1988. the LRUI bits. LRUI is updated by means of the algorithm shown below. A dash in this table
  1989. means that updating is not performed.
  1990.  
  1991. LRUI
  1992.  
  1993. [5] [4] [3] [2] [1] [0]
  1994.  
  1995. When ITLB entry 0 is used 0 0 0 — — —
  1996.  
  1997. When ITLB entry 1 is used 1 — — 0 0 —
  1998.  
  1999. When ITLB entry 2 is used — 1 — 1 — 0
  2000.  
  2001. When ITLB entry 3 is used — — 1 — 1 1
  2002.  
  2003. Other than the above — — — — — —
  2004.  
  2005. When the LRUI bit settings are as shown below, the corresponding ITLB entry is updated by
  2006. an ITLB miss. An asterisk in this table means “don’t care”.
  2007.  
  2008. LRUI
  2009.  
  2010. [5] [4] [3] [2] [1] [0]
  2011.  
  2012. ITLB entry 0 is updated 1 1 1 * * *
  2013.  
  2014. ITLB entry 1 is updated 0 * * 1 1 *
  2015.  
  2016. ITLB entry 2 is updated * 0 * 0 * 1
  2017.  
  2018. ITLB entry 3 is updated * * 0 * 0 0
  2019.  
  2020. Other than the above Setting prohibited
  2021.  
  2022. Ensure that values for which “Setting prohibited” is indicated in the above table are not set at
  2023. the discretion of software. After a power-on or manual reset the LRUI bits are initialized to
  2024. 0, and therefore a prohibited setting is never made by a hardware update.
  2025. • URB: Bits that indicate the UTLB entry boundary at which replacement is to be performed.
  2026. Valid only when URB > 0.
  2027.  
  2028. • URC: Random counter for indicating the UTLB entry for which replacement is to be
  2029. performed with an LDTLB instruction. URC is incremented each time the UTLB is accessed.
  2030. When URB > 0, URC is reset to 0 when the condition URC = URB occurs. Also note that, if
  2031. a value is written to URC by software which results in the condition URC > URB,
  2032. incrementing is first performed in excess of URB until URC = H'3F. URC is not incremented
  2033. by an LDTLB instruction.
  2034.  
  2035. Rev. 2.0, 02/99, page 31 of 830
  2036.  
  2037. ----------------------- Page 46-----------------------
  2038.  
  2039. • SQMD: Store queue mode bit. Specifies the right of access to the store queues.
  2040. 0: User/privileged access possible
  2041. 1: Privileged access possible (address error exception in case of user access)
  2042.  
  2043. • SV: Bit that switches between single virtual memory mode and multiple virtual memory
  2044. mode.
  2045. 0: Multiple virtual memory mode
  2046. 1: Single virtual memory mode
  2047. When this bit is changed, ensure that 1 is also written to the TI bit.
  2048.  
  2049. • TI: Writing 1 to this bit invalidates (clears to 0) all valid UTLB/ITLB bits. This bit always
  2050. returns 0 when read.
  2051.  
  2052. • AT: Specifies MMU enabling or disabling.
  2053. 0: MMU disabled
  2054. 1: MMU enabled
  2055. MMU exceptions are not generated when the AT bit is 0. In the case of software that does
  2056. not use the MMU, therefore, the AT bit should be cleared to 0.
  2057.  
  2058. 3.3 Memory Space
  2059.  
  2060. 3.3.1 Physical Memory Space
  2061.  
  2062. The SH7750 supports a 32-bit physical memory space, and can access a 4-Gbyte address space.
  2063. When the MMUCR.AT bit is cleared to 0 and the MMU is disabled, the address space is this
  2064. physical memory space. The physical memory space is divided into a number of areas, as shown
  2065. in figure 3.3. The physical memory space is permanently mapped onto 29-bit external memory
  2066. space; this correspondence can be implemented by ignoring the upper 3 bits of the physical
  2067. memory space addresses. In privileged mode, the 4-Gbyte space from the P0 area to the P4 area
  2068. can be accessed. In user mode, a 2-Gbyte space in the U0 area can be accessed. Accessing the
  2069. P1 to P4 areas (except the store queue area) in user mode will cause an address error.
  2070.  
  2071. Rev. 2.0, 02/99, page 32 of 830
  2072.  
  2073. ----------------------- Page 47-----------------------
  2074.  
  2075. External
  2076. memory space
  2077. H'0000 0000 Area 0 H'0000 0000
  2078.  
  2079. Area 1
  2080. Area 2
  2081. Area 3
  2082. P0 area Area 4 U0 area
  2083. Cacheable Area 5 Cacheable
  2084.  
  2085. Area 6
  2086. Area 7
  2087.  
  2088. H'8000 0000 H'8000 0000
  2089. P1 area
  2090. Cacheable
  2091. H'A000 0000
  2092. P2 area
  2093. Non-cacheable
  2094. Address error
  2095. H'C000 0000
  2096. P3 area
  2097. Cacheable
  2098. H'E000 0000 P4 area Store queue area H'E000 0000
  2099. H'E400 0000
  2100. Non-cacheable Address error
  2101. H'FFFF FFFF H'FFFF FFFF
  2102.  
  2103. Privileged mode User mode
  2104.  
  2105. Figure 3.3 Physical Memory Space (MMUCR.AT = 0)
  2106.  
  2107. P0, P1, P3, U0 Areas: The P0, P1, P3, and U0 areas can be accessed using the cache. Whether
  2108. or not the cache is used is determined by the cache control register (CCR). When the cache is
  2109. used, with the exception of the P1 area, switching between the copy-back method and the write-
  2110. through method for write accesses is specified by the CCR.WT bit. For the P1 area, switching is
  2111. specified by the CCR.CB bit. Zeroizing the upper 3 bits of an address in these areas gives the
  2112. corresponding external memory space address. However, since area 7 in the external memory
  2113. space is a reserved area, a reserved area also appears in these areas.
  2114.  
  2115. P2 Area: The P2 area cannot be accessed using the cache. In the P2 area, zeroizing the upper 3
  2116. bits of an address gives the corresponding external memory space address. However, since area
  2117. 7 in the external memory space is a reserved area, a reserved area also appears in this area.
  2118.  
  2119. P4 Area: The P4 area is mapped onto SH7750 on-chip I/O channels. This area cannot be
  2120. accessed using the cache. The P4 area is shown in detail in figure 3.4.
  2121.  
  2122. Rev. 2.0, 02/99, page 33 of 830
  2123.  
  2124. ----------------------- Page 48-----------------------
  2125.  
  2126. H'E000 0000
  2127. Store queue
  2128. H'E400 0000
  2129.  
  2130. Reserved area
  2131.  
  2132.  
  2133.  
  2134. H'F000 0000
  2135. Instruction cache address array
  2136. H'F100 0000
  2137. Instruction cache data array
  2138. H'F200 0000
  2139. Instruction TLB address array
  2140. H'F300 0000
  2141. Instruction TLB data arrays 1 and 2
  2142. H'F400 0000
  2143. Operand cache address array
  2144. H'F500 0000
  2145. Operand cache data array
  2146. H'F600 0000
  2147. Unified TLB address array
  2148. H'F700 0000
  2149. Unified TLB data arrays 1 and 2
  2150. H'F800 0000
  2151.  
  2152.  
  2153.  
  2154.  
  2155. Reserved area
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164. H'FF00 0000
  2165. Control register area
  2166.  
  2167. Figure 3.4 P4 Area
  2168.  
  2169. The area from H'E000 0000 to H'E3FF FFFF comprises addresses for accessing the store queues
  2170. (SQs). When the MMU is disabled (MMUCR.AT = 0), the SQ access right is specified by the
  2171. MMUCR.SQMD bit. For details, see section 4.6, Store Queues.
  2172.  
  2173. The area from H'F000 0000 to H'F0FF FFFF is used for direct access to the instruction cache
  2174. address array. For details, see section 4.5.1, IC Address Array.
  2175.  
  2176. The area from H'F100 0000 to H'F1FF FFFF is used for direct access to the instruction cache
  2177. data array. For details, see section 4.5.2, IC Data Array.
  2178.  
  2179. The area from H'F200 0000 to H'F2FF FFFF is used for direct access to the instruction TLB
  2180. address array. For details, see section 3.7.1, ITLB Address Array.
  2181.  
  2182. The area from H'F300 0000 to H'F3FF FFFF is used for direct access to instruction TLB data
  2183. arrays 1 and 2. For details, see sections 3.7.2, ITLB Data Array 1, and 3.7.3, ITLB Data Array 2.
  2184.  
  2185. Rev. 2.0, 02/99, page 34 of 830
  2186.  
  2187. ----------------------- Page 49-----------------------
  2188.  
  2189. The area from H'F400 0000 to H'F4FF FFFF is used for direct access to the operand cache
  2190. address array. For details, see section 4.5.3, OC Address Array.
  2191.  
  2192. The area from H'F500 0000 to H'F5FF FFFF is used for direct access to the operand cache data
  2193. array. For details, see section 4.5.4, OC Data Array.
  2194.  
  2195. The area from H'F600 0000 to H'F6FF FFFF is used for direct access to the unified TLB address
  2196. array. For details, see section 3.7.4, UTLB Address Array.
  2197.  
  2198. The area from H'F700 0000 to H'F7FF FFFF is used for direct access to unified TLB data arrays
  2199. 1 and 2. For details, see sections 3.7.5, UTLB Data Array 1, and 3.7.6, UTLB Data Array 2.
  2200.  
  2201. The area from H'FF00 0000 to H'FFFF FFFF is the on-chip peripheral module control register
  2202. area.
  2203.  
  2204. 3.3.2 External Memory Space
  2205.  
  2206. The SH7750 supports a 29-bit external memory space. The external memory space is divided
  2207. into eight areas as shown in figure 3.5. Areas 0 to 6 relate to memory, such as SRAM,
  2208. synchronous DRAM, DRAM, and PCMCIA. Area 7 is a reserved area. For details, see section
  2209. 13, Bus State Controller (BSC).
  2210.  
  2211. H'0000 0000
  2212. Area 0
  2213.  
  2214. H'0400 0000
  2215. Area 1
  2216.  
  2217. H'0800 0000
  2218. Area 2
  2219.  
  2220. H'0C00 0000
  2221. Area 3
  2222.  
  2223. H'1000 0000
  2224. Area 4
  2225.  
  2226. H'1400 0000
  2227. Area 5
  2228.  
  2229. H'1800 0000
  2230. Area 6
  2231.  
  2232. H'1C00 0000
  2233. Area 7 (reserved area)
  2234. H'1FFF FFFF
  2235.  
  2236. Figure 3.5 External Memory Space
  2237.  
  2238. Rev. 2.0, 02/99, page 35 of 830
  2239.  
  2240. ----------------------- Page 50-----------------------
  2241.  
  2242. 3.3.3 Virtual Memory Space
  2243.  
  2244. Setting the MMUCR.AT bit to 1 enables the P0, P3, and U0 areas of the physical memory space
  2245. in the SH7750 to be mapped onto any external memory space in 1-, 4-, or 64-kbyte, or 1-Mbyte,
  2246. page units. By using an 8-bit address space identifier, the P0, U0, P3, and store queue areas can
  2247. be increased to a maximum of 256. This is called the virtual memory space. Mapping from
  2248. virtual memory space to 29-bit external memory space is carried out using the TLB. Only when
  2249. area 7 in external memory space is accessed using virtual memory space, addresses H'1F00 0000
  2250. to H'1FFF FFFF of area 7 are not designated as a reserved area, but are equivalent to the P4 area
  2251. control register area in the physical memory space. Virtual memory space is illustrated in figure
  2252. 3.6.
  2253.  
  2254. 256 External 256
  2255. memory space
  2256.  
  2257. Area 0
  2258.  
  2259. Area 1
  2260.  
  2261. Area 2
  2262.  
  2263. P0 area Area 3
  2264. U0 area
  2265. Cacheable Area 4
  2266. Cacheable
  2267. Address translation possible Area 5 Address translation possible
  2268.  
  2269. Area 6
  2270.  
  2271. Area 7
  2272.  
  2273. P1 area
  2274. Cacheable
  2275. Address translation not possible
  2276.  
  2277. P2 area
  2278. Non-cacheable
  2279. Address translation not possible Address error
  2280.  
  2281. P3 area
  2282. Cacheable
  2283. Address translation possible
  2284. P4 area Store queue area
  2285. Non-cacheable
  2286. Address error
  2287. Address translation not possible
  2288.  
  2289. Privileged mode User mode
  2290.  
  2291. Figure 3.6 Virtual Memory Space (MMUCR.AT = 1)
  2292.  
  2293. Rev. 2.0, 02/99, page 36 of 830
  2294.  
  2295. ----------------------- Page 51-----------------------
  2296.  
  2297. P0, P3, U0 Areas: The P0 area (excluding addresses H'7C00 0000 to H'7FFF FFFF), P3 area,
  2298. and U0 area allow access using the cache and address translation using the TLB. These areas can
  2299. be mapped onto any external memory space in 1-, 4-, or 64-kbyte, or 1-Mbyte, page units. When
  2300. CCR is in the cache-enabled state and the TLB enable bit (C bit) is 1, accesses can be performed
  2301. using the cache. In write accesses to the cache, switching between the copy-back method and the
  2302. write-through method is indicated by the TLB write-through bit (WT bit), and is specified in
  2303. page units.
  2304.  
  2305. Only when the P0, P3, and U0 areas are mapped onto external memory space by means of the
  2306. TLB, addresses H'1F00 0000 to H'1FFF FFFF of area 7 in external memory space are allocated
  2307. to the control register area. This enables on-chip peripheral module control registers to be
  2308. accessed from the U0 area in user mode. In this case, the C bit for the corresponding page must
  2309. be cleared to 0.
  2310.  
  2311. In the cache enabled state, when areas P0, P3, and U0 are mapped onto the PCMCIA space by
  2312. means of TLB, it is necessary either to specify 1 for the WT bit or to specify 0 for the C bit; it is
  2313. not possible to use copy-back mode cache for the PCMCIA space.
  2314.  
  2315. P1, P2, P4 Areas: Address translation using the TLB cannot be performed for the P1, P2, or P4
  2316. area (except for the store queue area). Accesses to these areas are the same as for physical
  2317. memory space. The store queue area can be mapped onto any external memory space by the
  2318. MMU. However, operation in the case of an exception differs from that for normal P0, U0, and
  2319. P3 spaces. For details, see section 4.6, Store Queues.
  2320.  
  2321. 3.3.4 On-Chip RAM Space
  2322.  
  2323. In the SH7750, half (8 kbytes) of the instruction cache (16 kbytes) can be used as on-chip RAM.
  2324. This can be done by changing the CCR settings.
  2325.  
  2326. When the operand cache is used as on-chip RAM (CCR.ORA = 1), P0 area addresses H'7C00
  2327. 0000 to H'7FFF FFFF are an on-chip RAM area. Data accesses (byte/word/longword/quadword)
  2328. can be used in this area. This area can only be used in RAM mode.
  2329.  
  2330. 3.3.5 Address Translation
  2331.  
  2332. When the MMU is used, the virtual address space is divided into units called pages, and
  2333. translation to physical addresses is carried out in these page units. The address translation table
  2334. in external memory contains the physical addresses corresponding to virtual addresses and
  2335. additional information such as memory protection codes. Fast address translation is achieved by
  2336. caching the contents of the address translation table located in external memory into the TLB. In
  2337. the SH7750, basically, the ITLB is used for instruction accesses and the UTLB for data accesses.
  2338. In the event of an access to an area other than the P4 area, the accessed virtual address is
  2339. translated to a physical address. If the virtual address belongs to the P1 or P2 area, the physical
  2340. address is uniquely determined without accessing the TLB. If the virtual address belongs to the
  2341. Rev. 2.0, 02/99, page 37 of 830
  2342.  
  2343. ----------------------- Page 52-----------------------
  2344.  
  2345. P0, U0, or P3 area, the TLB is searched using the virtual address, and if the virtual address is
  2346. recorded in the TLB, a TLB hit is made and the corresponding physical address is read from the
  2347. TLB. If the accessed virtual address is not recorded in the TLB, a TLB miss exception is
  2348. generated and processing switches to the TLB miss exception routine. In the TLB miss
  2349. exception routine, the address translation table in external memory is searched, and the
  2350. corresponding physical address and page management information are recorded in the TLB.
  2351. After the return from the exception handling routine, the instruction which caused the TLB miss
  2352. exception is re-executed.
  2353.  
  2354. 3.3.6 Single Virtual Memory Mode and Multiple Virtual Memory Mode
  2355.  
  2356. There are two virtual memory systems, single virtual memory and multiple virtual memory,
  2357. either of which can be selected with the MMUCR.SV bit. In the single virtual memory system, a
  2358. number of processes run simultaneously, using virtual address space on an exclusive basis, and
  2359. the physical address corresponding to a particular virtual address is uniquely determined. In the
  2360. multiple virtual memory system, a number of processes run while sharing the virtual address
  2361. space, and a particular virtual address may be translated into different physical addresses
  2362. depending on the process. The only difference between the single virtual memory and multiple
  2363. virtual memory systems in terms of operation is in the TLB address comparison method (see
  2364. section 3.4.3, Address Translation Method).
  2365.  
  2366. 3.3.7 Address Space Identifier (ASID)
  2367.  
  2368. In multiple virtual memory mode, the 8-bit address space identifier (ASID) is used to distinguish
  2369. between processes running simultaneously while sharing the virtual address space. Software can
  2370. set the ASID of the currently executing process in PTEH in the MMU. The TLB does not have
  2371. to be purged when processes are switched by means of ASID.
  2372.  
  2373. In single virtual memory mode, ASID is used to provide memory protection for processes
  2374. running simultaneously while using the virtual memory space on an exclusive basis.
  2375.  
  2376. Rev. 2.0, 02/99, page 38 of 830
  2377.  
  2378. ----------------------- Page 53-----------------------
  2379.  
  2380. 3.4 TLB Functions
  2381.  
  2382. 3.4.1 Unified TLB (UTLB) Configuration
  2383.  
  2384. The unified TLB (UTLB) is so called because of its use for the following two purposes:
  2385.  
  2386. 1. To translate a virtual address to a physical address in a data access
  2387. 2. As a table of address translation information to be recorded in the instruction TLB in the
  2388. event of an ITLB miss
  2389.  
  2390. Information in the address translation table located in external memory is cached into the UTLB.
  2391. The address translation table contains virtual page numbers and address space identifiers, and
  2392. corresponding physical page numbers and page management information. Figure 3.7 shows the
  2393. overall configuration of the UTLB. The UTLB consists of 64 fully-associative type entries.
  2394. Figure 3.8 shows the relationship between the address format and page size.
  2395.  
  2396. Entry 0 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2397.  
  2398. Entry 1 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2399.  
  2400. Entry 2 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2401.  
  2402. Entry 63 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2403.  
  2404. Figure 3.7 UTLB Configuration
  2405.  
  2406. Rev. 2.0, 02/99, page 39 of 830
  2407.  
  2408. ----------------------- Page 54-----------------------
  2409.  
  2410. • 1-kbyte page
  2411.  
  2412. Virtual address Physical address
  2413. 31 10 9 0 28 10 9 0
  2414.  
  2415. VPN Offset PPN Offset
  2416.  
  2417. • 4-kbyte page
  2418.  
  2419. Virtual address Physical address
  2420. 31 12 11 0 28 12 11 0
  2421.  
  2422. VPN Offset PPN Offset
  2423.  
  2424. • 64-kbyte page
  2425.  
  2426. Virtual address Physical address
  2427. 31 16 15 0 28 16 15 0
  2428.  
  2429. VPN Offset PPN Offset
  2430.  
  2431. • 1-Mbyte page
  2432.  
  2433. Virtual address Physical address
  2434. 31 20 19 0 28 20 19 0
  2435.  
  2436. VPN Offset PPN Offset
  2437.  
  2438. Figure 3.8 Relationship between Page Size and Address Format
  2439.  
  2440. • VPN: Virtual page number
  2441. For 1-kbyte page: upper 22 bits of virtual address
  2442. For 4-kbyte page: upper 20 bits of virtual address
  2443. For 64-kbyte page: upper 16 bits of virtual address
  2444. For 1-Mbyte page: upper 12 bits of virtual address
  2445.  
  2446. • ASID: Address space identifier
  2447. Indicates the process that can access a virtual page.
  2448. In single virtual memory mode and user mode, or in multiple virtual memory mode, if the
  2449. SH bit is 0, this identifier is compared with the ASID in PTEH when address comparison is
  2450. performed.
  2451.  
  2452. • SH: Share status bit
  2453. When 0, pages are not shared by processes.
  2454. When 1, pages are shared by processes.
  2455.  
  2456. Rev. 2.0, 02/99, page 40 of 830
  2457.  
  2458. ----------------------- Page 55-----------------------
  2459.  
  2460. • SZ: Page size bits
  2461. Specify the page size.
  2462. 00: 1-kbyte page
  2463. 01: 4-kbyte page
  2464. 10: 64-kbyte page
  2465. 11: 1-Mbyte page
  2466.  
  2467. • V: Validity bit
  2468. Indicates whether the entry is valid.
  2469. 0: Invalid
  2470. 1: Valid
  2471. Cleared to 0 by a power-on reset.
  2472. Not affected by a manual reset.
  2473.  
  2474. • PPN: Physical page number
  2475. Upper 22 bits of the physical address.
  2476. With a 1-kbyte page, PPN bits [28:10] are valid.
  2477. With a 4-kbyte page, PPN bits [28:12] are valid.
  2478. With a 64-kbyte page, PPN bits [28:16] are valid.
  2479. With a 1-Mbyte page, PPN bits [28:20] are valid.
  2480. The synonym problem must be taken into account when setting the PPN (see section 3.5.5,
  2481. Avoiding Synonym Problems).
  2482.  
  2483. • PR: Protection key data
  2484. 2-bit data expressing the page access right as a code.
  2485. 00: Can be read only, in privileged mode
  2486. 01: Can be read and written in privileged mode
  2487. 10: Can be read only, in privileged or user mode
  2488. 11: Can be read and written in privileged mode or user mode
  2489.  
  2490. • C: Cacheability bit
  2491. Indicates whether a page is cacheable.
  2492. 0: Not cacheable
  2493. 1: Cacheable
  2494. When control register space is mapped, this bit must be cleared to 0.
  2495. When performing PCMCIA space mapping in the cache enabled state, either clear this bit to
  2496. 0 or set the WT bit to 1.
  2497.  
  2498. Rev. 2.0, 02/99, page 41 of 830
  2499.  
  2500. ----------------------- Page 56-----------------------
  2501.  
  2502. • D: Dirty bit
  2503. Indicates whether a write has been performed to a page.
  2504. 0: Write has not been performed
  2505. 1: Write has been performed
  2506.  
  2507. • WT: Write-through bit
  2508. Specifies the cache write mode.
  2509. 0: Copy-back mode
  2510. 1: Write-through mode
  2511. When performing PCMCIA space mapping in the cache enabled state, either set this bit to 1
  2512. or clear the C bit to 0.
  2513.  
  2514. • SA: Space attribute bits
  2515. Valid only when the page is mapped onto PCMCIA connected to area 5 or 6.
  2516. 000: Undefined
  2517. 001: Variable-size I/O space (base size according to ,2,6 signal)
  2518. 010: 8-bit I/O space
  2519. 011: 16-bit I/O space
  2520. 100: 8-bit common memory space
  2521. 101: 16-bit common memory space
  2522. 110: 8-bit attribute memory space
  2523. 111: 16-bit attribute memory space
  2524.  
  2525. • TC: Timing control bit
  2526. Used to select wait control register bits in the bus control unit for areas 5 and 6.
  2527. 0: WCR2 (A5W2–A5W0) and PCR (A5PCW1–A5PCW0, A5TED2–A5TED0, A5TEH2–
  2528. A5TEH0) are used
  2529. 1: WCR2 (A6W2–A6W0) and PCR (A6PCW1–A6PCW0, A6TED2–A6TED0, A6TEH2–
  2530. A6TEH0) are used
  2531.  
  2532. Rev. 2.0, 02/99, page 42 of 830
  2533.  
  2534. ----------------------- Page 57-----------------------
  2535.  
  2536. 3.4.2 Instruction TLB (ITLB) Configuration
  2537.  
  2538. The ITLB is used to translate a virtual address to a physical address in an instruction access.
  2539. Information in the address translation table located in the UTLB is cached into the ITLB. Figure
  2540. 3.9 shows the overall configuration of the ITLB. The ITLB consists of 4 fully-associative type
  2541. entries. The address translation information is almost the same as that in the UTLB, but with the
  2542. following differences:
  2543.  
  2544. 1. D and WT bits are not supported.
  2545. 2. There is only one PR bit, corresponding to the upper of the PR bits in the UTLB.
  2546.  
  2547. Entry 0 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2548.  
  2549. Entry 1 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2550.  
  2551. Entry 2 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2552.  
  2553. Entry 3 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2554.  
  2555.  
  2556.  
  2557. Figure 3.9 ITLB Configuration
  2558.  
  2559. Rev. 2.0, 02/99, page 43 of 830
  2560.  
  2561. ----------------------- Page 58-----------------------
  2562.  
  2563. 3.4.3 Address Translation Method
  2564.  
  2565. Figures 3.10 and 3.11 show flowcharts of memory accesses using the UTLB and ITLB.
  2566.  
  2567. Data access to virtual address (VA)
  2568.  
  2569. VA is VA is VA is VA is in P0, U0,
  2570. in P4 area in P2 area in P1 area or P3 area
  2571.  
  2572. On-chip I/O access 0 No
  2573. CCR.OCE? MMUCR.AT = 1
  2574.  
  2575. 1
  2576. Yes
  2577. 0
  2578. CCR.CB? CCR.WT?
  2579. 0
  2580. 1
  2581. SH = 0
  2582. No
  2583. and (MMUCR.SV = 0 or
  2584. SR.MD = 0)
  2585.  
  2586. Yes
  2587.  
  2588. No VPNs match No VPNs match
  2589. and V = 1 and ASIDs match and
  2590. V = 1
  2591.  
  2592. Yes Yes
  2593.  
  2594. Only one No
  2595. Data TLB miss entry matches
  2596.  
  2597. exception Yes
  2598.  
  2599.  
  2600. SR.MD?
  2601. Data TLB multiple
  2602. 0 (User) 1 (Privileged) hit exception
  2603.  
  2604. PR? Memory access
  2605. 00 or 10 11 01 or 11 00 or 10
  2606. 01 W W W W
  2607. R/W? R/W? R/W? R/W?
  2608.  
  2609. R R R R
  2610. 1
  2611. D?
  2612. Data TLB protection
  2613. 0
  2614. Data TLB protection violation exception
  2615. violation exception Initial page write
  2616.  
  2617. exception
  2618.  
  2619. C = 1 No
  2620. and CCR.OCE = 1
  2621.  
  2622. Yes
  2623. Cache access 0
  2624. WT?
  2625. in copy-back mode
  2626.  
  2627. 1
  2628. Cache access
  2629. in write-through mode
  2630.  
  2631. Memory access
  2632.  
  2633. (Non-cacheable)
  2634.  
  2635. Figure 3.10 Flowchart of Memory Access Using UTLB
  2636.  
  2637. Rev. 2.0, 02/99, page 44 of 830
  2638.  
  2639. ----------------------- Page 59-----------------------
  2640.  
  2641. Instruction access to virtual address (VA)
  2642.  
  2643. VA is VA is VA is VA is in P0, U0,
  2644. in P4 area in P2 area in P1 area or P3 area
  2645.  
  2646. Access prohibited 0 CCR.ICE? No MMUCR.AT = 1
  2647.  
  2648. 1
  2649. Yes
  2650.  
  2651. SH = 0
  2652. No
  2653. and (MMUCR.SV = 0 or
  2654. SR.MD = 0)
  2655.  
  2656. Yes
  2657.  
  2658. No VPNs match No VPNs match
  2659. and V = 1 and ASIDs match and
  2660. V = 1
  2661.  
  2662. Yes
  2663. Yes
  2664.  
  2665. Hardware ITLB Only one No
  2666. Search UTLB miss handling entry matches
  2667.  
  2668. Yes
  2669. Yes
  2670. Match? Record in ITLB
  2671.  
  2672. No
  2673.  
  2674. SR.MD?
  2675. Instruction TLB 0 (User)
  2676. miss exception
  2677. 1 (Privileged)
  2678. 0
  2679. PR?
  2680. Instruction TLB
  2681. 1 multiple hit exception
  2682.  
  2683. Instruction TLB protection C = 1 No
  2684. violation exception and CCR.ICE = 1
  2685.  
  2686. Yes
  2687.  
  2688. Cache access
  2689.  
  2690. Memory access
  2691.  
  2692. (Non-cacheable)
  2693.  
  2694. Figure 3.11 Flowchart of Memory Access Using ITLB
  2695.  
  2696. Rev. 2.0, 02/99, page 45 of 830
  2697.  
  2698. ----------------------- Page 60-----------------------
  2699.  
  2700. 3.5 MMU Functions
  2701.  
  2702. 3.5.1 MMU Hardware Management
  2703.  
  2704. The SH7750 supports the following MMU functions.
  2705.  
  2706. 1. The MMU decodes the virtual address to be accessed by software, and performs address
  2707. translation by controlling the UTLB/ITLB in accordance with the MMUCR settings.
  2708. 2. The MMU determines the cache access status on the basis of the page management
  2709. information read during address translation (C, WT, SA, and TC bits).
  2710. 3. If address translation cannot be performed normally in a data access or instruction access, the
  2711. MMU notifies software by means of an MMU exception.
  2712. 4. If address translation information is not recorded in the ITLB in an instruction access, the
  2713. MMU searches the UTLB, and if the necessary address translation information is recorded in
  2714. the UTLB, the MMU copies this information into the ITLB in accordance with
  2715. MMUCR.LRUI.
  2716.  
  2717. 3.5.2 MMU Software Management
  2718.  
  2719. Software processing for the MMU consists of the following:
  2720.  
  2721. 1. Setting of MMU-related registers. Some registers are also partially updated by hardware
  2722. automatically.
  2723. 2. Recording, deletion, and reading of TLB entries. There are two methods of recording UTLB
  2724. entries: by using the LDTLB instruction, or by writing directly to the memory-mapped
  2725. UTLB. ITLB entries can only be recorded by writing directly to the memory-mapped ITLB.
  2726. For deleting or reading UTLB/ITLB entries, it is possible to access the memory-mapped
  2727. UTLB/ITLB.
  2728. 3. MMU exception handling. When an MMU exception occurs, processing is performed based
  2729. on information set by hardware.
  2730.  
  2731. 3.5.3 MMU Instruction (LDTLB)
  2732.  
  2733. A TLB load instruction (LDTLB) is provided for recording UTLB entries. When an LDTLB
  2734. instruction is issued, the SH7750 copies the contents of PTEH, PTEL, and PTEA to the UTLB
  2735. entry indicated by MMUCR.URC. ITLB entries are not updated by the LDTLB instruction, and
  2736. therefore address translation information purged from the UTLB entry may still remain in the
  2737. ITLB entry. As the LDTLB instruction changes address translation information, ensure that it is
  2738. issued by a program in the P1 or P2 area. The operation of the LDTLB instruction is shown in
  2739. figure 3.12.
  2740.  
  2741. Rev. 2.0, 02/99, page 46 of 830
  2742.  
  2743. ----------------------- Page 61-----------------------
  2744.  
  2745. MMUCR
  2746. 31 26 25 24 23 18 17 16 15 10 9 8 7 3 2 1 0
  2747.  
  2748. LRUI — URB — URC SV — TI —AT
  2749.  
  2750. Entry specification SQMD
  2751.  
  2752. PTEL
  2753. 31 29 28 10 9 8 7 6 5 4 3 2 1 0
  2754.  
  2755. — PPN — V SZ PR SZ C D SH WT
  2756. PTEH
  2757. 31 10 9 8 7 0
  2758.  
  2759. VPN — ASID PTEA
  2760.  
  2761. 31 4 3 2 0
  2762.  
  2763. — TC SA
  2764.  
  2765. Write
  2766.  
  2767. Entry 0 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2768.  
  2769. Entry 1 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2770.  
  2771. Entry 2 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2772.  
  2773. Entry 63 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR [1:0] D WT SA [2:0] TC
  2774.  
  2775. UTLB
  2776.  
  2777. Figure 3.12 Operation of LDTLB Instruction
  2778.  
  2779. 3.5.4 Hardware ITLB Miss Handling
  2780.  
  2781. In an instruction access, the SH7750 searches the ITLB. If it cannot find the necessary address
  2782. translation information (i.e. in the event of an ITLB miss), the UTLB is searched by hardware,
  2783. and if the necessary address translation information is present, it is recorded in the ITLB. This
  2784. procedure is known as hardware ITLB miss handling. If the necessary address translation
  2785. information is not found in the UTLB search, an instruction TLB miss exception is generated
  2786. and processing passes to software.
  2787.  
  2788. Rev. 2.0, 02/99, page 47 of 830
  2789.  
  2790. ----------------------- Page 62-----------------------
  2791.  
  2792. 3.5.5 Avoiding Synonym Problems
  2793.  
  2794. When 1- or 4-kbyte pages are recorded in TLB entries, a synonym problem may arise. The
  2795. problem is that, when a number of virtual addresses are mapped onto a single physical address,
  2796. the same physical address data is recorded in a number of cache entries, and it becomes
  2797. impossible to guarantee data integrity. This problem does not occur with the instruction TLB or
  2798. instruction cache . In the SH7750, entry specification is performed using bits [13:5] of the virtual
  2799. address in order to achieve fast operand cache operation. However, bits [13:10] of the virtual
  2800. address in the case of a 1-kbyte page, and bits [13:12] of the virtual address in the case of a 4-
  2801. kbyte page, are subject to address translation. As a result, bits [13:10] of the physical address
  2802. after translation may differ from bits [13:10] of the virtual address.
  2803.  
  2804. Consequently, the following restrictions apply to the recording of address translation information
  2805. in UTLB entries.
  2806.  
  2807. 1. When address translation information whereby a number of 1-kbyte page UTLB entries are
  2808. translated into the same physical address is recorded in the UTLB, ensure that the VPN
  2809. [13:10] values are the same.
  2810. 2. When address translation information whereby a number of 4-kbyte page UTLB entries are
  2811. translated into the same physical address is recorded in the UTLB, ensure that the VPN
  2812. [13:12] values are the same.
  2813. 3. Do not use 1-kbyte page UTLB entry physical addresses with UTLB entries of a different
  2814. page size.
  2815. 4. Do not use 4-kbyte page UTLB entry physical addresses with UTLB entries of a different
  2816. page size.
  2817.  
  2818. The above restrictions apply only when performing accesses using the cache. When cache index
  2819. mode is used, VPN [25] is used for the entry address instead of VPN [13], and therefore the
  2820. above restrictions apply to VPN [25].
  2821.  
  2822. Note: When multiple items of address translation information use the same physical memory to
  2823. provide for future SH Series expansion, ensure that the VPN [20:10] values are the same.
  2824. Also, do not use the same physical address for address translation information of
  2825. different page sizes.
  2826.  
  2827. Rev. 2.0, 02/99, page 48 of 830
  2828.  
  2829. ----------------------- Page 63-----------------------
  2830.  
  2831. 3.6 MMU Exceptions
  2832.  
  2833. There are seven MMU exceptions: the instruction TLB multiple hit exception, instruction TLB
  2834. miss exception, instruction TLB protection violation exception, data TLB multiple hit exception,
  2835. data TLB miss exception, data TLB protection violation exception, and initial page write
  2836. exception. Refer to figures 3.10 and 3.11 for the conditions under which each of these
  2837. exceptions occurs.
  2838.  
  2839. 3.6.1 Instruction TLB Multiple Hit Exception
  2840.  
  2841. An instruction TLB multiple hit exception occurs when more than one ITLB entry matches the
  2842. virtual address to which an instruction access has been made. If multiple hits occur when the
  2843. UTLB is searched by hardware in hardware ITLB miss handling, a data TLB multiple hit
  2844. exception will result.
  2845.  
  2846. When an instruction TLB multiple hit exception occurs a reset is executed, and cache coherency
  2847. is not guaranteed.
  2848.  
  2849. Hardware Processing: In the event of an instruction TLB multiple hit exception, hardware
  2850. carries out the following processing:
  2851.  
  2852. 1. Sets the virtual address at which the exception occurred in TEA.
  2853. 2. Sets exception code H'140 in EXPEVT.
  2854. 3. Branches to the reset handling routine (H'A000 0000).
  2855.  
  2856. Software Processing (Reset Routine): The ITLB entries which caused the multiple hit
  2857. exception are checked in the reset handling routine. This exception is intended for use in
  2858. program debugging, and should not normally be generated.
  2859.  
  2860. Rev. 2.0, 02/99, page 49 of 830
  2861.  
  2862. ----------------------- Page 64-----------------------
  2863.  
  2864. 3.6.2 Instruction TLB Miss Exception
  2865.  
  2866. An instruction TLB miss exception occurs when address translation information for the virtual
  2867. address to which an instruction access is made is not found in the UTLB entries by the hardware
  2868. ITLB miss handling procedure. The instruction TLB miss exception processing carried out by
  2869. hardware and software is shown below. This is the same as the processing for a data TLB miss
  2870. exception.
  2871.  
  2872. Hardware Processing: In the event of an instruction TLB miss exception, hardware carries out
  2873. the following processing:
  2874.  
  2875. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  2876. 2. Sets the virtual address at which the exception occurred in TEA.
  2877. 3. Sets exception code H'040 in EXPEVT.
  2878. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  2879. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  2880. delayed branch instruction in SPC.
  2881. 5. Sets the SR contents at the time of the exception in SSR.
  2882. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  2883. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  2884. 8. Sets the RB bit in SR to 1.
  2885. 9. Branches to the address obtained by adding offset H'0000 0400 to the contents of VBR, and
  2886. starts the instruction TLB miss exception handling routine.
  2887.  
  2888. Software Processing (Instruction TLB Miss Exception Handling Routine): Software is
  2889. responsible for searching the external memory page table and assigning the necessary page table
  2890. entry. Software should carry out the following processing in order to find and assign the
  2891. necessary page table entry.
  2892.  
  2893. 1. Write to PTEL the values of the PPN, PR, SZ, C, D, SH, V, and WT bits in the page table
  2894. entry recorded in the external memory address translation table. If necessary, the values of
  2895. the SA and TC bits should be written to PTEA.
  2896. 2. When the entry to be replaced in entry replacement is specified by software, write that value
  2897. to URC in the MMUCR register. If URC is greater than URB at this time, the value should
  2898. be changed to an appropriate value after issuing an LDTLB instruction.
  2899. 3. Execute the LDTLB instruction and write the contents of PTEH, PTEL, and PTEA to the
  2900. TLB.
  2901. 4. Finally, execute the exception handling return instruction (RTE), terminate the exception
  2902. handling routine, and return control to the normal flow. The RTE instruction should be
  2903. issued at least one instruction after the LDTLB instruction.
  2904.  
  2905. Rev. 2.0, 02/99, page 50 of 830
  2906.  
  2907. ----------------------- Page 65-----------------------
  2908.  
  2909. 3.6.3 Instruction TLB Protection Violation Exception
  2910.  
  2911. An instruction TLB protection violation exception occurs when, even though an ITLB entry
  2912. contains address translation information matching the virtual address to which an instruction
  2913. access is made, the actual access type is not permitted by the access right specified by the PR
  2914. bit. The instruction TLB protection violation exception processing carried out by hardware and
  2915. software is shown below.
  2916.  
  2917. Hardware Processing: In the event of an instruction TLB protection violation exception,
  2918. hardware carries out the following processing:
  2919.  
  2920. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  2921. 2. Sets the virtual address at which the exception occurred in TEA.
  2922. 3. Sets exception code H'0A0 in EXPEVT.
  2923. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  2924. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  2925. delayed branch instruction in SPC.
  2926. 5. Sets the SR contents at the time of the exception in SSR.
  2927. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  2928. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  2929. 8. Sets the RB bit in SR to 1.
  2930. 9. Branches to the address obtained by adding offset H'0000 0100 to the contents of VBR, and
  2931. starts the instruction TLB protection violation exception handling routine.
  2932.  
  2933. Software Processing (Instruction TLB Protection Violation Exception Handling Routine):
  2934. Resolve the instruction TLB protection violation, execute the exception handling return
  2935. instruction (RTE), terminate the exception handling routine, and return control to the normal
  2936. flow. The RTE instruction should be issued at least one instruction after the LDTLB instruction.
  2937.  
  2938. Rev. 2.0, 02/99, page 51 of 830
  2939.  
  2940. ----------------------- Page 66-----------------------
  2941.  
  2942. 3.6.4 Data TLB Multiple Hit Exception
  2943.  
  2944. A data TLB multiple hit exception occurs when more than one UTLB entry matches the virtual
  2945. address to which a data access has been made. A data TLB multiple hit exception is also
  2946. generated if multiple hits occur when the UTLB is searched in hardware ITLB miss handling.
  2947.  
  2948. When a data TLB multiple hit exception occurs a reset is executed, and cache coherency is not
  2949. guaranteed. The contents of PPN in the UTLB prior to the exception may also be corrupted.
  2950.  
  2951. Hardware Processing: In the event of a data TLB multiple hit exception, hardware carries out
  2952. the following processing:
  2953.  
  2954. 1. Sets the virtual address at which the exception occurred in TEA.
  2955. 2. Sets exception code H'140 in EXPEVT.
  2956. 3. Branches to the reset handling routine (H'A000 0000).
  2957.  
  2958. Software Processing (Reset Routine): The UTLB entries which caused the multiple hit
  2959. exception are checked in the reset handling routine. This exception is intended for use in
  2960. program debugging, and should not normally be generated.
  2961.  
  2962. 3.6.5 Data TLB Miss Exception
  2963.  
  2964. A data TLB miss exception occurs when address translation information for the virtual address
  2965. to which a data access is made is not found in the UTLB entries. The data TLB miss exception
  2966. processing carried out by hardware and software is shown below.
  2967.  
  2968. Hardware Processing: In the event of a data TLB miss exception, hardware carries out the
  2969. following processing:
  2970.  
  2971. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  2972. 2. Sets the virtual address at which the exception occurred in TEA.
  2973. 3. Sets exception code H'040 in the case of a read, or H'060 in the case of a write, in EXPEVT
  2974. (OCBP, OCBWB: read; OCBI, MOVCA.L: write).
  2975. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  2976. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  2977. delayed branch instruction in SPC.
  2978. 5. Sets the SR contents at the time of the exception in SSR.
  2979. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  2980. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  2981. 8. Sets the RB bit in SR to 1.
  2982. 9. Branches to the address obtained by adding offset H'0000 0400 to the contents of VBR, and
  2983. starts the data TLB miss exception handling routine.
  2984.  
  2985. Rev. 2.0, 02/99, page 52 of 830
  2986.  
  2987. ----------------------- Page 67-----------------------
  2988.  
  2989. Software Processing (Data TLB Miss Exception Handling Routine): Software is responsible
  2990. for searching the external memory page table and assigning the necessary page table entry.
  2991. Software should carry out the following processing in order to find and assign the necessary
  2992. page table entry.
  2993.  
  2994. 1. Write to PTEL the values of the PPN, PR, SZ, C, D, SH, V, and WT bits in the page table
  2995. entry recorded in the external memory address translation table. If necessary, the values of
  2996. the SA and TC bits should be written to PTEA.
  2997. 2. When the entry to be replaced in entry replacement is specified by software, write that value
  2998. to URC in the MMUCR register. If URC is greater than URB at this time, the value should
  2999. be changed to an appropriate value after issuing an LDTLB instruction.
  3000. 3. Execute the LDTLB instruction and write the contents of PTEH, PTEL, and PTEA to the
  3001. UTLB.
  3002. 4. Finally, execute the exception handling return instruction (RTE), terminate the exception
  3003. handling routine, and return control to the normal flow. The RTE instruction should be
  3004. issued at least one instruction after the LDTLB instruction.
  3005.  
  3006. 3.6.6 Data TLB Protection Violation Exception
  3007.  
  3008. A data TLB protection violation exception occurs when, even though a UTLB entry contains
  3009. address translation information matching the virtual address to which a data access is made, the
  3010. actual access type is not permitted by the access right specified by the PR bit. The data TLB
  3011. protection violation exception processing carried out by hardware and software is shown below.
  3012.  
  3013. Hardware Processing: In the event of a data TLB protection violation exception, hardware
  3014. carries out the following processing:
  3015.  
  3016. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  3017. 2. Sets the virtual address at which the exception occurred in TEA.
  3018. 3. Sets exception code H'0A0 in the case of a read, or H'0C0 in the case of a write, in EXPEVT
  3019. (OCBP, OCBWB: read; OCBI, MOVCA.L: write).
  3020. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  3021. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  3022. delayed branch instruction in SPC.
  3023. 5. Sets the SR contents at the time of the exception in SSR.
  3024. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  3025. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  3026. 8. Sets the RB bit in SR to 1.
  3027. 9. Branches to the address obtained by adding offset H'0000 0100 to the contents of VBR, and
  3028. starts the data TLB protection violation exception handling routine.
  3029.  
  3030. Rev. 2.0, 02/99, page 53 of 830
  3031.  
  3032. ----------------------- Page 68-----------------------
  3033.  
  3034. Software Processing (Data TLB Protection Violation Exception Handling Routine): Resolve
  3035. the data TLB protection violation, execute the exception handling return instruction (RTE),
  3036. terminate the exception handling routine, and return control to the normal flow. The RTE
  3037. instruction should be issued at least one instruction after the LDTLB instruction.
  3038.  
  3039. 3.6.7 Initial Page Write Exception
  3040.  
  3041. An initial page write exception occurs when the D bit is 0 even though a UTLB entry contains
  3042. address translation information matching the virtual address to which a data access (write) is
  3043. made, and the access is permitted. The initial page write exception processing carried out by
  3044. hardware and software is shown below.
  3045.  
  3046. Hardware Processing: In the event of an initial page write exception, hardware carries out the
  3047. following processing:
  3048.  
  3049. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  3050. 2. Sets the virtual address at which the exception occurred in TEA.
  3051. 3. Sets exception code H'080 in EXPEVT.
  3052. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  3053. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  3054. delayed branch instruction in SPC.
  3055. 5. Sets the SR contents at the time of the exception in SSR.
  3056. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  3057. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  3058. 8. Sets the RB bit in SR to 1.
  3059. 9. Branches to the address obtained by adding offset H'0000 0100 to the contents of VBR, and
  3060. starts the initial page write exception handling routine.
  3061.  
  3062. Rev. 2.0, 02/99, page 54 of 830
  3063.  
  3064. ----------------------- Page 69-----------------------
  3065.  
  3066. Software Processing (Initial Page Write Exception Handling Routine): The following
  3067. processing should be carried out as the responsibility of software:
  3068.  
  3069. 1. Retrieve the necessary page table entry from external memory.
  3070. 2. Write 1 to the D bit in the external memory page table entry.
  3071. 3. Write to PTEL the values of the PPN, PR, SZ, C, D, WT, SH, and V bits in the page table
  3072. entry recorded in external memory. If necessary, the values of the SA and TC bits should be
  3073. written to PTEA.
  3074. 4. When the entry to be replaced in entry replacement is specified by software, write that value
  3075. to URC in the MMUCR register. If URC is greater than URB at this time, the value should
  3076. be changed to an appropriate value after issuing an LDTLB instruction.
  3077. 5. Execute the LDTLB instruction and write the contents of PTEH, PTEL, and PTEA to the
  3078. UTLB.
  3079. 6. Finally, execute the exception handling return instruction (RTE), terminate the exception
  3080. handling routine, and return control to the normal flow. The RTE instruction should be
  3081. issued at least one instruction after the LDTLB instruction.
  3082.  
  3083. 3.7 Memory-Mapped TLB Configuration
  3084.  
  3085. To enable the ITLB and UTLB to be managed by software, their contents can be read and
  3086. written by a P2 area program with a MOV instruction in privileged mode. Operation is not
  3087. guaranteed if access is made from a program in another area. A branch to an area other than the
  3088. P2 area should be made at least 8 instructions after this MOV instruction. The ITLB and UTLB
  3089. are allocated to the P4 area in physical memory space. VPN, V, and ASID in the ITLB can be
  3090. accessed as an address array, PPN, V, SZ, PR, C, and SH as data array 1, and SA and TC as data
  3091. array 2. VPN, D, V, and ASID in the UTLB can be accessed as an address array, PPN, V, SZ,
  3092. PR, C, D, WT, and SH as data array 1, and SA and TC as data array 2. V and D can be accessed
  3093. from both the address array side and the data array side. Only longword access is possible.
  3094. Instruction fetches cannot be performed in these areas. For reserved bits, a write value of 0
  3095. should be specified; their read value is undefined.
  3096.  
  3097. Rev. 2.0, 02/99, page 55 of 830
  3098.  
  3099. ----------------------- Page 70-----------------------
  3100.  
  3101. 3.7.1 ITLB Address Array
  3102.  
  3103. The ITLB address array is allocated to addresses H'F200 0000 to H'F2FF FFFF in the P4 area.
  3104. An address array access requires a 32-bit address field specification (when reading or writing)
  3105. and a 32-bit data field specification (when writing). Information for selecting the entry to be
  3106. accessed is specified in the address field, and VPN, V, and ASID to be written to the address
  3107. array are specified in the data field.
  3108.  
  3109. In the address field, bits [31:24] have the value H'F2 indicating the ITLB address array, and the
  3110. entry is selected by bits [9:8]. As longword access is used, 0 should be specified for address field
  3111. bits [1:0].
  3112.  
  3113. In the data field, VPN is indicated by bits [31:10], V by bit [8], and ASID by bits [7:0].
  3114.  
  3115. The following two kinds of operation can be used on the ITLB address array:
  3116.  
  3117. 1. ITLB address array read
  3118. VPN, V, and ASID are read into the data field from the ITLB entry corresponding to the
  3119. entry set in the address field.
  3120. 2. ITLB address array write
  3121. VPN, V, and ASID specified in the data field are written to the ITLB entry corresponding to
  3122. the entry set in the address field.
  3123.  
  3124. 31 24 23 10 9 8 7 0
  3125. Address field 1 1 1 1 0 0 1 0 E
  3126.  
  3127. 31 10 99 8 7 0
  3128. Data field VPN V ASID
  3129.  
  3130. VPN: Virtual page number ASID: Address space identifier
  3131. V: Validity bit : Reserved bits (0 write value, undefined
  3132. E: Entry read value)
  3133.  
  3134.  
  3135. Figure 3.13 Memory-Mapped ITLB Address Array
  3136.  
  3137. Rev. 2.0, 02/99, page 56 of 830
  3138.  
  3139. ----------------------- Page 71-----------------------
  3140.  
  3141. 3.7.2 ITLB Data Array 1
  3142.  
  3143. ITLB data array 1 is allocated to addresses H'F300 0000 to H'F37F FFFF in the P4 area. A data
  3144. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit
  3145. data field specification (when writing). Information for selecting the entry to be accessed is
  3146. specified in the address field, and PPN, V, SZ, PR, C, and SH to be written to the data array are
  3147. specified in the data field.
  3148.  
  3149. In the address field, bits [31:23] have the value H'F30 indicating ITLB data array 1, and the
  3150. entry is selected by bits [9:8].
  3151.  
  3152. In the data field, PPN is indicated by bits [28:10], V by bit [8], SZ by bits [7] and [4], PR by bit
  3153. [6], C by bit [3], and SH by bit [1].
  3154.  
  3155. The following two kinds of operation can be used on ITLB data array 1:
  3156.  
  3157. 1. ITLB data array 1 read
  3158. PPN, V, SZ, PR, C, and SH are read into the data field from the ITLB entry corresponding to
  3159. the entry set in the address field.
  3160. 2. ITLB data array 1 write
  3161. PPN, V, SZ, PR, C, and SH specified in the data field are written to the ITLB entry
  3162. corresponding to the entry set in the address field.
  3163.  
  3164. 31 24 23 10 9 8 7 0
  3165. Address field 1 1 1 1 0 0 1 1 0 E
  3166.  
  3167. 31 30 2928 10 9 8 7 6 5 4 3 2 1 0
  3168. Data field PPN V C
  3169.  
  3170. PPN: Physical page number PR: Protection key data PR SZ SH
  3171. V: Validity bit C: Cacheability bit
  3172. E: Entry SH: Share status bit
  3173. SZ: Page size bits : Reserved bits (0 write value, undefined
  3174. read value)
  3175.  
  3176. Figure 3.14 Memory-Mapped ITLB Data Array 1
  3177.  
  3178. Rev. 2.0, 02/99, page 57 of 830
  3179.  
  3180. ----------------------- Page 72-----------------------
  3181.  
  3182. 3.7.3 ITLB Data Array 2
  3183.  
  3184. ITLB data array 2 is allocated to addresses H'F380 0000 to H'F3FF FFFF in the P4 area. A data
  3185. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit
  3186. data field specification (when writing). Information for selecting the entry to be accessed is
  3187. specified in the address field, and SA and TC to be written to data array 2 are specified in the
  3188. data field.
  3189.  
  3190. In the address field, bits [31:23] have the value H'F38 indicating ITLB data array 2, and the
  3191. entry is selected by bits [9:8].
  3192.  
  3193. In the data field, SA is indicated by bits [2:0], and TC by bit [3].
  3194.  
  3195. The following two kinds of operation can be used on ITLB data array 2:
  3196.  
  3197. 1. ITLB data array 2 read
  3198. SA and TC are read into the data field from the ITLB entry corresponding to the entry set in
  3199. the address field.
  3200. 2. ITLB data array 2 write
  3201. SA and TC specified in the data field are written to the ITLB entry corresponding to the
  3202. entry set in the address field.
  3203.  
  3204. 31 24 23 10 9 8 7 0
  3205. Address field 1 1 1 1 0 0 1 1 1 E
  3206.  
  3207. 31 4 3 2 0
  3208. Data field SA
  3209.  
  3210. TC
  3211. TC: Timing control bit SA: Space attribute bits
  3212. E: Entry : Reserved bits (0 write value, undefined read
  3213. value)
  3214.  
  3215. Figure 3.15 Memory-Mapped ITLB Data Array 2
  3216.  
  3217. Rev. 2.0, 02/99, page 58 of 830
  3218.  
  3219. ----------------------- Page 73-----------------------
  3220.  
  3221. 3.7.4 UTLB Address Array
  3222.  
  3223. The UTLB address array is allocated to addresses H'F600 0000 to H'F6FF FFFF in the P4 area.
  3224. An address array access requires a 32-bit address field specification (when reading or writing)
  3225. and a 32-bit data field specification (when writing). Information for selecting the entry to be
  3226. accessed is specified in the address field, and VPN, D, V, and ASID to be written to the address
  3227. array are specified in the data field.
  3228.  
  3229. In the address field, bits [31:24] have the value H'F6 indicating the UTLB address array, and the
  3230. entry is selected by bits [13:8]. The address array bit [7] association bit (A bit) specifies whether
  3231. or not address comparison is performed when writing to the UTLB address array.
  3232.  
  3233. In the data field, VPN is indicated by bits [31:10], D by bit [9], V by bit [8], and ASID by bits
  3234. [7:0].
  3235.  
  3236. The following three kinds of operation can be used on the UTLB address array:
  3237.  
  3238. 1. UTLB address array read
  3239. VPN, D, V, and ASID are read into the data field from the UTLB entry corresponding to the
  3240. entry set in the address field. In a read, associative operation is not performed regardless of
  3241. whether the association bit specified in the address field is 1 or 0.
  3242. 2. UTLB address array write (non-associative)
  3243. VPN, D, V, and ASID specified in the data field are written to the UTLB entry
  3244. corresponding to the entry set in the address field. The A bit in the address field should be
  3245. cleared to 0.
  3246. 3. UTLB address array write (associative)
  3247. When a write is performed with the A bit in the address field set to 1, comparison of all the
  3248. UTLB entries is carried out using the VPN specified in the data field and PTEH.ASID. The
  3249. usual address comparison rules are followed, but if a UTLB miss occurs, the result is no
  3250. operation, and an exception is not generated. If the comparison identifies a UTLB entry
  3251. corresponding to the VPN specified in the data field, D and V specified in the data field are
  3252. written to that entry. If there is more than one matching entry, a data TLB multiple hit
  3253. exception results. This associative operation is simultaneously carried out on the ITLB, and
  3254. if a matching entry is found in the ITLB, V is written to that entry. Even if the UTLB
  3255. comparison results in no operation, a write to the ITLB side only is performed as long as
  3256. there is an ITLB match. If there is a match in both the UTLB and ITLB, the UTLB
  3257. information is also written to the ITLB.
  3258.  
  3259. Rev. 2.0, 02/99, page 59 of 830
  3260.  
  3261. ----------------------- Page 74-----------------------
  3262.  
  3263. 31 24 23 14 13 8 7 2 1 0
  3264. Address field 1 1 1 1 0 1 1 0 E A
  3265.  
  3266. 31 30 29 28 10 9 8 7 0
  3267. Data field VPN D V ASID
  3268.  
  3269. VPN: Virtual page number ASID: Address space identifier
  3270. V: Validity bit A: Association bit
  3271. E: Entry : Reserved bits (0 write value, undefined
  3272. D: Dirty bit read value)
  3273.  
  3274.  
  3275. Figure 3.16 Memory-Mapped UTLB Address Array
  3276.  
  3277. 3.7.5 UTLB Data Array 1
  3278.  
  3279. UTLB data array 1 is allocated to addresses H'F700 0000 to H'F77F FFFF in the P4 area. A data
  3280. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit
  3281. data field specification (when writing). Information for selecting the entry to be accessed is
  3282. specified in the address field, and PPN, V, SZ, PR, C, D, SH, and WT to be written to the data
  3283. array are specified in the data field.
  3284.  
  3285. In the address field, bits [31:23] have the value H'F70 indicating UTLB data array 1, and the
  3286. entry is selected by bits [13:8].
  3287.  
  3288. In the data field, PPN is indicated by bits [28:10], V by bit [8], SZ by bits [7] and [4], PR by bits
  3289. [6:5], C by bit [3], D by bit [2], SH by bit [1], and WT by bit [0].
  3290.  
  3291. The following two kinds of operation can be used on UTLB data array 1:
  3292.  
  3293. 1. UTLB data array 1 read
  3294. PPN, V, SZ, PR, C, D, SH, and WT are read into the data field from the UTLB entry
  3295. corresponding to the entry set in the address field.
  3296. 2. UTLB data array 1 write
  3297. PPN, V, SZ, PR, C, D, SH, and WT specified in the data field are written to the UTLB entry
  3298. corresponding to the entry set in the address field.
  3299.  
  3300. Rev. 2.0, 02/99, page 60 of 830
  3301.  
  3302. ----------------------- Page 75-----------------------
  3303.  
  3304. 31 24 23 14 13 8 7 0
  3305. Address field 1 1 1 1 0 1 1 1 0 E
  3306.  
  3307. 31 30 2928 10 9 8 7 6 5 4 3 2 1 0
  3308. Data field PPN V PR C D
  3309.  
  3310. PPN: Physical page number PR: Protection key data SZ SH WT
  3311. V: Validity bit C: Cacheability bit
  3312. E: Entry SH: Share status bit
  3313. SZ: Page size bits WT: Write-through bit
  3314. D: Dirty bit : Reserved bits (0 write value, undefined
  3315. read value)
  3316.  
  3317. Figure 3.17 Memory-Mapped UTLB Data Array 1
  3318.  
  3319. 3.7.6 UTLB Data Array 2
  3320.  
  3321. UTLB data array 2 is allocated to addresses H'F780 0000 to H'F7FF FFFF in the P4 area. A data
  3322. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit
  3323. data field specification (when writing). Information for selecting the entry to be accessed is
  3324. specified in the address field, and SA and TC to be written to data array 2 are specified in the
  3325. data field.
  3326.  
  3327. In the address field, bits [31:23] have the value H'F78 indicating UTLB data array 2, and the
  3328. entry is selected by bits [13:8].
  3329.  
  3330. In the data field, TC is indicated by bit [3], and SA by bits [2:0].
  3331.  
  3332. Rev. 2.0, 02/99, page 61 of 830
  3333.  
  3334. ----------------------- Page 76-----------------------
  3335.  
  3336. The following two kinds of operation can be used on UTLB data array 2:
  3337.  
  3338. 1. UTLB data array 2 read
  3339. SA and TC are read into the data field from the UTLB entry corresponding to the entry set in
  3340. the address field.
  3341. 2. UTLB data array 2 write
  3342. SA and TC specified in the data field are written to the UTLB entry corresponding to the
  3343. entry set in the address field.
  3344.  
  3345. 31 24 23 14 13 8 7 0
  3346. Address field 1 1 1 1 0 1 1 1 1 E
  3347.  
  3348. 31 4 3 2 0
  3349. Data field
  3350. SA
  3351.  
  3352. TC
  3353. TC: Timing control bit SA: Space attribute bits
  3354. E: Entry : Reserved bits (0 write value, undefined read
  3355. value)
  3356.  
  3357. Figure 3.18 Memory-Mapped UTLB Data Array 2
  3358.  
  3359. Rev. 2.0, 02/99, page 62 of 830
  3360.  
  3361. ----------------------- Page 77-----------------------
  3362.  
  3363. Section 4 Caches
  3364.  
  3365. 4.1 Overview
  3366.  
  3367. 4.1.1 Features
  3368.  
  3369. The SH7750 has an on-chip 8-kbyte instruction cache (IC) for instructions and 16-kbyte operand
  3370. cache (OC) for data. Half of the memory of the operand cache (8 kbytes) can also be used as on-
  3371. chip RAM. The features of these caches are summarized in table 4.1.
  3372.  
  3373. Table 4.1 Cache Features
  3374.  
  3375. Item Instruction Cache Operand Cache
  3376.  
  3377. Capacity 8-kbyte cache 16-kbyte cache or 8-kbyte cache +
  3378. 8-kbyte RAM
  3379.  
  3380. Type Direct mapping Direct mapping
  3381.  
  3382. Line size 32 bytes 32 bytes
  3383.  
  3384. Entries 256 512
  3385.  
  3386. Write method Copy-back/write-through selectable
  3387.  
  3388. Item Store Queues
  3389.  
  3390. Capacity 2 × 32 bytes
  3391.  
  3392. Addresses H'E000 0000 to H'E3FF FFFF
  3393.  
  3394. Write Store instruction (1-cycle write)
  3395.  
  3396. Write-back Prefetch instruction
  3397.  
  3398. Access right MMU off: according to MMUCR.SQMD
  3399.  
  3400. MMU on: according to individual page PR
  3401.  
  3402. Rev. 2.0, 02/99, page 63 of 830
  3403.  
  3404. ----------------------- Page 78-----------------------
  3405.  
  3406. 4.1.2 Register Configuration
  3407.  
  3408. Table 4.2 shows the cache control registers.
  3409.  
  3410. Table 4.2 Cache Control Registers
  3411.  
  3412. Initial P4 Area 7 Access
  3413. Name Abbreviation R/W Value*1 Address*2 Address*2 Size
  3414.  
  3415. Cache control CCR R/W H'0000 0000 H'FF00 001C H'1F00 001C 32
  3416. register
  3417.  
  3418. Queue address QACR0 R/W Undefined H'FF00 0038 H'1F00 0038 32
  3419. control register 0
  3420.  
  3421. Queue address QACR1 R/W Undefined H'FF00 003C H'1F00 003C 32
  3422. control register 1
  3423.  
  3424. Notes: 1. The initial value is the value after a power-on or manual reset.
  3425. 2. This is the address when using the virtual/physical address space P4 area. When
  3426. making an access from physical address space area 7 using the TLB, the upper 3 bits
  3427. of the address are ignored.
  3428.  
  3429. 4.2 Register Descriptions
  3430.  
  3431. There are three cache and store queue related control registers, as shown in figure 4.1.
  3432.  
  3433. CCR
  3434.  
  3435. 31 16 15 14 12 11 10 9 8 7 6 5 4 3 2 1 0
  3436.  
  3437. CB
  3438.  
  3439. IIX ICI ICE OIX ORA OCI WT OCE
  3440.  
  3441. QACR0
  3442.  
  3443. 31 5 4 2 1 0
  3444.  
  3445. AREA
  3446.  
  3447. QACR1
  3448.  
  3449. 31 5 4 2 1 0
  3450.  
  3451. AREA
  3452.  
  3453. indicates reserved bits: 0 must be specified in a write; the read value is undefined.
  3454.  
  3455. Figure 4.1 Cache and Store Queue Control Registers
  3456.  
  3457. Rev. 2.0, 02/99, page 64 of 830
  3458.  
  3459. ----------------------- Page 79-----------------------
  3460.  
  3461. (1) Cache Control Register (CCR): CCR contains the following bits:
  3462.  
  3463. IIX: IC index enable
  3464. ICI: IC invalidation
  3465. ICE: IC enable
  3466. OIX: OC index enable
  3467. ORA: OC RAM enable
  3468. OCI: OC invalidation
  3469. CB: Copy-back enable
  3470. WT: Write-through enable
  3471. OCE: OC enable
  3472.  
  3473. Longword access to CCR can be performed from H'FF00 001C in the P4 area and H'1F00 001C
  3474. in area 7. The CCR bits are used for the cache settings described below. Consequently, CCR
  3475. modifications must only be made by a program in the non-cached P2 area. After CCR is
  3476. updated, an instruction that performs data access to the P0, P1, P3, or U0 area should be located
  3477. at least four instructions after the CCR update instruction. Also, a branch instruction to the P0,
  3478. P1, P3, or U0 area should be located at least eight instructions after the CCR update instruction.
  3479.  
  3480. • IIX: IC index enable bit
  3481. 0: Address bits [12:5] used for IC entry selection
  3482. 1: Address bits [25] and [11:5] used for IC entry selection
  3483. • ICI: IC invalidation bit
  3484. When 1 is written to this bit, the V bits of all IC entries are cleared to 0. This bit always
  3485. returns 0 when read.
  3486. • ICE: IC enable bit
  3487. Indicates whether or not the IC is to be used. When address translation is performed, the IC
  3488. cannot be used unless the C bit in the page management information is also 1.
  3489. 0: IC not used
  3490. 1: IC used
  3491. • OIX: OC index enable bit
  3492. 0: Address bits [13:5] used for OC entry selection
  3493. 1: Address bits [25] and [12:5] used for OC entry selection
  3494. • ORA: OC RAM enable bit
  3495. When the OC is enabled (OCE = 1), the ORA bit specifies whether the 8 kbytes from entry
  3496. 128 to entry 255 and from entry 384 to entry 511 of the OC are to be used as RAM. When
  3497. the OC is not enabled (OCE = 0), the ORA bit should be cleared to 0.
  3498. 0: 16 kbytes used as cache
  3499. 1: 8 kbytes used as cache, and 8 kbytes as RAM
  3500.  
  3501. Rev. 2.0, 02/99, page 65 of 830
  3502.  
  3503. ----------------------- Page 80-----------------------
  3504.  
  3505. • OCI: OC invalidation bit
  3506. When 1 is written to this bit, the V and U bits of all OC entries are cleared to 0. This bit
  3507. always returns 0 when read.
  3508. • CB: Copy-back bit
  3509. Indicates the P1 area cache write mode.
  3510. 0: Write-through mode
  3511. 1: Copy-back mode
  3512. • WT: Write-through bit
  3513. Indicates the P0, U0, and P3 area cache write mode. When address translation is performed,
  3514. the value of the WT bit in the page management information has priority.
  3515. 0: Copy-back mode
  3516. 1: Write-through mode
  3517. • OCE: OC enable bit
  3518. Indicates whether or not the OC is to be used. When address translation is performed, the OC
  3519. cannot be used unless the C bit in the page management information is also 1.
  3520. 0: OC not used
  3521. 1: OC used
  3522.  
  3523. (2) Queue Address Control Register 0 (QACR0): Longword access to QACR0 can be
  3524. performed from H'FF00 0038 in the P4 area and H'1F00 0038 in area 7. QACR0 specifies the
  3525. area onto which store queue 0 (SQ0) is mapped when the MMU is off.
  3526.  
  3527. (3) Queue Address Control Register 1 (QACR1): Longword access to QACR1 can be
  3528. performed from H'FF00 003C in the P4 area and H'1F00 003C in area 7. QACR1 specifies the
  3529. area onto which store queue 1 (SQ1) is mapped when the MMU is off.
  3530.  
  3531. Rev. 2.0, 02/99, page 66 of 830
  3532.  
  3533. ----------------------- Page 81-----------------------
  3534.  
  3535. 4.3 Operand Cache (OC)
  3536.  
  3537. 4.3.1 Configuration
  3538.  
  3539. Figure 4.2 shows the configuration of the operand cache.
  3540.  
  3541. Effective address
  3542.  
  3543. 31 26 25 13 12 11 10 9 5 4 3 2 1 0
  3544.  
  3545. RAM area
  3546. determination
  3547.  
  3548. [11:5]
  3549. OIX ORA
  3550. [13] [12]
  3551.  
  3552. 22
  3553. Longword (LW) selection
  3554. 9
  3555. Address array 3 Data array
  3556.  
  3557. n 0 Tag address U V LW0 LW1 LW2 LW3 LW4 LW5 LW6 LW7
  3558. o
  3559. i
  3560. t
  3561. c
  3562. e
  3563. l
  3564. e
  3565. s
  3566.  
  3567. MMU y
  3568. r
  3569. t
  3570. n
  3571. E
  3572.  
  3573. 19
  3574.  
  3575. 511 19 bits 1 bit 1 bit 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits
  3576.  
  3577. Compare
  3578.  
  3579. Read data Write data
  3580.  
  3581. Hit signal
  3582.  
  3583. Figure 4.2 Configuration of Operand Cache
  3584.  
  3585. Rev. 2.0, 02/99, page 67 of 830
  3586.  
  3587. ----------------------- Page 82-----------------------
  3588.  
  3589. The operand cache consists of 512 cache lines, each composed of a 19-bit tag, V bit, U bit, and
  3590. 32-byte data.
  3591.  
  3592. • Tag
  3593. Stores the upper 19 bits of the 29-bit external memory address of the data line to be cached.
  3594. The tag is not initialized by a power-on or manual reset.
  3595. • V bit (validity bit)
  3596. Indicates that valid data is stored in the cache line. When this bit is 1, the cache line data is
  3597. valid. The V bit is initialized to 0 by a power-on reset, but retains its value in a manual reset.
  3598. • U bit (dirty bit)
  3599. The U bit is set to 1 if data is written to the cache line while the cache is being used in copy-
  3600. back mode. That is, the U bit indicates a mismatch between the data in the cache line and the
  3601. data in external memory. The U bit is never set to 1 while the cache is being used in write-
  3602. through mode, unless it is modified by accessing the memory-mapped cache (see section 4.5,
  3603. Memory-Mapped Cache Configuration). The U bit is initialized to 0 by a power-on reset, but
  3604. retains its value in a manual reset.
  3605. • Data field
  3606. The data field holds 32 bytes (256 bits) of data per cache line. The data array is not
  3607. initialized by a power-on or manual reset.
  3608.  
  3609. 4.3.2 Read Operation
  3610.  
  3611. When the OC is enabled (CCR.OCE = 1) and data is read by means of an effective address from
  3612. a cacheable area, the cache operates as follows:
  3613.  
  3614. 1. The tag, V bit, and U bit are read from the cache line indexed by effective address bits
  3615. [13:5].
  3616. 2. The tag is compared with bits [28:10] of the address resulting from effective address
  3617. translation by the MMU:
  3618. • If the tag matches and the V bit is 1 → (3a)
  3619. • If the tag matches and the V bit is 0 → (3b)
  3620. • If the tag does not match and the V bit is 0 → (3b)
  3621. • If the tag does not match, the V bit is 1, and the U bit is → (3b)
  3622. 0
  3623. • If the tag does not match, the V bit is 1, and the U bit is → (3c)
  3624. 1
  3625.  
  3626. Rev. 2.0, 02/99, page 68 of 830
  3627.  
  3628. ----------------------- Page 83-----------------------
  3629.  
  3630. 3a. Cache hit
  3631. The data indexed by effective address bits [4:0] is read from the data field of the cache line
  3632. indexed by effective address bits [13:5] in accordance with the access size
  3633. (quadword/longword/word/byte).
  3634. 3b. Cache miss (no write-back)
  3635. Data is read into the cache line from the external memory space corresponding to the
  3636. effective address. Data reading is performed, using the wraparound method, in order from the
  3637. longword data corresponding to the effective address, and when the corresponding data
  3638. arrives in the cache, the read data is returned to the CPU. While the remaining one cache line
  3639. of data is being read, the CPU can execute the next processing. When reading of one line of
  3640. data is completed, the tag corresponding to the effective address is recorded in the cache, and
  3641. 1 is written to the V bit.
  3642. 3c. Cache miss (with write-back)
  3643. The tag and data field of the cache line indexed by effective address bits [13:5] are saved in
  3644. the write-back buffer. Then data is read into the cache line from the external memory space
  3645. corresponding to the effective address. Data reading is performed, using the wraparound
  3646. method, in order from the longword data corresponding to the effective address, and when
  3647. the corresponding data arrives in the cache, the read data is returned to the CPU. While the
  3648. remaining one cache line of data is being read, the CPU can execute the next processing.
  3649. When reading of one line of data is completed, the tag corresponding to the effective address
  3650. is recorded in the cache, 1 is written to the V bit, and 0 to the U bit. The data in the write-
  3651. back buffer is then written back to external memory.
  3652.  
  3653. 4.3.3 Write Operation
  3654.  
  3655. When the OC is enabled (CCR.OCE = 1) and data is written by means of an effective address to
  3656. a cacheable area, the cache operates as follows:
  3657.  
  3658. 1. The tag, V bit, and U bit are read from the cache line indexed by effective address bits
  3659. [13:5].
  3660. 2. The tag is compared with bits [28:10] of the address resulting from effective address
  3661. translation by the MMU:
  3662. Copy-back Write-through
  3663. • If the tag matches and the V bit is 1 → (3a) → (3b)
  3664. • If the tag matches and the V bit is 0 → (3c) → (3d)
  3665. • If the tag does not match and the V bit is 0 → (3c) → (3d)
  3666. • If the tag does not match, the V bit is 1, and the U bit is → (3c) → (3d)
  3667. 0
  3668. • If the tag does not match, the V bit is 1, and the U bit is → (3e) → (3d)
  3669. 1
  3670.  
  3671. Rev. 2.0, 02/99, page 69 of 830
  3672.  
  3673. ----------------------- Page 84-----------------------
  3674.  
  3675. 3a. Cache hit (copy-back)
  3676. A data write in accordance with the access size (quadword/longword/word/byte) is performed
  3677. for the data indexed by bits [4:0] of the effective address of the data field of the cache line
  3678. indexed by effective address bits [13:5]. Then 1 is set in the U bit.
  3679. 3b. Cache hit (write-through)
  3680. A data write in accordance with the access size (quadword/longword/word/byte) is performed
  3681. for the data indexed by bits [4:0] of the effective address of the data field of the cache line
  3682. indexed by effective address bits [13:5]. A write is also performed to the corresponding
  3683. external memory using the specified access size.
  3684. 3c. Cache miss (no copy-back/write-back)
  3685. A data write in accordance with the access size (quadword/longword/word/byte) is performed
  3686. for the data indexed by bits [4:0] of the effective address of the data field of the cache line
  3687. indexed by effective address bits [13:5]. Then, data is read into the cache line from the
  3688. external memory space corresponding to the effective address. Data reading is performed,
  3689. using the wraparound method, in order from the longword data corresponding to the effective
  3690. address, and one cache line of data is read excluding the written data. During this time, the
  3691. CPU can execute the next processing. When reading of one line of data is completed, the tag
  3692. corresponding to the effective address is recorded in the cache, and 1 is written to the V bit
  3693. and U bit.
  3694. 3d. Cache miss (write-through)
  3695. A write of the specified access size is performed to the external memory corresponding to the
  3696. effective address. In this case, a write to cache is not performed.
  3697. 3e. Cache miss (with copy-back/write-back)
  3698. The tag and data field of the cache line indexed by effective address bits [13:5] are first
  3699. saved in the write-back buffer, and then a data write in accordance with the access size
  3700. (quadword/longword/word/byte) is performed for the data indexed by bits [4:0] of the
  3701. effective address of the data field of the cache line indexed by effective address bits [13:5].
  3702. Then, data is read into the cache line from the external memory space corresponding to the
  3703. effective address. Data reading is performed, using the wraparound method, in order from the
  3704. longword data corresponding to the effective address, and one cache line of data is read
  3705. excluding the written data. During this time, the CPU can execute the next processing. When
  3706. reading of one line of data is completed, the tag corresponding to the effective address is
  3707. recorded in the cache, and 1 is written to the V bit and U bit. The data in the write-back
  3708. buffer is then written back to external memory.
  3709.  
  3710. Rev. 2.0, 02/99, page 70 of 830
  3711.  
  3712. ----------------------- Page 85-----------------------
  3713.  
  3714. 4.3.4 Write-Back Buffer
  3715.  
  3716. In order to give priority to data reads to the cache and improve performance, the SH7750 has a
  3717. write-back buffer which holds the relevant cache entry when it becomes necessary to purge a
  3718. dirty cache entry into external memory as the result of a cache miss. The write-back buffer
  3719. contains one cache line of data and the physical address of the purge destination.
  3720.  
  3721. Physical address bits [28:5] LW0 LW1 LW2 LW3 LW4 LW5 LW6 LW7
  3722.  
  3723. Figure 4.3 Configuration of Write-Back Buffer
  3724.  
  3725. 4.3.5 Write-Through Buffer
  3726.  
  3727. The SH7750 has a 64-bit buffer for holding write data when writing data in write-through mode
  3728. or writing to a non-cacheable area. This allows the CPU to proceed to the next operation as soon
  3729. as the write to the write-through buffer is completed, without waiting for completion of the write
  3730. to external memory.
  3731.  
  3732. Physical address bits [28:0] LW0 LW1
  3733.  
  3734. Figure 4.4 Configuration of Write-Through Buffer
  3735.  
  3736. 4.3.6 RAM Mode
  3737.  
  3738. Setting CCR.ORA to 1 enables 8 kbytes of the operand cache to be used as RAM. The operand
  3739. cache entries used as RAM are entries 128 to 255 and 384 to 511 . Other entries can still be used
  3740. as cache. RAM can be accessed using addresses H'7C00 0000 to H'7FFF FFFF. Byte-, word-,
  3741. longword-, and quadword-size data reads and writes can be performed in the operand cache
  3742. RAM area. Instruction fetches cannot be performed in this area.
  3743.  
  3744. An example of RAM use is shown below. Here, the 4 kbytes comprising OC entries 128 to 256
  3745. are designated as RAM area 1, and the 4 kbytes comprising OC entries 384 to 511 as RAM area
  3746. 2.
  3747.  
  3748. Rev. 2.0, 02/99, page 71 of 830
  3749.  
  3750. ----------------------- Page 86-----------------------
  3751.  
  3752. • When OC index mode is off (CCR.OIX = 0)
  3753. H'7C00 0000 to H'7C00 0FFF (4 kB): Corresponds to RAM area 1
  3754. H'7C00 1000 to H'7C00 1FFF (4 kB): Corresponds to RAM area 1
  3755. H'7C00 2000 to H'7C00 2FFF (4 kB): Corresponds to RAM area 2
  3756. H'7C00 3000 to H'7C00 3FFF (4 kB): Corresponds to RAM area 2
  3757. H'7C00 4000 to H'7C00 4FFF (4 kB): Corresponds to RAM area 1
  3758. : : :
  3759. RAM areas 1 and 2 then repeat every 8 kbytes up to H'7FFF FFFF.
  3760. Thus, to secure a continuous 8-kbyte RAM area, the area from H'7C00 1000 to H'7C00 2FFF
  3761. can be used, for example.
  3762. • When OC index mode is on (CCR.OIX = 1)
  3763. H'7C00 0000 to H'7C00 0FFF (4 kB): Corresponds to RAM area 1
  3764. H'7C00 1000 to H'7C00 1FFF (4 kB): Corresponds to RAM area 1
  3765. H'7C00 2000 to H'7C00 2FFF (4 kB): Corresponds to RAM area 1
  3766. : : :
  3767. H'7DFF F000 to H'7DFF FFFF (4 kB): Corresponds to RAM area 1
  3768. H'7E00 0000 to H'7E00 0FFF (4 kB): Corresponds to RAM area 2
  3769. H'7E00 1000 to H'7E00 1FFF (4 kB): Corresponds to RAM area 2
  3770. : : :
  3771. H'7FFF F000 to H'7FFF FFFF (4 kB): Corresponds to RAM area 2
  3772. As the distinction between RAM areas 1 and 2 is indicated by address bit [25], the area from
  3773. H'7DFF F000 to H'7E00 0FFF should be used to secure a continuous 8-kbyte RAM area.
  3774.  
  3775. 4.3.7 OC Index Mode
  3776.  
  3777. Setting CCR.OIX to 1 enables OC indexing to be performed using bit [25] of the effective
  3778. address. This is called OC index mode. In normal mode, with CCR.OIX cleared to 0, OC
  3779. indexing is performed using bits [13:5] of the effective address; therefore, when 16 kbytes or
  3780. more of consecutive data is handled, the OC is fully used by this data. This results in frequent
  3781. cache misses. Using index mode allows the OC to be handled as two 8-kbyte areas by means of
  3782. effective address bit [25], providing efficient use of the cache.
  3783.  
  3784. Rev. 2.0, 02/99, page 72 of 830
  3785.  
  3786. ----------------------- Page 87-----------------------
  3787.  
  3788. 4.3.8 Coherency between Cache and External Memory
  3789.  
  3790. Coherency between cache and external memory should be assured by software. In the SH7750,
  3791. the following four new instructions are supported for cache operations. Details of these
  3792. instructions are given in the Programming Manual.
  3793.  
  3794. Invalidate instruction: OCBI @Rn Cache invalidation (no write-back)
  3795.  
  3796. Purge instruction: OCBP @Rn Cache invalidation (with write-back)
  3797.  
  3798. Write-back instruction: OCBWB @Rn Cache write-back
  3799.  
  3800. Allocate instruction: MOVCA.L R0,@Rn Cache allocation
  3801.  
  3802. 4.3.9 Prefetch Operation
  3803.  
  3804. The SH7750 supports a prefetch instruction to reduce the cache fill penalty incurred as the result
  3805. of a cache miss. If it is known that a cache miss will result from a read or write operation, it is
  3806. possible to fill the cache with data beforehand by means of the prefetch instruction to prevent a
  3807. cache miss due to the read or write operation, and so improve software performance. If a
  3808. prefetch instruction is executed for data already held in the cache, or if the prefetch address
  3809. results in a UTLB miss or a protection violation, the result is no operation, and an exception is
  3810. not generated. Details of the prefetch instruction are given in the Programming Manual.
  3811.  
  3812. Prefetch instruction: PREF @Rn
  3813.  
  3814. Rev. 2.0, 02/99, page 73 of 830
  3815.  
  3816. ----------------------- Page 88-----------------------
  3817.  
  3818. 4.4 Instruction Cache (IC)
  3819.  
  3820. 4.4.1 Configuration
  3821.  
  3822. Figure 4.5 shows the configuration of the instruction cache.
  3823.  
  3824. Effective address
  3825.  
  3826. 31 26 25 13 12 11 10 9 5 4 3 2 1 0
  3827.  
  3828. [11:5]
  3829. IIX
  3830. [12]
  3831.  
  3832. 22 Longword (LW) selection
  3833.  
  3834. 8 3
  3835. Address array Data array
  3836.  
  3837. n 0 Tag address V LW0 LW1 LW2 LW3 LW4 LW5 LW6 LW7
  3838. o
  3839. i
  3840. t
  3841. c
  3842. e
  3843. l
  3844. e
  3845. s
  3846.  
  3847. MMU y
  3848. r
  3849. t
  3850. n
  3851. E
  3852.  
  3853. 19
  3854.  
  3855. 255 19 bits 1 bit 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits
  3856.  
  3857. Compare
  3858.  
  3859. Read data
  3860.  
  3861. Hit signal
  3862.  
  3863. Figure 4.5 Configuration of Instruction Cache
  3864.  
  3865. Rev. 2.0, 02/99, page 74 of 830
  3866.  
  3867. ----------------------- Page 89-----------------------
  3868.  
  3869. The instruction cache consists of 256 cache lines, each composed of a 19-bit tag, V bit, and 32-
  3870. byte data (16 instructions).
  3871.  
  3872. • Tag
  3873. Stores the upper 19 bits of the 29-bit external memory address of the data line to be cached.
  3874. The tag is not initialized by a power-on or manual reset.
  3875. • V bit (validity bit)
  3876. Indicates that valid data is stored in the cache line. When this bit is 1, the cache line data is
  3877. valid. The V bit is initialized to 0 by a power-on reset, but retains its value in a manual reset.
  3878. • Data array
  3879. The data field holds 32 bytes (256 bits) of data per cache line. The data array is not
  3880. initialized by a power-on or manual reset.
  3881.  
  3882. 4.4.2 Read Operation
  3883.  
  3884. When the IC is enabled (CCR.ICE = 1) and instruction fetches are performed by means of an
  3885. effective address from a cacheable area, the instruction cache operates as follows:
  3886.  
  3887. 1. The tag and V bit are read from the cache line indexed by effective address bits [12:5].
  3888. 2. The tag is compared with bits [28:10] of the address resulting from effective address
  3889. translation by the MMU:
  3890. • If the tag matches and the V bit is 1 → (3a)
  3891. • If the tag matches and the V bit is 0 → (3b)
  3892. • If the tag does not match and the V bit is 0 → (3b)
  3893. • If the tag does not match and the V bit is 1 → (3b)
  3894. 3a. Cache hit
  3895. The data indexed by effective address bits [4:2] is read as an instruction from the data field
  3896. of the cache line indexed by effective address bits [12:5].
  3897. 3b. Cache miss
  3898. Data is read into the cache line from the external memory space corresponding to the
  3899. effective address. Data reading is performed, using the wraparound method, in order from the
  3900. longword data corresponding to the effective address, and when the corresponding data
  3901. arrives in the cache, the read data is returned to the CPU as an instruction. When reading of
  3902. one line of data is completed, the tag corresponding to the effective address is recorded in the
  3903. cache, and 1 is written to the V bit.
  3904.  
  3905. Rev. 2.0, 02/99, page 75 of 830
  3906.  
  3907. ----------------------- Page 90-----------------------
  3908.  
  3909. 4.4.3 IC Index Mode
  3910.  
  3911. Setting CCR.IIX to 1 enables IC indexing to be performed using bit [25] of the effective address.
  3912. This is called IC index mode. In normal mode, with CCR.IIX cleared to 0, IC indexing is
  3913. performed using bits [12:5] of the effective address; therefore, when 8 kbytes or more of
  3914. consecutive program instructions are handled, the IC is fully used by this program. This results
  3915. in frequent cache misses. Using index mode allows the IC to be handled as two 4-kbyte areas by
  3916. means of effective address bit [25], providing efficient use of the cache.
  3917.  
  3918. 4.5 Memory-Mapped Cache Configuration
  3919.  
  3920. To enable the IC and OC to be managed by software, their contents can be read and written by a
  3921. P2 area program with a MOV instruction in privileged mode. Operation is not guaranteed if
  3922. access is made from a program in another area. In this case, a branch to the P0, U0, P1, or P3
  3923. area should be made at least 8 instructions after this MOV instruction. The IC and OC are
  3924. allocated to the P4 area in physical memory space. Only data accesses can be used on both the
  3925. IC address array and data array and the OC address array and data array, and accesses are always
  3926. longword-size. Instruction fetches cannot be performed in these areas. For reserved bits, a write
  3927. value of 0 should be specified; their read value is undefined.
  3928.  
  3929. 4.5.1 IC Address Array
  3930.  
  3931. The IC address array is allocated to addresses H'F000 0000 to H'F0FF FFFF in the P4 area. An
  3932. address array access requires a 32-bit address field specification (when reading or writing) and a
  3933. 32-bit data field specification. The entry to be accessed is specified in the address field, and the
  3934. write tag and V bit are specified in the data field.
  3935.  
  3936. In the address field, bits [31:24] have the value H'F0 indicating the IC address array, and the
  3937. entry is specified by bits [12:5]. CCR.IIX has no effect on this entry specification. The address
  3938. array bit [3] association bit (A bit) specifies whether or not association is performed when
  3939. writing to the IC address array. As only longword access is used, 0 should be specified for
  3940. address field bits [1:0].
  3941.  
  3942. In the data field, the tag is indicated by bits [31:10], and the V bit by bit [0]. As the IC address
  3943. array tag is 19 bits in length, data field bits [31:29] are not used in the case of a write in which
  3944. association is not performed. Data field bits [31:29] are used for the virtual address specification
  3945. only in the case of a write in which association is performed.
  3946.  
  3947. Rev. 2.0, 02/99, page 76 of 830
  3948.  
  3949. ----------------------- Page 91-----------------------
  3950.  
  3951. The following three kinds of operation can be used on the IC address array:
  3952.  
  3953. 1. IC address array read
  3954. The tag and V bit are read into the data field from the IC entry corresponding to the entry set
  3955. in the address field. In a read, associative operation is not performed regardless of whether
  3956. the association bit specified in the address field is 1 or 0.
  3957. 2. IC address array write (non-associative)
  3958. The tag and V bit specified in the data field are written to the IC entry corresponding to the
  3959. entry set in the address field. The A bit in the address field should be cleared to 0.
  3960. 3. IC address array write (associative)
  3961. When a write is performed with the A bit in the address field set to 1, the tag stored in the
  3962. entry specified in the address field is compared with the tag specified in the data field. If the
  3963. MMU is enabled at this time, comparison is performed after the virtual address specified by
  3964. data field bits [31:10] has been translated to a physical address using the ITLB. If the
  3965. addresses match and the V bit is 1, the V bit specified in the data field is written into the IC
  3966. entry. This operation is used to invalidate a specific IC entry. If an ITLB miss occurs during
  3967. address translation, or the comparison shows a mismatch, no operation results and the write
  3968. is not performed. If an instruction TLB multiple hit exception occurs during address
  3969. translation, processing switches to the instruction TLB multiple hit exception handling
  3970. routine.
  3971.  
  3972. 31 24 23 13 12 5 4 3 2 1 0
  3973. Address field 1 1 1 1 0 0 0 0 Entry A
  3974.  
  3975. 31 10 9 1 0
  3976. Data field Tag address V
  3977.  
  3978. V : Validity bit
  3979. A : Association bit
  3980. : Reserved bits (0 write value, undefined read value)
  3981.  
  3982. Figure 4.6 Memory-Mapped IC Address Array
  3983.  
  3984. Rev. 2.0, 02/99, page 77 of 830
  3985.  
  3986. ----------------------- Page 92-----------------------
  3987.  
  3988. 4.5.2 IC Data Array
  3989.  
  3990. The IC data array is allocated to addresses H'F100 0000 to H'F1FF FFFF in the P4 area. A data
  3991. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit
  3992. data field specification. The entry to be accessed is specified in the address field, and the
  3993. longword data to be written is specified in the data field.
  3994.  
  3995. In the address field, bits [31:24] have the value H'F1 indicating the IC data array, and the entry
  3996. is specified by bits [12:5]. CCR.IIX has no effect on this entry specification. Address field bits
  3997. [4:2] are used for the longword data specification in the entry. As only longword access is used,
  3998. 0 should be specified for address field bits [1:0].
  3999.  
  4000. The data field is used for the longword data specification.
  4001.  
  4002. The following two kinds of operation can be used on the IC data array:
  4003.  
  4004. 1. IC data array read
  4005. Longword data is read into the data field from the data specified by the longword
  4006. specification bits in the address field in the IC entry corresponding to the entry set in the
  4007. address field.
  4008. 2. IC data array write
  4009. The longword data specified in the data field is written for the data specified by the longword
  4010. specification bits in the address field in the IC entry corresponding to the entry set in the
  4011. address field.
  4012.  
  4013. 31 24 23 13 12 5 4 2 1 0
  4014. Address field 1 1 1 1 0 0 0 1 Entry L
  4015.  
  4016. 31 0
  4017. Data field Longword data
  4018.  
  4019. L: Longword specification bits
  4020. : Reserved bits (0 write value, undefined read value)
  4021.  
  4022. Figure 4.7 Memory-Mapped IC Data Array
  4023.  
  4024. Rev. 2.0, 02/99, page 78 of 830
  4025.  
  4026. ----------------------- Page 93-----------------------
  4027.  
  4028. 4.5.3 OC Address Array
  4029.  
  4030. The OC address array is allocated to addresses H'F400 0000 to H'F4FF FFFF in the P4 area. An
  4031. address array access requires a 32-bit address field specification (when reading or writing) and a
  4032. 32-bit data field specification. The entry to be accessed is specified in the address field, and the
  4033. write tag, U bit, and V bit are specified in the data field.
  4034.  
  4035. In the address field, bits [31:24] have the value H'F4 indicating the OC address array, and the
  4036. entry is specified by bits [13:5]. CCR.OIX and CCR.ORA have no effect on this entry
  4037. specification. The address array bit [3] association bit (A bit) specifies whether or not
  4038. association is performed when writing to the OC address array. As only longword access is used,
  4039. 0 should be specified for address field bits [1:0].
  4040.  
  4041. In the data field, the tag is indicated by bits [31:10], the U bit by bit [1], and the V bit by bit [0].
  4042. As the OC address array tag is 19 bits in length, data field bits [31:29] are not used in the case of
  4043. a write in which association is not performed. Data field bits [31:29] are used for the virtual
  4044. address specification only in the case of a write in which association is performed.
  4045.  
  4046. The following three kinds of operation can be used on the OC address array:
  4047.  
  4048. 1. OC address array read
  4049. The tag, U bit, and V bit are read into the data field from the OC entry corresponding to the
  4050. entry set in the address field. In a read, associative operation is not performed regardless of
  4051. whether the association bit specified in the address field is 1 or 0.
  4052. 2. OC address array write (non-associative)
  4053. The tag, U bit, and V bit specified in the data field are written to the OC entry corresponding
  4054. to the entry set in the address field. The A bit in the address field should be cleared to 0.
  4055. When a write is performed to a cache line for which the U bit and V bit are both 1, after
  4056. write-back of that cache line, the tag, U bit, and V bit specified in the data field are written.
  4057. 3. OC address array write (associative)
  4058. When a write is performed with the A bit in the address field set to 1, the tag stored in the
  4059. entry specified in the address field is compared with the tag specified in the data field. If the
  4060. MMU is enabled at this time, comparison is performed after the virtual address specified by
  4061. data field bits [31:10] has been translated to a physical address using the UTLB. If the
  4062. addresses match and the V bit is 1, the U bit and V bit specified in the data field are written
  4063. into the OC entry. This operation is used to invalidate a specific OC entry. If the OC entry U
  4064. bit is 1, and 0 is written to the V bit or to the U bit, write-back is performed. If an UTLB
  4065. miss occurs during address translation, or the comparison shows a mismatch, no operation
  4066. results and the write is not performed. If a data TLB multiple hit exception occurs during
  4067. address translation, processing switches to the data TLB multiple hit exception handling
  4068. routine.
  4069.  
  4070. Rev. 2.0, 02/99, page 79 of 830
  4071.  
  4072. ----------------------- Page 94-----------------------
  4073.  
  4074. 31 24 23 1413 5 4 3 2 1 0
  4075. Address field 1 1 1 1 0 1 0 0 Entry A
  4076.  
  4077. 31 10 9 2 1 0
  4078. Data field Tag address U V
  4079.  
  4080. V : Validity bit
  4081. U: Dirty bit
  4082. A : Association bit
  4083. : Reserved bits (0 write value, undefined read value)
  4084.  
  4085. Figure 4.8 Memory-Mapped OC Address Array
  4086.  
  4087. 4.5.4 OC Data Array
  4088.  
  4089. The OC data array is allocated to addresses H'F500 0000 to H'F5FF FFFF in the P4 area. A data
  4090. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit
  4091. data field specification. The entry to be accessed is specified in the address field, and the
  4092. longword data to be written is specified in the data field.
  4093.  
  4094. In the address field, bits [31:24] have the value H'F5 indicating the OC data array, and the entry
  4095. is specified by bits [13:5]. CCR.OIX and CCR.ORA have no effect on this entry specification.
  4096. Address field bits [4:2] are used for the longword data specification in the entry. As only
  4097. longword access is used, 0 should be specified for address field bits [1:0].
  4098.  
  4099. The data field is used for the longword data specification.
  4100.  
  4101. The following two kinds of operation can be used on the OC data array:
  4102.  
  4103. 1. OC data array read
  4104. Longword data is read into the data field from the data specified by the longword
  4105. specification bits in the address field in the OC entry corresponding to the entry set in the
  4106. address field.
  4107. 2. OC data array write
  4108. The longword data specified in the data field is written for the data specified by the longword
  4109. specification bits in the address field in the OC entry corresponding the entry set in the
  4110. address field. This write does not set the U bit to 1 on the address array side.
  4111.  
  4112. Rev. 2.0, 02/99, page 80 of 830
  4113.  
  4114. ----------------------- Page 95-----------------------
  4115.  
  4116. 31 24 23 1413 5 4 2 1 0
  4117. Address field 1 1 1 1 0 1 0 1 Entry L
  4118.  
  4119. 31 0
  4120. Data field Longword data
  4121.  
  4122. L: Longword specification bits
  4123. : Reserved bits (0 write value, undefined read value)
  4124.  
  4125. Figure 4.9 Memory-Mapped OC Data Array
  4126.  
  4127. 4.6 Store Queues
  4128.  
  4129. Two 32-byte store queues (SQs) are supported to perform high-speed writes to external memory.
  4130.  
  4131. 4.6.1 SQ Configuration
  4132.  
  4133. There are two 32-byte store queues, SQ0 and SQ1, as shown in figure 4.10. These two store
  4134. queues can be set independently.
  4135.  
  4136. SQ0 SQ0[0] SQ0[1] SQ0[2] SQ0[3] SQ0[4] SQ0[5] SQ0[6] SQ0[7]
  4137.  
  4138. SQ1 SQ1[0] SQ1[1] SQ1[2] SQ1[3] SQ1[4] SQ1[5] SQ1[6] SQ1[7]
  4139.  
  4140. 4B 4B 4B 4B 4B 4B 4B 4B
  4141.  
  4142. Figure 4.10 Store Queue Configuration
  4143.  
  4144. Rev. 2.0, 02/99, page 81 of 830
  4145.  
  4146. ----------------------- Page 96-----------------------
  4147.  
  4148. 4.6.2 SQ Writes
  4149.  
  4150. A write to the SQs can be performed using a store instruction (MOV) on P4 area H'E000 0000 to
  4151. H'E3FF FFFC. A longword or quadword access size can be used. The meaning of the address
  4152. bits is as follows:
  4153.  
  4154. [31:26]: 111000 Store queue specification
  4155. [25:6]: Don’t care Used for external memory transfer/access right
  4156. [5]: 0/1 0: SQ0 specification 1: SQ1 specification
  4157. [4:2]: LW specification Specifies longword position in SQ0/SQ1
  4158. [1:0] 00 Fixed at 0
  4159.  
  4160. 4.6.3 Transfer to External Memory
  4161.  
  4162. Transfer from the SQs to external memory can be performed with a prefetch instruction (PREF).
  4163. Issuing a PREF instruction for P4 area H'E000 0000 to H'E3FF FFFC starts a burst transfer from
  4164. the SQs to external memory. The burst transfer length is fixed at 32 bytes, and the start address
  4165. is always at a 32-byte boundary. While the contents of one SQ are being transferred to external
  4166. memory, the other SQ can be written to without a penalty cycle, but writing to the SQ involved
  4167. in the transfer to external memory is deferred until the transfer is completed.
  4168.  
  4169. The SQ transfer destination external memory address bit [28:0] specification is as shown below,
  4170. according to whether the MMU is on or off.
  4171.  
  4172. • When MMU is on
  4173. The SQ area (H'E000 0000 to H'E3FF FFFF) is set in VPN of the UTLB, and the transfer
  4174. destination external memory address in PPN. The ASID, V, SZ, SH, PR, and D bits have the
  4175. same meaning as for normal address translation, but the C and WT bits have no meaning
  4176. with regard to this page. Since burst transfer is prohibited for PCMCIA areas, the SA and TC
  4177. bits also have no meaning.
  4178. When a prefetch instruction is issued for the SQ area, address translation is performed and
  4179. external memory address bits [28:10] are generated in accordance with the SZ bit
  4180. specification. For external memory address bits [9:5], the address prior to address translation
  4181. is generated in the same way as when the MMU is off. External memory address bits [4:0]
  4182. are fixed at 0. Transfer from the SQs to external memory is performed to this address.
  4183.  
  4184. Rev. 2.0, 02/99, page 82 of 830
  4185.  
  4186. ----------------------- Page 97-----------------------
  4187.  
  4188. • When MMU is off
  4189. The SQ area (H'E000 0000 to H'E3FF FFFF) is specified as the address at which a prefetch is
  4190. performed. The meaning of address bits [31:0] is as follows:
  4191. [31:26]: 111000 Store queue specification
  4192. [25:6]: Address External memory address bits [25:6]
  4193. [5]: 0/1 0: SQ0 specification
  4194. 1: SQ1 specification and external memory address bit [5]
  4195. [4:2]: Don’t care No meaning in a prefetch
  4196. [1:0] 00 Fixed at 0
  4197.  
  4198. External memory address bits [28:26], which cannot be generated from the above address,
  4199. are generated from the QACR0/1 registers.
  4200. QACR0 [4:2]: External memory address bits [28:26] corresponding to SQ0
  4201. QACR1 [4:2]: External memory address bits [28:26] corresponding to SQ1
  4202. External memory address bits [4:0] are always fixed at 0 since burst transfer starts at a 32-
  4203. byte boundary.
  4204.  
  4205. 4.6.4 SQ Protection
  4206.  
  4207. It is possible to set protection against SQ writes and transfers to external memory. If an SQ write
  4208. violates the protection setting, an exception will be generated but the SQ contents will be
  4209. corrupted. If a transfer from the SQs to external memory (prefetch instruction) violates the
  4210. protection setting, the transfer to external memory will be inhibited and an exception will be
  4211. generated.
  4212.  
  4213. • When MMU is on
  4214. Operation is in accordance with the address translation information recorded in the UTLB,
  4215. and MMUCR.SQMD. Write type exception judgment is performed for writes to the SQs, and
  4216. read type for transfer from the SQs to external memory (PREF instruction), and a TLB miss
  4217. exception, protection violation exception, or initial page write exception is generated.
  4218. However, if SQ access is enabled, in privileged mode only, by MMUCR.SQMD, an address
  4219. error will be flagged in user mode even if address translation is successful.
  4220.  
  4221. • When MMU is off
  4222. Operation is in accordance with MMUCR.SQMD.
  4223. 0: Privileged/user access possible
  4224. 1: Privileged access possible
  4225. If the SQ area is accessed in user mode when MMUCR.SQMD is set to 1, an address error
  4226. will be flagged.
  4227.  
  4228. Rev. 2.0, 02/99, page 83 of 830
  4229.  
  4230. ----------------------- Page 98-----------------------
  4231.  
  4232. Rev. 2.0, 02/99, page 84 of 830
  4233.  
  4234. ----------------------- Page 99-----------------------
  4235.  
  4236. Section 5 Exceptions
  4237.  
  4238. 5.1 Overview
  4239.  
  4240. 5.1.1 Features
  4241.  
  4242. Exception handling is processing handled by a special routine, separate from normal program
  4243. processing, that is executed by the CPU in case of abnormal events. For example, if the
  4244. executing instruction ends abnormally, appropriate action must be taken in order to return to the
  4245. original program sequence, or report the abnormality before terminating the processing. The
  4246. process of generating an exception handling request in response to abnormal termination, and
  4247. passing control to a user-written exception handling routine, in order to support such functions,
  4248. is given the generic name of exception handling.
  4249.  
  4250. SH7750 exception handling is of three kinds: for resets, general exceptions, and interrupts.
  4251.  
  4252. 5.1.2 Register Configuration
  4253.  
  4254. The registers used in exception handling are shown in table 5.1.
  4255.  
  4256. Table 5.1 Exception-Related Registers
  4257.  
  4258. Abbrevia- P4 Area 7 Access
  4259. Name tion R/W Initial Value*1 Address*2 Address*2 Size
  4260.  
  4261. TRAPA exception TRA R/W Undefined H'FF00 0020 H'1F00 0020 32
  4262. register
  4263.  
  4264. Exception event EXPEVT R/W H'0000 0000/ H'FF00 0024 H'1F00 0024 32
  4265. register H'0000 0020*1
  4266.  
  4267. Interrupt event INTEVT R/W Undefined H'FF00 0028 H'1F00 0028 32
  4268. register
  4269.  
  4270. Notes: 1. H'0000 0000 is set in a power-on reset, and H'0000 0020 in a manual reset.
  4271. 2. This is the address when using the virtual/physical address space P4 area. When
  4272. making an access from physical address space area 7 using the TLB, the upper 3 bits
  4273. of the address are ignored.
  4274.  
  4275. Rev. 2.0, 02/99, page 85 of 830
  4276.  
  4277. ----------------------- Page 100-----------------------
  4278.  
  4279. 5.2 Register Descriptions
  4280.  
  4281. There are three registers related to exception handling. These are allocated to memory, and can
  4282. be accessed by specifying the P4 address or area 7 address.
  4283.  
  4284. 1. The exception event register (EXPEVT) resides at P4 address H'FF00 0024, and contains a
  4285. 12-bit exception code. The exception code set in EXPEVT is that for a reset or general
  4286. exception event. The exception code is set automatically by hardware when an exception
  4287. occurs. EXPEVT can also be modified by software.
  4288. 2. The interrupt event register (INTEVT) resides at P4 address H'FF00 0028, and contains a 12-
  4289. bit exception code. The exception code set in INTEVT is that for an interrupt request. The
  4290. exception code is set automatically by hardware when an exception occurs. INTEVT can also
  4291. be modified by software.
  4292. 3. The TRAPA exception register (TRA) resides at P4 address H'FF00 0020, and contains 8-bit
  4293. immediate data (imm) for the TRAPA instruction. TRA is set automatically by hardware
  4294. when a TRAPA instruction is executed. TRA can also be modified by software.
  4295.  
  4296. The bit configurations of EXPEVT, INTEVT, and TRA are shown in figure 5.1.
  4297.  
  4298. EXPEVT and INTEVT
  4299.  
  4300. 31 12 11 0
  4301.  
  4302. 0 0 Exception code
  4303.  
  4304. TRA
  4305.  
  4306. 31 10 9 2 1 0
  4307.  
  4308. 0 0 imm 0 0
  4309.  
  4310. 0: Reserved bits. These bits are always read as 0, and should only be written
  4311. with 0.
  4312. imm: 8-bit immediate data of the TRAPA instruction
  4313.  
  4314. Figure 5.1 Register Bit Configurations
  4315.  
  4316. Rev. 2.0, 02/99, page 86 of 830
  4317.  
  4318. ----------------------- Page 101-----------------------
  4319.  
  4320. 5.3 Exception Handling Functions
  4321.  
  4322. 5.3.1 Exception Handling Flow
  4323.  
  4324. In exception handling, the contents of the program counter (PC) and status register (SR) are
  4325. saved in the saved program counter (SPC) and saved status register (SSR), and the CPU starts
  4326. execution of the appropriate exception handling routine according to the vector address. An
  4327. exception handling routine is a program written by the user to handle a specific exception. The
  4328. exception handling routine is terminated and control returned to the original program by
  4329. executing a return-from-exception instruction (RTE). This instruction restores the PC and SR
  4330. contents and returns control to the normal processing routine at the point at which the exception
  4331. occurred.
  4332.  
  4333. The basic processing flow is as follows. See section 2, Data Formats and Registers, for the
  4334. meaning of the individual SR bits.
  4335.  
  4336. 1. The PC and SR contents are saved in SPC and SSR.
  4337. 2. The block bit (BL) in SR is set to 1.
  4338. 3. The mode bit (MD) in SR is set to 1.
  4339. 4. The register bank bit (RB) in SR is set to 1.
  4340. 5. In a reset, the FPU disable bit (FD) in SR is cleared to 0.
  4341. 6. The exception code is written to bits 11–0 of the exception event register (EXPEVT) or
  4342. interrupt event register (INTEVT).
  4343. 7. The CPU branches to the determined exception handling vector address, and the exception
  4344. handling routine begins.
  4345.  
  4346. 5.3.2 Exception Handling Vector Addresses
  4347.  
  4348. The reset vector address is fixed at H'A000 0000. Exception and interrupt vector addresses are
  4349. determined by adding the offset for the specific event to the vector base address, which is set by
  4350. software in the vector base register (VBR). In the case of the TLB miss exception, for example,
  4351. the offset is H'0000 0400, so if H'9C08 0000 is set in VBR, the exception handling vector
  4352. address will be H'9C08 0400. If a further exception occurs at the exception handling vector
  4353. address, a duplicate exception will result, and recovery will be difficult; therefore, fixed physical
  4354. addresses (P1, P2) should be specified for vector addresses.
  4355.  
  4356. Rev. 2.0, 02/99, page 87 of 830
  4357.  
  4358. ----------------------- Page 102-----------------------
  4359.  
  4360. 5.4 Exception Types and Priorities
  4361.  
  4362. Table 5.2 shows the types of exceptions, with their relative priorities, vector addresses, and
  4363. exception/interrupt codes.
  4364.  
  4365. Table 5.2 Exceptions
  4366.  
  4367. Exception Execution Priority Priority Vector Exception
  4368. Category Mode Exception Level Order Address Offset Code
  4369.  
  4370. Reset Abort type Power-on reset 1 1 H'A000 0000 — H’000
  4371.  
  4372. Manual reset 1 2 H'A000 0000 — H’020
  4373.  
  4374. Hitachi-UDI reset 1 1 H'A000 0000 — H’000
  4375.  
  4376. Instruction TLB multiple-hit 1 3 H'A000 0000 — H’140
  4377. exception
  4378.  
  4379. Data TLB multiple-hit exception 1 4 H'A000 0000 — H’140
  4380.  
  4381. General Re- User break before instruction 2 0 (VBR/DBR) H'100/— H'1E0
  4382. exception execution execution*1
  4383.  
  4384. type
  4385.  
  4386. Instruction address error 2 1 (VBR) H'100 H'0E0
  4387.  
  4388. Instruction TLB miss exception 2 2 (VBR) H'400 H'040
  4389.  
  4390. Instruction TLB protection 2 3 (VBR) H'100 H'0A0
  4391. violation exception
  4392.  
  4393. General illegal instruction 2 4 (VBR) H'100 H'180
  4394. exception
  4395.  
  4396. Slot illegal instruction exception 2 4 (VBR) H'100 H'1A0
  4397.  
  4398. General FPU disable exception 2 4 (VBR) H'100 H'800
  4399.  
  4400. Slot FPU disable exception 2 4 (VBR) H'100 H'820
  4401.  
  4402. Data address error (read) 2 5 (VBR) H'100 H'0E0
  4403.  
  4404. Data address error (write) 2 5 (VBR) H'100 H'100
  4405.  
  4406. Data TLB miss exception (read) 2 6 (VBR) H'400 H'040
  4407.  
  4408. Data TLB miss exception (write) 2 6 (VBR) H'400 H'060
  4409.  
  4410. Data TLB protection 2 7 (VBR) H'100 H'0A0
  4411. violation exception (read)
  4412.  
  4413. Data TLB protection 2 7 (VBR) H'100 H'0C0
  4414. violation exception (write)
  4415.  
  4416. FPU exception 2 8 (VBR) H'100 H'120
  4417.  
  4418. Initial page write exception 2 9 (VBR) H'100 H'080
  4419.  
  4420. Completion Unconditional trap (TRAPA) 2 4 (VBR) H'100 H'160
  4421. type
  4422.  
  4423. User break after instruction 2 10 (VBR/DBR) H'100/— H'1E0
  4424. execution*1
  4425.  
  4426. Rev. 2.0, 02/99, page 88 of 830
  4427.  
  4428. ----------------------- Page 103-----------------------
  4429.  
  4430. Table 5.2 Exceptions (cont)
  4431.  
  4432. Exception Execution Priority Priority Vector Exception
  4433. Category Mode Exception Level Order Address Offset Code
  4434.  
  4435. Interrupt Completion Nonmaskable interrupt 3 — (VBR) H'600 H'1C0
  4436. type
  4437.  
  4438. External IRL3–IRL0 0 4 *2 (VBR) H'600 H'200
  4439. interrupts
  4440.  
  4441. 1 H'220
  4442.  
  4443. 2 H'240
  4444.  
  4445. 3 H'260
  4446.  
  4447. 4 H'280
  4448.  
  4449. 5 H'2A0
  4450.  
  4451. 6 H'2C0
  4452.  
  4453. 7 H'2E0
  4454.  
  4455. 8 H'300
  4456.  
  4457. 9 H'320
  4458.  
  4459. A H'340
  4460.  
  4461. B H'360
  4462.  
  4463. C H'380
  4464.  
  4465. D H'3A0
  4466.  
  4467. E H'3C0
  4468.  
  4469. Peripheral TMU0 TUNI0 4 *2 (VBR) H'600 H'400
  4470. module
  4471. interrupt
  4472. (module/
  4473. source)
  4474.  
  4475. TMU1 TUNI1 H'420
  4476.  
  4477. TMU2 TUNI2 H'440
  4478.  
  4479. TICPI2 H'460
  4480.  
  4481. RTC ATI H'480
  4482.  
  4483. PRI H'4A0
  4484.  
  4485. CUI H'4C0
  4486.  
  4487. SCI ERI H'4E0
  4488.  
  4489. RXI H'500
  4490.  
  4491. TXI H'520
  4492.  
  4493. TEI H'540
  4494.  
  4495. WDT ITI H'560
  4496.  
  4497. REF RCMI H'580
  4498.  
  4499. ROVI H'5A0
  4500.  
  4501. Hitachi-UDI Hitachi- H'600
  4502. UDI
  4503.  
  4504. GPIO GPIO1 H'620
  4505.  
  4506. Rev. 2.0, 02/99, page 89 of 830
  4507.  
  4508. ----------------------- Page 104-----------------------
  4509.  
  4510. Table 5.2 Exceptions (cont)
  4511.  
  4512. Exception Execution Priority Priority Vector Exception
  4513. Category Mode Exception Level Order Address Offset Code
  4514.  
  4515. Interrupt Completion Peripheral DMAC DMTE0 4 *2 (VBR) H'600 H'640
  4516. type module
  4517. interrupt
  4518. (module/
  4519. source)
  4520.  
  4521. DMTE1 H'660
  4522.  
  4523. DMTE2 H'680
  4524.  
  4525. DMTE3 H'6A0
  4526.  
  4527. DMAE H'6C0
  4528.  
  4529. SCIF ERI H'700
  4530.  
  4531. RXI H'720
  4532.  
  4533. BRI H'740
  4534.  
  4535. TXI H'760
  4536.  
  4537. Priority: Priority is first assigned by priority level, then by priority order within each level (the lowest
  4538. number represents the highest priority).
  4539. Exception transition destination: Control passes to H'A000 0000 in a reset, and to [VBR + offset]
  4540. in other cases.
  4541. Exception code: Stored in EXPEVT for a reset or general exception, and in INTEVT for an
  4542. interrupt.
  4543. IRL: Interrupt request level (pins IRL3–IRL0).
  4544. Module/source: See the sections on the relevant peripheral modules.
  4545.  
  4546. Notes: 1. When BRCR.UBDE = 1, PC = DBR. In other cases, PC = VBR + H'100.
  4547. 2. The priority order of external interrupts and peripheral module interrupts can be set by
  4548. software.
  4549.  
  4550. Rev. 2.0, 02/99, page 90 of 830
  4551.  
  4552. ----------------------- Page 105-----------------------
  4553.  
  4554. 5.5 Exception Flow
  4555.  
  4556. 5.5.1 Exception Flow
  4557.  
  4558. Figure 5.2 shows an outline flowchart of the basic operations in instruction execution and
  4559. exception handling. For the sake of clarity, the following description assumes that instructions
  4560. are executed sequentially, one by one. Figure 5.2 shows the relative priority order of the
  4561. different kinds of exceptions (reset/general exception/interrupt). Register settings in the event of
  4562. an exception are shown only for SSR, SPC, EXPEVT/INTEVT, SR, and PC, but other registers
  4563. may be set automatically by hardware, depending on the exception. For details, see section 5.6,
  4564. Description of Exceptions. Also, see section 5.6.4, Priority Order with Multiple Exceptions, for
  4565. exception handling during execution of a delayed branch instruction and a delay slot instruction,
  4566. and in the case of instructions in which two data accesses are performed.
  4567.  
  4568. Reset Yes
  4569. requested?
  4570.  
  4571. No
  4572.  
  4573. Execute next instruction
  4574.  
  4575. General Yes Is highest- Yes
  4576. exception requested? priority exception
  4577. re-exception
  4578. type?
  4579. Cancel instruction execution
  4580. No
  4581. No result
  4582.  
  4583. Interrupt Yes
  4584. requested?
  4585.  
  4586. SSR ← SR EXPEVT ← exception code
  4587. No
  4588. SPC ← PC SR. {MD, RB, BL, FD, IMASK} ← 11101111
  4589. SGR ← R15 PC ← H'A000 0000
  4590. EXPEVT/INTEVT ← exception code
  4591. SR.{MD,RB,BL} ← 111
  4592. PC ← (BRCR.UBDE=1 && User_Break?
  4593. DBR: (VBR + Offset))
  4594.  
  4595. Figure 5.2 Instruction Execution and Exception Handling
  4596.  
  4597. Rev. 2.0, 02/99, page 91 of 830
  4598.  
  4599. ----------------------- Page 106-----------------------
  4600.  
  4601. 5.5.2 Exception Source Acceptance
  4602.  
  4603. A priority ranking is provided for all exceptions for use in determining which of two or more
  4604. simultaneously generated exceptions should be accepted. Five of the general exceptions—the
  4605. general illegal instruction exception, slot illegal instruction exception, general FPU disable
  4606. exception, slot FPU disable exception, and unconditional trap exception—are detected in the
  4607. process of instruction decoding, and do not occur simultaneously in the instruction pipeline.
  4608. These exceptions therefore all have the same priority. General exceptions are detected in the
  4609. order of instruction execution. However, exception handling is performed in the order of
  4610. instruction flow (program order). Thus, an exception for an earlier instruction is accepted before
  4611. that for a later instruction. An example of the order of acceptance for general exceptions is
  4612. shown in figure 5.3.
  4613.  
  4614. Rev. 2.0, 02/99, page 92 of 830
  4615.  
  4616. ----------------------- Page 107-----------------------
  4617.  
  4618. Pipeline flow: TLB miss (data access)
  4619. Instruction n IF ID EX MA WB
  4620. Instruction n+1 IF ID EX MA WB
  4621.  
  4622. General illegal instruction exception
  4623.  
  4624. TLB miss (instruction access)
  4625. Instruction n+2 IF ID EX MA WB
  4626.  
  4627. IF: Instruction fetch
  4628. ID: Instruction decode
  4629. EX: Instruction execution
  4630. Instruction n+3 IF ID EX MA WB
  4631. MA: Memory access
  4632. WB: Write-back
  4633.  
  4634. Order of detection:
  4635.  
  4636. General illegal instruction exception (instruction n+1) and
  4637. TLB miss (instruction n+2) are detected simultaneously
  4638.  
  4639. TLB miss (instruction n)
  4640.  
  4641. Order of exception handling: Program order
  4642.  
  4643. TLB miss (instruction n)
  4644. 1
  4645.  
  4646. Re-execution of instruction n
  4647.  
  4648. General illegal instruction exception
  4649. (instruction n+1)
  4650. 2
  4651.  
  4652. Re-execution of instruction n+1
  4653.  
  4654. TLB miss (instruction n+2)
  4655.  
  4656. 3
  4657.  
  4658. Re-execution of instruction n+2
  4659.  
  4660. Execution of instruction n+3 4
  4661.  
  4662. Figure 5.3 Example of General Exception Acceptance Order
  4663.  
  4664. Rev. 2.0, 02/99, page 93 of 830
  4665.  
  4666. ----------------------- Page 108-----------------------
  4667.  
  4668. 5.5.3 Exception Requests and BL Bit
  4669.  
  4670. When the BL bit in SR is 0, exceptions and interrupts are accepted.
  4671.  
  4672. When the BL bit in SR is 1 and an exception other than a user break is generated, the CPU’s
  4673. internal registers are set to their post-reset state, the registers of the other modules retain their
  4674. contents prior to the exception, and the CPU branches to the same address as in a reset (H'A000
  4675. 0000). For the operation in the event of a user break, see section 20, User Break Controller. If an
  4676. ordinary interrupt occurs, the interrupt request is held pending and is accepted after the BL bit
  4677. has been cleared to 0 by software. If a nonmaskable interrupt (NMI) occurs, it can be held
  4678. pending or accepted according to the setting made by software.
  4679.  
  4680. Thus, normally, SPC and SSR are saved and then the BL bit in SR is cleared to 0, to enable
  4681. multiple exception state acceptance.
  4682.  
  4683. 5.5.4 Return from Exception Handling
  4684.  
  4685. The RTE instruction is used to return from exception handling. When the RTE instruction is
  4686. executed, the SPC contents are restored to PC and the SSR contents to SR, and the CPU returns
  4687. from the exception handling routine by branching to the SPC address. If SPC and SSR were
  4688. saved to external memory, set the BL bit in SR to 1 before restoring the SPC and SSR contents
  4689. and issuing the RTE instruction.
  4690.  
  4691. Rev. 2.0, 02/99, page 94 of 830
  4692.  
  4693. ----------------------- Page 109-----------------------
  4694.  
  4695. 5.6 Description of Exceptions
  4696.  
  4697. The various exception handling operations are described here, covering exception sources,
  4698. transition addresses, and processor operation when a transition is made.
  4699.  
  4700. 5.6.1 Resets
  4701.  
  4702. (1) Power-On Reset
  4703.  
  4704. • Sources:
  4705.  SCK2 pin high level and 5(6(7 pin low level
  4706.  When the watchdog timer overflows while the WT/,7 bit is set to 1 and the RSTS bit is
  4707. cleared to 0 in WTCSR. For details, see section 10, Clock Oscillation Circuits.
  4708. • Transition address: H'A000 0000
  4709. • Transition operations:
  4710. Exception code H'000 is set in EXPEVT, initialization of VBR and SR is performed, and a
  4711. branch is made to PC = H'A000 0000.
  4712. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  4713. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  4714. set to B'1111.
  4715. CPU and on-chip peripheral module initialization is performed. For details, see the register
  4716. descriptions in the relevant sections. For some CPU functions, the 7567 pin and 5(6(7 pin
  4717. must be driven low. It is therefore essential to execute a power-on reset and drive the 7567
  4718. pin low when powering on.
  4719.  
  4720. Power_on_reset()
  4721.  
  4722. {
  4723.  
  4724. EXPEVT = H'00000000;
  4725.  
  4726. VBR = H'00000000;
  4727.  
  4728. SR.MD = 1;
  4729.  
  4730. SR.RB = 1;
  4731.  
  4732. SR.BL = 1;
  4733.  
  4734. SR.(I0-I3) = B'1111;
  4735.  
  4736. SR.FD=0;
  4737.  
  4738. Initialize_CPU();
  4739.  
  4740. Initialize_Module(PowerOn);
  4741.  
  4742. PC = H'A0000000;
  4743.  
  4744. }
  4745.  
  4746. Rev. 2.0, 02/99, page 95 of 830
  4747.  
  4748. ----------------------- Page 110-----------------------
  4749.  
  4750. (2) Manual Reset
  4751.  
  4752. • Sources:
  4753.  SCK2 pin low level and 5(6(7 pin low level
  4754.  When a general exception other than a user break occurs while the BL bit is set to 1 in SR
  4755.  When the watchdog timer overflows while the RSTS bit is set to 1 in WTCSR. For
  4756. details, see section 10, Clock Oscillation Circuits.
  4757. • Transition address: H'A000 0000
  4758. • Transition operations:
  4759. Exception code H'020 is set in EXPEVT, initialization of VBR and SR is performed, and a
  4760. branch is made to PC = H'A000 0000.
  4761. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  4762. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  4763. set to B'1111.
  4764. CPU and on-chip peripheral module initialization is performed. For details, see the register
  4765. descriptions in the relevant sections.
  4766.  
  4767. Manual_reset()
  4768.  
  4769. {
  4770.  
  4771. EXPEVT = H'00000020;
  4772.  
  4773. VBR = H'00000000;
  4774.  
  4775. SR.MD = 1;
  4776.  
  4777. SR.RB = 1;
  4778.  
  4779. SR.BL = 1;
  4780.  
  4781. SR.(I0-I3) = B'1111;
  4782.  
  4783. SR.FD = 0;
  4784.  
  4785. Initialize_CPU();
  4786.  
  4787. Initialize_Module(Manual);
  4788.  
  4789. PC = H'A0000000;
  4790.  
  4791. }
  4792.  
  4793. Rev. 2.0, 02/99, page 96 of 830
  4794.  
  4795. ----------------------- Page 111-----------------------
  4796.  
  4797. Table 5-3 Types of Reset
  4798.  
  4799. Reset State Transition
  4800. Conditions Internal States
  4801.  
  4802. On-Chip Peripheral
  4803. Type 6&. 5(6(7 CPU Modules
  4804. 6&. 5(6(7
  4805.  
  4806. Power-on reset High Low Initialized See Register
  4807. Configuration in
  4808. each section
  4809.  
  4810. Manual reset Low Low Initialized
  4811.  
  4812. (3) Hitachi-UDI Reset
  4813.  
  4814. • Source: SDIR.TI3–TI0 = B'0110 (negation) or B'0111 (assertion)
  4815. • Transition address: H'A000 0000
  4816. • Transition operations:
  4817. Exception code H'000 is set in EXPEVT, initialization of VBR and SR is performed, and a
  4818. branch is made to PC = H'A000 0000.
  4819. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  4820. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  4821. set to B'1111.
  4822. CPU and on-chip peripheral module initialization is performed. For details, see the register
  4823. descriptions in the relevant sections.
  4824.  
  4825. Hitachi-UDI_reset()
  4826.  
  4827. {
  4828.  
  4829. EXPEVT = H'00000000;
  4830.  
  4831. VBR = H'00000000;
  4832.  
  4833. SR.MD = 1;
  4834.  
  4835. SR.RB = 1;
  4836.  
  4837. SR.BL = 1;
  4838.  
  4839. SR.(I0-I3) = B'1111;
  4840.  
  4841. SR.FD = 0;
  4842.  
  4843. Initialize_CPU();
  4844.  
  4845. Initialize_Module(PowerOn);
  4846.  
  4847. PC = H'A0000000;
  4848.  
  4849. }
  4850.  
  4851. Rev. 2.0, 02/99, page 97 of 830
  4852.  
  4853. ----------------------- Page 112-----------------------
  4854.  
  4855. (4) Instruction TLB Multiple-Hit Exception
  4856.  
  4857. • Source: Multiple ITLB address matches
  4858. • Transition address: H'A000 0000
  4859. • Transition operations:
  4860. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  4861. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  4862. the ASID when this exception occurred.
  4863. Exception code H'140 is set in EXPEVT, initialization of VBR and SR is performed, and a
  4864. branch is made to PC = H'A000 0000.
  4865. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  4866. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  4867. set to B'1111.
  4868. CPU and on-chip peripheral module initialization is performed in the same way as in a
  4869. manual reset. For details, see the register descriptions in the relevant sections.
  4870.  
  4871. TLB_multi_hit()
  4872.  
  4873. {
  4874.  
  4875. TEA = EXCEPTION_ADDRESS;
  4876.  
  4877. PTEH.VPN = PAGE_NUMBER;
  4878.  
  4879. EXPEVT = H'00000140;
  4880.  
  4881. VBR = H'00000000;
  4882.  
  4883. SR.MD = 1;
  4884.  
  4885. SR.RB = 1;
  4886.  
  4887. SR.BL = 1;
  4888.  
  4889. SR.(I0-I3) = B'1111;
  4890.  
  4891. SR.FD = 0;
  4892.  
  4893. Initialize_CPU();
  4894.  
  4895. Initialize_Module(Manual);
  4896.  
  4897. PC = H'A0000000;
  4898.  
  4899. }
  4900.  
  4901. Rev. 2.0, 02/99, page 98 of 830
  4902.  
  4903. ----------------------- Page 113-----------------------
  4904.  
  4905. (5) Operand TLB Multiple-Hit Exception
  4906.  
  4907. • Source: Multiple UTLB address matches
  4908. • Transition address: H'A000 0000
  4909. • Transition operations:
  4910. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  4911. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  4912. the ASID when this exception occurred.
  4913. Exception code H'140 is set in EXPEVT, initialization of VBR and SR is performed, and a
  4914. branch is made to PC = H'A000 0000.
  4915. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  4916. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  4917. set to B'1111.
  4918. CPU and on-chip peripheral module initialization is performed in the same way as in a
  4919. manual reset. For details, see the register descriptions in the relevant sections.
  4920.  
  4921. TLB_multi_hit()
  4922.  
  4923. {
  4924.  
  4925. TEA = EXCEPTION_ADDRESS;
  4926.  
  4927. PTEH.VPN = PAGE_NUMBER;
  4928.  
  4929. EXPEVT = H'00000140;
  4930.  
  4931. VBR = H'00000000;
  4932.  
  4933. SR.MD = 1;
  4934.  
  4935. SR.RB = 1;
  4936.  
  4937. SR.BL = 1;
  4938.  
  4939. SR.(I0-I3) = B'1111;
  4940.  
  4941. SR.FD = 0;
  4942.  
  4943. Initialize_CPU();
  4944.  
  4945. Initialize_Module(Manual);
  4946.  
  4947. PC = H'A0000000;
  4948.  
  4949. }
  4950.  
  4951. Rev. 2.0, 02/99, page 99 of 830
  4952.  
  4953. ----------------------- Page 114-----------------------
  4954.  
  4955. 5.6.2 General Exceptions
  4956.  
  4957. (1) Data TLB Miss Exception
  4958.  
  4959. • Source: Address mismatch in UTLB address comparison
  4960. • Transition address: VBR + H'0000 0400
  4961. • Transition operations:
  4962. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  4963. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  4964. the ASID when this exception occurred.
  4965. The PC and SR contents for the instruction at which this exception occurred are saved in
  4966. SPC and SSR.
  4967. Exception code H'040 (for a read access) or H'060 (for a write access) is set in EXPEVT. The
  4968. BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0400.
  4969. To speed up TLB miss processing, the offset is separate from that of other exceptions.
  4970.  
  4971. Data_TLB_miss_exception()
  4972.  
  4973. {
  4974.  
  4975. TEA = EXCEPTION_ADDRESS;
  4976.  
  4977. PTEH.VPN = PAGE_NUMBER;
  4978.  
  4979. SPC = PC;
  4980.  
  4981. SSR = SR;
  4982.  
  4983. EXPEVT = read_access ? H'00000040 : H'00000060;
  4984.  
  4985. SR.MD = 1;
  4986.  
  4987. SR.RB = 1;
  4988.  
  4989. SR.BL = 1;
  4990.  
  4991. PC = VBR + H'00000400;
  4992.  
  4993. }
  4994.  
  4995. Rev. 2.0, 02/99, page 100 of 830
  4996.  
  4997. ----------------------- Page 115-----------------------
  4998.  
  4999. (2) Instruction TLB Miss Exception
  5000.  
  5001. • Source: Address mismatch in ITLB address comparison
  5002. • Transition address: VBR + H'0000 0400
  5003. • Transition operations:
  5004. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5005. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5006. the ASID when this exception occurred.
  5007. The PC and SR contents for the instruction at which this exception occurred are saved in
  5008. SPC and SSR.
  5009. Exception code H'040 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5010. branch is made to PC = VBR + H'0400.
  5011. To speed up TLB miss processing, the offset is separate from that of other exceptions.
  5012.  
  5013. ITLB_miss_exception()
  5014.  
  5015. {
  5016.  
  5017. TEA = EXCEPTION_ADDRESS;
  5018.  
  5019. PTEH.VPN = PAGE_NUMBER;
  5020.  
  5021. SPC = PC;
  5022.  
  5023. SSR = SR;
  5024.  
  5025. EXPEVT = H'00000040;
  5026.  
  5027. SR.MD = 1;
  5028.  
  5029. SR.RB = 1;
  5030.  
  5031. SR.BL = 1;
  5032.  
  5033. PC = VBR + H'00000400;
  5034.  
  5035. }
  5036.  
  5037. Rev. 2.0, 02/99, page 101 of 830
  5038.  
  5039. ----------------------- Page 116-----------------------
  5040.  
  5041. (3) Initial Page Write Exception
  5042.  
  5043. • Source: TLB is hit in a store access, but dirty bit D = 0
  5044. • Transition address: VBR + H'0000 0100
  5045. • Transition operations:
  5046. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5047. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5048. the ASID when this exception occurred.
  5049. The PC and SR contents for the instruction at which this exception occurred are saved in
  5050. SPC and SSR.
  5051. Exception code H'080 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5052. branch is made to PC = VBR + H'0100.
  5053.  
  5054. Initial_write_exception()
  5055.  
  5056. {
  5057.  
  5058. TEA = EXCEPTION_ADDRESS;
  5059.  
  5060. PTEH.VPN = PAGE_NUMBER;
  5061.  
  5062. SPC = PC;
  5063.  
  5064. SSR = SR;
  5065.  
  5066. EXPEVT = H'00000080;
  5067.  
  5068. SR.MD = 1;
  5069.  
  5070. SR.RB = 1;
  5071.  
  5072. SR.BL = 1;
  5073.  
  5074. PC = VBR + H'00000100;
  5075.  
  5076. }
  5077.  
  5078. Rev. 2.0, 02/99, page 102 of 830
  5079.  
  5080. ----------------------- Page 117-----------------------
  5081.  
  5082. (4) Data TLB Protection Violation Exception
  5083.  
  5084. • Source: The access does not accord with the UTLB protection information (PR bits) shown
  5085. below.
  5086.  
  5087. PR Privileged Mode User Mode
  5088.  
  5089. 00 Only read access possible Access not possible
  5090.  
  5091. 01 Read/write access possible Access not possible
  5092.  
  5093. 10 Only read access possible Only read access possible
  5094.  
  5095. 11 Read/write access possible Read/write access possible
  5096.  
  5097. • Transition address: VBR + H'0000 0100
  5098. • Transition operations:
  5099. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5100. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5101. the ASID when this exception occurred.
  5102. The PC and SR contents for the instruction at which this exception occurred are saved in
  5103. SPC and SSR.
  5104. Exception code H'0A0 (for a read access) or H'0C0 (for a write access) is set in EXPEVT.
  5105. The BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0100.
  5106.  
  5107. Data_TLB_protection_violation_exception()
  5108.  
  5109. {
  5110.  
  5111. TEA = EXCEPTION_ADDRESS;
  5112.  
  5113. PTEH.VPN = PAGE_NUMBER;
  5114.  
  5115. SPC = PC;
  5116.  
  5117. SSR = SR;
  5118.  
  5119. EXPEVT = read_access ? H'000000A0 : H'000000C0;
  5120.  
  5121. SR.MD = 1;
  5122.  
  5123. SR.RB = 1;
  5124.  
  5125. SR.BL = 1;
  5126.  
  5127. PC = VBR + H'00000100;
  5128.  
  5129. }
  5130.  
  5131. Rev. 2.0, 02/99, page 103 of 830
  5132.  
  5133. ----------------------- Page 118-----------------------
  5134.  
  5135. (5) Instruction TLB Protection Violation Exception
  5136.  
  5137. • Source: The access does not accord with the ITLB protection information (PR bits) shown
  5138. below.
  5139.  
  5140. PR Privileged Mode User Mode
  5141.  
  5142. 0 Access possible Access not possible
  5143.  
  5144. 1 Access possible Access possible
  5145.  
  5146. • Transition address: VBR + H'0000 0100
  5147. • Transition operations:
  5148. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5149. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5150. the ASID when this exception occurred.
  5151. The PC and SR contents for the instruction at which this exception occurred are saved in
  5152. SPC and SSR.
  5153. Exception code H'0A0 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5154. branch is made to PC = VBR + H'0100.
  5155.  
  5156. ITLB_protection_violation_exception()
  5157.  
  5158. {
  5159.  
  5160. TEA = EXCEPTION_ADDRESS;
  5161.  
  5162. PTEH.VPN = PAGE_NUMBER;
  5163.  
  5164. SPC = PC;
  5165.  
  5166. SSR = SR;
  5167.  
  5168. EXPEVT = H'000000A0;
  5169.  
  5170. SR.MD = 1;
  5171.  
  5172. SR.RB = 1;
  5173.  
  5174. SR.BL = 1;
  5175.  
  5176. PC = VBR + H'00000100;
  5177.  
  5178. }
  5179.  
  5180. Rev. 2.0, 02/99, page 104 of 830
  5181.  
  5182. ----------------------- Page 119-----------------------
  5183.  
  5184. (6) Data Address Error
  5185.  
  5186. • Sources:
  5187.  Word data access from other than a word boundary (2n +1)
  5188.  Longword data access from other than a longword data boundary (4n +1, 4n + 2, or 4n
  5189. +3)
  5190.  Quadword data access from other than a quadword data boundary (8n +1, 8n + 2, 8n +3,
  5191. 8n + 4, 8n + 5, 8n + 6, or 8n + 7)
  5192.  Access to area H'8000 0000–H'FFFF FFFF in user mode
  5193. • Transition address: VBR + H'0000 0100
  5194. • Transition operations:
  5195. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5196. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5197. the ASID when this exception occurred.
  5198. The PC and SR contents for the instruction at which this exception occurred are saved in
  5199. SPC and SSR.
  5200. Exception code H'0E0 (for a read access) or H'100 (for a write access) is set in EXPEVT.
  5201. The BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0100.
  5202. For details, see section 3, Memory Management Unit (MMU).
  5203.  
  5204. Data_address_error()
  5205.  
  5206. {
  5207.  
  5208. TEA = EXCEPTION_ADDRESS;
  5209.  
  5210. PTEN.VPN = PAGE_NUMBER;
  5211.  
  5212. SPC = PC;
  5213.  
  5214. SSR = SR;
  5215.  
  5216. EXPEVT = read_access? H'000000E0: H'00000100;
  5217.  
  5218. SR.MD = 1;
  5219.  
  5220. SR.RB = 1;
  5221.  
  5222. SR.BL = 1;
  5223.  
  5224. PC = VBR + H'00000100;
  5225.  
  5226. }
  5227.  
  5228. Rev. 2.0, 02/99, page 105 of 830
  5229.  
  5230. ----------------------- Page 120-----------------------
  5231.  
  5232. (7) Instruction Address Error
  5233.  
  5234. • Sources:
  5235.  Instruction fetch from other than a word boundary (2n +1)
  5236.  Instruction fetch from area H'8000 0000–H'FFFF FFFF in user mode
  5237. • Transition address: VBR + H'0000 0100
  5238. • Transition operations:
  5239. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5240. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5241. the ASID when this exception occurred.
  5242. The PC and SR contents for the instruction at which this exception occurred are saved in the
  5243. SPC and SSR.
  5244. Exception code H'0E0 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5245. branch is made to PC = VBR + H'0100. For details, see section 3, Memory Management Unit
  5246. (MMU).
  5247.  
  5248. Instruction_address_error()
  5249.  
  5250. {
  5251.  
  5252. TEA = EXCEPTION_ADDRESS;
  5253.  
  5254. PTEN.VPN = PAGE_NUMBER;
  5255.  
  5256. SPC = PC;
  5257.  
  5258. SSR = SR;
  5259.  
  5260. EXPEVT = H'000000E0;
  5261.  
  5262. SR.MD = 1;
  5263.  
  5264. SR.RB = 1;
  5265.  
  5266. SR.BL = 1;
  5267.  
  5268. PC = VBR + H'00000100;
  5269.  
  5270. }
  5271.  
  5272. Rev. 2.0, 02/99, page 106 of 830
  5273.  
  5274. ----------------------- Page 121-----------------------
  5275.  
  5276. (8) Unconditional Trap
  5277.  
  5278. • Source: Execution of TRAPA instruction
  5279. • Transition address: VBR + H'0000 0100
  5280. • Transition operations:
  5281. As this is a processing-completion-type exception, the PC contents for the instruction
  5282. following the TRAPA instruction are saved in SPC. The value of SR when the TRAPA
  5283. instruction is executed are saved in SSR. The 8-bit immediate value in the TRAPA
  5284. instruction is multiplied by 4, and the result is set in TRA [9]. Exception code H'160 is set in
  5285. EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR +
  5286. H'0100.
  5287.  
  5288. TRAPA_exception()
  5289.  
  5290. {
  5291.  
  5292. SPC = PC + 2;
  5293.  
  5294. SSR = SR;
  5295.  
  5296. TRA = imm << 2;
  5297.  
  5298. EXPEVT = H'00000160;
  5299.  
  5300. SR.MD = 1;
  5301.  
  5302. SR.RB = 1;
  5303.  
  5304. SR.BL = 1;
  5305.  
  5306. PC = VBR + H'00000100;
  5307.  
  5308. }
  5309.  
  5310. Rev. 2.0, 02/99, page 107 of 830
  5311.  
  5312. ----------------------- Page 122-----------------------
  5313.  
  5314. (9) General Illegal Instruction Exception
  5315.  
  5316. • Sources:
  5317.  Decoding of an undefined instruction not in a delay slot
  5318. Delayed branch instructions: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT/S,
  5319. BF/S
  5320. Undefined instruction: H'FFFD
  5321.  Decoding in user mode of a privileged instruction not in a delay slot
  5322. Privileged instructions: LDC, STC, RTE, LDTLB, SLEEP, but excluding LDC/STC
  5323. instructions that access GBR
  5324. • Transition address: VBR + H'0000 0100
  5325. • Transition operations:
  5326. The PC and SR contents for the instruction at which this exception occurred are saved in
  5327. SPC and SSR.
  5328. Exception code H'180 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5329. branch is made to PC = VBR + H'0100. Operation is not guaranteed if an undefined code
  5330. other than H'FFFD is decoded.
  5331.  
  5332. General_illegal_instruction_exception()
  5333.  
  5334. {
  5335.  
  5336. SPC = PC;
  5337.  
  5338. SSR = SR;
  5339.  
  5340. EXPEVT = H'00000180;
  5341.  
  5342. SR.MD = 1;
  5343.  
  5344. SR.RB = 1;
  5345.  
  5346. SR.BL = 1;
  5347.  
  5348. PC = VBR + H'00000100;
  5349.  
  5350. }
  5351.  
  5352. Rev. 2.0, 02/99, page 108 of 830
  5353.  
  5354. ----------------------- Page 123-----------------------
  5355.  
  5356. (10) Slot Illegal Instruction Exception
  5357.  
  5358. • Sources:
  5359.  Decoding of an undefined instruction in a delay slot
  5360. Delayed branch instructions: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT/S,
  5361. BF/S
  5362. Undefined instruction: H'FFFD
  5363.  Decoding of an instruction that modifies PC in a delay slot
  5364. Instructions that modify PC: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT, BF,
  5365. BT/S, BF/S, TRAPA, LDC Rm, SR, LDC.L @Rm+, SR
  5366.  Decoding in user mode of a privileged instruction in a delay slot
  5367. Privileged instructions: LDC, STC, RTE, LDTLB, SLEEP, but excluding LDC/STC
  5368. instructions that access GBR
  5369.  Decoding of a PC-relative MOV instruction or MOVA instruction in a delay slot
  5370. • Transition address: VBR + H'0000 0100
  5371. • Transition operations:
  5372. The PC contents for the preceding delayed branch instruction are saved in SPC. The SR
  5373. contents when this exception occurred are saved in SSR.
  5374. Exception code H'1A0 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5375. branch is made to PC = VBR + H'0100. Operation is not guaranteed if an undefined code
  5376. other than H'FFFD is decoded.
  5377.  
  5378. Slot_illegal_instruction_exception()
  5379.  
  5380. {
  5381.  
  5382. SPC = PC - 2;
  5383.  
  5384. SSR = SR;
  5385.  
  5386. EXPEVT = H'000001A0;
  5387.  
  5388. SR.MD = 1;
  5389.  
  5390. SR.RB = 1;
  5391.  
  5392. SR.BL = 1;
  5393.  
  5394. PC = VBR + H'00000100;
  5395.  
  5396. }
  5397.  
  5398. Rev. 2.0, 02/99, page 109 of 830
  5399.  
  5400. ----------------------- Page 124-----------------------
  5401.  
  5402. (11) General FPU Disable Exception
  5403.  
  5404. • Source: Decoding of an FPU instruction* not in a delay slot with SR.FD =1
  5405. • Transition address: VBR + H'0000 0100
  5406. • Transition operations:
  5407. The PC and SR contents for the instruction at which this exception occurred are saved in
  5408. SPC and SSR.
  5409. Exception code H'800 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5410. branch is made to PC = VBR + H'0100.
  5411.  
  5412. Note: * FPU instructions are instructions in which the first 4 bits of the instruction code are F
  5413. (but excluding undefined instruction H'FFFD), and the LDS, STS, LDS.L, and STS.L
  5414. instructions corresponding to FPUL and FPSCR.
  5415.  
  5416. General_fpu_disable_exception()
  5417.  
  5418. {
  5419.  
  5420. SPC = PC;
  5421.  
  5422. SSR = SR;
  5423.  
  5424. EXPEVT = H'00000800;
  5425.  
  5426. SR.MD = 1;
  5427.  
  5428. SR.RB = 1;
  5429.  
  5430. SR.BL = 1;
  5431.  
  5432. PC = VBR + H'00000100;
  5433.  
  5434. }
  5435.  
  5436. Rev. 2.0, 02/99, page 110 of 830
  5437.  
  5438. ----------------------- Page 125-----------------------
  5439.  
  5440. (12) Slot FPU Disable Exception
  5441.  
  5442. • Source: Decoding of an FPU instruction in a delay slot with SR.FD =1
  5443. • Transition address: VBR + H'0000 0100
  5444. • Transition operations:
  5445. The PC contents for the preceding delayed branch instruction are saved in SPC. The SR
  5446. contents when this exception occurred are saved in SSR.
  5447. Exception code H'820 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5448. branch is made to PC = VBR + H'0100.
  5449.  
  5450. Slot_fpu_disable_exception()
  5451.  
  5452. {
  5453.  
  5454. SPC = PC - 2;
  5455.  
  5456. SSR = SR;
  5457.  
  5458. EXPEVT = H'00000820;
  5459.  
  5460. SR.MD = 1;
  5461.  
  5462. SR.RB = 1;
  5463.  
  5464. SR.BL = 1;
  5465.  
  5466. PC = VBR + H'00000100;
  5467.  
  5468. }
  5469.  
  5470. Rev. 2.0, 02/99, page 111 of 830
  5471.  
  5472. ----------------------- Page 126-----------------------
  5473.  
  5474. (13) User Breakpoint Trap
  5475.  
  5476. • Source: Fulfilling of a break condition set in the user break controller
  5477. • Transition address: VBR + H'0000 0100, or DBR
  5478. • Transition operations:
  5479. In the case of a post-execution break, the PC contents for the instruction following the
  5480. instruction at which the breakpoint is set are set in SPC. In the case of a pre-execution break,
  5481. the PC contents for the instruction at which the breakpoint is set are set in SPC.
  5482. The SR contents when the break occurred are saved in SSR. Exception code H'1E0 is set in
  5483. EXPEVT.
  5484. The BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0100. It
  5485. is also possible to branch to PC = DBR.
  5486. For details of PC, etc., when a data break is set, see section 20, User Break Controller.
  5487.  
  5488. User_break_exception()
  5489.  
  5490. {
  5491.  
  5492. SPC = (pre_execution break? PC : PC + 2);
  5493.  
  5494. SSR = SR;
  5495.  
  5496. EXPEVT = H'000001E0;
  5497.  
  5498. SR.MD = 1;
  5499.  
  5500. SR.RB = 1;
  5501.  
  5502. SR.BL = 1;
  5503.  
  5504. PC = (BRCR.UBDE==1 ? DBR : VBR + H’00000100);
  5505.  
  5506. }
  5507.  
  5508. Rev. 2.0, 02/99, page 112 of 830
  5509.  
  5510. ----------------------- Page 127-----------------------
  5511.  
  5512. (14) FPU Exception
  5513.  
  5514. • Source: Exception due to execution of a floating-point operation
  5515. • Transition address: VBR + H'0000 0100
  5516. • Transition operations:
  5517. The PC and SR contents for the instruction at which this exception occurred are saved in
  5518. SPC and SSR. Exception code H'120 is set in EXPEVT. The BL, MD, and RB bits are set to
  5519. 1 in SR, and a branch is made to PC = VBR + H'0100.
  5520.  
  5521. FPU_exception()
  5522.  
  5523. {
  5524.  
  5525. SPC = PC;
  5526.  
  5527. SSR = SR;
  5528.  
  5529. EXPEVT = H'00000120;
  5530.  
  5531. SR.MD = 1;
  5532.  
  5533. SR.RB = 1;
  5534.  
  5535. SR.BL = 1;
  5536.  
  5537. PC = VBR + H'00000100;
  5538.  
  5539. }
  5540.  
  5541. Rev. 2.0, 02/99, page 113 of 830
  5542.  
  5543. ----------------------- Page 128-----------------------
  5544.  
  5545. 5.6.3 Interrupts
  5546.  
  5547. (1) NMI
  5548.  
  5549. • Source: NMI pin edge detection
  5550. • Transition address: VBR + H'0000 0600
  5551. • Transition operations:
  5552. The PC and SR contents for the instruction at which this exception is accepted are saved in
  5553. SPC and SSR.
  5554. Exception code H'1C0 is set in INTEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5555. branch is made to PC = VBR + H'0600. When the BL bit in SR is 0, this interrupt is not
  5556. masked by the interrupt mask bits in SR, and is accepted at the highest priority level. When
  5557. the BL bit in SR is 1, a software setting can specify whether this interrupt is to be masked or
  5558. accepted. For details, see section 19, Interrupt Controller.
  5559.  
  5560. NMI()
  5561.  
  5562. {
  5563.  
  5564. SPC = PC;
  5565.  
  5566. SSR = SR;
  5567.  
  5568. INTEVT = H'000001C0;
  5569.  
  5570. SR.MD = 1;
  5571.  
  5572. SR.RB = 1;
  5573.  
  5574. SR.BL = 1;
  5575.  
  5576. PC = VBR + H'00000600;
  5577.  
  5578. }
  5579.  
  5580. Rev. 2.0, 02/99, page 114 of 830
  5581.  
  5582. ----------------------- Page 129-----------------------
  5583.  
  5584. (2) IRL Interrupts
  5585.  
  5586. • Source: The interrupt mask bit setting in SR is smaller than the IRL (3–0) level, and the BL
  5587. bit in SR is 0 (accepted at instruction boundary).
  5588. • Transition address: VBR + H'0000 0600
  5589. • Transition operations:
  5590. The PC contents immediately after the instruction at which the interrupt is accepted are set in
  5591. SPC. The SR contents at the time of acceptance are set in SSR.
  5592. The code corresponding to the IRL (3–0) level is set in INTEVT. See table 19.5, Interrupt
  5593. Exception Handling Sources and Priority Order, for the corresponding codes. The BL, MD,
  5594. and RB bits are set to 1 in SR, and a branch is made to VBR + H'0600. The acceptance level
  5595. is not set in the interrupt mask bits in SR. When the BL bit in SR is 1, the interrupt is
  5596. masked. For details, see section 19, Interrupt Controller.
  5597.  
  5598. IRL()
  5599.  
  5600. {
  5601.  
  5602. SPC = PC;
  5603.  
  5604. SSR = SR;
  5605.  
  5606. INTEVT = H'00000200 ~ H'000003C0;
  5607.  
  5608. SR.MD = 1;
  5609.  
  5610. SR.RB = 1;
  5611.  
  5612. SR.BL = 1;
  5613.  
  5614. PC = VBR + H'00000600;
  5615.  
  5616. }
  5617.  
  5618. Rev. 2.0, 02/99, page 115 of 830
  5619.  
  5620. ----------------------- Page 130-----------------------
  5621.  
  5622. (3) Peripheral Module Interrupts
  5623.  
  5624. • Source: The interrupt mask bit setting in SR is smaller than the peripheral module (Hitachi-
  5625. UDI, GPIO, DMAC, TMU, RTC, SCI, SCIF, WDT, or REF) interrupt level, and the BL bit
  5626. in SR is 0 (accepted at instruction boundary).
  5627. • Transition address: VBR + H'0000 0600
  5628. • Transition operations:
  5629. The PC contents immediately after the instruction at which the interrupt is accepted are set in
  5630. SPC. The SR contents at the time of acceptance are set in SSR.
  5631. The code corresponding to the interrupt source is set in INTEVT. The BL, MD, and RB bits
  5632. are set to 1 in SR, and a branch is made to VBR + H'0600. The module interrupt levels
  5633. should be set as values between B'0000 and B'1111 in the interrupt priority registers (IPRA–
  5634. IPRC) in the interrupt controller. For details, see section 19, Interrupt Controller.
  5635.  
  5636. Module_interruption()
  5637.  
  5638. {
  5639.  
  5640. SPC = PC;
  5641.  
  5642. SSR = SR;
  5643.  
  5644. INTEVT = H'00000400 ~ H'00000760;
  5645.  
  5646. SR.MD = 1;
  5647.  
  5648. SR.RB = 1;
  5649.  
  5650. SR.BL = 1;
  5651.  
  5652. PC = VBR + H'00000600;
  5653.  
  5654. }
  5655.  
  5656. Rev. 2.0, 02/99, page 116 of 830
  5657.  
  5658. ----------------------- Page 131-----------------------
  5659.  
  5660. 5.6.4 Priority Order with Multiple Exceptions
  5661.  
  5662. With some instructions, such as instructions that make two accesses to memory, and the
  5663. indivisible pair comprising a delayed branch instruction and delay slot instruction, multiple
  5664. exceptions occur. Care is required in these cases, as the exception priority order differs from the
  5665. normal order.
  5666.  
  5667. 1. Instructions that make two accesses to memory
  5668. With MAC instructions, memory-to-memory arithmetic/logic instructions, and TAS
  5669. instructions, two data transfers are performed by a single instruction, and an exception will
  5670. be detected for each of these data transfers. In these cases, therefore, the following order is
  5671. used to determine priority.
  5672. a. Data address error in first data transfer
  5673. b. TLB miss in first data transfer
  5674. c. TLB protection violation in first data transfer
  5675. d. Initial page write exception in first data transfer
  5676. e. Data address error in second data transfer
  5677. f. TLB miss in second data transfer
  5678. g. TLB protection violation in second data transfer
  5679. h. Initial page write exception in second data transfer
  5680.  
  5681. 2. Indivisible delayed branch instruction and delay slot instruction
  5682. As a delayed branch instruction and its associated delay slot instruction are indivisible, they
  5683. are treated as a single instruction. Consequently, the priority order for exceptions that occur
  5684. in these instructions differs from the usual priority order. The priority order shown below is
  5685. for the case where the delay slot instruction has only one data transfer.
  5686. a. The delayed branch instruction is checked for priority levels 1 and 2.
  5687. b. The delay slot instruction is checked for priority levels 1 and 2.
  5688. c. A check is performed for priority level 3 in the delayed branch instruction and priority
  5689. level 3 in the delay slot instruction. (There is no priority ranking between these two.)
  5690. d. A check is performed for priority level 4 in the delayed branch instruction and priority
  5691. level 4 in the delay slot instruction. (There is no priority ranking between these two.)
  5692. If the delay slot instruction has a second data transfer, two checks are performed in step b, as
  5693. in 1 above.
  5694. If the accepted exception (the highest-priority exception) is a delay slot instruction re-
  5695. execution type exception, the branch instruction PR register write operation (PC → PR
  5696. operation performed in BSR, BSRF, JSR) is inhibited.
  5697.  
  5698. Rev. 2.0, 02/99, page 117 of 830
  5699.  
  5700. ----------------------- Page 132-----------------------
  5701.  
  5702. 5.7 Usage Notes
  5703.  
  5704. 1. Return from exception handling
  5705. a. Check the BL bit in SR with software. If SPC and SSR have been saved to external
  5706. memory, set the BL bit in SR to 1 before restoring them.
  5707. b. Issue an RTE instruction. When RTE is executed, the SPC contents are set in PC, the
  5708. SSR contents are set in SR, and branch is made to the SPC address to return from the
  5709. exception handling routine.
  5710.  
  5711. 2. If an exception or interrupt occurs when SR.BL = 1
  5712. a. Exception
  5713. When an exception other than a user break occurs, the CPU’s internal registers are set to
  5714. their post-reset state, the registers of the other modules retain their contents prior to the
  5715. exception, and the CPU branches to the same address as in a reset (H'A000 0000). The
  5716. value in EXPEVT at this time is H'0000 0020; the value of the SPC and SSR registers is
  5717. undefined.
  5718. b. Interrupt
  5719. If an ordinary interrupt occurs, the interrupt request is held pending and is accepted after
  5720. the BL bit in SR has been cleared to 0 by software. If a nonmaskable interrupt (NMI)
  5721. occurs, it can be held pending or accepted according to the setting made by software. In
  5722. the sleep or standby state, however, an interrupt is accepted even if the BL bit in SR is set
  5723. to 1.
  5724.  
  5725. 3. SPC when an exception occurs
  5726. a. Re-execution type exception
  5727. The PC value for the instruction in which the exception occurred is set in SPC, and the
  5728. instruction is re-executed after returning from exception handling. If an exception occurs
  5729. in a delay slot instruction, however, the PC value for the delay slot instruction is saved in
  5730. SPC regardless of whether or not the preceding delay slot instruction condition is
  5731. satisfied.
  5732. b. Completion type exception or interrupt
  5733. The PC value for the instruction following that in which the exception occurred is set in
  5734. SPC. If an exception occurs in a branch instruction with delay slot, however, the PC
  5735. value for the branch destination is saved in SPC.
  5736.  
  5737. 4. An exception must not be generated in an RTE instruction delay slot, as the operation will
  5738. be undefined in this case.
  5739.  
  5740. Rev. 2.0, 02/99, page 118 of 830
  5741.  
  5742. ----------------------- Page 133-----------------------
  5743.  
  5744. 5.8 Restrictions
  5745.  
  5746. 1. Restrictions on first instruction of exception handling routine
  5747. • Do not locate a BT, BF, BT/S, BF/S, BRA, or BSR instruction at address VBR + H'100,
  5748. VBR + H'400, or VBR + H'600.
  5749. • When the UBDE bit in the BRCR register is set to 1 and the user break debug support
  5750. function* is used, do not locate a BT, BF, BT/S, BF/S, BRA, or BSR instruction at the
  5751. address indicated by the DBR register.
  5752.  
  5753. Note: * See section 20.4.
  5754.  
  5755. Rev. 2.0, 02/99, page 119 of 830
  5756.  
  5757. ----------------------- Page 134-----------------------
  5758.  
  5759. Rev. 2.0, 02/99, page 120 of 830
  5760.  
  5761. ----------------------- Page 135-----------------------
  5762.  
  5763. Section 6 Floating-Point Unit
  5764.  
  5765. 6.1 Overview
  5766.  
  5767. The floating-point unit (FPU) has the following features:
  5768.  
  5769. • Conforms to IEEE754 standard
  5770. • 32 single-precision floating-point registers (can also be referenced as 16 double-precision
  5771. registers)
  5772. • Two rounding modes: Round to Nearest and Round to Zero
  5773. • Two denormalization modes: Flush to Zero and Treat Denormalized Number
  5774. • Six exception sources: FPU Error, Invalid Operation, Divide By Zero, Overflow, Underflow,
  5775. and Inexact
  5776. • Comprehensive instructions: Single-precision, double-precision, graphics support, system
  5777. control
  5778.  
  5779. When the FD bit in SR is set to 1, the FPU cannot be used, and an attempt to execute an FPU
  5780. instruction will cause an FPU disable exception.
  5781.  
  5782. 6.2 Data Formats
  5783.  
  5784. 6.2.1 Floating-Point Format
  5785.  
  5786. A floating-point number consists of the following three fields:
  5787.  
  5788. • Sign (s)
  5789. • Exponent (e)
  5790. • Fraction (f)
  5791.  
  5792. The SH7750 can handle single-precision and double-precision floating-point numbers, using the
  5793. formats shown in figures 6.1 and 6.2.
  5794.  
  5795. 31 30 23 22 0
  5796.  
  5797. s e f
  5798.  
  5799. Figure 6.1 Format of Single-Precision Floating-Point Number
  5800.  
  5801. Rev. 2.0, 02/99, page 121 of 830
  5802.  
  5803. ----------------------- Page 136-----------------------
  5804.  
  5805. 63 62 52 51 0
  5806.  
  5807. s e f
  5808.  
  5809. Figure 6.2 Format of Double-Precision Floating-Point Number
  5810.  
  5811. The exponent is expressed in biased form, as follows:
  5812.  
  5813. e = E + bias
  5814.  
  5815. The range of unbiased exponent E is Emin – 1 to Emax + 1. The two values Emin – 1 and Emax + 1 are
  5816. distinguished as follows. Emin – 1 indicates zero (both positive and negative sign) and a
  5817. denormalized number, and Emax + 1 indicates positive or negative infinity or a non-number
  5818. (NaN). Table 6.1 shows bias, Emin , and Emax values.
  5819.  
  5820. Table 6.1 Floating-Point Number Formats and Parameters
  5821.  
  5822. Parameter Single-Precision Double-Precision
  5823.  
  5824. Total bit width 32 bits 64 bits
  5825.  
  5826. Sign bit 1 bit 1 bit
  5827.  
  5828. Exponent field 8 bits 11 bits
  5829.  
  5830. Fraction field 23 bits 52 bits
  5831.  
  5832. Precision 24 bits 53 bits
  5833.  
  5834. Bias +127 +1023
  5835.  
  5836. E +127 +1023
  5837. max
  5838.  
  5839. E –126 –1022
  5840. min
  5841.  
  5842. Floating-point number value v is determined as follows:
  5843.  
  5844. If E = Emax + 1 and f ≠ 0, v is a non-number (NaN) irrespective of sign s
  5845.  
  5846. s
  5847. If E = Emax + 1 and f = 0, v = (–1) (infinity) [positive or negative infinity]
  5848.  
  5849. s E
  5850. If Emin ≤ E ≤ Emax , v = (–1) 2 (1.f) [normalized number]
  5851.  
  5852. s Emin
  5853. If E = Emin – 1 and f ≠ 0, v = (–1) 2 (0.f) [denormalized number]
  5854.  
  5855. s
  5856. If E = Emin – 1 and f = 0, v = (–1) 0 [positive or negative zero]
  5857.  
  5858. Table 6.2 shows the ranges of the various numbers in hexadecimal notation.
  5859.  
  5860. Rev. 2.0, 02/99, page 122 of 830
  5861.  
  5862. ----------------------- Page 137-----------------------
  5863.  
  5864. Table 6.2 Floating-Point Ranges
  5865.  
  5866. Type Single-Precision Double-Precision
  5867.  
  5868. Signaling non-number H'7FFFFFFF to H'7FC00000 H'7FFFFFFF H'FFFFFFFF to
  5869. H'7FF80000 H'00000000
  5870.  
  5871. Quiet non-number H'7FBFFFFF to H'7F800001 H'7FF7FFFF H'FFFFFFFF to
  5872. H'7FF00000 H'00000001
  5873.  
  5874. Positive infinity H'7F800000 H'7FF00000 H'00000
  5875.  
  5876. Positive normalized H'7F7FFFFF to H'00800000 H'7FEFFFFF H'FFFFFFFF to
  5877. number H'00100000 H'00000000
  5878.  
  5879. Positive denormalized H'007FFFFF to H'00000001 H'000FFFFF H'FFFFFFFF to
  5880. number H'00000000 H'00000001
  5881.  
  5882. Positive zero H'00000000 H'00000000 H'00000000
  5883.  
  5884. Negative zero H'80000000 H'80000000 H'00000000
  5885.  
  5886. Negative denormalized H'80000001 to H'807FFFFF H'80000000 H'00000001 to
  5887. number H'800FFFFF H'FFFFFFFF
  5888.  
  5889. Negative normalized H'80800000 to H'FF7FFFFF H'80100000 H'00000000 to
  5890. number H'FFEFFFFF H'FFFFFFFF
  5891.  
  5892. Negative infinity H'FF800000 H'FFF00000 H'00000000
  5893.  
  5894. Quiet non-number H'FF800001 to H'FFBFFFFF H'FFF00000 H'00000001 to
  5895. H'FFF7FFFF H'FFFFFFFF
  5896.  
  5897. Signaling non-number H'FFC00000 to H'FFFFFFFF H'FFF80000 H'00000000 to
  5898. H'FFFFFFFF H'FFFFFFFF
  5899.  
  5900. 6.2.2 Non-Numbers (NaN)
  5901.  
  5902. Figure 6.3 shows the bit pattern of a non-number (NaN). A value is NaN in the following case:
  5903.  
  5904. • Sign bit: Don’t care
  5905. • Exponent field: All bits are 1
  5906. • Fraction field: At least one bit is 1
  5907.  
  5908. The NaN is a signaling NaN (sNaN) if the MSB of the fraction field is 1, and a quiet NaN
  5909. (qNaN) if the MSB is 0.
  5910.  
  5911. Rev. 2.0, 02/99, page 123 of 830
  5912.  
  5913. ----------------------- Page 138-----------------------
  5914.  
  5915. 31 30 23 22 0
  5916.  
  5917. x 11111111 Nxxxxxxxxxxxxxxxxxxxxxx
  5918.  
  5919. N = 1: sNaN
  5920. N = 0: qNaN
  5921.  
  5922.  
  5923. Figure 6.3 Single-Precision NaN Bit Pattern
  5924.  
  5925. An sNAN is input in an operation, except copy, FABS, and FNEG, that generates a floating-
  5926. point value.
  5927.  
  5928. • When the EN.V bit in the FPSCR register is 0, the operation result (output) is a qNaN.
  5929. • When the EN.V bit in the FPSCR register is 1, an invalid operation exception will be
  5930. generated. In this case, the contents of the operation destination register are unchanged.
  5931.  
  5932. If a qNaN is input in an operation that generates a floating-point value, and an sNaN has not
  5933. been input in that operation, the output will always be a qNaN irrespective of the setting of the
  5934. EN.V bit in the FPSCR register. An exception will not be generated in this case.
  5935.  
  5936. The qNAN values generated by the SH7750 as operation results are as follows:
  5937.  
  5938. • Single-precision qNaN: H'7FBFFFFF
  5939. • Double-precision qNaN: H'7FF7FFFF FFFFFFFF
  5940.  
  5941. See the individual instruction descriptions for details of floating-point operations when a non-
  5942. number (NaN) is input.
  5943.  
  5944. 6.2.3 Denormalized Numbers
  5945.  
  5946. For a denormalized number floating-point value, the exponent field is expressed as 0, and the
  5947. fraction field as a non-zero value.
  5948.  
  5949. When the DN bit in the FPU’s status register FPSCR is 1, a denormalized number (source
  5950. operand or operation result) is always flushed to 0 in a floating-point operation that generates a
  5951. value (an operation other than copy, FNEG, or FABS).
  5952.  
  5953. When the DN bit in FPSCR is 0, a denormalized number (source operand or operation result) is
  5954. processed as it is. See the individual instruction descriptions for details of floating-point
  5955. operations when a denormalized number is input.
  5956.  
  5957. Rev. 2.0, 02/99, page 124 of 830
  5958.  
  5959. ----------------------- Page 139-----------------------
  5960.  
  5961. 6.3 Registers
  5962.  
  5963. 6.3.1 Floating-Point Registers
  5964.  
  5965. Figure 6.4 shows the floating-point register configuration. There are thirty-two 32-bit floating-
  5966. point registers, referenced by specifying FR0–FR15, DR0/2/4/6/8/10/12/14, FV0/4/8/12, XF0–
  5967. XF15, XD0/2/4/6/8/10/12/14, or XMTRX.
  5968.  
  5969. 1. Floating-point registers, FPRi_BANKj (32 registers)
  5970. FPR0_BANK0–FPR15_BANK0
  5971. FPR0_BANK1–FPR15_BANK1
  5972.  
  5973. 2. Single-precision floating-point registers, FRi (16 registers)
  5974. When FPSCR.FR = 0, FR0–FR15 indicate FPR0_BANK0–FPR15_BANK0;
  5975. when FPSCR.FR = 1, FR0–FR15 indicate FPR0_BANK1–FPR15_BANK1.
  5976.  
  5977. 3. Double-precision floating-point registers, DRi (8 registers): A DR register comprises two FR
  5978. registers
  5979. DR0 = {FR0, FR1}, DR2 = {FR2, FR3}, DR4 = {FR4, FR5}, DR6 = {FR6, FR7},
  5980. DR8 = {FR8, FR9}, DR10 = {FR10, FR11}, DR12 = {FR12, FR13}, DR14 = {FR14, FR15}
  5981.  
  5982. 4. Single-precision floating-point vector registers, FVi (4 registers): An FV register comprises
  5983. four FR registers
  5984. FV0 = {FR0, FR1, FR2, FR3}, FV4 = {FR4, FR5, FR6, FR7},
  5985. FV8 = {FR8, FR9, FR10, FR11}, FV12 = {FR12, FR13, FR14, FR15}
  5986.  
  5987. 5. Single-precision floating-point extended registers, XFi (16 registers)
  5988. When FPSCR.FR = 0, XF0–XF15 indicate FPR0_BANK1–FPR15_BANK1;
  5989. when FPSCR.FR = 1, XF0–XF15 indicate FPR0_BANK0–FPR15_BANK0.
  5990.  
  5991. 6. Double-precision floating-point extended registers, XDi (8 registers): An XD register
  5992. comprises two XF registers
  5993. XD0 = {XF0, XF1}, XD2 = {XF2, XF3}, XD4 = {XF4, XF5}, XD6 = {XF6, XF7},
  5994. XD8 = {XF8, XF9}, XD10 = {XF10, XF11}, XD12 = {XF12, XF13}, XD14 = {XF14,
  5995. XF15}
  5996.  
  5997. Rev. 2.0, 02/99, page 125 of 830
  5998.  
  5999. ----------------------- Page 140-----------------------
  6000.  
  6001. 7. Single-precision floating-point extended register matrix, XMTRX: XMTRX comprises all 16
  6002. XF registers
  6003.  
  6004. XMTRX = XF0 XF4 XF8 XF12
  6005. XF1 XF5 XF9 XF13
  6006. XF2 XF6 XF10 XF14
  6007. XF3 XF7 XF11 XF15
  6008.  
  6009. FPSCR.FR = 0 FPSCR.FR = 1
  6010.  
  6011. FV0 DR0 FR0 FPR0_BANK0 XF0 XD0 XMTRX
  6012. FR1 FPR1_BANK0 XF1
  6013. DR2 FR2 FPR2_BANK0 XF2 XD2
  6014. FR3 FPR3_BANK0 XF3
  6015. FV4 DR4 FR4 FPR4_BANK0 XF4 XD4
  6016. FR5 FPR5_BANK0 XF5
  6017. DR6 FR6 FPR6_BANK0 XF6 XD6
  6018. FR7 FPR7_BANK0 XF7
  6019. FV8 DR8 FR8 FPR8_BANK0 XF8 XD8
  6020. FR9 FPR9_BANK0 XF9
  6021. DR10 FR10 FPR10_BANK0 XF10 XD10
  6022. FR11 FPR11_BANK0 XF11
  6023. FV12 DR12 FR12 FPR12_BANK0 XF12 XD12
  6024. FR13 FPR13_BANK0 XF13
  6025. DR14 FR14 FPR14_BANK0 XF14 XD14
  6026. FR15 FPR15_BANK0 XF15
  6027.  
  6028. XMTRX XD0 XF0 FPR0_BANK1 FR0 DR0 FV0
  6029. XF1 FPR1_BANK1 FR1
  6030. XD2 XF2 FPR2_BANK1 FR2 DR2
  6031. XF3 FPR3_BANK1 FR3
  6032. XD4 XF4 FPR4_BANK1 FR4 DR4 FV4
  6033. XF5 FPR5_BANK1 FR5
  6034. XD6 XF6 FPR6_BANK1 FR6 DR6
  6035. XF7 FPR7_BANK1 FR7
  6036. XD8 XF8 FPR8_BANK1 FR8 DR8 FV8
  6037. XF9 FPR9_BANK1 FR9
  6038. XD10 XF10 FPR10_BANK1 FR10 DR10
  6039. XF11 FPR11_BANK1 FR11
  6040. XD12 XF12 FPR12_BANK1 FR12 DR12 FV12
  6041. XF13 FPR13_BANK1 FR13
  6042. XD14 XF14 FPR14_BANK1 FR14 DR14
  6043. XF15 FPR15_BANK1 FR15
  6044.  
  6045. Figure 6.4 Floating-Point Registers
  6046.  
  6047. Rev. 2.0, 02/99, page 126 of 830
  6048.  
  6049. ----------------------- Page 141-----------------------
  6050.  
  6051. 6.3.2 Floating-Point Status/Control Register (FPSCR)
  6052.  
  6053. Floating-point status/control register, FPSCR (32 bits, initial value = H'0004 0001)
  6054.  
  6055. • FR: Floating-point register bank
  6056. FR = 0: FPR0_BANK0–FPR15_BANK0 are assigned to FR0–FR15; FPR0_BANK1–
  6057. FPR15_BANK1 are assigned to XF0–XF15.
  6058. FR = 1: FPR0_BANK0–FPR15_BANK0 are assigned to XF0–XF15; FPR0_BANK1–
  6059. FPR15_BANK1 are assigned to FR0–FR15.
  6060.  
  6061. • SZ: Transfer size mode
  6062. SZ = 0: The data size of the FMOV instruction is 32 bits.
  6063. SZ = 1: The data size of the FMOV instruction is a 32-bit register pair (64 bits).
  6064.  
  6065. • PR: Precision mode
  6066. PR = 0: Floating-point instructions are executed as single-precision operations.
  6067. PR = 1: Floating-point instructions are executed as double-precision operations (graphics
  6068. support instructions are undefined).
  6069. Do not set SZ and PR to 1 simultaneously; this setting is reserved.
  6070. [SZ, PR = 11]: Reserved (FPU operation instruction is undefined.)
  6071.  
  6072. • DN: Denormalization mode
  6073. DN = 0: A denormalized number is treated as such.
  6074. DN = 1: A denormalized number is treated as zero.
  6075.  
  6076. FPU Invalid Division Overflow Underflow Inexact
  6077. Error (E) Operation (V) by Zero (Z) (O) (U) (I)
  6078.  
  6079. Cause FPU exception Bit 17 Bit 16 Bit 15 Bit 14 Bit 13 Bit 12
  6080. cause field
  6081.  
  6082. Enable FPU exception None Bit 11 Bit 10 Bit 9 Bit 8 Bit 7
  6083. enable field
  6084.  
  6085. Flag FPU exception None Bit 6 Bit 5 Bit 4 Bit 3 Bit 2
  6086. flag field
  6087.  
  6088. When an FPU exception is requested, the corresponding bits in the cause and flag fields are
  6089. set to 1. Each time an FPU operation instruction is executed, the cause field is cleared to 0
  6090. first. The flag field retains the value of 1 until cleared to 0 by software.
  6091.  
  6092. Rev. 2.0, 02/99, page 127 of 830
  6093.  
  6094. ----------------------- Page 142-----------------------
  6095.  
  6096. • RM: Rounding mode
  6097. RM = 00: Round to Nearest
  6098. RM = 01: Round to Zero
  6099. RM = 10: Reserved
  6100. RM = 11: Reserved
  6101.  
  6102. • Bits 22 to 31: Reserved
  6103. These bits are always read as 0, and should only be written with 0.
  6104.  
  6105. Notes: The following functions have been added to the FPU of the SH7750 (not provided in the
  6106. FPU of the SH7718):
  6107. 1. The FR, SZ, and PR bits have been added.
  6108. 2. Exception O (overflow), U (underflow), and I (inexact) bits have been added to the
  6109. cause, enable, and flag fields.
  6110. 3. An exception E (FPU error) bit has been added to the cause field.
  6111.  
  6112. 6.3.3 Floating-Point Communication Register (FPUL)
  6113.  
  6114. Information is transferred between the FPU and CPU via the FPUL register. The 32-bit FPUL
  6115. register is a system register, and is accessed from the CPU side by means of LDS and STS
  6116. instructions. For example, to convert the integer stored in general register R1 to a single-
  6117. precision floating-point number, the processing flow is as follows:
  6118.  
  6119. R1 → (LDS instruction) → FPUL → (single-precision FLOAT instruction) → FR1
  6120.  
  6121. 6.4 Rounding
  6122.  
  6123. In a floating-point instruction, rounding is performed when generating the final operation result
  6124. from the intermediate result. Therefore, the result of combination instructions such as FMAC,
  6125. FTRV, and FIPR will differ from the result when using a basic instruction such as FADD,
  6126. FSUB, or FMUL. Rounding is performed once in FMAC, but twice in FADD, FSUB, and
  6127. FMUL.
  6128.  
  6129. There are two rounding methods, the method to be used being determined by the RM field in
  6130. FPSCR.
  6131.  
  6132. • RM = 00: Round to Nearest
  6133. • RM = 01: Round to Zero
  6134.  
  6135. Rev. 2.0, 02/99, page 128 of 830
  6136.  
  6137. ----------------------- Page 143-----------------------
  6138.  
  6139. Round to Nearest: The value is rounded to the nearest expressible value. If there are two
  6140. nearest expressible values, the one with an LSB of 0 is selected.
  6141.  
  6142. If the unrounded value is 2Emax (2 – 2–P) or more, the result will be infinity with the same sign as
  6143.  
  6144. the unrounded value. The values of Emax and P, respectively, are 127 and 24 for single-
  6145. precision, and 1023 and 53 for double-precision.
  6146.  
  6147. Round to Zero: The digits below the round bit of the unrounded value are discarded.
  6148.  
  6149. If the unrounded value is larger than the maximum expressible absolute value, the value will be
  6150. the maximum expressible absolute value.
  6151.  
  6152. 6.5 Floating-Point Exceptions
  6153.  
  6154. FPU-related exceptions are as follows:
  6155.  
  6156. • General illegal instruction/slot illegal instruction exception
  6157. The exception occurs if an FPU instruction is executed when SR.FD = 1.
  6158.  
  6159. • FPU exceptions
  6160. The exception sources are as follows:
  6161.  FPU error (E): When FPSCR.DN = 0 and a denormalized number is input
  6162.  Invalid operation (V): In case of an invalid operation, such as NaN input
  6163.  Division by zero (Z): Division with a zero divisor
  6164.  Overflow (O): When the operation result overflows
  6165.  Underflow (U): When the operation result underflows
  6166.  Inexact exception (I): When overflow, underflow, or rounding occurs
  6167. The FPSCR cause field contains bits corresponding to all of above sources E, V, Z, O, U, and
  6168. I, and the FPSCR flag and enable fields contain bits corresponding to sources V, Z, O, U, and
  6169. I, but not E. Thus, FPU errors cannot be disabled.
  6170. When an exception source occurs, the corresponding bit in the cause field is set to 1, and 1 is
  6171. added to the corresponding bit in the flag field. When an exception source does not occur,
  6172. the corresponding bit in the cause field is cleared to 0, but the corresponding bit in the flag
  6173. field remains unchanged.
  6174.  
  6175. • Enable/disable exception handling
  6176. The SH7750 supports enable exception handling and disable exception handling.
  6177. Enable exception handling is initiated in the following cases:
  6178.  FPU error (E): FPSCR.DN = 0 and a denormalized number is input
  6179.  Invalid operation (V): FPSCR.EN.V = 1 and (instruction = FTRV or invalid operation)
  6180.  Division by zero (Z): FPSCR.EN.Z = 1 and division with a zero divisor
  6181.  
  6182. Rev. 2.0, 02/99, page 129 of 830
  6183.  
  6184. ----------------------- Page 144-----------------------
  6185.  
  6186.  Overflow (O): FPSCR.EN.O = 1 and instruction with possibility of operation result
  6187. overflow
  6188.  Underflow (U): FPSCR.EN.U = 1 and instruction with possibility of operation result
  6189. underflow
  6190.  Inexact exception (I): FPSCR.EN.I = 1 and instruction with possibility of inexact
  6191. operation result
  6192. These possibilities are shown in the individual instruction descriptions. All exception events
  6193. that originate in the FPU are assigned as the same exception event. The meaning of an
  6194. exception is determined by software by reading system register FPSCR and interpreting the
  6195. information it contains. If no bits are set in the cause field of FPSCR when one or more of
  6196. bits O, U, I, and V (in case of FTRV only) are set in the enable field, this indicates that an
  6197. actual exception source is not generated. Also, the destination register is not changed by any
  6198. enable exception handling operation.
  6199. Except for the above, the FPU disables exception handling. In all processing, the bit
  6200. corresponding to source V, Z, O, U, or I is set to 1, and disable exception handling is
  6201. provided for each exception.
  6202.  Invalid operation (V): qNAN is generated as the result.
  6203.  Division by zero (Z): Infinity with the same sign as the unrounded value is generated.
  6204.  Overflow (O):
  6205. When rounding mode = RZ, the maximum normalized number, with the same sign as the
  6206. unrounded value, is generated.
  6207. When rounding mode = RN, infinity with the same sign as the unrounded value is
  6208. generated.
  6209.  Underflow (U):
  6210. When FPSCR.DN = 0, a denormalized number with the same sign as the unrounded
  6211. value, or zero with the same sign as the unrounded value, is generated.
  6212. When FPSCR.DN = 1, zero with the same sign as the unrounded value, is generated.
  6213.  Inexact exception (I): An inexact result is generated.
  6214.  
  6215. Rev. 2.0, 02/99, page 130 of 830
  6216.  
  6217. ----------------------- Page 145-----------------------
  6218.  
  6219. 6.6 Graphics Support Functions
  6220.  
  6221. The SH7750 supports two kinds of graphics functions: new instructions for geometric
  6222. operations, and pair single-precision transfer instructions that enable high-speed data transfer.
  6223.  
  6224. 6.6.1 Geometric Operation Instructions
  6225.  
  6226. Geometric operation instructions perform approximate-value computations. To enable high-
  6227. speed computation with a minimum of hardware, the SH7750 ignores comparatively small
  6228. values in the partial computation results of four multiplications. Consequently, the error shown
  6229. below is produced in the result of the computation:
  6230.  
  6231. Maximum error =MAX (individual multiplication result ×
  6232. 2–MIN (number of multiplier significant digits–1, number of multiplicand significant digits–1) –23 –149
  6233. ) + MAX (result value × 2 , 2 )
  6234.  
  6235. The number of significant digits is 24 for a normalized number and 23 for a denormalized
  6236. number (number of leading zeros in the fractional part).
  6237.  
  6238. In future version of SH series, the above error is guaranteed, but the same result as SH7750 is
  6239. not guaranteed.
  6240.  
  6241. FIPR FVm, FVn (m, n: 0, 4, 8, 12): This instruction is basically used for the following
  6242. purposes:
  6243.  
  6244. • Inner product (m ≠ n):
  6245. This operation is generally used for surface/rear surface determination for polygon surfaces.
  6246. • Sum of square of elements (m = n):
  6247. This operation is generally used to find the length of a vector.
  6248.  
  6249. Since approximate-value computations are performed to enable high-speed computation, the
  6250. inexact exception (I) bit in the cause field and flag field is always set to 1 when an FIPR
  6251. instruction is executed. Therefore, if the corresponding bit is set in the enable field, enable
  6252. exception handling will be executed.
  6253.  
  6254. Rev. 2.0, 02/99, page 131 of 830
  6255.  
  6256. ----------------------- Page 146-----------------------
  6257.  
  6258. FTRV XMTRX, FVn (n: 0, 4, 8, 12): This instruction is basically used for the following
  6259. purposes:
  6260.  
  6261. • Matrix (4 × 4) ⋅ vector (4):
  6262. This operation is generally used for viewpoint changes, angle changes, or movements called
  6263. vector transformations (4-dimensional). Since affine transformation processing for angle +
  6264. parallel movement basically requires a 4 × 4 matrix, the SH7750 supports 4-dimensional
  6265. operations.
  6266. • Matrix (4 × 4) × matrix (4 × 4):
  6267. This operation requires the execution of four FTRV instructions.
  6268.  
  6269. Since approximate-value computations are performed to enable high-speed computation, the
  6270. inexact exception (I) bit in the cause field and flag field is always set to 1 when an FTRV
  6271. instruction is executed. Therefore, if the corresponding bit is set in the enable field, enable
  6272. exception handling will be executed. For the same reason, it is not possible to check all data
  6273. types in the registers beforehand when executing an FTRV instruction. If the V bit is set in the
  6274. enable field, enable exception handling will be executed.
  6275.  
  6276. FRCHG: This instruction modifies banked registers. For example, when the FTRV instruction is
  6277. executed, matrix elements must be set in an array in the background bank. However, to create
  6278. the actual elements of a translation matrix, it is easier to use registers in the foreground bank.
  6279. When the LDC instruction is used on FPSCR, this instruction expends 4 to 5 cycles in order to
  6280. maintain the FPU state. With the FRCHG instruction, an FPSCR.FR bit modification can be
  6281. performed in one cycle.
  6282.  
  6283. 6.6.2 Pair Single-Precision Data Transfer
  6284.  
  6285. In addition to the powerful new geometric operation instructions, the SH7750 also supports high-
  6286. speed data transfer instructions.
  6287.  
  6288. When FPSCR.SZ = 1, the SH7750 can perform data transfer by means of pair single-precision
  6289. data transfer instructions.
  6290.  
  6291. • FMOV DRm/XDm, DRn/XDRn (m, n: 0, 2, 4, 6, 8, 10, 12, 14)
  6292. • FMOV DRm/XDm, @Rn (m: 0, 2, 4, 6, 8, 10, 12, 14; n: 0 to 15)
  6293.  
  6294. These instructions enable two single-precision (2 × 32-bit) data items to be transferred; that is,
  6295. the transfer performance of these instructions is doubled.
  6296.  
  6297. • FSCHG
  6298. This instruction changes the value of the SZ bit in FPSCR, enabling fast switching between
  6299. use and non-use of pair single-precision data transfer.
  6300.  
  6301. Rev. 2.0, 02/99, page 132 of 830
  6302.  
  6303. ----------------------- Page 147-----------------------
  6304.  
  6305. Section 7 Instruction Set
  6306.  
  6307. 7.1 Execution Environment
  6308.  
  6309. PC: At the start of instruction execution, PC indicates the address of the instruction itself.
  6310.  
  6311. Data sizes and data types: The SH7750’s instruction set is implemented with 16-bit fixed-length
  6312. instructions. The SH7750 can use byte (8-bit), word (16-bit), longword (32-bit), and quadword
  6313. (64-bit) data sizes for memory access. Single-precision floating-point data (32 bits) can be
  6314. moved to and from memory using longword or quadword size. Double-precision floating-point
  6315. data (64 bits) can be moved to and from memory using longword size. When a double-precision
  6316. floating-point operation is specified (FPSCR.PR = 1), the result of an operation using quadword
  6317. access will be undefined. When the SH7750 moves byte-size or word-size data from memory to
  6318. a register, the data is sign-extended.
  6319.  
  6320. Load-Store Architecture: The SH7750 features a load-store architecture in which operations
  6321. are basically executed using registers. Except for bit-manipulation operations such as logical
  6322. AND that are executed directly in memory, operands in an operation that requires memory
  6323. access are loaded into registers and the operation is executed between the registers.
  6324.  
  6325. Delayed Branches: Except for the two branch instructions BF and BT, the SH7750’s branch
  6326. instructions and RTE are delayed branches. In a delayed branch, the instruction following the
  6327. branch is executed before the branch destination instruction. This execution slot following a
  6328. delayed branch is called a delay slot. For example, the BRA execution sequence is as follows:
  6329.  
  6330. Static Sequence Dynamic Sequence
  6331.  
  6332. BRA TARGET BRA TARGET
  6333.  
  6334. ADD R1, R0 ADD R1, R0 ADD in delay slot is executed before
  6335. next_2 target_instr branching to TARGET
  6336.  
  6337. Rev. 2.0, 02/99, page 133 of 830
  6338.  
  6339. ----------------------- Page 148-----------------------
  6340.  
  6341. Delay Slot: An illegal instruction exception may occur when a specific instruction is executed in
  6342. a delay slot. See section 5, Exceptions. The instruction following BF/S or BT/S for which the
  6343. branch is not taken is also a delay slot instruction.
  6344.  
  6345. T Bit: The T bit in the status register (SR) is used to show the result of a compare operation, and
  6346. is referenced by a conditional branch instruction. An example of the use of a conditional branch
  6347. instruction is shown below.
  6348.  
  6349. ADD #1, R0 ; T bit is not changed by ADD operation
  6350. CMP/EQ R1, R0 ; If R0 = R1, T bit is set to 1
  6351. BT TARGET ; Branches to TARGET if T bit = 1 (R0 = R1)
  6352.  
  6353. In an RTE delay slot, status register (SR) bits are referenced as follows. In instruction access, the
  6354. MD bit is used before modification, and in data access, the MD bit is accessed after
  6355. modification. The other bits—S, T, M, Q, FD, BL, and RB—after modification are used for
  6356. delay slot instruction execution. The STC and STC.L SR instructions access all SR bits after
  6357. modification.
  6358.  
  6359. Constant Values: An 8-bit constant value can be specified by the instruction code and an
  6360. immediate value. 16-bit and 32-bit constant values can be defined as literal constant values in
  6361. memory, and can be referenced by a PC-relative load instruction.
  6362.  
  6363. MOV.W @(disp, PC), Rn
  6364. MOV.L @(disp, PC), Rn
  6365.  
  6366. There are no PC-relative load instructions for floating-point operations. However, it is possible
  6367. to set 0.0 or 1.0 by using the FLDI0 or FLDI1 instruction on a single-precision floating-point
  6368. register.
  6369.  
  6370. Rev. 2.0, 02/99, page 134 of 830
  6371.  
  6372. ----------------------- Page 149-----------------------
  6373.  
  6374. 7.2 Addressing Modes
  6375.  
  6376. Addressing modes and effective address calculation methods are shown in table 7.1. When a
  6377. location in virtual memory space is accessed (MMUCR.AT = 1), the effective address is
  6378. translated into a physical memory address. If multiple virtual memory space systems are selected
  6379. (MMUCR.SV = 0), the least significant bit of PTEH is also referenced as the access ASID. See
  6380. section 3, Memory Management Unit (MMU).
  6381.  
  6382. Table 7.1 Addressing Modes and Effective Addresses
  6383.  
  6384. Addressing Instruction Calculation
  6385. Mode Format Effective Address Calculation Method Formula
  6386.  
  6387. Register Rn Effective address is register Rn. —
  6388. direct (Operand is register Rn contents.)
  6389.  
  6390. Register @Rn Effective address is register Rn contents. Rn → EA
  6391. indirect (EA: effective
  6392. Rn Rn
  6393. address)
  6394.  
  6395. Register @Rn+ Effective address is register Rn contents. Rn → EA
  6396. indirect A constant is added to Rn after instruction After
  6397. with post- execution: 1 for a byte operand, 2 for a word instruction
  6398. increment operand, 4 for a longword operand, 8 for a execution
  6399. quadword operand. Byte:
  6400.  
  6401. Rn + 1 → Rn
  6402. Rn Rn
  6403. Word:
  6404. Rn + 1/2/4/8
  6405. + Rn + 2 → Rn
  6406.  
  6407. Longword:
  6408. 1/2/4/8 Rn + 4 → Rn
  6409.  
  6410. Quadword:
  6411. Rn + 8 → Rn
  6412.  
  6413. Register @–Rn Effective address is register Rn contents, Byte:
  6414. indirect decremented by a constant beforehand: Rn – 1 → Rn
  6415. with pre- 1 for a byte operand, 2 for a word operand, Word:
  6416. decrement 4 for a longword operand, 8 for a quadword Rn – 2 → Rn
  6417. operand.
  6418. Longword:
  6419. Rn Rn – 4 → Rn
  6420.  
  6421. Rn – 1/2/4/8 Quadword:
  6422. – Rn – 1/2/4/8
  6423. Rn – 8 → Rn
  6424.  
  6425. 1/2/4/8 Rn → EA
  6426. (Instruction
  6427. executed
  6428. with Rn after
  6429. calculation)
  6430.  
  6431. Rev. 2.0, 02/99, page 135 of 830
  6432.  
  6433. ----------------------- Page 150-----------------------
  6434.  
  6435. Table 7.1 Addressing Modes and Effective Addresses (cont)
  6436.  
  6437. Addressing Instruction Calculation
  6438. Mode Format Effective Address Calculation Method Formula
  6439.  
  6440. Register @(disp:4, Rn) Effective address is register Rn contents with Byte: Rn +
  6441. indirect with 4-bit displacement disp added. After disp is disp → EA
  6442. displacement zero-extended, it is multiplied by 1 (byte), 2 (word), Word: Rn +
  6443. or 4 (longword), according to the operand size. disp × 2 → EA
  6444.  
  6445. Rn Longword:
  6446. Rn + disp × 4
  6447. disp + Rn + disp × 1/2/4 → EA
  6448. (zero-extended)
  6449.  
  6450. ×
  6451.  
  6452. 1/2/4
  6453.  
  6454. Indexed @(R0, Rn) Effective address is sum of register Rn and R0 Rn + R0 → EA
  6455. register contents.
  6456. indirect
  6457. Rn
  6458.  
  6459. + Rn + R0
  6460.  
  6461. R0
  6462.  
  6463. GBR indirect @(disp:8, Effective address is register GBR contents with Byte: GBR +
  6464. with GBR) 8-bit displacement disp added. After disp is disp → EA
  6465. displacement zero-extended, it is multiplied by 1 (byte), 2 (word), Word: GBR +
  6466. or 4 (longword), according to the operand size. disp × 2 → EA
  6467.  
  6468. GBR Longword:
  6469. GBR + disp ×
  6470. GBR
  6471. disp + 4 → EA
  6472. (zero-extended) + disp × 1/2/4
  6473.  
  6474. ×
  6475.  
  6476. 1/2/4
  6477.  
  6478. Indexed @(R0, GBR) Effective address is sum of register GBR and R0 GBR + R0 →
  6479. GBR indirect contents. EA
  6480.  
  6481. GBR
  6482.  
  6483. + GBR + R0
  6484.  
  6485. R0
  6486.  
  6487. Rev. 2.0, 02/99, page 136 of 830
  6488.  
  6489. ----------------------- Page 151-----------------------
  6490.  
  6491. Table 7.1 Addressing Modes and Effective Addresses (cont)
  6492.  
  6493. Addressing Instruction Calculation
  6494. Mode Format Effective Address Calculation Method Formula
  6495.  
  6496. PC-relative @(disp:8, Effective address is PC+4 with 8-bit displacement Word: PC + 4
  6497. with PC) disp added. After disp is zero-extended, it is + disp × 2 →
  6498. displacement multiplied by 2 (word), or 4 (longword), according EA
  6499. to the operand size. With a longword operand, Longword:
  6500. the lower 2 bits of PC are masked.
  6501. PC &
  6502. H'FFFFFFFC
  6503. PC
  6504. + 4 + disp × 4
  6505. & * → EA
  6506.  
  6507. H'FFFFFFFC +
  6508.  
  6509. PC + 4 + disp
  6510. 4 × 2
  6511. + or PC &
  6512. H'FFFFFFFC
  6513. disp
  6514. + 4 + disp × 4
  6515. (zero-extended)
  6516. ×
  6517.  
  6518. 2/4
  6519. * With longword operand
  6520.  
  6521. PC-relative disp:8 Effective address is PC+4 with 8-bit displacement PC + 4 + disp
  6522. disp added after being sign-extended and × 2 → Branch-
  6523. multiplied by 2. Target
  6524.  
  6525. PC
  6526.  
  6527. +
  6528.  
  6529. 4
  6530. + PC + 4 + disp × 2
  6531. disp
  6532. (sign-extended)
  6533.  
  6534. ×
  6535.  
  6536. 2
  6537.  
  6538. Rev. 2.0, 02/99, page 137 of 830
  6539.  
  6540. ----------------------- Page 152-----------------------
  6541.  
  6542. Table 7.1 Addressing Modes and Effective Addresses (cont)
  6543.  
  6544. Addressing Instruction Calculation
  6545. Mode Format Effective Address Calculation Method Formula
  6546.  
  6547. PC-relative disp:12 Effective address is PC+4 with 12-bit displacement PC + 4 + disp
  6548. disp added after being sign-extended and × 2 → Branch-
  6549. multiplied by 2. Target
  6550.  
  6551. PC
  6552.  
  6553. +
  6554.  
  6555. 4
  6556. + PC + 4 + disp × 2
  6557. disp
  6558. (sign-extended)
  6559.  
  6560. ×
  6561.  
  6562. 2
  6563.  
  6564. Rn Effective address is sum of PC+4 and Rn. PC + 4 + Rn
  6565. → Branch-
  6566. PC
  6567. Target
  6568.  
  6569. +
  6570.  
  6571. 4 + PC + 4 + Rn
  6572.  
  6573. Rn
  6574.  
  6575. Immediate #imm:8 8-bit immediate data imm of TST, AND, OR, or —
  6576. XOR instruction is zero-extended.
  6577.  
  6578. #imm:8 8-bit immediate data imm of MOV, ADD, or —
  6579. CMP/EQ instruction is sign-extended.
  6580.  
  6581. #imm:8 8-bit immediate data imm of TRAPA instruction is —
  6582. zero-extended and multiplied by 4.
  6583.  
  6584. Note: For the addressing modes below that use a displacement (disp), the assembler
  6585. descriptions in this manual show the value before scaling (× 1, ×2, or ×4) is performed
  6586. according to the operand size. This is done to clarify the operation of the chip. Refer to the
  6587. relevant assembler notation rules for the actual assembler descriptions.
  6588. @ (disp:4, Rn) ; Register indirect with displacement
  6589. @ (disp:8, GBR) ; GBR indirect with displacement
  6590. @ (disp:8, PC) ; PC-relative with displacement
  6591. disp:8, disp:12 ; PC-relative
  6592.  
  6593. Rev. 2.0, 02/99, page 138 of 830
  6594.  
  6595. ----------------------- Page 153-----------------------
  6596.  
  6597. 7.3 Instruction Set
  6598.  
  6599. Table 7.2 shows the notation used in the following SH instruction list.
  6600.  
  6601. Table 7.2 Notation Used in Instruction List
  6602.  
  6603. Item Format Description
  6604.  
  6605. Instruction OP.Sz SRC, DEST OP: Operation code
  6606. mnemonic Sz: Size
  6607. SRC: Source
  6608. DEST: Source and/or destination operand
  6609.  
  6610. Summary of →, ← Transfer direction
  6611. operation (xx) Memory operand
  6612. M/Q/T SR flag bits
  6613. & Logical AND of individual bits
  6614. | Logical OR of individual bits
  6615. ∧ Logical exclusive-OR of individual bits
  6616. ~ Logical NOT of individual bits
  6617. <<n, >>n n-bit shift
  6618.  
  6619. Instruction code MSB ↔ LSB mmmm: Register number (Rm, FRm)
  6620. nnnn: Register number (Rn, FRn)
  6621. 0000: R0, FR0
  6622. 0001: R1, FR1
  6623. :
  6624. 1111: R15, FR15
  6625. mmm: Register number (DRm, XDm, Rm_BANK)
  6626. nnn: Register number (DRm, XDm, Rn_BANK)
  6627. 000: DR0, XD0, R0_BANK
  6628. 001: DR2, XD2, R1_BANK
  6629. :
  6630. 111: DR14, XD14, R7_BANK
  6631. mm: Register number (FVm)
  6632. nn: Register number (FVn)
  6633. 00: FV0
  6634. 01: FV4
  6635. 10: FV8
  6636. 11: FV12
  6637. iiii: Immediate data
  6638. dddd: Displacement
  6639.  
  6640. Privileged mode “Privileged” means the instruction can only be executed
  6641. in privileged mode.
  6642.  
  6643. T bit Value of T bit after —: No change
  6644. instruction execution
  6645.  
  6646. Note: Scaling (× 1, ×2, ×4, or ×8) is executed according to the size of the instruction operand(s).
  6647.  
  6648. Rev. 2.0, 02/99, page 139 of 830
  6649.  
  6650. ----------------------- Page 154-----------------------
  6651.  
  6652. Table 7.3 Fixed-Point Transfer Instructions
  6653.  
  6654. Instruction Operation Instruction Code Privileged T Bit
  6655.  
  6656. MOV #imm,Rn imm → sign extension → Rn 1110nnnniiiiiiii — —
  6657.  
  6658. MOV.W @(disp,PC),Rn (disp × 2 + PC + 4) → sign 1001nnnndddddddd — —
  6659. extension → Rn
  6660.  
  6661. MOV.L @(disp,PC),Rn (disp × 4 + PC & H'FFFFFFFC 1101nnnndddddddd — —
  6662. + 4) → Rn
  6663.  
  6664. MOV Rm,Rn Rm → Rn 0110nnnnmmmm0011 — —
  6665.  
  6666. MOV.B Rm,@Rn Rm → (Rn) 0010nnnnmmmm0000 — —
  6667.  
  6668. MOV.W Rm,@Rn Rm → (Rn) 0010nnnnmmmm0001 — —
  6669.  
  6670. MOV.L Rm,@Rn Rm → (Rn) 0010nnnnmmmm0010 — —
  6671.  
  6672. MOV.B @Rm,Rn (Rm) → sign extension → Rn 0110nnnnmmmm0000 — —
  6673.  
  6674. MOV.W @Rm,Rn (Rm) → sign extension → Rn 0110nnnnmmmm0001 — —
  6675.  
  6676. MOV.L @Rm,Rn (Rm) → Rn 0110nnnnmmmm0010 — —
  6677.  
  6678. MOV.B Rm,@-Rn Rn-1 → Rn, Rm → (Rn) 0010nnnnmmmm0100 — —
  6679.  
  6680. MOV.W Rm,@-Rn Rn-2 → Rn, Rm → (Rn) 0010nnnnmmmm0101 — —
  6681.  
  6682. MOV.L Rm,@-Rn Rn-4 → Rn, Rm → (Rn) 0010nnnnmmmm0110 — —
  6683.  
  6684. MOV.B @Rm+,Rn (Rm)→ sign extension → Rn, 0110nnnnmmmm0100 — —
  6685. Rm + 1 → Rm
  6686.  
  6687. MOV.W @Rm+,Rn (Rm) → sign extension → Rn, 0110nnnnmmmm0101 — —
  6688. Rm + 2 → Rm
  6689.  
  6690. MOV.L @Rm+,Rn (Rm) → Rn, Rm + 4 → Rm 0110nnnnmmmm0110 — —
  6691.  
  6692. MOV.B R0,@(disp,Rn) R0 → (disp + Rn) 10000000nnnndddd — —
  6693.  
  6694. MOV.W R0,@(disp,Rn) R0 → (disp × 2 + Rn) 10000001nnnndddd — —
  6695.  
  6696. MOV.L Rm,@(disp,Rn) Rm → (disp × 4 + Rn) 0001nnnnmmmmdddd — —
  6697.  
  6698. MOV.B @(disp,Rm),R0 (disp + Rm) → sign extension 10000100mmmmdddd — —
  6699. → R0
  6700.  
  6701. MOV.W @(disp,Rm),R0 (disp × 2 + Rm) → sign 10000101mmmmdddd — —
  6702. extension → R0
  6703.  
  6704. MOV.L @(disp,Rm),Rn (disp × 4 + Rm) → Rn 0101nnnnmmmmdddd — —
  6705.  
  6706. MOV.B Rm,@(R0,Rn) Rm → (R0 + Rn) 0000nnnnmmmm0100 — —
  6707.  
  6708. MOV.W Rm,@(R0,Rn) Rm → (R0 + Rn) 0000nnnnmmmm0101 — —
  6709.  
  6710. MOV.L Rm,@(R0,Rn) Rm → (R0 + Rn) 0000nnnnmmmm0110 — —
  6711.  
  6712. MOV.B @(R0,Rm),Rn (R0 + Rm) → sign extension 0000nnnnmmmm1100 — —
  6713. → Rn
  6714.  
  6715. MOV.W @(R0,Rm),Rn (R0 + Rm) → sign extension 0000nnnnmmmm1101 — —
  6716. → Rn
  6717.  
  6718. MOV.L @(R0,Rm),Rn (R0 + Rm) → Rn 0000nnnnmmmm1110 — —
  6719.  
  6720. Rev. 2.0, 02/99, page 140 of 830
  6721.  
  6722. ----------------------- Page 155-----------------------
  6723.  
  6724. Table 7.3 Fixed-Point Transfer Instructions (cont)
  6725.  
  6726. Instruction Operation Instruction Code Privileged T Bit
  6727.  
  6728. MOV.B R0,@(disp,GBR) R0 → (disp + GBR) 11000000dddddddd — —
  6729.  
  6730. MOV.W R0,@(disp,GBR) R0 → (disp × 2 + GBR) 11000001dddddddd — —
  6731.  
  6732. MOV.L R0,@(disp,GBR) R0 → (disp × 4 + GBR) 11000010dddddddd — —
  6733.  
  6734. MOV.B @(disp,GBR),R0 (disp + GBR) → 11000100dddddddd — —
  6735. sign extension → R0
  6736.  
  6737. MOV.W @(disp,GBR),R0 (disp × 2 + GBR) → 11000101dddddddd — —
  6738. sign extension → R0
  6739.  
  6740. MOV.L @(disp,GBR),R0 (disp × 4 + GBR) → R0 11000110dddddddd — —
  6741.  
  6742. MOVA @(disp,PC),R0 disp × 4 + PC & H'FFFFFFFC 11000111dddddddd — —
  6743. + 4 → R0
  6744.  
  6745. MOVT Rn T → Rn 0000nnnn00101001 — —
  6746.  
  6747. SWAP.B Rm,Rn Rm → swap lower 2 bytes 0110nnnnmmmm1000 — —
  6748. → Rn
  6749.  
  6750. SWAP.W Rm,Rn Rm → swap upper/lower 0110nnnnmmmm1001 — —
  6751. words → Rn
  6752.  
  6753. XTRCT Rm,Rn Rm:Rn middle 32 bits → Rn 0010nnnnmmmm1101 — —
  6754.  
  6755. Rev. 2.0, 02/99, page 141 of 830
  6756.  
  6757. ----------------------- Page 156-----------------------
  6758.  
  6759. Table 7.4 Arithmetic Operation Instructions
  6760.  
  6761. Instruction Operation Instruction Code Privileged T Bit
  6762.  
  6763. ADD Rm,Rn Rn + Rm → Rn 0011nnnnmmmm1100 — —
  6764.  
  6765. ADD #imm,Rn Rn + imm → Rn 0111nnnniiiiiiii — —
  6766.  
  6767. ADDC Rm,Rn Rn + Rm + T → Rn, carry → T 0011nnnnmmmm1110 — Carry
  6768.  
  6769. ADDV Rm,Rn Rn + Rm → Rn, overflow → T 0011nnnnmmmm1111 — Overflow
  6770.  
  6771. CMP/EQ #imm,R0 When R0 = imm, 1 → T 10001000iiiiiiii — Comparison
  6772. Otherwise, 0 → T result
  6773.  
  6774. CMP/EQ Rm,Rn When Rn = Rm, 1 → T 0011nnnnmmmm0000 — Comparison
  6775. Otherwise, 0 → T result
  6776.  
  6777. CMP/HS Rm,Rn When Rn ≥ Rm (unsigned), 0011nnnnmmmm0010 — Comparison
  6778. 1 → T result
  6779. Otherwise, 0 → T
  6780.  
  6781. CMP/GE Rm,Rn When Rn ≥ Rm (signed), 1 → T 0011nnnnmmmm0011 — Comparison
  6782. Otherwise, 0 → T result
  6783.  
  6784. CMP/HI Rm,Rn When Rn > Rm (unsigned), 0011nnnnmmmm0110 — Comparison
  6785. 1 → T result
  6786. Otherwise, 0 → T
  6787.  
  6788. CMP/GT Rm,Rn When Rn > Rm (signed), 1 → T 0011nnnnmmmm0111 — Comparison
  6789. Otherwise, 0 → T result
  6790.  
  6791. CMP/PZ Rn When Rn ≥ 0, 1 → T 0100nnnn00010001 — Comparison
  6792. Otherwise, 0 → T result
  6793.  
  6794. CMP/PL Rn When Rn > 0, 1 → T 0100nnnn00010101 — Comparison
  6795. Otherwise, 0 → T result
  6796.  
  6797. CMP/STR Rm,Rn When any bytes are equal, 0010nnnnmmmm1100 — Comparison
  6798. 1 → T result
  6799. Otherwise, 0 → T
  6800.  
  6801. DIV1 Rm,Rn 1-step division (Rn ÷ Rm) 0011nnnnmmmm0100 — Calculation
  6802. result
  6803.  
  6804. DIV0S Rm,Rn MSB of Rn → Q, 0010nnnnmmmm0111 — Calculation
  6805. MSB of Rm → M, M^Q → T result
  6806.  
  6807. DIV0U 0 → M/Q/T 0000000000011001 — 0
  6808.  
  6809. DMULS.L Rm,Rn Signed, Rn × Rm → MAC, 0011nnnnmmmm1101 — —
  6810. 32 × 32 → 64 bits
  6811.  
  6812. DMULU.L Rm,Rn Unsigned, Rn × Rm → MAC, 0011nnnnmmmm0101 — —
  6813. 32 × 32 → 64 bits
  6814.  
  6815. DT Rn Rn – 1 → Rn; when Rn = 0, 0100nnnn00010000 — Comparison
  6816. 1 → T result
  6817. When Rn ≠ 0, 0 → T
  6818.  
  6819. EXTS.B Rm,Rn Rm sign-extended from 0110nnnnmmmm1110 — —
  6820. byte → Rn
  6821.  
  6822. Rev. 2.0, 02/99, page 142 of 830
  6823.  
  6824. ----------------------- Page 157-----------------------
  6825.  
  6826. Table 7.4 Arithmetic Operation Instructions (cont)
  6827.  
  6828. Instruction Operation Instruction Code Privileged T Bit
  6829.  
  6830. EXTS.W Rm,Rn Rm sign-extended from 0110nnnnmmmm1111 — —
  6831. word → Rn
  6832.  
  6833. EXTU.B Rm,Rn Rm zero-extended from 0110nnnnmmmm1100 — —
  6834. byte → Rn
  6835.  
  6836. EXTU.W Rm,Rn Rm zero-extended from 0110nnnnmmmm1101 — —
  6837. word → Rn
  6838.  
  6839. MAC.L @Rm+,@Rn+ Signed, (Rn) × (Rm) + MAC → 0000nnnnmmmm1111 — —
  6840. MAC
  6841. Rn + 4 → Rn, Rm + 4 → Rm
  6842. 32 × 32 + 64 → 64 bits
  6843.  
  6844. MAC.W @Rm+,@Rn+ Signed, (Rn) × (Rm) + MAC → 0100nnnnmmmm1111 — —
  6845. MAC
  6846. Rn + 2 → Rn, Rm + 2 → Rm
  6847. 16 × 16 + 64 → 64 bits
  6848.  
  6849. MUL.L Rm,Rn Rn × Rm → MACL 0000nnnnmmmm0111 — —
  6850. 32 × 32 → 32 bits
  6851.  
  6852. MULS.W Rm,Rn Signed, Rn × Rm → MACL 0010nnnnmmmm1111 — —
  6853. 16 × 16 → 32 bits
  6854.  
  6855. MULU.W Rm,Rn Unsigned, Rn × Rm → MACL 0010nnnnmmmm1110 — —
  6856. 16 × 16 → 32 bits
  6857.  
  6858. NEG Rm,Rn 0 – Rm → Rn 0110nnnnmmmm1011 — —
  6859.  
  6860. NEGC Rm,Rn 0 – Rm – T → Rn, borrow → T 0110nnnnmmmm1010 — Borrow
  6861.  
  6862. SUB Rm,Rn Rn – Rm → Rn 0011nnnnmmmm1000 — —
  6863.  
  6864. SUBC Rm,Rn Rn – Rm – T → Rn, borrow → T 0011nnnnmmmm1010 — Borrow
  6865.  
  6866. SUBV Rm,Rn Rn – Rm → Rn, underflow → T 0011nnnnmmmm1011 — Underflow
  6867.  
  6868. Rev. 2.0, 02/99, page 143 of 830
  6869.  
  6870. ----------------------- Page 158-----------------------
  6871.  
  6872. Table 7.5 Logic Operation Instructions
  6873.  
  6874. Instruction Operation Instruction Code Privileged T Bit
  6875.  
  6876. AND Rm,Rn Rn & Rm → Rn 0010nnnnmmmm1001 — —
  6877.  
  6878. AND #imm,R0 R0 & imm → R0 11001001iiiiiiii — —
  6879.  
  6880. AND.B #imm,@(R0,GBR) (R0 + GBR) & imm → (R0 + 11001101iiiiiiii — —
  6881. GBR)
  6882.  
  6883. NOT Rm,Rn ~Rm → Rn 0110nnnnmmmm0111 — —
  6884.  
  6885. OR Rm,Rn Rn | Rm → Rn 0010nnnnmmmm1011 — —
  6886.  
  6887. OR #imm,R0 R0 | imm → R0 11001011iiiiiiii — —
  6888.  
  6889. OR.B #imm,@(R0,GBR) (R0 + GBR) | imm → (R0 + GBR) 11001111iiiiiiii —
  6890.  
  6891. TAS.B @Rn When (Rn) = 0, 1 → T 0100nnnn00011011 — Test result
  6892. Otherwise, 0 → T
  6893. In both cases, 1 → MSB of (Rn)
  6894.  
  6895. TST Rm,Rn Rn & Rm; when result = 0, 0010nnnnmmmm1000 — Test result
  6896. 1 → T
  6897. Otherwise, 0 → T
  6898.  
  6899. TST #imm,R0 R0 & imm; when result = 0, 11001000iiiiiiii — Test result
  6900. 1 → T
  6901. Otherwise, 0 → T
  6902.  
  6903. TST.B #imm,@(R0,GBR) (R0 + GBR) & imm; when result = 11001100iiiiiiii — Test result
  6904. 0, 1 → T
  6905. Otherwise, 0 → T
  6906.  
  6907. XOR Rm,Rn Rn ∧ Rm → Rn 0010nnnnmmmm1010 — —
  6908.  
  6909. XOR #imm,R0 R0 ∧ imm → R0 11001010iiiiiiii — —
  6910.  
  6911. XOR.B #imm,@(R0,GBR) (R0 + GBR) ∧ imm → (R0 + 11001110iiiiiiii — —
  6912. GBR)
  6913.  
  6914. Rev. 2.0, 02/99, page 144 of 830
  6915.  
  6916. ----------------------- Page 159-----------------------
  6917.  
  6918. Table 7.6 Shift Instructions
  6919.  
  6920. Instruction Operation Instruction Code Privileged T Bit
  6921.  
  6922. ROTL Rn T ← Rn ← MSB 0100nnnn00000100 — MSB
  6923.  
  6924. ROTR Rn LSB → Rn → T 0100nnnn00000101 — LSB
  6925.  
  6926. ROTCL Rn T ← Rn ← T 0100nnnn00100100 — MSB
  6927.  
  6928. ROTCR Rn T → Rn → T 0100nnnn00100101 — LSB
  6929.  
  6930. SHAD Rm,Rn When Rn ≥ 0, Rn << Rm → Rn 0100nnnnmmmm1100 — —
  6931. When Rn < 0, Rn >> Rm → [MSB
  6932. → Rn]
  6933.  
  6934. SHAL Rn T ← Rn ← 0 0100nnnn00100000 — MSB
  6935.  
  6936. SHAR Rn MSB → Rn → T 0100nnnn00100001 — LSB
  6937.  
  6938. SHLD Rm,Rn When Rn ≥ 0, Rn << Rm → Rn 0100nnnnmmmm1101 — —
  6939. When Rn < 0, Rn >> Rm →
  6940. [0 → Rn]
  6941.  
  6942. SHLL Rn T ← Rn ← 0 0100nnnn00000000 — MSB
  6943.  
  6944. SHLR Rn 0 → Rn → T 0100nnnn00000001 — LSB
  6945.  
  6946. SHLL2 Rn Rn << 2 → Rn 0100nnnn00001000 — —
  6947.  
  6948. SHLR2 Rn Rn >> 2 → Rn 0100nnnn00001001 — —
  6949.  
  6950. SHLL8 Rn Rn << 8 → Rn 0100nnnn00011000 — —
  6951.  
  6952. SHLR8 Rn Rn >> 8 → Rn 0100nnnn00011001 — —
  6953.  
  6954. SHLL16 Rn Rn << 16 → Rn 0100nnnn00101000 — —
  6955.  
  6956. SHLR16 Rn Rn >> 16 → Rn 0100nnnn00101001 — —
  6957.  
  6958. Rev. 2.0, 02/99, page 145 of 830
  6959.  
  6960. ----------------------- Page 160-----------------------
  6961.  
  6962. Table 7.7 Branch Instructions
  6963.  
  6964. Instruction Operation Instruction Code Privileged T Bit
  6965.  
  6966. BF label When T = 0, disp × 2 + PC + 10001011dddddddd — —
  6967. 4 → PC
  6968. When T = 1, nop
  6969.  
  6970. BF/S label Delayed branch; when T = 0, disp 10001111dddddddd — —
  6971. × 2 + PC + 4 → PC
  6972. When T = 1, nop
  6973.  
  6974. BT label When T = 1, disp × 2 + PC + 10001001dddddddd — —
  6975. 4 → PC
  6976. When T = 0, nop
  6977.  
  6978. BT/S label Delayed branch; when T = 1, disp 10001101dddddddd — —
  6979. × 2 + PC + 4 → PC
  6980. When T = 0, nop
  6981.  
  6982. BRA label Delayed branch, disp × 2 + 1010dddddddddddd — —
  6983. PC + 4 → PC
  6984.  
  6985. BRAF Rn Rn + PC + 4 → PC 0000nnnn00100011 — —
  6986.  
  6987. BSR label Delayed branch, PC + 4 → PR, 1011dddddddddddd — —
  6988. disp × 2 + PC + 4 → PC
  6989.  
  6990. BSRF Rn Delayed branch, PC + 4 → PR, 0000nnnn00000011 — —
  6991. Rn + PC + 4 → PC
  6992.  
  6993. JMP @Rn Delayed branch, Rn → PC 0100nnnn00101011 — —
  6994.  
  6995. JSR @Rn Delayed branch, PC + 4 → PR, 0100nnnn00001011 — —
  6996. Rn → PC
  6997.  
  6998. RTS Delayed branch, PR → PC 0000000000001011 — —
  6999.  
  7000. Rev. 2.0, 02/99, page 146 of 830
  7001.  
  7002. ----------------------- Page 161-----------------------
  7003.  
  7004. Table 7.8 System Control Instructions
  7005.  
  7006. Instruction Operation Instruction Code Privileged T Bit
  7007.  
  7008. CLRMAC 0 → MACH, MACL 0000000000101000 — —
  7009.  
  7010. CLRS 0 → S 0000000001001000 — —
  7011.  
  7012. CLRT 0 → T 0000000000001000 — 0
  7013.  
  7014. LDC Rm,SR Rm → SR 0100mmmm00001110 Privileged LSB
  7015.  
  7016. LDC Rm,GBR Rm → GBR 0100mmmm00011110 — —
  7017.  
  7018. LDC Rm,VBR Rm → VBR 0100mmmm00101110 Privileged —
  7019.  
  7020. LDC Rm,SSR Rm → SSR 0100mmmm00111110 Privileged —
  7021.  
  7022. LDC Rm,SPC Rm → SPC 0100mmmm01001110 Privileged —
  7023.  
  7024. LDC Rm,DBR Rm → DBR 0100mmmm11111010 Privileged —
  7025.  
  7026. LDC Rm,Rn_BANK Rm → Rn_BANK (n = 0 to 7) 0100mmmm1nnn1110 Privileged —
  7027.  
  7028. LDC.L @Rm+,SR (Rm) → SR, Rm + 4 → Rm 0100mmmm00000111 Privileged LSB
  7029.  
  7030. LDC.L @Rm+,GBR (Rm) → GBR, Rm + 4 → Rm 0100mmmm00010111 — —
  7031.  
  7032. LDC.L @Rm+,VBR (Rm) → VBR, Rm + 4 → Rm 0100mmmm00100111 Privileged —
  7033.  
  7034. LDC.L @Rm+,SSR (Rm) → SSR, Rm + 4 → Rm 0100mmmm00110111 Privileged —
  7035.  
  7036. LDC.L @Rm+,SPC (Rm) → SPC, Rm + 4 → Rm 0100mmmm01000111 Privileged —
  7037.  
  7038. LDC.L @Rm+,DBR (Rm) → DBR, Rm + 4 → Rm 0100mmmm11110110 Privileged —
  7039.  
  7040. LDC.L @Rm+,Rn_BANK (Rm) → Rn_BANK, 0100mmmm1nnn0111 Privileged —
  7041. Rm + 4 → Rm
  7042.  
  7043. LDS Rm,MACH Rm → MACH 0100mmmm00001010 — —
  7044.  
  7045. LDS Rm,MACL Rm → MACL 0100mmmm00011010 — —
  7046.  
  7047. LDS Rm,PR Rm → PR 0100mmmm00101010 — —
  7048.  
  7049. LDS.L @Rm+,MACH (Rm) → MACH, Rm + 4 → Rm 0100mmmm00000110 — —
  7050.  
  7051. LDS.L @Rm+,MACL (Rm) → MACL, Rm + 4 → Rm 0100mmmm00010110 — —
  7052.  
  7053. LDS.L @Rm+,PR (Rm) → PR, Rm + 4 → Rm 0100mmmm00100110 — —
  7054.  
  7055. LDTLB PTEH/PTEL → TLB 0000000000111000 Privileged —
  7056.  
  7057. MOVCA.L R0,@Rn R0 → (Rn) (without fetching 0000nnnn11000011 — —
  7058. cache block)
  7059.  
  7060. NOP No operation 0000000000001001 — —
  7061.  
  7062. OCBI @Rn Invalidates operand cache block 0000nnnn10010011 — —
  7063.  
  7064. OCBP @Rn Writes back and invalidates 0000nnnn10100011 — —
  7065. operand cache block
  7066.  
  7067. OCBWB @Rn Writes back operand cache block 0000nnnn10110011 — —
  7068.  
  7069. PREF @Rn (Rn) → operand cache 0000nnnn10000011 — —
  7070.  
  7071. RTE Delayed branch, SSR/SPC → 0000000000101011 Privileged —
  7072. SR/PC
  7073.  
  7074. Rev. 2.0, 02/99, page 147 of 830
  7075.  
  7076. ----------------------- Page 162-----------------------
  7077.  
  7078. Table 7.8 System Control Instructions (cont)
  7079.  
  7080. Instruction Operation Instruction Code Privileged T Bit
  7081.  
  7082. SETS 1 → S 0000000001011000 — —
  7083.  
  7084. SETT 1 → T 0000000000011000 — 1
  7085.  
  7086. SLEEP Sleep or standby 0000000000011011 Privileged —
  7087.  
  7088. STC SR,Rn SR → Rn 0000nnnn00000010 Privileged —
  7089.  
  7090. STC GBR,Rn GBR → Rn 0000nnnn00010010 — —
  7091.  
  7092. STC VBR,Rn VBR → Rn 0000nnnn00100010 Privileged —
  7093.  
  7094. STC SSR,Rn SSR → Rn 0000nnnn00110010 Privileged —
  7095.  
  7096. STC SPC,Rn SPC → Rn 0000nnnn01000010 Privileged —
  7097.  
  7098. STC SGR,Rn SGR → Rn 0000nnnn00111010 Privileged —
  7099.  
  7100. STC DBR,Rn DBR → Rn 0000nnnn11111010 Privileged —
  7101.  
  7102. STC Rm_BANK,Rn Rm_BANK → Rn (m = 0 to 7) 0000nnnn1mmm0010 Privileged —
  7103.  
  7104. STC.L SR,@-Rn Rn – 4 → Rn, SR → (Rn) 0100nnnn00000011 Privileged —
  7105.  
  7106. STC.L GBR,@-Rn Rn – 4 → Rn, GBR → (Rn) 0100nnnn00010011 — —
  7107.  
  7108. STC.L VBR,@-Rn Rn – 4 → Rn, VBR → (Rn) 0100nnnn00100011 Privileged —
  7109.  
  7110. STC.L SSR,@-Rn Rn – 4 → Rn, SSR → (Rn) 0100nnnn00110011 Privileged —
  7111.  
  7112. STC.L SPC,@-Rn Rn – 4 → Rn, SPC → (Rn) 0100nnnn01000011 Privileged —
  7113.  
  7114. STC.L SGR,@-Rn Rn – 4 → Rn, SGR → (Rn) 0100nnnn00110010 Privileged —
  7115.  
  7116. STC.L DBR,@-Rn Rn – 4 → Rn, DBR → (Rn) 0100nnnn11110010 Privileged —
  7117.  
  7118. STC.L Rm_BANK,@-Rn Rn – 4 → Rn, 0100nnnn1mmm0011 Privileged —
  7119. Rm_BANK → (Rn) (m = 0 to 7)
  7120.  
  7121. STS MACH,Rn MACH → Rn 0000nnnn00001010 — —
  7122.  
  7123. STS MACL,Rn MACL → Rn 0000nnnn00011010 — —
  7124.  
  7125. STS PR,Rn PR → Rn 0000nnnn00101010 — —
  7126.  
  7127. STS.L MACH,@-Rn Rn – 4 → Rn, MACH → (Rn) 0100nnnn00000010 — —
  7128.  
  7129. STS.L MACL,@-Rn Rn – 4 → Rn, MACL → (Rn) 0100nnnn00010010 — —
  7130.  
  7131. STS.L PR,@-Rn Rn – 4 → Rn, PR → (Rn) 0100nnnn00100010 — —
  7132.  
  7133. TRAPA #imm PC + 2 → SPC, SR → SSR, 11000011iiiiiiii — —
  7134. #imm << 2 → TRA,
  7135. H'160 → EXPEVT,
  7136. VBR + H'0100 → PC
  7137.  
  7138. Rev. 2.0, 02/99, page 148 of 830
  7139.  
  7140. ----------------------- Page 163-----------------------
  7141.  
  7142. Table 7.9 Floating-Point Single-Precision Instructions
  7143.  
  7144. Instruction Operation Instruction Code Privileged T Bit
  7145.  
  7146. FLDI0 FRn H'00000000 → FRn 1111nnnn10001101 — —
  7147.  
  7148. FLDI1 FRn H'3F800000 → FRn 1111nnnn10011101 — —
  7149.  
  7150. FMOV FRm,FRn FRm → FRn 1111nnnnmmmm1100 — —
  7151.  
  7152. FMOV.S @Rm,FRn (Rm) → FRn 1111nnnnmmmm1000 — —
  7153.  
  7154. FMOV.S @(R0,Rm),FRn (R0 + Rm) → FRn 1111nnnnmmmm0110 — —
  7155.  
  7156. FMOV.S @Rm+,FRn (Rm) → FRn, Rm + 4 → Rm 1111nnnnmmmm1001 — —
  7157.  
  7158. FMOV.S FRm,@Rn FRm → (Rn) 1111nnnnmmmm1010 — —
  7159.  
  7160. FMOV.S FRm,@-Rn Rn-4 → Rn, FRm → (Rn) 1111nnnnmmmm1011 — —
  7161.  
  7162. FMOV.S FRm,@(R0,Rn) FRm → (R0 + Rn) 1111nnnnmmmm0111 — —
  7163.  
  7164. FMOV DRm,DRn DRm → DRn 1111nnn0mmm01100 — —
  7165.  
  7166. FMOV @Rm,DRn (Rm) → DRn 1111nnn0mmmm1000 — —
  7167.  
  7168. FMOV @(R0,Rm),DRn (R0 + Rm) → DRn 1111nnn0mmmm0110 — —
  7169.  
  7170. FMOV @Rm+,DRn (Rm) → DRn, Rm + 8 → Rm 1111nnn0mmmm1001 — —
  7171.  
  7172. FMOV DRm,@Rn DRm → (Rn) 1111nnnnmmm01010 — —
  7173.  
  7174. FMOV DRm,@-Rn Rn-8 → Rn, DRm → (Rn) 1111nnnnmmm01011 — —
  7175.  
  7176. FMOV DRm,@(R0,Rn) DRm → (R0 + Rn) 1111nnnnmmm00111 — —
  7177.  
  7178. FLDS FRm,FPUL FRm → FPUL 1111mmmm00011101 — —
  7179.  
  7180. FSTS FPUL,FRn FPUL → FRn 1111nnnn00001101 — —
  7181.  
  7182. FABS FRn FRn & H'7FFF FFFF → FRn 1111nnnn01011101 — —
  7183.  
  7184. FADD FRm,FRn FRn + FRm → FRn 1111nnnnmmmm0000 — —
  7185.  
  7186. FCMP/EQ FRm,FRn When FRn = FRm, 1 → T 1111nnnnmmmm0100 — Comparison
  7187. Otherwise, 0 → T result
  7188.  
  7189. FCMP/GT FRm,FRn When FRn > FRm, 1 → T 1111nnnnmmmm0101 — Comparison
  7190. Otherwise, 0 → T result
  7191.  
  7192. FDIV FRm,FRn FRn/FRm → FRn 1111nnnnmmmm0011 — —
  7193.  
  7194. FLOAT FPUL,FRn (float) FPUL → FRn 1111nnnn00101101 — —
  7195.  
  7196. FMAC FR0,FRm,FRn FR0*FRm + FRn → FRn 1111nnnnmmmm1110 — —
  7197.  
  7198. FMUL FRm,FRn FRn*FRm → FRn 1111nnnnmmmm0010 — —
  7199.  
  7200. FNEG FRn FRn ∧ H'80000000 → FRn 1111nnnn01001101 — —
  7201.  
  7202. FSQRT FRn √FRn → FRn 1111nnnn01101101 — —
  7203.  
  7204. FSUB FRm,FRn FRn – FRm → FRn 1111nnnnmmmm0001 — —
  7205.  
  7206. FTRC FRm,FPUL (long) FRm → FPUL 1111mmmm00111101 — —
  7207.  
  7208. Rev. 2.0, 02/99, page 149 of 830
  7209.  
  7210. ----------------------- Page 164-----------------------
  7211.  
  7212. Table 7.10 Floating-Point Double-Precision Instructions
  7213.  
  7214. Instruction Operation Instruction Code Privileged T Bit
  7215.  
  7216. FABS DRn DRn & H'7FFF FFFF FFFF FFFF 1111nnn001011101 — —
  7217. → DRn
  7218.  
  7219. FADD DRm,DRn DRn + DRm → DRn 1111nnn0mmm00000 — —
  7220.  
  7221. FCMP/EQ DRm,DRn When DRn = DRm, 1 → T 1111nnn0mmm00100 — Comparison
  7222. Otherwise, 0 → T result
  7223.  
  7224. FCMP/GT DRm,DRn When DRn > DRm, 1 → T 1111nnn0mmm00101 — Comparison
  7225. Otherwise, 0 → T result
  7226.  
  7227. FDIV DRm,DRn DRn /DRm → DRn 1111nnn0mmm00011 — —
  7228.  
  7229. FCNVDS DRm,FPUL double_to_ float[DRm] → FPUL 1111mmm010111101 — —
  7230.  
  7231. FCNVSD FPUL,DRn float_to_ double [FPUL] → DRn 1111nnn010101101 — —
  7232.  
  7233. FLOAT FPUL,DRn (float)FPUL → DRn 1111nnn000101101 — —
  7234.  
  7235. FMUL DRm,DRn DRn *DRm → DRn 1111nnn0mmm00010 — —
  7236.  
  7237. FNEG DRn DRn ^ H'8000 0000 0000 0000 → 1111nnn001001101 — —
  7238. DRn
  7239.  
  7240. FSQRT DRn √DRn → DRn 1111nnn001101101 — —
  7241.  
  7242. FSUB DRm,DRn DRn – DRm → DRn 1111nnn0mmm00001 — —
  7243.  
  7244. FTRC DRm,FPUL (long) DRm → FPUL 1111mmm000111101 — —
  7245.  
  7246. Table 7.11 Floating-Point Control Instructions
  7247.  
  7248. Instruction Operation Instruction Code Privileged T Bit
  7249.  
  7250. LDS Rm,FPSCR Rm → FPSCR 0100mmmm01101010 — —
  7251.  
  7252. LDS Rm,FPUL Rm → FPUL 0100mmmm01011010 — —
  7253.  
  7254. LDS.L @Rm+,FPSCR (Rm) → FPSCR, Rm+4 → Rm 0100mmmm01100110 — —
  7255.  
  7256. LDS.L @Rm+,FPUL (Rm) → FPUL, Rm+4 → Rm 0100mmmm01010110 — —
  7257.  
  7258. STS FPSCR,Rn FPSCR → Rn 0000nnnn01101010 — —
  7259.  
  7260. STS FPUL,Rn FPUL → Rn 0000nnnn01011010 — —
  7261.  
  7262. STS.L FPSCR,@-Rn Rn – 4 → Rn, FPSCR → (Rn) 0100nnnn01100010 — —
  7263.  
  7264. STS.L FPUL,@-Rn Rn – 4 → Rn, FPUL → (Rn) 0100nnnn01010010 — —
  7265.  
  7266. Rev. 2.0, 02/99, page 150 of 830
  7267.  
  7268. ----------------------- Page 165-----------------------
  7269.  
  7270. Table 7.12 Floating-Point Graphics Acceleration Instructions
  7271.  
  7272. Instruction Operation Instruction Code Privileged T Bit
  7273.  
  7274. FMOV DRm,XDn DRm → XDn 1111nnn1mmm01100 — —
  7275.  
  7276. FMOV XDm,DRn XDm → DRn 1111nnn0mmm11100 — —
  7277.  
  7278. FMOV XDm,XDn XDm → XDn 1111nnn1mmm11100 — —
  7279.  
  7280. FMOV @Rm,XDn (Rm) → XDn 1111nnn1mmmm1000 — —
  7281.  
  7282. FMOV @Rm+,XDn (Rm) → XDn, Rm + 8 → Rm 1111nnn1mmmm1001 — —
  7283.  
  7284. FMOV @(R0,Rm),XDn (R0 + Rm) → XDn 1111nnn1mmmm0110 — —
  7285.  
  7286. FMOV XDm,@Rn XDm → (Rn) 1111nnnnmmm11010 — —
  7287.  
  7288. FMOV XDm,@-Rn Rn – 8 → Rn, XDm → (Rn) 1111nnnnmmm11011 — —
  7289.  
  7290. FMOV XDm,@(R0,Rn) XDm → (R0+Rn) 1111nnnnmmm10111 — —
  7291.  
  7292. FIPR FVm,FVn inner_product [FVm, FVn] → 1111nnmm11101101 — —
  7293. FR[n+3]
  7294.  
  7295. FTRV XMTRX,FVn transform_vector [XMTRX, FVn] 1111nn0111111101 — —
  7296. → FVn
  7297.  
  7298. FRCHG ~FPSCR.FR → SPFCR.FR 1111101111111101 — —
  7299.  
  7300. FSCHG ~FPSCR.SZ → SPFCR.SZ 1111001111111101 — —
  7301.  
  7302. Rev. 2.0, 02/99, page 151 of 830
  7303.  
  7304. ----------------------- Page 166-----------------------
  7305.  
  7306. Rev. 2.0, 02/99, page 152 of 830
  7307.  
  7308. ----------------------- Page 167-----------------------
  7309.  
  7310. Section 8 Pipelining
  7311.  
  7312. The SH7750 is a 2-ILP (instruction-level-parallelism) superscalar pipelining microprocessor.
  7313. Instruction execution is pipelined, and two instructions can be executed in parallel. The
  7314. execution cycles depend on the implementation of a processor. Definitions in this section may
  7315. not be applicable to SH-4 Series models other than the SH7750.
  7316.  
  7317. 8.1 Pipelines
  7318.  
  7319. Figure 8.1 shows the basic pipelines. Normally, a pipeline consists of five or six stages:
  7320. instruction fetch (I), decode and register read (D), execution (EX/SX/F0/F1/F2/F3), data access
  7321. (NA/MA), and write-back (S/FS). An instruction is executed as a combination of basic pipelines.
  7322. Figure 8.2 shows the instruction execution patterns.
  7323.  
  7324. Rev. 2.0, 02/99, page 153 of 830
  7325.  
  7326. ----------------------- Page 168-----------------------
  7327.  
  7328. 1. General Pipeline
  7329.  
  7330. I D EX NA S
  7331.  
  7332. • Instruction fetch •Instruction • Operation • Non-memory • Write-back
  7333. decode data access
  7334. •Issue
  7335. •Register read
  7336. •Destination address calculation
  7337. for PC-relative branch
  7338.  
  7339. 2. General Load/Store Pipeline
  7340.  
  7341. I D EX MA S
  7342.  
  7343. • Instruction fetch •Instruction • Address • Memory • Write-back
  7344. decode calculation data access
  7345. • Issue
  7346. • Register read
  7347.  
  7348. 3. Special Pipeline
  7349.  
  7350. I D SX NA S
  7351.  
  7352. • Instruction fetch •Instruction • Operation • Non-memory • Write-back
  7353. decode data access
  7354. • Issue
  7355. • Register read
  7356.  
  7357. 4. Special Load/Store Pipeline
  7358.  
  7359. I D SX MA S
  7360.  
  7361. • Instruction fetch •Instruction • Address • Memory • Write-back
  7362. decode calculation data access
  7363. • Issue
  7364. • Register read
  7365.  
  7366. 5. Floating-Point Pipeline
  7367.  
  7368. I D F1 F2 FS
  7369.  
  7370. • Instruction fetch •Instruction • Computation 1 • Computation 2 • Computation 3
  7371. decode • Write-back
  7372. • Issue
  7373. • Register read
  7374.  
  7375. 6. Floating-Point Extended Pipeline
  7376.  
  7377. I D F0 F1 F2 FS
  7378.  
  7379. • Instruction fetch •Instruction • Computation 0 • Computation 1 • Computation 2 • Computation 3
  7380. decode • Write-back
  7381. • Issue
  7382. • Register read
  7383.  
  7384. 7. FDIV/FSQRT Pipeline
  7385.  
  7386. F3
  7387.  
  7388. Computation: Takes several cycles
  7389.  
  7390. Figure 8.1 Basic Pipelines
  7391.  
  7392. Rev. 2.0, 02/99, page 154 of 830
  7393.  
  7394. ----------------------- Page 169-----------------------
  7395.  
  7396. 1. 1-step operation: 1 issue cycle
  7397. EXT[SU].[BW], MOV, MOV#, MOVA, MOVT, SWAP.[BW], XTRCT, ADD*, CMP*,
  7398. DIV*, DT, NEG*, SUB*, AND, AND#, NOT, OR, OR#, TST, TST#, XOR, XOR#,
  7399. ROT*, SHA*, SHL*, BF*, BT*, BRA, NOP, CLRS, CLRT, SETS, SETT,
  7400. LDS to FPUL, STS from FPUL/FPSCR, FLDI0, FLDI1, FMOV, FLDS, FSTS,
  7401. single-/double-precision FABS/FNEG
  7402.  
  7403. I D EX NA S
  7404.  
  7405. 2. Load/store: 1 issue cycle
  7406. MOV.[BWL]. FMOV*@, LDS.L to FPUL, LDTLB, PREF, STS.L from FPUL/FPSCR
  7407. I D EX MA S
  7408.  
  7409. 3. GBR-based load/store: 1 issue cycle
  7410. MOV.[BWL]@(d,GBR)
  7411.  
  7412. I D SX MA S
  7413.  
  7414. 4. JMP, RTS, BRAF: 2 issue cycles
  7415.  
  7416. I D EX NA S
  7417. D EX NA S
  7418.  
  7419. 5. TST.B: 3 issue cycles
  7420.  
  7421. I D SX MA S
  7422. D SX NA S
  7423. D SX NA S
  7424.  
  7425. 6. AND.B, OR.B, XOR.B: 4 issue cycles
  7426.  
  7427. I D SX MA S
  7428. D SX NA S
  7429. D SX NA S
  7430. D SX MA S
  7431.  
  7432. 7. TAS.B: 5 issue cycles
  7433.  
  7434. I D EX MA S
  7435. D EX MA S
  7436. D EX NA S
  7437. D EX NA S
  7438. D EX MA S
  7439.  
  7440. 8. RTE: 5 issue cycles
  7441.  
  7442. I D EX NA S
  7443. D EX NA S
  7444. D EX NA S
  7445. D EX NA S
  7446. D EX NA S
  7447.  
  7448. 9. SLEEP: 4 issue cycles
  7449.  
  7450. I D EX NA S
  7451. D EX NA S
  7452. D EX NA S
  7453. D EX NA S
  7454.  
  7455. Figure 8.2 Instruction Execution Patterns
  7456.  
  7457. Rev. 2.0, 02/99, page 155 of 830
  7458.  
  7459. ----------------------- Page 170-----------------------
  7460.  
  7461. 10. OCBI: 1 issue cycle
  7462.  
  7463. I D EX MA S
  7464. MA
  7465.  
  7466. 11. OCBP, OCBWB: 1 issue cycle
  7467.  
  7468. I D EX MA S
  7469. MA
  7470. MA
  7471. MA
  7472. MA
  7473.  
  7474. 12. MOVCA.L: 1 issue cycle
  7475.  
  7476. I D EX MA S
  7477. MA
  7478. MA
  7479. MA
  7480. MA
  7481.  
  7482. MA
  7483. MA
  7484.  
  7485. 13. TRAPA: 7 issue cycles
  7486.  
  7487. I D EX NA S
  7488. D EX NA S
  7489. D EX NA S
  7490. D EX NA S
  7491. D EX NA S
  7492. D EX NA S
  7493. D EX NA S
  7494.  
  7495. 14. CR definition: 1 issue cycle
  7496. LDC to DBR/Rp_BANK/SSR/SPC/VBR, BSR
  7497.  
  7498. I D EX NA S
  7499. SX
  7500. SX
  7501.  
  7502. 15. LDC to GBR: 3 issue cycles
  7503.  
  7504. I D EX NA S
  7505. D SX
  7506. D SX
  7507.  
  7508. 16. LDC to SR: 4 issue cycles
  7509.  
  7510. I D EX NA S
  7511. D SX
  7512. D SX
  7513. D SX
  7514.  
  7515. 17. LDC.L to DBR/Rp_BANK/SSR/SPC/VBR: 1 issue cycle
  7516.  
  7517. I D EX MA S
  7518. SX
  7519. SX
  7520.  
  7521. 18. LDC.L to GBR: 3 issue cycles
  7522. I D EX MA S
  7523. D SX
  7524. D SX
  7525.  
  7526. Figure 8.2 Instruction Execution Patterns (cont)
  7527.  
  7528. Rev. 2.0, 02/99, page 156 of 830
  7529.  
  7530. ----------------------- Page 171-----------------------
  7531.  
  7532. 19. LDC.L to SR: 4 issue cycles
  7533.  
  7534. I D EX MA S
  7535. D SX
  7536. D SX
  7537. D SX
  7538.  
  7539. 20. STC from DBR/GBR/Rp_BANK/SR/SSR/SPC/VBR: 2 issue cycles
  7540. D
  7541. I SX NA S
  7542. D SX NA S
  7543.  
  7544. 21. STC.L from SGR: 3 issue cycles
  7545. D
  7546. I SX NA S
  7547. D SX NA S
  7548. D SX NA S
  7549.  
  7550. 22. STC.L from DBR/GBR/Rp_BANK/SR/SSR/SPC/VBR: 2 issue cycles
  7551.  
  7552. I D SX NA S
  7553. D SX MA S
  7554.  
  7555. 23. STC.L from SGR: 3 issue cycles
  7556. D
  7557. I SX NA S
  7558. D SX NA S
  7559. D SX MA S
  7560.  
  7561. 24. LDS to PR, JSR, BSRF: 2 issue cycles
  7562.  
  7563. I D EX NA S
  7564. D SX
  7565. SX
  7566.  
  7567. 25. LDS.L to PR: 2 issue cycles
  7568.  
  7569. I D EX MA S
  7570. D SX
  7571. SX
  7572.  
  7573. 26. STS from PR: 2 issue cycles
  7574. I D SX NA S
  7575. D SX NA S
  7576.  
  7577. 27. STS.L from PR: 2 issue cycles
  7578.  
  7579. I D SX NA S
  7580. D SX MA S
  7581.  
  7582. 28. MACH/L definition: 1 issue cycle
  7583. CLRMAC, LDS to MACH/L
  7584. I D EX NA S
  7585. F1
  7586. F1 F2 FS
  7587.  
  7588. 29. LDS.L to MACH/L: 1 issue cycle
  7589. I D EX MA S
  7590. F1
  7591. F1 F2 FS
  7592.  
  7593. 30. STS from MACH/L: 1 issue cycle
  7594. I D EX NA S
  7595.  
  7596. Figure 8.2 Instruction Execution Patterns (cont)
  7597.  
  7598. Rev. 2.0, 02/99, page 157 of 830
  7599.  
  7600. ----------------------- Page 172-----------------------
  7601.  
  7602. 31. STS.L from MACH/L: 1 issue cycle
  7603. I D EX MA S
  7604.  
  7605. 32. LDS to FPSCR: 1 issue cycle
  7606.  
  7607. I D EX NA S
  7608. F1
  7609. F1
  7610. F1
  7611.  
  7612. 33. LDS.L to FPSCR: 1 issue cycle
  7613.  
  7614. I D EX MA S
  7615. F1
  7616. F1
  7617. F1
  7618.  
  7619. 34. Fixed-point multiplication: 2 issue cycles
  7620. DMULS.L, DMULU.L, MUL.L, MULS.W, MULU.W
  7621. I D EX NA S (CPU)
  7622. D EX NA S
  7623.  
  7624. f1 (FPU)
  7625. f1
  7626. f1
  7627. f1 F2 FS
  7628.  
  7629. 35. MAC.W, MAC.L: 2 issue cycles
  7630. I D EX MA S (CPU)
  7631. D EX MA S
  7632.  
  7633. f1 (FPU)
  7634. f1
  7635. f1
  7636.  
  7637. f1 F2 FS
  7638.  
  7639. 36. Single-precision floating-point computation: 1 issue cycle
  7640. FCMP/EQ,FCMP/GT, FADD,FLOAT,FMAC,FMUL,FSUB,FTRC,FRCHG,FSCHG
  7641.  
  7642. I D F1 F2 FS
  7643.  
  7644. 37. Single-precision FDIV/SQRT: 1 issue cycle
  7645.  
  7646. I D F1 F2 FS
  7647. F3
  7648.  
  7649. F1 F2 FS
  7650.  
  7651. 38. Double-precision floating-point computation 1: 1 issue cycle
  7652. FCNVDS, FCNVSD, FLOAT, FTRC
  7653.  
  7654. I D F1 F2 FS
  7655. d F1 F2 FS
  7656.  
  7657. 39. Double-precision floating-point computation 2: 1 issue cycle
  7658. FADD, FMUL, FSUB
  7659.  
  7660. I D F1 F2 FS
  7661. d F1 F2 FS
  7662. d F1 F2 FS
  7663. d F1 F2 FS
  7664. d F1 F2 FS
  7665. F1 F2 FS
  7666.  
  7667. Figure 8.2 Instruction Execution Patterns (cont)
  7668.  
  7669. Rev. 2.0, 02/99, page 158 of 830
  7670.  
  7671. ----------------------- Page 173-----------------------
  7672.  
  7673. 40. Double-precision FCMP: 2 issue cycles
  7674. FCMP/EQ,FCMP/GT
  7675.  
  7676. I D F1 F2 FS
  7677. D F1 F2 FS
  7678.  
  7679. 41. Double-precision FDIV/SQRT: 1 issue cycle
  7680. FDIV, FSQRT
  7681.  
  7682. I D F1 F2 FS
  7683. d F1 F2
  7684. F3
  7685. F1 F2
  7686. FS
  7687. F1 F2
  7688. FS
  7689. F1 F2
  7690. FS
  7691. 42. FIPR: 1 issue cycle
  7692.  
  7693. I D F0 F1 F2 FS
  7694.  
  7695. 43. FTRV: 1 issue cycle
  7696.  
  7697. I D F0 F1 F2 FS
  7698. d F0 F1 F2 FS
  7699. d F0 F1 F2 FS
  7700. d F0 F1 F2 FS
  7701.  
  7702. Notes: ?? : Cannot overlap a stage of the same kind, except when two instructions are
  7703. executed in parallel.
  7704.  
  7705. D : Locks D-stage
  7706.  
  7707. d : Register read only
  7708.  
  7709. ?? : Locks, but no operation is executed.
  7710.  
  7711. f1 : Can overlap another f1, but not another F1.
  7712.  
  7713. Figure 8.2 Instruction Execution Patterns (cont)
  7714.  
  7715. Rev. 2.0, 02/99, page 159 of 830
  7716.  
  7717. ----------------------- Page 174-----------------------
  7718.  
  7719. 8.2 Parallel-Executability
  7720.  
  7721. Instructions are categorized into six groups according to the internal function blocks used, as
  7722. shown in table 8.1. Table 8.2 shows the parallel-executability of pairs of instructions in terms of
  7723. groups. For example, ADD in the EX group and BRA in the BR group can be executed in
  7724. parallel.
  7725.  
  7726. Table 8.1 Instruction Groups
  7727.  
  7728. 1. MT Group
  7729.  
  7730. CLRT CMP/HI Rm,Rn MOV Rm,Rn
  7731.  
  7732. CMP/EQ #imm,R0 CMP/HS Rm,Rn NOP
  7733.  
  7734. CMP/EQ Rm,Rn CMP/PL Rn SETT
  7735.  
  7736. CMP/GE Rm,Rn CMP/PZ Rn TST #imm,R0
  7737.  
  7738. CMP/GT Rm,Rn CMP/STR Rm,Rn TST Rm,Rn
  7739.  
  7740. 2. EX Group
  7741.  
  7742. ADD #imm,Rn MOVT Rn SHLL2 Rn
  7743.  
  7744. ADD Rm,Rn NEG Rm,Rn SHLL8 Rn
  7745.  
  7746. ADDC Rm,Rn NEGC Rm,Rn SHLR Rn
  7747.  
  7748. ADDV Rm,Rn NOT Rm,Rn SHLR16 Rn
  7749.  
  7750. AND #imm,R0 OR #imm,R0 SHLR2 Rn
  7751.  
  7752. AND Rm,Rn OR Rm,Rn SHLR8 Rn
  7753.  
  7754. DIV0S Rm,Rn ROTCL Rn SUB Rm,Rn
  7755.  
  7756. DIV0U ROTCR Rn SUBC Rm,Rn
  7757.  
  7758. DIV1 Rm,Rn ROTL Rn SUBV Rm,Rn
  7759.  
  7760. DT Rn ROTR Rn SWAP.B Rm,Rn
  7761.  
  7762. EXTS.B Rm,Rn SHAD Rm,Rn SWAP.W Rm,Rn
  7763.  
  7764. EXTS.W Rm,Rn SHAL Rn XOR #imm,R0
  7765.  
  7766. EXTU.B Rm,Rn SHAR Rn XOR Rm,Rn
  7767.  
  7768. EXTU.W Rm,Rn SHLD Rm,Rn XTRCT Rm,Rn
  7769.  
  7770. MOV #imm,Rn SHLL Rn
  7771.  
  7772. MOVA @(disp,PC),R0 SHLL16 Rn
  7773.  
  7774. 3. BR Group
  7775.  
  7776. BF disp BRA disp BT disp
  7777.  
  7778. BF/S disp BSR disp BT/S disp
  7779.  
  7780. Rev. 2.0, 02/99, page 160 of 830
  7781.  
  7782. ----------------------- Page 175-----------------------
  7783.  
  7784. Table 8.1 Instruction Groups (cont)
  7785.  
  7786. 4. LS Group
  7787.  
  7788. FABS DRn FMOV.S @Rm+,FRn MOV.L R0,@(disp,GBR)
  7789.  
  7790. FABS FRn FMOV.S FRm,@(R0,Rn) MOV.L Rm,@(disp,Rn)
  7791.  
  7792. FLDI0 FRn FMOV.S FRm,@-Rn MOV.L Rm,@(R0,Rn)
  7793.  
  7794. FLDI1 FRn FMOV.S FRm,@Rn MOV.L Rm,@-Rn
  7795.  
  7796. FLDS FRm,FPUL FNEG DRn MOV.L Rm,@Rn
  7797.  
  7798. FMOV @(R0,Rm),DRn FNEG FRn MOV.W @(disp,GBR),R0
  7799.  
  7800. FMOV @(R0,Rm),XDn FSTS FPUL,FRn MOV.W @(disp,PC),Rn
  7801.  
  7802. FMOV @Rm,DRn LDS Rm,FPUL MOV.W @(disp,Rm),R0
  7803.  
  7804. FMOV @Rm,XDn MOV.B @(disp,GBR),R0 MOV.W @(R0,Rm),Rn
  7805.  
  7806. FMOV @Rm+,DRn MOV.B @(disp,Rm),R0 MOV.W @Rm,Rn
  7807.  
  7808. FMOV @Rm+,XDn MOV.B @(R0,Rm),Rn MOV.W @Rm+,Rn
  7809.  
  7810. FMOV DRm,@(R0,Rn) MOV.B @Rm,Rn MOV.W R0,@(disp,GBR)
  7811.  
  7812. FMOV DRm,@-Rn MOV.B @Rm+,Rn MOV.W R0,@(disp,Rn)
  7813.  
  7814. FMOV DRm,@Rn MOV.B R0,@(disp,GBR) MOV.W Rm,@(R0,Rn)
  7815.  
  7816. FMOV DRm,DRn MOV.B R0,@(disp,Rn) MOV.W Rm,@-Rn
  7817.  
  7818. FMOV DRm,XDn MOV.B Rm,@(R0,Rn) MOV.W Rm,@Rn
  7819.  
  7820. FMOV FRm,FRn MOV.B Rm,@-Rn MOVCA.L R0,@Rn
  7821.  
  7822. FMOV XDm,@(R0,Rn) MOV.B Rm,@Rn OCBI @Rn
  7823.  
  7824. FMOV XDm,@-Rn MOV.L @(disp,GBR),R0 OCBP @Rn
  7825.  
  7826. FMOV XDm,@Rn MOV.L @(disp,PC),Rn OCBWB @Rn
  7827.  
  7828. FMOV XDm,DRn MOV.L @(disp,Rm),Rn PREF @Rn
  7829.  
  7830. FMOV XDm,XDn MOV.L @(R0,Rm),Rn STS FPUL,Rn
  7831.  
  7832. FMOV.S @(R0,Rm),FRn MOV.L @Rm,Rn
  7833.  
  7834. FMOV.S @Rm,FRn MOV.L @Rm+,Rn
  7835.  
  7836. Rev. 2.0, 02/99, page 161 of 830
  7837.  
  7838. ----------------------- Page 176-----------------------
  7839.  
  7840. Table 8.1 Instruction Groups (cont)
  7841.  
  7842. 5. FE Group
  7843.  
  7844. FADD DRm,DRn FIPR FVm,FVn FSQRT DRn
  7845.  
  7846. FADD FRm,FRn FLOAT FPUL,DRn FSQRT FRn
  7847.  
  7848. FCMP/EQ FRm,FRn FLOAT FPUL,FRn FSUB DRm,DRn
  7849.  
  7850. FCMP/GT FRm,FRn FMAC FR0,FRm,FRn FSUB FRm,FRn
  7851.  
  7852. FCNVDS DRm,FPUL FMUL DRm,DRn FTRC DRm,FPUL
  7853.  
  7854. FCNVSD FPUL,DRn FMUL FRm,FRn FTRC FRm,FPUL
  7855.  
  7856. FDIV DRm,DRn FRCHG FTRV XMTRX,FVn
  7857.  
  7858. FDIV FRm,FRn FSCHG
  7859.  
  7860. Rev. 2.0, 02/99, page 162 of 830
  7861.  
  7862. ----------------------- Page 177-----------------------
  7863.  
  7864. Table 8.1 Instruction Groups (cont)
  7865.  
  7866. 6. CO Group
  7867.  
  7868. AND.B #imm,@(R0,GBR) LDS Rm,FPSCR STC SR,Rn
  7869.  
  7870. BRAF Rm LDS Rm,MACH STC SSR,Rn
  7871.  
  7872. BSRF Rm LDS Rm,MACL STC VBR,Rn
  7873.  
  7874. CLRMAC LDS Rm,PR STC.L DBR,@-Rn
  7875.  
  7876. CLRS LDS.L @Rm+,FPSCR STC.L GBR,@-Rn
  7877.  
  7878. DMULS.L Rm,Rn LDS.L @Rm+,FPUL STC.L Rp_BANK,@-Rn
  7879.  
  7880. DMULU.L Rm,Rn LDS.L @Rm+,MACH STC.L SGR,@-Rn
  7881.  
  7882. FCMP/EQ DRm,DRn LDS.L @Rm+,MACL STC.L SPC,@-Rn
  7883.  
  7884. FCMP/GT DRm,DRn LDS.L @Rm+,PR STC.L SR,@-Rn
  7885.  
  7886. JMP @Rn LDTLB STC.L SSR,@-Rn
  7887.  
  7888. JSR @Rn MAC.L @Rm+,@Rn+ STC.L VBR,@-Rn
  7889.  
  7890. LDC Rm,DBR MAC.W @Rm+,@Rn+ STS FPSCR,Rn
  7891.  
  7892. LDC Rm,GBR MUL.L Rm,Rn STS MACH,Rn
  7893.  
  7894. LDC Rm,Rp_BANK MULS.W Rm,Rn STS MACL,Rn
  7895.  
  7896. LDC Rm,SPC MULU.W Rm,Rn STS PR,Rn
  7897.  
  7898. LDC Rm,SR OR.B #imm,@(R0,GBR) STS.L FPSCR,@-Rn
  7899.  
  7900. LDC Rm,SSR RTE STS.L FPUL,@-Rn
  7901.  
  7902. LDC Rm,VBR RTS STS.L MACH,@-Rn
  7903.  
  7904. LDC.L @Rm+,DBR SETS STS.L MACL,@-Rn
  7905.  
  7906. LDC.L @Rm+,GBR SLEEP STS.L PR,@-Rn
  7907.  
  7908. LDC.L @Rm+,Rp_BANK STC DBR,Rn TAS.B @Rn
  7909.  
  7910. LDC.L @Rm+,SPC STC GBR,Rn TRAPA #imm
  7911.  
  7912. LDC.L @Rm+,SR STC Rp_BANK,Rn TST.B #imm,@(R0,GBR)
  7913.  
  7914. LDC.L @Rm+,SSR STC SGR,Rn XOR.B #imm,@(R0,GBR)
  7915.  
  7916. LDC.L @Rm+,VBR STC SPC,Rn
  7917.  
  7918. Rev. 2.0, 02/99, page 163 of 830
  7919.  
  7920. ----------------------- Page 178-----------------------
  7921.  
  7922. Table 8.2 Parallel-Executability
  7923.  
  7924. 2nd Instruction
  7925.  
  7926. MT EX BR LS FE CO
  7927.  
  7928. 1st MT O O O O O X
  7929. Instruction
  7930.  
  7931. EX O X O O O X
  7932.  
  7933. BR O O X O O X
  7934.  
  7935. LS O O O X O X
  7936.  
  7937. FE O O O O X X
  7938.  
  7939. CO X X X X X X
  7940.  
  7941. O: Can be executed in parallel
  7942. X: Cannot be executed in parallel
  7943.  
  7944. 8.3 Execution Cycles and Pipeline Stalling
  7945.  
  7946. There are three basic clocks in this processor: the I-clock, B-clock, and P-clock. Each hardware
  7947. unit operates on one of these clocks, as follows:
  7948.  
  7949. • I-clock: CPU, FPU, MMU, caches
  7950. • B-clock: External bus controller
  7951. • P-clock: Peripheral units
  7952.  
  7953. The frequency ratios of the three clocks are determined with the frequency control register
  7954. (FRQCR). In this section, machine cycles are based on the I-clock unless otherwise specified.
  7955. For details of FRQCR, see section 10, Clock Oscillation Circuits.
  7956.  
  7957. Instruction execution cycles are summarized in table 8.3. Penalty cycles due to a pipeline stall or
  7958. freeze are not considered in this table.
  7959.  
  7960. • Issue rate: Interval between the issue of an instruction and that of the next instruction
  7961. • Latency: Interval between the issue of an instruction and the generation of its result
  7962. (completion)
  7963. • Instruction execution pattern (see figure 8.2)
  7964. • Locked pipeline stages
  7965. • Interval between the issue of an instruction and the start of locking
  7966. • Lock time: Period of locking in machine cycle units
  7967.  
  7968. Rev. 2.0, 02/99, page 164 of 830
  7969.  
  7970. ----------------------- Page 179-----------------------
  7971.  
  7972. The instruction execution sequence is expressed as a combination of the execution patterns
  7973. shown in figure 8.2. One instruction is separated from the next by the number of machine cycles
  7974. for its issue rate. Normally, execution, data access, and write-back stages cannot be overlapped
  7975. onto the same stages of another instruction; the only exception is when two instructions are
  7976. executed in parallel under parallel-executability conditions. Refer to (a) through (d) in figure 8.3
  7977. for some simple examples.
  7978.  
  7979. Latency is the interval between issue and completion of an instruction, and is also the interval
  7980. between the execution of two instructions with an interdependent relationship. When there is
  7981. interdependency between two instructions fetched simultaneously, the latter of the two is stalled
  7982. for the following number of cycles:
  7983.  
  7984. • (Latency) cycles when there is flow dependency (read-after-write)
  7985. • (Latency - 1) or (latency - 2) cycles when there is output dependency (write-after-write)
  7986.  Single/double-precision FDN, FSQRT is the preceding instruction (latency – 1) cycles
  7987.  The other FE group is the preceding instruction (latency – 2) cycles
  7988.  (Latency - 2) cycles
  7989.  Single-precision FDIV, FSQRT: (latency - 1) cycles
  7990. • 5 or 2 cycles when there is anti-flow dependency (write-after-read), as in the following cases:
  7991.  FTRV is the preceding instruction (5 cycle)
  7992.  A double-precision FADD, FSUB, or FMUL is the preceding instruction (2 cycles)
  7993.  
  7994. In the case of flow dependency, latency may be exceptionally increased or decreased, depending
  7995. on the combination of sequential instructions (figure 8.3 (e)).
  7996.  
  7997. • When a floating-point (FP) computation is followed by an FP register store, the latency of
  7998. the FP computation may be decreased by 1 cycle.
  7999. • If there is a load of the shift amount immediately before an SHAD/SHLD instruction, the
  8000. latency of the load is increased by 1 cycle.
  8001. • If an instruction with a latency of less than 2 cycles, including write-back to an FP register, is
  8002. followed by a double-precision FP instruction, FIPR, or FTRV, the latency of the first
  8003. instruction is increased to 2 cycles.
  8004.  
  8005. The number of cycles in a pipeline stall due to flow dependency will vary depending on the
  8006. combination of interdependent instructions or the fetch timing (see figure 8.3. (e)).
  8007.  
  8008. Output dependency occurs when the destination operands are the same in a preceding FE group
  8009. instruction and a following LS group instruction.
  8010.  
  8011. Rev. 2.0, 02/99, page 165 of 830
  8012.  
  8013. ----------------------- Page 180-----------------------
  8014.  
  8015. For the stall cycles of an instruction with output dependency, the longest latency to the last
  8016. write-back among all the destination operands must be applied instead of “latency” (see figure
  8017. 8.3 (f)). A stall due to output dependency with respect to FPSCR, which reflects the result of an
  8018. FP operation, never occurs. For example, when FADD follows FDIV with no dependency
  8019. between FP registers, FADD is not stalled even if both instructions update the cause field of
  8020. FPSCR.
  8021.  
  8022. Anti-flow dependency can occur only between a preceding double-precision FADD, FMUL,
  8023. FSUB, or FTRV and a following FMOV, FLDI0, FLDI1, FABS, FNEG, or FSTS. See figure 8.3
  8024. (g).
  8025.  
  8026. If an executing instruction locks any resource—i.e. a function block that performs a basic
  8027. operation—a following instruction that happens to attempt to use the locked resource must be
  8028. stalled (figure 8.3 (h)). This kind of stall can be compensated by inserting one or more
  8029. instructions independent of the locked resource to separate the interfering instructions. For
  8030. example, when a load instruction and an ADD instruction that references the loaded value are
  8031. consecutive, the 2-cycle stall of the ADD is eliminated by inserting three instructions without
  8032. dependency. Software performance can be improved by such instruction scheduling.
  8033.  
  8034. Other penalties arise in the event of exceptions or external data accesses, as follows.
  8035.  
  8036. • Instruction TLB miss: a penalty of 7 CPU clocks
  8037. • Instruction access to external memory (instruction cache miss, etc.)
  8038. • Data access to external memory (operand cache miss, etc.): a penalty of 2 CPU clocks + 3
  8039. bus clocks
  8040. • Data access to a memory-mapped control register. The penalty differs from register to
  8041. register, and depends on the kind of operation (read or write), the clock mode, and the bus
  8042. use conditions when the access is made.
  8043.  
  8044. During the penalty cycles of an instruction TLB miss or external instruction access, no
  8045. instruction is issued, but execution of instructions that have already been issued continues. The
  8046. penalty for a data access is a pipeline freeze: that is, the execution of uncompleted instructions is
  8047. interrupted until the arrival of the requested data. The number of penalty cycles for instruction
  8048. and data accesses is largely dependent on the user’s memory subsystems.
  8049.  
  8050. Rev. 2.0, 02/99, page 166 of 830
  8051.  
  8052. ----------------------- Page 181-----------------------
  8053.  
  8054. (a) Serial execution: non-parallel-executable instructions
  8055.  
  8056. 1 issue cycle
  8057. SHAD R0,R1 I D EX NA S EX-group SHAD and EX-group ADD
  8058. ADD R2,R3 I D EX NA S cannot be executed in parallel. Therefore,
  8059. next 1 stall cycle SHAD is issued first, and the following
  8060. ADD is recombined with the next
  8061. I D
  8062. ... instruction.
  8063.  
  8064. (b) Parallel execution: parallel-executable and no dependency
  8065.  
  8066. 1 issue cycle
  8067. ADD R2,R1 I D EX NA S EX-group ADD and LS-group MOV.L can
  8068. MOV.L @R4,R5 I D EX MA S be executed in parallel. Overlapping of
  8069. stages in the 2nd instruction is possible.
  8070.  
  8071. (c) Issue rate: multi-step instruction
  8072.  
  8073. AND.B and MOV are fetched
  8074.  
  8075. 4 issue cycles
  8076. AND.B#1,@(R0,GBR) I D SX MA S simultaneously, but MOV is stalled due to
  8077. resource locking. After the lock is released,
  8078. D SX NA S
  8079. MOV is refetched together with the next
  8080. D SX NA S
  8081. instruction.
  8082. D SX MA S
  8083. MOV R1,R2
  8084. I i D E A S
  8085. next
  8086. I ...
  8087. 4 stall cycles
  8088.  
  8089. (d) Branch
  8090.  
  8091. BT/S L_far I D EX NA S No stall occurs if the branch is not taken.
  8092. ADD R0,R1 I D EX NA S
  8093. SUB R2,R3 I D EX NA S
  8094.  
  8095. 2-cycle latency for I-stage of branch destination
  8096. BT/S L_far I D EX NA S If the branch is taken, the I-stage of the
  8097. ADD R0,R1 I D EX NA S branch destination is stalled for the period
  8098. 1 stall cycle of latency. This stall can be covered with a
  8099. L_far I D delay slot instruction which is not parallel-
  8100. ... executable with the branch instruction.
  8101.  
  8102. BT L_skip I D EX NA S Even if the BT/BF branch is taken, the I-
  8103. ADD #1,R0 I D — — — stage of the branch destination is not
  8104. L_skip: I D ... stalled if the displacement is zero.
  8105.  
  8106. No stall
  8107.  
  8108. Figure 8.3 Examples of Pipelined Execution
  8109.  
  8110. Rev. 2.0, 02/99, page 167 of 830
  8111.  
  8112. ----------------------- Page 182-----------------------
  8113.  
  8114. (e) Flow dependency
  8115. Zero-cycle latency
  8116. The following instruction, ADD, is not
  8117. MOV R0,R1 I D EX NA S stalled when executed after an instruction
  8118. ADD R2,R1 I D EX NA S with zero-cycle latency, even if there is
  8119. dependency.
  8120. 1-cycle latency
  8121. I D EX NA S ADD and MOV.L are not executed in
  8122. ADD R2,R1
  8123. MOV.L @R1,R1 I i D EX MA S parallel, since MOV.L references the result
  8124. of ADD as its destination address.
  8125. next I ...
  8126. 1 stall cycle
  8127.  
  8128. 2-cycle latency
  8129. MOV.L @R1,R1 I D EX MA S Because MOV.L and ADD are not fetched
  8130. ADD R0,R1 I D EX NA S simultaneously in this example, ADD is
  8131. next I stalled for only 1 cycle even though the
  8132. ... 1 stall cycle
  8133. latency of MOV.L is 2 cycles.
  8134.  
  8135. 2-cycle latency
  8136. 1-cycle increase
  8137.  
  8138. MOV.L @R1,R1 I D EX MA S Due to the flow dependency between the
  8139. SHAD R1,R2 I D d EX NA S load and the SHAD/SHLD shift amount,
  8140. next I the latency of the load is increased to 3
  8141. ...
  8142. 2 stall cycles cycles.
  8143.  
  8144. 4-cycle latency for FPSCR
  8145. F1
  8146. FADD FR1,FR2 I D F2 FS
  8147. STS FPUL,R1 I D EX NA S
  8148. STS FPSCR,R2 I D EX NA S
  8149.  
  8150. 2 stall cycles
  8151.  
  8152. 7-cycle latency for lower FR
  8153. 8-cycle latency for upper FR
  8154. FADD DR0,DR2 I D F1 F2 FS
  8155. d F1 F2 FS
  8156. d F1 F2 FS
  8157. d F1 F2 FS
  8158. d F1 F2 FS FR3 write
  8159. F1 F2 FS FR2 write
  8160. FMOV FR3,FR5 I D EX NA S
  8161. FMOV FR2,FR4 I D EX NA S
  8162.  
  8163. 3-cycle latency for upper/lower FR
  8164.  
  8165. FLOAT FPUL,DR0 I D F1 F2 FS FR1 write
  8166. FMOV.S FR0,@-R15 d F1 F2 FS FR0 write
  8167. I D EX MA S
  8168.  
  8169. Zero-cycle latency
  8170. 3-cycle increase
  8171.  
  8172. FLDI1 FR3 I D EX NA S
  8173. FIPR FV0,FV4 I D d F0 F1 F2 FS
  8174. 3 stall cycles
  8175.  
  8176. 2-cycle latency
  8177. 1-cycle increase
  8178. I D EX MA S
  8179. FMOV @R1,XD14
  8180. FTRV XMTRX,FV0 I D d F0 F1 F2 FS
  8181. d F0 F1 F2 FS
  8182. 3 stall cycles
  8183. d F0 F1 F2 FS
  8184. d F0 F1 F2 FS
  8185.  
  8186. Figure 8.3 Examples of Pipelined Execution (cont)
  8187.  
  8188. Rev. 2.0, 02/99, page 168 of 830
  8189.  
  8190. ----------------------- Page 183-----------------------
  8191.  
  8192. (e) Flow dependency (cont)
  8193.  
  8194. Effectively 1-cycle latency for consecutive LDS/FLOAT instructions
  8195.  
  8196. I D EX NA S
  8197. LDS R0,FPUL
  8198. FLOAT FPUL,FR0 I D F1 F2 FS
  8199. LDS R1,FPUL I D EX NA S
  8200. FLOAT FPUL,R1 I D F1 F2 FS
  8201.  
  8202. FTRC FR0,FPUL I D F1 F2 FS Effectively 1-cycle latency for consecutive
  8203. STS FPUL,R0 I D EX NA S FTRC/STS instructions
  8204.  
  8205. FTRC FR1,FPUL I D F1 F2 FS
  8206. STS FPUL,R1 I D EX NA S
  8207.  
  8208. (f) Output dependency
  8209.  
  8210. 11-cycle latency
  8211. FSQRT FR4 I D F1 F2 FS
  8212. F3
  8213.  
  8214. F1 F2 FS
  8215.  
  8216. FMOV FR0,FR4 I D F1 F2 FS
  8217. 10 stall cycles = latency (11) - 1
  8218. The registers are written-back
  8219. in program order.
  8220.  
  8221. 7-cycle latency for lower FR
  8222. FADD DR0,DR2 8-cycle latency for upper FR
  8223. I D F1 F2 FS
  8224. d F1 F2 FS
  8225. d F1 F2 FS
  8226. d F1 F2 FS
  8227. d F1 F2 FS FR3 write
  8228. F1 F2 FS FR2 write
  8229. FMOV FR0,FR3 I D EX NA S
  8230. 6 stall cycles = longest latency (8) - 2
  8231.  
  8232. (g) Anti-flow dependency
  8233.  
  8234. FTRV XMTRX,FV0 I D F0 F1 F2 FS
  8235. d F0 F1 F2 FS
  8236. d F0 F1 F2 FS
  8237. d F0 F1 F2 FS
  8238. FMOV @R1,XD0 I D EX MA S
  8239.  
  8240. 5 stall cycles
  8241.  
  8242. FADD DR0,DR2 I D F1 F2 FS
  8243. d F1 F2 FS
  8244. d F1 F2 FS
  8245. d F1 F2 FS
  8246. d F1 F2 FS
  8247. F1 F2 FS
  8248. FMOV FR4,FR1 I D EX NA S
  8249. 2 stall cycles
  8250.  
  8251. Figure 8.3 Examples of Pipelined Execution (cont)
  8252.  
  8253. Rev. 2.0, 02/99, page 169 of 830
  8254.  
  8255. ----------------------- Page 184-----------------------
  8256.  
  8257. (h) Resource conflict
  8258.  
  8259. #1 #2 #3 .................................................. #8 #9 #10 #11 #12
  8260. Latency
  8261. 1 cycle/issue
  8262. FDIV FR6,FR7 I D F1 F2 FS F1 stage locked for 1 cycle
  8263.  
  8264. F3
  8265. F1 F2 FS
  8266.  
  8267. FMAC FR0,FR8,FR9 I D F1 F2 FS
  8268.  
  8269. FMAC FR0,FR10,FR11 I D F1 F2 FS
  8270. .
  8271. .
  8272. . :
  8273. FMAC FR0,FR12,FR13 I D F1 F2 FS
  8274.  
  8275. 1 stall cycle (F1 stage resource conflict)
  8276.  
  8277. FIPR FV8,FV0 I D F0 F1 F2 FS
  8278. FADD FR15,FR4 I D F1 F2 FS
  8279. 1 stall cycle
  8280.  
  8281. LDS.L @R15+,PR I D EX MA FS
  8282. D SX
  8283. SX
  8284. STC GBR,R2 I D SX NA S
  8285. D SX NA S
  8286. 3 stall cycles
  8287.  
  8288. FADD DR0,DR2 I D F1 F2 FS
  8289. d F1 F2 FS
  8290. d F1 F2 FS
  8291. d F1 F2 FS
  8292. d F1 F2 FS
  8293. F1 F2 FS
  8294. MAC.W @R1+,@R2+ I D EX MA S
  8295. 5 stall cycles f1
  8296. D EX
  8297. MA S
  8298. f1
  8299. f1 F2 FS
  8300. f1 F2 FS
  8301.  
  8302. MAC.W @R1+,@R2+ I D EX MA S f1 stage can overlap preceding f1,
  8303. f1 but F1 cannot overlap f1.
  8304.  
  8305. D EX MA S
  8306. f1
  8307. f1 F2 FS
  8308. f1 F2 FS
  8309. MAC.W @R1+,@R2+ I D EX MA S
  8310. 1 stall f1
  8311. cycle D EX MA S
  8312.  
  8313. f1
  8314. f1 F2 FS
  8315. f1 F2 FS
  8316. FADD DR4,DR6 I D F1 F2 FS
  8317. 3 stall cycles 2 stall cycles d F1 F2 FS
  8318.  
  8319. d F1 F2 FS
  8320. d F1 F2 FS
  8321. d F1 F2 FS
  8322. F1
  8323. ...
  8324.  
  8325. Figure 8.3 Examples of Pipelined Execution (cont)
  8326.  
  8327. Rev. 2.0, 02/99, page 170 of 830
  8328.  
  8329. ----------------------- Page 185-----------------------
  8330.  
  8331. Table 8.3 Execution Cycles
  8332.  
  8333. Lock
  8334.  
  8335. Instruc- Execu-
  8336. Functional tion Issue tion
  8337. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8338.  
  8339. Data 1 EXTS.B Rm,Rn EX 1 1 #1 — — —
  8340. transfer
  8341. instructions
  8342.  
  8343. 2 EXTS.W Rm,Rn EX 1 1 #1 — — —
  8344.  
  8345. 3 EXTU.B Rm,Rn EX 1 1 #1 — — —
  8346.  
  8347. 4 EXTU.W Rm,Rn EX 1 1 #1 — — —
  8348.  
  8349. 5 MOV Rm,Rn MT 1 0 #1 — — —
  8350.  
  8351. 6 MOV #imm,Rn EX 1 1 #1 — — —
  8352.  
  8353. 7 MOVA @(disp,PC),R0 EX 1 1 #1 — — —
  8354.  
  8355. 8 MOV.W @(disp,PC),Rn LS 1 2 #2 — — —
  8356.  
  8357. 9 MOV.L @(disp,PC),Rn LS 1 2 #2 — — —
  8358.  
  8359. 10 MOV.B @Rm,Rn LS 1 2 #2 — — —
  8360.  
  8361. 11 MOV.W @Rm,Rn LS 1 2 #2 — — —
  8362.  
  8363. 12 MOV.L @Rm,Rn LS 1 2 #2 — — —
  8364.  
  8365. 13 MOV.B @Rm+,Rn LS 1 1/2 #2 — — —
  8366.  
  8367. 14 MOV.W @Rm+,Rn LS 1 1/2 #2 — — —
  8368.  
  8369. 15 MOV.L @Rm+,Rn LS 1 1/2 #2 — — —
  8370.  
  8371. 16 MOV.B @(disp,Rm),R0 LS 1 2 #2 — — —
  8372.  
  8373. 17 MOV.W @(disp,Rm),R0 LS 1 2 #2 — — —
  8374.  
  8375. 18 MOV.L @(disp,Rm),Rn LS 1 2 #2 — — —
  8376.  
  8377. 19 MOV.B @(R0,Rm),Rn LS 1 2 #2 — — —
  8378.  
  8379. 20 MOV.W @(R0,Rm),Rn LS 1 2 #2 — — —
  8380.  
  8381. 21 MOV.L @(R0,Rm),Rn LS 1 2 #2 — — —
  8382.  
  8383. 22 MOV.B @(disp,GBR),R0 LS 1 2 #3 — — —
  8384.  
  8385. 23 MOV.W @(disp,GBR),R0 LS 1 2 #3 — — —
  8386.  
  8387. 24 MOV.L @(disp,GBR),R0 LS 1 2 #3 — — —
  8388.  
  8389. 25 MOV.B Rm,@Rn LS 1 1 #2 — — —
  8390.  
  8391. 26 MOV.W Rm,@Rn LS 1 1 #2 — — —
  8392.  
  8393. 27 MOV.L Rm,@Rn LS 1 1 #2 — — —
  8394.  
  8395. 28 MOV.B Rm,@-Rn LS 1 1/1 #2 — — —
  8396.  
  8397. 29 MOV.W Rm,@-Rn LS 1 1/1 #2 — — —
  8398.  
  8399. 30 MOV.L Rm,@-Rn LS 1 1/1 #2 — — —
  8400.  
  8401. 31 MOV.B R0,@(disp,Rn) LS 1 1 #2 — — —
  8402.  
  8403. Rev. 2.0, 02/99, page 171 of 830
  8404.  
  8405. ----------------------- Page 186-----------------------
  8406.  
  8407. Table 8.3 Execution Cycles (cont)
  8408.  
  8409. Lock
  8410.  
  8411. Instruc- Execu-
  8412. Functional tion Issue tion
  8413. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8414.  
  8415. Data 32 MOV.W R0,@(disp,Rn) LS 1 1 #2 — — —
  8416. transfer
  8417. instructions
  8418.  
  8419. 33 MOV.L Rm,@(disp,Rn) LS 1 1 #2 — — —
  8420.  
  8421. 34 MOV.B Rm,@(R0,Rn) LS 1 1 #2 — — —
  8422.  
  8423. 35 MOV.W Rm,@(R0,Rn) LS 1 1 #2 — — —
  8424.  
  8425. 36 MOV.L Rm,@(R0,Rn) LS 1 1 #2 — — —
  8426.  
  8427. 37 MOV.B R0,@(disp,GBR) LS 1 1 #3 — — —
  8428.  
  8429. 38 MOV.W R0,@(disp,GBR) LS 1 1 #3 — — —
  8430.  
  8431. 39 MOV.L R0,@(disp,GBR) LS 1 1 #3 — — —
  8432.  
  8433. 40 MOVCA.L R0,@Rn LS 1 3–7 #12 MA 4 3–7
  8434.  
  8435. 41 MOVT Rn EX 1 1 #1 — — —
  8436.  
  8437. 42 OCBI @Rn LS 1 1–2 #10 MA 4 1–2
  8438.  
  8439. 43 OCBP @Rn LS 1 1–5 #11 MA 4 1–5
  8440.  
  8441. 44 OCBWB @Rn LS 1 1–5 #11 MA 4 1–5
  8442.  
  8443. 45 PREF @Rn LS 1 1 #2 — — —
  8444.  
  8445. 46 SWAP.B Rm,Rn EX 1 1 #1 — — —
  8446.  
  8447. 47 SWAP.W Rm,Rn EX 1 1 #1 — — —
  8448.  
  8449. 48 XTRCT Rm,Rn EX 1 1 #1 — — —
  8450.  
  8451. Fixed-point 49 ADD Rm,Rn EX 1 1 #1 — — —
  8452. arithmetic
  8453. instructions
  8454.  
  8455. 50 ADD #imm,Rn EX 1 1 #1 — — —
  8456.  
  8457. 51 ADDC Rm,Rn EX 1 1 #1 — — —
  8458.  
  8459. 52 ADDV Rm,Rn EX 1 1 #1 — — —
  8460.  
  8461. 53 CMP/EQ #imm,R0 MT 1 1 #1 — — —
  8462.  
  8463. 54 CMP/EQ Rm,Rn MT 1 1 #1 — — —
  8464.  
  8465. 55 CMP/GE Rm,Rn MT 1 1 #1 — — —
  8466.  
  8467. 56 CMP/GT Rm,Rn MT 1 1 #1 — — —
  8468.  
  8469. 57 CMP/HI Rm,Rn MT 1 1 #1 — — —
  8470.  
  8471. 58 CMP/HS Rm,Rn MT 1 1 #1 — — —
  8472.  
  8473. 59 CMP/PL Rn MT 1 1 #1 — — —
  8474.  
  8475. 60 CMP/PZ Rn MT 1 1 #1 — — —
  8476.  
  8477. 61 CMP/STR Rm,Rn MT 1 1 #1 — — —
  8478.  
  8479. 62 DIV0S Rm,Rn EX 1 1 #1 — — —
  8480.  
  8481. Rev. 2.0, 02/99, page 172 of 830
  8482.  
  8483. ----------------------- Page 187-----------------------
  8484.  
  8485. Table 8.3 Execution Cycles (cont)
  8486.  
  8487. Lock
  8488.  
  8489. Instruc- Execu-
  8490. Functional tion Issue tion
  8491. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8492.  
  8493. Fixed-point 63 DIV0U EX 1 1 #1 — — —
  8494. arithmetic
  8495. instructions
  8496.  
  8497. 64 DIV1 Rm,Rn EX 1 1 #1 — — —
  8498.  
  8499. 65 DMULS.L Rm,Rn CO 2 4/4 #34 F1 4 2
  8500.  
  8501. 66 DMULU.L Rm,Rn CO 2 4/4 #34 F1 4 2
  8502.  
  8503. 67 DT Rn EX 1 1 #1 — — —
  8504.  
  8505. 68 MAC.L @Rm+,@Rn+ CO 2 2/2/4/4 #35 F1 4 2
  8506.  
  8507. 69 MAC.W @Rm+,@Rn+ CO 2 2/2/4/4 #35 F1 4 2
  8508.  
  8509. 70 MUL.L Rm,Rn CO 2 4/4 #34 F1 4 2
  8510.  
  8511. 71 MULS.W Rm,Rn CO 2 4/4 #34 F1 4 2
  8512.  
  8513. 72 MULU.W Rm,Rn CO 2 4/4 #34 F1 4 2
  8514.  
  8515. 73 NEG Rm,Rn EX 1 1 #1 — — —
  8516.  
  8517. 74 NEGC Rm,Rn EX 1 1 #1 — — —
  8518.  
  8519. 75 SUB Rm,Rn EX 1 1 #1 — — —
  8520.  
  8521. 76 SUBC Rm,Rn EX 1 1 #1 — — —
  8522.  
  8523. 77 SUBV Rm,Rn EX 1 1 #1 — — —
  8524.  
  8525. Logical 78 AND Rm,Rn EX 1 1 #1 — — —
  8526. instructions
  8527.  
  8528. 79 AND #imm,R0 EX 1 1 #1 — — —
  8529.  
  8530. 80 AND.B #imm,@(R0,GBR) CO 4 4 #6 — — —
  8531.  
  8532. 81 NOT Rm,Rn EX 1 1 #1 — — —
  8533.  
  8534. 82 OR Rm,Rn EX 1 1 #1 — — —
  8535.  
  8536. 83 OR #imm,R0 EX 1 1 #1 — — —
  8537.  
  8538. 84 OR.B #imm,@(R0,GBR) CO 4 4 #6 — — —
  8539.  
  8540. 85 TAS.B @Rn CO 5 5 #7 — — —
  8541.  
  8542. 86 TST Rm,Rn MT 1 1 #1 — — —
  8543.  
  8544. 87 TST #imm,R0 MT 1 1 #1 — — —
  8545.  
  8546. 88 TST.B #imm,@(R0,GBR) CO 3 3 #5 — — —
  8547.  
  8548. 89 XOR Rm,Rn EX 1 1 #1 — — —
  8549.  
  8550. 90 XOR #imm,R0 EX 1 1 #1 — — —
  8551.  
  8552. 91 XOR.B #imm,@(R0,GBR) CO 4 4 #6 — — —
  8553.  
  8554. Rev. 2.0, 02/99, page 173 of 830
  8555.  
  8556. ----------------------- Page 188-----------------------
  8557.  
  8558. Table 8.3 Execution Cycles (cont)
  8559.  
  8560. Lock
  8561.  
  8562. Instruc- Execu-
  8563. Functional tion Issue tion
  8564. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8565.  
  8566. Shift 92 ROTL Rn EX 1 1 #1 — — —
  8567. instructions
  8568.  
  8569. 93 ROTR Rn EX 1 1 #1 — — —
  8570.  
  8571. 94 ROTCL Rn EX 1 1 #1 — — —
  8572.  
  8573. 95 ROTCR Rn EX 1 1 #1 — — —
  8574.  
  8575. 96 SHAD Rm,Rn EX 1 1 #1 — — —
  8576.  
  8577. 97 SHAL Rn EX 1 1 #1 — — —
  8578.  
  8579. 98 SHAR Rn EX 1 1 #1 — — —
  8580.  
  8581. 99 SHLD Rm,Rn EX 1 1 #1 — — —
  8582.  
  8583. 100 SHLL Rn EX 1 1 #1 — — —
  8584.  
  8585. 101 SHLL2 Rn EX 1 1 #1 — — —
  8586.  
  8587. 102 SHLL8 Rn EX 1 1 #1 — — —
  8588.  
  8589. 103 SHLL16 Rn EX 1 1 #1 — — —
  8590.  
  8591. 104 SHLR Rn EX 1 1 #1 — — —
  8592.  
  8593. 105 SHLR2 Rn EX 1 1 #1 — — —
  8594.  
  8595. 106 SHLR8 Rn EX 1 1 #1 — — —
  8596.  
  8597. 107 SHLR16 Rn EX 1 1 #1 — — —
  8598.  
  8599. Branch 108 BF disp BR 1 2 (or 1) #1 — — —
  8600. instructions
  8601.  
  8602. 109 BF/S disp BR 1 2 (or 1) #1 — — —
  8603.  
  8604. 110 BT disp BR 1 2 (or 1) #1 — — —
  8605.  
  8606. 111 BT/S disp BR 1 2 (or 1) #1 — — —
  8607.  
  8608. 112 BRA disp BR 1 2 #1 — — —
  8609.  
  8610. 113 BRAF Rn CO 2 3 #4 — — —
  8611.  
  8612. 114 BSR disp BR 1 2 #14 SX 3 2
  8613.  
  8614. 115 BSRF Rn CO 2 3 #24 SX 3 2
  8615.  
  8616. 116 JMP @Rn CO 2 3 #4 — — —
  8617.  
  8618. 117 JSR @Rn CO 2 3 #24 SX 3 2
  8619.  
  8620. 118 RTS CO 2 3 #4 — — —
  8621.  
  8622. Rev. 2.0, 02/99, page 174 of 830
  8623.  
  8624. ----------------------- Page 189-----------------------
  8625.  
  8626. Table 8.3 Execution Cycles (cont)
  8627.  
  8628. Lock
  8629.  
  8630. Instruc- Execu-
  8631. Functional tion Issue tion
  8632. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8633.  
  8634. System 119 NOP MT 1 0 #1 — — —
  8635. control
  8636. instructions
  8637.  
  8638. 120 CLRMAC CO 1 3 #28 F1 3 2
  8639.  
  8640. 121 CLRS CO 1 1 #1 — — —
  8641.  
  8642. 122 CLRT MT 1 1 #1 — — —
  8643.  
  8644. 123 SETS CO 1 1 #1 — — —
  8645.  
  8646. 124 SETT MT 1 1 #1 — — —
  8647.  
  8648. 125 TRAPA #imm CO 7 7 #13 — — —
  8649.  
  8650. 126 RTE CO 5 5 #8 — — —
  8651.  
  8652. 127 SLEEP CO 4 4 #9 — — —
  8653.  
  8654. 128 LDTLB CO 1 1 #2 — — —
  8655.  
  8656. 129 LDC Rm,DBR CO 1 3 #14 SX 3 2
  8657.  
  8658. 130 LDC Rm,GBR CO 3 3 #15 SX 3 2
  8659.  
  8660. 131 LDC Rm,Rp_BANK CO 1 3 #14 SX 3 2
  8661.  
  8662. 132 LDC Rm,SR CO 4 4 #16 SX 3 2
  8663.  
  8664. 133 LDC Rm,SSR CO 1 3 #14 SX 3 2
  8665.  
  8666. 134 LDC Rm,SPC CO 1 3 #14 SX 3 2
  8667.  
  8668. 135 LDC Rm,VBR CO 1 3 #14 SX 3 2
  8669.  
  8670. 136 LDC.L @Rm+,DBR CO 1 1/3 #17 SX 3 2
  8671.  
  8672. 137 LDC.L @Rm+,GBR CO 3 3/3 #18 SX 3 2
  8673.  
  8674. 138 LDC.L @Rm+,Rp_BANK CO 1 1/3 #17 SX 3 2
  8675.  
  8676. 139 LDC.L @Rm+,SR CO 4 4/4 #19 SX 3 2
  8677.  
  8678. 140 LDC.L @Rm+,SSR CO 1 1/3 #17 SX 3 2
  8679.  
  8680. 141 LDC.L @Rm+,SPC CO 1 1/3 #17 SX 3 2
  8681.  
  8682. 142 LDC.L @Rm+,VBR CO 1 1/3 #17 SX 3 2
  8683.  
  8684. 143 LDS Rm,MACH CO 1 3 #28 F1 3 2
  8685.  
  8686. 144 LDS Rm,MACL CO 1 3 #28 F1 3 2
  8687.  
  8688. 145 LDS Rm,PR CO 2 3 #24 SX 3 2
  8689.  
  8690. 146 LDS.L @Rm+,MACH CO 1 1/3 #29 F1 3 2
  8691.  
  8692. 147 LDS.L @Rm+,MACL CO 1 1/3 #29 F1 3 2
  8693.  
  8694. 148 LDS.L @Rm+,PR CO 2 2/3 #25 SX 3 2
  8695.  
  8696. 149 STC DBR,Rn CO 2 2 #20 — — —
  8697.  
  8698. 150 STC SGR,Rn CO 3 3 #21 — — —
  8699.  
  8700. Rev. 2.0, 02/99, page 175 of 830
  8701.  
  8702. ----------------------- Page 190-----------------------
  8703.  
  8704. Table 8.3 Execution Cycles (cont)
  8705.  
  8706. Lock
  8707.  
  8708. Instruc- Execu-
  8709. Functional tion Issue tion
  8710. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8711.  
  8712. System 151 STC GBR,Rn CO 2 2 #20 — — —
  8713. control
  8714. instructions
  8715.  
  8716. 152 STC Rp_BANK,Rn CO 2 2 #20 — — —
  8717.  
  8718. 153 STC SR,Rn CO 2 2 #20 — — —
  8719.  
  8720. 154 STC SSR,Rn CO 2 2 #20 — — —
  8721.  
  8722. 155 STC SPC,Rn CO 2 2 #20 — — —
  8723.  
  8724. 156 STC VBR,Rn CO 2 2 #20 — — —
  8725.  
  8726. 157 STC.L DBR,@-Rn CO 2 2/2 #22 — — —
  8727.  
  8728. 158 STC.L SGR,@-Rn CO 3 3/3 #23 — — —
  8729.  
  8730. 159 STC.L GBR,@-Rn CO 2 2/2 #22 — — —
  8731.  
  8732. 160 STC.L Rp_BANK,@-Rn CO 2 2/2 #22 — — —
  8733.  
  8734. 161 STC.L SR,@-Rn CO 2 2/2 #22 — — —
  8735.  
  8736. 162 STC.L SSR,@-Rn CO 2 2/2 #22 — — —
  8737.  
  8738. 163 STC.L SPC,@-Rn CO 2 2/2 #22 — — —
  8739.  
  8740. 164 STC.L VBR,@-Rn CO 2 2/2 #22 — — —
  8741.  
  8742. 165 STS MACH,Rn CO 1 3 #30 — — —
  8743.  
  8744. 166 STS MACL,Rn CO 1 3 #30 — — —
  8745.  
  8746. 167 STS PR,Rn CO 2 2 #26 — — —
  8747.  
  8748. 168 STS.L MACH,@-Rn CO 1 1/1 #31 — — —
  8749.  
  8750. 169 STS.L MACL,@-Rn CO 1 1/1 #31 — — —
  8751.  
  8752. 170 STS.L PR,@-Rn CO 2 2/2 #27 — — —
  8753.  
  8754. Single- 171 FLDI0 FRn LS 1 0 #1 — — —
  8755. precision
  8756. floating-point
  8757. instructions
  8758.  
  8759. 172 FLDI1 FRn LS 1 0 #1 — — —
  8760.  
  8761. 173 FMOV FRm,FRn LS 1 0 #1 — — —
  8762.  
  8763. 174 FMOV.S @Rm,FRn LS 1 2 #2 — — —
  8764.  
  8765. 175 FMOV.S @Rm+,FRn LS 1 1/2 #2 — — —
  8766.  
  8767. 176 FMOV.S @(R0,Rm),FRn LS 1 2 #2 — — —
  8768.  
  8769. 177 FMOV.S FRm,@Rn LS 1 1 #2 — — —
  8770.  
  8771. 178 FMOV.S FRm,@-Rn LS 1 1/1 #2 — — —
  8772.  
  8773. 179 FMOV.S FRm,@(R0,Rn) LS 1 1 #2 — — —
  8774.  
  8775. 180 FLDS FRm,FPUL LS 1 0 #1 — — —
  8776.  
  8777. 181 FSTS FPUL,FRn LS 1 0 #1 — — —
  8778.  
  8779. Rev. 2.0, 02/99, page 176 of 830
  8780.  
  8781. ----------------------- Page 191-----------------------
  8782.  
  8783. Table 8.3 Execution Cycles (cont)
  8784.  
  8785. Lock
  8786.  
  8787. Instruc- Execu-
  8788. Functional tion Issue tion
  8789. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8790.  
  8791. Single- 182 FABS FRn LS 1 0 #1 — — —
  8792. precision
  8793. floating-point
  8794. instructions
  8795.  
  8796. 183 FADD FRm,FRn FE 1 3/4 #36 — — —
  8797.  
  8798. 184 FCMP/EQ FRm,FRn FE 1 2/4 #36 — — —
  8799.  
  8800. 185 FCMP/GT FRm,FRn FE 1 2/4 #36 — — —
  8801.  
  8802. 186 FDIV FRm,FRn FE 1 12/13 #37 F3 2 10
  8803.  
  8804. F1 11 1
  8805.  
  8806. 187 FLOAT FPUL,FRn FE 1 3/4 #36 — — —
  8807.  
  8808. 188 FMAC FR0,FRm,FRn FE 1 3/4 #36 — — —
  8809.  
  8810. 189 FMUL FRm,FRn FE 1 3/4 #36 — — —
  8811.  
  8812. 190 FNEG FRn LS 1 0 #1 — — —
  8813.  
  8814. 191 FSQRT FRn FE 1 11/12 #37 F3 2 9
  8815.  
  8816. F1 10 1
  8817.  
  8818. 192 FSUB FRm,FRn FE 1 3/4 #36 — — —
  8819.  
  8820. 193 FTRC FRm,FPUL FE 1 3/4 #36 — — —
  8821.  
  8822. 194 FMOV DRm,DRn LS 1 0 #1 — — —
  8823.  
  8824. 195 FMOV @Rm,DRn LS 1 2 #2 — — —
  8825.  
  8826. 196 FMOV @Rm+,DRn LS 1 1/2 #2 — — —
  8827.  
  8828. 197 FMOV @(R0,Rm),DRn LS 1 2 #2 — — —
  8829.  
  8830. 198 FMOV DRm,@Rn LS 1 1 #2 — — —
  8831.  
  8832. 199 FMOV DRm,@-Rn LS 1 1/1 #2 — — —
  8833.  
  8834. 200 FMOV DRm,@(R0,Rn) LS 1 1 #2 — — —
  8835.  
  8836. Double- 201 FABS DRn LS 1 0 #1 — — —
  8837. precision
  8838. floating-point
  8839. instructions
  8840.  
  8841. 202 FADD DRm,DRn FE 1 (7, 8)/9 #39 F1 2 6
  8842.  
  8843. 203 FCMP/EQ DRm,DRn CO 2 3/5 #40 F1 2 2
  8844.  
  8845. 204 FCMP/GT DRm,DRn CO 2 3/5 #40 F1 2 2
  8846.  
  8847. 205 FCNVDS DRm,FPUL FE 1 4/5 #38 F1 2 2
  8848.  
  8849. 206 FCNVSD FPUL,DRn FE 1 (3, 4)/5 #38 F1 2 2
  8850.  
  8851. 207 FDIV DRm,DRn FE 1 (24, 25)/ #41 F3 2 23
  8852. 26
  8853.  
  8854. F1 22 3
  8855.  
  8856. F1 2 2
  8857.  
  8858. 208 FLOAT FPUL,DRn FE 1 (3, 4)/5 #38 F1 2 2
  8859.  
  8860. 209 FMUL DRm,DRn FE 1 (7, 8)/9 #39 F1 2 6
  8861.  
  8862. Rev. 2.0, 02/99, page 177 of 830
  8863.  
  8864. ----------------------- Page 192-----------------------
  8865.  
  8866. Table 8.3 Execution Cycles (cont)
  8867.  
  8868. Lock
  8869.  
  8870. Instruc- Execu-
  8871. Functional tion Issue tion
  8872. Category No. Instruction Group Rate Latency Pattern Stage Start Cycles
  8873.  
  8874. Double- 210 FNEG DRn LS 1 0 #1 — — —
  8875. precision
  8876. floating-point
  8877. instructions
  8878.  
  8879. 211 FSQRT DRn FE 1 (23, 24)/ #41 F3 2 22
  8880. 25
  8881.  
  8882. F1 21 3
  8883.  
  8884. F1 2 2
  8885.  
  8886. 212 FSUB DRm,DRn FE 1 (7, 8)/9 #39 F1 2 6
  8887.  
  8888. 213 FTRC DRm,FPUL FE 1 4/5 #38 F1 2 2
  8889.  
  8890. FPU system 214 LDS Rm,FPUL LS 1 1 #1 — — —
  8891. control
  8892. instructions
  8893.  
  8894. 215 LDS Rm,FPSCR CO 1 4 #32 F1 3 3
  8895.  
  8896. 216 LDS.L @Rm+,FPUL CO 1 1/2 #2 — — —
  8897.  
  8898. 217 LDS.L @Rm+,FPSCR CO 1 1/4 #33 F1 3 3
  8899.  
  8900. 218 STS FPUL,Rn LS 1 3 #1 — — —
  8901.  
  8902. 219 STS FPSCR,Rn CO 1 3 #1 — — —
  8903.  
  8904. 220 STS.L FPUL,@-Rn CO 1 1/1 #2 — — —
  8905.  
  8906. 221 STS.L FPSCR,@-Rn CO 1 1/1 #2 — — —
  8907.  
  8908. Graphics 222 FMOV DRm,XDn LS 1 0 #1 — — —
  8909. acceleration
  8910. instructions
  8911.  
  8912. 223 FMOV XDm,DRn LS 1 0 #1 — — —
  8913.  
  8914. 224 FMOV XDm,XDn LS 1 0 #1 — — —
  8915.  
  8916. 225 FMOV @Rm,XDn LS 1 2 #2 — — —
  8917.  
  8918. 226 FMOV @Rm+,XDn LS 1 1/2 #2 — — —
  8919.  
  8920. 227 FMOV @(R0,Rm),XDn LS 1 2 #2 — — —
  8921.  
  8922. 228 FMOV XDm,@Rn LS 1 1 #2 — — —
  8923.  
  8924. 229 FMOV XDm,@-Rm LS 1 1/1 #2 — — —
  8925.  
  8926. 230 FMOV XDm,@(R0,Rn) LS 1 1 #2 — — —
  8927.  
  8928. 231 FIPR FVm,FVn FE 1 4/5 #42 F1 3 1
  8929.  
  8930. 232 FRCHG FE 1 1/4 #36 — — —
  8931.  
  8932. 233 FSCHG FE 1 1/4 #36 — — —
  8933.  
  8934. 234 FTRV XMTRX,FVn FE 1 (5, 5, 6, #43 F0 2 4
  8935. 7)/8
  8936.  
  8937. F1 3 4
  8938.  
  8939. Notes: 1. See table 8.1 for the instruction groups.
  8940. 2. Latency “L1/L2...”: Latency corresponding to a write to each register, including
  8941. MACH/MACL/FPSCR.
  8942. Example: MOV.B @Rm+, Rn “1/2”: The latency for Rm is 1 cycle, and the latency for
  8943. Rn is 2 cycles.
  8944. Rev. 2.0, 02/99, page 178 of 830
  8945.  
  8946. ----------------------- Page 193-----------------------
  8947.  
  8948. 3. Branch latency: Interval until the branch destination instruction is fetched
  8949. 4. Conditional branch latency “2 (or 1)”: The latency is 2 for a nonzero displacement, and
  8950. 1 for a zero displacement.
  8951. 5. Double-precision floating-point instruction latency “(L1, L2)/L3”: L1 is the latency for
  8952. FR [n+1], L2 that for FR [n], and L3 that for FPSCR.
  8953. 6. FTRV latency “(L1, L2, L3, L4)/L5”: L1 is the latency for FR [n], L2 that for FR [n+1],
  8954. L3 that for FR [n+2], L4 that for FR [n+3], and L5 that for FPSCR.
  8955. 7. Latency “L1/L2/L3/L4” of MAC.L and MAC.W instructions: L1 is the latency for Rm, L2
  8956. that for Rn, L3 that for MACH, and L4 that for MACL.
  8957. 8. Latency “L1/L2” of MUL.L, MULS.W, MULU.W, DMULS.L, and DMULU.L instructions:
  8958. L1 is the latency for MACH, and L2 that for MACL.
  8959. 9. Execution pattern: The instruction execution pattern number (see figure 8.2)
  8960. 10. Lock/stage: Stage locked by the instruction
  8961. 11. Lock/start: Locking start cycle; 1 is the first D-stage of the instruction.
  8962. 12. Lock/cycles: Number of cycles locked
  8963. Exceptions:
  8964. 1. When a floating-point computation instruction is followed by an FMOV store, an STS
  8965. FPUL, Rn instruction, or an STS.L FPUL, @-Rn instruction, the latency of the floating-
  8966. point computation is decreased by 1 cycle.
  8967. 2. When the preceding instruction loads the shift amount of the following SHAD/SHLD,
  8968. the latency of the load is increased by 1 cycle.
  8969. 3. When an LS group instruction with a latency of less than 3 cycles is followed by a
  8970. double-precision floating-point instruction, FIPR, or FTRV, the latency of the first
  8971. instruction is increased to 3 cycles.
  8972. Example: In the case of FMOV FR4,FR0 and FIPR FV0,FV4, FIPR is stalled for 2
  8973. cycles.
  8974. 4. When MAC*/MUL*/DMUL* is followed by an STS.L MAC*, @-Rn instruction, the
  8975. latency of MAC*/MUL*/DMUL* is 5 cycles.
  8976. 5. In the case of consecutive executions of MAC*/MUL*/DMUL*, the latency is decreased
  8977. to 2 cycles.
  8978. 6. When an LDS to MAC* is followed by an STS.L MAC*, @-Rn instruction, the latency
  8979. of the LDS to MAC* is 4 cycles.
  8980. 7. When an LDS to MAC* is followed by MAC*/MUL*/DMUL*, the latency of the LDS to
  8981. MAC* is 1 cycle.
  8982. 8. When an FSCHG or FRCHG instruction is followed by an LS group instruction that
  8983. reads or writes to a floating-point register, the aforementioned LS group instruction[s]
  8984. cannot be executed in parallel.
  8985. 9. When a single-precision FTRC instruction is followed by an STS FPUL, Rn instruction,
  8986. the latency of the single-precision FTRC instruction is 1 cycle.
  8987.  
  8988. Rev. 2.0, 02/99, page 179 of 830
  8989.  
  8990. ----------------------- Page 194-----------------------
  8991.  
  8992. Rev. 2.0, 02/99, page 180 of 830
  8993.  
  8994. ----------------------- Page 195-----------------------
  8995.  
  8996. Section 9 Power-Down Modes
  8997.  
  8998. 9.1 Overview
  8999.  
  9000. In the power-down modes, some of the on-chip peripheral modules and the CPU functions are
  9001. halted, enabling power consumption to be reduced.
  9002.  
  9003. 9.1.1 Types of Power-Down Modes
  9004.  
  9005. The following power-down modes and functions are provided:
  9006.  
  9007. • Sleep mode
  9008. • Deep sleep mode
  9009. • Standby mode
  9010. • Module standby function (TMU, RTC, SCI/SCIF, and DMAC on-chip peripheral modules)
  9011.  
  9012. Table 9.1 shows the conditions for entering these modes from the program execution state, the
  9013. status of the CPU and peripheral modules in each mode, and the method of exiting each mode.
  9014.  
  9015. Rev. 2.0, 02/99, page 181 of 830
  9016.  
  9017. ----------------------- Page 196-----------------------
  9018.  
  9019. Table 9.1 Status of CPU and Peripheral Modules in Power-Down Modes
  9020.  
  9021. Status
  9022.  
  9023. Power- On-chip
  9024. Down Entering On-Chip Peripheral External Exiting
  9025. Mode Conditions CPG CPU Memory Modules Pins Memory Method
  9026.  
  9027. Sleep SLEEP Operating Halted Held Operating Held Refreshing • Interrupt
  9028. instruction (registers • Reset
  9029. executed held)
  9030. while STBY
  9031. bit is 0 in
  9032. STBCR
  9033.  
  9034. Deep SLEEP Operating Halted Held Operating Held Self- • Interrupt
  9035. sleep instruction (registers (DMA refreshing • Reset
  9036. executed held) halted)
  9037. while STBY
  9038. bit is 0 in
  9039. STBCR,
  9040. and DSLP
  9041. bit is 1 in
  9042. STBCR2
  9043.  
  9044. Standby SLEEP Halted Halted Held Halted* Held Self- • Interrupt
  9045. instruction (registers refreshing • Reset
  9046. executed held)
  9047. while STBY
  9048. bit is 1 in
  9049. STBCR
  9050.  
  9051. Module Setting Operating Operating Held Specified Held Refreshing • Clearing
  9052. standby MSTP bit to modules MSTP bit
  9053. 1 in STBCR halted*
  9054. to 0
  9055.  
  9056. • Reset
  9057.  
  9058. Note: The RTC operates when the START bit in RCR2 is 1 (see section 11, Realtime Clock
  9059. (RTC)).
  9060.  
  9061. Rev. 2.0, 02/99, page 182 of 830
  9062.  
  9063. ----------------------- Page 197-----------------------
  9064.  
  9065. 9.1.2 Register Configuration
  9066.  
  9067. Table 9.2 shows the registers used for power-down mode control.
  9068.  
  9069. Table 9.2 Power-Down Mode Registers
  9070.  
  9071. Initial Area 7 Access
  9072. Name Abbreviation R/W Value P4 Address Address Size
  9073.  
  9074. Standby control register STBCR R/W H'00 H'FFC00004 H'1FC00004 8
  9075.  
  9076. Standby control register 2 STBCR2 R/W H'00 H'FFC00010 H'1FC00010 8
  9077.  
  9078. 9.1.3 Pin Configuration
  9079.  
  9080. Table 9.3 shows the pins used for power-down mode control.
  9081.  
  9082. Table 9.3 Power-Down Mode Pins
  9083.  
  9084. Pin Name Abbreviation I/O Function
  9085.  
  9086. Processor status 1 STATUS1 Output Indicate the processor’s operating status.
  9087.  
  9088. Processor status 0 STATUS0 HH: Reset
  9089. HL: Sleep mode
  9090. LH: Standby mode
  9091. LL: Normal operation
  9092.  
  9093. Note: H: High level
  9094. L: Low level
  9095.  
  9096. 9.2 Register Descriptions
  9097.  
  9098. 9.2.1 Standby Control Register (STBCR)
  9099.  
  9100. The standby control register (STBCR) is an 8-bit readable/writable register that specifies the
  9101. power-down mode status. It is initialized to H'00 by a power-on reset via the 5(6(7 pin or due
  9102. to watchdog timer overflow.
  9103.  
  9104. Bit: 7 6 5 4 3 2 1 0
  9105.  
  9106. STBY PHZ PPU MSTP4 MSTP3 MSTP2 MSTP1 MSTP0
  9107.  
  9108. Initial value: 0 0 0 0 0 0 0 0
  9109.  
  9110. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  9111.  
  9112. Rev. 2.0, 02/99, page 183 of 830
  9113.  
  9114. ----------------------- Page 198-----------------------
  9115.  
  9116. Bit 7—Standby (STBY): Specifies a transition to standby mode.
  9117.  
  9118. Bit 7: STBY Description
  9119.  
  9120. 0 Transition to sleep mode on execution of SLEEP instruction (Initial value)
  9121.  
  9122. 1 Transition to standby mode on execution of SLEEP instruction
  9123.  
  9124. Bit 6—Peripheral Module Pin High Impedance Control (PHZ): Controls the state of
  9125. peripheral module related pins in standby mode. When the PHZ bit is set to 1, peripheral module
  9126. related pins go to the high-impedance state in standby mode.
  9127.  
  9128. For the relevant pins, see section 9.2.2, Peripheral Module Pin High Impedance Control.
  9129.  
  9130. Bit 6: PHZ Description
  9131.  
  9132. 0 Peripheral module related pins are in normal state (Initial value)
  9133.  
  9134. 1 Peripheral module related pins go to high-impedance state
  9135.  
  9136. Bit 5—Peripheral Module Pin Pull-Up Control (PPU): Controls the state of peripheral
  9137. module related pins. When the PPU bit is cleared to 0, the pull-up resistor is turned on for
  9138. peripheral module related pins in the input or high-impedance state.
  9139.  
  9140. For the relevant pins, see section 9.2.3, Peripheral Module Pin Pull-Up Control.
  9141.  
  9142. Bit 5: PPU Description
  9143.  
  9144. 0 Peripheral module related pin pull-up resistors are on (Initial value)
  9145.  
  9146. 1 Peripheral module related pin pull-up resistors are off
  9147.  
  9148. Bit 4—Module Stop 4 (MSTP4): Specifies stopping of the clock supply to the DMAC among
  9149. the on-chip peripheral modules. The clock supply to the DMAC is stopped when the MSTP4 bit
  9150. is set to 1. When DMA transfer is used, stop the transfer before setting the MSTP4 bit to 1.
  9151. When DMA transfer is performed after clearing the MSTP4 bit to 0, DMAC settings must be
  9152. made again.
  9153.  
  9154. Bit 4: MSTP4 Description
  9155.  
  9156. 0 DMAC operates (Initial value)
  9157.  
  9158. 1 DMAC clock supply is stopped
  9159.  
  9160. Rev. 2.0, 02/99, page 184 of 830
  9161.  
  9162. ----------------------- Page 199-----------------------
  9163.  
  9164. Bit 3—Module Stop 3 (MSTP3): Specifies stopping of the clock supply to serial
  9165. communication interface channel 2 (SCIF) among the on-chip peripheral modules. The clock
  9166. supply to the SCIF is stopped when the MSTP3 bit is set to 1.
  9167.  
  9168. Bit 3: MSTP3 Description
  9169.  
  9170. 0 SCIF operates (Initial value)
  9171.  
  9172. 1 SCIF clock supply is stopped
  9173.  
  9174. Bit 2—Module Stop 2 (MSTP2): Specifies stopping of the clock supply to the timer unit
  9175. (TMU) among the on-chip peripheral modules. The clock supply to the TMU is stopped when
  9176. the MSTP2 bit is set to 1.
  9177.  
  9178. Bit 2: MSTP2 Description
  9179.  
  9180. 0 TMU operates (Initial value)
  9181.  
  9182. 1 TMU clock supply is stopped
  9183.  
  9184. Bit 1—Module Stop 1 (MSTP1): Specifies stopping of the clock supply to the realtime clock
  9185. (RTC) among the on-chip peripheral modules. The clock supply to the RTC is stopped when the
  9186. MSTP1 bit is set to 1. When the clock supply is stopped, RTC registers cannot be accessed but
  9187. the counters continue to operate.
  9188.  
  9189. Bit 1: MSTP1 Description
  9190.  
  9191. 0 RTC operates (Initial value)
  9192.  
  9193. 1 RTC clock supply is stopped
  9194.  
  9195. Bit 0—Module Stop 0 (MSTP0): Specifies stopping of the clock supply to serial
  9196. communication interface channel 1 (SCI) among the on-chip peripheral modules. The clock
  9197. supply to the SCI is stopped when the MSTP0 bit is set to 1.
  9198.  
  9199. Bit 0: MSTP0 Description
  9200.  
  9201. 0 SCI operates (Initial value)
  9202.  
  9203. 1 SCI clock supply is stopped
  9204.  
  9205. Rev. 2.0, 02/99, page 185 of 830
  9206.  
  9207. ----------------------- Page 200-----------------------
  9208.  
  9209. 9.2.2 Peripheral Module Pin High Impedance Control
  9210.  
  9211. When bit 6 in the standby control register (STBCR) is set to 1, peripheral module related pins go
  9212. to the high-impedance state in standby mode.
  9213.  
  9214. • Relevant Pins
  9215.  
  9216. SCI related pins MD0/SCK MD1/TXD2
  9217.  
  9218. MD7/TXD MD8/RTS2
  9219.  
  9220. CTS2
  9221.  
  9222. DMA related pins DACK0 DRAK0
  9223.  
  9224. DACK1 DRAK1
  9225.  
  9226. • Other Information
  9227. High impedance control is not performed when the above pins are used as port output pins.
  9228.  
  9229. 9.2.3 Peripheral Module Pin Pull-Up Control
  9230.  
  9231. When bit 5 in the standby control register (STBCR) is cleared to 0, peripheral module related
  9232. pins are pulled up when in the input or high-impedance state.
  9233.  
  9234. • Relevant Pins
  9235.  
  9236. SCI related pins MD0/SCK MD1/TXD2 MD2/RXD2
  9237.  
  9238. MD7/TXD MD8/RTS2 SCK2/05(6(7
  9239.  
  9240. RXD CTS2
  9241.  
  9242. DMA related pins '5(4 DACK0 DRAK0
  9243.  
  9244. '5(4 DACK1 DRAK1
  9245.  
  9246. TMU related pin TCLK
  9247.  
  9248. Rev. 2.0, 02/99, page 186 of 830
  9249.  
  9250. ----------------------- Page 201-----------------------
  9251.  
  9252. 9.2.4 Standby Control Register 2 (STBCR2)
  9253.  
  9254. Standby control register 2 (STBCR2) is an 8-bit readable/writable register that specifies the
  9255. sleep mode and deep sleep mode transition conditions. It is initialized to H'00 by a power-on
  9256. reset via the 5(6(7 pin or due to watchdog timer overflow.
  9257.  
  9258. Bit: 7 6 5 4 3 2 1 0
  9259.  
  9260. DSLP — — — — — — —
  9261.  
  9262. Initial value: 0 0 0 0 0 0 0 0
  9263.  
  9264. R/W: R/W R R R R R R R
  9265.  
  9266. Bit 7—Deep Sleep (DSLP): Specifies a transition to deep sleep mode
  9267.  
  9268. Bit 7: DSLP Description
  9269.  
  9270. 0 Transition to sleep mode or standby mode on execution of SLEEP
  9271. instruction, according to setting of STBY bit in STBCR register(Initial value)
  9272.  
  9273. 1 Transition to deep sleep mode on execution of SLEEP instruction*
  9274.  
  9275. Note: * When the STBY bit in the STBCR register is 0
  9276.  
  9277. Bits 6 to 0—Reserved: Only 0 should only be written to these bits; operation cannot be
  9278. guaranteed if 1 is written. These bits are always read as 0.
  9279.  
  9280. Rev. 2.0, 02/99, page 187 of 830
  9281.  
  9282. ----------------------- Page 202-----------------------
  9283.  
  9284. 9.3 Sleep Mode
  9285.  
  9286. 9.3.1 Transition to Sleep Mode
  9287.  
  9288. If a SLEEP instruction is executed when the STBY bit in STBCR is cleared to 0, the chip
  9289. switches from the program execution state to sleep mode. After execution of the SLEEP
  9290. instruction, the CPU halts but its register contents are retained. The on-chip peripheral modules
  9291. continue to operate, and the clock continues to be output from the CKIO pin.
  9292.  
  9293. In sleep mode, a high-level signal is output at the STATUS1 pin, and a low-level signal at the
  9294. STATUS0 pin.
  9295.  
  9296. 9.3.2 Exit from Sleep Mode
  9297.  
  9298. Sleep mode is exited by means of an interrupt (NMI, IRL, or on-chip peripheral module) or a
  9299. reset. In sleep mode, interrupts are accepted even if the BL bit in the SR register is 1. If
  9300. necessary, SPC and SSR should be saved to the stack before executing the SLEEP instruction.
  9301.  
  9302. Exit by Interrupt: When an NMI, IRL, or on-chip peripheral module interrupt is generated,
  9303. sleep mode is exited and interrupt exception handling is executed. The code corresponding to the
  9304. interrupt source is set in the INTEVT register.
  9305.  
  9306. Exit by Reset: Sleep mode is exited by means of a power-on or manual reset via the 5(6(7
  9307. pin, or a power-on or manual reset executed when the watchdog timer overflows.
  9308.  
  9309. 9.4 Deep Sleep Mode
  9310.  
  9311. 9.4.1 Transition to Deep Sleep Mode
  9312.  
  9313. If a SLEEP instruction is executed when the STBY bit in STBCR is cleared to 0 and the DSLP
  9314. bit in STBCR2 is set to 1, the chip switches from the program execution state to deep sleep
  9315. mode. After execution of the SLEEP instruction, the CPU halts but its register contents are
  9316. retained. Except for the DMAC, on-chip peripheral modules continue to operate, and the clock
  9317. continues to be output from the CKIO pin.
  9318.  
  9319. In deep sleep mode, a high-level signal is output at the STATUS1 pin, and a low-level signal at
  9320. the STATUS0 pin.
  9321.  
  9322. 9.4.2 Exit from Deep Sleep Mode
  9323.  
  9324. As with sleep mode, deep sleep mode is exited by means of an interrupt (NMI, IRL, or on-chip
  9325. peripheral module) or a reset.
  9326.  
  9327. Rev. 2.0, 02/99, page 188 of 830
  9328.  
  9329. ----------------------- Page 203-----------------------
  9330.  
  9331. 9.5 Standby Mode
  9332.  
  9333. 9.5.1 Transition to Standby Mode
  9334.  
  9335. If a SLEEP instruction is executed when the STBY bit in STBCR is set to 1, the chip switches
  9336. from the program execution state to standby mode. In standby mode, the on-chip peripheral
  9337. modules halt as well as the CPU. Clock output from the CKIO pin is also stopped.
  9338.  
  9339. The CPU and cache register contents are retained. Some on-chip peripheral module registers are
  9340. initialized. The state of the peripheral module registers in standby mode is shown in table 9.4.
  9341.  
  9342. Table 9.4 State of Registers in Standby Mode
  9343.  
  9344. Registers That Retain
  9345. Module Initialized Registers Their Contents
  9346.  
  9347. Interrupt controller — All registers
  9348.  
  9349. User break controller — All registers
  9350.  
  9351. Bus state controller — All registers
  9352.  
  9353. On-chip oscillation circuits — All registers
  9354.  
  9355. Timer unit TSTR register* All registers except TSTR
  9356.  
  9357. Realtime clock — All registers
  9358.  
  9359. Direct memory access controller — All registers
  9360.  
  9361. Serial communication interface See Appendix A, Address List See Appendix A, Address
  9362. List
  9363.  
  9364. Note: * Not initialized when the realtime clock (RTC) is in use (see section 12, Timer Unit
  9365. (TMU)).
  9366. Note: DMA transfer should be terminated before making a transition to standby mode. Transfer
  9367. results are not guaranteed if standby mode is entered during transfer.
  9368.  
  9369. The procedure for a transition to standby mode is shown below.
  9370.  
  9371. 1. Clear the TME bit in the WDT timer control register (WTCSR) to 0, and stop the WDT.
  9372. Set the initial value for the up-count in the WDT timer counter (WTCNT), and set the clock
  9373. to be used for the up-count in bits CKS2–CKS0 in the WTCSR register.
  9374. 2. Set the STBY bit in the STBCR register to 1, then execute a SLEEP instruction.
  9375. 3. When standby mode is entered and the chip’s internal clock stops, a low-level signal is
  9376. output at the STATUS1 pin, and a high-level signal at the STATUS0 pin.
  9377.  
  9378. Rev. 2.0, 02/99, page 189 of 830
  9379.  
  9380. ----------------------- Page 204-----------------------
  9381.  
  9382. 9.5.2 Exit from Standby Mode
  9383.  
  9384. Standby mode is exited by means of an interrupt (NMI, IRL, or on-chip peripheral module) or a
  9385. reset via the 5(6(7 pin.
  9386.  
  9387. Exit by Interrupt: A hot start can be performed by means of the on-chip WDT. When an NMI,
  9388. IRL*1, or on-chip peripheral module (except interval timer)*2 interrupt is detected, the WDT
  9389.  
  9390. starts counting. After the count overflows, clocks are supplied to the entire chip, standby mode is
  9391. exited, and the STATUS1 and STATUS0 pins both go low. Interrupt exception handling is then
  9392. executed, and the code corresponding to the interrupt source is set in the INTEVT register. In
  9393. standby mode, interrupts are accepted even if the BL bit in the SR register is 1, and so, if
  9394. necessary, SPC and SSR should be saved to the stack before executing the SLEEP instruction.
  9395.  
  9396. The phase of the CKIO pin clock output may be unstable immediately after an interrupt is
  9397. detected, until standby mode is exited.
  9398.  
  9399. Notes: 1. Only when the RTC clock (32.768 kHz) is operating (see section 19.2.2, IRL
  9400. Interrupts), standby mode can be exited by means of IRL3–IRL0 (when the IRL3–
  9401. IRL0 level is higher than the SR register I3–I0 mask level).
  9402. 2. Standby mode can be exited by means of an RTC interrupt.
  9403.  
  9404. Exit by Reset: Standby mode is exited by means of a reset (power-on or manual) via the 5(6(7
  9405. pin. The 5(6(7 pin should be held low until clock oscillation stabilizes. The internal clock
  9406. continues to be output at the CKIO pin.
  9407.  
  9408. 9.5.3 Clock Pause Function
  9409.  
  9410. In standby mode, it is possible to stop or change the frequency of the clock input from the
  9411. EXTAL pin. This function is used as follows.
  9412.  
  9413. 1. Enter standby mode following the transition procedure described above.
  9414. 2. When standby mode is entered and the chip’s internal clock stops, a low-level signal is
  9415. output at the STATUS1 pin, and a high-level signal at the STATUS0 pin.
  9416. 3. The input clock is stopped, or its frequency changed, after the STATUS1 pin goes low and
  9417. the STATUS0 pin high.
  9418. 4. When the frequency is changed, input an NMI or IRL interrupt after the change. When the
  9419. clock is stopped, input an NMI or IRL interrupt after applying the clock.
  9420. 5. After the time set in the WDT, clock supply begins inside the chip, the STATUS1 and
  9421. STATUS0 pins both go low, and operation is resumed from interrupt exception handling.
  9422.  
  9423. Rev. 2.0, 02/99, page 190 of 830
  9424.  
  9425. ----------------------- Page 205-----------------------
  9426.  
  9427. 9.6 Module Standby Function
  9428.  
  9429. 9.6.1 Transition to Module Standby Function
  9430.  
  9431. Setting the MSTP4–MSTP0 bits in the standby control register to 1 enables the clock supply to
  9432. the corresponding on-chip peripheral modules to be halted. Use of this function allows power
  9433. consumption in sleep mode to be further reduced.
  9434.  
  9435. In the module standby state, the on-chip peripheral module external pins retain their states prior
  9436. to halting of the modules, and most registers retain their states prior to halting of the modules.
  9437.  
  9438. Bit Description
  9439.  
  9440. MSTP4 0 DMAC operates
  9441.  
  9442. 1 Clock supplied to DMAC is stopped
  9443.  
  9444. MSTP3 0 SCIF operates
  9445.  
  9446. 1 Clock supplied to SCIF is stopped
  9447.  
  9448. MSTP2 0 TMU operates
  9449. 1 Clock supplied to TMU is stopped, and register is initialized*1
  9450.  
  9451. MSTP1 0 RTC operates
  9452.  
  9453. 2
  9454. 1 Clock supplied to RTC is stopped*
  9455.  
  9456. MSTP0 0 SCI operates
  9457.  
  9458. 1 Clock supplied to SCI is stopped
  9459.  
  9460. Notes: 1. The register initialized is the same as in standby mode, but initialization is not
  9461. performed if the RTC clock is not in use (see section 12, Timer Unit (TMU)).
  9462. 2. The counter operates when the START bit in RCR2 is 1 (see section 11, Realtime
  9463. Clock (RTC)).
  9464.  
  9465. 9.6.2 Exit from Module Standby Function
  9466.  
  9467. The module standby function is exited by clearing the MSTP4–MSTP0 bits to 0, or by a power-
  9468. on reset via the 5(6(7 pin or a power-on reset caused by watchdog timer overflow.
  9469.  
  9470. Rev. 2.0, 02/99, page 191 of 830
  9471.  
  9472. ----------------------- Page 206-----------------------
  9473.  
  9474. 9.7 STATUS Pin Change Timing
  9475.  
  9476. The STATUS1 and STATUS0 pin change timing is shown below.
  9477.  
  9478. The meaning of the STATUS pin settings is as follows:
  9479.  
  9480. Reset: HH (STATUS1 high, STATUS0 high)
  9481. Sleep: HL (STATUS1 high, STATUS0 low)
  9482. Standby: LH (STATUS1 low, STATUS0 high)
  9483. Normal: LL (STATUS1 low, STATUS0 low)
  9484.  
  9485. The meaning of the clock units is as follows:
  9486.  
  9487. Bcyc: Bus clock cycle
  9488. Pcyc: Peripheral clock cycle
  9489.  
  9490. 9.7.1 In Reset
  9491.  
  9492. Power-On Reset
  9493.  
  9494. CKIO
  9495.  
  9496. PLL stabilization
  9497. time
  9498. RESET
  9499.  
  9500. SCK2
  9501.  
  9502. STATUS Normal Reset Normal
  9503.  
  9504.  
  9505. 0–30 Bcyc
  9506. 0–5 Bcyc
  9507.  
  9508. Figure 9.1 STATUS Output in Power-On Reset
  9509.  
  9510. Rev. 2.0, 02/99, page 192 of 830
  9511.  
  9512. ----------------------- Page 207-----------------------
  9513.  
  9514. Manual Reset
  9515.  
  9516. CKIO
  9517.  
  9518. RESET*
  9519.  
  9520. SCK2
  9521.  
  9522. STATUS Normal Reset Normal
  9523.  
  9524. 0–30 Bcyc
  9525. ≥ 0 Bcyc
  9526.  
  9527. Note: * In a manual reset, STATUS = HH (reset) is set and an internal reset started after waiting
  9528. until the end of the currently executing bus cycle.
  9529.  
  9530. Figure 9.2 STATUS Output in Manual Reset
  9531.  
  9532. 9.7.2 In Exit from Standby Mode
  9533.  
  9534. Standby →→ Interrupt
  9535.  
  9536. Oscillation stops Interrupt request WDT overflow
  9537.  
  9538. CKIO
  9539.  
  9540. WDT count
  9541.  
  9542. STATUS Normal Standby Normal
  9543.  
  9544. Figure 9.3 STATUS Output in Standby →→ Interrupt Sequence
  9545.  
  9546. Rev. 2.0, 02/99, page 193 of 830
  9547.  
  9548. ----------------------- Page 208-----------------------
  9549.  
  9550. Standby →→ Power-On Reset
  9551.  
  9552. Oscillation stops Reset
  9553.  
  9554. CKIO
  9555.  
  9556. RESET*1
  9557.  
  9558. SCK2
  9559.  
  9560. STATUS Normal Standby *2 Reset Normal
  9561.  
  9562. 0–30 Bcyc
  9563. 0–10 Bcyc
  9564.  
  9565. Notes: 1. When standby mode is exited by means of a power-on reset, a WDT count is not
  9566. performed. Hold RESET low for the PLL oscillation stabilization time.
  9567. 2. Undefined
  9568.  
  9569. Figure 9.4 STATUS Output in Standby →→ Power-On Reset Sequence
  9570.  
  9571. Rev. 2.0, 02/99, page 194 of 830
  9572.  
  9573. ----------------------- Page 209-----------------------
  9574.  
  9575. Standby →→ Manual Reset
  9576.  
  9577. Oscillation stops Reset
  9578.  
  9579. CKIO
  9580.  
  9581. RESET*
  9582.  
  9583. SCK2
  9584.  
  9585. STATUS Normal Standby Reset Normal
  9586.  
  9587. 0–30 0–20 Bcyc
  9588. Bcyc
  9589. Note: * When standby mode is exited by means of a manual reset, a WDT count is not performed.
  9590. Hold RESET low for the PLL oscillation stabilization time.
  9591.  
  9592. Figure 9.5 STATUS Output in Standby →→ Manual Reset Sequence
  9593.  
  9594. 9.7.3 In Exit from Sleep Mode
  9595.  
  9596. Sleep →→ Interrupt
  9597.  
  9598. Interrupt request
  9599.  
  9600. CKIO
  9601.  
  9602. STATUS Normal Sleep Normal
  9603.  
  9604. Figure 9.6 STATUS Output in Sleep →→ Interrupt Sequence
  9605.  
  9606. Rev. 2.0, 02/99, page 195 of 830
  9607.  
  9608. ----------------------- Page 210-----------------------
  9609.  
  9610. Sleep →→ Power-On Reset
  9611.  
  9612. Reset
  9613.  
  9614. CKIO
  9615.  
  9616. RESET*1
  9617.  
  9618. SCK2
  9619.  
  9620. STATUS Normal Sleep *2 Reset Normal
  9621.  
  9622. 0–30 Bcyc
  9623. 0–10 Bcyc
  9624.  
  9625. Notes: 1. When sleep mode is exited by means of a power-on reset, hold RESET low for the
  9626. oscillation stabilization time.
  9627. 2. Undefined
  9628.  
  9629.  
  9630. Figure 9.7 STATUS Output in Sleep →→ Power-On Reset Sequence
  9631.  
  9632. Rev. 2.0, 02/99, page 196 of 830
  9633.  
  9634. ----------------------- Page 211-----------------------
  9635.  
  9636. Sleep →→ Manual Reset
  9637.  
  9638. Reset
  9639.  
  9640. CKIO
  9641.  
  9642. RESET*
  9643.  
  9644. SCK2
  9645.  
  9646. STATUS Normal Sleep Reset Normal
  9647.  
  9648. 0–30 Bcyc 0–30 Bcyc
  9649.  
  9650. Note: * Hold RESET low until STATUS = reset.
  9651.  
  9652. Figure 9.8 STATUS Output in Sleep →→ Manual Reset Sequence
  9653.  
  9654. Rev. 2.0, 02/99, page 197 of 830
  9655.  
  9656. ----------------------- Page 212-----------------------
  9657.  
  9658. 9.7.4 In Exit from Deep Sleep Mode
  9659.  
  9660. Deep Sleep →→ Interrupt
  9661.  
  9662. Interrupt request
  9663.  
  9664. CKIO
  9665.  
  9666. STATUS Normal Deep sleep Normal
  9667.  
  9668. Figure 9.9 STATUS Output in Deep Sleep →→ Interrupt Sequence
  9669.  
  9670. Deep Sleep →→ Power-On Reset
  9671.  
  9672. Reset
  9673.  
  9674. CKIO
  9675.  
  9676. RESET*1
  9677.  
  9678. SCK2
  9679.  
  9680. STATUS Normal Deep sleep *2 Reset Normal
  9681.  
  9682. 0–30 Bcyc
  9683. 0–10 Bcyc
  9684.  
  9685. Notes: 1. When deep sleep mode is exited by means of a power-on reset, hold RESET low for the
  9686. oscillation stabilization time.
  9687. 2. Undefined
  9688.  
  9689. Figure 9.10 STATUS Output in Deep Sleep →→ Power-On Reset Sequence
  9690.  
  9691. Rev. 2.0, 02/99, page 198 of 830
  9692.  
  9693. ----------------------- Page 213-----------------------
  9694.  
  9695. Deep Sleep →→ Manual Reset
  9696.  
  9697. Reset
  9698.  
  9699. CKIO
  9700.  
  9701. RESET*
  9702.  
  9703. SCK2
  9704.  
  9705. STATUS Normal Deep sleep Reset Normal
  9706.  
  9707. 0–30 Bcyc 0–30 Bcyc
  9708.  
  9709. Note: * Hold RESET low until STATUS = reset.
  9710.  
  9711. Figure 9.11 STATUS Output in Deep Sleep →→ Manual Reset Sequence
  9712.  
  9713. Rev. 2.0, 02/99, page 199 of 830
  9714.  
  9715. ----------------------- Page 214-----------------------
  9716.  
  9717. Rev. 2.0, 02/99, page 200 of 830
  9718.  
  9719. ----------------------- Page 215-----------------------
  9720.  
  9721. Section 10 Clock Oscillation Circuits
  9722.  
  9723. 10.1 Overview
  9724.  
  9725. The on-chip oscillation circuits comprise a clock pulse generator (CPG) and a watchdog timer
  9726. (WDT).
  9727.  
  9728. The CPG generates the clocks supplied inside the processor and performs power-down mode
  9729. control.
  9730.  
  9731. The WDT is a single-channel timer used to count the clock stabilization time when exiting
  9732. standby mode or a temporary standby state when the frequency is changed. It can be used as a
  9733. normal watchdog timer or an interval timer.
  9734.  
  9735. 10.1.1 Features
  9736.  
  9737. The CPG has the following features:
  9738.  
  9739. • Three clocks
  9740. The CPG can generate independently the CPU clock (I ) used by the CPU, FPU, caches, and
  9741. φ
  9742. TLB, the peripheral module clock (P ) used by the peripheral modules, and the bus clock
  9743. φ
  9744. (CKIO) used by the external bus interface.
  9745. • Six clock modes
  9746. Any of six clock operating modes can be selected, with different combinations of CPU clock,
  9747. bus clock, and peripheral module clock division ratios after a power-on reset.
  9748. • Frequency change function
  9749. PLL (phase-locked loop) circuits and a frequency divider in the CPG enable the CPU clock,
  9750. bus clock, and peripheral module clock frequencies to be changed independently. Frequency
  9751. changes are performed by software in accordance with the settings in the frequency control
  9752. register (FRQCR).
  9753. • PLL on/off control
  9754. Power consumption can be reduced by stopping the PLL circuits during low-frequency
  9755. operation.
  9756. • Power-down mode control
  9757. It is possible to stop the clock in sleep mode and standby mode, and to stop specific modules
  9758. with the module standby function.
  9759.  
  9760. Rev. 2.0, 02/99, page 201 of 830
  9761.  
  9762. ----------------------- Page 216-----------------------
  9763.  
  9764. The WDT has the following features
  9765.  
  9766. • Can be used to secure clock stabilization time
  9767. Used when exiting standby mode or a temporary standby state when the clock frequency is
  9768. changed.
  9769. • Can be switched between watchdog timer mode and interval timer mode
  9770. • Internal reset generation in watchdog timer mode
  9771. An internal reset is executed on counter overflow.
  9772. Power-on reset or manual reset can be selected.
  9773. • Interrupt generation in interval timer mode
  9774. An interval timer interrupt is generated on counter overflow.
  9775. • Selection of eight counter input clocks
  9776. Any of eight clocks can be selected, scaled from the × 1 clock of frequency divider 2 shown
  9777. in figure 10.1.
  9778.  
  9779. The CPG is described in sections 10.2 to 10.6, and the WDT in sections 10.7 to 10.9.
  9780.  
  9781. Rev. 2.0, 02/99, page 202 of 830
  9782.  
  9783. ----------------------- Page 217-----------------------
  9784.  
  9785. 10.2 Overview of CPG
  9786.  
  9787. 10.2.1 Block Diagram of CPG
  9788.  
  9789. Figure 10.1 shows a block diagram of the CPG.
  9790.  
  9791. Oscillator circuit
  9792.  
  9793. Frequency
  9794. divider 2
  9795. PLL circuit 1 × 1
  9796. × 1/2
  9797. × 6
  9798. × 1/3 CPU clock (Iø)
  9799. × 1/4 cycle Icyc
  9800. × 1/6
  9801. × 1/8
  9802.  
  9803. Frequency
  9804. XTAL Crystal divider 1 Peripheral module
  9805. oscillator
  9806. × 1/2 clock (Pø) cycle
  9807. EXTAL Pcyc
  9808.  
  9809. MD8
  9810.  
  9811. Bus clock (Bø)
  9812. cycle Bcyc
  9813.  
  9814. PLL circuit 2
  9815.  
  9816. × 1
  9817. CKIO
  9818.  
  9819. CPG control unit
  9820.  
  9821. MD2
  9822. Clock frequency Standby control
  9823. MD1
  9824. control circuit circuit
  9825. MD0
  9826.  
  9827.  
  9828. FRQCR STBCR
  9829. STBCR2
  9830.  
  9831. Bus interface
  9832.  
  9833. Internal bus
  9834.  
  9835. FRQCR: Frequency control register
  9836. STBCR: Standby control register
  9837. STBCR2: Standby control register 2
  9838.  
  9839. Figure 10.1 Block Diagram of CPG
  9840.  
  9841. Rev. 2.0, 02/99, page 203 of 830
  9842.  
  9843. ----------------------- Page 218-----------------------
  9844.  
  9845. The function of each of the CPG blocks is described below.
  9846.  
  9847. PLL Circuit 1: PLL circuit 1 has a function for multiplying the clock frequency from the
  9848. EXTAL pin or crystal oscillator by 6. Starting and stopping is controlled by a frequency control
  9849. register setting. Control is performed so that the internal clock rising edge phase matches the
  9850. input clock rising edge phase.
  9851.  
  9852. PLL Circuit 2: PLL circuit 2 coordinates the phases of the bus clock and the CKIO pin output
  9853. clock. Starting and stopping is controlled by a frequency control register setting.
  9854.  
  9855. Crystal Oscillator: This is the oscillator circuit used when a crystal resonator is connected to
  9856. the XTAL and EXTAL pins. Use of the crystal oscillator can be selected with the MD8 pin.
  9857.  
  9858. Frequency Divider 1: Frequency divider 1 has a function for adjusting the clock waveform duty
  9859. to 50% by halving the input clock frequency when clock input from the EXTAL pin is supplied
  9860. internally without using PLL circuit 1.
  9861.  
  9862. Frequency Divider 2: Frequency divider 2 generates the CPU clock (Iφ), bus clock (Bφ), and
  9863. peripheral module clock (Pφ). The division ratio is set in the frequency control register.
  9864.  
  9865. Clock Frequency Control Circuit: The clock frequency control circuit controls the clock
  9866. frequency by means of the MD pins and frequency control register.
  9867.  
  9868. Standby Control Circuit: The standby control circuit controls the state of the on-chip
  9869. oscillation circuits and other modules when the clock is switched and in sleep and standby
  9870. modes.
  9871.  
  9872. Frequency Control Register (FRQCR): The frequency control register contains control bits for
  9873. clock output from the CKIO pin, PLL circuit 1 and 2 on/off control, and the CPU clock, bus
  9874. clock, and peripheral module clock frequency division ratios.
  9875.  
  9876. Standby Control Register (STBCR): The standby control register contains power save mode
  9877. control bits. For further information on the standby control register, see section 9, Power-Down
  9878. Modes.
  9879.  
  9880. Standby Control Register 2 (STBCR2): Standby control register 2 contains a power save mode
  9881. control bit. For further information on standby control register 2, see section 9, Power-Down
  9882. Modes.
  9883.  
  9884. Rev. 2.0, 02/99, page 204 of 830
  9885.  
  9886. ----------------------- Page 219-----------------------
  9887.  
  9888. 10.2.2 CPG Pin Configuration
  9889.  
  9890. Table 10.1 shows the CPG pins and their functions.
  9891.  
  9892. Table 10.1 CPG Pins
  9893.  
  9894. Pin Name Abbreviation I/O Function
  9895.  
  9896. Mode control pins MD0 Input Set clock operating mode
  9897.  
  9898. MD1
  9899.  
  9900. MD2
  9901.  
  9902. Crystal I/O pins XTAL Output Connects crystal resonator
  9903. (clock input pins)
  9904.  
  9905. EXTAL Input Connects crystal resonator, or used as
  9906. external clock input pin
  9907.  
  9908. MD8 Input Selects use/non-use of crystal resonator
  9909.  
  9910. When MD8 = 0, external clock is input from
  9911. EXTAL
  9912.  
  9913. When MD8 = 1, crystal resonator is
  9914. connected directly to EXTAL and XTAL
  9915.  
  9916. Clock output pin CKIO Output Used as external clock output pin
  9917.  
  9918. Level can also be fixed
  9919.  
  9920. CKIO enable pin CKE Output 0 when CKIO output clock is unstable
  9921.  
  9922. 10.2.3 CPG Register Configuration
  9923.  
  9924. Table 10.2 shows the CPG register configuration.
  9925.  
  9926. Table 10.2 CPG Register
  9927.  
  9928. Area 7 Access
  9929. Name Abbreviation R/W Initial Value P4 Address Address Size
  9930.  
  9931. Frequency control FRQCR R/W Undefined* H'FFC00000 H'1FC00000 16
  9932. register
  9933.  
  9934. Note: * Depends on the clock operating mode set by pins MD2–MD0.
  9935.  
  9936. Rev. 2.0, 02/99, page 205 of 830
  9937.  
  9938. ----------------------- Page 220-----------------------
  9939.  
  9940. 10.3 Clock Operating Modes
  9941.  
  9942. Table 10.3 shows the clock operating modes corresponding to various combinations of mode
  9943. control pin (MD2–MD0) settings.
  9944.  
  9945. Table 10.4 shows FRQCR settings and internal clock frequencies.
  9946.  
  9947. Table 10.3 Clock Operating Modes
  9948.  
  9949. Clock External 1/2 PLL1 PLL2 Frequency Input Clock
  9950. Operating Pin Combination Frequency (vs. Input Clock) Frequency
  9951. Mode Divider Range (MHz)
  9952.  
  9953. MD2 MD1 MD0 CPU Bus Peripheral
  9954. Clock Clock Module
  9955. Clock
  9956.  
  9957. 0 0 0 0 Off On On 6 3/2 3/2 17–33
  9958.  
  9959. 1 1 Off On On 6 1 1 25–33
  9960.  
  9961. 2 1 0 On On On 3 1 1/2 25–66
  9962.  
  9963. 3 1 Off On On 6 2 1 13–33
  9964.  
  9965. 4 1 0 0 On On On 3 3/2 3/4 17–66
  9966.  
  9967. 5 1 Off On On 6 3 3/2 9–33
  9968.  
  9969. Notes: 1. The maximum frequencies of the CPU clock, bus clock, and peripheral module clock,
  9970. respectively, are 200 MHz, 100 MHz, and 50 MHz.
  9971. 2. The frequency range of PLL2 is 25 MHz to 100 MHz.
  9972.  
  9973. Rev. 2.0, 02/99, page 206 of 830
  9974.  
  9975. ----------------------- Page 221-----------------------
  9976.  
  9977. Table 10.4 FRQCR Settings and Internal Clock Frequencies
  9978.  
  9979. FRQCR Frequency Division Ratio Clock Ratio (I:B:P)*
  9980. (Lower
  9981. 9 Bits)
  9982.  
  9983. CPU Bus Peripheral 1/2 Frequency 1/2 Frequency 1/2 Frequency 1/2 Frequency
  9984. Clock Clock Module Divider Off Divider Off Divider On Divider On
  9985. Clock PLL1 Off PLL1 On PLL1 Off PLL1 On
  9986.  
  9987. H'008 1 1/2 1/2 1:1/2:1/2 6:3:3 1/2:1/4:1/4 3:3/2:3/2
  9988.  
  9989. H'00A 1/4 1:1/2:1/4 6:3:3/2 1/2:1/4:1/8 3:3/2:3/4
  9990.  
  9991. H'00C 1/8 1:1/2:1/8 6:3:3/4 1/2:1/4:1/16 3:3/2:3/8
  9992.  
  9993. H'011 1/3 1/3 1:1/3:1/3 6:2:2 1/2:1/6:1/6 3:1:1
  9994.  
  9995. H'013 1/6 1:1/3:1/6 6:2:1 1/2:1/6:1/12 3:1:1/2
  9996.  
  9997. H'01A 1/4 1/4 1:1/4:1/4 6:3/2:3/2 1/2:1/8:1/8 3:3/4:3/4
  9998.  
  9999. H'01C 1/8 1:1/4:1/8 6:3/2:3/4 1/2:1/8:1/16 3:3/4:3/8
  10000.  
  10001. H'023 1/6 1/6 1:1/6:1/6 6:1:1 1/2:1/12:1/12 3:1/2:1/2
  10002.  
  10003. H'02C 1/8 1/8 1:1/8:1/8 6:3/4:3/4 1/2:1/16:1/16 3:3/8:3/8
  10004.  
  10005. H'05A 1/2 1/4 1/4 1/2:1/4:1/4 3:3/2:3/2 1/4:1/8:1/8 3/2:3/4:3/4
  10006.  
  10007. H'05C 1/8 1/2:1/4:1/8 3:3/2:3/4 1/4:1/8:1/16 3/2:3/4:3/8
  10008.  
  10009. H'063 1/6 1/6 1/2:1/6:1/6 3:1:1 1/4:1/12:1/12 3/2:1/2:1/2
  10010.  
  10011. H'06C 1/8 1/8 1/2:1/8:1/8 3:3/4:3/4 1/4:1/16:1/16 3/2:3/8:3/8
  10012.  
  10013. H'0A3 1/3 1/6 1/6 1/3:1/6:1/6 2:1:1 1/6:1/12:1/12 1:1/2:1/2
  10014.  
  10015. H'0EC 1/4 1/8 1/8 1/4:1/8:1/8 3/2:3/4:3/4 1/8:1/16:1/16 3/4:3/8:3/8
  10016.  
  10017. Note: * Taking input clock value as 1.
  10018. Do not set values other than those shown in the table.
  10019.  
  10020. Rev. 2.0, 02/99, page 207 of 830
  10021.  
  10022. ----------------------- Page 222-----------------------
  10023.  
  10024. 10.4 CPG Register Description
  10025.  
  10026. 10.4.1 Frequency Control Register (FRQCR)
  10027.  
  10028. The frequency control register (FRQCR) is a 16-bit readable/writable register that specifies
  10029. use/non-use of clock output from the CKIO pin, PLL circuit 1 and 2 on/off control, and the CPU
  10030. clock, bus clock, and peripheral module clock frequency division ratios. Only word access can
  10031. be used on FRQCR.
  10032.  
  10033. FRQCR is initialized only by a power-on reset via the 5(6(7 pin. The initial value of each bit
  10034. is determined by the clock operating mode.
  10035.  
  10036. Bit: 15 14 13 12 11 10 9 8
  10037.  
  10038. — — — — CKOEN PLL1EN PLL2EN IFC2
  10039.  
  10040. Initial value: 0 0 0 0 1 1 1 —
  10041.  
  10042. R/W: R R R R R/W R/W R/W R/W
  10043.  
  10044. Bit: 7 6 5 4 3 2 1 0
  10045.  
  10046. IFC1 IFC0 BFC2 BFC1 BFC0 PFC2 PFC1 PFC0
  10047.  
  10048. Initial value: — — — — — — — —
  10049.  
  10050. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10051.  
  10052. Bits 15 to 12—Reserved: These bits are always read as 0, and should only be written with 0.
  10053.  
  10054. Bit 11—Clock Output Enable (CKOEN): Specifies whether a clock is output from the CKIO
  10055. pin or the CKIO pin is placed in the high-impedance state. When the CKIO pin goes to the high-
  10056. impedance state, operation continues at the operating frequency before this state was entered.
  10057. When the CKIO pin becomes high-impedance, it is pulled up.
  10058.  
  10059. Bit 11: CKOEN Description
  10060.  
  10061. 0 CKIO pin goes to high-impedance state
  10062.  
  10063. 1 Clock is output from CKIO pin (Initial value)
  10064.  
  10065. Bit 10—PLL Circuit 1 Enable (PLL1EN): Specifies whether PLL circuit 1 is on or off.
  10066.  
  10067. Bit 10: PLL1EN Description
  10068.  
  10069. 0 PLL circuit 1 is not used
  10070.  
  10071. 1 PLL circuit 1 is used (Initial value)
  10072.  
  10073. Rev. 2.0, 02/99, page 208 of 830
  10074.  
  10075. ----------------------- Page 223-----------------------
  10076.  
  10077. Bit 9—PLL Circuit 2 Enable (PLL2EN): Specifies whether PLL circuit 2 is on or off.
  10078.  
  10079. Bit 9: PLL2EN Description
  10080.  
  10081. 0 PLL circuit 2 is not used
  10082.  
  10083. 1 PLL circuit 2 is used (Initial value)
  10084.  
  10085. Bits 8 to 6—CPU Clock Frequency Division Ratio (IFC): These bits specify the CPU clock
  10086. frequency division ratio with respect to the input clock, 1/2 frequency divider, or PLL circuit 1
  10087. output frequency.
  10088.  
  10089. Bit 8: IFC2 Bit 7: IFC1 Bit 6: IFC0 Description
  10090.  
  10091. 0 0 0 × 1
  10092.  
  10093. 1 × 1/2
  10094.  
  10095. 1 0 × 1/3
  10096.  
  10097. 1 × 1/4
  10098.  
  10099. 1 0 0 × 1/6
  10100.  
  10101. 1 × 1/8
  10102.  
  10103. Other than the above Setting prohibited (Do not set)
  10104.  
  10105. Bits 5 to 3—Bus Clock Frequency Division Ratio (BFC): These bits specify the bus clock
  10106. frequency division ratio with respect to the input clock, 1/2 frequency divider, or PLL circuit 1
  10107. output frequency.
  10108.  
  10109. Bit 5: BFC2 Bit 4: BFC1 Bit 3: BFC0 Description
  10110.  
  10111. 0 0 0 × 1
  10112.  
  10113. 1 × 1/2
  10114.  
  10115. 1 0 × 1/3
  10116.  
  10117. 1 × 1/4
  10118.  
  10119. 1 0 0 × 1/6
  10120.  
  10121. 1 × 1/8
  10122.  
  10123. Other than the above Setting prohibited (Do not set)
  10124.  
  10125. Rev. 2.0, 02/99, page 209 of 830
  10126.  
  10127. ----------------------- Page 224-----------------------
  10128.  
  10129. Bits 2 to 0—Peripheral Module Clock Frequency Division Ratio (PFC): These bits specify
  10130. the peripheral module clock frequency division ratio with respect to the input clock, 1/2
  10131. frequency divider, or PLL circuit 1 output frequency.
  10132.  
  10133. Bit 2: PFC2 Bit 1: PFC1 Bit 0: PFC0 Description
  10134.  
  10135. 0 0 0 × 1/2
  10136.  
  10137. 1 × 1/3
  10138.  
  10139. 1 0 × 1/4
  10140.  
  10141. 1 × 1/6
  10142.  
  10143. 1 0 0 × 1/8
  10144.  
  10145. Other than the above Setting prohibited (Do not set)
  10146.  
  10147. 10.5 Changing the Frequency
  10148.  
  10149. There are two methods of changing the internal clock frequency: by changing stopping and
  10150. starting of PLL circuit 1, and by changing the frequency division ratio of each clock. In both
  10151. cases, control is performed by software by means of the frequency control register. These
  10152. methods are described below.
  10153.  
  10154. 10.5.1 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is Off)
  10155.  
  10156. When PLL circuit 1 is changed from the stopped to started state, a PLL stabilization time is
  10157. required. The oscillation stabilization time count is performed by the on-chip WDT.
  10158.  
  10159. 1. Set a value in WDT to provide the specified oscillation stabilization time, and stop the WDT.
  10160. The following settings are necessary:
  10161. WTCSR register TME bit = 0: WDT stopped
  10162. WTCSR register CKS2–CKS0 bits: WDT count clock division ratio
  10163. WTCNT counter: Initial counter value
  10164. 2. Set the PLL1EN bit to 1.
  10165. 3. Internal processor operation stops temporarily, and the WDT starts counting up. The internal
  10166. clock stops and an unstable clock is output to the CKIO pin.
  10167. 4. After the WDT count overflows, clock supply begins within the chip and the processor
  10168. resumes operation. The WDT stops after overflowing.
  10169.  
  10170. Rev. 2.0, 02/99, page 210 of 830
  10171.  
  10172. ----------------------- Page 225-----------------------
  10173.  
  10174. 10.5.2 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is On)
  10175.  
  10176. When PLL circuit 2 is on, a PLL circuit 1 and PLL circuit 2 oscillation stabilization time is
  10177. required.
  10178.  
  10179. 1. Make WDT settings as in 10.5.1.
  10180. 2. Set the PLL1EN bit to 1.
  10181. 3. Internal processor operation stops temporarily, PLL circuit 1 oscillates, and the WDT starts
  10182. counting up. The internal clock stops and an unstable clock is output to the CKIO pin.
  10183. 4. After the WDT count overflows, PLL circuit 2 starts oscillating. The WDT resumes its up-
  10184. count from the value set in step 1 above. During this time, also, the internal clock is stopped
  10185. and an unstable clock is output to the CKIO pin.
  10186. 5. After the WDT count overflows, clock supply begins within the chip and the processor
  10187. resumes operation. The WDT stops after overflowing.
  10188.  
  10189. 10.5.3 Changing Bus Clock Division Ratio (When PLL Circuit 2 is On)
  10190.  
  10191. If PLL circuit 2 is on when the bus clock frequency division ratio is changed, a PLL circuit 2
  10192. oscillation stabilization time is required.
  10193.  
  10194. 1. Make WDT settings as in 10.5.1.
  10195. 2. Set the BFC2–BFC0 bits to the desired value.
  10196. 3. Internal processor operation stops temporarily, and the WDT starts counting up. The internal
  10197. clock stops and an unstable clock is output to the CKIO pin.
  10198. 4. After the WDT count overflows, clock supply begins within the chip and the processor
  10199. resumes operation. The WDT stops after overflowing.
  10200.  
  10201. 10.5.4 Changing Bus Clock Division Ratio (When PLL Circuit 2 is Off)
  10202.  
  10203. If PLL circuit 2 is off when the bus clock frequency division ratio is changed, a WDT count is
  10204. not performed.
  10205.  
  10206. 1. Set the BFC2–BFC0 bits to the desired value.
  10207. 2. The set clock is switched to immediately.
  10208.  
  10209. Rev. 2.0, 02/99, page 211 of 830
  10210.  
  10211. ----------------------- Page 226-----------------------
  10212.  
  10213. 10.5.5 Changing CPU or Peripheral Module Clock Division Ratio
  10214.  
  10215. When the CPU or peripheral module clock frequency division ratio is changed, a WDT count is
  10216. not performed.
  10217.  
  10218. 1. Set the IFC2–IFC0 or PFC2–PFC0 bits to the desired value.
  10219. 2. The set clock is switched to immediately.
  10220.  
  10221. 10.6 Output Clock Control
  10222.  
  10223. The CKIO pin can be switched between clock output and a fixed level setting by means of the
  10224. CKOEN bit in the FRQCR register.
  10225.  
  10226. 10.7 Overview of Watchdog Timer
  10227.  
  10228. 10.7.1 Block Diagram
  10229.  
  10230. Figure 10.2 shows a block diagram of the WDT.
  10231.  
  10232. WDT
  10233.  
  10234. Standby
  10235. Standby Standby
  10236. mode
  10237. release control
  10238.  
  10239. Frequency
  10240. divider 2 × 1
  10241. clock
  10242. Internal reset Reset Frequency divider
  10243. request control
  10244.  
  10245. Clock selection
  10246. Clock selector
  10247.  
  10248. Interrupt Interrupt
  10249. request control Overflow
  10250. Clock
  10251.  
  10252. WTCSR WTCNT
  10253.  
  10254. Bus interface
  10255.  
  10256. WTCSR: Watchdog timer control/status register
  10257. WTCNT: Watchdog timer counter
  10258.  
  10259. Figure 10.2 Block Diagram of WDT
  10260.  
  10261. Rev. 2.0, 02/99, page 212 of 830
  10262.  
  10263. ----------------------- Page 227-----------------------
  10264.  
  10265. 10.7.2 Register Configuration
  10266.  
  10267. The WDT has the two registers summarized in table 10.5. These registers control clock selection
  10268. and timer mode switching.
  10269.  
  10270. Table 10.5 WDT Registers
  10271.  
  10272. Initial Area 7
  10273. Name Abbreviation R/W Value P4 Address Address Access Size
  10274.  
  10275. Watchdog timer WTCNT R/W* H'00 H'FFC00008 H'1FC00008 R: 8, W: 16*
  10276. counter
  10277.  
  10278. Watchdog timer WTCSR R/W* H'00 H'FFC0000C H'1FC0000C R: 8, W: 16*
  10279. control/status
  10280. register
  10281.  
  10282. Note: Use word-size access when writing. Perform the write with the upper byte set to H'5A or
  10283. H'A5, respectively. Byte- and longword-size writes cannot be used.
  10284. Use byte access when reading.
  10285.  
  10286. 10.8 WDT Register Descriptions
  10287.  
  10288. 10.8.1 Watchdog Timer Counter (WTCNT)
  10289.  
  10290. The watchdog timer counter (WTCNT) is an 8-bit readable/writable counter that counts up on
  10291. the selected clock. When WTCNT overflows, a reset is generated in watchdog timer mode, or an
  10292. interrupt in interval timer mode. WTCNT is initialized to H'00 only by a power-on reset via the
  10293. 5(6(7 pin.
  10294.  
  10295. To write to the WTCNT counter, use a word-size access with the upper byte set to H'5A. To read
  10296. WTCNT, use a byte-size access.
  10297.  
  10298. Bit: 7 6 5 4 3 2 1 0
  10299.  
  10300. Initial value: 0 0 0 0 0 0 0 0
  10301.  
  10302. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10303.  
  10304. Rev. 2.0, 02/99, page 213 of 830
  10305.  
  10306. ----------------------- Page 228-----------------------
  10307.  
  10308. 10.8.2 Watchdog Timer Control/Status Register (WTCSR)
  10309.  
  10310. The watchdog timer control/status register (WTCSR) is an 8-bit readable/writable register
  10311. containing bits for selecting the count clock and timer mode, and overflow flags.
  10312.  
  10313. WTCSR is initialized to H'00 only by a power-on reset via the 5(6(7 pin. It retains its value in
  10314. an internal reset due to WDT overflow. When used to count the clock stabilization time when
  10315. exiting standby mode, WTCSR retains its value after the counter overflows.
  10316.  
  10317. To write to the WTCSR register, use a word-size access with the upper byte set to H'A5. To read
  10318. WTCSR, use a byte-size access.
  10319.  
  10320. Bit: 7 6 5 4 3 2 1 0
  10321.  
  10322. TME WT/,7 RSTS WOVF IOVF CKS2 CKS1 CKS0
  10323.  
  10324. Initial value: 0 0 0 0 0 0 0 0
  10325.  
  10326. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10327.  
  10328. Bit 7—Timer Enable (TME): Specifies starting and stopping of timer operation. Clear this bit
  10329. to 0 when using the WDT in standby mode or to change a clock frequency.
  10330.  
  10331. Bit 7: TME Description
  10332.  
  10333. 0 Up-count stopped, WTCNT value retained (Initial value)
  10334.  
  10335. 1 Up-count started
  10336.  
  10337. Bit 6—Timer Mode Select (WT/,7): Specifies whether the WDT is used as a watchdog timer
  10338. ,7
  10339. or interval timer.
  10340.  
  10341. Bit 6: WT/,7 Description
  10342. ,7
  10343.  
  10344. 0 Interval timer mode (Initial value)
  10345.  
  10346. 1 Watchdog timer mode
  10347.  
  10348. Note: The up-count may not be performed correctly if WT/,7 is modified while the WDT is
  10349. running.
  10350.  
  10351. Bit 5—Reset Select (RSTS): Specifies the kind of reset to be performed when WTCNT
  10352. overflows in watchdog timer mode. This setting is ignored in interval timer mode.
  10353.  
  10354. Bit 5: RSTS Description
  10355.  
  10356. 0 Power-on reset (Initial value)
  10357.  
  10358. 1 Manual reset
  10359.  
  10360. Rev. 2.0, 02/99, page 214 of 830
  10361.  
  10362. ----------------------- Page 229-----------------------
  10363.  
  10364. Bit 4—Watchdog Timer Overflow Flag (WOVF): Indicates that WTCNT has overflowed in
  10365. watchdog timer mode. This flag is not set in interval timer mode.
  10366.  
  10367. Bit 4: WOVF Description
  10368.  
  10369. 0 No overflow (Initial value)
  10370.  
  10371. 1 WTCNT has overflowed in watchdog timer mode
  10372.  
  10373. Bit 3—Interval Timer Overflow Flag (IOVF): Indicates that WTCNT has overflowed in
  10374. interval timer mode. This flag is not set in watchdog timer mode.
  10375.  
  10376. Bit 3: IOVF Description
  10377.  
  10378. 0 No overflow (Initial value)
  10379.  
  10380. 1 WTCNT has overflowed in interval timer mode
  10381.  
  10382. Bits 2 to 0—Clock Select 2 to 0 (CKS2–CKS0): These bits select the clock used for the
  10383. WTCNT count from eight clocks obtained by dividing the frequency divider 2 input clock. The
  10384. overflow periods shown in the following table are for use of a 33 MHz input clock, with
  10385. frequency divider 1 off, and PLL circuit 1 on.
  10386.  
  10387. Description
  10388.  
  10389. Bit 2: CKS2 Bit 1: CKS1 Bit 0: CKS0 Clock Division Ratio Overflow Period
  10390.  
  10391. 0 0 0 1/32 (Initial value) 41 µs
  10392.  
  10393. 1 1/64 82 µs
  10394.  
  10395. 1 0 1/128 164 µs
  10396.  
  10397. 1 1/256 328 µs
  10398.  
  10399. 1 0 0 1/512 656 µs
  10400.  
  10401. 1 1/1024 1.31 ms
  10402.  
  10403. 1 0 1/2048 2.62 ms
  10404.  
  10405. 1 1/4096 5.25 ms
  10406.  
  10407. Note: The up-count may not be performed correctly if bits CKS2–CKS0 are modified while the
  10408. WDT is running. Always stop the WDT before modifying these bits.
  10409.  
  10410. Rev. 2.0, 02/99, page 215 of 830
  10411.  
  10412. ----------------------- Page 230-----------------------
  10413.  
  10414. 10.8.3 Notes on Register Access
  10415.  
  10416. The watchdog timer counter (WTCNT) and watchdog timer control/status register (WTCSR)
  10417. differ from other registers in being more difficult to write to. The procedure for writing to these
  10418. registers is given below.
  10419.  
  10420. Writing to WTCNT and WTCSR: These registers must be written to with a word transfer
  10421. instruction. They cannot be written to with a byte or longword transfer instruction. When writing
  10422. to WTCNT, perform the transfer with the upper byte set to H'5A and the lower byte containing
  10423. the write data. When writing to WTCSR, perform the transfer with the upper byte set to H'A5
  10424. and the lower byte containing the write data. This transfer procedure writes the lower byte data
  10425. to WTCNT or WTCSR. The write formats are shown in figure 10.3.
  10426.  
  10427. WTCNT write
  10428.  
  10429. 15 8 7 0
  10430. Address: H'FFC00008
  10431. H'5A Write data
  10432. (H'1FC00008)
  10433.  
  10434. WTCSR write
  10435.  
  10436. 15 8 7 0
  10437. Address: H'FFC0000C
  10438. H'A5 Write data
  10439. (H'1FC0000C)
  10440.  
  10441. Figure 10.3 Writing to WTCNT and WTCSR
  10442.  
  10443. Rev. 2.0, 02/99, page 216 of 830
  10444.  
  10445. ----------------------- Page 231-----------------------
  10446.  
  10447. 10.9 Using the WDT
  10448.  
  10449. 10.9.1 Standby Clearing Procedure
  10450.  
  10451. The WDT is used when clearing standby mode by means of an NMI or other interrupt. The
  10452. procedure is shown below. (As the WDT does not operate when standby mode is cleared with a
  10453. reset, the 5(6(7 pin should be held low until the clock stabilizes.)
  10454.  
  10455. 1. Be sure to clear the TME bit in the WTCSR register to 0 before making a transition to
  10456. standby mode. If the TME bit is set to 1, an inadvertent reset or interval timer interrupt may
  10457. be caused when the count overflows.
  10458. 2. Select the count clock to be used with bits CKS2–CKS0 in the WTCSR register, and set the
  10459. initial value in the WTCNT counter. Make these settings so that the time until the count
  10460. overflows is at least as long as the clock oscillation stabilization time.
  10461. 3. Make a transition to standby mode, and stop the clock, by executing a SLEEP instruction.
  10462. 4. The WDT starts counting on detection of an NMI signal transition edge or an interrupt.
  10463. 5. When the WDT count overflows, the CPG starts clock supply and the processor resumes
  10464. operation. The WOVF flag in the WTCSR register is not set at this time.
  10465. 6. The counter stops at a value of H'00–H'01. The value at which the counter stops depends on
  10466. the clock ratio.
  10467.  
  10468. 10.9.2 Frequency Changing Procedure
  10469.  
  10470. The WDT is used in a frequency change using the PLL. It is not used when the frequency is
  10471. changed simply by making a frequency divider switch.
  10472.  
  10473. 1. Be sure to clear the TME bit in the WTCSR register to 0 before making a frequency change.
  10474. If the TME bit is set to 1, an inadvertent reset or interval timer interrupt may be caused when
  10475. the count overflows.
  10476. 2. Select the count clock to be used with bits CKS2–CKS0 in the WTCSR register, and set the
  10477. initial value in the WTCNT counter. Make these settings so that the time until the count
  10478. overflows is at least as long as the clock oscillation stabilization time.
  10479. 3. When the frequency control register (FRQCR) is modified, the clock stops, and the standby
  10480. state is entered temporarily. The WDT starts counting.
  10481. 4. When the WDT count overflows, the CPG starts clock supply and the processor resumes
  10482. operation. The WOVF flag in the WTCSR register is not set at this time.
  10483. 5. The counter stops at a value of H'00–H'01. The value at which the counter stops depends on
  10484. the clock ratio.
  10485. 6. When re-setting WTCNT immediately after modifying the frequency control register
  10486. (FRQCR), first read the counter and confirm that its value is as described in step 5 above.
  10487.  
  10488. Rev. 2.0, 02/99, page 217 of 830
  10489.  
  10490. ----------------------- Page 232-----------------------
  10491.  
  10492. 10.9.3 Using Watchdog Timer Mode
  10493.  
  10494. 1. Set the WT/,7 bit in the WTCSR register to 1, select the type of reset with the RSTS bit, and
  10495. the count clock with bits CKS2–CKS0, and set the initial value in the WTCNT counter.
  10496. 2. When the TME bit in the WTCSR register is set to 1, the count starts in watchdog timer
  10497. mode.
  10498. 3. During operation in watchdog timer mode, write H'00 to the counter periodically so that it
  10499. does not overflow.
  10500. 4. When the counter overflows, the WDT sets the WOVF flag in the WTCSR register to 1, and
  10501. generates a reset of the type specified by the RSTS bit. The counter then continues counting.
  10502.  
  10503. 10.9.4 Using Interval Timer Mode
  10504.  
  10505. When the WDT is operating in interval timer mode, an interval timer interrupt is generated each
  10506. time the counter overflows. This enables interrupts to be generated at fixed intervals.
  10507.  
  10508. 1. Clear the WT/,7 bit in the WTCSR register to 0, select the count clock with bits CKS2–
  10509. CKS0, and set the initial value in the WTCNT counter.
  10510. 2. When the TME bit in the WTCSR register is set to 1, the count starts in interval timer mode.
  10511. 3. When the counter overflows, the WDT sets the IOVF flag in the WTCSR register to 1, and
  10512. sends an interval timer interrupt request to INTC. The counter continues counting.
  10513.  
  10514. Rev. 2.0, 02/99, page 218 of 830
  10515.  
  10516. ----------------------- Page 233-----------------------
  10517.  
  10518. 10.10 Notes on Board Design
  10519.  
  10520. When Using a Crystal Resonator: Place the crystal resonator and capacitors close to the
  10521. EXTAL and XTAL pins. To prevent induction from interfering with correct oscillation, ensure
  10522. that no other signal lines cross the signal lines for these pins.
  10523.  
  10524. CL1 CL2
  10525.  
  10526. Recommended values
  10527. Avoid crossing signal lines R CL1 = CL2 = 0–33 pF
  10528. R = 0Ω
  10529.  
  10530. EXTAL XTAL
  10531.  
  10532. SH7750
  10533.  
  10534. Note: The values for CL1, CL2, and the damping resistance should be determined after
  10535. consultation with the crystal resonator manufacturer.
  10536.  
  10537. Figure 10.4 Points for Attention when Using Crystal Resonator
  10538.  
  10539. When Inputting External Clock from EXTAL Pin: Make no connection to the XTAL pin.
  10540.  
  10541. Rev. 2.0, 02/99, page 219 of 830
  10542.  
  10543. ----------------------- Page 234-----------------------
  10544.  
  10545. When Using a PLL Oscillator Circuit: Separate VDD-CPG and VSS-CPG from the other
  10546. VDD and VSS lines at the board power supply source, and insert resistors RCB and RB, and
  10547. decoupling capacitors CPB and CB, close to the pins.
  10548.  
  10549. RCB1
  10550. VDD-PLL1
  10551.  
  10552. CPB1
  10553.  
  10554. VSS-PLL1
  10555.  
  10556. RCB2
  10557.  
  10558. VDD-PLL2
  10559.  
  10560. SH7750 CPB2
  10561.  
  10562. VSS-PLL2
  10563.  
  10564. RB
  10565. VDD-CPG
  10566. 3.3 V
  10567. CB
  10568.  
  10569. VSS-CPG
  10570.  
  10571. Figure 10.5 Points for Attention when Using PLL Oscillator Circuit
  10572.  
  10573. Rev. 2.0, 02/99, page 220 of 830
  10574.  
  10575. ----------------------- Page 235-----------------------
  10576.  
  10577. Section 11 Realtime Clock (RTC)
  10578.  
  10579. 11.1 Overview
  10580.  
  10581. The SH7750 includes an on-chip realtime clock (RTC) and a 32.768 kHz crystal oscillator for
  10582. use by the RTC.
  10583.  
  10584. 11.1.1 Features
  10585.  
  10586. The RTC has the following features.
  10587.  
  10588. • Clock and calendar functions (BCD display)
  10589. Counts seconds, minutes, hours, day-of-week, days, months, and years.
  10590. • 1 to 64 Hz timer (binary display)
  10591. The 64 Hz counter register indicates a state of 64 Hz to 1 Hz within the RTC frequency
  10592. divider
  10593. • Start/stop function
  10594. • 30-second adjustment function
  10595. • Alarm interrupts
  10596. Comparison with second, minute, hour, day-of-week, day, or month can be selected as the
  10597. alarm interrupt condition
  10598. • Periodic interrupts
  10599. An interrupt period of 1/256 second, 1/64 second, 1/16 second, 1/4 second, 1/2 second, 1
  10600. second, or 2 seconds can be selected
  10601. • Carry interrupt
  10602. Carry interrupt function indicating a second counter carry, or a 64 Hz counter carry when the
  10603. 64 Hz counter is read
  10604. • Automatic leap year adjustment
  10605.  
  10606. Rev. 2.0, 02/99, page 221 of 830
  10607.  
  10608. ----------------------- Page 236-----------------------
  10609.  
  10610. 11.1.2 Block Diagram
  10611.  
  10612. Figure 11.1 shows a block diagram of the RTC.
  10613.  
  10614. ATI
  10615. RTCCLK PRI
  10616. CUI RESET, STBY, etc
  10617.  
  10618. 16.384 kHz
  10619.  
  10620. Prescaler 32.768 kHz RTC crystal RTC operation
  10621. oscillator control unit
  10622.  
  10623. 128 Hz
  10624.  
  10625. RCR1
  10626.  
  10627. RCR2
  10628.  
  10629. Counter unit
  10630. Interrupt
  10631. R64CNT control unit
  10632.  
  10633. RSECCNT RMINCNT RHRCNT RDAYCNT RWKCNT RMONCNT RYRCNT
  10634.  
  10635. RSECAR RMINAR RHRAR RDAYAR RWKAR RMONAR
  10636.  
  10637. To registers
  10638.  
  10639. Bus interface
  10640.  
  10641. Internal peripheral module bus
  10642.  
  10643. Figure 11.1 Block Diagram of RTC
  10644.  
  10645. Rev. 2.0, 02/99, page 222 of 830
  10646.  
  10647. ----------------------- Page 237-----------------------
  10648.  
  10649. 11.1.3 Pin Configuration
  10650.  
  10651. Table 11.1 shows the RTC pins.
  10652.  
  10653. Table 11.1 RTC Pins
  10654.  
  10655. Pin Name Abbreviation I/O Function
  10656.  
  10657. RTC oscillator crystal pin EXTAL2 Input Connects crystal to RTC oscillator
  10658.  
  10659. RTC oscillator crystal pin XTAL2 Output Connects crystal to RTC oscillator
  10660.  
  10661. Clock input/clock output TCLK I/O External clock input pin/input capture
  10662. control input pin/RTC output pin
  10663. (shared with TMU)
  10664.  
  10665. Dedicated RTC power VCC (RTC) — RTC oscillator power supply pin*
  10666. supply
  10667.  
  10668. Dedicated RTC GND pin VSS (RTC) — RTC oscillator GND pin*
  10669.  
  10670. Note: Power must be supplied to the RTC power supply pins even when the RTC is not used.
  10671. When the RTC is used, power should be supplied to all power supply pins including these
  10672. pins. In standby mode, also, power should be supplied to all power supply pins including
  10673. these pins.
  10674.  
  10675. 11.1.4 Register Configuration
  10676.  
  10677. Table 11.2 summarizes the RTC registers.
  10678.  
  10679. Table 11.2 RTC Registers
  10680.  
  10681. Initialization
  10682.  
  10683. Power-
  10684. Abbrevia- On Manual Standby Initial Area 7 Access
  10685. Name tion R/W Reset Reset Mode Value P4 Address Address Size
  10686.  
  10687. 64 Hz R64CNT R Counts Counts Counts Undefined H'FFC80000 H'1FC80000 8
  10688. counter
  10689.  
  10690. Second RSECCNT R/W Counts Counts Counts Undefined H'FFC80004 H'1FC80004 8
  10691. counter
  10692.  
  10693. Minute RMINCNT R/W Counts Counts Counts Undefined H'FFC80008 H'1FC80008 8
  10694. counter
  10695.  
  10696. Hour RHRCNT R/W Counts Counts Counts Undefined H'FFC8000C H'1FC8000C 8
  10697. counter
  10698.  
  10699. Day-of- RWKCNT R/W Counts Counts Counts Undefined H'FFC80010 H'1FC80010 8
  10700. week
  10701. counter
  10702.  
  10703. Day RDAYCNT R/W Counts Counts Counts Undefined H'FFC80014 H'1FC80014 8
  10704. counter
  10705.  
  10706. Rev. 2.0, 02/99, page 223 of 830
  10707.  
  10708. ----------------------- Page 238-----------------------
  10709.  
  10710. Table 11.2 RTC Registers
  10711.  
  10712. Initialization
  10713.  
  10714. Abbrevia- Power-On Manual Standby Initial Area 7 Access
  10715. Name tion R/W Reset Reset Mode Value P4 Address Address Size
  10716.  
  10717. Month RMONCNT R/W Counts Counts Counts Undefined H'FFC80018 H'1FC80018 8
  10718. counter
  10719.  
  10720. Year RYRCNT R/W Counts Counts Counts Undefined H'FFC8001C H'1FC8001C 16
  10721. counter
  10722. Second RSECAR R/W Initialized*1 Held Held Undefined*1 H'FFC80020 H'1FC80020 8
  10723.  
  10724. alarm
  10725. register
  10726. Minute RMINAR R/W Initialized*1 Held Held Undefined*1 H'FFC80024 H'1FC80024 8
  10727.  
  10728. alarm
  10729. register
  10730. Hour RHRAR R/W Initialized*1 Held Held Undefined*1 H'FFC80028 H'1FC80028 8
  10731.  
  10732. alarm
  10733. register
  10734. Day-of- RWKAR R/W Initialized*1 Held Held Undefined*1 H'FFC8002C H'1FC8002C 8
  10735.  
  10736. week
  10737. alarm
  10738. register
  10739. Day RDAYAR R/W Initialized*1 Held Held Undefined*1 H'FFC80030 H'1FC80030 8
  10740.  
  10741. alarm
  10742. register
  10743. Month RMONAR R/W Initialized*1 Held Held Undefined*1 H'FFC80034 H'1FC80034 8
  10744.  
  10745. alarm
  10746. register
  10747. RTC 3 H'FFC80038 H'1FC80038 8
  10748. RCR1 R/W Initialized Initialized Held H'00*
  10749. control
  10750. register 1
  10751.  
  10752. 2 4
  10753. RTC RCR2 R/W Initialized Initialized* Held H'09* H'FFC8003C H'1FC8003C 8
  10754. control
  10755. register 2
  10756.  
  10757. Notes: 1. The ENB bit in each register is initialized.
  10758. 2. Bits other than the RTCEN bit and START bit are initialized.
  10759. 3. The value of the CF bit and AF bit is undefined.
  10760. 4. The value of the PEF bit is undefined.
  10761.  
  10762. Rev. 2.0, 02/99, page 224 of 830
  10763.  
  10764. ----------------------- Page 239-----------------------
  10765.  
  10766. 11.2 Register Descriptions
  10767.  
  10768. 11.2.1 64 Hz Counter (R64CNT)
  10769.  
  10770. R64CNT is an 8-bit read-only register that indicates a state of 64 Hz to 1 Hz within the RTC
  10771. frequency divider.
  10772.  
  10773. If this register is read when a carry is generated from the 128 kHz frequency division stage, bit 7
  10774. (CF) in RTC control register 1 (RCR1) is set to 1, indicating the simultaneous occurrence of the
  10775. carry and the 64 Hz counter read. In this case, the read value is not valid, and so R64CNT must
  10776. be read again after first writing 0 to the CF bit in RCR1 to clear it.
  10777.  
  10778. When the RESET bit or ADJ bit in RTC control register 2 (RCR2) is set to 1, the RTC
  10779. frequency divider is initialized and R64CNT is initialized to H'00.
  10780.  
  10781. R64CNT is not initialized by a power-on or manual reset, or in standby mode.
  10782.  
  10783. Bit 7 is always read as 0 and cannot be modified.
  10784.  
  10785. Bit: 7 6 5 4 3 2 1 0
  10786.  
  10787. — 1 Hz 2 Hz 4 Hz 8 Hz 16 Hz 32 Hz 64 Hz
  10788.  
  10789. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  10790.  
  10791. R/W: R R R R R R R R
  10792.  
  10793. 11.2.2 Second Counter (RSECCNT)
  10794.  
  10795. RSECCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  10796. BCD-coded second value in the RTC. It counts on the carry generated once per second by the 64
  10797. Hz counter.
  10798.  
  10799. The setting range is decimal 00 to 59. The RTC will not operate normally if any other value is
  10800. set. Write processing should be performed after stopping the count with the START bit in
  10801. RCR2, or by using the carry flag.
  10802.  
  10803. RSECCNT is not initialized by a power-on or manual reset, or in standby mode.
  10804.  
  10805. Bit 7 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  10806.  
  10807. Bit: 7 6 5 4 3 2 1 0
  10808.  
  10809. — 10-second units 1-second units
  10810.  
  10811. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  10812.  
  10813. R/W: R R/W R/W R/W R/W R/W R/W R/W
  10814.  
  10815. Rev. 2.0, 02/99, page 225 of 830
  10816.  
  10817. ----------------------- Page 240-----------------------
  10818.  
  10819. 11.2.3 Minute Counter (RMINCNT)
  10820.  
  10821. RMINCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  10822. BCD-coded minute value in the RTC. It counts on the carry generated once per minute by the
  10823. second counter.
  10824.  
  10825. The setting range is decimal 00 to 59. The RTC will not operate normally if any other value is
  10826. set. Write processing should be performed after stopping the count with the START bit in
  10827. RCR2, or by using the carry flag.
  10828.  
  10829. RMINCNT is not initialized by a power-on or manual reset, or in standby mode.
  10830.  
  10831. Bit 7 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  10832.  
  10833. Bit: 7 6 5 4 3 2 1 0
  10834.  
  10835. — 10-minute units 1-minute units
  10836.  
  10837. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  10838.  
  10839. R/W: R R/W R/W R/W R/W R/W R/W R/W
  10840.  
  10841. 11.2.4 Hour Counter (RHRCNT)
  10842.  
  10843. RHRCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  10844. BCD-coded hour value in the RTC. It counts on the carry generated once per hour by the minute
  10845. counter.
  10846.  
  10847. The setting range is decimal 00 to 23. The RTC will not operate normally if any other value is
  10848. set. Write processing should be performed after stopping the count with the START bit in
  10849. RCR2, or by using the carry flag.
  10850.  
  10851. RHRCNT is not initialized by a power-on or manual reset, or in standby mode.
  10852.  
  10853. Bits 7 and 6 are always read as 0. A write to these bits is invalid, but the write value should
  10854. always be 0.
  10855.  
  10856. Bit: 7 6 5 4 3 2 1 0
  10857.  
  10858. — — 10-hour units 1-hour units
  10859.  
  10860. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  10861.  
  10862. R/W: R R R/W R/W R/W R/W R/W R/W
  10863.  
  10864. Rev. 2.0, 02/99, page 226 of 830
  10865.  
  10866. ----------------------- Page 241-----------------------
  10867.  
  10868. 11.2.5 Day-of-Week Counter (RWKCNT)
  10869.  
  10870. RWKCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  10871. BCD-coded day-of-week value in the RTC. It counts on the carry generated once per day by the
  10872. hour counter.
  10873.  
  10874. The setting range is decimal 0 to 6. The RTC will not operate normally if any other value is set.
  10875. Write processing should be performed after stopping the count with the START bit in RCR2, or
  10876. by using the carry flag.
  10877.  
  10878. RWKCNT is not initialized by a power-on or manual reset, or in standby mode.
  10879.  
  10880. Bits 7 to 3 are always read as 0. A write to these bits is invalid, but the write value should
  10881. always be 0.
  10882.  
  10883. Bit: 7 6 5 4 3 2 1 0
  10884.  
  10885. — — — — — Day of week
  10886.  
  10887. Initial value: 0 0 0 0 0 Undefined Undefined Undefined
  10888.  
  10889. R/W: R R R R R R/W R/W R/W
  10890.  
  10891. Day-of-week code 0 1 2 3 4 5 6
  10892.  
  10893. Day of week Sun Mon Tue Wed Thu Fri Sat
  10894.  
  10895. Rev. 2.0, 02/99, page 227 of 830
  10896.  
  10897. ----------------------- Page 242-----------------------
  10898.  
  10899. 11.2.6 Day Counter (RDAYCNT)
  10900.  
  10901. RDAYCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  10902. BCD-coded day value in the RTC. It counts on the carry generated once per day by the hour
  10903. counter.
  10904.  
  10905. The setting range is decimal 01 to 31. The RTC will not operate normally if any other value is
  10906. set. Write processing should be performed after stopping the count with the START bit in
  10907. RCR2, or by using the carry flag.
  10908.  
  10909. RDAYCNT is not initialized by a power-on or manual reset, or in standby mode.
  10910.  
  10911. The setting range for RDAYCNT depends on the month and whether the year is a leap year, so
  10912. care is required when making the setting.
  10913.  
  10914. Bits 7 and 6 are always read as 0. A write to these bits is invalid, but the write value should
  10915. always be 0.
  10916.  
  10917. Bit: 7 6 5 4 3 2 1 0
  10918.  
  10919. — — 10-day units 1-day units
  10920.  
  10921. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  10922.  
  10923. R/W: R R R/W R/W R/W R/W R/W R/W
  10924.  
  10925. Rev. 2.0, 02/99, page 228 of 830
  10926.  
  10927. ----------------------- Page 243-----------------------
  10928.  
  10929. 11.2.7 Month Counter (RMONCNT)
  10930.  
  10931. RMONCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  10932. BCD-coded month value in the RTC. It counts on the carry generated once per month by the day
  10933. counter.
  10934.  
  10935. The setting range is decimal 01 to 12. The RTC will not operate normally if any other value is
  10936. set. Write processing should be performed after stopping the count with the START bit in
  10937. RCR2, or by using the carry flag.
  10938.  
  10939. RMONCNT is not initialized by a power-on or manual reset, or in standby mode.
  10940.  
  10941. Bits 7 to 5 are always read as 0. A write to these bits is invalid, but the write value should
  10942. always be 0.
  10943.  
  10944. Bit: 7 6 5 4 3 2 1 0
  10945.  
  10946. — — — 10-month 1-month units
  10947. unit
  10948.  
  10949. Initial value: 0 0 0 Undefined Undefined Undefined Undefined Undefined
  10950.  
  10951. R/W: R R R R/W R/W R/W R/W R/W
  10952.  
  10953. Rev. 2.0, 02/99, page 229 of 830
  10954.  
  10955. ----------------------- Page 244-----------------------
  10956.  
  10957. 11.2.8 Year Counter (RYRCNT)
  10958.  
  10959. RYRCNT is a 16-bit readable/writable register used as a counter for setting and counting the
  10960. BCD-coded year value in the RTC. It counts on the carry generated once per year by the month
  10961. counter.
  10962.  
  10963. The setting range is decimal 0000 to 9999. The RTC will not operate normally if any other value
  10964. is set. Write processing should be performed after stopping the count with the START bit in
  10965. RCR2, or by using the carry flag.
  10966.  
  10967. RYRCNT is not initialized by a power-on or manual reset, or in standby mode.
  10968.  
  10969. Bit: 15 14 13 12 11 10 9 8
  10970.  
  10971. 1000-year units 100-year units
  10972.  
  10973. Initial value: Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  10974.  
  10975. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10976.  
  10977. Bit: 7 6 5 4 3 2 1 0
  10978.  
  10979. 10-year units 1-year units
  10980.  
  10981. Initial value: Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  10982.  
  10983. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10984.  
  10985. Rev. 2.0, 02/99, page 230 of 830
  10986.  
  10987. ----------------------- Page 245-----------------------
  10988.  
  10989. 11.2.9 Second Alarm Register (RSECAR)
  10990.  
  10991. RSECAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-
  10992. coded second value counter, RSECCNT. When the ENB bit is set to 1, the RSECAR value is
  10993. compared with the RSECCNT value. Comparison between the counter and the alarm register is
  10994. performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  10995. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  10996. values all match.
  10997.  
  10998. The setting range is decimal 00 to 59 + ENB bit. The RTC will not operate normally if any other
  10999. value is set.
  11000.  
  11001. The ENB bit in RSECAR is initialized to 0 by a power-on reset. The other fields in RSECAR are
  11002. not initialized by a power-on or manual reset, or in standby mode.
  11003.  
  11004. Bit: 7 6 5 4 3 2 1 0
  11005.  
  11006. ENB 10-second units 1-second units
  11007.  
  11008. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11009.  
  11010. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11011.  
  11012. Rev. 2.0, 02/99, page 231 of 830
  11013.  
  11014. ----------------------- Page 246-----------------------
  11015.  
  11016. 11.2.10 Minute Alarm Register (RMINAR)
  11017.  
  11018. RMINAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-
  11019. coded minute value counter, RMINCNT. When the ENB bit is set to 1, the RMINAR value is
  11020. compared with the RMINCNT value. Comparison between the counter and the alarm register is
  11021. performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  11022. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  11023. values all match.
  11024.  
  11025. The setting range is decimal 00 to 59 + ENB bit. The RTC will not operate normally if any other
  11026. value is set.
  11027.  
  11028. The ENB bit in RMINAR is initialized by a power-on reset. The other fields in RMINAR are not
  11029. initialized by a power-on or manual reset, or in standby mode.
  11030.  
  11031. Bit: 7 6 5 4 3 2 1 0
  11032.  
  11033. ENB 10-minute units 1-minute units
  11034.  
  11035. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11036.  
  11037. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11038.  
  11039. Rev. 2.0, 02/99, page 232 of 830
  11040.  
  11041. ----------------------- Page 247-----------------------
  11042.  
  11043. 11.2.11 Hour Alarm Register (RHRAR)
  11044.  
  11045. RHRAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-
  11046. coded hour value counter, RHRCNT. When the ENB bit is set to 1, the RHRAR value is
  11047. compared with the RHRCNT value. Comparison between the counter and the alarm register is
  11048. performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  11049. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  11050. values all match.
  11051.  
  11052. The setting range is decimal 00 to 23 + ENB bit. The RTC will not operate normally if any other
  11053. value is set.
  11054.  
  11055. The ENB bit in RHRAR is initialized by a power-on reset. The other fields in RHRAR are not
  11056. initialized by a power-on or manual reset, or in standby mode.
  11057.  
  11058. Bit 6 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  11059.  
  11060. Bit: 7 6 5 4 3 2 1 0
  11061.  
  11062. ENB — 10-hour units 1-hour units
  11063.  
  11064. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  11065.  
  11066. R/W: R/W R R/W R/W R/W R/W R/W R/W
  11067.  
  11068. Rev. 2.0, 02/99, page 233 of 830
  11069.  
  11070. ----------------------- Page 248-----------------------
  11071.  
  11072. 11.2.12 Day-of-Week Alarm Register (RWKAR)
  11073.  
  11074. RWKAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-
  11075. coded day-of-week value counter, RWKCNT. When the ENB bit is set to 1, the RWKAR value
  11076. is compared with the RWKCNT value. Comparison between the counter and the alarm register
  11077. is performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  11078. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  11079. values all match.
  11080.  
  11081. The setting range is decimal 0 to 6 + ENB bit. The RTC will not operate normally if any other
  11082. value is set.
  11083.  
  11084. The ENB bit in RWKAR is initialized by a power-on reset. The other fields in RWKAR are not
  11085. initialized by a power-on or manual reset, or in standby mode.
  11086.  
  11087. Bits 6 to 3 are always read as 0. A write to these bits is invalid, but the write value should
  11088. always be 0.
  11089.  
  11090. Bit: 7 6 5 4 3 2 1 0
  11091.  
  11092. ENB — — — — Day of week
  11093.  
  11094. Initial value: 0 0 0 0 0 Undefined Undefined Undefined
  11095.  
  11096. R/W: R/W R R R R R/W R/W R/W
  11097.  
  11098. Day-of-week code 0 1 2 3 4 5 6
  11099.  
  11100. Day of week Sun Mon Tue Wed Thu Fri Sat
  11101.  
  11102. Rev. 2.0, 02/99, page 234 of 830
  11103.  
  11104. ----------------------- Page 249-----------------------
  11105.  
  11106. 11.2.13 Day Alarm Register (RDAYAR)
  11107.  
  11108. RDAYAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-
  11109. coded day value counter, RDAYCNT. When the ENB bit is set to 1, the RDAYAR value is
  11110. compared with the RDAYCNT value. Comparison between the counter and the alarm register is
  11111. performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  11112. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  11113. values all match.
  11114.  
  11115. The setting range is decimal 01 to 31 + ENB bit. The RTC will not operate normally if any other
  11116. value is set. The setting range for RDAYAR depends on the month and whether the year is a
  11117. leap year, so care is required when making the setting.
  11118.  
  11119. The ENB bit in RDAYAR is initialized by a power-on reset. The other fields in RDAYAR are
  11120. not initialized by a power-on or manual reset, or in standby mode.
  11121.  
  11122. Bit 6 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  11123.  
  11124. Bit: 7 6 5 4 3 2 1 0
  11125.  
  11126. ENB — 10-day units 1-day units
  11127.  
  11128. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  11129.  
  11130. R/W: R/W R R/W R/W R/W R/W R/W R/W
  11131.  
  11132. Rev. 2.0, 02/99, page 235 of 830
  11133.  
  11134. ----------------------- Page 250-----------------------
  11135.  
  11136. 11.2.14 Month Alarm Register (RMONAR)
  11137.  
  11138. RMONAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-
  11139. coded month value counter, RMONCNT. When the ENB bit is set to 1, the RMONAR value is
  11140. compared with the RMONCNT value. Comparison between the counter and the alarm register is
  11141. performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  11142. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  11143. values all match.
  11144.  
  11145. The setting range is decimal 01 to 12 + ENB bit. The RTC will not operate normally if any other
  11146. value is set.
  11147.  
  11148. The ENB bit in RMONAR is initialized by a power-on reset. The other fields in RMONAR are
  11149. not initialized by a power-on or manual reset, or in standby mode.
  11150.  
  11151. Bits 6 and 5 are always read as 0. A write to these bits is invalid, but the write value should
  11152. always be 0.
  11153.  
  11154. Bit: 7 6 5 4 3 2 1 0
  11155.  
  11156. ENB — — 10-month 1-month units
  11157. unit
  11158.  
  11159. Initial value: 0 0 0 Undefined Undefined Undefined Undefined Undefined
  11160.  
  11161. R/W: R/W R R R/W R/W R/W R/W R/W
  11162.  
  11163. Rev. 2.0, 02/99, page 236 of 830
  11164.  
  11165. ----------------------- Page 251-----------------------
  11166.  
  11167. 11.2.15 RTC Control Register 1 (RCR1)
  11168.  
  11169. RCR1 is an 8-bit readable/writable register containing a carry flag and alarm flag, plus flags to
  11170. enable or disable interrupts for these flags.
  11171.  
  11172. The CIE and AIE bits are initialized to 0 by a power-on or manual reset; the value of bits other
  11173. than CIE and AIE is undefined. In standby mode RCR1 is not initialized, and retains its current
  11174. value.
  11175.  
  11176. Bit: 7 6 5 4 3 2 1 0
  11177.  
  11178. CF — — CIE AIE — — AF
  11179.  
  11180. Initial value: Undefined Undefined Undefined 0 0 Undefined Undefined Undefined
  11181.  
  11182. R/W: R/W R R R/W R/W R R R/W
  11183.  
  11184. Bit 7—Carry Flag (CF): This flag is set to 1 on generation of a second counter carry, or a 64
  11185. Hz counter carry when the 64 Hz counter is read. The count register value read at this time is not
  11186. guaranteed, and so the count register must be read again.
  11187.  
  11188. Bit 7: CF Description
  11189.  
  11190. 0 No second counter carry, or 64 Hz counter carry when 64 Hz counter is
  11191. read
  11192.  
  11193. [Clearing condition]
  11194.  
  11195. When 0 is written to CF
  11196.  
  11197. 1 Second counter carry, or 64 Hz counter carry when 64 Hz counter is read
  11198.  
  11199. [Setting conditions]
  11200.  
  11201. • Generation of a second counter carry, or a 64 Hz counter carry when
  11202. the 64 Hz counter is read
  11203.  
  11204. • When 1 is written to CF
  11205.  
  11206. Bit 4—Carry Interrupt Enable Flag (CIE): Enables or disables interrupt generation when the
  11207. carry flag (CF) is set to 1.
  11208.  
  11209. Bit 4: CIE Description
  11210.  
  11211. 0 Carry interrupt is not generated when CF flag is set to 1 (Initial value)
  11212.  
  11213. 1 Carry interrupt is generated when CF flag is set to 1
  11214.  
  11215. Rev. 2.0, 02/99, page 237 of 830
  11216.  
  11217. ----------------------- Page 252-----------------------
  11218.  
  11219. Bit 3—Alarm Interrupt Enable Flag (AIE): Enables or disables interrupt generation when the
  11220. alarm flag (AF) is set to 1.
  11221.  
  11222. Bit 3: AIE Description
  11223.  
  11224. 0 Alarm interrupt is not generated when AF flag is set to 1 (Initial value)
  11225.  
  11226. 1 Alarm interrupt is generated when AF flag is set to 1
  11227.  
  11228. Bit 0—Alarm Flag (AF): Set to 1 when the alarm time set in those registers among RSECAR,
  11229. RMINAR, RHRAR, RWKAR, RDAYAR, and RMONAR in which the ENB bit is set to 1
  11230. matches the respective counter values.
  11231.  
  11232. Bit 0: AF Description
  11233.  
  11234. 0 Alarm registers and counter values do not match (Initial value)
  11235.  
  11236. [Clearing condition]
  11237.  
  11238. When 0 is written to AF
  11239.  
  11240. 1 Alarm registers and counter values match*
  11241.  
  11242. [Setting condition]
  11243.  
  11244. When alarm registers in which the ENB bit is set to 1 and counter values
  11245. match*
  11246.  
  11247. Note: * Writing 1 does not change the value.
  11248.  
  11249. Bits 6, 5, 2, and 1—Reserved. The initial value of these bits is undefined. A write to these bits
  11250. is invalid, but the write value should always be 0.
  11251.  
  11252. Rev. 2.0, 02/99, page 238 of 830
  11253.  
  11254. ----------------------- Page 253-----------------------
  11255.  
  11256. 11.2.16 RTC Control Register 2 (RCR2)
  11257.  
  11258. RCR2 is an 8-bit readable/writable register used for periodic interrupt control, 30-second
  11259. adjustment, and frequency divider RESET and RTC count control.
  11260.  
  11261. RCR2 is basically initialized to H'09 by a power-on reset, except that the value of the PEF bit is
  11262. undefined. In a manual reset, bits other than RTCEN and START are initialized, while the value
  11263. of the PEF bit is undefined. In standby mode RCR2 is not initialized, and retains its current
  11264. value.
  11265.  
  11266. Bit: 7 6 5 4 3 2 1 0
  11267.  
  11268. PEF PES2 PES1 PES0 RTCEN ADJ RESET START
  11269.  
  11270. Initial value: Undefined 0 0 0 1 0 0 1
  11271.  
  11272. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11273.  
  11274. Bit 7—Periodic Interrupt Flag (PEF): Indicates interrupt generation at the interval specified
  11275. by bits PES2–PES0. When this flag is set to 1, a periodic interrupt is generated.
  11276.  
  11277. Bit 7: PEF Description
  11278. 0 Interrupt is not generated at interval specified by bits PES2–PES0
  11279. [Clearing condition]
  11280. When 0 is written to PEF
  11281.  
  11282. 1 Interrupt is generated at interval specified by bits PES2–PES0
  11283. [Setting conditions]
  11284. • Generation of interrupt at interval specified by bits PES2–PES0
  11285. • When 1 is written to PEF
  11286.  
  11287. Bits 6 to 4—Periodic Interrupt Enable (PES2–PES0): These bits specify the period for
  11288. periodic interrupts.
  11289.  
  11290. Bit 6: PES2 Bit 5: PES1 Bit 4: PES0 Description
  11291. 0 0 0 No periodic interrupt generation (Initial value)
  11292.  
  11293. 1 Periodic interrupt generated at 1/256-second
  11294. intervals
  11295. 1 0 Periodic interrupt generated at 1/64-second intervals
  11296.  
  11297. 1 Periodic interrupt generated at 1/16-second intervals
  11298. 1 0 0 Periodic interrupt generated at 1/4-second intervals
  11299.  
  11300. 1 Periodic interrupt generated at 1/2-second intervals
  11301. 1 0 Periodic interrupt generated at 1-second intervals
  11302.  
  11303. 1 Periodic interrupt generated at 2-second intervals
  11304.  
  11305. Rev. 2.0, 02/99, page 239 of 830
  11306.  
  11307. ----------------------- Page 254-----------------------
  11308.  
  11309. Bit 3—Oscillator Enable (RTCEN): Controls the operation of the RTC’s crystal oscillator.
  11310.  
  11311. Bit 3: RTCEN Description
  11312.  
  11313. 0 RTC crystal oscillator is halted
  11314.  
  11315. 1 RTC crystal oscillator is operated (Initial value)
  11316.  
  11317. Bit 2—30-Second Adjustment (ADJ): Used for 30-second adjustment. When 1 is written to this
  11318. bit, a value up to 29 seconds is rounded down to 00 seconds, and a value of 30 seconds or more
  11319. is rounded up to 1 minute. The frequency divider circuits (RTC prescaler and R64CNT) are also
  11320. reset at this time. This bit always returns 0 if read.
  11321.  
  11322. Bit 2: ADJ Description
  11323.  
  11324. 0 Normal clock operation (Initial value)
  11325.  
  11326. 1 30-second adjustment performed
  11327.  
  11328. Bit 1—Reset (RESET): The frequency divider circuits are initialized by writing 1 to this bit.
  11329. When 1 is written to the RESET bit, the frequency divider circuits (RTC prescaler and R64CNT)
  11330. are reset and the RESET bit is automatically cleared to 0 (i.e. does not need to be written with
  11331. 0).
  11332.  
  11333. Bit 1: RESET Description
  11334.  
  11335. 0 Normal clock operation (Initial value)
  11336.  
  11337. 1 Frequency divider circuits are reset
  11338.  
  11339. Bit 0—Start Bit (START): Stops and restarts counter (clock) operation.
  11340.  
  11341. Bit 0: START Description
  11342.  
  11343. 0 Second, minute, hour, day, day-of-week, month, and year counters are
  11344. stopped*
  11345.  
  11346. 1 Second, minute, hour, day, day-of-week, month, and year counters operate
  11347. normally* (Initial value)
  11348.  
  11349. Note: * The 64 Hz counter continues to operate unless stopped by means of the RTCEN bit.
  11350.  
  11351. Rev. 2.0, 02/99, page 240 of 830
  11352.  
  11353. ----------------------- Page 255-----------------------
  11354.  
  11355. 11.3 Operation
  11356.  
  11357. Examples of the use of the RTC are shown below.
  11358.  
  11359. 11.3.1 Time Setting Procedures
  11360.  
  11361. Figure 11.2 shows examples of the time setting procedures.
  11362.  
  11363. Stop clock Set RCR2.RESET to 1
  11364. Reset frequency divider Clear RCR2.START to 0
  11365.  
  11366. Set second/minute/hour/day/ In any order
  11367. day-of-week/month/year
  11368.  
  11369. Start clock operation Set RCR2.START to 1
  11370.  
  11371. (a) Setting time after stopping clock
  11372.  
  11373. Clear RCR1.CF to 0
  11374. Clear carry flag
  11375. (Write 1 to RCR1.AF so that alarm flag
  11376. is not cleared)
  11377.  
  11378. Write to counter register Set RYRCNT first and RSECCNT last
  11379.  
  11380. Yes
  11381. Carry flag = 1? Read RCR1 register and check CF bit
  11382.  
  11383. No
  11384.  
  11385. (b) Setting time while clock is running
  11386.  
  11387. Figure 11.2 Examples of Time Setting Procedures
  11388.  
  11389. The procedure for setting the time after stopping the clock is shown in (a). The programming for
  11390. this method is simple, and it is useful for setting all the counters, from second to year.
  11391.  
  11392. The procedure for setting the time while the clock is running is shown in (b). This method is
  11393. useful for modifying only certain counter values (for example, only the second data or hour
  11394. data). If a carry occurs during the write operation, the write data is automatically updated and
  11395. there will be an error in the set data. The carry flag should therefore be used to check the write
  11396. status. If the carry flag (RCR1.CF) is set to 1, the write must be repeated.
  11397.  
  11398. The interrupt function can also be used to determine the carry flag status.
  11399.  
  11400. Rev. 2.0, 02/99, page 241 of 830
  11401.  
  11402. ----------------------- Page 256-----------------------
  11403.  
  11404. 11.3.2 Time Reading Procedures
  11405.  
  11406. Figure 11.3 shows examples of the time reading procedures.
  11407.  
  11408. Disable carry interrupts Clear RCR1.CIE to 0
  11409.  
  11410. Clear RCR1.CF to 0
  11411. Clear carry flag (Write 1 to RCR1.AF so that alarm flag
  11412. is not cleared)
  11413.  
  11414. Read counter register
  11415.  
  11416. Yes
  11417. Carry flag = 1? Read RCR1 register and check CF bit
  11418.  
  11419. No
  11420.  
  11421. (a) Reading time without using interrupts
  11422.  
  11423. Clear carry flag
  11424.  
  11425. Enable carry interrupts Set RCR1.CIE to 1
  11426.  
  11427. Clear RCR1.CF to 0
  11428. Clear carry flag (Write 1 to RCR1.AF so that alarm flag
  11429.  
  11430. is not cleared)
  11431.  
  11432. Read counter register
  11433.  
  11434. Yes
  11435. Interrupt generated?
  11436.  
  11437. No
  11438.  
  11439. Disable carry interrupts Clear RCR1.CIE to 0
  11440.  
  11441. (b) Reading time using interrupts
  11442.  
  11443. Figure 11.3 Examples of Time Reading Procedures
  11444.  
  11445. If a carry occurs while the time is being read, the correct time will not be obtained and the read
  11446. must be repeated. The procedure for reading the time without using interrupts is shown in (a),
  11447. and the procedure using carry interrupts in (b). The method without using interrupts is normally
  11448. used to keep the program simple.
  11449.  
  11450. Rev. 2.0, 02/99, page 242 of 830
  11451.  
  11452. ----------------------- Page 257-----------------------
  11453.  
  11454. 11.3.3 Alarm Function
  11455.  
  11456. The use of the alarm function is illustrated in figure 11.4.
  11457.  
  11458. Clock running
  11459.  
  11460. Disable alarm interrupts Clear RCR1.AIE to prevent erroneous interrupts
  11461.  
  11462. Set alarm time
  11463.  
  11464. Be sure to reset the flag as it may have been
  11465. Clear alarm flag
  11466. set during alarm time setting
  11467.  
  11468.  
  11469. Enable alarm interrupts Set RCR1.AIE to 1
  11470.  
  11471. Monitor alarm time
  11472. (Wait for interrupt or check
  11473. alarm flag)
  11474.  
  11475. Figure 11.4 Example of Use of Alarm Function
  11476.  
  11477. An alarm can be generated by the second, minute, hour, day-of-week, day, or month value, or a
  11478. combination of these. Write 1 to the ENB bit in the alarm registers involved in the alarm setting,
  11479. and set the alarm time in the lower bits. Write 0 to the ENB bit in registers not involved in the
  11480. alarm setting.
  11481.  
  11482. When the counter and the alarm time match, RCR1.AF is set to 1. Alarm detection can be
  11483. confirmed by reading this bit, but normally an interrupt is used. If 1 has been written to
  11484. RCR1.AIE, an alarm interrupt is generated in the event of alarm, enabling the alarm to be
  11485. detected.
  11486.  
  11487. The alarm flag remains set while the counter and alarm time match. If the alarm flag is cleared
  11488. by writing 0 during this period, it will therefore be set again immediately afterward. This needs
  11489. to be taken into consideration when writing the program.
  11490.  
  11491. Rev. 2.0, 02/99, page 243 of 830
  11492.  
  11493. ----------------------- Page 258-----------------------
  11494.  
  11495. 11.4 Interrupts
  11496.  
  11497. There are three kinds of RTC interrupt: alarm interrupts, periodic interrupts, and carry interrupts.
  11498.  
  11499. An alarm interrupt request (ATI) is generated when the alarm flag (AF) in RCR1 is set to 1
  11500. while the alarm interrupt enable bit (AIE) is also set to 1.
  11501.  
  11502. A periodic interrupt request (PRI) is generated when the periodic interrupt enable bits (PES2–
  11503. PES0) in RCR2 are set to a value other than 000 and the periodic interrupt flag (PEF) is set to 1.
  11504.  
  11505. A carry interrupt request (CUI) is generated when the carry flag (CF) in RCR1 is set to 1 while
  11506. the carry interrupt enable bit (CIE) is also set to 1.
  11507.  
  11508. 11.5 Usage Notes
  11509.  
  11510. 11.5.1 Register Initialization
  11511.  
  11512. After powering on and making the RCR1 register settings, reset the frequency divider (by setting
  11513. RCR2.RESET to 1) and make initial settings for all the other registers.
  11514.  
  11515. 11.5.2 Crystal Oscillator Circuit
  11516.  
  11517. Crystal oscillator circuit constants (recommended values) are shown in table 11.3, and the RTC
  11518. crystal oscillator circuit in figure 11.5.
  11519.  
  11520. Table 11.3 Crystal Oscillator Circuit Constants (Recommended Values)
  11521.  
  11522. f C C
  11523. osc in out
  11524.  
  11525. 32.768 kHz 10–22 pF 10–22 pF
  11526.  
  11527. Rev. 2.0, 02/99, page 244 of 830
  11528.  
  11529. ----------------------- Page 259-----------------------
  11530.  
  11531. SH7750
  11532. Rf
  11533. RD
  11534. VDD-RTC VSS-RTC EXTAL2 XTAL2
  11535.  
  11536. Noise filter XTAL
  11537.  
  11538. CRTC
  11539. C C
  11540. in out
  11541. RRTC
  11542.  
  11543. 3.3 V
  11544.  
  11545. Notes: 1. Select either the C or C side for the frequency adjustment variable capacitor according to
  11546. in out
  11547.  
  11548. requirements such as the adjustment range, degree of stability, etc.
  11549. 2. Built-in resistance value R (typ. value) = 10 MΩ, R (typ. value) = 400 kΩ
  11550. f D
  11551.  
  11552. 3. Cin and Cout values include floating capacitance due to the wiring. Take care when using a solid-
  11553. earth board.
  11554. 4. The crystal oscillation stabilization time depends on the mounted circuit constants, floating
  11555. capacitance, etc., and should be decided after consultation with the crystal resonator
  11556. manufacturer.
  11557. 5. Place the crystal resonator and load capacitors Cin and Cout as close as possible to the chip.
  11558. (Correct oscillation may not be possible if there is externally induced noise in the EXTAL2 and
  11559. XTAL2 pins.)
  11560. 6. Ensure that the crystal resonator connection pin (EXTAL2 and XTAL2) wiring is routed as far away
  11561. as possible from other power lines (except GND) and signal lines.
  11562. 7. Insert a noise filter in the RTC power supply.
  11563. The values of CRTC and RRTC depend on the bus and CPU frequency.
  11564.  
  11565. Figure 11.5 Example of Crystal Oscillator Circuit Connection
  11566.  
  11567. Rev. 2.0, 02/99, page 245 of 830
  11568.  
  11569. ----------------------- Page 260-----------------------
  11570.  
  11571. Rev. 2.0, 02/99, page 246 of 830
  11572.  
  11573. ----------------------- Page 261-----------------------
  11574.  
  11575. Section 12 Timer Unit (TMU)
  11576.  
  11577. 12.1 Overview
  11578.  
  11579. The SH7750 includes an on-chip 32-bit timer unit (TMU) comprising three 32-bit timer channels
  11580. (channels 0 to 2).
  11581.  
  11582. 12.1.1 Features
  11583.  
  11584. The TMU has the following features.
  11585.  
  11586. • Auto-reload type 32-bit down-counter provided for each channel
  11587. • Input capture function provided in channel 2
  11588. • Selection of rising edge or falling edge as external clock input edge when external clock is
  11589. selected or input capture function is used
  11590. • 32-bit timer constant register for auto-reload use, readable/writable at any time, and 32-bit
  11591. down-counter provided for each channel
  11592. • Selection of seven counter input clocks for each channel
  11593. External clock (TCLK), on-chip RTC output clock, five internal clocks (P /4, P /16, P /64,
  11594. φ φ φ
  11595. P /256, P /1024) (P is the peripheral module clock)
  11596. φ φ φ
  11597. • Each channel can also operate in module standby mode when the on-chip RTC output clock
  11598. is selected as the counter input clock; that is, timer operation continues even when the clock
  11599. has been stopped for the TMU.
  11600. Timer count operations using an external or internal clock are only possible when a clock is
  11601. supplied to the timer unit.
  11602. • Synchronous read operation
  11603. As the timer counters (TCNT) are serially modified 32-bit registers and the internal
  11604. peripheral module bus is 16 bits wide, there is a time difference when reading the upper 16
  11605. bits and lower 16 bits of TCNT. To prevent counter read value drift due to this time
  11606. difference, a synchronization circuit is provided that allows simultaneous reading of all 32
  11607. bits of the TCNT data.
  11608. • Two interrupt sources
  11609. One underflow source (channels 0 to 2) and one input capture source (channel 2)
  11610. • DMAC data transfer request capability
  11611. On channel 2, a data transfer request is sent to the DMAC when an input capture interrupt is
  11612. generated.
  11613.  
  11614. Rev. 2.0, 02/99, page 247 of 830
  11615.  
  11616. ----------------------- Page 262-----------------------
  11617.  
  11618. 12.1.2 Block Diagram
  11619.  
  11620. Figure 12.1 shows a block diagram of the TMU.
  11621.  
  11622. RESET, STBY, TUNI0 PCLK/4, 16, 64* TUNI1 TCLK RTCCLK TUNI2 TICPI2
  11623. etc.
  11624.  
  11625. TMU TCLK
  11626. control unit Prescaler control unit
  11627.  
  11628. To each To each
  11629. channel channel
  11630.  
  11631. TOCR
  11632.  
  11633. TSTR
  11634.  
  11635. Ch 0 Ch 1 Ch 2
  11636.  
  11637. Interrupt Interrupt Interrupt
  11638. Counter unit control unit Counter unit control unit Counter unit control unit
  11639.  
  11640. TCR0 TCOR0 TCNT0 TCR1 TCOR1 TCNT1 TCR2 TCOR2 TCNT2 TCPR2
  11641.  
  11642. Bus interface
  11643.  
  11644. Internal peripheral module bus
  11645.  
  11646. Note: * Signals with 1/4, 1/16, and 1/64 the Pφ frequency, supplied to the on-chip peripheral functions.
  11647.  
  11648. Figure 12.1 Block Diagram of TMU
  11649.  
  11650. 12.1.3 Pin Configuration
  11651.  
  11652. Table 12.1 shows the TMU pins.
  11653.  
  11654. Table 12.1 TMU Pins
  11655.  
  11656. Pin Name Abbreviation I/O Function
  11657.  
  11658. Clock input/clock output TCLK I/O External clock input pin/input capture
  11659. control input pin/RTC output pin
  11660. (shared with RTC)
  11661.  
  11662. Rev. 2.0, 02/99, page 248 of 830
  11663.  
  11664. ----------------------- Page 263-----------------------
  11665.  
  11666. 12.1.4 Register Configuration
  11667.  
  11668. Table 12.2 summarizes the TMU registers.
  11669.  
  11670. Table 12.2 TMU Registers
  11671.  
  11672. Initialization
  11673. Chan- Abbre- Area 7 Access
  11674. nel Name viation R/W Initial Value P4 Address Address Size
  11675.  
  11676. Power- Standby
  11677. On Manual Mode
  11678. Reset Reset
  11679.  
  11680. Com- Timer TOCR R/W InitializedInitializedHeld H'00 H’FFD80000 H'1FD80000 8
  11681. mon output
  11682. control
  11683. register
  11684.  
  11685. Timer TSTR R/W InitializedInitializedIni- H'00 H’FFD80004 H'1FD80004 8
  11686. start tialized*1
  11687.  
  11688. register
  11689.  
  11690. 0 Timer TCOR0 R/W InitializedInitializedHeld H'FFFFFFFF H’FFD80008 H'1FD80008 32
  11691. constant
  11692. register 0
  11693. Timer TCNT0 R/W InitializedInitializedHeld*2 H'FFFFFFFF H’FFD8000C H'1FD8000C 32
  11694.  
  11695. counter 0
  11696.  
  11697. Timer TCR0 R/W InitializedInitializedHeld H'0000 H’FFD80010 H'1FD80010 16
  11698. control
  11699. register 0
  11700.  
  11701. 1 Timer TCOR1 R/W InitializedInitializedHeld H'FFFFFFFF H’FFD80014 H'1FD80014 32
  11702. constant
  11703. register 1
  11704. Timer TCNT1 R/W InitializedInitializedHeld*2 H'FFFFFFFF H’FFD80018 H'1FD80018 32
  11705.  
  11706. counter 1
  11707.  
  11708. Timer TCR1 R/W InitializedInitializedHeld H'0000 H’FFD8001C H'1FD8001C 16
  11709. control
  11710. register 1
  11711.  
  11712. 2 Timer TCOR2 R/W InitializedInitializedHeld H'FFFFFFFF H’FFD80020 H'1FD80020 32
  11713. constant
  11714. register 2
  11715. Timer TCNT2 R/W InitializedInitializedHeld*2 H'FFFFFFFF H’FFD80024 H'1FD80024 32
  11716.  
  11717. counter 2
  11718.  
  11719. Timer TCR2 R/W InitializedInitializedHeld H'0000 H’FFD80028 H'1FD80028 16
  11720. control
  11721. register 2
  11722.  
  11723. Input TCPR2 R Held Held Held Undefined H’FFD8002C H'1FD8002C 32
  11724. capture
  11725. register
  11726.  
  11727. Notes: 1. Not initialized in module standby mode when the input clock is the on-chip RTC output
  11728. clock.
  11729. 2. Counts in module standby mode when the input clock is the on-chip RTC output clock.
  11730.  
  11731. Rev. 2.0, 02/99, page 249 of 830
  11732.  
  11733. ----------------------- Page 264-----------------------
  11734.  
  11735. 12.2 Register Descriptions
  11736.  
  11737. 12.2.1 Timer Output Control Register (TOCR)
  11738.  
  11739. TOCR is an 8-bit readable/writable register that specifies whether external pin TCLK is used as
  11740. the external clock or input capture control input pin, or as the on-chip RTC output clock output
  11741. pin.
  11742.  
  11743. TOCR is initialized to H'00 by a power-on or manual reset, but is not initialized in standby
  11744. mode.
  11745.  
  11746. Bit: 7 6 5 4 3 2 1 0
  11747.  
  11748. — — — — — — — TCOE
  11749.  
  11750. Initial value: 0 0 0 0 0 0 0 0
  11751.  
  11752. R/W: R R R R R R R R/W
  11753.  
  11754. Bits 7 to 1—Reserved: These bits are always read as 0. A write to these bits is invalid, but the
  11755. write value should always be 0.
  11756.  
  11757. Bit 0—Timer Clock Pin Control (TCOE): Specifies whether timer clock pin TCLK is used as
  11758. the external clock or input capture control input pin, or as the on-chip RTC output clock output
  11759. pin.
  11760.  
  11761. Bit 0: TCOE Description
  11762.  
  11763. 0 Timer clock pin (TCLK) is used as external clock input or input capture
  11764. control input pin (Initial value)
  11765.  
  11766. 1 Timer clock pin (TCLK) is used as on-chip RTC output clock output pin
  11767.  
  11768. Rev. 2.0, 02/99, page 250 of 830
  11769.  
  11770. ----------------------- Page 265-----------------------
  11771.  
  11772. 12.2.2 Timer Start Register (TSTR)
  11773.  
  11774. TSTR is an 8-bit readable/writable register that specifies whether the channel 0–2 timer counters
  11775. (TCNT) are operated or stopped.
  11776.  
  11777. TSTR is initialized to H'00 by a power-on or manual reset. In module standby mode, TSTR is
  11778. not initialized when the input clock selected by each channel is the on-chip RTC output clock
  11779. (RTCCLK), and is initialized only when the input clock is the external clock (TCLK) or internal
  11780. clock (Pφ).
  11781.  
  11782. Bit: 7 6 5 4 3 2 1 0
  11783.  
  11784. — — — — — STR2 STR1 STR0
  11785.  
  11786. Initial value: 0 0 0 0 0 0 0 0
  11787.  
  11788. R/W: R R R R R R/W R/W R/W
  11789.  
  11790. Bits 7 to 3—Reserved: These bits are always read as 0. A write to these bits is invalid, but the
  11791. write value should always be 0.
  11792.  
  11793. Bit 2—Counter Start 2 (STR2): Specifies whether timer counter 2 (TCNT2) is operated or
  11794. stopped.
  11795.  
  11796. Bit 2: STR2 Description
  11797.  
  11798. 0 TCNT2 count operation is stopped (Initial value)
  11799.  
  11800. 1 TCNT2 performs count operation
  11801.  
  11802. Bit 1—Counter Start 1 (STR1): Specifies whether timer counter 1 (TCNT1) is operated or
  11803. stopped.
  11804.  
  11805. Bit 1: STR1 Description
  11806.  
  11807. 0 TCNT1 count operation is stopped (Initial value)
  11808.  
  11809. 1 TCNT1 performs count operation
  11810.  
  11811. Bit 0—Counter Start 0 (STR0): Specifies whether timer counter 0 (TCNT0) is operated or
  11812. stopped.
  11813.  
  11814. Bit 0: STR0 Description
  11815.  
  11816. 0 TCNT0 count operation is stopped (Initial value)
  11817.  
  11818. 1 TCNT0 performs count operation
  11819.  
  11820. Rev. 2.0, 02/99, page 251 of 830
  11821.  
  11822. ----------------------- Page 266-----------------------
  11823.  
  11824. 12.2.3 Timer Constant Registers (TCOR)
  11825.  
  11826. The TCOR registers are 32-bit readable/writable registers. There are three TCOR registers, one
  11827. for each channel.
  11828.  
  11829. When a TCNT counter underflows while counting down, the TCOR value is set in that TCNT,
  11830. which continues counting down from the set value.
  11831.  
  11832. The TCOR registers are initialized to H'FFFFFFFF by a power-on or manual reset, but are not
  11833. initialized and retain their contents in standby mode.
  11834.  
  11835. Bit: 31 30 29 2 1 0
  11836.  
  11837. · · · · · · · · · · · · ·
  11838.  
  11839. Initial value: 1 1 1 1 1 1
  11840.  
  11841. R/W: R/W R/W R/W R/W R/W R/W
  11842.  
  11843. 12.2.4 Timer Counters (TCNT)
  11844.  
  11845. The TCNT registers are 32-bit readable/writable registers. There are three TCNT registers, one
  11846. for each channel.
  11847.  
  11848. Each TCNT counts down on the input clock selected by TPSC2–TPSC0 in the timer control
  11849. register (TCR).
  11850.  
  11851. When a TCNT counter underflows while counting down, the underflow flag (UNF) is set in the
  11852. corresponding timer control register (TCR). At the same time, the timer constant register
  11853. (TCOR) value is set in TCNT, and the count-down operation continues from the set value.
  11854.  
  11855. As the TCNT registers are serially modified 32-bit registers and the internal peripheral module
  11856. bus is 16 bits wide, there is a time difference when reading the upper 16 bits and lower 16 bits of
  11857. TCNT. To prevent counter read value drift due to this time difference, a synchronization circuit
  11858. is provided. When the upper 16 bits are read, the lower 16 bits are simultaneously stored in a
  11859. buffer register. After the upper 16 bits are read, the lower 16 bits are read from the buffer
  11860. register.
  11861.  
  11862. The TCNT registers are initialized to H'FFFFFFFF by a power-on or manual reset, but are not
  11863. initialized and retain their contents in standby mode.
  11864.  
  11865. Bit: 31 30 29 2 1 0
  11866.  
  11867. · · · · · · · · · · · · ·
  11868.  
  11869. Initial value: 1 1 1 1 1 1
  11870.  
  11871. R/W: R/W R/W R/W R/W R/W R/W
  11872.  
  11873. Rev. 2.0, 02/99, page 252 of 830
  11874.  
  11875. ----------------------- Page 267-----------------------
  11876.  
  11877. When the input clock is the on-chip RTC output clock (RTCCLK), TCNT counts even in
  11878. module standby mode (that is, when the clock for the TMU is stopped). When the input clock is
  11879. the external clock (TCLK) or internal clock (Pφ), TCNT contents are retained in standby mode.
  11880.  
  11881. 12.2.5 Timer Control Registers (TCR)
  11882.  
  11883. The TCR registers are 16-bit readable/writable registers. There are three TCR registers, one for
  11884. each channel.
  11885.  
  11886. Each TCR selects the count clock, specifies the edge when an external clock is selected, and
  11887. controls interrupt generation when the flag indicating timer counter (TCNT) underflow is set to
  11888. 1. TCR2 is also used for channel 2 input capture control, and control of interrupt generation in
  11889. the event of input capture.
  11890.  
  11891. The TCR registers are initialized to H'0000 by a power-on or manual reset, but are not initialized
  11892. in standby mode.
  11893.  
  11894. 1. Channel 0 and 1 TCR bit configuration
  11895.  
  11896. Bit: 15 14 13 12 11 10 9 8
  11897. — — — — — — — UNF
  11898. Initial value: 0 0 0 0 0 0 0 0
  11899. R/W: R R R R R R R R/W
  11900.  
  11901. Bit: 7 6 5 4 3 2 1 0
  11902. — — UNIE CKEG1 CKEG0 TPSC2 TPSC1 TPSC0
  11903.  
  11904. Initial value: 0 0 0 0 0 0 0 0
  11905. R/W: R R R/W R/W R/W R/W R/W R/W
  11906.  
  11907. 2. Channel 2 TCR bit configuration
  11908.  
  11909. Bit: 15 14 13 12 11 10 9 8
  11910.  
  11911. — — — — — — ICPF UNF
  11912.  
  11913. Initial value: 0 0 0 0 0 0 0 0
  11914.  
  11915. R/W: R R R R R R/W R/W R/W
  11916.  
  11917. Bit: 7 6 5 4 3 2 1 0
  11918.  
  11919. ICPE1 ICPE0 UNIE CKEG1 CKEG0 TPSC2 TPSC1 TPSC0
  11920.  
  11921. Initial value: 0 0 0 0 0 0 0 0
  11922.  
  11923. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11924.  
  11925. Rev. 2.0, 02/99, page 253 of 830
  11926.  
  11927. ----------------------- Page 268-----------------------
  11928.  
  11929. Bits 15 to 9, 7, and 6 (Channels 0 and 1); Bits 15 to 10 (Channel 2)—Reserved: These bits
  11930. are always read as 0. A write to these bits is invalid, but the write value should always be 0.
  11931.  
  11932. Bit 9—Input Capture Interrupt Flag (ICPF) (Channel 2 Only): Status flag, provided in
  11933. channel 2 only, that indicates the occurrence of input capture.
  11934.  
  11935. Bit 9: ICPF Description
  11936.  
  11937. 0 Input capture has not occurred (Initial value)
  11938.  
  11939. [Clearing condition]
  11940.  
  11941. When 0 is written to ICPF
  11942.  
  11943. 1 Input capture has occurred
  11944.  
  11945. [Setting condition]
  11946.  
  11947. When input capture occurs*
  11948.  
  11949. Note: * Writing 1 does not change the value.
  11950.  
  11951. Bit 8—Underflow Flag (UNF): Status flag that indicates the occurrence of underflow.
  11952.  
  11953. Bit 8: UNF Description
  11954.  
  11955. 0 TCNT has not underflowed (Initial value)
  11956.  
  11957. [Clearing condition]
  11958.  
  11959. When 0 is written to UNF
  11960.  
  11961. 1 TCNT has underflowed
  11962.  
  11963. [Setting condition]
  11964.  
  11965. When TCNT underflows*
  11966.  
  11967. Note: * Writing 1 does not change the value.
  11968.  
  11969. Bits 7 and 6—Input Capture Control (ICPE1, ICPE0) (Channel 2 Only): These bits,
  11970. provided in channel 2 only, specify whether the input capture function is used, and control
  11971. enabling or disabling of interrupt generation when the function is used.
  11972.  
  11973. When the input capture function is used, a data transfer request is sent to the DMAC in the event
  11974. of input capture.
  11975.  
  11976. When using the input capture function, the TCLK pin must be designated as an input pin with
  11977. the TCOE bit in the TOCR register. The CKEG bits specify whether the rising edge or falling
  11978. edge of the TCLK signal is used to set the TCNT2 value in the input capture register (TCPR2).
  11979.  
  11980. Rev. 2.0, 02/99, page 254 of 830
  11981.  
  11982. ----------------------- Page 269-----------------------
  11983.  
  11984. The TCNT2 value is set in TCPR2 only when the TCR2.ICPF bit is 0. When the TCR2.ICPF bit
  11985. is 1, TCPR2 is not set in the event of input capture. When input capture occurs, a DMAC
  11986. transfer request is generated regardless of the value of the TCR2.ICPF bit. However, a new
  11987. DMAC transfer request is not generated until processing of the previous request is finished.
  11988.  
  11989. Bit 7: ICPE1 Bit 6: ICPE0 Description
  11990.  
  11991. 0 0 Input capture function is not used (Initial value)
  11992.  
  11993. 1 Reserved (Do not set)
  11994.  
  11995. 1 0 Input capture function is used, but interrupt due to input
  11996. capture (TICPI2) is not enabled
  11997.  
  11998. Data transfer request is sent to DMAC in the event of input
  11999. capture
  12000.  
  12001. 1 Input capture function is used, and interrupt due to input
  12002. capture (TICPI2) is enabled
  12003.  
  12004. Data transfer request is sent to DMAC in the event of input
  12005. capture
  12006.  
  12007. Bit 5—Underflow Interrupt Control (UNIE): Controls enabling or disabling of interrupt
  12008. generation when the UNF status flag is set to 1, indicating TCNT underflow.
  12009.  
  12010. Bit 5: UNIE Description
  12011.  
  12012. 0 Interrupt due to underflow (TUNI) is not enabled (Initial value)
  12013.  
  12014. 1 Interrupt due to underflow (TUNI) is enabled
  12015.  
  12016. Bits 4 and 3—Clock Edge 1 and 0 (CKEG1, CKEG0): These bits select the external clock
  12017. input edge when an external clock is selected or the input capture function is used.
  12018.  
  12019. Bit 4: CKEG1 Bit 3: CKEG0 Description
  12020.  
  12021. 0 0 Count/input capture register set on rising edge (Initial value)
  12022.  
  12023. 1 Count/input capture register set on falling edge
  12024.  
  12025. 1 X Count/input capture register set on both rising and falling
  12026. edges
  12027.  
  12028. Note: X: 0 or 1 (don’t care)
  12029.  
  12030. Rev. 2.0, 02/99, page 255 of 830
  12031.  
  12032. ----------------------- Page 270-----------------------
  12033.  
  12034. Bits 2 to 0—Timer Prescaler 2 to 0 (TPSC2–TPSC0): These bits select the TCNT count
  12035. clock.
  12036.  
  12037. When the on-chip RTC output clock is selected as the count clock for a channel, that channel
  12038. can operate even in module standby mode. When another clock is selected, the channel does not
  12039. operate in standby mode.
  12040.  
  12041. Bit 2: TPSC2 Bit 1: TPSC1 Bit 0: TPSC0 Description
  12042.  
  12043. 0 0 0 Counts on Pφ/4 (Initial value)
  12044.  
  12045. 1 Counts on Pφ/16
  12046.  
  12047. 1 0 Counts on Pφ/64
  12048.  
  12049. 1 Counts on Pφ/256
  12050.  
  12051. 1 0 0 Counts on Pφ/1024
  12052.  
  12053. 1 Reserved (Do not set)
  12054.  
  12055. 1 0 Counts on on-chip RTC output clock
  12056.  
  12057. 1 Counts on external clock
  12058.  
  12059. 12.2.6 Input Capture Register (TCPR2)
  12060.  
  12061. TCPR2 is a 32-bit read-only register for use with the input capture function, provided only in
  12062. channel 2.
  12063.  
  12064. The input capture function is controlled by means of the input capture control bits (ICPE1,
  12065. ICPE0) and clock edge bits (CKEG1, CKEG0) in TCR2. When input capture occurs, the TCNT2
  12066. value is copied into TCPR2. The value is set in TCPR2 only when the ICPF bit in TCR2 is 0.
  12067.  
  12068. TCPR2 is not initialized by a power-on or manual reset, or in standby mode.
  12069.  
  12070. Bit: 31 30 29 2 1 0
  12071.  
  12072. · · · · · · · · · · · · ·
  12073.  
  12074. Initial value: Undefined
  12075.  
  12076. R/W: R R R R R R
  12077.  
  12078. Rev. 2.0, 02/99, page 256 of 830
  12079.  
  12080. ----------------------- Page 271-----------------------
  12081.  
  12082. 12.3 Operation
  12083.  
  12084. Each channel has a 32-bit timer counter (TCNT) that performs count-down operations, and a 32-
  12085. bit timer constant register (TCOR). The channels have an auto-reload function that allows cyclic
  12086. count operations, and can also perform external event counting. Channel 2 also has an input
  12087. capture function.
  12088.  
  12089. 12.3.1 Counter Operation
  12090.  
  12091. When one of bits STR0–STR2 is set to 1 in the timer start register (TSTR), the timer counter
  12092. (TCNT) for the corresponding channel starts counting. When TCNT underflows, the UNF flag is
  12093. set in the corresponding timer control register (TCR). If the UNIE bit in TCR is set to 1 at this
  12094. time, an interrupt request is sent to the CPU. At the same time, the value is copied from TCOR
  12095. into TCNT, and the count-down continues (auto-reload function).
  12096.  
  12097. Example of Count Operation Setting Procedure: Figure 12.2 shows an example of the count
  12098. operation setting procedure.
  12099.  
  12100. 1. Select the count clock with bits TPSC2–TPSC0 in the timer control register (TCR). When an
  12101. external clock is selected, set the TCLK pin to input mode with the TCOE bit in TOCR, and
  12102. select the external clock edge with bits CKEG1 and CKEG0 in TCR.
  12103. 2. Specify whether an interrupt is to be generated on TCNT underflow with the UNIE bit in
  12104. TCR.
  12105. 3. When the input capture function is used, set the ICPE bits in TCR, including specification of
  12106. whether the interrupt function is to be used.
  12107. 4. Set a value in the timer constant register (TCOR).
  12108. 5. Set the initial value in the timer counter (TCNT).
  12109. 6. Set the STR bit to 1 in the timer start register (TSTR) to start the count.
  12110.  
  12111. Rev. 2.0, 02/99, page 257 of 830
  12112.  
  12113. ----------------------- Page 272-----------------------
  12114.  
  12115. Operation selection
  12116.  
  12117. Select count clock 1
  12118.  
  12119. Underflow interrupt
  12120. 2
  12121. generation setting
  12122.  
  12123. When input capture
  12124. function is used
  12125.  
  12126. Input capture interrupt 3
  12127. generation setting
  12128.  
  12129. Timer constant
  12130. 4
  12131. register setting
  12132.  
  12133. Set initial timer
  12134. 5
  12135. counter value
  12136.  
  12137. Start count 6
  12138.  
  12139.  
  12140.  
  12141. Note: When an interrupt is generated, clear the source flag in the interrupt handler. If the interrupt
  12142. enabled state is set without clearing the flag, another interrupt will be generated.
  12143.  
  12144. Figure 12.2 Example of Count Operation Setting Procedure
  12145.  
  12146. Auto-Reload Count Operation: Figure 12.3 shows the TCNT auto-reload operation.
  12147.  
  12148. TCNT value
  12149. TCOR value set in TCNT
  12150. on underflow
  12151. TCOR
  12152.  
  12153. H'00000000 Time
  12154.  
  12155. STR0–STR2
  12156.  
  12157. UNF
  12158.  
  12159. Figure 12.3 TCNT Auto-Reload Operation
  12160.  
  12161. Rev. 2.0, 02/99, page 258 of 830
  12162.  
  12163. ----------------------- Page 273-----------------------
  12164.  
  12165. TCNT Count Timing:
  12166.  
  12167. • Operating on internal clock
  12168. Any of five count clocks (Pφ/4, Pφ/16, Pφ/64, Pφ/256, or Pφ/1024) scaled from the peripheral
  12169. module clock can be selected as the count clock by means of the TPSC2–TPSC0 bits in
  12170. TCR.
  12171. Figure 12.4 shows the timing in this case.
  12172.  
  12173. Pφ
  12174.  
  12175. Internal clock
  12176.  
  12177. TCNT N + 1 N N – 1
  12178.  
  12179. Figure 12.4 Count Timing when Operating on Internal Clock
  12180.  
  12181. • Operating on external clock
  12182. External clock pin (TCLK) input can be selected as the timer clock by means of the TPSC2–
  12183. TPSC0 bits in TCR. The detected edge (rising, falling, or both edges) can be selected with
  12184. the CKEG1 and CKEG0 bits in TCR.
  12185. Figure 12.5 shows the timing for both-edge detection.
  12186.  
  12187. Pφ
  12188.  
  12189. External clock
  12190. input pin
  12191.  
  12192. TCNT N + 1 N N – 1
  12193.  
  12194. Figure 12.5 Count Timing when Operating on External Clock
  12195.  
  12196. Rev. 2.0, 02/99, page 259 of 830
  12197.  
  12198. ----------------------- Page 274-----------------------
  12199.  
  12200. • Operating on on-chip RTC output clock
  12201. The on-chip RTC output clock can be selected as the timer clock by means of the TPSC2–
  12202. TPSC0 bits in TCR. Figure 12.6 shows the timing in this case.
  12203.  
  12204. RTC output clock
  12205.  
  12206. TCNT N + 1 N N – 1
  12207.  
  12208. Figure 12.6 Count Timing when Operating on On-Chip RTC Output Clock
  12209.  
  12210. 12.3.2 Input Capture Function
  12211.  
  12212. Channel 2 has an input capture function.
  12213.  
  12214. The procedure for using the input capture function is as follows:
  12215.  
  12216. 1. Use the TCOE bit in the timer output control register (TOCR) to set the TCLK pin to input
  12217. mode.
  12218. 2. Use bits TPSC2–TPSC0 in the timer control register (TCR) to set an internal clock or the on-
  12219. chip RTC output clock as the timer operating clock.
  12220. 3. Use bits IPCE1 and IPCE0 in TCR to specify use of the input capture function, and whether
  12221. interrupts are to generated when this function is used.
  12222. 4. Use bits CKEG1 and CKEG0 in TCR to specify whether the rising or falling edge of the
  12223. TCLK signal is to be used to set the timer counter (TCNT) value in the input capture register
  12224. (TCPR2).
  12225.  
  12226. This function cannot be used in standby mode.
  12227.  
  12228. When input capture occurs, the TCNT2 value is set in TCPR2 only when the ICPF bit in TCR2
  12229. is 0. Also, a new DMAC transfer request is not generated until processing of the previous request
  12230. is finished.
  12231.  
  12232. Rev. 2.0, 02/99, page 260 of 830
  12233.  
  12234. ----------------------- Page 275-----------------------
  12235.  
  12236. Figure 12.7 shows the operation timing when the input capture function is used (with TCLK
  12237. rising edge detection).
  12238.  
  12239. TCOR value set in TCNT
  12240. TCNT value on underflow
  12241.  
  12242. TCOR
  12243.  
  12244. H'00000000 Time
  12245.  
  12246. TCLK
  12247.  
  12248. TCPR2 TCNT value set
  12249.  
  12250. TICPI2
  12251.  
  12252. Figure 12.7 Operation Timing when Using Input Capture Function
  12253.  
  12254. Rev. 2.0, 02/99, page 261 of 830
  12255.  
  12256. ----------------------- Page 276-----------------------
  12257.  
  12258. 12.4 Interrupts
  12259.  
  12260. There are four TMU interrupt sources, comprising underflow interrupts and the input capture
  12261. interrupt (when the input capture function is used). Underflow interrupts are generated on
  12262. channels 0 to 2, and input capture interrupts on channel 2 only.
  12263.  
  12264. An underflow interrupt request is generated (for each channel) according to the AND of UNF
  12265. and the interrupt enable bit (UNIE) in TCR.
  12266.  
  12267. When the input capture function is used and an input capture request is generated, an interrupt is
  12268. requested if the input capture input flag (ICPF) in TCR2 is 1 and the input capture control bits
  12269. (ICPE1, ICPE0) in TCR2 are 11.
  12270.  
  12271. The TMU interrupt sources are summarized in table 12.3.
  12272.  
  12273. Table 12.3 TMU Interrupt Sources
  12274.  
  12275. Channel Interrupt Source Description Priority
  12276.  
  12277. 0 TUNI0 Underflow interrupt 0 High
  12278.  
  12279. 1 TUNI1 Underflow interrupt 1 ↑
  12280.  
  12281. 2 TUNI2 Underflow interrupt 2 ↓
  12282.  
  12283. TICPI2 Input capture interrupt 2 Low
  12284.  
  12285. Rev. 2.0, 02/99, page 262 of 830
  12286.  
  12287. ----------------------- Page 277-----------------------
  12288.  
  12289. 12.5 Usage Notes
  12290.  
  12291. 12.5.1 Register Writes
  12292.  
  12293. When performing a register write, timer count operation must be stopped by clearing the start bit
  12294. (STR0–STR2) for the relevant channel in the timer start register (TSTR).
  12295.  
  12296. 12.5.2 TCNT Register Reads
  12297.  
  12298. When performing a TCNT register read, processing for synchronization with the timer count
  12299. operation is performed. If a timer count operation and register read processing are performed
  12300. simultaneously, the TCNT counter value prior to the count-down operation is read by means of
  12301. the synchronization processing.
  12302.  
  12303. 12.5.3 Resetting the RTC Frequency Divider
  12304.  
  12305. When the on-chip RTC output clock is selected as the count clock, the RTC frequency divider
  12306. should be reset.
  12307.  
  12308. 12.5.4 External Clock Frequency
  12309.  
  12310. Ensure that the external clock frequency for any channel does not exceed Pφ/4.
  12311.  
  12312. Rev. 2.0, 02/99, page 263 of 830
  12313.  
  12314. ----------------------- Page 278-----------------------
  12315.  
  12316. Rev. 2.0, 02/99, page 264 of 830
  12317.  
  12318. ----------------------- Page 279-----------------------
  12319.  
  12320. Section 13 Bus State Controller (BSC)
  12321.  
  12322. 13.1 Overview
  12323.  
  12324. The functions of the bus state controller (BSC) include division of the physical address space,
  12325. and output of control signals in accordance with various types of memory and bus interface
  12326. specifications. The BSC functions allow DRAM, synchronous DRAM, SRAM, ROM, etc., to be
  12327. connected directly to the SH7750 without the use of external circuitry, and also support the
  12328. PCMCIA interface protocol, enabling system design to be simplified and data transfers to be
  12329. carried out at high speed by a compact system.
  12330.  
  12331. 13.1.1 Features
  12332.  
  12333. The BSC has the following features:
  12334.  
  12335. • Physical address space is managed as 7 independent areas
  12336.  Maximum 64 Mbytes for each of areas 0 to 6
  12337.  Bus width of each area can be set in a register (except area 0, which uses an external pin
  12338. setting)
  12339.  Wait state insertion by 5'< pin
  12340.  Wait state insertion can be controlled by program
  12341.  Specification of types of memory connectable to each area
  12342.  Output of control signals allowing direct connection of memory to each area
  12343.  Automatic wait cycle insertion to prevent data bus collisions in case of consecutive
  12344. memory accesses to different areas, or a read access followed by a write access to the
  12345. same area
  12346.  Write strobe setup time and hold time periods can be inserted in a write cycle to enable
  12347. connection to low-speed memory
  12348. • Normal memory (SRAM) interface
  12349.  Wait state insertion can be controlled by program
  12350.  Wait state insertion by 5'< pin
  12351. Connectable areas: 0 to 6
  12352. Settable bus widths: 64, 32, 16, 8
  12353. • DRAM interface
  12354.  Row address/column address multiplexing according to DRAM capacity
  12355.  Burst operation (fast page mode, EDO mode)
  12356.  CAS-before-RAS refresh and self-refresh
  12357.  8-CAS byte control for power-down operation
  12358.  DRAM connection control signal timing can be controlled by register settings
  12359.  
  12360. Rev. 2.0, 02/99, page 265 of 830
  12361.  
  12362. ----------------------- Page 280-----------------------
  12363.  
  12364.  Consecutive accesses to the same row address
  12365. Connectable areas: 2, 3
  12366. Settable bus widths: 64, 32, 16
  12367. • Synchronous DRAM interface
  12368.  Row address/column address multiplexing according to synchronous DRAM capacity
  12369.  Burst operation
  12370.  Auto-refresh and self-refresh
  12371.  Synchronous DRAM connection control signal timing can be controlled by register
  12372. settings
  12373.  Consecutive accesses to the same row address
  12374. Connectable areas: 2, 3
  12375. Settable bus widths: 64, 32
  12376. • Burst ROM interface
  12377.  Wait state insertion can be controlled by program
  12378.  Burst operation, executing the number of transfers set in a register
  12379. Connectable areas: 0, 5, 6
  12380. Settable bus widths: 32, 16, 8
  12381. • MPX bus interface
  12382.  Address/data multiplexing
  12383. Connectable areas: 0 to 6
  12384. Settable bus widths: 64, 32
  12385. • Byte control SRAM interface
  12386.  SRAM interface with byte control
  12387. Connectable areas: 1, 4
  12388. Settable bus widths: 64, 32, 16
  12389. • PCMCIA interface
  12390.  Wait state insertion can be controlled by program
  12391.  Bus sizing function for I/O bus width
  12392. • Fine refreshing control
  12393.  Supports refresh operation immediately after self-refresh operation in low-power DRAM
  12394. by means of refresh counter overflow interrupt function
  12395. • Refresh counter can be used as interval timer
  12396.  Interrupt request generated by compare-match
  12397.  Interrupt request generated by refresh counter overflow
  12398.  
  12399. Rev. 2.0, 02/99, page 266 of 830
  12400.  
  12401. ----------------------- Page 281-----------------------
  12402.  
  12403. 13.1.2 Block Diagram
  12404.  
  12405. Figure 13.1 shows a block diagram of the BSC.
  12406.  
  12407. s
  12408. u
  12409. b
  12410.  
  12411. l
  12412. a
  12413. n
  12414. r
  12415. e
  12416. Bus t
  12417. n
  12418. I
  12419. interface
  12420.  
  12421. WCR1
  12422. Wait
  12423. RDY
  12424. control unit WCR2
  12425.  
  12426. WCR3
  12427.  
  12428. CS6–CS0 Area BCR1
  12429. CE2A–CE2B control unit
  12430.  
  12431. BCR2
  12432. BS
  12433. RD
  12434. RD/WR MCR s
  12435. u
  12436. b
  12437. WE7–WE0
  12438. e
  12439. l
  12440. RAS u
  12441. d
  12442. CAS, CASxx Memory o
  12443. CKE control unit M
  12444. ICIORD, ICIOWR PCR
  12445.  
  12446. REG
  12447. IOIS16 RFCR
  12448.  
  12449. s
  12450. u
  12451. b RTCNT
  12452.  
  12453. l
  12454. a
  12455. r
  12456. e
  12457. Interrupt h Refresh
  12458. p Comparator
  12459. i
  12460. controller r control unit
  12461. e
  12462. P
  12463.  
  12464. RTCOR
  12465.  
  12466. RTCSR
  12467.  
  12468. BSC
  12469.  
  12470. WCR: Wait control register RFCR: Refresh count register
  12471. BCR: Bus control register RTCNT: Refresh timer count register
  12472. MCR: Memory control register RTCOR: Refresh time constant register
  12473. PCR: PCMCIA control register RTCSR: Refresh timer control/status register
  12474.  
  12475. Figure 13.1 Block Diagram of BSC
  12476.  
  12477. Rev. 2.0, 02/99, page 267 of 830
  12478.  
  12479. ----------------------- Page 282-----------------------
  12480.  
  12481. 13.1.3 Pin Configuration
  12482.  
  12483. Table 13.1 shows the BSC pin configuration.
  12484.  
  12485. Table 13.1 BSC Pins
  12486.  
  12487. Name Signals I/O Description
  12488.  
  12489. Address bus A25–A0 O Address output
  12490.  
  12491. Data bus D63–D52, I/O Data input/output
  12492. D51–D32
  12493. When port functions are used, D51–D32 cannot be
  12494. used. Leave open.
  12495.  
  12496. Data bus/port D51–D32/ I/O When port functions are not used: data input/output
  12497. PORT19–
  12498. When port functions are used: input/output port
  12499. PORT0
  12500. (input or output set for each bit by register)
  12501.  
  12502. Bus cycle start %6 O Signal that indicates the start of a bus cycle
  12503.  
  12504. When using synchronous DRAM: asserted once for
  12505. a burst transfer
  12506.  
  12507. For other burst transfers: asserted each data cycle
  12508.  
  12509. Chip select 6–0 &6–&6 O Chip select signals that indicate the area being
  12510. accessed
  12511.  
  12512. &6 and &6 are also used as PCMCIA &($ and
  12513. &(%
  12514.  
  12515. Read/write RD/:5 O Data bus input/output direction designation signal
  12516.  
  12517. Also used as the DRAM/synchronous
  12518. DRAM/PCMCIA write designation signal
  12519.  
  12520. Row address 5$6 O 5$6 signal when using DRAM/synchronous DRAM
  12521. strobe
  12522.  
  12523. Read/column 5'/&$66/ O Strobe signal that indicates a read cycle
  12524. address strobe/ )5$0(
  12525. When using synchronous DRAM: &$6 signal
  12526. cycle frame
  12527. When using MPX bus: )5$0( signal
  12528.  
  12529. Data enable 0 :(/&$6/ O When using synchronous DRAM: selection signal
  12530. DQM0 for D7–D0
  12531.  
  12532. When using DRAM: &$6 signal for D7–D0
  12533.  
  12534. In other cases: write strobe signal for D7–D0
  12535.  
  12536. Data enable 1 :(/&$6/ O When using synchronous DRAM: selection signal
  12537. DQM1 for D15–D8
  12538.  
  12539. When using DRAM: &$6 signal for D15–D8
  12540.  
  12541. When using PCMCIA: write strobe signal
  12542.  
  12543. In other cases: write strobe signal for D15–D8
  12544.  
  12545. Rev. 2.0, 02/99, page 268 of 830
  12546.  
  12547. ----------------------- Page 283-----------------------
  12548.  
  12549. Table 13.1 BSC Pins (cont)
  12550.  
  12551. Name Signals I/O Description
  12552.  
  12553. Data enable 2 :(/&$6/ O When using synchronous DRAM: selection signal
  12554. DQM2/,&,25' for D23–D16
  12555.  
  12556. When using DRAM: &$6 signal for D23–D16
  12557.  
  12558. When using PCMCIA: ,&,25' signal
  12559.  
  12560. In other cases: write strobe signal for D23–D16
  12561.  
  12562. Data enable 3 :(/&$6/ O When using synchronous DRAM: selection signal
  12563. DQM3/,&,2:5 for D31–D24
  12564.  
  12565. When using DRAM: &$6 signal for D31–D24
  12566.  
  12567. When using PCMCIA: ,&,2:5 signal
  12568.  
  12569. In other cases: write strobe signal for D31–D24
  12570.  
  12571. Data enable 4 :(/&$6/ O When using synchronous DRAM: selection signal
  12572. DQM4 for D39–D32
  12573.  
  12574. When using DRAM: &$6 signal for D39–D32
  12575.  
  12576. In other cases: write strobe signal for D39–D32
  12577.  
  12578. Data enable 5 :(/&$6/ O When using synchronous DRAM: selection signal
  12579. DQM5 for D47–D40
  12580.  
  12581. When using DRAM: &$6 signal for D47–D40
  12582.  
  12583. In other cases: write strobe signal for D47–D40
  12584.  
  12585. Data enable 6 :(/&$6/ O When using synchronous DRAM: selection signal
  12586. DQM6 for D55–D48
  12587.  
  12588. When using DRAM: &$6 signal for D55–D48
  12589.  
  12590. In other cases: write strobe signal for D55–D48
  12591.  
  12592. Data enable 7 :(/&$6/ O When using synchronous DRAM: selection signal
  12593. DQM7/5(* for D63–D56
  12594.  
  12595. When using DRAM: &$6 signal for D63–D56
  12596.  
  12597. When using PCMCIA: 5(* signal
  12598.  
  12599. In other cases: write strobe signal for D63–D56
  12600.  
  12601. Ready 5'< I Wait state request signal
  12602.  
  12603. Area 0 MPX bus MD6/,2,6 I In power-on reset: Designates area 0 bus as MPX
  12604. specification/16-bit bus (1: SRAM, 0: MPX)
  12605. I/O
  12606. When using PCMCIA: 16-bit I/O designation signal.
  12607. Valid only in little-endian mode.
  12608.  
  12609. Clock enable CKE O Synchronous DRAM clock enable control signal
  12610.  
  12611. Bus release %5(4/ I Bus release request signal/bus acknowledge signal
  12612. request %6$&.
  12613.  
  12614. Rev. 2.0, 02/99, page 269 of 830
  12615.  
  12616. ----------------------- Page 284-----------------------
  12617.  
  12618. Table 13.1 BSC Pins (cont)
  12619.  
  12620. Name Signals I/O Description
  12621.  
  12622. Bus use %$&./ O Bus use permission signal/bus request
  12623. permission %65(4
  12624. Area 0 bus MD3/&($*1 I/O In power-on reset: external space area 0 bus width
  12625.  
  12626. width/PCMCIA MD4/&(%*2 specification signal
  12627. card select When using PCMCIA: &($ , &(%
  12628.  
  12629. Endian switchover/ MD5/5$6*3 I/O Endian specification in a power-on reset.
  12630.  
  12631. row address strobe 5$6 when DRAM is connected to area 2
  12632.  
  12633. Master/slave MD7/TXD I/O Indicates master/slave status in a power-on reset.
  12634. switchover
  12635. Serial interface TXD
  12636.  
  12637. DMAC0 DACK0 O DMAC channel 0 data acknowledge
  12638. acknowledge
  12639. signal
  12640.  
  12641. DMAC1 DACK1 O DMAC channel 1 data acknowledge
  12642. acknowledge
  12643. signal
  12644.  
  12645. Read/column 5' O Same signal as 5'/&$66/)5$0(
  12646. address strobe/ This signal is used when the 5'/&$66/)5$0(
  12647. cycle frame 2 signal load is heavy.
  12648.  
  12649. Read/write 2 RD/:5 O Same signal as RD/:5
  12650.  
  12651. This signal is used when the RD/:5 signal load is
  12652. heavy.
  12653.  
  12654. Notes: 1. MD3/&($ input/output switching is performed by BCR1.A56PCM. Output is selected
  12655. when BCR1.A56PCM = 1.
  12656. 2. MD4/&(% input/output switching is performed by BCR1.A56PCM. Output is selected
  12657. when BCR1.A56PCM = 1.
  12658. 3. MD5/5$6 input/output switching is performed by BCR1.DRAMTP. Output is selected
  12659. when BCR1.DRAMTP (2–0) = 101.
  12660.  
  12661. Rev. 2.0, 02/99, page 270 of 830
  12662.  
  12663. ----------------------- Page 285-----------------------
  12664.  
  12665. 13.1.4 Register Configuration
  12666.  
  12667. The BSC has the 11 registers shown in table 13.2. In addition, the synchronous DRAM mode
  12668. register incorporated in synchronous DRAM can also be accessed as an SH7750 register. The
  12669. functions of these registers include control of direct interfaces to various types of memory, wait
  12670. states, and refreshing.
  12671.  
  12672. Table 13.2 BSC Registers
  12673.  
  12674. Abbrevia- R/W Initial P4 Area 7 Access
  12675. Name tion Value Address Address Size
  12676.  
  12677. Bus control register 1 BCR1 R/W H'0000 0000 H'FF80 0000 H'1F80 0000 32
  12678.  
  12679. Bus control register 2 BCR2 R/W H'3FFC H'FF80 0004 H'1F80 0004 16
  12680.  
  12681. Wait state control WCR1 R/W H'7777 7777 H'FF80 0008 H'1F80 0008 32
  12682. register 1
  12683.  
  12684. Wait state control WCR2 R/W H'FFFE EFFF H'FF80 000C H'1F80 000C 32
  12685. register 2
  12686.  
  12687. Wait state control WCR3 R/W H'0777 7777 H'FF80 0010 H'1F80 0010 32
  12688. register 3
  12689.  
  12690. Memory control register MCR R/W H'0000 0000 H'FF80 0014 H'1F80 0014 32
  12691.  
  12692. PCMCIA control register PCR R/W H'0000 H'FF80 0018 H'1F80 0018 16
  12693.  
  12694. Refresh timer RTCSR R/W H'0000 H'FF80 001C H'1F80 001C 16
  12695. control/status register
  12696.  
  12697. Refresh timer counter RTCNT R/W H'0000 H'FF80 0020 H'1F80 0020 16
  12698.  
  12699. Refresh time constant RTCOR R/W H'0000 H'FF80 0024 H'1F80 0024 16
  12700. counter
  12701.  
  12702. Refresh count register RFCR R/W H'0000 H'FF80 0028 H'1F80 0028 16
  12703.  
  12704. Synchronous For SDMR2 W — H'FF90 xxxx* H'1F90 xxxx 8
  12705. DRAM mode area 2
  12706. registers
  12707.  
  12708. For SDMR3 H'FF94 xxxx* H'1F94 xxxx
  12709. area 3
  12710.  
  12711. Note: * For details, see section 13.2.8, Synchronous DRAM Mode Registers.
  12712.  
  12713. Rev. 2.0, 02/99, page 271 of 830
  12714.  
  12715. ----------------------- Page 286-----------------------
  12716.  
  12717. 13.1.5 Overview of Areas
  12718.  
  12719. Space Divisions: The architecture of the SH7750 provides a 32-bit virtual address space. The
  12720. virtual space is divided into five areas according to the upper address value. External space
  12721. comprises a 29-bit address space, divided into eight areas.
  12722.  
  12723. The virtual space can be allocated to any external space by means of the memory management
  12724. unit (MMU). Details are given in section 3, Memory Management Unit (MMU). This section
  12725. describes the areas into which the external space is divided.
  12726.  
  12727. With the SH7750, various kinds of memory or PC cards can be connected to the seven areas of
  12728. external space as shown in table 13.3, and chip select signals (&6–&6, &($, &(%) are
  12729. output for each of these areas. &6 is asserted when accessing area 0, and &6 when accessing
  12730. area 6. When DRAM or synchronous DRAM is connected to area 2 or 3, signals such as 5$6,
  12731. &$6, RD/:5, and DQM are also asserted. When the PCMCIA interface is selected for area 5 or
  12732. 6, &($/&(% is asserted in addition to &6/&6 for the byte to be accessed.
  12733.  
  12734. 256
  12735.  
  12736. H'0000 0000 Area 0 (CS0) H'0000 0000
  12737.  
  12738. Area 1 (CS1) H'0400 0000
  12739.  
  12740. P0 and P0 and Area 2 (CS2) H'0800 0000
  12741. U0 areas U0 areas
  12742. Area 3 (CS3) H'0C00 0000
  12743.  
  12744. Area 4 (CS4) H'1000 0000
  12745.  
  12746. Area 5 (CS5) H'1400 0000
  12747. H'8000 0000
  12748. P1 area P1 area Area 6 (CS6) H'1800 0000
  12749. H'1C00 0000
  12750. H'A000 0000 Area 7 (reserved area)
  12751. P2 area P2 area H'1FFF FFFF
  12752.  
  12753. H'C000 0000
  12754. P3 area P3 area
  12755.  
  12756. H'E000 0000 Store queue area Store queue area
  12757. H'E400 0000
  12758. P4 area P4 area
  12759. H'FFFF FFFF
  12760.  
  12761. Physical space Virtual space External space
  12762. (MMU off) (MMU on)
  12763.  
  12764. Notes: 1. When the MMU is off (MMUCR.AT = 0), the top 3 bits of the 32-bit address are ignored, and
  12765. memory is mapped onto a fixed 29-bit external space.
  12766. 2. When the MMU is on (MMUCR.AT = 1), the P0, U0, P3, and store queue areas can be
  12767. mapped onto any external space using the TLB.
  12768. For details, see section 3, Memory Management Unit (MMU).
  12769.  
  12770. Figure 13.2 Correspondence between Virtual Address Space and External Address Space
  12771.  
  12772. Rev. 2.0, 02/99, page 272 of 830
  12773.  
  12774. ----------------------- Page 287-----------------------
  12775.  
  12776. Table 13.3 External Address Space Map
  12777.  
  12778. External Connectable Settable Bus
  12779. Area Addresses Size Memory Widths Access Size
  12780. 0 H'00000000– 64 Mbytes Normal memory 8, 16, 32, 64*1 8 , 16, 32 ,
  12781.  
  12782. H'03FFFFFF 64
  12783. Burst ROM 8, 16, 32*1
  12784. MPX 32, 64*1
  12785. 1 H'04000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12786.  
  12787. H'07FFFFFF 64
  12788. MPX 32, 64*2
  12789. Byte control SRAM 16, 32, 64*2
  12790. 2 H'08000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12791.  
  12792. H'0BFFFFFF 64
  12793.  
  12794. 2 3
  12795. Synchronous DRAM 32, 64* ,*
  12796.  
  12797. 2 3
  12798. ,
  12799. DRAM 16, 32* *
  12800. MPX 32, 64*2
  12801. 3 H'0C000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12802.  
  12803. H'0FFFFFFF 64
  12804.  
  12805. 2 3
  12806. Synchronous DRAM 32, 64* ,*
  12807.  
  12808. 2 3
  12809. ,
  12810. DRAM 16, 32, 64* *
  12811. MPX 32, 64*2
  12812. 4 H'10000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12813.  
  12814. H'13FFFFFF 64
  12815. MPX 32, 64*2
  12816. Byte control RAM 16, 32, 64*2
  12817. 5 H'14000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12818.  
  12819. H'17FFFFFF 64
  12820. MPX 32, 64*2
  12821. Burst ROM 8, 16, 32*2
  12822.  
  12823. 2 4
  12824. ,
  12825. PCMCIA 8, 16* *
  12826. 6 H'18000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12827.  
  12828. H'1BFFFFFF 64
  12829. MPX 32, 64*2
  12830. Burst ROM 8,16, 32*2
  12831.  
  12832. 2 4
  12833. ,
  12834. PCMCIA 8,16* *
  12835. 7*5 H'1C000000– 64 Mbytes — — n: 0 to 7
  12836.  
  12837. H'1FFFFFFF
  12838. Notes: 1. Memory bus width specified by external pins
  12839. 2. Memory bus width specified by register
  12840. 3. With synchronous DRAM interface, bus width is 32 or 64 bits only.
  12841. With DRAM interface, bus width is 16 or 32 bits only for area 2, and 16, 32, or 64 bits
  12842. only for area 3.
  12843. 4. With PCMCIA interface, bus width is 8 or 16 bits only.
  12844. 5. Do not access a reserved area, as operation cannot be guaranteed in this case.
  12845.  
  12846. Rev. 2.0, 02/99, page 273 of 830
  12847.  
  12848. ----------------------- Page 288-----------------------
  12849.  
  12850. Area 0: H'00000000 Normal memory/burst ROM/MPX
  12851.  
  12852. Area 1: H'04000000 Normal memory/MPX/byte control
  12853. SRAM
  12854.  
  12855. Area 2: H'08000000 Normal memory/synchronous DRAM/
  12856. DRAM/MPX
  12857.  
  12858. Area 3: H'0C000000 Normal memory/synchronous DRAM/
  12859. DRAM/MPX
  12860.  
  12861. Area 4: H'10000000 Normal memory/MPX/byte control
  12862. SRAM
  12863.  
  12864. Area 5: H'14000000 Normal memory/burst ROM/PCMCIA/
  12865. MPX
  12866. The PCMCIA interface is
  12867. Area 6: H'18000000 Normal memory/burst ROM/PCMCIA/ for memory and I/O card use
  12868.  
  12869. MPX
  12870.  
  12871. Figure 13.3 External Space Allocation
  12872.  
  12873. Memory Bus Width: In the SH7750, the memory bus width can be set independently for each
  12874. space. For area 0, a bus size of 8, 16, 32, or 64 bits can be selected in a power-on reset, using
  12875. external pins. The relationship between the external pins (MD4 and MD3) and the bus width in a
  12876. power-on reset is shown below.
  12877.  
  12878. MD4 MD3 Bus Width
  12879.  
  12880. 0 0 64 bits
  12881.  
  12882. 1 8 bits
  12883.  
  12884. 1 0 16 bits
  12885.  
  12886. 1 32 bits
  12887.  
  12888. When normal memory or ROM is used in areas 1 to 6, a bus width of 8, 16, 32, or 64 bits can be
  12889. selected with bus control register 2 (BCR2). When burst ROM is used, a bus width of 8, 16, or
  12890. 32 bits can be selected. When byte control SRAM is used, a bus width of 16, 32, or 64 bits can
  12891. be selected. When the MPX bus is used, a bus width of 32 or 64 bits can be selected. When the
  12892. DRAM interface is used, a bus width of 16, 32, or 64 bits can be selected with the memory
  12893. control register (MCR). When the DRAM interface is used for area 2 or 3, a bus width of 16 or
  12894. 32 bits should be set. For the synchronous DRAM interface, set a bus width of 32 or 64 bits in
  12895. the MCR register.
  12896.  
  12897. When using the PCMCIA interface, set a bus width of 8 or 16 bits.
  12898.  
  12899. Rev. 2.0, 02/99, page 274 of 830
  12900.  
  12901. ----------------------- Page 289-----------------------
  12902.  
  12903. When using port functions, set a bus width of 8, 16, or 32 bits for all areas.
  12904.  
  12905. For details, see section 13.2.2, Bus Control Register 2 (BCR2), and section 13.2.6, Memory
  12906. Control Register (MCR).
  12907.  
  12908. The area 7 address range, H'1C000000 to H'1FFFFFFFF, is a reserved space and must not be
  12909. used.
  12910.  
  12911. 13.1.6 PCMCIA Support
  12912.  
  12913. The SH7750 supports PCMCIA compliant interface specifications for physical space areas 5 and
  12914. 6.
  12915.  
  12916. The interfaces supported are basically the IC memory card interface and I/O card interface
  12917. stipulated in JEIDA specifications version 4.2 (PCMCIA2.1).
  12918.  
  12919. Physical space areas 5 and 6 support both the IC memory card interface and the I/O card
  12920. interface.
  12921.  
  12922. The PCMCIA interface is supported only in little-endian mode.
  12923.  
  12924. Table 13.4 PCMCIA Interface Features
  12925.  
  12926. Item Features
  12927.  
  12928. Access Random access
  12929.  
  12930. Data bus 8/16 bits
  12931.  
  12932. Memory type Mask ROM, OTPROM, EPROM, EEPROM, flash memory, SRAM
  12933.  
  12934. Common memory capacity Max. 64 Mbytes
  12935.  
  12936. Attribute memory capacity Max. 64 Mbytes
  12937.  
  12938. Others Dynamic bus sizing for I/O bus width, access to PCMCIA interface
  12939. from address translation areas
  12940.  
  12941. Rev. 2.0, 02/99, page 275 of 830
  12942.  
  12943. ----------------------- Page 290-----------------------
  12944.  
  12945. Table 13.5 PCMCIA Support Interfaces
  12946.  
  12947. IC Memory Card Interface I/O Card Interface Corresponding
  12948. SH7750 Pin
  12949.  
  12950. Signal Signal
  12951. Pin Name I/O Function Name I/O Function
  12952.  
  12953. 1 GND Ground GND Ground —
  12954.  
  12955. 2 D3 I/O Data D3 I/O Data D3
  12956.  
  12957. 3 D4 I/O Data D4 I/O Data D4
  12958.  
  12959. 4 D5 I/O Data D5 I/O Data D5
  12960.  
  12961. 5 D6 I/O Data D6 I/O Data D6
  12962.  
  12963. 6 D7 I/O Data D7 I/O Data D7
  12964.  
  12965. 7 &( I Card enable &( I Card enable &6 or &6
  12966.  
  12967. 8 A10 I Address A10 I Address A10
  12968.  
  12969. 9 2( I Output enable 2( I Output enable 5'
  12970.  
  12971. 10 A11 I Address A11 I Address A11
  12972.  
  12973. 11 A9 I Address A9 I Address A9
  12974.  
  12975. 12 A8 I Address A8 I Address A8
  12976.  
  12977. 13 A13 I Address A13 I Address A13
  12978.  
  12979. 14 A14 I Address A14 I Address A14
  12980.  
  12981. 15 :(/3*0 I Write enable :(/3*0 I Write enable :(
  12982.  
  12983. 16 5'</%6< O Ready/busy ,5(4 O Interrupt request Sensed on port
  12984.  
  12985. 17 VCC Operating power VCC Operating power —
  12986. supply supply
  12987.  
  12988. 18 VPP1 Programming VPP1 Programming/ —
  12989. power supply peripheral power
  12990. supply
  12991.  
  12992. 19 A16 I Address A16 I Address A16
  12993.  
  12994. 20 A15 I Address A15 I Address A15
  12995.  
  12996. 21 A12 I Address A12 I Address A12
  12997.  
  12998. 22 A7 I Address A7 I Address A7
  12999.  
  13000. 23 A6 I Address A6 I Address A6
  13001.  
  13002. 24 A5 I Address A5 I Address A5
  13003.  
  13004. 25 A4 I Address A4 I Address A4
  13005.  
  13006. 26 A3 I Address A3 I Address A3
  13007.  
  13008. 27 A2 I Address A2 I Address A2
  13009.  
  13010. 28 A1 I Address A1 I Address A1
  13011.  
  13012. Rev. 2.0, 02/99, page 276 of 830
  13013.  
  13014. ----------------------- Page 291-----------------------
  13015.  
  13016. Table 13.5 PCMCIA Support Interfaces (cont)
  13017.  
  13018. IC Memory Card Interface I/O Card Interface Corresponding
  13019. SH7750 Pin
  13020.  
  13021. Signal Signal
  13022. Pin Name I/O Function Name I/O Function
  13023.  
  13024. 29 A0 I Address A0 I Address A0
  13025.  
  13026. 30 D0 I/O Data D0 I/O Data D0
  13027.  
  13028. 31 D1 I/O Data D1 I/O Data D1
  13029.  
  13030. 32 D2 I/O Data D2 I/O Data D2
  13031.  
  13032. 33 :3 O Write protect ,2,6 O 16-bit I/O port ,2,6
  13033.  
  13034. 34 GND Ground GND Ground —
  13035.  
  13036. 35 GND Ground GND Ground —
  13037.  
  13038. 36 &' O Card detection &' O Card detection Sensed on port
  13039.  
  13040. 37 D11 I/O Data D11 I/O Data D11
  13041.  
  13042. 38 D12 I/O Data D12 I/O Data D12
  13043.  
  13044. 39 D13 I/O Data D13 I/O Data D13
  13045.  
  13046. 40 D14 I/O Data D14 I/O Data D14
  13047.  
  13048. 41 D15 I/O Data D15 I/O Data D15
  13049.  
  13050. 42 &( I Card enable &( I Card enable &($ or &(%
  13051.  
  13052. 43 RFSH I Refresh request RFSH I Refresh request Output from
  13053. port
  13054.  
  13055. 44 RFU Reserved ,25' I I/O read ,&,25'
  13056.  
  13057. 45 RFU Reserved ,2:5 I I/O write ,&,2:5
  13058.  
  13059. 46 A17 I Address A17 I Address A17
  13060.  
  13061. 47 A18 I Address A18 I Address A18
  13062.  
  13063. 48 A19 I Address A19 I Address A19
  13064.  
  13065. 49 A20 I Address A20 I Address A20
  13066.  
  13067. 50 A21 I Address A21 I Address A21
  13068.  
  13069. 51 VCC Power supply VCC Power supply —
  13070.  
  13071. 52 VPP2 Programming VPP2 Programming/ —
  13072. power supply peripheral power
  13073. supply
  13074.  
  13075. 53 A22 I Address A22 I Address A22
  13076.  
  13077. 54 A23 I Address A23 I Address A23
  13078.  
  13079. 55 A24 I Address A24 I Address A24
  13080.  
  13081. 56 A25 I Address A25 I Address A25
  13082.  
  13083. Rev. 2.0, 02/99, page 277 of 830
  13084.  
  13085. ----------------------- Page 292-----------------------
  13086.  
  13087. Table 13.5 PCMCIA Support Interfaces (cont)
  13088.  
  13089. IC Memory Card Interface I/O Card Interface Corresponding
  13090. SH7750 Pin
  13091.  
  13092. Signal Signal
  13093. Pin Name I/O Function Name I/O Function
  13094.  
  13095. 57 RFU Reserved RFU Reserved —
  13096.  
  13097. 58 RESET I Reset RESET I Reset Output from
  13098. port
  13099.  
  13100. 59 :$,7 O Wait request :$,7 O Wait request 5'<
  13101.  
  13102. 60 RFU Reserved ,13$&. O Input acknowledge —
  13103.  
  13104. 61 5(* I Attribute memory 5(* I Attribute memory :(
  13105. space select space select
  13106.  
  13107. 62 BVD2 O Battery voltage 63.5 O Digital speech Sensed on port
  13108. detection signal
  13109.  
  13110. 63 BVD1 O Battery voltage 676&+* O Card status Sensed on port
  13111. detection change
  13112.  
  13113. 64 D8 I/O Data D8 I/O Data D8
  13114.  
  13115. 65 D9 I/O Data D9 I/O Data D9
  13116.  
  13117. 66 D10 I/O Data D10 I/O Data D10
  13118.  
  13119. 67 &' O Card detection &' O Card detection Sensed on port
  13120.  
  13121. 68 GND Ground GND Ground —
  13122.  
  13123. Rev. 2.0, 02/99, page 278 of 830
  13124.  
  13125. ----------------------- Page 293-----------------------
  13126.  
  13127. 13.2 Register Descriptions
  13128.  
  13129. 13.2.1 Bus Control Register 1 (BCR1)
  13130.  
  13131. Bus control register 1 (BCR1) is a 32-bit readable/writable register that specifies the function,
  13132. bus cycle status, etc., of each area.
  13133.  
  13134. BCR1 is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset
  13135. or in standby mode. External memory other than area 0 should not be accessed until register
  13136. initialization is completed.
  13137.  
  13138. Bit: 31 30 29 28 27 26 25 24
  13139.  
  13140. Bit name: ENDIAN MASTER A0MPX — — — IPUP OPUP
  13141.  
  13142. Initial value: 0/1* 0/1* 0/1* 0 0 0 0 0
  13143.  
  13144. R/W: R R R R R R R/W R/W
  13145.  
  13146. Bit: 23 22 21 20 19 18 17 16
  13147.  
  13148. Bit name: — — A1MBC A4MBC BREQEN PSHR MEMMPX —
  13149.  
  13150. Initial value: 0 0 0 0 0 0 0 0
  13151.  
  13152. R/W: R R R/W R/W R/W R/W R/W R
  13153.  
  13154. Bit: 15 14 13 12 11 10 9 8
  13155.  
  13156. Bit name: HIZMEM HIZCNT A0BST2 A0BST1 A0BST0 A5BST2 A5BST1 A5BST0
  13157.  
  13158. Initial value: 0 0 0 0 0 0 0 0
  13159.  
  13160. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13161.  
  13162. Bit: 7 6 5 4 3 2 1 0
  13163.  
  13164. Bit name: A6BST2 A6BST1 A6BST0 DRAMTP2 DRAMTP1 DRAMTP0 — A56PCM
  13165.  
  13166. Initial value: 0 0 0 0 0 0 0 0
  13167.  
  13168. R/W: R/W R/W R/W R/W R/W R/W R R/W
  13169.  
  13170. Note: * These bits sample external pin values in a power-on reset.
  13171.  
  13172. Rev. 2.0, 02/99, page 279 of 830
  13173.  
  13174. ----------------------- Page 294-----------------------
  13175.  
  13176. Bit 31—Endian Flag (ENDIAN): Samples the value of the endian specification external pin
  13177. (MD5) in a power-on reset. The endian mode of all spaces is determined by this bit. ENDIAN is
  13178. a read-only bit.
  13179.  
  13180. Bit 31: ENDIAN Description
  13181.  
  13182. 0 In a power-on reset, the endian setting external pin (MD5) is low,
  13183. designating big-endian mode for the SH7750
  13184.  
  13185. 1 In a power-on reset, the endian setting external pin (MD5) is high,
  13186. designating little-endian mode for the SH7750
  13187.  
  13188. Bit 30—Master/Slave Flag (MASTER): Samples the value of the master/slave specification
  13189. external pin (MD7) in a power-on reset. The master/slave status of all spaces is determined by
  13190. this bit. MASTER is a read-only bit.
  13191.  
  13192. Bit 30: MASTER Description
  13193.  
  13194. 0 In a power-on reset, the master/slave setting external pin (MD7) is low,
  13195. designating master mode for the SH7750
  13196.  
  13197. 1 In a power-on reset, the master/slave setting external pin (MD7) is high,
  13198. designating slave mode for the SH7750
  13199.  
  13200. Bit 29—Area 0 Memory Type (A0MPX): Samples the value of the area 0 memory type
  13201. specification external pin (MD6) in a power-on reset. The memory type of area 0 is determined
  13202. by this bit. A0MPX is a read-only bit.
  13203.  
  13204. Bit 29: A0MPX Description
  13205.  
  13206. 0 In a power-on reset, the external pin specifying the area 0 memory type
  13207. (MD6) is low, designating the area 0 memory type as normal memory
  13208.  
  13209. 1 In a power-on reset, the external pin specifying the area 0 memory type
  13210. (MD6) is high, designating the area 0 memory type as MPX
  13211.  
  13212. Bits 28 to 26, 23, 22, 16, and 1—Reserved: These bits are always read as 0, and should only be
  13213. written with 0.
  13214.  
  13215. Rev. 2.0, 02/99, page 280 of 830
  13216.  
  13217. ----------------------- Page 295-----------------------
  13218.  
  13219. Bit 25—Control Input Pin Pull-Up Resistor Control (IPUP): Specifies the pull-up resistor
  13220. status for control input pins (NMI, ,5/–,5/, %5(4, MD6/,2,6, 5'<). IPUP is initialized
  13221. by a power-on reset.
  13222.  
  13223. Bit 25: IPUP Description
  13224.  
  13225. 0 Pull-up resistor is on for control input pins (NMI, ,5/–,5/ , %5(4 ,
  13226. MD6/,2,6 , 5'<) (Initial value)
  13227.  
  13228. 1 Pull-up resistor is off for control input pins (NMI, ,5/–,5/ , %5(4 ,
  13229. MD6/,2,6 , 5'<)
  13230.  
  13231. Bit 24—Control Output Pin Pull-Up Resistor Control (OPUP): Specifies the pull-up resistor
  13232. status for control output pins (A[25:0], %6, &6Q, 5', :(Q, RD/:5, 5$6, 5$6, &($,
  13233. &(%, 5', RD/:5) when high-impedance. OPUP is initialized by a power-on reset.
  13234.  
  13235. Bit 24: OPUP Description
  13236.  
  13237. 0 Pull-up resistor is on for control output pins (A[25:0], %6, &6Q , 5' , :(Q ,
  13238. RD/:5 , 5$6, 5$6 , &($ , &(% , 5' , RD/:5) (Initial value)
  13239.  
  13240. 1 Pull-up resistor is off for control output pins (A[25:0], %6, &6Q , 5' , :(Q ,
  13241. RD/:5 , 5$6, 5$6 , &($ , &(% , 5' , RD/:5)
  13242.  
  13243. Bit 21—Area 1 SRAM Byte Control Mode (A1MBC): MPX has priority when an MPX bus
  13244. specification is made. This bit is initialized by a power-on reset.
  13245.  
  13246. Bit 21: A1MBC Description
  13247.  
  13248. 0 Area 1 SRAM is set to normal mode (Initial value)
  13249.  
  13250. 1 Area 1 SRAM is set to byte control mode
  13251.  
  13252. Bit 20—Area 4 SRAM Byte Control Mode (A4MBC): MPX has priority when an MPX bus
  13253. specification is made. This bit is initialized by a power-on reset.
  13254.  
  13255. Bit 20: A4MBC Description
  13256.  
  13257. 0 Area 4 SRAM is set to normal mode (Initial value)
  13258.  
  13259. 1 Area 4 SRAM is set to byte control mode
  13260.  
  13261. Rev. 2.0, 02/99, page 281 of 830
  13262.  
  13263. ----------------------- Page 296-----------------------
  13264.  
  13265. Bit 19—BREQ Enable (BREQEN): Indicates whether external requests can be accepted.
  13266. BREQEN is initialized to the external request acceptance disabled state by a power-on reset. It is
  13267. ignored in the case of a slave mode startup.
  13268.  
  13269. Bit 19: BREQEN Description
  13270.  
  13271. 0 External requests are not accepted (Initial value)
  13272.  
  13273. 1 External requests are accepted
  13274.  
  13275. Bit 18—Partial-Sharing Bit (PSHR): Sets partial-sharing mode. PSHR is valid only in the case
  13276. of a master mode startup.
  13277.  
  13278. Bit 18: PSHR Description
  13279.  
  13280. 0 Master mode (Initial value)
  13281.  
  13282. 1 Partial-sharing mode
  13283.  
  13284. Bit 17—Area 1 to 6 MPX Bus Specification (MEMMPX): Sets the MPX bus when areas 1 to
  13285. 6 are set as normal memory (or burst ROM). MEMMPX is initialized by a power-on reset.
  13286.  
  13287. Bit 17: MEMMPX Description
  13288.  
  13289. 0 Basic interface (or burst ROM interface) is selected when areas 1 to 6 are
  13290. set as normal memory (or burst ROM) (Initial value)
  13291.  
  13292. 1 MPX bus interface is selected when areas 1 to 6 are set as normal memory
  13293. (or burst ROM)
  13294.  
  13295. Bit 15—High-Z Control (HIZMEM): Specifies the state of address and other signals (A[25:0],
  13296. %6, &6Q, RD/:5, &($, &(%, RD/:5) in standby mode.
  13297.  
  13298. Bit 15: HIZMEM Description
  13299.  
  13300. 0 The A[25:0], %6, &6Q , RD/:5 , &($ , &(% , and RD/WR2 signals go to
  13301. high-impedance (High-Z) in standby mode and when the bus is released
  13302. (Initial value)
  13303.  
  13304. 1 The A[25:0], %6, &6Q , RD/:5 , &($ , &(% , and RD/:5 signals drive in
  13305. standby mode
  13306.  
  13307. Rev. 2.0, 02/99, page 282 of 830
  13308.  
  13309. ----------------------- Page 297-----------------------
  13310.  
  13311. Bit 14—High-Z Control (HIZCNT): Specifies the state of the 5$6 and &$6 signals in standby
  13312. mode and when the bus is released.
  13313.  
  13314. Bit 14: HIZCNT Description
  13315.  
  13316. 0 The 5$6, 5$6 , :(Q/&$6Q/DQMn, 5'/&$66/)5$0( , and 5' signals
  13317. go to high-impedance (High-Z) in standby mode and when the bus is
  13318. released (Initial value)
  13319.  
  13320. 1 The 5$6, 5$6 , :(Q/&$6Q/DQMn, 5'/&$66/)5$0( , and 5' signals
  13321. drive in standby mode and when the bus is released
  13322.  
  13323. Bits 13 to 11—Area 0 Burst ROM Control (A0BST2–A0BST0): These bits specify whether
  13324. burst ROM is used in external space area 0. When burst ROM is used, they also specify the
  13325. number of accesses in a burst. If area 0 is an MPX interface area, these bits are ignored.
  13326.  
  13327. Bit 13: A0BST2 Bit 12: A0BST1 Bit 11: A0BST0 Description
  13328.  
  13329. 0 0 0 Area 0 is accessed as normal memory
  13330. (Initial value)
  13331.  
  13332. 1 Area 0 is accessed as burst ROM (4
  13333. consecutive accesses)
  13334.  
  13335. Can be used with 8-, 16-, or 32-bit bus
  13336. width
  13337.  
  13338. 1 0 Area 0 is accessed as burst ROM (8
  13339. consecutive accesses)
  13340.  
  13341. Can be used with 8-, 16-, or 32-bit bus
  13342. width
  13343.  
  13344. 1 Area 0 is accessed as burst ROM (16
  13345. consecutive accesses)
  13346.  
  13347. Can only be used with 8- or 16-bit bus
  13348. width. Do not specify for 32-bit bus width
  13349.  
  13350. 1 0 0 Area 0 is accessed as burst ROM (32
  13351. consecutive accesses)
  13352.  
  13353. Can only be used with 8-bit bus width
  13354.  
  13355. 1 Reserved
  13356.  
  13357. 1 0 Reserved
  13358.  
  13359. 1 Reserved
  13360.  
  13361. Rev. 2.0, 02/99, page 283 of 830
  13362.  
  13363. ----------------------- Page 298-----------------------
  13364.  
  13365. Bits 10 to 8—Area 5 Burst Enable (A5BST2–A5BST0): These bits specify whether burst
  13366. ROM is used in external space area 5. When burst ROM is used, they also specify the number of
  13367. accesses in a burst. If area 5 is an MPX interface area, these bits are ignored.
  13368.  
  13369. Bit 10: A5BST2 Bit 9: A5BST1 Bit 8: A5BST0 Description
  13370.  
  13371. 0 0 0 Area 5 is accessed in normal mode
  13372. (Initial value)
  13373.  
  13374. 1 Area 5 is burst-accessed (4 consecutive
  13375. accesses)
  13376.  
  13377. Can be used with 8-, 16-, or 32--bit bus
  13378. width
  13379.  
  13380. 1 0 Area 5 is burst-accessed (8 consecutive
  13381. accesses)
  13382.  
  13383. Can be used with 8-, 16-, or 32-bit bus
  13384. width
  13385.  
  13386. 1 Area 5 is burst-accessed (16 consecutive
  13387. accesses)
  13388.  
  13389. Can only be used with 8- or 16-bit bus
  13390. width. Do not specify for 32-bit bus width
  13391.  
  13392. 1 0 0 Area 5 is burst-accessed (32 consecutive
  13393. accesses)
  13394.  
  13395. Can only be used with 8-bit bus width
  13396.  
  13397. 1 Reserved
  13398.  
  13399. 1 0 Reserved
  13400.  
  13401. 1 Reserved
  13402.  
  13403. Note: Clear to 0 when PCMCIA is used.
  13404.  
  13405. Rev. 2.0, 02/99, page 284 of 830
  13406.  
  13407. ----------------------- Page 299-----------------------
  13408.  
  13409. Bits 7 to 5—Area 6 Burst Enable (A6BST2–A6BST0): These bits specify whether burst ROM
  13410. is used in external space area 6. When burst ROM is used, they also specify the number of
  13411. accesses in a burst. If area 6 is an MPX interface area, these bits are ignored.
  13412.  
  13413. Bit 7: A6BST2 Bit 6: A6BST1 Bit 5: A6BST0 Description
  13414.  
  13415. 0 0 0 Area 6 is accessed in normal mode
  13416. (Initial value)
  13417.  
  13418. 1 Area 6 is burst-accessed (4 consecutive
  13419. accesses)
  13420.  
  13421. Can be used with 8-, 16-, or 32--bit bus
  13422. width
  13423.  
  13424. 1 0 Area 6 is burst-accessed (8 consecutive
  13425. accesses)
  13426.  
  13427. Can be used with 8-, 16-, or 32-bit bus
  13428. width
  13429.  
  13430. 1 Area 6 is burst-accessed (16 consecutive
  13431. accesses)
  13432.  
  13433. Can only be used with 8- or 16-bit bus
  13434. width. Do not specify for 32-bit bus width
  13435.  
  13436. 1 0 0 Area 6 is burst-accessed (32 consecutive
  13437. accesses)
  13438.  
  13439. Can only be used with 8-bit bus width
  13440.  
  13441. 1 Reserved
  13442.  
  13443. 1 0 Reserved
  13444.  
  13445. 1 Reserved
  13446.  
  13447. Note: Clear to 0 when PCMCIA is used.
  13448.  
  13449. Rev. 2.0, 02/99, page 285 of 830
  13450.  
  13451. ----------------------- Page 300-----------------------
  13452.  
  13453. Bits 4 to 2—Area 2 and 3 Memory Type (DRAMTP2–DRAMTP0): These bits specify the
  13454. type of memory connected to external space areas 2 and 3. ROM, SRAM, flash ROM, etc., can
  13455. be directly connected as normal memory. DRAM and synchronous DRAM can also be directly
  13456. connected.
  13457.  
  13458. Bit 4: DRAMTP2 Bit 3: DRAMTP1 Bit 2: DRAMTP0 Description
  13459.  
  13460. 0 0 0 Areas 2 and 3 are normal memory or
  13461. MPX*1
  13462.  
  13463. (Initial value)
  13464.  
  13465. 1 Reserved (Cannot be set)
  13466. 1 0 Area 2 is normal memory or MPX*1, area
  13467.  
  13468. 3 is synchronous DRAM
  13469.  
  13470. 1 Areas 2 and 3 are synchronous DRAM
  13471. 1 0 0 Area 2 is normal memory or MPX*1, area
  13472.  
  13473. 3 is DRAM
  13474. 1 Areas 2 and 3 are DRAM*2
  13475.  
  13476. 1 0 Reserved (Cannot be set)
  13477.  
  13478. 1 Reserved (Cannot be set)
  13479.  
  13480. Note: 1. Selection of normal memory or MPX is determined by the setting of the MEMMPX bit
  13481. 2. When this mode is selected, 16 or 32 bits should be specified as the bus width for
  13482. areas 2 and 3. In this mode the MD5 pin is designated for output as the 5$6 pin.
  13483.  
  13484. Bit 0—Area 5 and 6 Bus Type (A56PCM): Specifies whether external space areas 5 and 6 are
  13485. accessed as PCMCIA space. The setting of these bits has priority over the MEMMPX and
  13486. AnBST bit settings.
  13487.  
  13488. Bit 0: A56PCM Description
  13489.  
  13490. 0 External space areas 5 and 6 are accessed as normal memory
  13491. (Initial value)
  13492.  
  13493. 1 External space areas 5 and 6 are accessed as PCMCIA space*
  13494.  
  13495. Note: * The MD3 pin is designated for output as the &($ pin.
  13496. The MD4 pin is designated for output as the &(% pin.
  13497.  
  13498. Rev. 2.0, 02/99, page 286 of 830
  13499.  
  13500. ----------------------- Page 301-----------------------
  13501.  
  13502. 13.2.2 Bus Control Register 2 (BCR2)
  13503.  
  13504. Bus control register 2 (BCR2) is a 16-bit readable/writable register that specifies the bus width
  13505. for each area, and whether a 16-bit port is used.
  13506.  
  13507. BCR2 is initialized to H'3FFC by a power-on reset, but is not initialized by a manual reset or in
  13508. standby mode. External memory other than area 0 should not be accessed until register
  13509. initialization is completed.
  13510.  
  13511. Bit: 15 14 13 12 11 10 9 8
  13512.  
  13513. Bit name: A0SZ1 A0SZ0 A6SZ1 A6SZ0 A5SZ1 A5SZ0 A4SZ1 A4SZ0
  13514.  
  13515. Initial value: 0/1* 0/1* 1 1 1 1 1 1
  13516.  
  13517. R/W: R R R/W R/W R/W R/W R/W R/W
  13518.  
  13519. Bit: 7 6 5 4 3 2 1 0
  13520.  
  13521. Bit name: A3SZ1 A3SZ0 A2SZ1 A2SZ0 A1SZ1 A0SZ0 — PORTEN
  13522.  
  13523. Initial value: 1 1 1 1 1 1 0 0
  13524.  
  13525. R/W: R/W R/W R/W R/W R/W R/W — R/W
  13526.  
  13527. Note: * These bits sample the values of the external pins that specify the area 0 bus size.
  13528.  
  13529. Bits 15 and 14—Area 0 Bus Width (A0SZ1, A0SZ0): These bits sample the external pins
  13530. (MD3 and MD4) that specify the bus size in a power-on reset. They are read-only bits.
  13531.  
  13532. Bits 2n + 1, 2n—Area n (1 to 6) Bus Width Specification (AnSZ1, AnSZ0): These bits specify
  13533. the bus width of physical space area n (n = 1 to 6).
  13534.  
  13535. (Bit 0): PORTEN Bit 2n + 1: AnSZ1 Bit 2n: AnSZ0 Description
  13536.  
  13537. 0 0 0 Bus width is 64 bits (Initial value)
  13538.  
  13539. 1 Bus width is 8 bits
  13540.  
  13541. 1 0 Bus width is 16 bits
  13542.  
  13543. 1 Bus width is 32 bits
  13544.  
  13545. 1 0 0 Reserved (Setting prohibited)
  13546.  
  13547. 1 Bus width is 8 bits
  13548.  
  13549. 1 0 Bus width is 16 bits
  13550.  
  13551. 1 Bus width is 32 bits
  13552.  
  13553. Bit 1—Reserved: This bit is always read as 0, and should only be written with 0.
  13554.  
  13555. Rev. 2.0, 02/99, page 287 of 830
  13556.  
  13557. ----------------------- Page 302-----------------------
  13558.  
  13559. Bit 0—Port Function Enable (PORTEN): Specifies whether pins D51 to D32 are used as a 20-
  13560. bit port. When this function is used, a bus width of 8, 16, or 32 bits should be set for all areas.
  13561.  
  13562. Bit 0: PORTEN Description
  13563.  
  13564. 0 D51 to D32 are not used as a port (Initial value)
  13565.  
  13566. 1 D51 to D32 are used as a port
  13567.  
  13568. 13.2.3 Wait Control Register 1 (WCR1)
  13569.  
  13570. Wait control register 1 (WCR1) is a 32-bit readable/writable register that specifies the number of
  13571. idle state insertion cycles for each area. With some kinds of memory, data bus drive does not go
  13572. off immediately after the read signal from off-chip goes off. As a result, there is a possibility of
  13573. a data bus collision when consecutive memory accesses are performed on memory in different
  13574. areas, or when a memory write is performed immediately after a read. In the SH7750, the
  13575. number of idle cycles set in the WCR1 register are inserted automatically if there is a possibility
  13576. of this kind of data bus collision.
  13577.  
  13578. WCR1 is initialized to H'77777777 by a power-on reset, but is not initialized by a manual reset
  13579. or in standby mode.
  13580.  
  13581. Bit: 31 30 29 28 27 26 25 24
  13582. Bit name: — DMAIW2 DMAIW1 DMAIW0 — A6IW2 A6IW1 A6IW0
  13583.  
  13584. Initial value: 0 1 1 1 0 1 1 1
  13585. R/W: R R/W R/W R/W R R/W R/W R/W
  13586.  
  13587. Bit: 23 22 21 20 19 18 17 16
  13588. Bit name: — A5IW2 A5IW1 A5IW0 — A4IW2 A4IW1 A4IW0
  13589.  
  13590. Initial value: 0 1 1 1 0 1 1 1
  13591. R/W: R R/W R/W R/W R R/W R/W R/W
  13592.  
  13593. Bit: 15 14 13 12 11 10 9 8
  13594. Bit name: — A3IW2 A3IW1 A3IW0 — A2IW2 A2IW1 A2IW0
  13595.  
  13596. Initial value: 0 1 1 1 0 1 1 1
  13597. R/W: R R/W R/W R/W R R/W R/W R/W
  13598.  
  13599. Bit: 7 6 5 4 3 2 1 0
  13600.  
  13601. Bit name: — A1IW2 A1IW1 A1IW0 — A0IW2 A0IW1 A0IW0
  13602.  
  13603. Initial value: 0 1 1 1 0 1 1 1
  13604. R/W: R R/W R/W R/W R R/W R/W R/W
  13605.  
  13606. Rev. 2.0, 02/99, page 288 of 830
  13607.  
  13608. ----------------------- Page 303-----------------------
  13609.  
  13610. Bits 31, 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0, and should
  13611. only be written with 0.
  13612.  
  13613. Bits 30 to 28— DMAIW-DACK Device Inter-Cycle Idle Specification (DMAIW2–
  13614. DMAIW0): These bits specify the number of idle cycles between bus cycles to be inserted when
  13615. switching from a DACK device to another space, or from a read access to a write access on the
  13616. same device. The DMAIW bits are valid only for DMA single address transfer; with DMA dual
  13617. address transfer, inter-area idle cycles are inserted.
  13618.  
  13619. Bits 4n + 2 to 4n—Area n (6 to 0) Inter-Cycle Idle Specification (AnlW2–AnlW0): These
  13620. bits specify the number of idle cycles between bus cycles to be inserted when switching from
  13621. external space area n (n = 6 to 0) to another space, or from a read access to a write access in the
  13622. same space.
  13623.  
  13624. DMAIW2/AnIW2 DMAIW1/AnIW1 DMAIW0/AnIW0 Inserted Idle Cycles
  13625.  
  13626. 0 0 0 0
  13627.  
  13628. 1 1
  13629.  
  13630. 1 0 2
  13631.  
  13632. 1 3
  13633.  
  13634. 1 0 0 6
  13635.  
  13636. 1 9
  13637.  
  13638. 1 0 12
  13639.  
  13640. 1 15 (Initial value)
  13641.  
  13642. Rev. 2.0, 02/99, page 289 of 830
  13643.  
  13644. ----------------------- Page 304-----------------------
  13645.  
  13646. • Idle Insertion between Accesses
  13647.  
  13648. Preceding Following Cycle Same Different
  13649. Cycle Area Area
  13650.  
  13651. Same Area Different Area
  13652.  
  13653. Read Write Read Write MPX MPX
  13654. Address Address
  13655. Output Output
  13656.  
  13657. CPU DMA CPU DMA CPU DMA CPU DMA
  13658.  
  13659. Read M M M M M M M (1) M (1)
  13660.  
  13661. Write M M M M M (1)
  13662.  
  13663. DMA read M M M M M M — M (1)
  13664. (memory →
  13665. device)
  13666.  
  13667. DMA write D D D D* D D D D — D (1)
  13668. (device →
  13669. memory)
  13670.  
  13671. M, D: WCR1 wait insertion
  13672. (One cycle inserted in MPX access even if WCR1 is cleared to 0)
  13673. M: Memory setting (area 0 to area 6)
  13674. D: DMA setting
  13675. *: No insertion in consecutive accesses to same device
  13676.  
  13677. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  13678. and bits A3IW2–A3IW0 to 000.
  13679.  
  13680. Rev. 2.0, 02/99, page 290 of 830
  13681.  
  13682. ----------------------- Page 305-----------------------
  13683.  
  13684. 13.2.4 Wait Control Register 2 (WCR2)
  13685.  
  13686. Wait control register 2 (WCR2) is a 32-bit readable/writable register that specifies the number of
  13687. wait state insertion cycles for each area. It also specifies the data access pitch when performing
  13688. burst memory access. This enables low-speed memory to be directly connected without using
  13689. external circuitry.
  13690.  
  13691. WCR2 is initialized to H'FFFEEFFF by a power-on reset, but is not initialized by a manual reset
  13692. or in standby mode.
  13693.  
  13694. Bit: 31 30 29 28 27 26 25 24
  13695.  
  13696. Bit name: A6W2 A6W1 A6W0 A6B2 A6B1 A6B0 A5W2 A5W1
  13697.  
  13698. Initial value: 1 1 1 1 1 1 1 1
  13699.  
  13700. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13701.  
  13702. Bit: 23 22 21 20 19 18 17 16
  13703.  
  13704. Bit name: A5W0 A5B2 A5B1 A5B0 A4W2 A4W1 A4W0 —
  13705.  
  13706. Initial value: 1 1 1 1 1 1 1 0
  13707.  
  13708. R/W: R/W R/W R/W R/W R/W R/W R/W R
  13709.  
  13710. Bit: 15 14 13 12 11 10 9 8
  13711.  
  13712. Bit name: A3W2 A3W1 A3W0 — A2W2 A2W1 A2W0 A1W2
  13713.  
  13714. Initial value: 1 1 1 0 1 1 1 1
  13715.  
  13716. R/W: R/W R/W R/W R R/W R/W R/W R/W
  13717.  
  13718. Bit: 7 6 5 4 3 2 1 0
  13719.  
  13720. Bit name: A1W1 A1W0 A0W2 A0W1 A0W0 A0B2 A0B1 A0B0
  13721.  
  13722. Initial value: 1 1 1 1 1 1 1 1
  13723.  
  13724. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13725.  
  13726. Rev. 2.0, 02/99, page 291 of 830
  13727.  
  13728. ----------------------- Page 306-----------------------
  13729.  
  13730. Bits 31 to 29—Area 6 Wait Control (A6W2—A6W0): These bits specify the number of wait
  13731. states to be inserted for external space area 6.
  13732.  
  13733. Description
  13734.  
  13735. First Cycle
  13736.  
  13737. Bit 31: A6W2 Bit 30: A6W1 Bit 29: A6W0 Inserted Wait States 5'< Pin
  13738. 5'<
  13739.  
  13740. 0 0 0 0 Ignored
  13741.  
  13742. 1 1 Enabled
  13743.  
  13744. 1 0 2 Enabled
  13745.  
  13746. 1 3 Enabled
  13747.  
  13748. 1 0 0 6 Enabled
  13749.  
  13750. 1 9 Enabled
  13751.  
  13752. 1 0 12 Enabled
  13753.  
  13754. 1 15 (Initial value) Enabled
  13755.  
  13756. Bits 28 to 26—Area 6 Burst Pitch (A6B2–A6B0): These bits specify the burst pitch in a burst
  13757. transfer.
  13758.  
  13759. Description
  13760.  
  13761. Burst Cycle (Excluding First Cycle)
  13762.  
  13763. Bit 28: A6B2 Bit 27: A6B1 Bit 26: A6B0 States Per Data Transfer 5'< Pin
  13764. 5'<
  13765.  
  13766. 0 0 0 0 Ignored
  13767.  
  13768. 1 1 Enabled
  13769.  
  13770. 1 0 2 Enabled
  13771.  
  13772. 1 3 Enabled
  13773.  
  13774. 1 0 0 4 Enabled
  13775.  
  13776. 1 5 Enabled
  13777.  
  13778. 1 0 6 Enabled
  13779.  
  13780. 1 7 (Initial value) Enabled
  13781.  
  13782. Rev. 2.0, 02/99, page 292 of 830
  13783.  
  13784. ----------------------- Page 307-----------------------
  13785.  
  13786. Bits 25 to 23—Area 5 Wait Control (A5W2–A5W0): These bits specify the number of wait
  13787. states to be inserted for external space area 5.
  13788.  
  13789. Description
  13790.  
  13791. First Cycle
  13792.  
  13793. Bit 25: A5W2 Bit 24: A5W1 Bit 23: A5W0 Inserted Wait States 5'< Pin
  13794. 5'<
  13795.  
  13796. 0 0 0 0 Ignored
  13797.  
  13798. 1 1 Enabled
  13799.  
  13800. 1 0 2 Enabled
  13801.  
  13802. 1 3 Enabled
  13803.  
  13804. 1 0 0 6 Enabled
  13805.  
  13806. 1 9 Enabled
  13807.  
  13808. 1 0 12 Enabled
  13809.  
  13810. 1 15 (Initial value) Enabled
  13811.  
  13812. Bits 22 to 20—Area 5 Burst Pitch (A5B2–A5B0): These bits specify the burst pitch in a burst
  13813. transfer.
  13814.  
  13815. Description
  13816.  
  13817. Burst Cycle (Excluding First Cycle)
  13818.  
  13819. Bit 22: A5B2 Bit 21: A5B1 Bit 20: A5B0 Burst Pitch Per Data Transfer 5'< Pin
  13820. 5'<
  13821.  
  13822. 0 0 0 0 Ignored
  13823.  
  13824. 1 1 Enabled
  13825.  
  13826. 1 0 2 Enabled
  13827.  
  13828. 1 3 Enabled
  13829.  
  13830. 1 0 0 4 Enabled
  13831.  
  13832. 1 5 Enabled
  13833.  
  13834. 1 0 6 Enabled
  13835.  
  13836. 1 7 (Initial value) Enabled
  13837.  
  13838. Rev. 2.0, 02/99, page 293 of 830
  13839.  
  13840. ----------------------- Page 308-----------------------
  13841.  
  13842. Bits 19 to 17—Area 4 Wait Control (A4W2–A4W0): These bits specify the number of wait
  13843. states to be inserted for external space area 4.
  13844.  
  13845. Description
  13846.  
  13847. Bit 19: A4W2 Bit 18: A4W1 Bit 17: A4W0 Inserted Wait States 5'< Pin
  13848. 5'<
  13849.  
  13850. 0 0 0 0 Ignored
  13851.  
  13852. 1 1 Enabled
  13853.  
  13854. 1 0 2 Enabled
  13855.  
  13856. 1 3 Enabled
  13857.  
  13858. 1 0 0 6 Enabled
  13859.  
  13860. 1 9 Enabled
  13861.  
  13862. 1 0 12 Enabled
  13863.  
  13864. 1 15 (Initial value) Enabled
  13865.  
  13866. Bits 16 and 12—Reserved: These bits are always read as 0, and should only be written with 0.
  13867.  
  13868. Bits 15 to 13—Area 3 Wait Control (A3W2–A3W0): These bits specify the number of wait
  13869. states to be inserted for external space area 3. External wait input is only enabled when normal
  13870. memory is used, and is ignored when DRAM or synchronous DRAM is used.
  13871.  
  13872. • When Normal Memory is Used
  13873.  
  13874. Description
  13875.  
  13876. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Inserted Wait States 5'< Pin
  13877. 5'<
  13878.  
  13879. 0 0 0 0 Ignored
  13880.  
  13881. 1 1 Enabled
  13882.  
  13883. 1 0 2 Enabled
  13884.  
  13885. 1 3 Enabled
  13886.  
  13887. 1 0 0 6 Enabled
  13888.  
  13889. 1 9 Enabled
  13890.  
  13891. 1 0 12 Enabled
  13892.  
  13893. 1 15 (Initial value) Enabled
  13894.  
  13895. Rev. 2.0, 02/99, page 294 of 830
  13896.  
  13897. ----------------------- Page 309-----------------------
  13898.  
  13899. • When DRAM or Synchronous DRAM is Used*1
  13900.  
  13901. Description
  13902.  
  13903. DRAM &$6 Synchronous DRAM
  13904. &$6
  13905. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Assertion Width &$6 Latency Cycles
  13906. &$6
  13907.  
  13908. 0 0 0 1 Inhibited
  13909.  
  13910. 2
  13911. 1 2 1*
  13912.  
  13913. 1 0 3 2
  13914.  
  13915. 1 4 3
  13916.  
  13917. 2
  13918. 1 0 0 7 4*
  13919.  
  13920. 2
  13921. 1 10 5*
  13922.  
  13923. 1 0 13 Inhibited
  13924.  
  13925. 1 16 Inhibited
  13926.  
  13927. Notes: 1. External wait input is always ignored.
  13928. 2. Inhibited in RAS down mode.
  13929.  
  13930. Bits 11 to 9—Area 2 Wait Control (A2W2–A2W0): These bits specify the number of wait
  13931. states to be inserted for external space area 2. External wait input is only enabled when normal
  13932. memory is used, and is ignored when DRAM or synchronous DRAM is used.
  13933.  
  13934. • When Normal Memory is Used
  13935.  
  13936. Description
  13937.  
  13938. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Inserted Wait States 5'< Pin
  13939. 5'<
  13940.  
  13941. 0 0 0 0 Ignored
  13942.  
  13943. 1 1 Enabled
  13944.  
  13945. 1 0 2 Enabled
  13946.  
  13947. 1 3 Enabled
  13948.  
  13949. 1 0 0 6 Enabled
  13950.  
  13951. 1 9 Enabled
  13952.  
  13953. 1 0 12 Enabled
  13954.  
  13955. 1 15 (Initial value) Enabled
  13956.  
  13957. Rev. 2.0, 02/99, page 295 of 830
  13958.  
  13959. ----------------------- Page 310-----------------------
  13960.  
  13961. • When DRAM or Synchronous DRAM is Used*
  13962.  
  13963. Description
  13964.  
  13965. DRAM &$6 Synchronous DRAM
  13966. &$6
  13967. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Assertion Width &$6 Latency Cycles
  13968. &$6
  13969.  
  13970. 0 0 0 1 Inhibited
  13971.  
  13972. 1 2 1
  13973.  
  13974. 1 0 3 2
  13975.  
  13976. 1 4 3
  13977.  
  13978. 1 0 0 7 4
  13979.  
  13980. 1 10 5
  13981.  
  13982. 1 0 13 Inhibited
  13983.  
  13984. 1 16 Inhibited
  13985.  
  13986. Note: * External wait input is always ignored.
  13987.  
  13988. Bits 8 to 6—Area 1 Wait Control (A1W2–A1W0): These bits specify the number of wait
  13989. states to be inserted for external space area 1.
  13990.  
  13991. Description
  13992.  
  13993. Bit 8: A1W2 Bit 7: A1W1 Bit 6: A1W0 Inserted Wait States 5'< Pin
  13994. 5'<
  13995.  
  13996. 0 0 0 0 Ignored
  13997.  
  13998. 1 1 Enabled
  13999.  
  14000. 1 0 2 Enabled
  14001.  
  14002. 1 3 Enabled
  14003.  
  14004. 1 0 0 6 Enabled
  14005.  
  14006. 1 9 Enabled
  14007.  
  14008. 1 0 12 Enabled
  14009.  
  14010. 1 15 (Initial value) Enabled
  14011.  
  14012. Rev. 2.0, 02/99, page 296 of 830
  14013.  
  14014. ----------------------- Page 311-----------------------
  14015.  
  14016. Bits 5 to 3—Area 0 Wait Control (A0W2 to A0W0): These bits specify the number of wait
  14017. states to be inserted for external space area 0.
  14018.  
  14019. Description
  14020.  
  14021. First Cycle
  14022.  
  14023. Bit 5: A0W2 Bit 4: A0W1 Bit 3: A0W0 Inserted Wait States 5'< Pin
  14024. 5'<
  14025.  
  14026. 0 0 0 0 Ignored
  14027.  
  14028. 1 1 Enabled
  14029.  
  14030. 1 0 2 Enabled
  14031.  
  14032. 1 3 Enabled
  14033.  
  14034. 1 0 0 6 Enabled
  14035.  
  14036. 1 9 Enabled
  14037.  
  14038. 1 0 12 Enabled
  14039.  
  14040. 1 15 (Initial value) Enabled
  14041.  
  14042. Bits 2 to 0—Area 0 Burst Pitch (A0B2–A0B0): These bits specify the burst pitch in a burst
  14043. transfer.
  14044.  
  14045. Description
  14046.  
  14047. Burst Cycle (Excluding First Cycle)
  14048.  
  14049. Bit 2: A0B2 Bit 1: A0B1 Bit 0: A0B0 Burst Pitch Per Data Transfer 5'< Pin
  14050. 5'<
  14051.  
  14052. 0 0 0 0 Ignored
  14053.  
  14054. 1 1 Enabled
  14055.  
  14056. 1 0 2 Enabled
  14057.  
  14058. 1 3 Enabled
  14059.  
  14060. 1 0 0 4 Enabled
  14061.  
  14062. 1 5 Enabled
  14063.  
  14064. 1 0 6 Enabled
  14065.  
  14066. 1 7 (Initial value) Enabled
  14067.  
  14068. Rev. 2.0, 02/99, page 297 of 830
  14069.  
  14070. ----------------------- Page 312-----------------------
  14071.  
  14072. • When MPX is Used (Areas 0 to 6)
  14073.  
  14074. Bit 4n + 2: Bit 4n + 1: Bit 4n: Description
  14075. AnW2 AnW1 AnW0
  14076.  
  14077. Inserted Wait States 5'< Pin
  14078. 5'<
  14079.  
  14080. 1st Data 2nd Data
  14081. Onward
  14082.  
  14083. Read Write
  14084.  
  14085. 0 0 0 1 0 0 Enabled
  14086.  
  14087. 1 1 Enabled
  14088.  
  14089. 1 0 2 2 Enabled
  14090.  
  14091. 1 3 3 Enabled
  14092.  
  14093. 1 0 0 1 0 1 Enabled
  14094.  
  14095. 1 1 Enabled
  14096.  
  14097. 1 0 2 2 Enabled
  14098.  
  14099. 1 3 3 Enabled
  14100.  
  14101. (n = 6 to 0)
  14102.  
  14103. Rev. 2.0, 02/99, page 298 of 830
  14104.  
  14105. ----------------------- Page 313-----------------------
  14106.  
  14107. 13.2.5 Wait Control Register 3 (WCR3)
  14108.  
  14109. Wait control register 3 (WCR3) is a 32-bit readable/writable register that specifies the cycles
  14110. inserted in the setup time from the address until assertion of the write strobe, and the data hold
  14111. time from negation of the strobe, for each area. This enables low-speed memory to be directly
  14112. connected without using external circuitry.
  14113.  
  14114. WCR3 is initialized to H'07777777 by a power-on reset, but is not initialized by a manual reset
  14115. or in standby mode.
  14116.  
  14117. Bit: 31 30 29 28 27 26 25 24
  14118.  
  14119. Bit name: — — — — — A6S0 A6H1 A6H0
  14120.  
  14121. Initial value: 0 0 0 0 0 1 1 1
  14122.  
  14123. R/W: R R R R R R/W R/W R/W
  14124.  
  14125. Bit: 23 22 21 20 19 18 17 16
  14126.  
  14127. Bit name: — A5S0 A5H1 A5H0 — A4S0 A4H1 A4H0
  14128.  
  14129. Initial value: 0 1 1 1 0 1 1 1
  14130.  
  14131. R/W: R R/W R/W R/W R R/W R/W R/W
  14132.  
  14133. Bit: 15 14 13 12 11 10 9 8
  14134.  
  14135. Bit name: — A3S0 A3H1 A3H0 — A2S0 A2H1 A2H0
  14136.  
  14137. Initial value: 0 1 1 1 0 1 1 1
  14138.  
  14139. R/W: R R/W R/W R/W R R/W R/W R/W
  14140.  
  14141. Bit: 7 6 5 4 3 2 1 0
  14142.  
  14143. Bit name: — A1S0 A1H1 A0H0 — A0S0 A0H1 A0H0
  14144.  
  14145. Initial value: 0 1 1 1 0 1 1 1
  14146.  
  14147. R/W: R R/W R/W R/W R R/W R/W R/W
  14148.  
  14149. Rev. 2.0, 02/99, page 299 of 830
  14150.  
  14151. ----------------------- Page 314-----------------------
  14152.  
  14153. Bits 31 to 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0, and should
  14154. only be written with 0.
  14155.  
  14156. Valid only for normal memory and burst ROM:
  14157.  
  14158. Bit 4n + 2—Area n (6 to 0) Write Strobe Setup Time (AnS0): Specifies the number of cycles
  14159. inserted in the setup time from the address until assertion of the read/write strobe.
  14160.  
  14161. Bit 4n + 2: AnS0 Waits Inserted in Setup
  14162.  
  14163. 0 0
  14164.  
  14165. 1 1 (Initial value)
  14166.  
  14167. (n = 6 to 0)
  14168.  
  14169. Valid only for normal memory and burst ROM:
  14170.  
  14171. Bits 4n + 1 and 4n—Area n (6 to 0) Data Hold Time (AnH1, AnH0): When writing, these bits
  14172. specify the number of cycles to be inserted in the hold time from negation of the write strobe.
  14173. When reading, they specify the number of cycles to be inserted in the hold time from the data
  14174. sampling timing.
  14175.  
  14176. Bit 4n + 1: AnH1 Bit 4n: AnH0 Waits Inserted in Hold
  14177.  
  14178. 0 0 0
  14179.  
  14180. 1 1
  14181.  
  14182. 1 0 2
  14183.  
  14184. 1 3 (Initial value)
  14185.  
  14186. (n = 6 to 0)
  14187.  
  14188. Rev. 2.0, 02/99, page 300 of 830
  14189.  
  14190. ----------------------- Page 315-----------------------
  14191.  
  14192. 13.2.6 Memory Control Register (MCR)
  14193.  
  14194. The memory control register (MCR) is a 32-bit readable/writable register that specifies 5$6 and
  14195. &$6 timing and burst control for DRAM and synchronous DRAM (areas 2 and 3), address
  14196. multiplexing, and refresh control. This enables DRAM and synchronous DRAM to be directly
  14197. connected without using external circuitry.
  14198.  
  14199. MCR is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset or
  14200. in standby mode. Bits RASD, MRSET, TRC2–0, TPC2–0, RCD1–0, TRWL2–0, TRAS2–0, BE,
  14201. SZ1–0, AMXEXT, AMX2–0, and EDOMODE are written in the initialization following a
  14202. power-on reset, and should not be modified subsequently. When writing to bits RFSH and
  14203. RMODE, the same values should be written to the other bits so that they remain unchanged.
  14204. When using DRAM or synchronous DRAM, areas 2 and 3 should not be accessed until register
  14205. initialization is completed.
  14206.  
  14207. Bit: 31 30 29 28 27 26 25 24
  14208.  
  14209. Bit name: RASD MRSET TRC2 TRC1 TRC0 — — —
  14210.  
  14211. Initial value: 0 0 0 0 0 0 0 0
  14212.  
  14213. R/W: R/W R/W R/W R/W R/W R R R
  14214.  
  14215. Bit: 23 22 21 20 19 18 17 16
  14216.  
  14217. Bit name: TCAS — TPC2 TPC1 TPC0 — RCD1 RCD0
  14218.  
  14219. Initial value: 0 0 0 0 0 0 0 0
  14220.  
  14221. R/W: R/W R R/W R/W R/W R R/W R/W
  14222.  
  14223. Bit: 15 14 13 12 11 10 9 8
  14224.  
  14225. Bit name: TRWL2 TRWL1 TRWL0 TRAS2 TRAS1 TRAS0 BE SZ1
  14226.  
  14227. Initial value: 0 0 0 0 0 0 0 0
  14228.  
  14229. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14230.  
  14231. Bit: 7 6 5 4 3 2 1 0
  14232.  
  14233. Bit name: SZ0 AMXEXT AMX2 AMX1 AMX0 RFSH RMODE EDO
  14234. MODE
  14235.  
  14236. Initial value: 0 0 0 0 0 0 0 0
  14237.  
  14238. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14239.  
  14240. Rev. 2.0, 02/99, page 301 of 830
  14241.  
  14242. ----------------------- Page 316-----------------------
  14243.  
  14244. Bit 31—RAS Down (RASD): Sets RAS down mode. When RAS down mode is used, set BE to
  14245. 1. Do not set RAS down mode in slave mode or partial-sharing mode, or when areas 2 and 3 are
  14246. both designated as synchronous DRAM space.
  14247.  
  14248. Bit 31: RASD Description
  14249.  
  14250. 0 Normal mode (Initial value)
  14251.  
  14252. 1 RAS down mode
  14253.  
  14254. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  14255. and bits A3IW2–A3IW0 to 000.
  14256.  
  14257. Bit 30—Mode Register Set (MRSET): Set when a synchronous DRAM mode register setting is
  14258. used. See Power-On Sequence in section 13.3.5, Synchronous DRAM Interface.
  14259.  
  14260. Bit 30: MRSET Description
  14261.  
  14262. 0 All-bank precharge (Initial value)
  14263.  
  14264. 1 Mode register setting
  14265.  
  14266. Bits 26 to 24, 22, and 18—Reserved: These bits are always read as 0, and should only be
  14267. written with 0.
  14268.  
  14269. Bits 29 to 27—RAS Precharge Time at End of Refresh (TRC2–TRC0)
  14270. (Synchronous DRAM: auto- and self-refresh both enabled; DRAM: auto- and self-refresh both
  14271. enabled)
  14272.  
  14273. RAS Precharge Time
  14274. Bit 29: TRC2 Bit 28: TRC1 Bit 27: TRC0 Immediately after Refresh
  14275.  
  14276. 0 0 0 0 (Initial value)
  14277.  
  14278. 1 3
  14279.  
  14280. 1 0 6
  14281.  
  14282. 1 9
  14283.  
  14284. 1 0 0 12
  14285.  
  14286. 1 15
  14287.  
  14288. 1 0 18
  14289.  
  14290. 1 21
  14291.  
  14292. Rev. 2.0, 02/99, page 302 of 830
  14293.  
  14294. ----------------------- Page 317-----------------------
  14295.  
  14296. Bit 23—CAS Negation Period (TCAS): This bit is valid only when DRAM is connected.
  14297.  
  14298. Bit 23: TCAS CAS Negation Period
  14299.  
  14300. 0 1 (Initial value)
  14301.  
  14302. 1 2
  14303.  
  14304. Bits 21 to 19—RAS Precharge Period (TPC2–TPC0): When the DRAM interface is selected
  14305. for the connected memory, these bits specify the minimum number of cycles until 5$6 is
  14306. asserted again after being negated. When the synchronous DRAM interface is selected, these bits
  14307. specify the minimum number of cycles until the next bank active command is output after
  14308. precharging.
  14309.  
  14310. RAS Precharge Time
  14311.  
  14312. Bit 21: TPC2 Bit 20: TPC1 Bit 19: TPC0 DRAM Synchronous DRAM
  14313.  
  14314. 0 0 0 0 1* (Initial value)
  14315.  
  14316. 1 1 2
  14317.  
  14318. 1 0 2 3
  14319.  
  14320. 1 3 4*
  14321.  
  14322. 1 0 0 4 5*
  14323.  
  14324. 1 5 6*
  14325.  
  14326. 1 0 6 7*
  14327.  
  14328. 1 7 8*
  14329.  
  14330. Note: * Inhibited in RAS down mode.
  14331.  
  14332. Bits 17 and 16—RAS-CAS Delay (RCD1, RCD0): When the DRAM interface is selected for
  14333. the connected memory, these bits set the 5$6-&$6 assertion delay time. When the synchronous
  14334. DRAM interface is selected, these bits set the bank active-read/write command delay time.
  14335.  
  14336. Description
  14337.  
  14338. Bit 17: RCD1 Bit 16: RCD0 DRAM Synchronous DRAM
  14339.  
  14340. 0 0 2 cycles Reserved (Setting prohibited)
  14341.  
  14342. 1 3 cycles 2 cycles
  14343.  
  14344. 1 0 4 cycles 3 cycles
  14345.  
  14346. 1 5 cycles 4 cycles*
  14347.  
  14348. Note: * Inhibited in RAS down mode.
  14349.  
  14350. Rev. 2.0, 02/99, page 303 of 830
  14351.  
  14352. ----------------------- Page 318-----------------------
  14353.  
  14354. Bits 15 to 13—Write Precharge Delay (TRWL2–TRWL0): These bits set the synchronous
  14355. DRAM write precharge delay time. In auto-precharge mode, they specify the time until the next
  14356. bank active command is issued after a write cycle. After a write cycle, the next active command
  14357. is not issued for a period of TPC + TRWL. In RAS down mode, they specify the time until the
  14358. next precharge command is issued. After a write cycle, the next precharge command is not
  14359. issued for a period of TRWL. This setting is valid only when synchronous DRAM is connected.
  14360.  
  14361. Bit 15: TRWL2 Bit 14: TRWL1 Bit 13: TRWL0 Write Precharge ACT Delay Time
  14362.  
  14363. 0 0 0 1 (Initial value)
  14364.  
  14365. 1 2
  14366.  
  14367. 1 0 3*
  14368.  
  14369. 1 4*
  14370.  
  14371. 1 0 0 5*
  14372.  
  14373. 1 Reserved (Setting prohibited)
  14374.  
  14375. 1 0 Reserved (Setting prohibited)
  14376.  
  14377. 1 Reserved (Setting prohibited)
  14378.  
  14379. Note: * Inhibited in RAS down mode.
  14380.  
  14381. Bits 12 to 10—CAS-Before-RAS Refresh 5$6 Assertion Period (TRAS2–TRAS0): When the
  14382. 5$6
  14383. DRAM interface is selected for the connected memory, these bits set the 5$6 assertion period in
  14384. CAS-before-RAS refreshing. When the synchronous DRAM interface is selected, the bank
  14385. active command is not issued for a period of TRC + TRAS after an auto-refresh command is
  14386. issued.
  14387.  
  14388. Bit 12: TRAS2 Bit 11: TRAS1 Bit 10: TRAS0 5$6/DRAM Command
  14389. 5$6
  14390. Assertion Period Interval after
  14391. Synchronous
  14392. DRAM Refresh
  14393.  
  14394. 0 0 0 2 4 + TRC
  14395. (Initial value)
  14396.  
  14397. 1 3 5 + TRC
  14398.  
  14399. 1 0 4 6 + TRC
  14400.  
  14401. 1 5 7 + TRC
  14402.  
  14403. 1 0 0 6 8 + TRC
  14404.  
  14405. 1 7 9 + TRC
  14406.  
  14407. 1 0 8 10 + TRC
  14408.  
  14409. 1 9 11 + TRC
  14410.  
  14411. Rev. 2.0, 02/99, page 304 of 830
  14412.  
  14413. ----------------------- Page 319-----------------------
  14414.  
  14415. Bit 9—Burst Enable (BE): Specifies whether burst access is performed on DRAM. In
  14416. synchronous DRAM access, burst access is always performed regardless of the specification of
  14417. this bit. The DRAM transfer mode depends on EDOMODE.
  14418.  
  14419. BE EDOMODE 8/16/32/64-Bit Transfer 32-Byte Transfer
  14420.  
  14421. 0 0 Single Single
  14422.  
  14423. 1 Setting prohibited Setting prohibited
  14424.  
  14425. 1 0 Single/fast page* Fast page
  14426.  
  14427. 1 EDO EDO
  14428.  
  14429. Note: * In fast page mode, 32-bit or 64-bit transfer with a 16-bit bus, 64-bit transfer with a 32-bit
  14430. bus.
  14431.  
  14432. Bits 8 and 7—Memory Data Size (SZ1, SZ0): These bits specify the memory data size of
  14433. DRAM and synchronous DRAM. This setting has priority over the BCR2 register setting.
  14434.  
  14435. Description
  14436.  
  14437. Bit 8: SZ1 Bit 7: SZ0 DRAM SDRAM
  14438.  
  14439. 0 0 64 bits 64 bits
  14440.  
  14441. 1 Reserved (Setting prohibited) Reserved (Setting prohibited)
  14442.  
  14443. 1 0 16 bits Reserved (Setting prohibited)
  14444.  
  14445. 1 32 bits 32 bits
  14446.  
  14447. Rev. 2.0, 02/99, page 305 of 830
  14448.  
  14449. ----------------------- Page 320-----------------------
  14450.  
  14451. Bits 6 to 3—Address Multiplexing (AMXEXT, AMX2–AMX0): These bits specify address
  14452. multiplexing for DRAM and synchronous DRAM. The actual address shift value is different for
  14453. the DRAM interface and the synchronous DRAM interface.
  14454.  
  14455. • For DRAM Interface:
  14456.  
  14457. Bit 6: Bit 5: Bit 4: Bit 3: Description
  14458. AMXEXT AMX2 AMX1 AMX0
  14459.  
  14460. DRAM
  14461.  
  14462. 0* 0 0 0 8-bit column address product
  14463. (Initial value)
  14464.  
  14465. 1 9-bit column address product
  14466.  
  14467. 1 0 10-bit column address product
  14468.  
  14469. 1 11-bit column address product
  14470.  
  14471. 1 0 0 12-bit column address product
  14472.  
  14473. 1 Reserved (Setting prohibited)
  14474.  
  14475. 1 0 Reserved (Setting prohibited)
  14476.  
  14477. 1 Reserved (Setting prohibited)
  14478.  
  14479. Note: * When the DRAM interface is used, clear the AMXEXT bit to 0.
  14480.  
  14481. Rev. 2.0, 02/99, page 306 of 830
  14482.  
  14483. ----------------------- Page 321-----------------------
  14484.  
  14485. • For Synchronous DRAM Interface:
  14486.  
  14487. AMX AMXEXT SZ Synchronous DRAM BANK
  14488.  
  14489. 0 0 64 (16M: 512k × 16 bits × 2) × 4 a[22]*
  14490.  
  14491. 32 (16M: 512k × 16 bits × 2) × 2 a[21]*
  14492.  
  14493. 1 64 (16M: 512k × 16 bits × 2) × 4 a[21]*
  14494.  
  14495. 32 (16M: 512k × 16 bits × 2) × 2 a[20]*
  14496.  
  14497. 1 0 64 (16M: 1M × 8 bits × 2) × 8 a[23]*
  14498.  
  14499. 32 (16M: 1M × 8 bits × 2) × 4 a[22]*
  14500.  
  14501. 1 64 (16M: 1M × 8 bits × 2) × 8 a[22]*
  14502.  
  14503. 32 (16M: 1M × 8 bits × 2) × 4 a[21]*
  14504.  
  14505. 2 — 64 (64M: 1M × 16 bits × 4) × 4 a[24:23]*
  14506.  
  14507. 32 (64M: 1M × 16 bits × 4) × 2 a[23:22]*
  14508.  
  14509. 3 64 (64M: 2M × 8 bits × 4) × 8 a[25:24]*
  14510.  
  14511. 32 (64M: 2M × 8 bits × 4) × 4 a[24:23]*
  14512.  
  14513. 4 64 (64M: 512k × 32 bits × 4) × 2 a[23:22]*
  14514.  
  14515. 32 (64M: 512k × 32 bits × 4) × 1 a[22:21]*
  14516.  
  14517. 5 64 (64M: 1M × 32 bits × 2) × 2 a[23]*
  14518.  
  14519. 32 (64M: 1M × 32 bits × 2) × 1 a[22]*
  14520.  
  14521. 6 64 Reserved (Setting prohibited)
  14522.  
  14523. 32 Reserved (Setting prohibited)
  14524.  
  14525. 7 64 (16M: 256k × 32 bits × 2) × 2 a[21]*
  14526.  
  14527. 32 (16M: 256k × 32 bits × 2) × 1 a[20]*
  14528.  
  14529. Note: * a[*]: Physical address
  14530.  
  14531. Bit 2—Refresh Control (RFSH): Specifies refresh control. Selects whether refreshing is
  14532. performed for DRAM and synchronous DRAM. When the refresh function is not used, the
  14533. refresh request cycle generation timer can be used as an interval timer.
  14534.  
  14535. Bit 2: RFSH Description
  14536.  
  14537. 0 Refreshing is not performed (Initial value)
  14538.  
  14539. 1 Refreshing is performed
  14540.  
  14541. Rev. 2.0, 02/99, page 307 of 830
  14542.  
  14543. ----------------------- Page 322-----------------------
  14544.  
  14545. Bit 1—Refresh Mode (RMODE): Specifies whether normal refreshing or self-refreshing is
  14546. performed when the RFSH bit is set to 1. When the RFSH bit is 1 and this bit is cleared to 0,
  14547. CAS-before-RAS refreshing or auto-refreshing is performed for DRAM and synchronous
  14548. DRAM, using the cycle set by refresh-related registers RTCNT, RTCOR, and RTCSR. If a
  14549. refresh request is issued during an external bus cycle, the refresh cycle is executed when the bus
  14550. cycle ends. When the RFSH bit is 1 and this bit is set to 1, the self-refresh state is set for DRAM
  14551. and synchronous DRAM, after waiting for the end of any currently executing external bus cycle.
  14552. All refresh requests for memory in the self-refresh state are ignored.
  14553.  
  14554. Bit 1: RMODE Description
  14555.  
  14556. 0 CAS-before-RAS refreshing is performed (when RFSH = 1) (Initial value)
  14557.  
  14558. 1 Self-refreshing is performed (when RFSH = 1)
  14559.  
  14560. Bit 0—EDO Mode (EDOMODE): Used to specify the data sampling timing for data reads
  14561. when using EDO mode DRAM. The setting of this bit does not affect the operation timing of
  14562. memory other than DRAM. Set this bit to 1 only when DRAM is used.
  14563.  
  14564. 13.2.7 PCMCIA Control Register (PCR)
  14565.  
  14566. The PCMCIA control register (PCR) is a 16-bit readable/writable register that specifies the 2(
  14567. and :( signal assertion/negation timing for the PCMCIA interface connected to areas 5 and 6.
  14568. The 2( and :( signal assertion width is set by the wait control bits in the WCR2 register.
  14569.  
  14570. PCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  14571. standby mode.
  14572.  
  14573. Bit: 15 14 13 12 11 10 9 8
  14574.  
  14575. Bit name: A5PCW1 A5PCW0 A6PCW1 A6PCW0 A5TED2 A5TED1 A5TED0 A6TED2
  14576.  
  14577. Initial value: 0 0 0 0 0 0 0 0
  14578.  
  14579. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14580.  
  14581. Bit: 7 6 5 4 3 2 1 0
  14582.  
  14583. Bit name: A6TED1 A6TED0 A5TEH2 A5TEH1 A5TEH0 A6TEH2 A6TEH1 A6TEH0
  14584.  
  14585. Initial value: 0 0 0 0 0 0 0 0
  14586.  
  14587. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14588.  
  14589. Rev. 2.0, 02/99, page 308 of 830
  14590.  
  14591. ----------------------- Page 323-----------------------
  14592.  
  14593. Bits 15 and 14—PCMCIA Wait (A5PCW1, A5PCW0): These bits specify the number of waits
  14594. to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait cycle. The
  14595. setting of these bits is selected when the TC bit is cleared to 0 in the page table entry assistance
  14596. register (PTEA).
  14597.  
  14598. Bit 15: A5PCW1 Bit 14: A5PCW0 Waits Inserted
  14599.  
  14600. 0 0 0 (Initial value)
  14601.  
  14602. 1 15
  14603.  
  14604. 1 0 30
  14605.  
  14606. 1 50
  14607.  
  14608. Bits 13 and 12—PCMCIA Wait (A6PCW1, A6PCW0): These bits specify the number of waits
  14609. to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait cycle. The
  14610. setting of these bits is selected when the TC bit is set to 1 in the page table entry assistance
  14611. register (PTEA).
  14612.  
  14613. Bit 13: A6PCW1 Bit 12: A6PCW0 Waits Inserted
  14614.  
  14615. 0 0 0 (Initial value)
  14616.  
  14617. 1 15
  14618.  
  14619. 1 0 30
  14620.  
  14621. 1 50
  14622.  
  14623. 2( :(
  14624. Bits 11 to 9—Address- / Assertion Delay (A5TED2–A5TED0): These bits set the delay
  14625. 2( :(
  14626. time from address output to 2(/:( assertion on the connected PCMCIA interface. The setting
  14627. of these bits is selected when the TC bit is cleared to 0 in PTEA.
  14628.  
  14629. Bit 11: A5TED2 Bit 10: A5TED1 Bit 9: A5TED0 Waits Inserted
  14630.  
  14631. 0 0 0 0 (Initial value)
  14632.  
  14633. 1 1
  14634.  
  14635. 1 0 2
  14636.  
  14637. 1 3
  14638.  
  14639. 1 0 0 6
  14640.  
  14641. 1 9
  14642.  
  14643. 1 0 12
  14644.  
  14645. 1 15
  14646.  
  14647. Rev. 2.0, 02/99, page 309 of 830
  14648.  
  14649. ----------------------- Page 324-----------------------
  14650.  
  14651. 2( :(
  14652. Bits 8 to 6—Address- / Assertion Delay (A6TED2–A6TED0): These bits set the delay
  14653. 2( :(
  14654. time from address output to 2(/:( assertion on the connected PCMCIA interface. The setting
  14655. of these bits is selected when the TC bit is set to 1 in PTEA.
  14656.  
  14657. Bit 8: A6TED2 Bit 7: A6TED1 Bit 6: A6TED0 Waits Inserted
  14658.  
  14659. 0 0 0 0 (Initial value)
  14660.  
  14661. 1 1
  14662.  
  14663. 1 0 2
  14664.  
  14665. 1 3
  14666.  
  14667. 1 0 0 6
  14668.  
  14669. 1 9
  14670.  
  14671. 1 0 12
  14672.  
  14673. 1 15
  14674.  
  14675. 2( :(
  14676. Bits 5 to 3— / Negation-Address Delay (A5TEH2–A5TEH0): These bits set the address
  14677. 2( :(
  14678. hold delay time from 2(/:( negation in a write on the connected PCMCIA interface or in an
  14679. I/O card read. In the case of a memory card read, the address hold delay time from the data
  14680. sampling timing is set.The setting of these bits is selected when the TC bit is cleared to 0 in
  14681. PTEA.
  14682.  
  14683. Bit 5: A5TEH2 Bit 4: A5TEH1 Bit 3: A5TEH0 Waits Inserted
  14684.  
  14685. 0 0 0 0 (Initial value)
  14686.  
  14687. 1 1
  14688.  
  14689. 1 0 2
  14690.  
  14691. 1 3
  14692.  
  14693. 1 0 0 6
  14694.  
  14695. 1 9
  14696.  
  14697. 1 0 12
  14698.  
  14699. 1 15
  14700.  
  14701. Rev. 2.0, 02/99, page 310 of 830
  14702.  
  14703. ----------------------- Page 325-----------------------
  14704.  
  14705. 2( :(
  14706. Bits 2 to 0— / Negation-Address Delay (A6TEH2–A6TEH0): These bits set the address
  14707. 2( :(
  14708. hold delay time from 2(/:( negation in a write on the connected PCMCIA interface or in an
  14709. I/O card read. In the case of a memory card read, the address hold delay time from the data
  14710. sampling timing is set. The setting of these bits is selected when the TC bit is set to 1 in PTEA.
  14711.  
  14712. Bit 2: A6TEH2 Bit 1: A6TEH1 Bit 0: A6TEH0 Waits Inserted
  14713.  
  14714. 0 0 0 0 (Initial value)
  14715.  
  14716. 1 1
  14717.  
  14718. 1 0 2
  14719.  
  14720. 1 3
  14721.  
  14722. 1 0 0 6
  14723.  
  14724. 1 9
  14725.  
  14726. 1 0 12
  14727.  
  14728. 1 15
  14729.  
  14730. 13.2.8 Synchronous DRAM Mode Register (SDMR)
  14731.  
  14732. The synchronous DRAM mode register (SDMR) is a write-only virtual 16-bit register that is
  14733. written to via the synchronous DRAM address bus, and sets the mode of the area 2 and area 3
  14734. synchronous DRAM.
  14735.  
  14736. Settings for the SDMR register must be made before accessing synchronous DRAM.
  14737.  
  14738. Bit: 15 14 13 12 11 10 9 8
  14739.  
  14740. Bit name:
  14741.  
  14742. Initial value: — — — — — — — —
  14743.  
  14744. R/W: W W W W W W W W
  14745.  
  14746. Bit: 7 6 5 4 3 2 1 0
  14747.  
  14748. Bit name:
  14749.  
  14750. Initial value: — — — — — — — —
  14751.  
  14752. R/W: W W W W W W W W
  14753.  
  14754. Since the address bus, not the data bus, is used to write to the synchronous DRAM mode
  14755. register, if the value to be set is “X” and the SDMR register address is “Y”, value “X” is written
  14756. to the synchronous DRAM mode register by performing a write to address X + Y. When the
  14757. synchronous DRAM bus width is set to 32 bits, as A0 of the synchronous DRAM is connected to
  14758. A2 of the SH7750, and A1 of the synchronous DRAM is connected to A3 of the SH7750, the
  14759. value actually written to the synchronous DRAM is the value of “X” shifted 2 bits to the right.
  14760.  
  14761. Rev. 2.0, 02/99, page 311 of 830
  14762.  
  14763. ----------------------- Page 326-----------------------
  14764.  
  14765. For example, to write H'0230 to the area 2 SDMR register, arbitrary data is written to address
  14766. H'FF900000 (address “Y”) + H'08C0 (value “X”) (= H'FF9008C0). As a result, H'0230 is written
  14767. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  14768.  
  14769. Similarly, to write H'0230 to the area 3 SDMR register, arbitrary data is written to address
  14770. H'FF940000 (address “Y”) + H'08C0 (value “X”) (= H'FF9408C0). As a result, H'0230 is written
  14771. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  14772.  
  14773. The lower 16 bits of the address are set in the synchronous DRAM mode register.
  14774.  
  14775. For a 32-bit bus:
  14776.  
  14777. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  14778.  
  14779. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  14780. DE2 DE1 DE0
  14781.  
  14782. ←→
  14783. 10 bits set in case of 32-bit bus width
  14784.  
  14785. For a 64-bit bus:
  14786.  
  14787. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  14788.  
  14789. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  14790. DE2 DE1 DE0
  14791.  
  14792. ←→
  14793. 10 bits set in case of 64-bit bus width
  14794.  
  14795. LMODE: RAS-CAS latency
  14796. BL: Burst length
  14797. WT: Wrap type (0: Sequential)
  14798.  
  14799. BL LMODE
  14800. 000: Reserved 000: Reserved
  14801. 001: Reserved 001: 1
  14802. 010: 4 010: 2
  14803. 011: 8 011: 3
  14804. 100: Reserved 100: Reserved
  14805. 101: Reserved 101: Reserved
  14806. 110: Reserved 110: Reserved
  14807. 111: Reserved 111: Reserved
  14808.  
  14809. Rev. 2.0, 02/99, page 312 of 830
  14810.  
  14811. ----------------------- Page 327-----------------------
  14812.  
  14813. 13.2.9 Refresh Timer Control/Status Register (RTSCR)
  14814.  
  14815. The refresh timer control/status register (RTSCR) is a 16-bit readable/writable register that
  14816. specifies the refresh cycle and whether interrupts are to be generated.
  14817.  
  14818. RTSCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  14819. standby mode.
  14820.  
  14821. Bit: 15 14 13 12 11 10 9 8
  14822.  
  14823. Bit name: — — — — — — — —
  14824.  
  14825. Initial value: 0 0 0 0 0 0 0 0
  14826.  
  14827. R/W: — — — — — — — —
  14828.  
  14829. Bit: 7 6 5 4 3 2 1 0
  14830.  
  14831. Bit name: CMF CMIE CKS2 CKS1 CKS0 OVF OVIE LMTS
  14832.  
  14833. Initial value: 0 0 0 0 0 0 0 0
  14834.  
  14835. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14836.  
  14837. Bits 15 to 8—Reserved: These bits are always read as 0. For the write values, see section
  14838. 13.2.13, Notes on Accessing Refresh Control Registers.
  14839.  
  14840. Bit 7—Compare-Match Flag (CMF): Status flag that indicates a match between the refresh
  14841. timer counter (RTCNT) and refresh time constant register (RTCOR) values.
  14842.  
  14843. Bit 7: CMF Description
  14844.  
  14845. 0 RTCNT and RTCOR values do not match (Initial
  14846. value)
  14847.  
  14848. [Clearing condition]
  14849. When 0 is written to CMF
  14850.  
  14851. 1 RTCNT and RTCOR values match
  14852.  
  14853. [Setting condition]
  14854. When RTCNT = RTCOR*
  14855.  
  14856. Note: * If 1 is written, the original value is retained.
  14857.  
  14858. Rev. 2.0, 02/99, page 313 of 830
  14859.  
  14860. ----------------------- Page 328-----------------------
  14861.  
  14862. Bit 6—Compare-Match Interrupt Enable (CMIE): Controls generation or suppression of an
  14863. interrupt request when the CMF flag is set to 1 in RTCSR. Do not set this bit to 1 when CAS-
  14864. before-RAS refreshing or auto-refreshing is used.
  14865.  
  14866. Bit 6: CMIE Description
  14867.  
  14868. 0 Interrupt requests initiated by CMF are disabled (Initial value)
  14869.  
  14870. 1 Interrupt requests initiated by CMF are enabled
  14871.  
  14872. Bits 5 to 3—Clock Select Bits (CKS2–CKS0): These bits select the input clock for RTCNT.
  14873. The base clock is the external bus clock (CKIO). The RTCNT count clock is obtained by scaling
  14874. CKIO by the specified factor.
  14875.  
  14876. Bit 5: CKS2 Bit 4: CKS1 Bit 3: CKS0 Description
  14877.  
  14878. 0 0 0 Clock input disabled (Initial value)
  14879.  
  14880. 1 Bus clock (CKIO)/4
  14881.  
  14882. 1 0 CKIO/16
  14883.  
  14884. 1 CKIO/64
  14885.  
  14886. 1 0 0 CKIO/256
  14887.  
  14888. 1 CKIO/1024
  14889.  
  14890. 1 0 CKIO/2048
  14891.  
  14892. 1 CKIO/4096
  14893.  
  14894. Bit 2—Refresh Count Overflow Flag (OVF): Status flag that indicates that the number of
  14895. refresh requests indicated by the refresh count register (RFCR) has exceeded the number
  14896. specified by the LMTS bit in RTCSR.
  14897.  
  14898. Bit 2: OVF Description
  14899.  
  14900. 0 RFCR has not overflowed the count limit indicated by LMTS (Initial value)
  14901.  
  14902. [Clearing condition]
  14903. When 0 is written to OVF
  14904.  
  14905. 1 RFCR has overflowed the count limit indicated by LMTS
  14906.  
  14907. [Setting condition]
  14908. When RFCR overflows the count limit set by LMTS*
  14909.  
  14910. Note: * If 1 is written, the original value is retained.
  14911.  
  14912. Rev. 2.0, 02/99, page 314 of 830
  14913.  
  14914. ----------------------- Page 329-----------------------
  14915.  
  14916. Bit 1—Refresh Count Overflow Interrupt Enable (OVIE): Controls generation or suppression
  14917. of an interrupt request when the OVF flag is set to 1 in RTCSR.
  14918.  
  14919. Bit 1: OVIE Description
  14920.  
  14921. 0 Interrupt requests initiated by OVF are disabled (Initial value)
  14922.  
  14923. 1 Interrupt requests initiated by OVF are enabled
  14924.  
  14925. Bit 0—Refresh Count Overflow Limit Select (LMTS): Specifies the count limit to be
  14926. compared with the refresh count indicated by the refresh count register (RFCR). If the RFCR
  14927. register value exceeds the value specified by LMTS, the OVF flag is set.
  14928.  
  14929. Bit 0: LMTS Description
  14930.  
  14931. 0 Count limit is 1024 (Initial value)
  14932.  
  14933. 1 Count limit is 512
  14934.  
  14935. 13.2.10 Refresh Timer Counter (RTCNT)
  14936.  
  14937. The refresh timer counter (RTCNT) is an 8-bit readable/writable counter that is incremented by
  14938. the input clock (selected by bits CKS2–CKS0 in the RTCSR register). When the RTCNT
  14939. counter value matches the RTCOR register value, the CMF bit is set in the RTCSR register and
  14940. the RTCNT counter is cleared.
  14941.  
  14942. RTCNT is initialized to H'0000 by a power-on reset, but continues to count when a manual reset
  14943. is performed. In standby mode, RTCNT is not initialized, and retains its contents.
  14944.  
  14945. Bit: 15 14 13 12 11 10 9 8
  14946.  
  14947. Bit name: — — — — — — — —
  14948.  
  14949. Initial value: 0 0 0 0 0 0 0 0
  14950.  
  14951. R/W: — — — — — — — —
  14952.  
  14953. Bit: 7 6 5 4 3 2 1 0
  14954.  
  14955. Bit name:
  14956.  
  14957. Initial value: 0 0 0 0 0 0 0 0
  14958.  
  14959. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14960.  
  14961. Rev. 2.0, 02/99, page 315 of 830
  14962.  
  14963. ----------------------- Page 330-----------------------
  14964.  
  14965. 13.2.11 Refresh Time Constant Register (RTCOR)
  14966.  
  14967. The refresh time constant register (RTCOR) is a readable/writable register that specifies the
  14968. upper limit of the RTCNT counter. The RTCOR register and RTCNT counter values (lower 8
  14969. bits) are constantly compared, and when they match the CMF bit is set in the RTCSR register
  14970. and the RTCNT counter is cleared to 0. If the refresh bit (RFSH) has been set to 1 in the
  14971. memory control register (MCR) and CAS-before-RAS has been selected as the refresh mode, a
  14972. memory refresh cycle is generated when the CMF bit is set.
  14973.  
  14974. RTCOR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its
  14975. contents, in a manual reset and in standby mode.
  14976.  
  14977. Bit: 15 14 13 12 11 10 9 8
  14978.  
  14979. Bit name: — — — — — — — —
  14980.  
  14981. Initial value: 0 0 0 0 0 0 0 0
  14982.  
  14983. R/W: — — — — — — — —
  14984.  
  14985. Bit: 7 6 5 4 3 2 1 0
  14986.  
  14987. Bit name:
  14988.  
  14989. Initial value: 0 0 0 0 0 0 0 0
  14990.  
  14991. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14992.  
  14993. Rev. 2.0, 02/99, page 316 of 830
  14994.  
  14995. ----------------------- Page 331-----------------------
  14996.  
  14997. 13.2.12 Refresh Count Register (RFCR)
  14998.  
  14999. The refresh count register (RFCR) is a 10-bit readable/writable counter that counts the number
  15000. of refreshes by being incremented each time the RTCOR register and RTCNT counter values
  15001. match. If the RFCR register value exceeds the count limit specified by the LMTS bit in the
  15002. RTCSR register, the OVF flag is set in the RTCSR register and the RFCR register is cleared.
  15003.  
  15004. RFCR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its contents,
  15005. in a manual reset and in standby mode.
  15006.  
  15007. Bit: 15 14 13 12 11 10 9 8
  15008.  
  15009. Bit name: — — — — — —
  15010.  
  15011. Initial value: 0 0 0 0 0 0 0 0
  15012.  
  15013. R/W: — — — — — — R/W R/W
  15014.  
  15015. Bit: 7 6 5 4 3 2 1 0
  15016.  
  15017. Bit name:
  15018.  
  15019. Initial value: 0 0 0 0 0 0 0 0
  15020.  
  15021. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15022.  
  15023. Rev. 2.0, 02/99, page 317 of 830
  15024.  
  15025. ----------------------- Page 332-----------------------
  15026.  
  15027. 13.2.13 Notes on Accessing Refresh Control Registers
  15028.  
  15029. When the refresh timer control/status register (RTCSR), refresh timer counter (RTCNT), refresh
  15030. time constant register (RTCOR), and refresh count register (RFCR) are written to, a special code
  15031. is added to the data to prevent inadvertent rewriting in the event of program runaway, etc. The
  15032. following procedures should be used for read/write operations.
  15033.  
  15034. Writing to RTCSR, RTCNT, RTCOR, and RFCR: A word transfer instruction must always
  15035. be used when writing to RTCSR, RTCNT, RTCOR, or RFCR. A write cannot be performed with
  15036. a byte transfer instruction.
  15037.  
  15038. When writing to RTCSR, RTCNT, or RTCOR, set B'10100101 in the upper byte and the write
  15039. data in the lower byte, as shown in figure 13.4. When writing to RFCR, set B'101001 in the 6
  15040. bits starting from the MSB in the upper byte, and the write data in the remaining bits.
  15041.  
  15042. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15043. RTCSR,
  15044. RTCNT, 1 0 1 0 0 1 0 1 Write data
  15045. RTCOR
  15046.  
  15047. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15048.  
  15049. 1 0 1 0 0 1 Write data
  15050. RFCR
  15051.  
  15052. Figure 13.4 Writing to RTCSR, RTCNT, RTCOR, and RFCR
  15053.  
  15054. Reading RTCSR, RTCNT, RTCOR, and RFCR: A 16-bit access must always be used when
  15055. reading RTCSR, RTCNT, RTCOR, or RFCR. Undefined bits are read as 0.
  15056.  
  15057. Rev. 2.0, 02/99, page 318 of 830
  15058.  
  15059. ----------------------- Page 333-----------------------
  15060.  
  15061. 13.3 Operation
  15062.  
  15063. 13.3.1 Endian/Access Size and Data Alignment
  15064.  
  15065. The SH7750 supports both big-endian mode, in which the most significant byte (MSByte) is at
  15066. the 0 address end in a string of byte data, and little-endian mode, in which the least significant
  15067. byte (LSByte) is at the 0 address end. The mode is set by means of the MD5 external pin in a
  15068. power-on reset, big-endian mode being set if the MD5 pin is low, and little-endian mode if it is
  15069. high.
  15070.  
  15071. A data bus width of 8, 16, 32, or 64 bits can be selected for normal memory, 16, 32, or 64 bits
  15072. for DRAM, 32 or 64 bits for synchronous DRAM, and 8 or 16 bits for the PCMCIA interface.
  15073. Data alignment is carried out according to the data bus width and endian mode of each device.
  15074. Thus, four read operations are needed to read longword data from an 8-bit device. In the
  15075. SH7750, data alignment and data length conversion between the different interfaces is
  15076. performed automatically.
  15077.  
  15078. The relationship between the endian mode, device data length, and access unit, is shown in
  15079. tables 13.6 to 13.13.
  15080.  
  15081. Rev. 2.0, 02/99, page 319 of 830
  15082.  
  15083. ----------------------- Page 334-----------------------
  15084.  
  15085. Table 13.6 (1) 64-Bit External Device/Big-Endian Access and Data Alignment
  15086.  
  15087. Data Bus
  15088.  
  15089. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  15090.  
  15091. Byte, Adr=8n 1 Data — — — — — — —
  15092. 7–0
  15093.  
  15094. Byte, Adr=8n+1 1 — Data — — — — — —
  15095. 7–0
  15096.  
  15097. Byte, Adr=8n+2 1 — — Data — — — — —
  15098. 7–0
  15099.  
  15100. Byte, Adr=8n+3 1 — — — Data — — — —
  15101. 7–0
  15102.  
  15103. Byte, Adr=8n+4 1 — — — — Data — — —
  15104. 7–0
  15105.  
  15106. Byte, Adr=8n+5 1 — — — — — Data — —
  15107. 7–0
  15108.  
  15109. Byte, Adr=8n+6 1 — — — — — — Data —
  15110. 7–0
  15111.  
  15112. Byte, Adr=8n+7 1 — — — — — — — Data
  15113. 7–0
  15114.  
  15115. Word, Adr=8n 1 Data Data — — — — — —
  15116. 15–8 7–0
  15117.  
  15118. Word, Adr=8n+2 1 — — Data Data — — — —
  15119. 15–8 7–0
  15120.  
  15121. Word, Adr=8n+4 1 — — — — Data Data — —
  15122. 15–8 7–0
  15123.  
  15124. Word, Adr=8n+6 1 — — — — — — Data Data
  15125. 15–8 7–0
  15126.  
  15127. Longword, 1 Data Data Data Data — — — —
  15128. Adr=8n 31–24 23–16 15–8 7–0
  15129.  
  15130. Longword, 1 — — — — Data Data Data Data
  15131. Adr=8n+4 31–24 23–16 15–8 7–0
  15132.  
  15133. Quadword, 1 Data Data Data Data Data Data Data Data
  15134. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  15135.  
  15136. Rev. 2.0, 02/99, page 320 of 830
  15137.  
  15138. ----------------------- Page 335-----------------------
  15139.  
  15140. Table 13.6 (2) 64-Bit External Device/Big-Endian Access and Data Alignment
  15141.  
  15142. Strobe Signals
  15143.  
  15144. :(, :(, :(, :(, :(, :(, :(, :(,
  15145. :( :( :( :( :( :( :( :(
  15146. &$6, &$6, &$6, &$6, &$6, &$6, &$6, &$6,
  15147. &$6 &$6 &$6 &$6 &$6 &$6 &$6 &$6
  15148. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  15149.  
  15150. Byte, Adr=8n 1 Asserted
  15151.  
  15152. Byte, Adr=8n+1 1 Asserted
  15153.  
  15154. Byte, Adr=8n+2 1 Asserted
  15155.  
  15156. Byte, Adr=8n+3 1 Asserted
  15157.  
  15158. Byte, Adr=8n+4 1 Asserted
  15159.  
  15160. Byte, Adr=8n+5 1 Asserted
  15161.  
  15162. Byte, Adr=8n+6 1 Asserted
  15163.  
  15164. Byte, Adr=8n+7 1 Asserted
  15165.  
  15166. Word, Adr=8n 1 Asserted Asserted
  15167.  
  15168. Word, Adr=8n+2 1 Asserted Asserted
  15169.  
  15170. Word, Adr=8n+4 1 Asserted Asserted
  15171.  
  15172. Word, Adr=8n+6 1 Asserted Asserted
  15173.  
  15174. Longword, 1 Asserted Asserted Asserted Asserted
  15175. Adr=8n
  15176.  
  15177. Longword, 1 Asserted Asserted Asserted Asserted
  15178. Adr=8n+4
  15179.  
  15180. Quadword, 1 Asserted Asserted Asserted Asserted Asserted Asserted Asserted Asserted
  15181. Adr=8n
  15182.  
  15183. Rev. 2.0, 02/99, page 321 of 830
  15184.  
  15185. ----------------------- Page 336-----------------------
  15186.  
  15187. Table 13.7 32-Bit External Device/Big-Endian Access and Data Alignment
  15188.  
  15189. Data Bus Strobe Signals
  15190.  
  15191. :(, :(, :(, :(,
  15192. :( :( :( :(
  15193. &$6, &$6, &$6, &$6,
  15194. &$6 &$6 &$6 &$6
  15195. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15196.  
  15197. Byte, Adr=4n 1 Data — — — Asserted
  15198. 7–0
  15199.  
  15200. Byte, Adr=4n+1 1 — Data — — Asserted
  15201. 7–0
  15202.  
  15203. Byte, Adr=4n+2 1 — — Data — Asserted
  15204. 7–0
  15205.  
  15206. Byte, Adr=4n+3 1 — — — Data Asserted
  15207. 7–0
  15208.  
  15209. Word, Adr=4n 1 Data Data — — Asserted Asserted
  15210. 15–8 7–0
  15211.  
  15212. Word, Adr=4n+2 1 — — Data Data Asserted Asserted
  15213. 15–8 7–0
  15214.  
  15215. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15216. Adr=4n 31–24 23–16 15–8 7–0
  15217.  
  15218. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15219. 63–56 55–48 47–40 39–32
  15220.  
  15221. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  15222. 31–24 23–16 15–8 7–0
  15223.  
  15224. Rev. 2.0, 02/99, page 322 of 830
  15225.  
  15226. ----------------------- Page 337-----------------------
  15227.  
  15228. Table 13.8 16-Bit External Device/Big-Endian Access and Data Alignment
  15229.  
  15230. Data Bus Strobe Signals
  15231.  
  15232. :(, :(, :(, :(,
  15233. :( :( :( :(
  15234. &$6, &$6, &$6, &$6,
  15235. &$6 &$6 &$6 &$6
  15236. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15237.  
  15238. Byte, Adr=2n 1 — — Data — Asserted
  15239. 7–0
  15240.  
  15241. Byte, Adr=2n+1 1 — — — Data Asserted
  15242. 7–0
  15243.  
  15244. Word 1 — — Data Data Asserted Asserted
  15245. 15–8 7–0
  15246.  
  15247. Longword 1 — — Data Data Asserted Asserted
  15248. 31–24 23–16
  15249.  
  15250. 2 — — Data Data Asserted Asserted
  15251. 15–8 7–0
  15252.  
  15253. Quadword 1 — — Data Data Asserted Asserted
  15254. 63–56 55–48
  15255.  
  15256. 2 — — Data Data Asserted Asserted
  15257. 47–40 39–32
  15258.  
  15259. 3 — — Data Data Asserted Asserted
  15260. 31–24 23–16
  15261.  
  15262. 4 — — Data Data Asserted Asserted
  15263. 15–8 7–0
  15264.  
  15265. Rev. 2.0, 02/99, page 323 of 830
  15266.  
  15267. ----------------------- Page 338-----------------------
  15268.  
  15269. Table 13.9 8-Bit External Device/Big-Endian Access and Data Alignment
  15270.  
  15271. Data Bus Strobe Signals
  15272.  
  15273. :(, :(, :(, :(,
  15274. :( :( :( :(
  15275. &$6, &$6, &$6, &$6,
  15276. &$6 &$6 &$6 &$6
  15277. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15278.  
  15279. Byte 1 — — — Data Asserted
  15280. 7–0
  15281.  
  15282. Word 1 — — — Data Asserted
  15283. 15–8
  15284.  
  15285. 2 — — — Data Asserted
  15286. 7–0
  15287.  
  15288. Longword 1 — — — Data Asserted
  15289. 31–24
  15290.  
  15291. 2 — — — Data Asserted
  15292. 23–16
  15293.  
  15294. 3 — — — Data Asserted
  15295. 15–8
  15296.  
  15297. 4 — — — Data Asserted
  15298. 7–0
  15299.  
  15300. Quadword 1 — — — Data Asserted
  15301. 63–56
  15302.  
  15303. 2 — — — Data Asserted
  15304. 55–48
  15305.  
  15306. 3 — — — Data Asserted
  15307. 47–40
  15308.  
  15309. 4 — — — Data Asserted
  15310. 39–32
  15311.  
  15312. 5 — — — Data Asserted
  15313. 31–24
  15314.  
  15315. 6 — — — Data Asserted
  15316. 23–16
  15317.  
  15318. 7 — — — Data Asserted
  15319. 15–8
  15320.  
  15321. 8 — — — Data Asserted
  15322. 7–0
  15323.  
  15324. Rev. 2.0, 02/99, page 324 of 830
  15325.  
  15326. ----------------------- Page 339-----------------------
  15327.  
  15328. Table 13.10 (1) 64-Bit External Device/Little-Endian Access and Data Alignment
  15329.  
  15330. Data Bus
  15331.  
  15332. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  15333.  
  15334. Byte, Adr=8n 1 — — — — — — — Data
  15335. 7–0
  15336.  
  15337. Byte, Adr=8n+1 1 — — — — — — Data —
  15338. 7–0
  15339.  
  15340. Byte, Adr=8n+2 1 — — — — — Data — —
  15341. 7–0
  15342.  
  15343. Byte, Adr=8n+3 1 — — — — Data — — —
  15344. 7–0
  15345.  
  15346. Byte, Adr=8n+4 1 — — — Data — — — —
  15347. 7–0
  15348.  
  15349. Byte, Adr=8n+5 1 — — Data — — — — —
  15350. 7–0
  15351.  
  15352. Byte, Adr=8n+6 1 — Data — — — — — —
  15353. 7–0
  15354.  
  15355. Byte, Adr=8n+7 1 Data — — — — — — —
  15356. 7–0
  15357.  
  15358. Word, Adr=8n 1 — — — — — — Data Data
  15359. 15–8 7–0
  15360.  
  15361. Word, Adr=8n+2 1 — — Data Data — —
  15362. 15–8 7–0
  15363.  
  15364. Word, Adr=8n+4 1 — — Data Data — — — —
  15365. 15–8 7–0
  15366.  
  15367. Word, Adr=8n+6 1 Data Data — — — — — —
  15368. 15–8 7–0
  15369.  
  15370. Longword, 1 — — — — Data Data Data Data
  15371. Adr=8n 31–24 23–16 15–8 7–0
  15372.  
  15373. Longword, 1 Data Data Data Data — — — —
  15374. Adr=8n+4 31–24 23–16 15–8 7–0
  15375.  
  15376. Quadword, 1 Data Data Data Data Data Data Data Data
  15377. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  15378.  
  15379. Rev. 2.0, 02/99, page 325 of 830
  15380.  
  15381. ----------------------- Page 340-----------------------
  15382.  
  15383. Table 13.10 (2) 64-Bit External Device/Little-Endian Access and Data Alignment
  15384.  
  15385. Strobe Signals
  15386.  
  15387. :(, :(, :(, :(, :(, :(, :(, :(,
  15388. :( :( :( :( :( :( :( :(
  15389. &$6, &$6, &$6, &$6, &$6, &$6, &$6, &$6,
  15390. &$6 &$6 &$6 &$6 &$6 &$6 &$6 &$6
  15391. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  15392.  
  15393. Byte, Adr=8n 1 Asserted
  15394.  
  15395. Byte, Adr=8n+1 1 Asserted
  15396.  
  15397. Byte, Adr=8n+2 1 Asserted
  15398.  
  15399. Byte, Adr=8n+3 1 Asserted
  15400.  
  15401. Byte, Adr=8n+4 1 Asserted
  15402.  
  15403. Byte, Adr=8n+5 1 Asserted
  15404.  
  15405. Byte, Adr=8n+6 1 Asserted
  15406.  
  15407. Byte, Adr=8n+7 1 Asserted
  15408.  
  15409. Word, Adr=8n 1 Asserted Asserted
  15410.  
  15411. Word, Adr=8n+2 1 Asserted Asserted
  15412.  
  15413. Word, Adr=8n+4 1 Asserted Asserted
  15414.  
  15415. Word, Adr=8n+6 1 Asserted Asserted
  15416.  
  15417. Longword, 1 Asserted Asserted Asserted Asserted
  15418. Adr=8n
  15419.  
  15420. Longword, 1 Asserted Asserted Asserted Asserted
  15421. Adr=8n+4
  15422.  
  15423. Quadword, 1 Asserted Asserted Asserted Asserted Asserted Asserted Asserted Asserted
  15424. Adr=8n
  15425.  
  15426. Rev. 2.0, 02/99, page 326 of 830
  15427.  
  15428. ----------------------- Page 341-----------------------
  15429.  
  15430. Table 13.11 32-Bit External Device/Little-Endian Access and Data Alignment
  15431.  
  15432. Data Bus Strobe Signals
  15433.  
  15434. :(, :(, :(, :(,
  15435. :( :( :( :(
  15436. &$6, &$6, &$6, &$6,
  15437. &$6 &$6 &$6 &$6
  15438. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15439.  
  15440. Byte, Adr=4n 1 — — Data Asserted
  15441. 7–0
  15442.  
  15443. Byte, Adr=4n+1 1 — — Data — Asserted
  15444. 7–0
  15445.  
  15446. Byte, Adr=4n+2 1 — Data — — Asserted
  15447. 7–0
  15448.  
  15449. Byte, Adr=4n+3 1 Data — — — Asserted
  15450. 7–0
  15451.  
  15452. Word, Adr=4n 1 — — Data Data Asserted Asserted
  15453. 15–8 7–0
  15454.  
  15455. Word, Adr=4n+2 1 Data Data — — Asserted Asserted
  15456. 15–8 7–0
  15457.  
  15458. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15459. Adr=4n 31–24 23–16 15–8 7–0
  15460.  
  15461. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15462. 31–24 23–16 15–8 7–0
  15463.  
  15464. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  15465. 63–56 55–48 47–40 39–32
  15466.  
  15467. Rev. 2.0, 02/99, page 327 of 830
  15468.  
  15469. ----------------------- Page 342-----------------------
  15470.  
  15471. Table 13.12 16-Bit External Device/Little-Endian Access and Data Alignment
  15472.  
  15473. Data Bus Strobe Signals
  15474.  
  15475. :(, :(, :(, :(,
  15476. :( :( :( :(
  15477. &$6, &$6, &$6, &$6,
  15478. &$6 &$6 &$6 &$6
  15479. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15480.  
  15481. Byte, Adr=2n 1 — — — Data Asserted
  15482. 7–0
  15483.  
  15484. Byte, Adr=2n+1 1 — — Data — Asserted
  15485. 7–0
  15486.  
  15487. Word 1 — — Data Data Asserted Asserted
  15488. 15–8 7–0
  15489.  
  15490. Longword 1 — — Data Data Asserted Asserted
  15491. 15–8 7–0
  15492.  
  15493. 2 — — Data Data Asserted Asserted
  15494. 31–24 23–16
  15495.  
  15496. Quadword 1 — — Data Data Asserted Asserted
  15497. 15–8 7–0
  15498.  
  15499. 2 — — Data Data Asserted Asserted
  15500. 31–24 23–16
  15501.  
  15502. 3 — — Data Data Asserted Asserted
  15503. 47–40 39–32
  15504.  
  15505. 4 — — Data Data Asserted Asserted
  15506. 63–56 55–48
  15507.  
  15508. Rev. 2.0, 02/99, page 328 of 830
  15509.  
  15510. ----------------------- Page 343-----------------------
  15511.  
  15512. Table 13.13 8-Bit External Device/Little-Endian Access and Data Alignment
  15513.  
  15514. Data Bus Strobe Signals
  15515.  
  15516. :(, :(, :(, :(,
  15517. :( :( :( :(
  15518. &$6, &$6, &$6, &$6,
  15519. &$6 &$6 &$6 &$6
  15520. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15521.  
  15522. Byte 1 — — — Data Asserted
  15523. 7–0
  15524.  
  15525. Word 1 — — — Data Asserted
  15526. 7–0
  15527.  
  15528. 2 — — — Data Asserted
  15529. 15–8
  15530.  
  15531. Longword 1 — — — Data Asserted
  15532. 7–0
  15533.  
  15534. 2 — — — Data Asserted
  15535. 15–8
  15536.  
  15537. 3 — — — Data Asserted
  15538. 23–16
  15539.  
  15540. 4 — — — Data Asserted
  15541. 31–24
  15542.  
  15543. Quadword 1 — — — Data Asserted
  15544. 7–0
  15545.  
  15546. 2 — — — Data Asserted
  15547. 15–8
  15548.  
  15549. 3 — — — Data Asserted
  15550. 23–16
  15551.  
  15552. 4 — — — Data Asserted
  15553. 31–24
  15554.  
  15555. 5 — — — Data Asserted
  15556. 39–32
  15557.  
  15558. 6 — — — Data Asserted
  15559. 47–40
  15560.  
  15561. 7 — — — Data Asserted
  15562. 55–48
  15563.  
  15564. 8 — — — Data Asserted
  15565. 63–56
  15566.  
  15567. Rev. 2.0, 02/99, page 329 of 830
  15568.  
  15569. ----------------------- Page 344-----------------------
  15570.  
  15571. 13.3.2 Areas
  15572.  
  15573. Area 0: For area 0, physical address bits A28 to A26 are 000.
  15574.  
  15575. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function,
  15576. can be connected to this space.
  15577.  
  15578. A bus width of 8, 16, 32, or 64 bits can be selected in a power-on reset by means of external pins
  15579. MD3 and MD4. For details, see Memory Bus Width in section 13.1.5.
  15580.  
  15581. When area 0 space is accessed, the &6 signal is asserted. In addition, the 5' signal, which can
  15582. be used as 2(, and write control signals :( to :(, are asserted.
  15583.  
  15584. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A0W2 to
  15585. A0W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15586. by means of the external wait pin (5'<).
  15587.  
  15588. When the burst function is used, the number of burst cycle transfer states is determined in the
  15589. range 2 to 9 according to the number of waits.
  15590.  
  15591. Area 1: For area 1, physical address bits A28 to A26 are 001.
  15592.  
  15593. Only normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to
  15594. this space.
  15595.  
  15596. A bus width of 8, 16, 32, or 64 bits can be selected with bits A1SZ1 and A1SZ0 in the BCR2
  15597. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  15598. A1SZ1 and A1SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  15599. width of 16, 32, or 64 bits.
  15600.  
  15601. When area 1 space is accessed, the &6 signal is asserted. In addition, the 5' signal, which can
  15602. be used as 2(, and write control signals :( to :(, are asserted.
  15603.  
  15604. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A1W2 to
  15605. A1W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15606. by means of the external wait pin (5'<).
  15607.  
  15608. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15609. 1 and 0–3 cycles, respectively, by means of bit A1S0 and bits A1H1 and A1H0 in the WCR3
  15610. register.
  15611.  
  15612. Rev. 2.0, 02/99, page 330 of 830
  15613.  
  15614. ----------------------- Page 345-----------------------
  15615.  
  15616. Area 2: For area 2, physical address bits A28 to A26 are 010.
  15617.  
  15618. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM,
  15619. can be connected to this space.
  15620.  
  15621. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15622. A2SZ1 and A2SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  15623. should be selected with bits A2SZ1 and A2SZ0 in the BCR2 register. When synchronous DRAM
  15624. is connected, select 32 or 64 bits with the SZ bits in the MCR register. When DRAM is
  15625. connected to area 2, select a bus width of 16 or 32 bits with the SZ bits in MCR. For details, see
  15626. Memory Bus Width in section 13.1.5.
  15627.  
  15628. When area 2 space is accessed, the &6 signal is asserted.
  15629.  
  15630. When normal memory is connected, the 5' signal, which can be used as 2(, and write control
  15631. signals :( to :(, are asserted.
  15632.  
  15633. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A2W2 to
  15634. A2W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15635. by means of the external wait pin (5'<).
  15636.  
  15637. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15638. 1 and 0–3 cycles, respectively, by means of bit A2S0 and bits A2H1 and A2H0 in the WCR3
  15639. register.
  15640.  
  15641. When synchronous DRAM is connected, the 5$6 and &$6 signals, RD/:5 signal, and byte
  15642. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed. 5$6,
  15643. &$6, and data timing control, and address multiplexing control, can be set using the MCR
  15644. register.
  15645.  
  15646. When DRAM is connected, the 5$6 signal, &$6 to &$6 signals, and RD/:5 signal are
  15647. asserted, and address multiplexing is performed. 5$6, &$6, and data timing control, and
  15648. address multiplexing control, can be set using the MCR register.
  15649.  
  15650. Area 3: For area 3, physical address bits A28 to A26 are 011.
  15651.  
  15652. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM,
  15653. can be connected to this space.
  15654.  
  15655. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15656. A3SZ1 and A3SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  15657. should be selected with bits A3SZ1 and A3SZ0 in the BCR2 register. When DRAM is
  15658. connected, 16, 32, or 64 bits can be selected with the SZ bits in the MCR register. When
  15659. synchronous DRAM is connected, select 32 or 64 bits with the SZ bits in MCR. For details, see
  15660. Memory Bus Width in section 13.1.5.
  15661.  
  15662. Rev. 2.0, 02/99, page 331 of 830
  15663.  
  15664. ----------------------- Page 346-----------------------
  15665.  
  15666. When area 3 space is accessed, the &6 signal is asserted.
  15667.  
  15668. When normal memory is connected, the 5' signal, which can be used as 2(, and write control
  15669. signals :( to :(, are asserted.
  15670.  
  15671. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A3W2 to
  15672. A3W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15673. by means of the external wait pin (5'<).
  15674.  
  15675. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15676. 1 and 0–3 cycles, respectively, by means of bit A3S0 and bits A3H1 and A3H0 in the WCR3
  15677. register.
  15678.  
  15679. When synchronous DRAM is connected, the 5$6 and &$6 signals, RD/:5 signal, and byte
  15680. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed. When
  15681. DRAM is connected, the 5$6 signal, &$6 to &$6 signals, and RD/:5 signal are asserted,
  15682. and address multiplexing is performed. 5$6, &$6, and data timing control, and address
  15683. multiplexing control, can be set using the MCR register.
  15684.  
  15685. Area 4: For area 4, physical address bits A28 to A26 are 100.
  15686.  
  15687. Normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to this
  15688. space.
  15689.  
  15690. A bus width of 8, 16, 32, or 64 bits can be selected with bits A4SZ1 and A4SZ0 in the BCR2
  15691. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  15692. A4SZ1 and A4SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  15693. width of 16, 32, or 64 bits. For details, see Memory Bus Width in section 13.1.5.
  15694.  
  15695. When area 4 space is accessed, the &6 signal is asserted, and the 5' signal, which can be used
  15696. as 2(, and write control signals :( to :(, are also asserted.
  15697.  
  15698. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A4W2 to
  15699. A4W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15700. by means of the external wait pin (5'<).
  15701.  
  15702. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15703. 1 and 0–3 cycles, respectively, by means of bit A4S0 and bits A4H1 and A4H0 in the WCR3
  15704. register.
  15705.  
  15706. Rev. 2.0, 02/99, page 332 of 830
  15707.  
  15708. ----------------------- Page 347-----------------------
  15709.  
  15710. Area 5: For area 5, physical address bits A28 to A26 are 101.
  15711.  
  15712. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function,
  15713. and a PCMCIA interface, can be connected to this space.
  15714.  
  15715. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15716. A5SZ1 and A5SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  15717. 32 bits can be selected with bits A5SZ1 and A5SZ0 in BCR2. When MPX is connected, a bus
  15718. width of 32 or 64 bits should be selected with bits A5SZ1 and A5SZ0 in BCR2. When a
  15719. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A5SZ1 and
  15720. A5SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  15721.  
  15722. When area 5 space is accessed with normal memory connected, the &6 signal is asserted. In
  15723. addition, the 5' signal, which can be used as 2(, and write control signals :( to :(, are
  15724. asserted. When a PCMCIA interface is connected, the &($ and &($ signals, the 5' signal,
  15725. which can be used as 2(, and the :(, :(, :(, and :( signals, which can be used as
  15726. :(, ,&,25', ,&,2:5, and 5(*, respectively, are asserted.
  15727.  
  15728. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A5W2 to
  15729. A5W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15730. by means of the external wait pin (5'<).
  15731.  
  15732. When the burst function is used, the number of burst cycle transfer states is determined in the
  15733. range 2 to 9 according to the number of waits.
  15734.  
  15735. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15736. 1 and 0–3 cycles, respectively, by means of bit A5S0 and bits A5H1 and A5H0 in the WCR3
  15737. register.
  15738.  
  15739. When a PCMCIA interface is used, the address/&($/&($ setup and hold times with respect
  15740. to the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A5TED1 and
  15741. A5TED0, and bits A5TEH1 and A5TEH0, in the PCR register. In addition, the number of wait
  15742. cycles can be set in the range 0 to 50 with bits A5PCW1 and A5PCW0. The number of waits set
  15743. in PCR is added to the number of waits set in WCR2.
  15744.  
  15745. Rev. 2.0, 02/99, page 333 of 830
  15746.  
  15747. ----------------------- Page 348-----------------------
  15748.  
  15749. Area 6: For area 6, physical address bits A28 to A26 are 110.
  15750.  
  15751. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function,
  15752. and a PCMCIA interface, can be connected to this space.
  15753.  
  15754. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15755. A6SZ1 and A6SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  15756. 32 bits can be selected with bits A6SZ1 and A6SZ0 in BCR2. When MPX is connected, a bus
  15757. width of 32 or 64 bits should be selected with bits A6SZ1 and A6SZ0 in BCR2. When a
  15758. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A6SZ1 and
  15759. A6SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  15760.  
  15761. When area 6 space is accessed with normal memory connected, the &6 signal is asserted. In
  15762. addition, the 5' signal, which can be used as 2(, and write control signals :( to :(, are
  15763. asserted. When a PCMCIA interface is connected, the &(% and &(% signals, the 5' signal,
  15764. which can be used as 2(, and the :(, :(, :(, and :( signals, which can be used as
  15765. :(, ,&,25', ,&,2:5, and 5(*, respectively, are asserted.
  15766.  
  15767. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A6W2 to
  15768. A6W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15769. by means of the external wait pin (5'<).
  15770.  
  15771. When the burst function is used, the number of burst cycle transfer states is determined in the
  15772. range 2 to 9 according to the number of waits.
  15773.  
  15774. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15775. 1 and 0–3 cycles, respectively, by means of bit A6S0 and bits A6H1 and A6H0 in the WCR3
  15776. register.
  15777.  
  15778. When a PCMCIA interface is used, the address/&(%/&(% setup and hold times with respect
  15779. to the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A6TED1 and
  15780. A6TED0, and bits A6TEH1 and A6TEH0, in the PCR register. In addition, the number of wait
  15781. cycles can be set in the range 0 to 50 with bits A6PCW1 and A6PCW0. The number of waits set
  15782. in PCR is added to the number of waits set in WCR2.
  15783.  
  15784. Rev. 2.0, 02/99, page 334 of 830
  15785.  
  15786. ----------------------- Page 349-----------------------
  15787.  
  15788. 13.3.3 Basic Interface
  15789.  
  15790. Basic Timing: The basic interface of the SH7750 uses strobe signal output in consideration of
  15791. the fact that mainly SRAM will be directly connected. Figure 13.5 shows the basic timing of
  15792. normal space accesses. A no-wait normal access is completed in two cycles. The %6 signal is
  15793. asserted for one cycle to indicate the start of a bus cycle. The &6Q signal is asserted on the T1
  15794. rising edge, and negated on the next T2 clock rising edge. Therefore, there is no negation period
  15795. in case of access at minimum pitch.
  15796.  
  15797. There is no access size specification when reading. The correct access start address is output in
  15798. the least significant bit of the address, but since there is no access size specification, 32 bits are
  15799. always read in the case of a 32-bit device, and 16 bits in the case of a 16-bit device. When
  15800. writing, only the :( signal for the byte to be written is asserted. For details, see section 13.3.1,
  15801. Endian/Access Size and Data Alignment.
  15802.  
  15803. Read/write operations for cache fill or copy-back follow the set bus width and transfer a total of
  15804. 32 bytes consecutively. The first access is performed on the data for which there was an access
  15805. request, and the remaining accesses are performed on the data at the 32-byte boundary. The bus
  15806. is not released during this transfer.
  15807.  
  15808. Rev. 2.0, 02/99, page 335 of 830
  15809.  
  15810. ----------------------- Page 350-----------------------
  15811.  
  15812.  
  15813. T1 T2
  15814.  
  15815. CKIO
  15816.  
  15817. A25–A0
  15818.  
  15819. CSn
  15820.  
  15821. RD/WR
  15822.  
  15823. RD
  15824.  
  15825. D63–D0
  15826. (read)
  15827.  
  15828. WEn
  15829.  
  15830. D63–D0
  15831. (write)
  15832.  
  15833. BS
  15834.  
  15835. RDY
  15836.  
  15837. DACKn
  15838. (SA: IO ← memory)
  15839.  
  15840. DACKn
  15841. (SA: IO → memory)
  15842.  
  15843. DACKn
  15844. (DA)
  15845.  
  15846. SA: Single address DMA
  15847. DA: Dual address DMA
  15848.  
  15849.  
  15850. Figure 13.5 Basic Timing of Basic Interface
  15851.  
  15852. Rev. 2.0, 02/99, page 336 of 830
  15853.  
  15854. ----------------------- Page 351-----------------------
  15855.  
  15856. Figures 13.6, 13.7, 13.8, and 13.9 show examples of connection to 64-, 32-, 16-, and 8-bit data
  15857. width SRAM.
  15858.  
  15859. 128K × 8-bit
  15860. SH7750 SRAM
  15861.  
  15862. A19–A3 A16–A0
  15863. CSn CS
  15864. RD OE
  15865. D63–D56 I/O7–I/O0
  15866. WE7 WE
  15867.  
  15868. A16–A0
  15869. CS
  15870. OE
  15871. D55–D48 I/O7–I/O0
  15872. WE6 WE
  15873.  
  15874. A16–A0
  15875. CS
  15876. OE
  15877. D47–D40 I/O7–I/O0
  15878. WE5 WE
  15879.  
  15880. A16–A0
  15881. CS
  15882. OE
  15883. D39–D32 I/O7–I/O0
  15884. WE4 WE
  15885.  
  15886. A16–A0
  15887. CS
  15888. OE
  15889. D31–D24 I/O7–I/O0
  15890. WE3 WE
  15891.  
  15892. A16–A0
  15893. CS
  15894. OE
  15895. D23–D16 I/O7–I/O0
  15896. WE2 WE
  15897.  
  15898. A16–A0
  15899. CS
  15900. OE
  15901. D15–D8 I/O7–I/O0
  15902. WE1 WE
  15903.  
  15904. A16–A0
  15905. CS
  15906. OE
  15907. D7–D0 I/O7–I/O0
  15908. WE0 WE
  15909.  
  15910. Figure 13.6 Example of 64-Bit Data Width SRAM Connection
  15911.  
  15912. Rev. 2.0, 02/99, page 337 of 830
  15913.  
  15914. ----------------------- Page 352-----------------------
  15915.  
  15916. 128K × 8-bit
  15917. SH7750 SRAM
  15918.  
  15919. A18 A16
  15920.  
  15921. • •
  15922. • •
  15923. • •
  15924. • •
  15925. • •
  15926. • •
  15927. • •
  15928. • •
  15929. A2 A0
  15930. CSn CS
  15931. RD OE
  15932. D31 I/O7
  15933.  
  15934. • • • •
  15935. • • • •
  15936. • • •
  15937. •
  15938. • • • •
  15939.  
  15940. D24 I/O0
  15941. WE3 WE
  15942. D23
  15943.  
  15944.  
  15945. •
  15946. •
  15947. •
  15948. •
  15949. •
  15950. •
  15951. •
  15952. •
  15953. D16 A16
  15954.  
  15955. • •
  15956. WE2 • •
  15957. • •
  15958. D15 • •
  15959. A0
  15960. •
  15961. •
  15962. •
  15963. •
  15964. •
  15965. • • CS
  15966. •
  15967. D8 OE
  15968. WE1 I/O7
  15969.  
  15970. • •
  15971. D7 • •
  15972. • •
  15973.  
  15974. • • • •
  15975. •
  15976. •
  15977. •
  15978. • • I/O0
  15979. •
  15980. D0 WE
  15981. WE0
  15982.  
  15983. A16
  15984.  
  15985. •
  15986. •
  15987. •
  15988. •
  15989. •
  15990. •
  15991. •
  15992. •
  15993. A0
  15994. CS
  15995. OE
  15996. I/O7
  15997. • •
  15998. • •
  15999. • •
  16000.  
  16001. • •
  16002.  
  16003. I/O0
  16004. WE
  16005.  
  16006. A16
  16007.  
  16008. •
  16009. •
  16010. •
  16011. •
  16012. •
  16013. •
  16014. •
  16015. •
  16016. A0
  16017. CS
  16018. OE
  16019. I/O7
  16020.  
  16021. •
  16022. •
  16023. •
  16024. •
  16025. •
  16026. •
  16027. •
  16028. •
  16029. I/O0
  16030. WE
  16031.  
  16032. Figure 13.7 Example of 32-Bit Data Width SRAM Connection
  16033.  
  16034. Rev. 2.0, 02/99, page 338 of 830
  16035.  
  16036. ----------------------- Page 353-----------------------
  16037.  
  16038. 128K × 8-bit
  16039. SH7750 SRAM
  16040.  
  16041. A17 A16
  16042.  
  16043.  
  16044. •
  16045. • • •
  16046. •
  16047. • • •
  16048. •
  16049. • • •
  16050. •
  16051. • • •
  16052.  
  16053. A1 A0
  16054. CSn CS
  16055. RD OE
  16056. D15 I/O7
  16057.  
  16058.  
  16059. •
  16060. • •
  16061. •
  16062. • •
  16063. •
  16064. • •
  16065. •
  16066. • •
  16067.  
  16068. D8 I/O0
  16069. WE1 WE
  16070. D7
  16071.  
  16072. • •
  16073. • •
  16074. • •
  16075. • •
  16076.  
  16077. D0 A16
  16078.  
  16079.  
  16080. •
  16081. •
  16082. •
  16083. WE0 •
  16084. •
  16085. •
  16086. •
  16087. •
  16088.  
  16089. A0
  16090. CS
  16091. OE
  16092. I/O7
  16093.  
  16094.  
  16095. •
  16096. •
  16097. •
  16098. •
  16099. •
  16100. •
  16101. •
  16102. •
  16103.  
  16104. I/O0
  16105. WE
  16106.  
  16107. Figure 13.8 Example of 16-Bit Data Width SRAM Connection
  16108.  
  16109. Rev. 2.0, 02/99, page 339 of 830
  16110.  
  16111. ----------------------- Page 354-----------------------
  16112.  
  16113. 128K × 8-bit
  16114. SH7750 SRAM
  16115.  
  16116. A16 A16
  16117.  
  16118. • • • •
  16119. • • • •
  16120. • • • •
  16121.  
  16122. • • • •
  16123.  
  16124. A0 A0
  16125. CSn CS
  16126. RD OE
  16127. D7 I/O7
  16128.  
  16129. • • • •
  16130. • • • •
  16131. • •
  16132. • •
  16133. • • • •
  16134.  
  16135. D0 I/O0
  16136. WE0 WE
  16137.  
  16138. Figure 13.9 Example of 8-Bit Data Width SRAM Connection
  16139.  
  16140. Wait State Control: Wait state insertion on the basic interface can be controlled by the WCR2
  16141. settings. If the WCR2 wait specification bits corresponding to a particular area are not zero, a
  16142. software wait is inserted in accordance with that specification. For details, see section 13.2.4,
  16143. Wait Control Register 2 (WCR2).
  16144.  
  16145. The specified number of Tw cycles are inserted as wait cycles using the basic interface wait
  16146. timing shown in figure 13.10.
  16147.  
  16148. Rev. 2.0, 02/99, page 340 of 830
  16149.  
  16150. ----------------------- Page 355-----------------------
  16151.  
  16152. T1
  16153. Tw T2
  16154.  
  16155. CKIO
  16156.  
  16157. A25–A0
  16158.  
  16159. CSn
  16160.  
  16161. RD/WR
  16162.  
  16163. RD
  16164.  
  16165. D63–D0
  16166. (read)
  16167.  
  16168. WEn
  16169.  
  16170. D63–D0
  16171. (write)
  16172.  
  16173. BS
  16174.  
  16175. RDY
  16176.  
  16177. DACKn
  16178. (SA: IO ← memory)
  16179.  
  16180. DACKn
  16181. (SA: IO → memory)
  16182.  
  16183. DACKn
  16184. (DA)
  16185.  
  16186. Figure 13.10 Basic Interface Wait Timing (Software Wait Only)
  16187.  
  16188. Rev. 2.0, 02/99, page 341 of 830
  16189.  
  16190. ----------------------- Page 356-----------------------
  16191.  
  16192. When software wait insertion is specified by WCR2, the external wait input 5'< signal is also
  16193. sampled. 5'< signal sampling is shown in figure 13.11. A single-cycle wait is specified as a
  16194. software wait. Sampling is performed at the transition from the Tw state to the T2 state;
  16195. therefore, the 5'< signal has no effect if asserted in the T1 cycle or the first Tw cycle. The
  16196. 5'< signal is sampled on the rising edge of the clock.
  16197.  
  16198.  
  16199. T1 Tw Twe T2
  16200.  
  16201. CKIO
  16202.  
  16203. A25–A0
  16204.  
  16205. CSn
  16206.  
  16207. RD/WR
  16208.  
  16209. RD
  16210. (read)
  16211.  
  16212. D63–D0
  16213. (read)
  16214.  
  16215. WEn
  16216. (write)
  16217.  
  16218. D63–D0
  16219. (write)
  16220.  
  16221. BS
  16222.  
  16223. RDY
  16224.  
  16225. DACKn
  16226. (SA: IO ← memory)
  16227.  
  16228. DACKn
  16229. (SA: IO → memory)
  16230.  
  16231. DACKn
  16232. (DA)
  16233.  
  16234. Figure 13.11 Basic Interface Wait State Timing (Wait State Insertion by 5'< Signal)
  16235. 5'<
  16236.  
  16237. Rev. 2.0, 02/99, page 342 of 830
  16238.  
  16239. ----------------------- Page 357-----------------------
  16240.  
  16241. 13.3.4 DRAM Interface
  16242.  
  16243. Direct Connection of DRAM: When the memory type bits (DRAMTP2–0) in BCR1 are set to
  16244. 100, area 3 becomes DRAM space; when set to 101, area 2 and area 3 become DRAM space.
  16245. The DRAM interface function can then be used to connect DRAM directly to the SH7750.
  16246.  
  16247. 16, 32, or 64 bits can be selected as the interface data width for area 3 when bits DRAMTP2–0
  16248. are set to 100, and 16 or 32 bits can be used for both area 2 and area 3 when bits DRAMTP2–0
  16249. are set to 101.
  16250.  
  16251. 2-CAS 16-bit DRAMs can be connected, since &$6 is used to control byte access.
  16252.  
  16253. Signals used for connection when DRAM is connected to area 3 are 5$6, &$6 to &$6, and
  16254. RD/:5. &$6 to &$6 are not used when the data width is 16 bits. When DRAM is connected
  16255. to areas 2 and 3, the signals for area 2 DRAM connection are 5$6, &$6 to &$6, and
  16256. RD/:5, and those for area 3 DRAM connection are 5$6, &$6 to &$6, and RD/:5.
  16257.  
  16258. In addition to normal read and write access modes, fast page mode is supported for burst access.
  16259. For DRAM connected to areas 2 and 3, EDO mode, which enables the DRAM access time to be
  16260. increased, is supported.
  16261.  
  16262. Rev. 2.0, 02/99, page 343 of 830
  16263.  
  16264. ----------------------- Page 358-----------------------
  16265.  
  16266. 1M × 16-bit
  16267. SH7750 DRAM
  16268.  
  16269. A12–A3 A9–A0
  16270. RAS RAS
  16271. CS3 OE
  16272. RD/WR WE
  16273. D63–D48 I/O15–I/O0
  16274. WE7 UCAS
  16275. WE6 LCAS
  16276.  
  16277. A9–A0
  16278. RAS
  16279. OE
  16280. WE
  16281. D47–D32 I/O15–I/O0
  16282. WE5 UCAS
  16283. WE4 LCAS
  16284.  
  16285. A9–A0
  16286. RAS
  16287. OE
  16288. WE
  16289. D31–D16 I/O15–I/O0
  16290. WE3 UCAS
  16291. WE2 LCAS
  16292.  
  16293. A9–A0
  16294. RAS
  16295. OE
  16296. WE
  16297. D15–D0 I/O15–I/O0
  16298. WE1 UCAS
  16299. WE0 LCAS
  16300.  
  16301. Figure 13.12 Example of DRAM Connection (64-Bit Data Width, Area 3)
  16302.  
  16303. Rev. 2.0, 02/99, page 344 of 830
  16304.  
  16305. ----------------------- Page 359-----------------------
  16306.  
  16307. 256K × 16-bit
  16308. SH7750 DRAM
  16309.  
  16310. A10 A8
  16311.  
  16312.  
  16313. • • • •
  16314. • • • •
  16315. • •
  16316. • •
  16317. • • • •
  16318. A2 A0
  16319.  
  16320.  
  16321. RAS RAS
  16322. CS3 OE
  16323. RD/WR WE
  16324. D31 I/O15
  16325.  
  16326.  
  16327. • •
  16328. • •
  16329. • •
  16330. • •
  16331. • •
  16332. • •
  16333. • •
  16334. • •
  16335. D16 I/O0
  16336. CAS3 UCAS
  16337. CAS2 LCAS
  16338. D15
  16339.  
  16340. • •
  16341. • •
  16342. • •
  16343.  
  16344. • •
  16345. D0
  16346. A8
  16347.  
  16348. CAS1 • •
  16349. • •
  16350. • •
  16351.  
  16352. CAS0 • •
  16353. A0
  16354.  
  16355.  
  16356. RAS
  16357. OE
  16358. WE
  16359. I/O15
  16360.  
  16361. • •
  16362. • •
  16363. • •
  16364. • •
  16365. I/O0
  16366. UCAS
  16367. LCAS
  16368.  
  16369. Figure 13.13 Example of DRAM Connection (32-Bit Data Width, Area 3)
  16370.  
  16371. Rev. 2.0, 02/99, page 345 of 830
  16372.  
  16373. ----------------------- Page 360-----------------------
  16374.  
  16375. 256K × 16-bit
  16376. SH7750 DRAM
  16377.  
  16378. A9 A8
  16379.  
  16380. • • • •
  16381. • • • •
  16382. • • • •
  16383. • • • •
  16384. A1 A0
  16385. CS3
  16386. CS2
  16387. RAS RAS Area 3
  16388.  
  16389. RAS2 OE
  16390. RD/WR WE
  16391. D15 I/O15
  16392.  
  16393. • • • •
  16394. • • • •
  16395. • • • •
  16396. • • • •
  16397. D0 I/O0
  16398. CAS1 UCAS
  16399. CAS0 LCAS
  16400.  
  16401. CAS5
  16402. CAS4
  16403.  
  16404. A8
  16405.  
  16406. • •
  16407. • •
  16408. • •
  16409. • •
  16410. A0
  16411. RAS
  16412. OE
  16413. Area 2
  16414. WE
  16415. I/O15
  16416. • •
  16417. • •
  16418. • •
  16419.  
  16420. • •
  16421. I/O0
  16422. UCAS
  16423. LCAS
  16424.  
  16425. Figure 13.14 Example of DRAM Connection (16-Bit Data Width, Areas 2 and 3)
  16426.  
  16427. Rev. 2.0, 02/99, page 346 of 830
  16428.  
  16429. ----------------------- Page 361-----------------------
  16430.  
  16431. Address Multiplexing: When area 2 or area 3 is designated as DRAM space, address
  16432. multiplexing is always performed in accesses to DRAM. This enables DRAM, which requires
  16433. row and column address multiplexing, to be connected directly to the SH7750 without using an
  16434. external address multiplexer circuit. Any of the five multiplexing methods shown below can be
  16435. selected, by setting bits AMXEXT and AMX2–0 in MCR for area 2 or 3 DRAM. The
  16436. relationship between the AMXEXT and AMX2–0 bits and address multiplexing is shown in
  16437. table 13.14. The address output pins subject to address multiplexing are A17 to A1. The address
  16438. signals output by pins A25 to A18 are undefined.
  16439.  
  16440. Table 13.14 Relationship between AMXEXT and AMX2–0 Bits and Address Multiplexing
  16441.  
  16442. Setting Number External Address Pins
  16443. of Column
  16444. Address
  16445. Bits
  16446.  
  16447. AMXEXT AMX2 AMX1 AMX0 Output Timing A1–A13 A14 A15 A16 A17
  16448.  
  16449. 0 0 0 0 8 bits Column address A1–A13 A14 A15 A16 A17
  16450.  
  16451. Row address A9–A21 A22 A23 A24 A25
  16452.  
  16453. 1 9 bits Column address A1–A13 A14 A15 A16 A17
  16454.  
  16455. Row address A10–A22 A23 A24 A25 A17
  16456.  
  16457. 1 0 10 bits Column address A1–A13 A14 A15 A16 A17
  16458.  
  16459. Row address A11–A23 A24 A25 A16 A17
  16460.  
  16461. 1 11 bits Column address A1–A13 A14 A15 A16 A17
  16462.  
  16463. Row address A12–A24 A25 A15 A16 A17
  16464.  
  16465. 1 0 0 12 bits Column address A1–A13 A14 A15 A16 A17
  16466.  
  16467. Row address A13–A25 A14 A15 A16 A17
  16468.  
  16469. Other settings Reserved — — — — — —
  16470.  
  16471. Rev. 2.0, 02/99, page 347 of 830
  16472.  
  16473. ----------------------- Page 362-----------------------
  16474.  
  16475. Basic Timing: The basic timing for DRAM access is 4 cycles. This basic timing is shown in
  16476. figure 13.15. Tpc is the precharge cycle, Tr the 5$6 assert cycle, Tc1 the &$6 assert cycle, and
  16477. Tc2 the read data latch cycle.
  16478.  
  16479.  
  16480. Tr1 Tr2 Tc1 Tc2 Tpc
  16481.  
  16482. CKIO
  16483.  
  16484. A25–A0 Row Column
  16485.  
  16486. CSn
  16487.  
  16488. RD/WR
  16489.  
  16490. RAS
  16491.  
  16492. CAS
  16493.  
  16494. D63–D0
  16495. (read)
  16496.  
  16497. D63–D0
  16498. (write)
  16499.  
  16500. BS
  16501.  
  16502. DACKn
  16503. (SA: IO ← memory)
  16504.  
  16505. DACKn
  16506. (SA: IO → memory)
  16507.  
  16508. Figure 13.15 Basic DRAM Access Timing
  16509.  
  16510. Rev. 2.0, 02/99, page 348 of 830
  16511.  
  16512. ----------------------- Page 363-----------------------
  16513.  
  16514. Wait State Control: As the clock frequency increases, it becomes impossible to complete all
  16515. states in one cycle as in basic access. Therefore, provision is made for state extension by using
  16516. the setting bits in WCR2 and MCR. The timing with state extension using these settings is
  16517. shown in figure 13.16. Additional Tpc cycles (cycles used to secure the 5$6 precharge time)
  16518. can be inserted by means of the TPC bit in MCR, giving from 1 to 7 cycles. The number of
  16519. cycles from 5$6 assertion to &$6 assertion can be set to between 2 and 5 by inserting Trw
  16520. cycles by means of the RCD bit in MCR. Also, the number of cycles from &$6 assertion to the
  16521. end of the access can be varied between 1 and 16 according to the setting of A2W2 to A2W0 or
  16522. A3W2 to A3W0 in WCR2.
  16523.  
  16524.  
  16525. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  16526.  
  16527. CKIO
  16528.  
  16529. A25–A0 Row Column
  16530.  
  16531. CSn
  16532.  
  16533. RD/WR
  16534.  
  16535. RAS
  16536.  
  16537. CAS
  16538.  
  16539. D63–D0
  16540. (read)
  16541.  
  16542. D63–D0
  16543. (write)
  16544.  
  16545. BS
  16546.  
  16547. DACKn
  16548. (SA: IO ← memory)
  16549.  
  16550. DACKn
  16551. (SA: IO → memory)
  16552.  
  16553. Figure 13.16 DRAM Wait State Timing
  16554.  
  16555. Rev. 2.0, 02/99, page 349 of 830
  16556.  
  16557. ----------------------- Page 364-----------------------
  16558.  
  16559. Burst Access: In addition to the normal DRAM access mode in which a row address is output in
  16560. each data access, a fast page mode is also provided for the case where consecutive accesses are
  16561. made to the same row. This mode allows fast access to data by outputting the row address only
  16562. once, then changing only the column address for each subsequent access. Normal access or burst
  16563. access using fast page mode can be selected by means of the burst enable (BE) bit in MCR. The
  16564. timing for burst access using fast page mode is shown in figure 13.17.
  16565.  
  16566. In burst transfer, 4 (longword access) or 32 (cache fill or cache write-back) bytes of data are
  16567. burst-transferred in the case of a 16-bit bus size. With a 32-bit bus size, 32 bytes of data are
  16568. burst-transferred (cache fill or cache write-back). In a 32-byte burst transfer (cache fill), the first
  16569. access comprises a longword that includes the data requiring access. The remaining accesses are
  16570. performed on 32-byte boundary data that includes the relevant data. In burst transfer (cache
  16571. write-back), wraparound writing is performed for 32-byte boundary data.
  16572.  
  16573. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tpc
  16574.  
  16575. CKIO
  16576.  
  16577. A25–A0 r c1 c2 c3 c4
  16578.  
  16579. CSn
  16580.  
  16581. RD/WR
  16582.  
  16583. RAS
  16584.  
  16585. CAS
  16586.  
  16587. D63–D0
  16588. d1 d2 d3 d4
  16589. (read)
  16590.  
  16591. D63–D0
  16592. d1 d2 d3 d4
  16593. (write)
  16594.  
  16595. BS
  16596.  
  16597. DACKn
  16598. (SA: IO ← memory)
  16599.  
  16600. DACKn
  16601. (SA: IO → memory)
  16602.  
  16603. Figure 13.17 DRAM Burst Access Timing
  16604.  
  16605. Rev. 2.0, 02/99, page 350 of 830
  16606.  
  16607. ----------------------- Page 365-----------------------
  16608.  
  16609. EDO Mode: With DRAM, in addition to the mode in which data is output to the data bus only
  16610. while the &$6 signal is asserted in a data read cycle, an EDO (extended data out) mode is also
  16611. provided in which, once the &$6 signal is asserted while the 5$6 signal is asserted, even if the
  16612. &$6 signal is negated, data is output to the data bus until the &$6 signal is next asserted. In the
  16613. SH7750, the EDO mode bit (EDOMODE) in MCR enables either normal access/burst access
  16614. using fast page mode, or EDO mode normal access/burst access, to be selected for DRAM.
  16615. When EDO mode is set, BE must be set to 1 in MCR. EDO mode normal access is shown in
  16616. figure 13.18, and burst access in figure 13.19.
  16617.  
  16618. CAS Negation Period: The CAS negation period can be set to 1 or 2 by means of the TCAS bit
  16619. in the MCR register.
  16620.  
  16621. Tr1 Tr2 Tc1 Tc2 Tce Tpc
  16622.  
  16623. CKIO
  16624.  
  16625.  
  16626.  
  16627.  
  16628. A25–A0 Row Column
  16629.  
  16630.  
  16631.  
  16632.  
  16633. CSn
  16634.  
  16635.  
  16636.  
  16637. RD/WR
  16638.  
  16639.  
  16640.  
  16641.  
  16642. RAS
  16643.  
  16644.  
  16645.  
  16646.  
  16647. CASn
  16648.  
  16649. D63–D0
  16650.  
  16651. (read)
  16652.  
  16653.  
  16654.  
  16655.  
  16656.  
  16657. BS
  16658.  
  16659.  
  16660.  
  16661. DACKn
  16662. (SA: IO ← memory)
  16663.  
  16664. Figure 13.18 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  16665.  
  16666. Rev. 2.0, 02/99, page 351 of 830
  16667.  
  16668. ----------------------- Page 366-----------------------
  16669.  
  16670. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  16671.  
  16672. CKIO
  16673.  
  16674. A25–A0 r c1 c2 c3 c4
  16675.  
  16676. CSn
  16677.  
  16678. RD/WR
  16679.  
  16680. RAS
  16681.  
  16682. CAS
  16683.  
  16684. D63–D0
  16685. d1 d2 d3 d4
  16686. (read)
  16687.  
  16688. BS
  16689.  
  16690. DACKn
  16691. (SA: IO ← memory)
  16692.  
  16693. Figure 13.19 Burst Access Timing in DRAM EDO Mode
  16694.  
  16695. RAS Down Mode: The SH7750 has an address comparator for detecting row address matches in
  16696. burst mode. By using this address comparator, and also setting RAS down mode specification bit
  16697. RASD to 1, it is possible to select RAS down mode, in which 5$6 remains asserted after the
  16698. end of an access. When RAS down mode is used, if the refresh cycle is longer than the
  16699. maximum DRAM 5$6 assert time, the refresh cycle must be decreased to or below the
  16700. maximum value of t .
  16701. RAS
  16702.  
  16703. RAS down mode can only be used when DRAM is connected in area 3.
  16704.  
  16705. In RAS down mode, in the event of an access to an address with a different row address, an
  16706. access to a different area, a refresh request, or a bus request, 5$6 is negated and the necessary
  16707. operation is performed. When DRAM access is resumed after this, since this is the start of RAS
  16708. down mode, the operation starts with row address output. Timing charts are shown in figures
  16709. 13.20 (1), (2), (3), and (4).
  16710.  
  16711. Rev. 2.0, 02/99, page 352 of 830
  16712.  
  16713. ----------------------- Page 367-----------------------
  16714.  
  16715. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  16716.  
  16717. CKIO
  16718.  
  16719. A25–A0 r c1 c2 c3 c4
  16720.  
  16721. CSn
  16722.  
  16723. RD/WR
  16724.  
  16725. RAS
  16726.  
  16727. CAS
  16728.  
  16729. D63–D0
  16730. d1 d2 d3 d4
  16731. (read)
  16732.  
  16733. D63–D0
  16734. d1 d2 d3 d4
  16735. (write)
  16736.  
  16737. BS
  16738.  
  16739. DACKn
  16740. (SA: IO ← memory)
  16741.  
  16742. DACKn
  16743. (SA: IO → memory)
  16744.  
  16745. Figure 13.20 (1) DRAM Burst Bus Cycle, RAS Down Mode Start
  16746. (Fast Page Mode, RCD = 0, Anw = 0)
  16747.  
  16748. Rev. 2.0, 02/99, page 353 of 830
  16749.  
  16750. ----------------------- Page 368-----------------------
  16751.  
  16752. Tnop Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  16753.  
  16754. CKIO
  16755.  
  16756.  
  16757.  
  16758. A25–A0 c0 c1 c2 c3
  16759.  
  16760.  
  16761.  
  16762.  
  16763. CSn
  16764.  
  16765.  
  16766. RD/WR
  16767.  
  16768.  
  16769. End of RAS down mode
  16770. RAS
  16771.  
  16772.  
  16773.  
  16774. CASn
  16775.  
  16776. D63–D0
  16777.  
  16778. (read) d0 d1 d2 d3
  16779.  
  16780.  
  16781.  
  16782.  
  16783.  
  16784.  
  16785. D63–D0
  16786. d0 d1 d2 d3
  16787. (write)
  16788.  
  16789.  
  16790.  
  16791. BS
  16792.  
  16793.  
  16794. DACKn
  16795. (SA: IO ← memory)
  16796.  
  16797.  
  16798.  
  16799. DACKn
  16800. (SA: IO → memory)
  16801.  
  16802. Figure 13.20 (2) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  16803. (Fast Page Mode, RCD = 0, Anw = 0)
  16804.  
  16805. Rev. 2.0, 02/99, page 354 of 830
  16806.  
  16807. ----------------------- Page 369-----------------------
  16808.  
  16809. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  16810.  
  16811. CKIO
  16812.  
  16813. A25–A0 r c1 c2 c3 c4
  16814.  
  16815. CSn
  16816.  
  16817. RD/WR
  16818.  
  16819. RAS
  16820.  
  16821. CAS
  16822.  
  16823. D63–D0
  16824. d1 d2 d3 d4
  16825. (read)
  16826.  
  16827. BS
  16828.  
  16829. DACKn
  16830. (SA: IO ← memory)
  16831.  
  16832. Figure 13.20 (3) DRAM Burst Bus Cycle, RAS Down Mode Start
  16833. (EDO Mode, RCD = 0, Anw = 0)
  16834.  
  16835. Rev. 2.0, 02/99, page 355 of 830
  16836.  
  16837. ----------------------- Page 370-----------------------
  16838.  
  16839. Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  16840.  
  16841. CKIO
  16842.  
  16843. A25–A0 c1 c2 c3 c4
  16844.  
  16845. CSn
  16846.  
  16847. RD/WR
  16848.  
  16849. End of RAS down mode
  16850.  
  16851. RAS
  16852.  
  16853. CAS
  16854.  
  16855. D63–D0
  16856. d1 d2 d3 d4
  16857. (read)
  16858.  
  16859. BS
  16860.  
  16861. DACKn
  16862. (SA: IO ← memory)
  16863.  
  16864. Figure 13.20 (4) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  16865. (EDO Mode, RCD = 0, Anw = 0)
  16866.  
  16867. Refresh Timing: The bus state controller includes a function for controlling DRAM refreshing.
  16868. Distributed refreshing using a CAS-before-RAS cycle can be performed for DRAM by clearing
  16869. the RMODE bit to 0 and setting the RFSH bit to 1 in MCR. Self-refresh mode is also supported.
  16870.  
  16871. When CAS-before-RAS refresh cycles are executed, refreshing is performed at intervals
  16872. determined by the input clock selected by bits CKS2–CKS0 in RTCSR, and the value set in
  16873. RTCOR. The value of bits CKS2–CKS0 in RTCOR should be set so as to satisfy the
  16874. specification for the DRAM refresh interval. First make the settings for RTCOR, RTCNT, and
  16875. the RMODE and RFSH bits in MCR, then make the CKS2–CKS0 setting. When the clock is
  16876. selected by CKS2–CKS0, RTCNT starts counting up from the value at that time. The RTCNT
  16877. value is constantly compared with the RTCOR value, and if the two values are the same, a
  16878. refresh request is generated and the %$&. pin goes high. If the SH7750’s external bus can be
  16879. used, CAS-before-RAS refreshing is performed. At the same time, RTCNT is cleared to zero and
  16880. the count-up is restarted. Figure 13.21 shows the operation of CAS-before-RAS refreshing.
  16881.  
  16882. Rev. 2.0, 02/99, page 356 of 830
  16883.  
  16884. ----------------------- Page 371-----------------------
  16885.  
  16886. RTCOR value RTCNT cleared to 0 when
  16887. RTCNT = RTCOR
  16888. RTCNT
  16889.  
  16890. H'00000000 Time
  16891.  
  16892. RTCSR.CKS2–0 = 000 ≠ 000
  16893.  
  16894. Refresh
  16895. request
  16896.  
  16897. Refresh request cleared
  16898.  
  16899. by start of refresh cycle
  16900. External bus
  16901.  
  16902. CAS-before-RAS refresh cycle
  16903.  
  16904. Figure 13.21 CAS-Before-RAS Refresh Operation
  16905.  
  16906. Figure 13.22 shows the timing of the CAS-before-RAS refresh cycle.
  16907.  
  16908. The number of RAS assert cycles in the refresh cycle is specified by bits TRAS2–TRAS0 in
  16909. MCR. The specification of the RAS precharge time in the refresh cycle is determined by the
  16910. setting of bits TRC2–TRC0 in MCR.
  16911.  
  16912. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  16913.  
  16914. CKIO
  16915.  
  16916. A25–A0
  16917.  
  16918. CSn
  16919.  
  16920. RD/WR
  16921.  
  16922. RAS
  16923.  
  16924. CAS
  16925.  
  16926. D63–D0
  16927.  
  16928. BS
  16929.  
  16930. Figure 13.22 DRAM CAS-Before-RAS Refresh Cycle Timing (TRAS = 0, TRC = 1)
  16931.  
  16932. Rev. 2.0, 02/99, page 357 of 830
  16933.  
  16934. ----------------------- Page 372-----------------------
  16935.  
  16936. The self-refreshing supported by the SH7750 is shown in figure 13.23.
  16937.  
  16938. After the self-refresh is cleared, the refresh controller immediately generates a refresh request.
  16939. The RAS precharge time immediately after the end of the self-refreshing can be set by bits
  16940. TRC2–TRC0 in MCR.
  16941.  
  16942. DRAMs include low-power products (L versions) with a long refresh cycle time (for example,
  16943. the HM51W4160AL L version has a refresh cycle of 1024 cycles/128 ms compared with 1024
  16944. cycles/16 ms for the normal version). With these DRAMs, however, the same refresh cycle as
  16945. for the normal version is requested only in the case of refreshing immediately following self-
  16946. refreshing. To ensure efficient DRAM refreshing, therefore, processing is needed to generate an
  16947. overflow interrupt and restore the refresh cycle to the proper value, after the necessary CAS-
  16948. before-RAS refreshing has been performed following self-refreshing of an L-version DRAM,
  16949. using the OVF, OVIE, and LMTS bits in RTCSR and the refresh controller’s refresh count
  16950. register (RFCR). The necessary procedure is as follows.
  16951.  
  16952. 1. Normally, set the refresh counter count cycle to the optimum value for the L version (e.g.
  16953. 1024 cycles/128 ms).
  16954. 2. When a transition is made to self-refreshing:
  16955. a. Provide an interrupt handler to restore the refresh counter count value to the optimum
  16956. value for the L version (e.g. 1024 cycles/128 ms) when a refresh counter overflow
  16957. interrupt is generated.
  16958. b. Re-set the refresh counter count cycle to the requested short cycle (e.g. 1024 cycles/16
  16959. ms), set refresh controller overflow interruption, and clear the refresh controller’s refresh
  16960. count register (RFCR) to 0.
  16961. c. Set self-refresh mode.
  16962.  
  16963. By using this procedure, the refreshing immediately following a self-refresh will be performed in
  16964. a short cycle, and when adequate refreshing ends, an interrupt is generated and the setting can be
  16965. restored to the original refresh cycle.
  16966.  
  16967. CAS-before-RAS refreshing is performed in normal operation, in sleep mode, and in the case of
  16968. a manual reset.
  16969.  
  16970. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the
  16971. case of a manual reset.
  16972.  
  16973. When the bus has been released in response to a bus arbitration request, or when a transition is
  16974. made to standby mode, signals generally become high-impedance, but whether the 5$6 and
  16975. &$6 signals become high-impedance or continue to be output can be controlled by the HIZCNT
  16976. bit in BCR1. This enables the DRAM to be kept in the self-refreshing state.
  16977.  
  16978. As the DRAM &$6 signal is multiplexed with :(Q for normal memory (SRAM, etc.), access to
  16979. memory that uses the :(Q signals must be disabled during self-refreshing.
  16980.  
  16981. Rev. 2.0, 02/99, page 358 of 830
  16982.  
  16983. ----------------------- Page 373-----------------------
  16984.  
  16985. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  16986.  
  16987. CKIO
  16988.  
  16989. A25–A0
  16990.  
  16991. CSn
  16992.  
  16993. RD/WR
  16994.  
  16995. RAS
  16996.  
  16997. CAS
  16998.  
  16999. D63–D0
  17000.  
  17001. BS
  17002.  
  17003. Figure 13.23 DRAM Self-Refresh Cycle Timing
  17004.  
  17005. Power-On Sequence: Regarding use of DRAM after powering on, it is requested that a wait
  17006. time (at least 100 µs or 200 µs) during which no access can be performed be provided, followed
  17007. by at least the prescribed number (usually 8) of dummy CAS-before-RAS refresh cycles. As the
  17008. bus state controller does not perform any special operations for a power-on reset, the necessary
  17009. power-on sequence must be carried out by the initialization program executed after a power-on
  17010. reset.
  17011.  
  17012. Rev. 2.0, 02/99, page 359 of 830
  17013.  
  17014. ----------------------- Page 374-----------------------
  17015.  
  17016. 13.3.5 Synchronous DRAM Interface
  17017.  
  17018. Direct Connection of Synchronous DRAM: Since synchronous DRAM can be selected by the
  17019. &6 signal, it can be connected to physical space areas 2 and 3 using 5$6 and other control
  17020. signals in common. If the memory type bits (DRAMTP2–0) in BCR1 are set to 010, area 2 is
  17021. normal memory space and area 3 is synchronous DRAM space; if set to 011, areas 2 and 3 are
  17022. both synchronous DRAM space.
  17023.  
  17024. With the SH7750, burst read/burst write mode is supported as the synchronous DRAM operating
  17025. mode. The data bus width is 32 or 64 bits, and the SZ size bits in MCR must be set to 00 or 11.
  17026. The burst enable bit (BE) in MCR is ignored, a 32-byte burst transfer is performed in a cache
  17027. fill/copy-back cycle, and in a write-through area write or a non-cacheable area read/write, 32-
  17028. byte data is read even in a single read in order to access synchronous DRAM with a burst
  17029. read/write access. 32-byte data transfer is also performed in a single write, but DQMn is not
  17030. asserted when unnecessary data is transferred.
  17031.  
  17032. The control signals for direct connection of synchronous DRAM are 5$6, &$6, RD/:5, &6
  17033. or &6, DQM0 to DQM7, and CKE. All the signals other than &6 and &6 are common to all
  17034. areas, and signals other than CKE are valid and latched only when &6 or &6 is asserted.
  17035. Synchronous DRAM can therefore be connected in parallel to a number of areas. CKE is
  17036. negated (driven low) when the frequency is changed, when the clock is unstable after the clock
  17037. supply is stopped and restarted, or when self-refreshing is performed, and is always asserted
  17038. (high) at other times.
  17039.  
  17040. Commands for synchronous DRAM are specified by 5$6, &$6, RD/:5, and specific address
  17041. signals. The commands are NOP, auto-refresh (REF), self-refresh (SELF), precharge all banks
  17042. (PALL), precharge specified bank (PRE), row address strobe bank active (ACTV), read
  17043. (READ), read with precharge (READA), write (WRIT), write with precharge (WRITA), and
  17044. mode register setting (MRS).
  17045.  
  17046. Byte specification is performed by DQM0 to DQM7. A read/write is performed for the byte for
  17047. which the corresponding DQM signal is low. When the bus width is 64 bits, in big-endian mode
  17048. DQM7 specifies an access to address 8n, and DQM0 specifies an access to address 8n + 7. In
  17049. little-endian mode, DQM7 specifies an access to address 8n + 7, and DQM0 specifies an access
  17050. to address 8n.
  17051.  
  17052. Figures 13.24 and 13.25 show examples of the connection of 16M × 16-bit synchronous
  17053. DRAMs.
  17054.  
  17055. Rev. 2.0, 02/99, page 360 of 830
  17056.  
  17057. ----------------------- Page 375-----------------------
  17058.  
  17059. 512K × 16-bit × 2-bank
  17060. SH7750 synchronous DRAM
  17061.  
  17062. A12–A3 A9–A0
  17063. CKIO CLK
  17064. CKE CKE
  17065. CS3 CS
  17066. RAS RAS
  17067. RD CAS
  17068. RD/WR WE
  17069. D63–D48 I/O15–I/O0
  17070. DQM7 DQMU
  17071. DQM6 DQML
  17072.  
  17073. A9–A0
  17074. CLK
  17075. CKE
  17076. CS
  17077. RAS
  17078. CAS
  17079. WE
  17080. D47–D32 I/O15–I/O0
  17081. DQM5 DQMU
  17082. DQM4 DQML
  17083.  
  17084. A9–A0
  17085. CLK
  17086. CKE
  17087. CS
  17088. RAS
  17089. CAS
  17090. WE
  17091. D31–D16 I/O15–I/O0
  17092. DQM3 DQMU
  17093. DQM2 DQML
  17094.  
  17095. A9–A0
  17096. CLK
  17097. CKE
  17098. CS
  17099. RAS
  17100. CAS
  17101. WE
  17102. D15–D0 I/O15–I/O0
  17103. DQM1 DQMU
  17104. DQM0 DQML
  17105.  
  17106. Figure 13.24 Example of 64-Bit Data Width Synchronous DRAM Connection (Area 3)
  17107.  
  17108. Rev. 2.0, 02/99, page 361 of 830
  17109.  
  17110. ----------------------- Page 376-----------------------
  17111.  
  17112. 512K × 16-bit × 2-bank
  17113. SH7750 synchronous DRAM
  17114.  
  17115. A11–A2 A9–A0
  17116. CKIO CLK
  17117. CKE CKE
  17118. CS3 CS
  17119. RAS RAS
  17120. RD CAS
  17121. RD/WR WE
  17122. D31–D16 I/O15–I/O0
  17123. DQM3 DQMU
  17124. DQM2 DQML
  17125.  
  17126. A9–A0
  17127. CLK
  17128. CKE
  17129. CS
  17130. RAS
  17131. CAS
  17132. WE
  17133. D15–D0 I/O15–I/O0
  17134. DQM1 DQMU
  17135. DQM0 DQML
  17136.  
  17137. Figure 13.25 Example of 32-Bit Data Width Synchronous DRAM Connection (Area 3)
  17138.  
  17139. Address Multiplexing: Synchronous DRAM can be connected without external multiplexing
  17140. circuitry in accordance with the address multiplex specification bits AMXEXT and AMX2–
  17141. AMX0 in MCR. Table 13.15 shows the relationship between the address multiplex specification
  17142. bits and the bits output at the address pins. See Appendix F, Synchronous DRAM Address
  17143. Multiplexing Tables.
  17144.  
  17145. The address signals output at A25–A18, A1, and A0 are undefined.
  17146.  
  17147. When A0, the LSB of the synchronous DRAM address, is connected to the SH7750, with a 32-
  17148. bit bus width it makes a longword address specification. Connection should therefore be made in
  17149. this order: connect pin A0 of the synchronous DRAM to pin A2 of the SH7750, then connect pin
  17150. A1 to pin A3.
  17151.  
  17152. With a 64-bit bus width, the LSB makes a quadword address specification. Connection should
  17153. therefore be made in this order: connect pin A0 of the synchronous DRAM to pin A3 of the
  17154. SH7750, then connect pin A1 to pin A4.
  17155.  
  17156. Rev. 2.0, 02/99, page 362 of 830
  17157.  
  17158. ----------------------- Page 377-----------------------
  17159.  
  17160. Table 13.15 Example of Correspondence between SH7750 and Synchronous DRAM
  17161. Address Pins (64-Bit Bus Width, AMX2–AMX0 = 011, AMXEXT = 0)
  17162.  
  17163. SH7750 Address Pin Synchronous DRAM Address Pin
  17164.  
  17165. RAS Cycle CAS Cycle Function
  17166.  
  17167. A14 A22 A22 A11 BANK select bank address
  17168.  
  17169. A13 A21 H/L A10 Address precharge setting
  17170.  
  17171. A12 A20 0 A9
  17172.  
  17173. A11 A19 0 A8
  17174.  
  17175. A10 A18 A10 A7
  17176.  
  17177. A9 A17 A9 A6
  17178.  
  17179. A8 A16 A8 A5
  17180.  
  17181. A7 A15 A7 A4
  17182.  
  17183. A6 A14 A6 A3
  17184.  
  17185. A5 A13 A5 A2
  17186.  
  17187. A4 A12 A4 A1
  17188.  
  17189. A3 A11 A3 A0
  17190.  
  17191. A2 — A2 Not used
  17192.  
  17193. A1 — A1 Not used
  17194.  
  17195. A0 — A0 Not used
  17196.  
  17197. Burst Read: The timing chart for a burst read is shown in figure 13.26. In the following
  17198. example it is assumed that four 512K x 16-bit x 2-bank synchronous DRAMs are connected, and
  17199. a 64-bit data width is used. The burst length is 4. Following the Tr cycle in which ACTV
  17200. command output is performed, a READA command is issued in the Tc1 cycle, and the read data
  17201. is accepted on the rising edge of the external command clock (CKIO) from cycle Td1 to cycle
  17202. Td4. The Tpc cycle is used to wait for completion of auto-precharge based on the READA
  17203. command inside the synchronous DRAM; no new access command can be issued to the same
  17204. bank during this cycle. In the SH7750, the number of Tpc cycles is determined by the
  17205. specification of bits TPC2–TPC0 in MCR, and commands are not issued for the same
  17206. synchronous DRAM during this interval.
  17207.  
  17208. The example in figure 13.26 shows the basic cycle. To connect slower synchronous DRAM, the
  17209. cycle can be extended by setting WCR2 and MCR bits. The number of cycles from the ACTV
  17210. command output cycle, Tr, to the READA command output cycle, Tc1, can be specified by bits
  17211. RCD1 and RCD0 in MCR, with a value of 0 to 3 specifying 2 to 4 cycles, respectively. In the
  17212. case of 2 or more cycles, a Trw cycle, in which an NOP command is issued for the synchronous
  17213. DRAM, is inserted between the Tr cycle and the Tc cycle. The number of cycles from READA
  17214. command output cycle Tc1 to the first read data latch cycle, Td1, can be specified as 1 to 5
  17215. cycles independently for areas 2 and 3 by means of bits A2W2–A2W0 and A3W2–A3W0 in
  17216. Rev. 2.0, 02/99, page 363 of 830
  17217.  
  17218. ----------------------- Page 378-----------------------
  17219.  
  17220. WCR2. This number of cycles corresponds to the number of synchronous DRAM CAS latency
  17221. cycles.
  17222.  
  17223. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17224.  
  17225. CKIO
  17226.  
  17227.  
  17228.  
  17229. Bank Row
  17230.  
  17231. t
  17232.  
  17233. Precharge-sel Row H/L
  17234.  
  17235. t
  17236.  
  17237. Address Row c0
  17238.  
  17239.  
  17240.  
  17241.  
  17242. CSn
  17243.  
  17244.  
  17245.  
  17246. RD/WR
  17247.  
  17248.  
  17249.  
  17250. RAS
  17251.  
  17252.  
  17253.  
  17254. CASS
  17255.  
  17256.  
  17257.  
  17258. DQMn
  17259.  
  17260. D63–D0
  17261. (read) d0 d1 d2 d3
  17262.  
  17263.  
  17264.  
  17265.  
  17266.  
  17267. BS
  17268.  
  17269. CKE
  17270.  
  17271.  
  17272.  
  17273. DACKn
  17274. (SA: IO ← memory)
  17275.  
  17276. Figure 13.26 Basic Timing for Synchronous DRAM Burst Read
  17277.  
  17278. In a synchronous DRAM cycle, the %6 signal is asserted for one cycle at the start of the bus
  17279. cycle. The order of access is as follows: in a fill operation in the event of a cache miss, 64-bit
  17280. boundary data including the missed data is read first, then 32-byte boundary data including the
  17281. missed data is read in wraparound mode.
  17282.  
  17283. Rev. 2.0, 02/99, page 364 of 830
  17284.  
  17285. ----------------------- Page 379-----------------------
  17286.  
  17287. Single Read: With the SH7750, as synchronous DRAM is set to burst read/burst write mode,
  17288. read data output continues after the required data has been read. To prevent data collisions, after
  17289. the required data is read in Td1, empty read cycles Td2 to Td4 are performed, and the SH7750
  17290. waits for the end of the synchronous DRAM operation. The %6 signal is asserted only in Td1.
  17291.  
  17292. When the data width is 64 bits, there are 4 burst transfers in a read. In cache-through and other
  17293. DMA read cycles, of cycles Td1 to Td4, %6 is asserted and data latched only in the Td1 cycle.
  17294.  
  17295. Since such empty cycles increase the memory access time, and tend to reduce program
  17296. execution speed and DMA transfer speed, it is important both to avoid unnecessary cache-
  17297. through area accesses, and to use a data structure that will allow data to be placed at a 32-byte
  17298. boundary, and to be transferred in 32-byte units, when carrying out DMA transfer with
  17299. synchronous DRAM specified as the source.
  17300.  
  17301. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  17302.  
  17303. CKIO
  17304.  
  17305. Bank Row
  17306.  
  17307. Precharge-sel Row H/L
  17308.  
  17309. Address Row c1
  17310.  
  17311. CSn
  17312.  
  17313. RD/WR
  17314.  
  17315. RAS
  17316.  
  17317. CASS
  17318.  
  17319. DQMn
  17320.  
  17321. D63–D0
  17322. c1
  17323. (read)
  17324.  
  17325. BS
  17326.  
  17327. CKE
  17328.  
  17329. DACKn
  17330. (SA: IO ← memory)
  17331.  
  17332. Figure 13.27 Basic Timing for Synchronous DRAM Single Read
  17333.  
  17334. Rev. 2.0, 02/99, page 365 of 830
  17335.  
  17336. ----------------------- Page 380-----------------------
  17337.  
  17338. Burst Write: The timing chart for a burst write is shown in figure 13.28. In the SH7750, a burst
  17339. write occurs only in the event of cache copy-back or a 32-byte transfer by the DMAC. In a burst
  17340. write operation, following the Tr cycle in which ACTV command output is performed, a
  17341. WRITA command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle,
  17342. the write data is output at the same time as the write command. In the case of the write with
  17343. auto-precharge command, precharging of the relevant bank is performed in the synchronous
  17344. DRAM after completion of the write command, and therefore no command can be issued for the
  17345. same bank until precharging is completed. Consequently, in addition to the precharge wait cycle,
  17346. Tpc, used in a read access, cycle Trwl is also added as a wait interval until precharging is started
  17347. following the write command. Issuance of a new command for the same bank is postponed
  17348. during this interval. The number of Trwl cycles can be specified by bits TRWL2–TRWL0 in
  17349. MCR. 32-byte boundary data is written in wraparound mode.
  17350.  
  17351. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  17352.  
  17353. CKIO
  17354.  
  17355. Bank Row
  17356.  
  17357. Precharge-sel Row H/L
  17358.  
  17359. Address Row c1
  17360.  
  17361. CSn
  17362.  
  17363. RD/WR
  17364.  
  17365. RAS
  17366.  
  17367. CASS
  17368.  
  17369. DQMn
  17370.  
  17371. D63–D0
  17372. c1 c2 c3 c4
  17373. (read)
  17374.  
  17375. CKE
  17376.  
  17377. DACKn
  17378. (SA: IO → memory)
  17379.  
  17380. Figure 13.28 Basic Timing for Synchronous DRAM Burst Write
  17381.  
  17382. Rev. 2.0, 02/99, page 366 of 830
  17383.  
  17384. ----------------------- Page 381-----------------------
  17385.  
  17386. Single Write: The basic timing chart for write access is shown in figure 13.29. In a single write
  17387. operation, following the Tr cycle in which ACTV command output is performed, a WRITA
  17388. command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle, the write
  17389. data is output at the same time as the write command. In the case of a write with auto-precharge,
  17390. precharging of the relevant bank is performed in the synchronous DRAM after completion of the
  17391. write command, and therefore no command can be issued for the same bank until precharging is
  17392. completed. Consequently, in addition to the precharge wait cycle, Tpc, used in a read access,
  17393. cycle Trwl is also added as a wait interval until precharging is started following the write
  17394. command. Issuance of a new command for the same bank is postponed during this interval. The
  17395. number of Trwl cycles can be specified by bits TRWL2–TRWL0 in MCR.
  17396.  
  17397. As the SH7750 supports burst read/burst write operations for synchronous DRAM, a single write
  17398. requires the same number of cycles as a burst write.
  17399.  
  17400. Rev. 2.0, 02/99, page 367 of 830
  17401.  
  17402. ----------------------- Page 382-----------------------
  17403.  
  17404. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  17405.  
  17406. CKIO
  17407.  
  17408. Bank Row
  17409.  
  17410. Precharge-sel Row H/L
  17411.  
  17412. Address Row c1
  17413.  
  17414. CSn
  17415.  
  17416. RD/WR
  17417.  
  17418. RAS
  17419.  
  17420. CASS
  17421.  
  17422. DQMn
  17423.  
  17424. D63–D0
  17425. c1
  17426. (read)
  17427.  
  17428. BS
  17429.  
  17430. CKE
  17431.  
  17432. DACKn
  17433. (SA: IO → memory)
  17434.  
  17435. Figure 13.29 Basic Timing for Synchronous DRAM Single Write
  17436.  
  17437. Rev. 2.0, 02/99, page 368 of 830
  17438.  
  17439. ----------------------- Page 383-----------------------
  17440.  
  17441. RAS Down Mode: The synchronous DRAM bank function is used to support high-speed
  17442. accesses to the same row address. When the RASD bit in MCR is 1, read/write command
  17443. accesses are performed using commands without auto-precharge (READ, WRIT). In this case,
  17444. precharging is not performed when the access ends. When accessing the same row address in the
  17445. same bank, it is possible to issue the READ or WRIT command immediately, without issuing an
  17446. ACTV command, in the same way as in the DRAM RAS down state. As synchronous DRAM is
  17447. internally divided into two or four banks, it is possible to activate one row address in each bank.
  17448. If the next access is to a different row address, a PRE command is first issued to precharge the
  17449. relevant bank, then when precharging is completed, the access is performed by issuing an ACTV
  17450. command followed by a READ or WRIT command. If this is followed by an access to a
  17451. different row address, the access time will be longer because of the precharging performed after
  17452. the access request is issued.
  17453.  
  17454. In a write, when auto-precharge is performed, a command cannot be issued for a period of Trwl
  17455. + Tpc cycles after issuance of the WRIT command. When RAS down mode is used, READ or
  17456. WRIT commands can be issued successively if the row address is the same. The number of
  17457. cycles can thus be reduced by Trwl + Tpc cycles for each write. The number of cycles between
  17458. issuance of the precharge command and the row address strobe command is determined by bits
  17459. TPC2–TPC0 in MCR.
  17460.  
  17461. There is a limit on tRAS , the time for placing each bank in the active state. If there is no guarantee
  17462. that there will not be a cache hit and another row address will be accessed within the period in
  17463. which this value is maintained by program execution, it is necessary to set auto-refresh and set
  17464. the refresh cycle to no more than the maximum value of tRAS . In this way, it is possible to observe
  17465. the restrictions on the maximum active state time for each bank. If auto-refresh is not used,
  17466. measures must be taken in the program to ensure that the banks do not remain active for longer
  17467. than the prescribed time.
  17468.  
  17469. A burst read cycle without auto-precharge is shown in figure 13.30, a burst read cycle for the
  17470. same row address in figure 13.31, and a burst read cycle for different row addresses in figure
  17471. 13.32. Similarly, a burst write cycle without auto-precharge is shown in figure 13.33, a burst
  17472. write cycle for the same row address in figure 13.34, and a burst write cycle for different row
  17473. addresses in figure 13.35.
  17474.  
  17475. When synchronous DRAM is read, there is a 2-cycle latency for the DMQn signal that performs
  17476. the byte specification. As a result, when the READ command is issued in figure 13.30, if the Tc
  17477. cycle is executed immediately, the DMQn signal specification for Td1 cycle data output cannot
  17478. be carried out. Therefore, the CAS latency should not be set to 1.
  17479.  
  17480. When RAS down mode is set, if only accesses to the respective banks in area 3 are considered,
  17481. as long as accesses to the same row address continue, the operation starts with the cycle in figure
  17482. 13.30 or 13.33, followed by repetition of the cycle in figure 13.31 or 13.34. An access to a
  17483. different area during this time has no effect. If there is an access to a different row address in the
  17484. bank active state, after this is detected the bus cycle in figure 13.32 or 13.35 is executed instead
  17485.  
  17486. Rev. 2.0, 02/99, page 369 of 830
  17487.  
  17488. ----------------------- Page 384-----------------------
  17489.  
  17490. of that in figure 13.31 or 13.34. In RAS down mode, too, both banks become inactive after a
  17491. refresh cycle or after the bus is released as the result of bus arbitration.
  17492.  
  17493. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17494.  
  17495. CKIO
  17496.  
  17497. Bank Row
  17498.  
  17499. Precharge-sel Row H/L
  17500.  
  17501. Address Row c1
  17502.  
  17503. CSn
  17504.  
  17505. RD/WR
  17506.  
  17507. RAS
  17508.  
  17509. CASS
  17510.  
  17511. DQMn
  17512.  
  17513. D63–D0
  17514. c1 c2 c3 c4
  17515. (read)
  17516.  
  17517. BS
  17518.  
  17519. CKE
  17520.  
  17521. DACKn
  17522. (SA: IO ← memory)
  17523.  
  17524. Figure 13.30 Burst Read Timing
  17525.  
  17526. Rev. 2.0, 02/99, page 370 of 830
  17527.  
  17528. ----------------------- Page 385-----------------------
  17529.  
  17530. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17531.  
  17532. CKIO
  17533.  
  17534. Bank
  17535.  
  17536. Precharge-sel H/L
  17537.  
  17538. Address c1
  17539.  
  17540. CSn
  17541.  
  17542. RD/WR
  17543.  
  17544. RAS
  17545.  
  17546. CASS
  17547.  
  17548. DQMn
  17549.  
  17550. D63–D0
  17551. (read) c1 c2 c3 c4
  17552.  
  17553. BS
  17554.  
  17555. CKE
  17556.  
  17557. DACKn
  17558. (SA: IO ← memory)
  17559.  
  17560. Figure 13.31 Burst Read Timing (RAS Down, Same Row Address)
  17561.  
  17562. Rev. 2.0, 02/99, page 371 of 830
  17563.  
  17564. ----------------------- Page 386-----------------------
  17565.  
  17566. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17567.  
  17568. CKIO
  17569.  
  17570. Bank Row
  17571.  
  17572. Precharge-sel Row H/L
  17573.  
  17574. Address Row c1
  17575.  
  17576. CSn
  17577.  
  17578. RD/WR
  17579.  
  17580. RAS
  17581.  
  17582. CASS
  17583.  
  17584. DQMn
  17585.  
  17586. D63–D0
  17587. (read) c1 c2 c3 c4
  17588.  
  17589. BS
  17590.  
  17591. CKE
  17592.  
  17593. DACKn
  17594. (SA: IO ← memory)
  17595.  
  17596. Figure 13.32 Burst Read Timing (RAS Down, Different Row Addresses)
  17597.  
  17598. Rev. 2.0, 02/99, page 372 of 830
  17599.  
  17600. ----------------------- Page 387-----------------------
  17601.  
  17602. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  17603.  
  17604. CKIO
  17605.  
  17606. Bank Row
  17607.  
  17608. Precharge-sel Row H/L
  17609.  
  17610. Address Row c1
  17611.  
  17612. CSn
  17613.  
  17614. RD/WR
  17615.  
  17616. RAS
  17617.  
  17618. CASS
  17619.  
  17620. DQMn
  17621.  
  17622.  
  17623.  
  17624. D63–D0
  17625. c1 c2 c3 c4
  17626. (read)
  17627.  
  17628. BS
  17629.  
  17630. CKE
  17631.  
  17632. DACKn
  17633. (SA: IO → memory)
  17634.  
  17635. Figure 13.33 Burst Write Timing
  17636.  
  17637. Rev. 2.0, 02/99, page 373 of 830
  17638.  
  17639. ----------------------- Page 388-----------------------
  17640.  
  17641. Tncp*1 Tnop*2 Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  17642.  
  17643. CKIO
  17644.  
  17645. Bank Row
  17646.  
  17647. Precharge-sel H/L
  17648.  
  17649. Address c1
  17650.  
  17651. CSn
  17652.  
  17653. RD/WR
  17654.  
  17655. RAS
  17656.  
  17657. CASS
  17658.  
  17659. DQMn
  17660.  
  17661.  
  17662.  
  17663. D63–D0
  17664. c1 c2 c3 c4
  17665. (read)
  17666.  
  17667. BS
  17668.  
  17669. CKE
  17670.  
  17671. DACKn
  17672. (SA: IO → memory)
  17673.  
  17674. Notes: 1. Tncp: DACK output start cycle (inserted only in the case of DACK output)
  17675. 2. Tnop: Dummy cycle (always inserted)
  17676.  
  17677. Figure 13.34 Burst Write Timing (Same Row Address)
  17678.  
  17679. Rev. 2.0, 02/99, page 374 of 830
  17680.  
  17681. ----------------------- Page 389-----------------------
  17682.  
  17683. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4
  17684.  
  17685. CKIO
  17686.  
  17687. Bank Row
  17688.  
  17689. Precharge-sel Row H/L
  17690.  
  17691. Address Row c1
  17692.  
  17693. CSn
  17694.  
  17695. RD/WR
  17696.  
  17697. RAS
  17698.  
  17699. CASS
  17700.  
  17701. DQMn
  17702.  
  17703. D63–D0
  17704. c1 c2 c3 c4
  17705. (read)
  17706.  
  17707. BS
  17708.  
  17709. CKE
  17710.  
  17711. DACKn
  17712. (SA: IO → memory)
  17713.  
  17714. Figure 13.35 Burst Write Timing (Different Row Addresses)
  17715.  
  17716. Pipelined Access: When the RASD bit is set to 1 in MCR, pipelined access is performed
  17717. between an access by the CPU and an access by the DMAC, or in the case of consecutive
  17718. accesses by the DMAC, to provide faster access to synchronous DRAM. As synchronous DRAM
  17719. is internally divided into two or four banks, after a READ or WRIT command is issued for one
  17720. bank it is possible to issue a PRE, ACTV, or other command during the CAS latency cycle or
  17721. data latch cycle, or during the data write cycle, and so shorten the access cycle.
  17722.  
  17723. When a read access is followed by another read access to the same row address, after a READ
  17724. command has been issued, another READ command is issued before the end of the data latch
  17725. cycle, so that there is read data on the data bus continuously. When an access is made to another
  17726. row address and the bank is different, the PRE command or ACTV command can be issued
  17727. during the CAS latency cycle or data latch cycle. If there are consecutive access requests for
  17728. different row addresses in the same bank, the PRE command cannot be issued until the last-but-
  17729.  
  17730. Rev. 2.0, 02/99, page 375 of 830
  17731.  
  17732. ----------------------- Page 390-----------------------
  17733.  
  17734. one data latch cycle. If a read access is followed by a write access, it may be possible to issue a
  17735. PRE or ACT command, depending on the bank and row address, but since the write data is
  17736. output at the same time as the WRIT command, the PRE, ACTV, and WRIT commands are
  17737. issued in such a way that one or two empty cycles occur automatically on the data bus.
  17738. Similarly, with a read access following a write access, or a write access following a write access,
  17739. the PRE, ACTV, READ, or WRIT command is issued during the data write cycle for the
  17740. preceding access; however, in the case of different row addresses in the same bank, a PRE
  17741. command cannot be issued, and so in this case the PRE command is issued following the
  17742. number of Trwl cycles specified by the TRWL bits in MCR, after the end of the last data write
  17743. cycle.
  17744.  
  17745. Figure 13.36 shows a burst read cycle for a different bank and row address following a preceding
  17746. burst read cycle.
  17747.  
  17748. Pipelined access is enabled only for consecutive access to area 3, and will be discontinued in the
  17749. event of an access to another area. Pipelined access is also discontinued in the event of a refresh
  17750. cycle, or bus release due to bus arbitration. The cases in which pipelined access is available are
  17751. shown in table 13.16. In this table, “DMAC dual” indicates transfer in DMAC dual address
  17752. mode, and “DMAC single”, transfer in DMAC single address mode.
  17753.  
  17754. Table 13.16 Cycles in Which Pipelined Access Can Be Used
  17755.  
  17756. Preceding Access Following Access
  17757.  
  17758. CPU DMAC Dual DMAC Single
  17759.  
  17760. Read Write Read Write Read Write
  17761.  
  17762. CPU Read X X O X O O
  17763.  
  17764. Write X X O X O O
  17765.  
  17766. DMAC dual Read X X X X X X
  17767.  
  17768. Write O O O X O O
  17769.  
  17770. DMAC single Read O O X X O O
  17771.  
  17772. Write O O O X O O
  17773.  
  17774. O: Pipelined access possible
  17775. X: Pipelined access not possible
  17776.  
  17777. Rev. 2.0, 02/99, page 376 of 830
  17778.  
  17779. ----------------------- Page 391-----------------------
  17780.  
  17781. Tc1_A Tc1_B
  17782.  
  17783. CKIO
  17784.  
  17785. Bank
  17786.  
  17787. Precharge-sel H/L H/L
  17788.  
  17789. Address c_A c_B
  17790.  
  17791. CSn
  17792.  
  17793. RD/WR
  17794.  
  17795. RAS
  17796.  
  17797. CASS
  17798.  
  17799. DQMn
  17800.  
  17801. D63–D0
  17802. a1 a2 a3 a4 b1 b2
  17803. (read)
  17804.  
  17805. BS
  17806.  
  17807. CKE
  17808.  
  17809. Figure 13.36 Burst Read Cycle for Different Bank and Row Address Following Preceding
  17810. Burst Read Cycle
  17811.  
  17812. Refreshing: The bus state controller is provided with a function for controlling synchronous
  17813. DRAM refreshing. Auto-refreshing can be performed by clearing the RMODE bit to 0 and
  17814. setting the RFSH bit to 1 in MCR. If synchronous DRAM is not accessed for a long period, self-
  17815. refresh mode, in which the power consumption for data retention is low, can be activated by
  17816. setting both the RMODE bit and the RFSH bit to 1.
  17817.  
  17818. Rev. 2.0, 02/99, page 377 of 830
  17819.  
  17820. ----------------------- Page 392-----------------------
  17821.  
  17822. • Auto-Refreshing
  17823. Refreshing is performed at intervals determined by the input clock selected by bits CKS2–
  17824. CKS0 in RTCSR, and the value set in RTCOR. The value of bits CKS2–CKS0 in RTCOR
  17825. should be set so as to satisfy the refresh interval specification for the synchronous DRAM
  17826. used. First make the settings for RTCOR, RTCNT, and the RMODE and RFSH bits in MCR,
  17827. then make the CKS2–CKS0 setting last of all. When the clock is selected by CKS2–CKS0,
  17828. RTCNT starts counting up from the value at that time. The RTCNT value is constantly
  17829. compared with the RTCOR value, and if the two values are the same, a refresh request is
  17830. generated and an auto-refresh is performed. At the same time, RTCNT is cleared to zero and
  17831. the count-up is restarted. Figure 13.38 shows the auto-refresh cycle timing.
  17832. First, an REF command is issued in the TRr cycle. After the TRr cycle, new command output
  17833. cannot be performed for the duration of the number of cycles specified by bits TRAS2–
  17834. TRAS0 in MCR plus the number of cycles specified by bits TRC2–TRC0 in MCR. The
  17835. TRAS2–TRAS0 and TRC2–TRC0 bits must be set so as to satisfy the synchronous DRAM
  17836. refresh cycle time specification (active/active command delay time).
  17837. Auto-refreshing is performed in normal operation, in sleep mode, and in the case of a manual
  17838. reset.
  17839.  
  17840. RTCOR value RTCNT cleared to 0 when
  17841. RTCNT = RTCOR
  17842. RTCNT
  17843.  
  17844. H'00000000 Time
  17845.  
  17846. RTCSR.CKS2–0 = 000 ≠ 000
  17847.  
  17848. Refresh
  17849. request
  17850.  
  17851. Refresh request cleared
  17852.  
  17853. by start of refresh cycle
  17854. External bus
  17855.  
  17856. Auto-refresh cycle
  17857.  
  17858. Figure 13.37 Auto-Refresh Operation
  17859.  
  17860. Rev. 2.0, 02/99, page 378 of 830
  17861.  
  17862. ----------------------- Page 393-----------------------
  17863.  
  17864. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  17865.  
  17866. CKIO
  17867.  
  17868. CSn
  17869.  
  17870. RD/WR
  17871.  
  17872. RAS
  17873.  
  17874. CASS
  17875.  
  17876. DQMn
  17877.  
  17878. D63–D0
  17879.  
  17880. BS
  17881.  
  17882. CKE
  17883.  
  17884. Figure 13.38 Synchronous DRAM Auto-Refresh Timing
  17885.  
  17886. • Self-Refreshing
  17887. Self-refresh mode is a kind of standby mode in which the refresh timing and refresh
  17888. addresses are generated within the synchronous DRAM. Self-refreshing is activated by
  17889. setting both the RMODE bit and the RFSH bit to 1. The self-refresh state is maintained while
  17890. the CKE signal is low. Synchronous DRAM cannot be accessed while in the self-refresh
  17891. state. Self-refresh mode is cleared by clearing the RMODE bit to 0. After self-refresh mode
  17892. has been cleared, command issuance is disabled for the number of cycles specified by bits
  17893. TRC2–TRC0 in MCR. Self-refresh timing is shown in figure 13.39. Settings must be made
  17894. so that self-refresh clearing and data retention are performed correctly, and auto-refreshing is
  17895. performed at the correct intervals. When self-refreshing is activated from the state in which
  17896. auto-refreshing is set, or when exiting standby mode other than through a power-on reset,
  17897. auto-refreshing is restarted if RFSH is set to 1 and RMODE is cleared to 0 when self-refresh
  17898. mode is cleared. If the transition from clearing of self-refresh mode to the start of auto-
  17899. refreshing takes time, this time should be taken into consideration when setting the initial
  17900. value of RTCNT. Making the RTCNT value 1 less than the RTCOR value will enable
  17901. refreshing to be started immediately.
  17902. After self-refreshing has been set, the self-refresh state continues even if the chip standby
  17903. state is entered using the SH7750’s standby function, and is maintained even after recovery
  17904. from standby mode other than through a power-on reset.
  17905.  
  17906. Rev. 2.0, 02/99, page 379 of 830
  17907.  
  17908. ----------------------- Page 394-----------------------
  17909.  
  17910. In the case of a power-on reset, the bus state controller’s registers are initialized, and
  17911. therefore the self-refresh state is cleared.
  17912. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the
  17913. case of a manual reset.
  17914.  
  17915. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  17916.  
  17917. CKIO
  17918.  
  17919. CSn
  17920.  
  17921. RD/WR
  17922.  
  17923. RAS
  17924.  
  17925. CASS
  17926.  
  17927. DQMn
  17928.  
  17929. D63–D0
  17930.  
  17931. BS
  17932.  
  17933. CKE
  17934.  
  17935. Figure 13.39 Synchronous DRAM Self-Refresh Timing
  17936.  
  17937. • Relationship between Refresh Requests and Bus Cycle Requests
  17938. If a refresh request is generated during execution of a bus cycle, execution of the refresh is
  17939. deferred until the bus cycle is completed. If a refresh request occurs when the bus has been
  17940. released by the bus arbiter, refresh execution is deferred until the bus is acquired. If a match
  17941. between RTCNT and RTCOR occurs while a refresh is waiting to be executed, so that a new
  17942. refresh request is generated, the previous refresh request is eliminated. In order for refreshing
  17943. to be performed normally, care must be taken to ensure that no bus cycle or bus mastership
  17944. occurs that is longer than the refresh interval. When a refresh request is generated, the %$&.
  17945. pin is negated (driven high). Therefore, normal refreshing can be performed by having the
  17946. %$&. pin monitored by a bus master other than the SH7750 requesting the bus, or the bus
  17947. arbiter, and returning the bus to the SH7750.
  17948.  
  17949. Rev. 2.0, 02/99, page 380 of 830
  17950.  
  17951. ----------------------- Page 395-----------------------
  17952.  
  17953. Power-On Sequence: In order to use synchronous DRAM, mode setting must first be performed
  17954. after powering on. To perform synchronous DRAM initialization correctly, the bus state
  17955. controller registers must first be set, followed by a write to the synchronous DRAM mode
  17956. register. In synchronous DRAM mode register setting, the address signal value at that time is
  17957. latched by a combination of the 5$6, &$6, and RD/:5 signals. If the value to be set is X, the
  17958. bus state controller provides for value X to be written to the synchronous DRAM mode register
  17959. by performing a write to address H'FF900000 + X for area 2 synchronous DRAM, and to address
  17960. H'FF940000 + X for area 3 synchronous DRAM. In this operation the data is ignored, but the
  17961. mode write is performed as a byte-size access. To set burst read/write, CAS latency 1 to 3, wrap
  17962. type = sequential, and burst length 4 or 8, supported by the SH7750, arbitrary data is written by
  17963. byte-size access to the following addresses.
  17964.  
  17965. Bus Width CAS Latency Area 2 Area 3
  17966.  
  17967. 32 1 FF90004C FF94004C
  17968.  
  17969. 2 FF90008C FF94008C
  17970.  
  17971. 3 FF9000CC FF9400CC
  17972.  
  17973. 64 1 FF900090 FF940090
  17974.  
  17975. 2 FF900110 FF940110
  17976.  
  17977. 3 FF900190 FF940190
  17978.  
  17979. The value set in MCR.MRSET is used to select whether a precharge all banks command or a
  17980. mode register setting command is issued. The timing for the precharge all banks command is
  17981. shown in figure 13.40 (1), and the timing for the mode register setting command in figure 13.40
  17982. (2).
  17983.  
  17984. Before mode register, a 200 µs idle time (depending on the memory manufacturer) must be
  17985. guaranteed after the power required for the synchronous DRAM is turned on. If the reset signal
  17986. pulse width is greater than this idle time, there is no problem in making the precharge all banks
  17987. setting immediately.
  17988.  
  17989. First, a precharge all banks (PALL) command is issued in the TRp1 cycle by performing a write
  17990. to address H'FF900000 + X or H'FF940000 + X while MCR.MRSET = 0. Next, the number of
  17991. dummy auto-refresh cycles specified by the manufacturer (usually 8) or more must be executed.
  17992. This is achieved automatically while various kinds of initialization are being performed after
  17993. auto-refresh setting, but a way of carrying this out more dependably is to change the RTCOR
  17994. register value to set a short refresh request generation interval just while these dummy cycles are
  17995. being executed. With simple read or write access, the address counter in the synchronous DRAM
  17996. used for auto-refreshing is not initialized, and so the cycle must always be an auto-refresh cycle.
  17997. After auto-refreshing has been executed at least the prescribed number of times, a mode register
  17998. setting command is issued in the TMw1 cycle by setting MCR.MRSET to 1 and performing a
  17999. write to address H'FF900000 + X or H'FF940000 + X.
  18000.  
  18001. Rev. 2.0, 02/99, page 381 of 830
  18002.  
  18003. ----------------------- Page 396-----------------------
  18004.  
  18005. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  18006.  
  18007. CKIO
  18008.  
  18009. Bank
  18010.  
  18011. Precharge-sel
  18012.  
  18013. Address
  18014.  
  18015. CSn
  18016.  
  18017. RD/WR
  18018.  
  18019. RAS
  18020.  
  18021. CASS
  18022.  
  18023. D31–D0
  18024.  
  18025. CKE
  18026. (High)
  18027.  
  18028. Figure 13.40 (1) Synchronous DRAM Mode Write Timing
  18029.  
  18030. Rev. 2.0, 02/99, page 382 of 830
  18031.  
  18032. ----------------------- Page 397-----------------------
  18033.  
  18034. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  18035.  
  18036. CKIO
  18037.  
  18038. Bank
  18039.  
  18040. Precharge-sel
  18041.  
  18042. Address
  18043.  
  18044. CSn
  18045.  
  18046. RD/WR
  18047.  
  18048. RAS
  18049.  
  18050. CASS
  18051.  
  18052. D31–D0
  18053.  
  18054. CKE
  18055. (High)
  18056.  
  18057. Figure 13.40 (2) Synchronous DRAM Mode Write Timing
  18058.  
  18059. Rev. 2.0, 02/99, page 383 of 830
  18060.  
  18061. ----------------------- Page 398-----------------------
  18062.  
  18063. 13.3.6 Burst ROM Interface
  18064.  
  18065. Setting bits A0BST2–A0BST0, A5BST2–A5BST0, and A6BST2–A6BST0 in BCR1 to a non-
  18066. zero value allows burst ROM to be connected to areas 0, 5, and 6. The burst ROM interface
  18067. provides high-speed access to ROM that has a burst access function. The timing for burst access
  18068. to burst ROM is shown in figure 13.41. Two wait cycles are set. Basically, access is performed
  18069. in the same way as for normal space, but when the first cycle ends, only the address is changed
  18070. before the next access is executed. When 8-bit ROM is connected, the number of consecutive
  18071. accesses can be set as 4, 8, 16, or 32 with bits A0BST2–A0BST0, A5BST2–A5BST0, or
  18072. A6BST2–A6BST0. When 16-bit ROM is connected, 4, 8, or 16 can be set in the same way.
  18073. When 32-bit ROM is connected, 4 or 8 can be set.
  18074.  
  18075. 5'< pin sampling is always performed when one or more wait states are set.
  18076.  
  18077. The second and subsequent access cycles also comprise two cycles when a burst ROM setting is
  18078. made and the wait specification is 0. The timing in this case is shown in figure 13.42.
  18079.  
  18080. In a ROM write operation, a basic bus cycle (write) is performed.
  18081.  
  18082. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18083. according to the set bus width. The first access is performed on the data for which there was an
  18084. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18085. The bus is not released during this period.
  18086.  
  18087. Figure 13.43 shows the timing when a burst ROM setting is made, and setup/hold is specified in
  18088. WCR3.
  18089.  
  18090. Rev. 2.0, 02/99, page 384 of 830
  18091.  
  18092. ----------------------- Page 399-----------------------
  18093.  
  18094. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  18095.  
  18096. CKIO
  18097.  
  18098. A25–A5
  18099.  
  18100. A4–A0
  18101.  
  18102. CSn
  18103.  
  18104. RD/WR
  18105.  
  18106. RD
  18107.  
  18108. D63–D0
  18109. (read)
  18110.  
  18111. BS
  18112.  
  18113. RDY
  18114.  
  18115. DACKn
  18116. (SA: IO ← memory)
  18117.  
  18118. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18119.  
  18120. Figure 13.41 Burst ROM Basic Access Timing
  18121.  
  18122. Rev. 2.0, 02/99, page 385 of 830
  18123.  
  18124. ----------------------- Page 400-----------------------
  18125.  
  18126. T1 Tw Tw TB2 TB1 Tw TB2 TB1 Tw TB2 TB1 Tw T2
  18127.  
  18128. CKIO
  18129.  
  18130. A25–A5
  18131.  
  18132. A4–A0
  18133.  
  18134. CSn
  18135.  
  18136. RD/WR
  18137.  
  18138. RD
  18139.  
  18140. D63–D0
  18141. (read)
  18142.  
  18143. BS
  18144.  
  18145. RDY
  18146.  
  18147. DACKn
  18148. (SA: IO ← memory)
  18149.  
  18150. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18151.  
  18152. Figure 13.42 Burst ROM Wait Access Timing
  18153.  
  18154. Rev. 2.0, 02/99, page 386 of 830
  18155.  
  18156. ----------------------- Page 401-----------------------
  18157.  
  18158. TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  18159.  
  18160. CKIO
  18161.  
  18162. A25–A5
  18163.  
  18164. A4–A0
  18165.  
  18166. CSn
  18167.  
  18168. RD/WR
  18169.  
  18170. RD
  18171.  
  18172. D63–D0
  18173. (read)
  18174.  
  18175. BS
  18176.  
  18177. RDY
  18178.  
  18179. DACKn
  18180. (SA: IO ← memory)
  18181.  
  18182. Figure 13.43 Burst ROM Wait Access Timing
  18183.  
  18184. 13.3.7 PCMCIA Interface
  18185.  
  18186. In the SH7750, setting the A56PCM bit in BCR1 to 1 makes the bus interface for external space
  18187. areas 5 and 6 an IC memory card interface or I/O card interface as stipulated in JEIDA
  18188. specification version 4.2 (PCMCIA2.1).
  18189.  
  18190. Figure 13.44 shows an example of PCMCIA card connection to the SH7750. To enable active
  18191. insertion of the PCMCIA cards (i.e. insertion or removal while system power is being supplied),
  18192. a 3-state buffer must be connected between the SH7750’s bus interface and the PCMCIA cards.
  18193.  
  18194. As operation in big-endian mode is not explicitly stipulated in the JEIDA/PCMCIA
  18195. specifications, the SH7750 supports only a little-endian mode PCMCIA interface.
  18196.  
  18197. The PCMCIA interface can only be accessed when the MMU is used. PCMCIA memory space
  18198. can be set in MMU page units, and there is a choice of 8-bit common memory, 16-bit common
  18199. memory, 8-bit attribute memory, 16-bit attribute memory, 8-bit I/O space, 16-bit I/O space, or
  18200. dynamic bus sizing. The setting is made with bits SA2–SA0 in PTEA.
  18201.  
  18202. Rev. 2.0, 02/99, page 387 of 830
  18203.  
  18204. ----------------------- Page 402-----------------------
  18205.  
  18206. SA2 SA1 SA0 Description
  18207.  
  18208. 0 0 0 Reserved (Setting prohibited)
  18209.  
  18210. 1 Dynamic I/O bus sizing
  18211.  
  18212. 1 0 8-bit I/O space
  18213.  
  18214. 1 16-bit I/O space
  18215.  
  18216. 1 0 0 8-bit common memory
  18217.  
  18218. 1 16-bit common memory
  18219.  
  18220. 1 0 8-bit attribute memory
  18221.  
  18222. 1 16-bit attribute memory
  18223.  
  18224. Wait cycles in a bus access can be selected with the TC bit in PTEA. When TC is cleared to 0,
  18225. bits A5W2–A5W0 in wait control register 2 (WCR2) and bits A5PCW1–A5PCW0, A5TED2–
  18226. A5TED0, and A5TEH2–A5TEH0 in the PCMCIA control register (PCR) are selected. When TC
  18227. is set to 1, bits A6W2–A6W0 in WCR2 and bits A6PCW1–A6PCW0, A6TED2–A6TED0, and
  18228. A6TEH2–A6TEH0 in PCR are selected.
  18229.  
  18230. AnPCW1–AnPCW0 specify the number of wait states to be inserted in a low-speed bus cycle; a
  18231. value of 0, 15, 30, or 50 can be set, and this value is added to the number of wait states for
  18232. insertion specified by WCR2. AnTED2–AnTED0 can be set to a value from 0 to 15, enabling
  18233. the address, &6, &($, &(%, and 5(* setup times with respect to the 5' and :( signals to
  18234. be secured. AnTEH2–AnTEH0 can also be set to a value from 0 to 15, enabling the address, &6,
  18235. &($, &(%, and 5(* write data hold times with respect to the 5' and :( signals to be
  18236. secured.
  18237.  
  18238. Wait cycles between cycles are set with bits A5IW2–A5IW0 and A6IW2–A6IW0 in wait control
  18239. register 1 (WCR1). The inter-cycle write cycles selected depend only on the area accessed (area
  18240. 5 or 6): when area 5 is accessed, bits A5IW2–A5IW0 are selected, and when area 6 is accessed,
  18241. bits A6IW2–A6IW0 are selected.
  18242.  
  18243. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18244. according to the set bus width. The first access is performed on the data for which there was an
  18245. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18246. The bus is not released during this period.
  18247.  
  18248. Rev. 2.0, 02/99, page 388 of 830
  18249.  
  18250. ----------------------- Page 403-----------------------
  18251.  
  18252. A25–A0 A25–A0
  18253. D15–D0 G
  18254. RD/WR D7–D0
  18255. CE1B/(CS6)
  18256. D15–D0
  18257. CE1A/(CS5) G
  18258. DIR
  18259. CE2B
  18260. CE2A D15–D8 PC card
  18261. (memory I/O)
  18262.  
  18263. G
  18264. SH7750 DIR
  18265.  
  18266. CE1
  18267. CE2
  18268.  
  18269. RD OE
  18270. WE1 WE/PGM
  18271. ICIORD (IORD)
  18272. ICIOWR G (IOWR)
  18273.  
  18274. REG REG
  18275. WAIT
  18276. RDY
  18277.  
  18278. IOIS16 (IOIS16)
  18279. Card
  18280. detection CD1, CD2
  18281. circuit
  18282.  
  18283. Output
  18284. Port A25–A0
  18285. G
  18286. D7–D0
  18287.  
  18288. D15–D0
  18289. G
  18290. DIR
  18291.  
  18292. D15–D8 PC card
  18293.  
  18294. (memory I/O)
  18295.  
  18296. G
  18297. DIR
  18298.  
  18299. CE1
  18300. CE2
  18301. OE
  18302. WE/PGM
  18303. G REG
  18304.  
  18305. WAIT
  18306.  
  18307. Card
  18308. detection CD1, CD2
  18309. circuit
  18310.  
  18311.  
  18312. Figure 13.44 Example of PCMCIA Interface
  18313.  
  18314. Rev. 2.0, 02/99, page 389 of 830
  18315.  
  18316. ----------------------- Page 404-----------------------
  18317.  
  18318. Memory Card Interface Basic Timing: Figure 13.45 shows the basic timing for the PCMCIA
  18319. IC memory card interface, and figure 13.46 shows the PCMCIA memory bus wait timing.
  18320.  
  18321. Tpcm1 Tpcm2
  18322.  
  18323. CKIO
  18324.  
  18325. A25–A0
  18326.  
  18327. CExx
  18328. REG
  18329.  
  18330. RD/WR
  18331.  
  18332. RD
  18333. (read)
  18334.  
  18335. D15–D0
  18336. (read)
  18337.  
  18338. WE1
  18339. (write)
  18340.  
  18341. D15–D0
  18342. (read)
  18343.  
  18344. BS
  18345.  
  18346. Figure 13.45 Basic Timing for PCMCIA Memory Card Interface
  18347.  
  18348. Rev. 2.0, 02/99, page 390 of 830
  18349.  
  18350. ----------------------- Page 405-----------------------
  18351.  
  18352. Tpcm0 Tpcm0w Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  18353.  
  18354. CKIO
  18355.  
  18356. A25–A0
  18357.  
  18358.  
  18359.  
  18360. CExx
  18361. REG
  18362.  
  18363. RD/WR
  18364.  
  18365. RD
  18366. (read)
  18367.  
  18368. D15–D0
  18369. (read)
  18370.  
  18371. WE1
  18372. (write)
  18373.  
  18374. D15–D0
  18375. (write)
  18376.  
  18377. BS
  18378.  
  18379. RDY
  18380.  
  18381. Figure 13.46 Wait Timing for PCMCIA Memory Card Interface
  18382.  
  18383. Rev. 2.0, 02/99, page 391 of 830
  18384.  
  18385. ----------------------- Page 406-----------------------
  18386.  
  18387. Common memory
  18388. (64 MB)
  18389. Access Physical
  18390. by CS5 wait address space
  18391. controller Physical I/O
  18392. addresses
  18393.  
  18394. 1 kB IO 1
  18395. Virtual Access page
  18396. address space by CS6 wait IO 1
  18397. controller
  18398. Common
  18399. IO 2
  18400. memory 1
  18401.  
  18402. Card 1 Common
  18403. on CS5 memory 2
  18404. Attribute memory Attribute memory IO 2
  18405. I/O space 1 (64 MB) 1 kB Different virtual pages
  18406. I/O space 2 page mapped to the same
  18407. . physical page
  18408. .
  18409. . Example of I/O spaces with different cycle times
  18410.  
  18411. (less than 1 kB)
  18412.  
  18413. I/O space
  18414. (64 MB)
  18415.  
  18416. Card 2
  18417. on CS6
  18418. .
  18419. .
  18420. .
  18421.  
  18422. The page size can be 1 kB, 4 kB, 64 kB, or 1 MB.
  18423.  
  18424. Example of PCMCIA interface mapping
  18425.  
  18426. Figure 13.47 PCMCIA Space Allocation
  18427.  
  18428. I/O Card Interface Timing: Figures 13.48 and 13.49 show the timing for the PCMCIA I/O card
  18429. interface.
  18430.  
  18431. When an I/O card interface access is made to a PCMCIA card in little-endian mode, dynamic
  18432. sizing of the I/O bus width is possible using the ,2,6 pin. When a 16-bit bus width is set, if
  18433. the ,2,6 signal is high during a word-size I/O bus cycle, the I/O port is recognized as being 8
  18434. bits in width. In this case, a data access for only 8 bits is performed in the I/O bus cycle being
  18435. executed, followed automatically by a data access for the remaining 8 bits.
  18436.  
  18437. Figure 13.50 shows the basic timing for dynamic bus sizing.
  18438.  
  18439. Rev. 2.0, 02/99, page 392 of 830
  18440.  
  18441. ----------------------- Page 407-----------------------
  18442.  
  18443. Tpci1 Tpci2
  18444.  
  18445. CKIO
  18446.  
  18447. A25–A0
  18448.  
  18449. CExx
  18450. REG
  18451.  
  18452. RD/WR
  18453.  
  18454. ICIORD
  18455. (read)
  18456.  
  18457. D15–D0
  18458. (read)
  18459.  
  18460. ICIOWR
  18461. (write)
  18462.  
  18463. D15–D0
  18464. (write)
  18465.  
  18466. BS
  18467.  
  18468. Figure 13.48 Basic Timing for PCMCIA I/O Card Interface
  18469.  
  18470. Rev. 2.0, 02/99, page 393 of 830
  18471.  
  18472. ----------------------- Page 408-----------------------
  18473.  
  18474. Tpci0 Tpci0w Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  18475.  
  18476. CKIO
  18477.  
  18478. A25–A0
  18479.  
  18480. CExx
  18481. REG
  18482.  
  18483. RD/WR
  18484.  
  18485. ICIORD
  18486. (read)
  18487.  
  18488.  
  18489. D15–D0
  18490. (read)
  18491.  
  18492. ICIOWR
  18493. (write)
  18494.  
  18495. D15–D0
  18496. (write)
  18497.  
  18498. BS
  18499.  
  18500. RDY
  18501.  
  18502. IOIS16
  18503.  
  18504. Figure 13.49 Wait Timing for PCMCIA I/O Card Interface
  18505.  
  18506. Rev. 2.0, 02/99, page 394 of 830
  18507.  
  18508. ----------------------- Page 409-----------------------
  18509.  
  18510. Tpci0 Tpci Tpci1w Tpci2 Tpci2w Tpci0 Tpci Tpci1w Tpci2 Tpci2w
  18511.  
  18512. CKIO
  18513.  
  18514.  
  18515.  
  18516.  
  18517. A25–A1
  18518.  
  18519.  
  18520. A0
  18521.  
  18522.  
  18523.  
  18524. CExx
  18525. REG (WE7)
  18526.  
  18527.  
  18528.  
  18529.  
  18530. RD/WR
  18531.  
  18532.  
  18533.  
  18534. IORD (WE2)
  18535. (read)
  18536.  
  18537.  
  18538. D15–D0
  18539. (read)
  18540.  
  18541.  
  18542.  
  18543. IOWR (WE3)
  18544. (write)
  18545.  
  18546.  
  18547.  
  18548.  
  18549.  
  18550. D15–D0
  18551. (write)
  18552.  
  18553.  
  18554.  
  18555. BS
  18556.  
  18557.  
  18558.  
  18559.  
  18560. RDY
  18561.  
  18562. IOIS16
  18563.  
  18564.  
  18565.  
  18566.  
  18567.  
  18568.  
  18569. Figure 13.50 Dynamic Bus Sizing Timing for PCMCIA I/O Card Interface
  18570.  
  18571. Rev. 2.0, 02/99, page 395 of 830
  18572.  
  18573. ----------------------- Page 410-----------------------
  18574.  
  18575. 13.3.8 MPX Interface
  18576.  
  18577. If the MD6 pin is set to 0 in a power-on reset, the MPX interface for normal memory is selected
  18578. for area 0. The MPX interface is selected for areas 1 to 6 by means of the MPX bit in BCR1.
  18579. The MPX interface offers a multiplexed address/data type bus protocol, and permits easy
  18580. connection to an external memory controller chip that uses a single 32-bit multiplexed
  18581. address/data bus. The address is output to D25–D0, and the access size to D63–D61.
  18582.  
  18583. For details of access sizes and data alignment, see section 13.3.1, Endian/Access Size and Data
  18584. Alignment.
  18585.  
  18586. The address signals output at A25–A0 are undefined.
  18587.  
  18588. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18589. according to the set bus width. The first access is performed on the data for which there was an
  18590. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18591. The bus is not released during this period.
  18592.  
  18593. D63 D62 D61 Access Size
  18594.  
  18595. 0 0 0 Byte
  18596.  
  18597. 1 Word
  18598.  
  18599. 1 0 Longword
  18600.  
  18601. 1 Quadword
  18602.  
  18603. 1 X X 32-byte burst
  18604.  
  18605. X: Don’t care
  18606.  
  18607. SH7750 MPX device
  18608.  
  18609. CKIO CLK
  18610. CSn CS
  18611. BS BS
  18612. RD FRAME
  18613. RD/WR WE
  18614. D63–D0 I/O63–I/O0
  18615. RDY RDY
  18616.  
  18617. Figure 13.51 Example of 64-Bit Data Width MPX Connection
  18618.  
  18619. The MPX interface timing is shown below.
  18620.  
  18621. When the MPX interface is used for areas 1 to 6, a bus size of 32 or 64 bits should be specified
  18622. in BCR2.
  18623.  
  18624. Rev. 2.0, 02/99, page 396 of 830
  18625.  
  18626. ----------------------- Page 411-----------------------
  18627.  
  18628. For wait control, waits specified by WCR2 and wait insertion by means of the 5'< pin can be
  18629. used.
  18630.  
  18631. Tm1
  18632. Tmd1w Tmd1
  18633.  
  18634. CKIO
  18635.  
  18636. RD/FRAME
  18637.  
  18638. D63–D0 A D0
  18639.  
  18640. CSn
  18641.  
  18642. RD/WR
  18643.  
  18644. RDY
  18645.  
  18646. BS
  18647.  
  18648. DACKn
  18649. (DA)
  18650.  
  18651. Figure 13.52 MPX Interface Timing 1 (Single Read Cycle, No Wait)
  18652.  
  18653. Rev. 2.0, 02/99, page 397 of 830
  18654.  
  18655. ----------------------- Page 412-----------------------
  18656.  
  18657.  
  18658. Tm1 Tmd1w Tmd1w Tmd1
  18659.  
  18660. CKIO
  18661.  
  18662. RD/FRAME
  18663.  
  18664. D63–D0 A D0
  18665.  
  18666. CSn
  18667.  
  18668. RD/WR
  18669.  
  18670. RDY
  18671.  
  18672. BS
  18673.  
  18674. DACKn
  18675. (DA)
  18676.  
  18677. Figure 13.53 MPX Interface Timing 2 (Single Read, One Internal Wait Inserted)
  18678.  
  18679. Rev. 2.0, 02/99, page 398 of 830
  18680.  
  18681. ----------------------- Page 413-----------------------
  18682.  
  18683.  
  18684. Tm1 Tmd1
  18685.  
  18686. CKIO
  18687.  
  18688. RD/FRAME
  18689.  
  18690. D63–D0 A D0
  18691.  
  18692. CSn
  18693.  
  18694. RD/WR
  18695.  
  18696. RDY
  18697.  
  18698. BS
  18699.  
  18700. DACKn
  18701. (DA)
  18702.  
  18703. Figure 13.54 MPX Interface Timing 3 (Single Write Cycle, No Wait)
  18704.  
  18705. Rev. 2.0, 02/99, page 399 of 830
  18706.  
  18707. ----------------------- Page 414-----------------------
  18708.  
  18709.  
  18710. Tm1 Tmd1w Tmd1w Tmd1
  18711.  
  18712. CKIO
  18713.  
  18714. RD/FRAME
  18715.  
  18716. D63–D0 A D0
  18717.  
  18718. CSn
  18719.  
  18720. RD/WR
  18721.  
  18722. RDY
  18723.  
  18724. BS
  18725.  
  18726. DACKn
  18727. (DA)
  18728.  
  18729. Figure 13.55 MPX Interface Timing 4 (Single Write, One Internal Wait Inserted)
  18730.  
  18731. Rev. 2.0, 02/99, page 400 of 830
  18732.  
  18733. ----------------------- Page 415-----------------------
  18734.  
  18735. Tm1 Tmd3 Tmd4
  18736. Tmd1w Tmd1 Tmd2
  18737.  
  18738. CKIO
  18739.  
  18740. RD/FRAME
  18741.  
  18742. D63–D0 A D0 D1 D2 D3
  18743.  
  18744. CSn
  18745.  
  18746. RD/WR
  18747.  
  18748. RDY
  18749.  
  18750. BS
  18751.  
  18752. DACKn
  18753. (DA)
  18754.  
  18755. Figure 13.56 MPX Interface Timing 5 (Burst Read Cycle, No Wait)
  18756.  
  18757.  
  18758. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  18759.  
  18760. CKIO
  18761.  
  18762. RD/FRAME
  18763.  
  18764. D63–D0 A D0 D1 D2 D3
  18765.  
  18766. CSn
  18767.  
  18768. RD/WR
  18769.  
  18770. RDY
  18771.  
  18772. BS
  18773.  
  18774. DACKn
  18775. (DA)
  18776.  
  18777. Figure 13.57 MPX Interface Timing 6 (Burst Read Cycle, One Internal Wait Inserted)
  18778.  
  18779. Rev. 2.0, 02/99, page 401 of 830
  18780.  
  18781. ----------------------- Page 416-----------------------
  18782.  
  18783. Tm1 Tmd4
  18784. Tmd1 Tmd2 Tmd3
  18785.  
  18786. CKIO
  18787.  
  18788. RD/FRAME
  18789.  
  18790. D63–D0 A D0 D1 D2 D3
  18791.  
  18792. CSn
  18793.  
  18794. RD/WR
  18795.  
  18796. RDY
  18797.  
  18798. BS
  18799.  
  18800. DACKn
  18801. (DA)
  18802.  
  18803. Figure 13.58 MPX Interface Timing 7 (Burst Write Cycle, No Wait)
  18804.  
  18805.  
  18806. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  18807.  
  18808. CKIO
  18809.  
  18810. RD/FRAME
  18811.  
  18812. D63–D0 A D0 D1 D2 D3
  18813.  
  18814. CSn
  18815.  
  18816. RD/WR
  18817.  
  18818. RDY
  18819.  
  18820. BS
  18821.  
  18822. DACKn
  18823. (DA)
  18824.  
  18825. Figure 13.59 MPX Interface Timing 8 (Burst Write Cycle, One Internal Wait Inserted for
  18826. First Data Only)
  18827.  
  18828. Rev. 2.0, 02/99, page 402 of 830
  18829.  
  18830. ----------------------- Page 417-----------------------
  18831.  
  18832. 13.3.9 Byte Control SRAM
  18833.  
  18834. The byte control SRAM interface is a memory interface that outputs a byte select strobe (:(Q)
  18835. in both read and write bus cycles. It has 16 bit data pins, and can be directly connected to SRAM
  18836. which has an upper byte select strobe and lower byte select strobe function such as UB and LB.
  18837.  
  18838. Areas 1 and 4 can be designated as byte control SRAM. However, when these areas are set to
  18839. MPX mode, MPX mode has priority.
  18840.  
  18841. The byte control SRAM write timing is the same as for the normal SRAM interface.
  18842.  
  18843. In read operations, the :(Q pin timing is different. In a read access, only the :( signal for the
  18844. byte being read is asserted. Assertion is synchronized with the fall of the CKIO clock, as for the
  18845. :( signal, while negation is synchronized with the rise of the CKIO clock, using the same
  18846. timing as the 5' signal.
  18847.  
  18848. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18849. according to the set bus width. The first access is performed on the data for which there was an
  18850. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18851. The bus is not released during this period.
  18852.  
  18853. Figure 13.60 shows an example of byte control SRAM connection to the SH7750, and figures
  18854. 13.61 to 13.63 show examples of byte control SRAM bus timing.
  18855.  
  18856. Rev. 2.0, 02/99, page 403 of 830
  18857.  
  18858. ----------------------- Page 418-----------------------
  18859.  
  18860. 64K × 16-bit
  18861. SH7750 SRAM
  18862.  
  18863. A18–A3 A15–A0
  18864. CSn CS
  18865. RD OE
  18866. RD/WR WE
  18867. D63–D48 I/O15–I/O0
  18868. WE7 UB
  18869. WE6 LB
  18870.  
  18871. A15–A0
  18872. CS
  18873. OE
  18874. WE
  18875. D47–D32 I/O15–I/O0
  18876. WE5 UB
  18877. WE4 LB
  18878.  
  18879. A15–A0
  18880. CS
  18881. OE
  18882. WE
  18883. D31–D16 I/O15–I/O0
  18884. WE3 UB
  18885. WE2 LB
  18886.  
  18887. A15–A0
  18888. CS
  18889. OE
  18890. WE
  18891. D15–D0 I/O15–I/O0
  18892. WE1 UB
  18893. WE0 LB
  18894.  
  18895. Figure 13.60 Example of 64-Bit Data Width Byte Control SRAM
  18896.  
  18897. Rev. 2.0, 02/99, page 404 of 830
  18898.  
  18899. ----------------------- Page 419-----------------------
  18900.  
  18901. T1 T2
  18902.  
  18903. CKIO
  18904.  
  18905.  
  18906.  
  18907.  
  18908. A25–A0
  18909.  
  18910.  
  18911.  
  18912.  
  18913. CSn
  18914.  
  18915.  
  18916.  
  18917. RD/WR
  18918.  
  18919.  
  18920.  
  18921. RD
  18922.  
  18923. D63–D0
  18924.  
  18925. (read)
  18926.  
  18927.  
  18928.  
  18929.  
  18930.  
  18931. WEn
  18932.  
  18933.  
  18934.  
  18935. BS
  18936.  
  18937. RDY
  18938.  
  18939.  
  18940.  
  18941. DACKn
  18942. (SA: IO ← memory)
  18943.  
  18944.  
  18945. DACKn
  18946. (DA)
  18947.  
  18948. Figure 13.61 Byte Control SRAM Basic Read Cycle (No Wait)
  18949.  
  18950. Rev. 2.0, 02/99, page 405 of 830
  18951.  
  18952. ----------------------- Page 420-----------------------
  18953.  
  18954. T1 Tw T2
  18955.  
  18956. CKIO
  18957.  
  18958. A25–A0
  18959.  
  18960. CSn
  18961.  
  18962. RD/WR
  18963.  
  18964. RD
  18965.  
  18966. D63–D0
  18967. (read)
  18968.  
  18969. WEn
  18970.  
  18971. BS
  18972.  
  18973. RDY
  18974.  
  18975. DACKn
  18976. (SA: IO ← memory)
  18977.  
  18978. DACKn
  18979. (DA)
  18980.  
  18981. Figure 13.62 Byte Control SRAM Basic Read Cycle (One Internal Wait Cycle)
  18982.  
  18983. Rev. 2.0, 02/99, page 406 of 830
  18984.  
  18985. ----------------------- Page 421-----------------------
  18986.  
  18987. T1 Tw Twe T2
  18988.  
  18989. CKIO
  18990.  
  18991. A25–A0
  18992.  
  18993. CSn
  18994.  
  18995. RD/WR
  18996.  
  18997. RD
  18998.  
  18999. D63–D0
  19000. (read)
  19001.  
  19002. WEn
  19003.  
  19004. BS
  19005.  
  19006. RDY
  19007.  
  19008. DACKn
  19009. (SA: IO ← memory)
  19010.  
  19011. DACKn
  19012. (DA)
  19013.  
  19014. Figure 13.63 Byte Control SRAM Basic Read Cycle (One Internal Wait + One External
  19015. Wait)
  19016.  
  19017. Rev. 2.0, 02/99, page 407 of 830
  19018.  
  19019. ----------------------- Page 422-----------------------
  19020.  
  19021. 13.3.10 Waits between Access Cycles
  19022.  
  19023. A problem associated with higher external memory bus operating frequencies is that data buffer
  19024. turn-off on completion of a read from a low-speed device may be too slow, causing a collision
  19025. with the data in the next access, and so resulting in lower reliability or incorrect operation. To
  19026. avoid this problem, a data collision prevention feature has been provided. This memorizes the
  19027. preceding access area and the kind of read/write, and if there is a possibility of a bus collision
  19028. when the next access is started, inserts a wait cycle before the access cycle to prevent a data
  19029. collision. Wait cycle insertion consists of inserting idle cycles between access cycles, as shown
  19030. in section 13.2.3, Wait Control Register (WCR1). When the SH7750 performs consecutive write
  19031. cycles, the data transfer direction is fixed (from the SH7750 to other memory) and there is no
  19032. problem. With read accesses to the same area, also, in principle data is output from the same
  19033. data buffer, and wait cycle insertion is not performed. If there is originally space between
  19034. accesses, according to the setting of bits AnIW2–AnIW0 (n = 0 to 6) in WCR1, the number of
  19035. idle cycles inserted is the specified number of idle cycles minus the number of empty cycles.
  19036.  
  19037. When bus arbitration is performed, the bus is released after waits are inserted between cycles.
  19038.  
  19039. In single address mode DMA transfer, when data transfer is performed from an I/O device to
  19040. memory the data on the bus is determined by the speed of the I/O device. With a low-speed I/O
  19041. device, an inter-cycle idle wait equivalent to the output buffer turn-off time must be inserted.
  19042. Even with high-speed memory, when DMA transfer is considered, it may be necessary to insert
  19043. an inter-cycle wait to adjust to the speed of a low-speed device, preventing the memory from
  19044. being used at full speed.
  19045.  
  19046. Bits DMAIW2–DMAIW0 in wait control register 1 (WCR1) allow an inter-cycle wait setting to
  19047. be made when transferring data from an I/O device to memory using single address mode DMA
  19048. transfer. From 0 to 15 waits can be inserted. The number of waits specified by DMAIW2–
  19049. DMAIW0 are inserted in single address DMA transfers to all areas.
  19050.  
  19051. In dual address mode DMA transfer, the normal inter-cycle wait specified by AnIW2–AnIW0 (n
  19052. = 0 to 6) is inserted.
  19053.  
  19054. Rev. 2.0, 02/99, page 408 of 830
  19055.  
  19056. ----------------------- Page 423-----------------------
  19057.  
  19058. T1 T2 Twait T1 T2 Twait T1 T2
  19059.  
  19060. CKIO
  19061.  
  19062. A25–A0
  19063.  
  19064. CSm
  19065.  
  19066. CSn
  19067.  
  19068. BS
  19069.  
  19070. RD/WR
  19071.  
  19072. RD
  19073.  
  19074. D63–D0
  19075.  
  19076. Area m space read Area n space read Area n space write
  19077.  
  19078. Area m inter-access wait specification Area n inter-access wait specification
  19079.  
  19080. Figure 13.64 Waits between Access Cycles
  19081.  
  19082. 13.3.11 Bus Arbitration
  19083.  
  19084. The SH7750 is provided with a bus arbitration function that grants the bus to an external device
  19085. when it makes a bus request. Also provided is a bus arbitration function to support the
  19086. connection of two processors. The purpose of this function is to enable a multiprocessor system
  19087. to be implemented with a minimum of hardware by connecting the processors in a bus
  19088. arbitration master and slave arrangement.
  19089.  
  19090. There are three bus arbitration modes: master mode, partial-sharing master mode, and slave
  19091. mode. In master mode the bus is held on a constant basis, and is released to another device in
  19092. response to a bus request. In slave mode the bus is not held on a constant basis; a bus request is
  19093. issued each time an external bus cycle occurs, and the bus is released again at the end of the
  19094. access. In partial-sharing master mode, only area 2 is shared with external devices; slave mode is
  19095. in effect for area 2, while for other spaces, bus arbitration is not performed and the bus is held
  19096. constantly. The area in the master mode chip to which area 2 in the partial-sharing master mode
  19097. chip is allocated is determined by an external circuit.
  19098.  
  19099. Rev. 2.0, 02/99, page 409 of 830
  19100.  
  19101. ----------------------- Page 424-----------------------
  19102.  
  19103. Master mode and slave mode can be specified by the external mode pins. Partial-sharing master
  19104. mode is entered from master mode by means of a software setting. See Appendix C, Mode Pin
  19105. Settings, for the external mode pin settings. In master mode and slave mode, the bus goes to the
  19106. high-impedance state when not being held, so that it is possible to directly connect the master
  19107. mode and slave mode chips. In partial-sharing master mode, the bus is constantly driven, and
  19108. therefore an external buffer is necessary for connection to the master bus. In master mode, it is
  19109. possible to connect an external device that issues bus requests instead of a slave mode chip. In
  19110. the following description, an external device that issues bus requests is also referred to as a
  19111. slave.
  19112.  
  19113. The SH7750 has two internal bus masters: the CPU and the DMAC. When synchronous DRAM
  19114. or DRAM is connected and refresh control is performed, refresh requests constitute a third bus
  19115. master. In addition to these are bus requests from external devices in master mode. If requests
  19116. occur simultaneously, priority is given, in high-to-low order, to a bus request from an external
  19117. device, a refresh request, the DMAC, and the CPU.
  19118.  
  19119. To prevent incorrect operation of connected devices when the bus is transferred between master
  19120. and slave, all bus control signals are negated before the bus is released. When mastership of the
  19121. bus is received, also, bus control signals begin driving the bus from the negated state. Since
  19122. signals are driven to the same value by the master and slave exchanging the bus, output buffer
  19123. collisions can be avoided. By turning off the output buffer on the side releasing the bus, and
  19124. turning on the output buffer on the side receiving the bus, simultaneously with respect to the bus
  19125. control signals, it is possible to eliminate the signal high-impedance period. It is not necessary to
  19126. provide the pull-up resistors usually inserted in these control signal lines to prevent incorrect
  19127. operation due to external noise in the high-impedance state.
  19128.  
  19129. Bus transfer is executed between bus cycles.
  19130.  
  19131. When the bus release request signal (%5(4) is asserted, the SH7750 releases the bus as soon as
  19132. the currently executing bus cycle ends, and outputs the bus use permission signal (%$&.).
  19133. However, bus release is not performed during a burst transfer for cache fill or write-back, or
  19134. between a read cycle and write cycle during execution of a TAS instruction. Also, bus
  19135. arbitration is not performed between bus cycles generated due to the fact that the data bus width
  19136. is smaller than the access size, such as when a longword access is made to 8-bit memory. When
  19137. %5(4 is negated, %$&. is negated and use of the bus is resumed. See Appendix E, Pin
  19138. Functions, for the pin states when the bus is released.
  19139.  
  19140. As the CPU in the SH7750 is connected to cache memory by a dedicated internal bus, reading
  19141. from cache memory can still be carried out when the bus is being used by another bus master
  19142. inside or outside the SH7750. When writing from the CPU, an external write cycle is generated
  19143. when write-through has been set for the cache in the SH7750, or when an access is made to a
  19144. cache-off area. There is consequently a delay until the bus is returned.
  19145.  
  19146. Rev. 2.0, 02/99, page 410 of 830
  19147.  
  19148. ----------------------- Page 425-----------------------
  19149.  
  19150. When the SH7750 wants to take back the bus in response to an internal memory refresh request,
  19151. it negates %$&.. On receiving the %$&. negation, the device that asserted the external bus
  19152. release request negates %5(4 to release the bus. The bus is thereby returned to the SH7750,
  19153. which then carries out the necessary processing.
  19154.  
  19155. CKIO
  19156.  
  19157. BREQ
  19158. BACK Asserted for at least 2 cyc
  19159.  
  19160. Negated within 2 cyc
  19161. HiZ
  19162. A25–A0
  19163.  
  19164. HiZ
  19165. CSn
  19166.  
  19167. RD/WR HiZ
  19168.  
  19169. HiZ
  19170. RD
  19171.  
  19172. HiZ
  19173. WEn
  19174.  
  19175. HiZ HiZ
  19176. D63–D0 (write)
  19177.  
  19178. HiZ
  19179. BS
  19180.  
  19181. Master mode device access
  19182.  
  19183. Must be asserted for
  19184. at least 2 cyc Must be negated within 2 cyc
  19185.  
  19186. BREQ/BSACK
  19187.  
  19188. BACK/BSREQ
  19189.  
  19190. HiZ HiZ
  19191. A25–A0
  19192.  
  19193. HiZ HiZ
  19194. CSn
  19195.  
  19196. HiZ HiZ
  19197. RD/WR
  19198.  
  19199. HiZ HiZ
  19200. RD
  19201.  
  19202. HiZ HiZ
  19203. WEn
  19204.  
  19205. HiZ HiZ
  19206. D63–D0 (write)
  19207.  
  19208. HiZ HiZ
  19209. BS
  19210.  
  19211. Slave mode device access
  19212.  
  19213. Master access Slave access Master access
  19214.  
  19215. Figure 13.65 Arbitration Sequence
  19216. Rev. 2.0, 02/99, page 411 of 830
  19217.  
  19218. ----------------------- Page 426-----------------------
  19219.  
  19220. 13.3.12 Master Mode
  19221.  
  19222. The master mode processor holds the bus itself unless it receives a bus request.
  19223.  
  19224. On receiving an assertion (low level) of the bus request signal (%5(4) from off-chip, the master
  19225. mode processor releases the bus and asserts (drives low) the bus use permission signal (%$&.)
  19226. as soon as the currently executing bus cycle ends. If a bus release request due to a refresh request
  19227. has not been issued, on receiving the %5(4 negation (high level) indicating that the slave has
  19228. released the bus, the processor negates (drives high) the %$&. signal and resumes use of the
  19229. bus.
  19230.  
  19231. If a bus request is issued due to a memory refresh request in the bus-released state, the processor
  19232. negates the bus use permission signal (%$&.), and on receiving the %5(4 negation indicating
  19233. that the slave has released the bus, resumes use of the bus.
  19234.  
  19235. When the bus is released, all bus interface related output signals and input/output signals go to
  19236. the high-impedance state, except for the synchronous DRAM interface CKE signal and bus
  19237. arbitration %$&. signal, and DACK0 and DACK1 which control DMA transfers.
  19238.  
  19239. With DRAM, the bus is released after precharging is completed. With synchronous DRAM, also,
  19240. a precharge command is issued for the active bank and the bus is released after precharging is
  19241. completed.
  19242.  
  19243. The actual bus release sequence is as follows.
  19244.  
  19245. First, the bus use permission signal is asserted in synchronization with the rising edge of the
  19246. clock. The address bus and data bus go to the high-impedance state in synchronization with the
  19247. next rising edge of the clock after this %$&. assertion. At the same time, the bus control signals
  19248. (%6, &6Q, 5$6, 5$6, :(Q, 5', RD/:5, 5', RD/:5, &($, and &(%) go to the high-
  19249. impedance state. These bus control signals are negated no later than one cycle before going to
  19250. high-impedance. Bus request signal sampling is performed on the rising edge of the clock.
  19251.  
  19252. The sequence for re-acquiring the bus from the slave is as follows.
  19253.  
  19254. As soon as %5(4 negation is detected on the rising edge of the clock, %$&. is negated and bus
  19255. control signal driving is started. Driving of the address bus and data bus starts at the next rising
  19256. edge of an in-phase clock. The bus control signals are asserted and the bus cycle is actually
  19257. started, at the earliest, at the clock rising edge at which the address and data signals are driven.
  19258.  
  19259. In order to reacquire the bus and start execution of a refresh operation or bus access, the %5(4
  19260. signal must be negated for at least two cycles.
  19261.  
  19262. If a refresh request is generated when %$&. has been asserted and the bus has been released,
  19263. the %$&. signal is negated even while the %5(4 signal is asserted to request the slave to
  19264. relinquish the bus. When the SH7750 is used in master mode, consecutive bus accesses may be
  19265.  
  19266. Rev. 2.0, 02/99, page 412 of 830
  19267.  
  19268. ----------------------- Page 427-----------------------
  19269.  
  19270. attempted to reduce the overhead due to arbitration in the case of a slave designed independently
  19271. by the user. When connecting a slave for which the total duration of consecutive accesses
  19272. exceeds the refresh cycle, the design should provide for the bus to be released as soon as
  19273. possible after negation of the %$&. signal is detected.
  19274.  
  19275. 13.3.13 Slave Mode
  19276.  
  19277. In slave mode, the bus is normally in the released state, and an external device cannot be
  19278. accessed unless the bus is acquired through execution of the bus arbitration sequence. In a reset,
  19279. also, the bus-released state is established and the bus arbitration sequence is started from the
  19280. reset vector fetch.
  19281.  
  19282. To acquire the bus, the slave device asserts (drives low) the %65(4 signal in synchronization
  19283. with the rising edge of the clock. The bus use permission %6$&. signal is sampled for assertion
  19284. (low level) in synchronization with the rising edge of the clock. When %6$&. assertion is
  19285. detected, the bus control signals and address bus are immediately driven at the negated level.
  19286. The bus cycle is started at the next rising edge of the clock. The last signal negated at the end of
  19287. the access cycle is synchronized with the rising edge of the clock. When the bus cycle ends, the
  19288. %65(4 signal is negated and the release of the bus is reported to the master. On the next rising
  19289. edge of the clock, the control signals are set to high-impedance.
  19290.  
  19291. In order for the slave mode processor to begin access, the %6$&. signal must be asserted for at
  19292. least two cycles.
  19293.  
  19294. For a slave access cycle in DRAM or synchronous DRAM, the bus is released on completion of
  19295. precharging, as in the case of the master.
  19296.  
  19297. Refresh control is left to the master mode device, and any refresh control settings made in slave
  19298. mode are ignored.
  19299.  
  19300. Do not use DRAM/synchronous DRAM RAS down mode in slave mode.
  19301.  
  19302. Synchronous DRAM mode register settings should be made by the master mode device. Do not
  19303. use the DMAC’s DDT mode in slave mode.
  19304.  
  19305. Rev. 2.0, 02/99, page 413 of 830
  19306.  
  19307. ----------------------- Page 428-----------------------
  19308.  
  19309. 13.3.14 Partial-Sharing Master Mode
  19310.  
  19311. In partial-sharing master mode, area 2 only is shared with other devices, and other areas can be
  19312. accessed at all times. Partial-sharing master mode can be set by setting master mode with the
  19313. external mode pins, and setting the PSHR bit to 1 in BCR1 in the initialization procedure in a
  19314. power-on reset. In a manual reset the bus state controller setting register values are retained, and
  19315. so need not be set again.
  19316.  
  19317. Partial-sharing master mode is designed for use in conjunction with a master mode chip. The
  19318. partial-sharing master can access a device on the master side via area 2, but the master cannot
  19319. access a device on the partial-sharing master side.
  19320.  
  19321. An address and control signal buffer and a data buffer must be located between the partial-
  19322. sharing master and the master, and controlled by a buffer control circuit.
  19323.  
  19324. The partial-sharing master mode processor uses the following procedure to access area 2. It
  19325. asserts the %65(4 signal on the rising edge of the clock, and issues a bus request to the master.
  19326. It samples %6$&. on each rising edge of the clock, and on receiving %6$&. assertion, starts
  19327. the access cycle on the next rising edge of the clock. At the end of the access, it negates %65(4
  19328. on the rising edge of the clock. Buffer control in an access to an area 2 device by the partial-
  19329. sharing master is carried out by referencing the &6 signal or %65(4 and %6$&. signals on
  19330. the partial-sharing master side. Permission to use the bus is reported by the %6$&. line
  19331. connected to the partial-sharing master, but the master may also negate the %6$&. signal even
  19332. while the bus is being used, if it needs the bus urgently in order to service a refresh, for example.
  19333. Consequently, the partial-sharing master has to monitor the %65(4 signal to see whether it can
  19334. continue to use the bus after detecting %6$&. assertion. In the case of the address buffer, after
  19335. the address buffer is turned on when %6$&. assertion is detected, the buffer is kept on until
  19336. %65(4 is negated, at which point it is turned off. If the turning-off of the buffer used is late,
  19337. resulting in a collision with the start of an access cycle on the master side, the %65(4 signal
  19338. output from the partial-sharing master must be routed through a delay circuit as part of the buffer
  19339. control circuit, and input to the master %5(4 signal.
  19340.  
  19341. In order for a partial-sharing master mode processor to begin area 2 access, the %6$&. signal
  19342. must be asserted for at least two cycles.
  19343.  
  19344. When the bus is released after area 2 has been accessed in partial-sharing master mode, if area 2
  19345. is synchronous DRAM, there is a wait of the period required for auto-precharge before bus
  19346. release is performed.
  19347.  
  19348. In partial-sharing master mode, refreshing is not performed for area 2 (refresh requests are
  19349. ignored).
  19350.  
  19351. Do not use DRAM/synchronous DRAM RAS down mode in partial-sharing master mode.
  19352.  
  19353. Rev. 2.0, 02/99, page 414 of 830
  19354.  
  19355. ----------------------- Page 429-----------------------
  19356.  
  19357. Area 2 synchronous DRAM mode register settings should be made by the master mode device.
  19358. Set partial-sharing master mode (by setting the PSHR bit to 1 in BCR1) after completion of the
  19359. area 3 synchronous DRAM mode register settings.
  19360.  
  19361. In partial-sharing master mode, DMA transfer should not be performed on area 2, and the
  19362. DMAC’s DDT mode should not be used.
  19363.  
  19364. 13.3.15 Cooperation between Master and Slave
  19365.  
  19366. To enable system resources to be controlled in a harmonious fashion by master and slave, their
  19367. respective roles must be clearly defined. Before DRAM or synchronous DRAM is used,
  19368. initialization operations must be carried out. Responsibility must also be assigned when a
  19369. standby operation is performed to implement the power-down state.
  19370.  
  19371. The design of the SH7750 provides for all control, including initialization, refreshing, and
  19372. standby control, to be carried out by the master mode device. In a dual-processor configuration
  19373. using direct master/slave connection, all processing except direct access to memory is handled
  19374. by the master. In a combination of master mode and partial-sharing master mode, the partial-
  19375. sharing master mode processor performs initialization, refreshing, and standby control for the
  19376. areas connected to it, with the exception of area 2, while the master performs initialization of the
  19377. memory connected to it.
  19378.  
  19379. If the SH7750 is specified as the master in a power-on reset, it will not accept bus requests from
  19380. the slave until the %5(4 enable bit (BCR1.BREQEN) is set to 1.
  19381.  
  19382. To ensure that the slave processor does not access memory requiring initialization before use,
  19383. such as DRAM and synchronous DRAM, until initialization is completed, write 1 to the %5(4
  19384. enable bit after initialization ends.
  19385.  
  19386. Before setting self-refresh mode in standby mode, etc., write 0 to the %5(4 enable bit to
  19387. invalidate the %5(4 signal from the slave. Write 1 to the %5(4 enable bit only after the master
  19388. has performed the necessary processing (refresh settings, etc.) for exiting self-refresh mode.
  19389.  
  19390. Rev. 2.0, 02/99, page 415 of 830
  19391.  
  19392. ----------------------- Page 430-----------------------
  19393.  
  19394. Rev. 2.0, 02/99, page 416 of 830
  19395.  
  19396. ----------------------- Page 431-----------------------
  19397.  
  19398. Section 14 Direct Memory Access Controller (DMAC)
  19399.  
  19400. 14.1 Overview
  19401.  
  19402. The SH7750 includes an on-chip four-channel direct memory access controller (DMAC). The
  19403. DMAC can be used in place of the CPU to perform high-speed data transfers among external
  19404. devices equipped with DACK (DMA transfer end notification), external memories, memory-
  19405. mapped external devices, and on-chip peripheral modules (except the DMAC, BSC, and UBC).
  19406. Using the DMAC reduces the burden on the CPU and increases the operating efficiency of the
  19407. chip.
  19408.  
  19409. 14.1.1 Features
  19410.  
  19411. The DMAC has the following features.
  19412.  
  19413. • Four channels
  19414. • Physical address space
  19415. • Choice of 8-bit, 16-bit, 32-bit, 64-bit, or 32-byte transfer data length
  19416. • Maximum of 16 M (16,777,216) transfers
  19417. • Choice of single or dual address mode
  19418.  Single address mode: Either the transfer source or the transfer destination (peripheral
  19419. device) is accessed by a DACK signal while the other is accessed by address. One data
  19420. transfer is completed in one bus cycle.
  19421.  Dual address mode: Both the transfer source and transfer destination are accessed by
  19422. address. Values set in DMAC internal registers indicate the accessed address for both the
  19423. transfer source and the transfer destination. Two bus cycles are required for one data
  19424. transfer.
  19425. • Channel functions: Transfer modes that can be set are different for each channel.
  19426.  Channel 0: Single or dual address mode. External requests are accepted.
  19427.  Channel 1: Single or dual address mode. External requests are accepted.
  19428.  Channel 2: Dual address mode only.
  19429.  Channel 3: Dual address mode only.
  19430. • Transfer requests: The following three DMAC transfer activation requests are supported.
  19431.  External request: From two '5(4 pins. Either low level detection or falling edge
  19432. detection can be specified. External requests can be accepted on channels 0 and 1 only.
  19433.  Requests from on-chip peripheral modules: Transfer requests from modules such as the
  19434. SCI and TMU. These can be accepted on all channels.
  19435.  Auto-request: The transfer request is generated automatically within the DMAC.
  19436.  
  19437. Rev. 2.0, 02/99, page 417 of 830
  19438.  
  19439. ----------------------- Page 432-----------------------
  19440.  
  19441. • Choice of bus mode: Cycle steal mode or burst mode
  19442. • Two types of DMAC channel priority ranking:
  19443.  Fixed priority mode: Channel priorities are permanently fixed.
  19444.  Round robin mode: Sets the lowest priority for the channel for which an execution
  19445. request was last accepted.
  19446. • An interrupt request can be sent to the CPU on completion of the specified number of
  19447. transfers.
  19448. • On-demand data transfer mode (DDT mode)
  19449. In this mode, interfacing between an external device and the DMAC is performed using the
  19450. '%5(4, %$9/, 75, 7'$&., and ID [1:0] pins. External requests can be accepted on all
  19451. four channels.
  19452. For channel 0, data transfer can be carried out with the transfer mode, number of transfers,
  19453. transfer address (single only), etc., specified by the external device.
  19454. For channels 1 to 3, when transfer is performed by means of an on-chip peripheral module
  19455. request or auto-request, the operation is the same as in the normal mode. On these channels,
  19456. data transfer can be initiated by an external request.
  19457.  Channel 0: Single address mode. External requests are accepted
  19458.  Channel 1: Single or dual address mode. External requests are accepted.
  19459.  Channel 2: Single or dual address mode. External requests are accepted.
  19460.  Channel 3: Single or dual address mode. External requests are accepted.
  19461. In DDT mode, data transfer is carried out using the '%5(4, %$9/, 75, 7'$&., and ID
  19462. [1:0] signals to perform handshaking between the external device and the DMAC.
  19463.  
  19464. Rev. 2.0, 02/99, page 418 of 830
  19465.  
  19466. ----------------------- Page 433-----------------------
  19467.  
  19468. 14.1.2 Block Diagram
  19469.  
  19470. Figure 14.1 shows a block diagram of the DMAC.
  19471.  
  19472. DMAC module
  19473.  
  19474. Count
  19475. control SARn
  19476.  
  19477. Register DARn
  19478. control
  19479.  
  19480. s DMATCRn
  19481. u s
  19482. b u Activation
  19483.  
  19484. On-chip l b
  19485. a l control
  19486. r a
  19487. peripheral e n CHCRn
  19488. h r
  19489. module p e
  19490. i t
  19491. r n
  19492. e I
  19493. P
  19494. DMAOR
  19495. Request
  19496. TMU
  19497. priority
  19498. SCI, SCIF
  19499. control
  19500.  
  19501. DACK0, DACK1
  19502. DRAK0, DRAK1
  19503.  
  19504. Bus
  19505. interface
  19506.  
  19507. s
  19508. p s
  19509. i e
  19510. h r
  19511. c- d SAR0, DAR0, DMATCR0,
  19512. n d
  19513. o a dreq0-3 CHCR0 only
  19514. / e
  19515. s l
  19516. s u
  19517. e d
  19518. r o
  19519. d
  19520. d m DDT module
  19521. a l
  19522.  
  19523. l a
  19524. DREQ0, DREQ1 a r
  19525. n e DTR command buffer
  19526. r h
  19527. e p
  19528. t i
  19529. x r
  19530. E e
  19531. BAVL p
  19532. 32B data CH0 CH1 CH2 CH3
  19533. buffer DBREQ
  19534. External bus
  19535. Bus state DDTMODE Request controller
  19536. ID[1:0]
  19537. controller BAVL
  19538. TDACK DDTD
  19539. 48 bits
  19540. DMAOR: DMAC operation register id[1:0] TR DBREQ
  19541. SARn: DMAC source address
  19542. tdack
  19543. register
  19544. DARn: DMAC destination address register
  19545. DMATCRn: DMAC transfer count register
  19546. CHCRn: DMAC channel control register
  19547. (n: 0 to 3)
  19548.  
  19549. Figure 14.1 Block Diagram of DMAC
  19550.  
  19551. Rev. 2.0, 02/99, page 419 of 830
  19552.  
  19553. ----------------------- Page 434-----------------------
  19554.  
  19555. 14.1.3 Pin Configuration
  19556.  
  19557. Tables 14.1 and 14.2 show the DMAC pins.
  19558.  
  19559. Table 14.1 DMAC Pins
  19560.  
  19561. Channel Pin Name Abbreviation I/O Function
  19562.  
  19563. 0 DMA transfer '5(4 Input DMA transfer request input from
  19564. request external device to channel 0
  19565.  
  19566. '5(4 acceptance DRAK0 Output Acceptance of request for DMA
  19567. confirmation transfer from channel 0 to external
  19568. device
  19569.  
  19570. Notification to external device of start
  19571. of execution
  19572.  
  19573. DMA transfer end DACK0 Output Strobe output to external device of
  19574. notification DMA transfer request from channel 0
  19575. to external device
  19576.  
  19577. 1 DMA transfer '5(4 Input DMA transfer request input from
  19578. request external device to channel 1
  19579.  
  19580. '5(4 acceptance DRAK1 Output Acceptance of request for DMA
  19581. confirmation transfer from channel 1 to external
  19582. device
  19583.  
  19584. Notification to external device of start
  19585. of execution
  19586.  
  19587. DMA transfer end DACK1 Output Strobe output to external device of
  19588. notification DMA transfer request from channel 1
  19589. to external device
  19590.  
  19591. Rev. 2.0, 02/99, page 420 of 830
  19592.  
  19593. ----------------------- Page 435-----------------------
  19594.  
  19595. Table 14.2 DMAC Pins in DDT Mode
  19596.  
  19597. Pin Name Abbreviation I/O Function
  19598.  
  19599. Data bus request '%5(4 Input Data bus release request from external
  19600. ('5(4) device for DTR format input
  19601.  
  19602. Data bus available %$9/ Output Data bus release notification
  19603. (DRAK0) Data bus can be used 2 cycles after
  19604.  
  19605. %$9/ is asserted
  19606.  
  19607. Transfer request signal 75 Input If asserted 2 cycles after %$9/
  19608. ('5(4) assertion, DTR format is sent
  19609.  
  19610. Only 75 asserted: DMA request
  19611.  
  19612. '%5(4 and 75 asserted
  19613. simultaneously: Direct request to
  19614. channel 2
  19615.  
  19616. DMAC strobe 7'$&. Output Reply strobe signal for external device
  19617. (DACK0) from DMAC
  19618.  
  19619. Channel number ID [1:0] Output Notification of channel number to
  19620. notification (DRAK1, DACK1) external device at same time as 7'$&.
  19621. output
  19622.  
  19623. (ID [1] = DRAK1, ID [0] = DACK1)
  19624.  
  19625. 14.1.4 Register Configuration
  19626.  
  19627. Table 14.3 summarizes the DMAC registers. The DMAC has a total of 17 registers: four
  19628. registers are allocated to each channel, and an additional control register is shared by all four
  19629. channels.
  19630.  
  19631. Table 14.3 DMAC Registers
  19632.  
  19633. Chan- Abbre- Read/ Area 7 Access
  19634. nel Name viation Write Initial Value P4 Address Address Size
  19635. 0 DMA source SAR0 R/W*2 Undefined H'FFA00000 H'1FA00000 32
  19636.  
  19637. address register 0
  19638. DMA destination DAR0 R/W*2 Undefined H'FFA00004 H'1FA00004 32
  19639.  
  19640. address register 0
  19641. DMA transfer DMATCR0 R/W*2 Undefined H'FFA00008 H'1FA00008 32
  19642.  
  19643. count register 0
  19644.  
  19645. 1, 2
  19646. DMA channel CHCR0 R/W* * H'00000000 H'FFA0000C H'1FA0000C 32
  19647. control register 0
  19648.  
  19649. Rev. 2.0, 02/99, page 421 of 830
  19650.  
  19651. ----------------------- Page 436-----------------------
  19652.  
  19653. Table 14.3 DMAC Registers
  19654.  
  19655. Chan- Abbre- Read/ Area 7 Access
  19656. nel Name viation Write Initial Value P4 Address Address Size
  19657.  
  19658. 1 DMA source SAR1 R/W Undefined H'FFA00010 H'1FA00010 32
  19659. address register 1
  19660.  
  19661. DMA destination DAR1 R/W Undefined H'FFA00014 H'1FA00014 32
  19662. address register 1
  19663.  
  19664. DMA transfer DMATCR1 R/W Undefined H'FFA00018 H'1FA00018 32
  19665. count register 1
  19666. DMA channel CHCR1 R/W*1 H'00000000 H'FFA0001C H'1FA0001C 32
  19667.  
  19668. control register 1
  19669.  
  19670. 2 DMA source SAR2 R/W Undefined H'FFA00020 H'1FA00020 32
  19671. address register 2
  19672.  
  19673. DMA destination DAR2 R/W Undefined H'FFA00024 H'1FA00024 32
  19674. address register 2
  19675.  
  19676. DMA transfer DMATCR2 R/W Undefined H'FFA00028 H'1FA00028 32
  19677. count register 2
  19678. DMA channel CHCR2 R/W*1 H'00000000 H'FFA0002C H'1FA0002C 32
  19679.  
  19680. control register 2
  19681.  
  19682. 3 DMA source SAR3 R/W Undefined H'FFA00030 H'1FA00030 32
  19683. address register 3
  19684.  
  19685. DMA destination DAR3 R/W Undefined H'FFA00034 H'1FA00034 32
  19686. address register 3
  19687.  
  19688. DMA transfer DMATCR3 R/W Undefined H'FFA00038 H'1FA00038 32
  19689. count register 3
  19690. DMA channel CHCR3 R/W*1 H'00000000 H'FFA0003C H'1FA0003C 32
  19691.  
  19692. control register 3
  19693. Com- DMA operation DMAOR R/W*1 H'00000000 H'FFA00040 H'1FA00040 32
  19694.  
  19695. mon register
  19696.  
  19697. Notes: Longword access should be used for all control registers. If a different access width is
  19698. used, reads will return all 0s and writes will not be possible.
  19699. 1. Bit 1 of CHCR0–CHCR3 and bits 2 and 1 of DMAOR can only be written with 0 after
  19700. being read as 1, to clear the flags.
  19701. 2. In DDT mode, writes from the CPU are masked. Writes from external devices using
  19702. the DTR format are possible.
  19703.  
  19704. Rev. 2.0, 02/99, page 422 of 830
  19705.  
  19706. ----------------------- Page 437-----------------------
  19707.  
  19708. 14.2 Register Descriptions
  19709.  
  19710. 14.2.1 DMA Source Address Registers 0–3 (SAR0–SAR3)
  19711.  
  19712. Bit: 31 30 29 28 27 26 25 24
  19713.  
  19714. Initial value: — — — — — — — —
  19715.  
  19716. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19717.  
  19718. Bit: 23 0
  19719.  
  19720. · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
  19721.  
  19722. Initial value: — · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · —
  19723.  
  19724. R/W: R/W · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · R/W
  19725.  
  19726. DMA source address registers 0–3 (SAR0–SAR3) are 32-bit readable/writable registers that
  19727. specify the source address of a DMA transfer. These registers have a counter feedback function,
  19728. and during a DMA transfer they indicate the next source address. In single address mode, the
  19729. SAR value is ignored when a device with DACK has been specified as the transfer source.
  19730.  
  19731. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit,
  19732. 64-bit, or 32-byte data transfer, respectively. If a different address is specified, an address error
  19733. will be detected and the DMAC will halt.
  19734.  
  19735. The initial value of these registers after a power-on or manual reset is undefined. They retain
  19736. their values in standby mode and deep sleep mode.
  19737.  
  19738. When transfer is performed from memory to an external device in DDT mode, DTR format
  19739. [31:0] is set in SAR0 [31:0].
  19740.  
  19741. Rev. 2.0, 02/99, page 423 of 830
  19742.  
  19743. ----------------------- Page 438-----------------------
  19744.  
  19745. 14.2.2 DMA Destination Address Registers 0–3 (DAR0–DAR3)
  19746.  
  19747. Bit: 31 30 29 28 27 26 25 24
  19748.  
  19749. Initial value: — — — — — — — —
  19750.  
  19751. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19752.  
  19753. Bit: 23 0
  19754.  
  19755. · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
  19756.  
  19757. Initial value: — · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · —
  19758.  
  19759. R/W: R/W · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · R/W
  19760.  
  19761. DMA destination address registers 0–3 (DAR0–DAR3) are 32-bit readable/writable registers that
  19762. specify the destination address of a DMA transfer. These registers have a counter feedback
  19763. function, and during a DMA transfer they indicate the next destination address. In single address
  19764. mode, the DAR value is ignored when a device with DACK has been specified as the transfer
  19765. destination.
  19766.  
  19767. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit,
  19768. 64-bit, or 32-byte data transfer, respectively. If a different address is specified, an address error
  19769. will be detected and the DMAC will halt.
  19770.  
  19771. The initial value of these registers after a power-on or manual reset is undefined. They retain
  19772. their values in standby mode and deep sleep mode.
  19773.  
  19774. When transfer is performed from an external device to memory in DDT mode, DTR format
  19775. [31:0] is set in DAR0 [31:0].
  19776.  
  19777. Note: When a 16-bit, 32-bit, 64-bit, or 32-byte boundary address is specified, take care with
  19778. the setting of bit 0, bits 1–0, bits 2–0, or bits 4–0, respectively. If an address
  19779. specification that ignores boundary considerations is made, the DMAC will detect an
  19780. address error and halt operation on all channels (DMAOR: address error flag AE = 1).
  19781. The DMAC will also detect an address error and halt if an area 7 address is specified in
  19782. an external data bus transfer, or if the address of a nonexistent on-chip peripheral module
  19783. is specified.
  19784.  
  19785. Rev. 2.0, 02/99, page 424 of 830
  19786.  
  19787. ----------------------- Page 439-----------------------
  19788.  
  19789. 14.2.3 DMA Transfer Count Registers 0–3 (DMATCR0–DMATCR3)
  19790.  
  19791. Bit: 31 30 29 28 27 26 25 24
  19792.  
  19793. Initial value: 0 0 0 0 0 0 0 0
  19794.  
  19795. R/W: R R R R R R R R
  19796.  
  19797. Bit: 23 22 21 20 19 18 17 16
  19798.  
  19799. Initial value: — — — — — — — —
  19800.  
  19801. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19802.  
  19803. Bit: 15 14 13 12 11 10 9 8
  19804.  
  19805. Initial value: — — — — — — — —
  19806.  
  19807. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19808.  
  19809. Bit: 7 6 5 4 3 2 1 0
  19810.  
  19811. Initial value: — — — — — — — —
  19812.  
  19813. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19814.  
  19815. DMA transfer count registers 0–3 (DMATCR0–DMATCR3) are 32-bit readable/writable
  19816. registers that specify the transfer count for the corresponding channel (byte count, word count,
  19817. longword count, quadword count, or 32-byte count). Specifying H'000001 gives a transfer count
  19818. of 1, while H'000000 gives the maximum setting, 16,777,216 (16M) transfers. During DMAC
  19819. operation, the remaining number of transfers is shown.
  19820.  
  19821. Bits 31–24 of these registers are reserved; they are always read as 0, and should only be written
  19822. with 0.
  19823.  
  19824. The initial value of these registers after a power-on or manual reset is undefined. They retain
  19825. their values in standby mode and deep sleep mode.
  19826.  
  19827. In DDT mode, DTR format [55:48] is set in DMATCR0 [7:0]
  19828.  
  19829. Rev. 2.0, 02/99, page 425 of 830
  19830.  
  19831. ----------------------- Page 440-----------------------
  19832.  
  19833. 14.2.4 DMA Channel Control Registers 0–3 (CHCR0–CHCR3)
  19834.  
  19835. Bit: 31 30 29 28 27 26 25 24
  19836.  
  19837. SSA2 SSA1 SSA0 STC DSA2 DSA1 DSA0 DTC
  19838.  
  19839. Initial value: 0 0 0 0 0 0 0 0
  19840.  
  19841. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19842.  
  19843. Bit: 23 22 21 20 19 18 17 16
  19844.  
  19845. — — — — DS RL AM AL
  19846.  
  19847. Initial value: 0 0 0 0 — — — —
  19848.  
  19849. R/W: R R R R R/W (R/W) R/W (R/W)
  19850.  
  19851. Bit: 15 14 13 12 11 10 9 8
  19852.  
  19853. DM1 DM0 SM1 SM0 RS3 RS2 RS1 RS0
  19854.  
  19855. Initial value: 0 0 0 0 0 0 0 0
  19856.  
  19857. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19858.  
  19859. Bit: 7 6 5 4 3 2 1 0
  19860.  
  19861. TM TS2 TS1 TS0 — IE TE DE
  19862.  
  19863. Initial value: 0 0 0 0 0 0 0 0
  19864.  
  19865. R/W: R/W R/W R/W R/W R R/W R/(W) R/W
  19866.  
  19867. Note: The TE bit can only be written with 0 after being read as 1, to clear the flag.
  19868. The RL, AM, AL, and DS bits may be absent, depending on the channel.
  19869.  
  19870. DMA channel control registers 0–3 (CHCR0–CHCR3) are 32-bit readable/writable registers that
  19871. specify the operating mode, transfer method, etc., for each channel. Bits 31–28 and 27–24
  19872. indicate the source address and destination address, respectively; these settings are only valid
  19873. when the transfer involves the CS5 or CS6 space and the relevant space has been specified as a
  19874. PCMCIA interface space. In other cases, these bits should be cleared to 0. For details of the
  19875. PCMCIA interface, see section 13.3.7, PCMCIA Interface, in section 13, Bus State Controller
  19876. (BSC).
  19877.  
  19878. In DDT mode, CHCR0 is set according to the DTR format. (The following settings are fixed:
  19879. CHCR0 [31:24] = 0, [18:16] = 0, [2] = 0, [1] = 0, [0] = 1)
  19880.  
  19881. Bits 18 and 16 are not present in CHCR2 and CHCR3. In CHCR2 and CHCR3, these bits cannot
  19882. be modified (a write value of 0 should always be used) and are always read as 0.
  19883.  
  19884. These registers are initialized to H'00000000 by a power-on or manual reset. They retain their
  19885. values in standby mode and deep sleep mode.
  19886.  
  19887. Rev. 2.0, 02/99, page 426 of 830
  19888.  
  19889. ----------------------- Page 441-----------------------
  19890.  
  19891. Bits 31 to 29—Source Address Space Attribute Specification (SSA2–SSA0): These bits
  19892. specify the space attribute for PCMCIA access. These bits are only valid in the case of page
  19893. mapping to PCMCIA connected to areas 5 and 6.
  19894.  
  19895. Bit 31: SSA2 Bit 30: SSA1 Bit 29: SSA0 Description
  19896.  
  19897. 0 0 0 Reserved in PCMCIA access (Initial value)
  19898.  
  19899. 1 Dynamic bus sizing I/O space
  19900.  
  19901. 1 0 8-bit I/O space
  19902.  
  19903. 1 16-bit I/O space
  19904.  
  19905. 1 0 0 8-bit common memory space
  19906.  
  19907. 1 16-bit common memory space
  19908.  
  19909. 1 0 8-bit attribute memory space
  19910.  
  19911. 1 16-bit attribute memory space
  19912.  
  19913. Bit 28—Source Address Wait Control Select (STC): Specifies CS5 or CS6 space wait control
  19914. for PCMCIA access. This bit selects the wait control register in the BSC that performs area 5
  19915. and 6 wait cycle control.
  19916.  
  19917. Bit 28: STC Description
  19918.  
  19919. 0 C5 space wait cycle selection (Initial value)
  19920.  
  19921. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  19922. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  19923. PCMCIA control register (PCR), are selected
  19924.  
  19925. 1 C6 space wait cycle selection
  19926.  
  19927. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  19928. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  19929. PCMCIA control register (PCR), are selected
  19930.  
  19931. Note: For details, see section 13.3.7, PCMCIA Interface.
  19932.  
  19933. Rev. 2.0, 02/99, page 427 of 830
  19934.  
  19935. ----------------------- Page 442-----------------------
  19936.  
  19937. Bits 27 to 25—Destination Address Space Attribute Specification (DSA2–DSA0): These bits
  19938. specify the space attribute for PCMCIA access. These bits are only valid in the case of page
  19939. mapping to PCMCIA connected to areas 5 and 6.
  19940.  
  19941. Bit 27: DSA2 Bit 26: DSA1 Bit 25: DSA0 Description
  19942.  
  19943. 0 0 0 Reserved in PCMCIA access (Initial value)
  19944.  
  19945. 1 Dynamic bus sizing I/O space
  19946.  
  19947. 1 0 8-bit I/O space
  19948.  
  19949. 1 16-bit I/O space
  19950.  
  19951. 1 0 0 8-bit common memory space
  19952.  
  19953. 1 16-bit common memory space
  19954.  
  19955. 1 0 8-bit attribute memory space
  19956.  
  19957. 1 16-bit attribute memory space
  19958.  
  19959. Bit 24—Destination Address Wait Control Select (DTC): Specifies CS5 or CS6 space wait
  19960. cycle control for PCMCIA access. This bit selects the wait control register in the BSC that
  19961. performs area 5 and 6 wait cycle control.
  19962.  
  19963. Bit 24: DTC Description
  19964.  
  19965. 0 C5 space wait cycle selection (Initial value)
  19966.  
  19967. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  19968. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  19969. PCMCIA control register (PCR), are selected
  19970.  
  19971. 1 C6 space wait cycle selection
  19972.  
  19973. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  19974. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  19975. PCMCIA control register (PCR), are selected
  19976.  
  19977. Note: For details, see section 13.3.7, PCMCIA Interface.
  19978.  
  19979. Bits 23 to 20—Reserved: These bits are always read as 0, and should only be written with 0.
  19980.  
  19981. Bit 19—'5(4 Select (DS): Specifies either low level detection or falling edge detection as the
  19982. '5(4
  19983. sampling method for the '5(4 pin used in external request mode.
  19984.  
  19985. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  19986. CHCR0–CHCR3.
  19987.  
  19988. Bit 19: DS Description
  19989.  
  19990. 0 Low level detection (Initial value)
  19991.  
  19992. 1 Falling edge detection
  19993.  
  19994. Rev. 2.0, 02/99, page 428 of 830
  19995.  
  19996. ----------------------- Page 443-----------------------
  19997.  
  19998. Bit 18—Request Check Level (RL): Selects whether the DRAK signal (that notifies an external
  19999. device of the acceptance of '5(4) is an active-high or active-low output.
  20000.  
  20001. This bit is valid only in CHCR0 and CHCR1.
  20002.  
  20003. Bit 18: RL Description
  20004.  
  20005. 0 DRAK is an active-high output (Initial value)
  20006.  
  20007. 1 DRAK is an active-low output
  20008.  
  20009. Bit 17—Acknowledge Mode (AM): In dual address mode, selects whether DACK is output in
  20010. the data read cycle or write cycle. In single address mode, DACK is always output regardless of
  20011. the setting of this bit.
  20012.  
  20013. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  20014. CHCR1–CHCR3.
  20015.  
  20016. Bit 17: AM Description
  20017.  
  20018. 0 DACK is output in read cycle (Initial value)
  20019.  
  20020. 1 DACK is output in write cycle
  20021.  
  20022. Bit 16—Acknowledge Level (AL): Specifies the DACK (acknowledge) signal as active-high or
  20023. active-low.
  20024.  
  20025. This bit is valid only in CHCR0 and CHCR1.
  20026.  
  20027. Bit 16: AL Description
  20028.  
  20029. 0 Active-high output (Initial value)
  20030.  
  20031. 1 Active-low output
  20032.  
  20033. Rev. 2.0, 02/99, page 429 of 830
  20034.  
  20035. ----------------------- Page 444-----------------------
  20036.  
  20037. Bits 15 and 14—Destination Address Mode 1 and 0 (DM1, DM0): These bits specify
  20038. incrementing/decrementing of the DMA transfer destination address. The specification of these
  20039. bits is ignored when data is transferred from external memory to an external device in single
  20040. address mode. For channel 0, in DDT mode, the settings are fixed at DM1 = 0 and DM0 = 1.
  20041.  
  20042. Bit 15: DM1 Bit 14: DM0 Description
  20043.  
  20044. 0 0 Destination address fixed (Initial value)
  20045.  
  20046. 1 Destination address incremented (+1 in 8-bit transfer, +2 in 16-
  20047. bit transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in
  20048. 32-byte burst transfer)
  20049.  
  20050. 1 0 Destination address decremented (–1 in 8-bit transfer, –2 in
  20051. 16-bit transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in
  20052. 32-byte burst transfer)
  20053.  
  20054. 1 Setting prohibited
  20055.  
  20056. Bits 13 and 12—Source Address Mode 1 and 0 (SM1, SM0): These bits specify
  20057. incrementing/decrementing of the DMA transfer source address. The specification of these bits
  20058. is ignored when data is transferred from an external device to external memory in single address
  20059. mode. For channel 0, in DDT mode the settings are fixed at SM1 = 0 and SM0 = 1.
  20060.  
  20061. Bit 13: SM1 Bit 12: SM0 Description
  20062.  
  20063. 0 0 Source address fixed (Initial value)
  20064.  
  20065. 1 Source address incremented (+1 in 8-bit transfer, +2 in 16-bit
  20066. transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in 32-
  20067. byte burst transfer)
  20068.  
  20069. 1 0 Source address decremented (–1 in 8-bit transfer, –2 in 16-bit
  20070. transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in 32-
  20071. byte burst transfer)
  20072.  
  20073. 1 Setting prohibited
  20074.  
  20075. Rev. 2.0, 02/99, page 430 of 830
  20076.  
  20077. ----------------------- Page 445-----------------------
  20078.  
  20079. Bits 11 to 8—Resource Select 3 to 0 (RS3–RS0): These bits specify the transfer request source.
  20080.  
  20081. Bit 11: Bit 10: Bit 9: Bit 8:
  20082. RS3 RS2 RS1 RS0 Description
  20083. 0 0 0 0 External request, dual address mode*1 (external address
  20084.  
  20085. space → external address space) (Initial value)
  20086.  
  20087. 1 Setting prohibited
  20088.  
  20089. 1 0 External request, single address mode
  20090.  
  20091. 1, 3, 4
  20092. External address space → external device* * *
  20093.  
  20094. 1 External request, single address mode
  20095.  
  20096. 1, 3, 4
  20097. External device → external address space* * *
  20098.  
  20099. 1 0 0 Auto-request (external address space → external address
  20100. space)*2
  20101.  
  20102. 1 Auto-request (external address space → on-chip peripheral
  20103. module)*2
  20104.  
  20105. 1 0 Auto-request (on-chip peripheral module → external address
  20106. space)*2
  20107.  
  20108. 1 Setting prohibited
  20109.  
  20110. 1 0 0 0 SCI transmit-data-empty interrupt transfer request
  20111. (external address space → SCTDR1)*2
  20112.  
  20113. 1 SCI receive-data-full interrupt transfer request
  20114. (SCRDR1 → external address space)*2
  20115.  
  20116. 1 0 SCIF transmit-data-empty interrupt transfer request
  20117. (external address space → SCFTDR2)*2
  20118.  
  20119. 1 SCIF receive-data-full interrupt transfer request
  20120. (SCFRDR2 → external address space)*2
  20121.  
  20122. 1 0 0 TMU channel 2 (input capture interrupt, external address
  20123. space → external address space)*2
  20124.  
  20125. 1 TMU channel 2 (input capture interrupt)
  20126. (external address space → on-chip peripheral module)*2
  20127.  
  20128. 1 0 TMU channel 2 (input capture interrupt)
  20129. (on-chip peripheral module → external address space)*2
  20130.  
  20131. 1 Setting prohibited
  20132.  
  20133. Notes: 1. External request specifications are valid only for channels 0 and 1. Requests are not
  20134. accepted for channels 2 and 3 in normal DMA mode.
  20135. 2. Dual address mode
  20136. 3. In DDT mode, selection is possible with the DTR format [60] (R/W bit) specification for
  20137. channel 0 only.
  20138. 4. In DDT mode, an external request specification should be made for channels 1, 2, and
  20139. 3. Only DTR format setting is possible for channel 0.
  20140.  
  20141. Rev. 2.0, 02/99, page 431 of 830
  20142.  
  20143. ----------------------- Page 446-----------------------
  20144.  
  20145. Bit 7—Transmit Mode (TM): Specifies the bus mode for transfer.
  20146.  
  20147. Bit 7: TM Description
  20148.  
  20149. 0 Cycle steal mode (Initial value)
  20150.  
  20151. 1 Burst mode
  20152.  
  20153. Setting possible with DTR format [57:55] (MD bits)
  20154.  
  20155. Bits 6 to 4—Transmit Size 2 to 0 (TS2–TS0): These bits specify the transfer data size.
  20156.  
  20157. Bit 6: TS2 Bit 5: TS1 Bit 4: TS0 Description
  20158.  
  20159. 0 0 0 Quadword size (64-bit) specification(Initial value)
  20160.  
  20161. 1 Byte size (8-bit) specification
  20162.  
  20163. 1 0 Word size (16-bit) specification
  20164.  
  20165. 1 Longword size (32-bit) specification
  20166.  
  20167. 1 0 0 32-byte block transfer specification
  20168.  
  20169. Setting possible with DTR format [63:61] (SZ bits)
  20170.  
  20171. Bit 3—Reserved: This bit is always read as 0, and should only be written with 0.
  20172.  
  20173. Bit 2—Interrupt Enable (IE): When this bit is set to 1, an interrupt request (DMTE) is
  20174. generated after the number of data transfers specified in DMATCR (when TE = 1).
  20175.  
  20176. Bit 2: IE Description
  20177.  
  20178. 0 Interrupt request not generated after number of transfers specified in
  20179. DMATCR (Initial value) (CHCR0 only fixed in DDT mode)
  20180.  
  20181. 1 Interrupt request generated after number of transfers specified in DMATCR
  20182.  
  20183. Rev. 2.0, 02/99, page 432 of 830
  20184.  
  20185. ----------------------- Page 447-----------------------
  20186.  
  20187. Bit 1—Transfer End (TE): This bit is set to 1 after the number of transfers specified in
  20188. DMATCR. If the IE bit is set to 1 at this time, an interrupt request (DMTE) is generated.
  20189.  
  20190. If data transfer ends before TE is set to 1 (for example, due to an NMI interrupt, address error, or
  20191. clearing of the DE bit or the DME bit in DMAOR), the TE bit is not set to 1. When this bit is 1,
  20192. the transfer enabled state is not entered even if the DE bit is set to 1.
  20193.  
  20194. Bit 1: TE Description
  20195.  
  20196. 0 Number of transfers specified in DMATCR not completed (Initial value)
  20197.  
  20198. [Clearing conditions]
  20199.  
  20200. • When 0 is written to TE after reading TE = 1
  20201.  
  20202. •• In a power-on or manual reset, and in standby mode
  20203.  
  20204. 1 Number of transfers specified in DMATCR completed
  20205.  
  20206. Bit 0—DMAC Enable (DE): Enables operation of the corresponding channel.
  20207.  
  20208. Bit 0: DE Description
  20209.  
  20210. 0 Operation of corresponding channel is disabled (Initial value)
  20211.  
  20212. 1 Operation of corresponding channel is enabled
  20213.  
  20214. When auto-request is specified (with RS3–RS0), transfer is begun when this bit is set to 1. In the
  20215. case of an external request or on-chip peripheral module request, transfer is begun when a
  20216. transfer request is issued after this bit is set to 1. Transfer can be suspended midway by clearing
  20217. this bit to 0.
  20218.  
  20219. Even if the DE bit has been set, transfer is not enabled when TE is 1, when DME in DMAOR is
  20220. 0, or when the NMIF or AE bit in DMAOR is 1.
  20221.  
  20222. For channel 0, in DDT mode this bit is set to 1 when a DTR format is received. DE remains set
  20223. to 1 even if TE is set to 1. When the mode is switched from DDT mode to normal DMA mode
  20224. (DDT bit = 0 in DMAOR), the DE bit must be cleared to 0.
  20225.  
  20226. Rev. 2.0, 02/99, page 433 of 830
  20227.  
  20228. ----------------------- Page 448-----------------------
  20229.  
  20230. 14.2.5 DMA Operation Register (DMAOR)
  20231.  
  20232. Bit: 31 30 29 28 27 26 25 24
  20233.  
  20234. — — — — — — — —
  20235.  
  20236. Initial value: 0 0 0 0 0 0 0 0
  20237.  
  20238. R/W: R R R R R R R R
  20239.  
  20240. Bit: 23 22 21 20 19 18 17 16
  20241.  
  20242. — — — — — — — —
  20243.  
  20244. Initial value: 0 0 0 0 0 0 0 0
  20245.  
  20246. R/W: R R R R R R R R
  20247.  
  20248. Bit: 15 14 13 12 11 10 9 8
  20249.  
  20250. DDT — — — — — PR1 PR0
  20251.  
  20252. Initial value: 0 0 0 0 0 0 0 0
  20253.  
  20254. R/W: R/W R R R R R R/W R/W
  20255.  
  20256. Bit: 7 6 5 4 3 2 1 0
  20257.  
  20258. — — — — — AE NMIF DME
  20259.  
  20260. Initial value: 0 0 0 0 0 0 0 0
  20261.  
  20262. R/W: R R R R R R/(W) R/(W) R/W
  20263.  
  20264. Note: The AE and NMIF bits can only be written with 0 after being read as 1, to clear the flags.
  20265.  
  20266. DMAOR is a 32-bit readable/writable register that specifies the DMAC transfer mode.
  20267.  
  20268. DMAOR is initialized to H'00000000 by a power-on or manual reset. They retain their values in
  20269. standby mode and deep sleep mode.
  20270.  
  20271. Bits 31 to 16—Reserved: These bits are always read as 0, and should only be written with 0.
  20272.  
  20273. Bit 15—On-Demand Data Transfer (DDT): Specifies on-demand data transfer mode. When
  20274. the DDT bit is set to 1, CPU writes to SAR0, DAR0, DMATCR0, and CHCR0 are masked.
  20275.  
  20276. Bit 15: DDT Description
  20277.  
  20278. 0 Normal DMA mode (Initial value)
  20279.  
  20280. 1 On-demand data transfer mode
  20281.  
  20282. Note: %$9/ (DRAK0) is an active-high output in normal DMA mode. When the DDT bit is set to
  20283. 1, the %$9/ pin function is enabled and this pin becomes an active-low output.
  20284.  
  20285. Rev. 2.0, 02/99, page 434 of 830
  20286.  
  20287. ----------------------- Page 449-----------------------
  20288.  
  20289. Bits 14 to 10—Reserved: These bits are always read as 0, and should only be written with 0.
  20290.  
  20291. Bits 9 and 8—Priority Mode 1 and 0 (PR1, PR0): These bits determine the order of priority
  20292. for channel execution when transfer requests are made for a number of channels simultaneously.
  20293.  
  20294. Bit 9: PR1 Bit 8: PR0 Description
  20295.  
  20296. 0 0 CH0 > CH1 > CH2 > CH3 (Initial value)
  20297.  
  20298. 1 CH0 > CH2 > CH3 > CH1
  20299.  
  20300. 1 0 CH2 > CH0 > CH1 > CH3
  20301.  
  20302. 1 Round robin mode
  20303.  
  20304. Bits 7 to 3—Reserved: These bits are always read as 0, and should only be written with 0.
  20305.  
  20306. Bit 2—Address Error Flag (AE): Indicates that an address error has occurred during DMA
  20307. transfer. If this bit is set during data transfer, transfers on all channels are suspended, and an
  20308. interrupt request (DMAE) is generated. The CPU cannot write 1 to AE. This bit can only be
  20309. cleared by writing 0 after reading 1.
  20310.  
  20311. Bit 2: AE Description
  20312.  
  20313. 0 No address error, DMA transfer enabled (Initial value)
  20314.  
  20315. [Clearing condition]
  20316. When 0 is written to AE after reading AE = 1
  20317.  
  20318. 1 Address error, DMA transfer disabled
  20319.  
  20320. [Setting condition]
  20321. When an address error is caused by the DMAC
  20322.  
  20323. Bit 1—NMI Flag (NMIF): Indicates that NMI has been input. This bit is set regardless of
  20324. whether or not the DMAC is operating. If this bit is set during data transfer, transfers on all
  20325. channels are suspended. The CPU cannot write 1 to NMIF. This bit can only be cleared by
  20326. writing 0 after reading 1.
  20327.  
  20328. Bit 1: NMIF Description
  20329.  
  20330. 0 No NMI input, DMA transfer enabled (Initial value)
  20331.  
  20332. [Clearing condition]
  20333. When 0 is written to NMIF after reading NMIF = 1
  20334.  
  20335. 1 NMI input, DMA transfer disabled
  20336.  
  20337. [Setting condition]
  20338. When an NMI interrupt is generated
  20339.  
  20340. Rev. 2.0, 02/99, page 435 of 830
  20341.  
  20342. ----------------------- Page 450-----------------------
  20343.  
  20344. Bit 0—DMAC Master Enable (DME): Enables activation of the entire DMAC. When the
  20345. DME bit and the DE bit of the CHCR register for the corresponding channel are set to 1, that
  20346. channel is enabled for transfer. If this bit is cleared during data transfer, transfers on all channels
  20347. are suspended.
  20348.  
  20349. Even if the DME bit has been set, transfer is not enabled when TE is 1 or DE is 0 in CHCR, or
  20350. when the NMI or AE bit in DMAOR is 1.
  20351.  
  20352. Bit 0: DME Description
  20353.  
  20354. 0 Operation disabled on all channels (Initial value)
  20355.  
  20356. 1 Operation enabled on all channels
  20357.  
  20358. 14.3 Operation
  20359.  
  20360. When a DMA transfer request is issued, the DMAC starts the transfer according to the
  20361. predetermined channel priority order. It ends the transfer when the transfer end conditions are
  20362. satisfied. Transfers can be requested in three modes: auto-request, external request, and on-chip
  20363. peripheral module request. There are two modes for DMA transfer: single address mode and
  20364. dual address mode. Either burst mode or cycle steal mode can be selected as the bus mode.
  20365.  
  20366. 14.3.1 DMA Transfer Procedure
  20367.  
  20368. After the desired transfer conditions have been set in the DMA source address register (SAR),
  20369. DMA destination address register (DAR), DMA transfer count register (DMATCR), DMA
  20370. channel control register (CHCR), and DMA operation register (DMAOR), the DMAC transfers
  20371. data according to the following procedure:
  20372.  
  20373. 1. The DMAC checks to see if transfer is enabled (DE = 1, DME = 1, TE = 0, NMIF = 0, AE =
  20374. 0).
  20375. 2. When a transfer request is issued and transfer has been enabled, the DMAC transfers one
  20376. transfer unit of data (determined by the setting of TS2–TS0). In auto-request mode, the
  20377. transfer begins automatically when the DE bit and DME bit are set to 1. The DMATCR
  20378. value is decremented by 1 for each transfer. The actual transfer flow depends on the address
  20379. mode and bus mode.
  20380. 3. When the specified number of transfers have been completed (when the DMATCR value
  20381. reaches 0), the transfer ends normally. If the IE bit in CHCR is set to 1 at this time, a DMTE
  20382. interrupt request is sent to the CPU.
  20383. 4. If a DMAC address error or NMI interrupt occurs, the transfer is suspended. Transfer is also
  20384. suspended when the DE bit in CHCR or the DME bit in DMAOR is cleared to 0. In the event
  20385. of an address error, a DMAE interrupt request is forcibly sent to the CPU.
  20386.  
  20387. Rev. 2.0, 02/99, page 436 of 830
  20388.  
  20389. ----------------------- Page 451-----------------------
  20390.  
  20391. Figure 14.2 shows a flowchart of this procedure.
  20392.  
  20393. Start
  20394.  
  20395. Initial settings
  20396. (SAR, DAR, DMATCR,
  20397. CHCR, DMAOR)
  20398.  
  20399. No
  20400. DE, DME = 1?
  20401.  
  20402. Yes
  20403. Illegal address check *4
  20404. (reflected in AE bit)
  20405.  
  20406. No
  20407. NMIF, AE, TE = 0?
  20408.  
  20409. Yes
  20410. *2
  20411.  
  20412. Transfer No
  20413. request issued?
  20414. *1 Bus mode,
  20415. *3
  20416. Yes transfer request mode,
  20417. DREQ detection
  20418. method
  20419. Transfer (1 transfer unit)
  20420. DMATCR - 1 → DMATCR
  20421. Update SAR, DAR
  20422.  
  20423. No No NMIF or No
  20424. DMATCR = 0? AE = 1 or DE = 0 or
  20425.  
  20426. DME = 0?
  20427. Yes
  20428. Yes
  20429. DMTE interrupt request
  20430. Transfer suspended
  20431. (when IE = 1)
  20432.  
  20433. NMIF or
  20434. No
  20435. AE = 1 or DE = 0 or
  20436. DME = 0?
  20437.  
  20438. Yes
  20439.  
  20440. End of transfer Normal end
  20441.  
  20442. Notes: 1. In auto-request mode, transfer begins when the NMIF, AE, and TE bits are all 0, and the DE
  20443. and DME bits are set to 1.
  20444. 2. DREQ level detection (external request) in burst mode, or cycle steal mode.
  20445. 3. DREQ edge detection (external request) in burst mode, or auto-request mode in burst mode.
  20446. 4. An illegal address is detected by comparing bits TS2–TS0 in CHCRn with SARn and DARn.
  20447.  
  20448. Figure 14.2 DMAC Transfer Flowchart
  20449.  
  20450. Rev. 2.0, 02/99, page 437 of 830
  20451.  
  20452. ----------------------- Page 452-----------------------
  20453.  
  20454. 14.3.2 DMA Transfer Requests
  20455.  
  20456. DMA transfer requests are basically generated at either the data transfer source or destination,
  20457. but they can also be issued by external devices or on-chip peripheral modules that are neither the
  20458. source nor the destination.
  20459.  
  20460. Transfers can be requested in three modes: auto-request, external request, and on-chip peripheral
  20461. module request. The transfer request mode is selected by means of bits RS3–RS0 in DMA
  20462. channel control registers 0–3 (CHCR0–CHCR3).
  20463.  
  20464. Auto Request Mode: When there is no transfer request signal from an external source, as in a
  20465. memory-to-memory transfer or a transfer between memory and an on-chip peripheral module
  20466. unable to request a transfer, the auto-request mode allows the DMAC to automatically generate
  20467. a transfer request signal internally. When the DE bit in CHCR0–CHCR3 and the DME bit in the
  20468. DMA operation register (DMAOR) are set to 1, the transfer begins (so long as the TE bit in
  20469. CHCR0–CHCR3 and the NMIF and AE bits in DMAOR are all 0).
  20470.  
  20471. External Request Mode: In this mode a transfer is performed in response to a transfer request
  20472. signal ('5(4) from an external device. One of the modes shown in table 14.4 should be chosen
  20473. according to the application system. If DMA transfer is enabled (DE = 1, DME = 1, TE = 0,
  20474. NMIF = 0, AE = 0), transfer starts when '5(4 is input. The DS bit in CHCR0/CHCR1 is used
  20475. to select either falling edge detection or low level detection for the '5(4 signal (level detection
  20476. when DS = 0, edge detection when DS = 1).
  20477.  
  20478. The source of the transfer request does not have to be the data transfer source or destination.
  20479.  
  20480. Table 14.4 Selecting External Request Mode with RS Bits
  20481.  
  20482. RS3 RS2 RS1 RS0 Address Mode Transfer Source Transfer Destination
  20483.  
  20484. 0 0 0 0 Dual address External memory External memory
  20485. mode or memory-mapped or memory-mapped
  20486. external device external device
  20487.  
  20488. 1 0 Single address External memory External device
  20489. mode or memory-mapped with DACK
  20490. external device
  20491.  
  20492. 1 Single address External device with External memory
  20493. mode DACK or memory-mapped
  20494. external device
  20495.  
  20496. Rev. 2.0, 02/99, page 438 of 830
  20497.  
  20498. ----------------------- Page 453-----------------------
  20499.  
  20500. On-Chip Peripheral Module Request Mode: In this mode a transfer is performed in response
  20501. to a transfer request signal (interrupt request signal) from an on-chip peripheral module. As
  20502. shown in table 14.5, there are seven transfer request signals: input capture interrupts from the
  20503. timer unit (TMU), and receive-data-full interrupts (RXI) and transmit-data-empty interrupts
  20504. (TXI) from the two serial communication interfaces (SCI, SCIF). If DMA transfer is enabled
  20505. (DE = 1, DME = 1, TE = 0, NMIF = 0, AE = 0), transfer starts when a transfer request signal is
  20506. input.
  20507.  
  20508. The source of the transfer request does not have to be the data transfer source or destination.
  20509. However, when the transfer request is set to RXI (transfer request by SCI/SCIF receive-data-full
  20510. interrupt), the transfer source must be the SCI/SCIF’s receive data register
  20511. (SCRDR1/SCFRDR2). When the transfer request is set to TXI (transfer request by SCI/SCIF
  20512. transmit-data-empty interrupt), the transfer destination must be the SCI/SCIF’s transmit data
  20513. register (SCTDR1/SCFTDR2).
  20514.  
  20515. Rev. 2.0, 02/99, page 439 of 830
  20516.  
  20517. ----------------------- Page 454-----------------------
  20518.  
  20519. Table 14.5 Selecting On-Chip Peripheral Module Request Mode with RS Bits
  20520.  
  20521. DMAC Transfer DMAC Transfer Transfer Transfer
  20522. RS3 RS2 RS1 RS0 Request Source Request Signal Source Destination Bus Mode
  20523.  
  20524. 1 0 0 0 SCI transmitter SCTDR1 (SCI External* SCTDR1 Cycle steal
  20525. transmit-data- mode
  20526. empty transfer
  20527. request)
  20528.  
  20529. 1 SCI receiver SCRDR1 (SCI SCRDR1 External* Cycle steal
  20530. receive-data-full mode
  20531. transfer request)
  20532.  
  20533. 1 0 SCIF transmitter SCFTDR2 (SCIF External* SCFTDR2 Cycle steal
  20534. transmit-data- mode
  20535. empty transfer
  20536. request)
  20537.  
  20538. 1 SCIF receiver SCFRDR2 (SCIF SCFRDR2 External* Cycle steal
  20539. receive-data-full mode
  20540. transfer request)
  20541.  
  20542. 1 0 0 TMU channel 2 Input capture External* External* Burst/cycle
  20543. occurrence steal mode
  20544.  
  20545. 1 TMU channel 2 Input capture External* On-chip Burst/cycle
  20546. occurrence peripheral steal mode
  20547.  
  20548. 1 0 TMU channel 2 Input capture On-chip External* Burst/cycle
  20549. occurrence peripheral steal mode
  20550.  
  20551. TMU: Timer unit
  20552. SCI: Serial communication interface
  20553. SCIF: Serial communication interface with FIFO
  20554. Note: * External memory or memory-mapped external device
  20555. Note: SCI/SCIF burst transfer setting is prohibited.
  20556.  
  20557. To output a transfer request from an on-chip peripheral module, set the DMA transfer request
  20558. enable bit for that module and output a transfer request signal.
  20559.  
  20560. For details, see sections 12, Timer Unit (TMU), 15, Serial Communication Interface (SCI), and
  20561. 16, Serial Communication Interface with FIFO (SCIF).
  20562.  
  20563. When a DMA transfer corresponding to a transfer request signal from an on-chip peripheral
  20564. module shown in table 14.5 is carried out, the signal is discontinued automatically. This occurs
  20565. every transfer in cycle steal mode, and in the last transfer in burst mode.
  20566.  
  20567. Rev. 2.0, 02/99, page 440 of 830
  20568.  
  20569. ----------------------- Page 455-----------------------
  20570.  
  20571. 14.3.3 Channel Priorities
  20572.  
  20573. If the DMAC receives simultaneous transfer requests on two or more channels, it selects a
  20574. channel according to a predetermined priority system, either in a fixed mode or round robin
  20575. mode. The mode is selected with priority bits PR1 and PR0 in the DMA operation register
  20576. (DMAOR).
  20577.  
  20578. Fixed Mode: In this mode, the relative channel priorities remain fixed. The following priority
  20579. orders are available in fixed mode:
  20580.  
  20581. • CH0 > CH1 > CH2 > CH3
  20582. • CH0 > CH2 > CH3 > CH1
  20583. • CH2 > CH0 > CH1 > CH3
  20584.  
  20585. The priority order is selected with bits PR1 and PR0 in DMAOR.
  20586.  
  20587. Round Robin Mode: In round robin mode, each time the transfer of one transfer unit (byte,
  20588. word, longword, quadword, or 32 bytes) ends on a given channel, that channel is assigned the
  20589. lowest priority level. This is illustrated in figure 14.3. The order of priority in round robin mode
  20590. immediately after a reset is CH0 > CH1 > CH2 > CH3.
  20591.  
  20592. Note: In round robin mode, if no transfer request is accepted for any channel during DMA
  20593. transfer, the priority order becomes CH0 > CH1 > CH2 > CH3.
  20594.  
  20595. Rev. 2.0, 02/99, page 441 of 830
  20596.  
  20597. ----------------------- Page 456-----------------------
  20598.  
  20599. Transfer on channel 0
  20600.  
  20601. Initial priority order CH0 > CH1 > CH2 > CH3 Channel 0 is given the lowest
  20602. priority.
  20603.  
  20604. Priority order after transfer CH1 > CH2 > CH3 > CH0
  20605.  
  20606. Transfer on channel 1
  20607.  
  20608. Initial priority order CH0 > CH1 > CH2 > CH3 When channel 1 is given the
  20609. lowest priority, the priority of
  20610. channel 0, which was higher
  20611. than channel 1, is also
  20612. Priority order after transfer CH2 > CH3 > CH0 > CH1 shifted simultaneously.
  20613.  
  20614. Transfer on channel 2
  20615. When channel 2 is given the
  20616. Initial priority order CH0 > CH1 > CH2 > CH3 lowest priority, the priorities of
  20617.  
  20618. channels 0 and 1, which were
  20619. higher than channel 2, are
  20620. also shifted simultaneously. If
  20621. there is a transfer request for
  20622. channel 1 only immediately
  20623. Priority order after transfer CH3 > CH0 > CH1 > CH2
  20624. afterward, channel 1 is given
  20625. the lowest priority and the
  20626. priorities of channels 3 and 0
  20627. are simultaneously shifted
  20628. down.
  20629. Priority after transfer due to
  20630. issuance of a transfer request CH2 > CH3 > CH0 > CH1
  20631. for channel 1 only.
  20632.  
  20633. Transfer on channel 3
  20634.  
  20635. Initial priority order CH0 > CH1 > CH2 > CH3 No change in priority order
  20636.  
  20637. Priority order after transfer CH0 > CH1 > CH2 > CH3
  20638.  
  20639. Figure 14.3 Round Robin Mode
  20640.  
  20641. Figure 14.4 shows the changes in priority levels when transfer requests are issued simultaneously
  20642. for channels 0 and 3, and channel 1 receives a transfer request during a transfer on channel 0.
  20643. The operation of the DMAC in this case is as follows.
  20644.  
  20645. Rev. 2.0, 02/99, page 442 of 830
  20646.  
  20647. ----------------------- Page 457-----------------------
  20648.  
  20649. 1. Transfer requests are issued simultaneously for channels 0 and 3.
  20650. 2. Since channel 0 has a higher priority level than channel 3, the channel 0 transfer is executed
  20651. first (channel 3 is on transfer standby).
  20652. 3. A transfer request is issued for channel 1 during the channel 0 transfer (channels 1 and 3 are
  20653. on transfer standby).
  20654. 4. At the end of the channel 0 transfer, channel 0 shifts to the lowest priority level.
  20655. 5. At this point, channel 1 has a higher priority level than channel 3, so the channel 1 transfer is
  20656. started (channel 3 is on transfer standby).
  20657. 6. At the end of the channel 1 transfer, channel 1 shifts to the lowest priority level.
  20658. 7. The channel 3 transfer is started.
  20659. 8. At the end of the channel 3 transfer, the channel 3 and channel 2 priority levels are lowered,
  20660. giving channel 3 the lowest priority.
  20661.  
  20662. Transfer request Channel DMAC operation Channel priority
  20663. waiting order
  20664. 1. Issued for channels 0
  20665. and 3
  20666. 2. Start of channel 0 0 > 1 > 2 > 3
  20667. transfer
  20668. 3. Issued for channel 1 3
  20669.  
  20670. Change of
  20671. priority order
  20672. 4. End of channel 0 1 > 2 > 3 > 0
  20673. 1, 3
  20674. transfer
  20675.  
  20676. 5. Start of channel 1
  20677. transfer
  20678.  
  20679. Change of
  20680. priority order
  20681. 3 6. End of channel 1 2 > 3 > 0 > 1
  20682. transfer
  20683.  
  20684. 7. Start of channel 3
  20685. transfer
  20686.  
  20687. None
  20688.  
  20689. Change of
  20690. priority order
  20691. 8. End of channel 3 0 > 1 > 2 > 3
  20692. transfer
  20693.  
  20694. Figure 14.4 Example of Changes in Priority Order in Round Robin Mode
  20695.  
  20696. Rev. 2.0, 02/99, page 443 of 830
  20697.  
  20698. ----------------------- Page 458-----------------------
  20699.  
  20700. 14.3.4 Types of DMA Transfer
  20701.  
  20702. The DMAC supports the transfers shown in table 14.6. It can operate in single address mode, in
  20703. which either the transfer source or the transfer destination is accessed using the acknowledge
  20704. signal, or in dual address mode, in which both the transfer source and transfer destination
  20705. addresses are output. The actual transfer operation timing depends on the bus mode, which can
  20706. be either burst mode or cycle steal mode.
  20707.  
  20708. Table 14.6 Supported DMA Transfers
  20709.  
  20710. Transfer Destination
  20711.  
  20712. External Device External Memory-Mapped On-Chip
  20713. Transfer Source with DACK Memory External Device Peripheral Module
  20714.  
  20715. External device Not available Single address Single address Not available
  20716. with DACK mode mode
  20717.  
  20718. External memory Single address Dual address Dual address Dual address mode
  20719. mode mode mode
  20720.  
  20721. Memory-mapped Single address Dual address Dual address Dual address mode
  20722. external device mode mode mode
  20723.  
  20724. On-chip peripheral Not available Dual address Dual address Not available
  20725. module mode mode
  20726.  
  20727. Rev. 2.0, 02/99, page 444 of 830
  20728.  
  20729. ----------------------- Page 459-----------------------
  20730.  
  20731. Address Modes
  20732.  
  20733. Single Address Mode: In single address mode, both the transfer source and the transfer
  20734. destination are external; one is accessed by the DACK signal and the other by an address. In this
  20735. mode, the DMAC performs a DMA transfer in one bus cycle by simultaneously outputting the
  20736. external device strobe signal (DACK) to either the transfer source or transfer destination external
  20737. device to access it, while outputting an address to the other side of the transfer. Figure 14.5
  20738. shows an example of a transfer between external memory and an external device with DACK in
  20739. which the external device outputs data to the data bus and that data is written to external
  20740. memory in the same bus cycle.
  20741.  
  20742. External External
  20743. address data bus
  20744. bus
  20745. SH7750
  20746. External
  20747. DMAC memory
  20748.  
  20749. External device
  20750. with DACK
  20751.  
  20752. DACK
  20753.  
  20754. DREQ
  20755.  
  20756. : Data flow
  20757.  
  20758. Figure 14.5 Data Flow in Single Address Mode
  20759.  
  20760. Two types of transfer are possible in single address mode: (1) transfer between an external
  20761. device with DACK and a memory-mapped external device, and (2) transfer between an external
  20762. device with DACK and external memory. Only the external request signal ('5(4) is used in
  20763. both these cases.
  20764.  
  20765. Figure 14.6 shows the transfer timing for single address mode.
  20766.  
  20767. The access timing depends on the type of external memory. For details, see the descriptions of
  20768. the memory interfaces in section 13, Bus State Controller (BSC).
  20769.  
  20770. Rev. 2.0, 02/99, page 445 of 830
  20771.  
  20772. ----------------------- Page 460-----------------------
  20773.  
  20774. CKIO
  20775.  
  20776. A28–A0 Address output to external memory
  20777. space
  20778.  
  20779. CSn
  20780.  
  20781. D63–D0 Data output from external device
  20782. with DACK
  20783.  
  20784. DACK DACK signal to external
  20785. device with DACK
  20786.  
  20787. WE WE signal to external memory space
  20788.  
  20789. (a) From external device with DACK to external memory space
  20790.  
  20791. CKIO
  20792.  
  20793. A28–A0 Address output to external memory
  20794. space
  20795.  
  20796. CSn
  20797.  
  20798. D63–D0 Data output from external memory
  20799. space
  20800.  
  20801. RD RD signal to external memory space
  20802.  
  20803. DACK DACK signal to external
  20804. device with DACK
  20805.  
  20806. (b) From external memory space to external device with DACK
  20807.  
  20808. Figure 14.6 DMA Transfer Timing in Single Address Mode
  20809.  
  20810. Rev. 2.0, 02/99, page 446 of 830
  20811.  
  20812. ----------------------- Page 461-----------------------
  20813.  
  20814. Dual Address Mode: Dual address mode is used to access both the transfer source and the
  20815. transfer destination by address. The transfer source and destination can be accessed by either on-
  20816. chip peripheral module or external address.
  20817.  
  20818. In dual address mode, data is read from the transfer source in the data read cycle, and written to
  20819. the transfer destination in the data write cycle, so that the transfer is executed in two bus cycles.
  20820. The transfer data is temporarily stored in the data buffer in the bus state controller (BSC).
  20821.  
  20822. In a transfer between external memories such as that shown in figure 14.7, data is read from
  20823. external memory into the BSC’s data buffer in the read cycle, then written to the other external
  20824. memory in the write cycle. Figure 14.8 shows the timing for this operation.
  20825.  
  20826. SAR Memory
  20827. DMAC s
  20828. u
  20829. b s
  20830. DAR s u
  20831. b
  20832. s Transfer source
  20833. e a
  20834. t
  20835. r a module
  20836. d
  20837. d D
  20838. A
  20839.  
  20840. Transfer destination
  20841. BSC Data buffer
  20842. module
  20843.  
  20844. Taking the SAR value as the address, data is read from the transfer source module
  20845. and stored temporarily in the data buffer in the bus state controller (BSC).
  20846.  
  20847. 1st bus cycle
  20848.  
  20849. SAR Memory
  20850. DMAC
  20851. s
  20852. u
  20853. DAR b s
  20854. u
  20855. s b Transfer source
  20856. s
  20857. e a
  20858. r t module
  20859. d a
  20860. d D
  20861. A
  20862. Transfer destination
  20863. BSC Data buffer
  20864. module
  20865.  
  20866. Taking the DAR value as the address, the data stored in the BSC’s data buffer is
  20867. written to the transfer destination module.
  20868.  
  20869. 2nd bus cycle
  20870.  
  20871. Figure 14.7 Operation in Dual Address Mode
  20872.  
  20873. Rev. 2.0, 02/99, page 447 of 830
  20874.  
  20875. ----------------------- Page 462-----------------------
  20876.  
  20877. CKIO
  20878.  
  20879. A28–A0 Transfer source Transfer destination
  20880. address address
  20881.  
  20882. CSn
  20883.  
  20884. D63–D0
  20885.  
  20886. RD
  20887.  
  20888. WE
  20889.  
  20890. DACK
  20891.  
  20892. Data read cycle Data write cycle
  20893. (1st cycle) (2nd cycle)
  20894.  
  20895. Transfer from external memory space to external memory space
  20896.  
  20897.  
  20898. Figure 14.8 Example of Transfer Timing in Dual Address Mode
  20899.  
  20900. Bus Modes
  20901.  
  20902. There are two bus modes, cycle steal mode and burst mode, selected with the TM bit in
  20903. CHCR0–CHCR3.
  20904.  
  20905. Cycle Steal Mode: In cycle steal mode, the DMAC releases the bus to the CPU at the end of
  20906. each transfer-unit (8-bit, 16-bit, 32-bit, 64-bit, or 32-byte) transfer. When the next transfer
  20907. request is issued, the DMAC reacquires the bus from the CPU and carries out another transfer-
  20908. unit transfer. At the end of this transfer, the bus is again given to the CPU. This is repeated until
  20909. the transfer end condition is satisfied.
  20910.  
  20911. Cycle steal mode can be used with all categories of transfer request source, transfer source, and
  20912. transfer destination.
  20913.  
  20914. Figure 14.9 shows an example of DMA transfer timing in cycle steal mode. The transfer
  20915. conditions in this example are dual address mode and '5(4 level detection.
  20916.  
  20917. Rev. 2.0, 02/99, page 448 of 830
  20918.  
  20919. ----------------------- Page 463-----------------------
  20920.  
  20921. DREQ
  20922.  
  20923. Bus returned to CPU
  20924.  
  20925. Bus cycle CPU CPU CPU DMAC DMAC CPU DMAC DMAC CPU CPU
  20926.  
  20927. Read, write Read, write
  20928.  
  20929. Figure 14.9 Example of DMA Transfer in Cycle Steal Mode
  20930.  
  20931. Burst Mode: In burst mode, once the DMAC has acquired the bus it holds the bus and transfers
  20932. data continuously until the transfer end condition is satisfied. With '5(4 low level detection in
  20933. external request mode, however, when '5(4 is driven high the bus passes to another bus master
  20934. after the end of the DMAC transfer request that has already been accepted, even if the transfer
  20935. end condition has not been satisfied.
  20936.  
  20937. Figure 14.10 shows an example of DMA transfer timing in burst mode. The transfer conditions
  20938. in this example are single address mode and '5(4 level detection.
  20939.  
  20940. DREQ
  20941.  
  20942. Bus cycle CPU CPU CPU DMAC DMAC DMAC DMAC DMAC DMAC CPU
  20943.  
  20944. Figure 14.10 Example of DMA Transfer in Burst Mode
  20945.  
  20946. Note: Burst mode can be set regardless of the data size. A 32-byte block transfer burst mode
  20947. setting can also be made.
  20948.  
  20949. Rev. 2.0, 02/99, page 449 of 830
  20950.  
  20951. ----------------------- Page 464-----------------------
  20952.  
  20953. Relationship between DMA Transfer Type, Request Mode, and Bus Mode
  20954.  
  20955. Table 14.7 shows the relationship between the type of DMA transfer, the request mode, and the
  20956. bus mode.
  20957.  
  20958. Table 14.7 Relationship between DMA Transfer Type, Request Mode, and Bus Mode
  20959.  
  20960. Address Request Bus Transfer Size Usable
  20961. Mode Type of Transfer Mode Mode (Bits) Channels
  20962. Single External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  20963.  
  20964. and external memory B
  20965. External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  20966.  
  20967. and memory-mapped B
  20968. external device
  20969.  
  20970. 1 5, 6
  20971. Dual External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  20972. external memory B
  20973.  
  20974. 1 5, 6
  20975. External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  20976. memory-mapped external B
  20977. device
  20978.  
  20979. 1 5, 6
  20980. Memory-mapped external Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  20981. device and memory-mapped B
  20982. external device
  20983.  
  20984. 2 3 4 5, 6
  20985. External memory and Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  20986. on-chip peripheral module
  20987.  
  20988. 2 3 4 5, 6
  20989. Memory-mapped external Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  20990. device and on-chip
  20991. peripheral module
  20992.  
  20993. 32B: 32-byte burst transfer
  20994. B: Burst
  20995. C: Cycle steal
  20996. Notes: 1. External request, auto-request, or on-chip peripheral module request (TMU input
  20997. capture interrupt request) possible. In the case of an on-chip peripheral module
  20998. request, it is not possible to specify external memory data transfer with the SCI (SCIF)
  20999. as the transfer request source.
  21000. 2. External request, auto-request, or on-chip peripheral module request possible. If the
  21001. transfer request source is the SCI (SCIF), either the transfer source must be SCRDR1
  21002. (SCFRDR2) or the transfer destination must be SCTDR1 (SCFTDR2).
  21003. 3. When the transfer request source is the SCI (SCIF), only cycle steal mode can be
  21004. used.
  21005. 4. Access size permitted for the on-chip peripheral module register that is the transfer
  21006. source or transfer destination.
  21007. 5. When the transfer request is an external request, only channels 0 and 1 can be used.
  21008. 6. In DDT mode, transfer requests can be accepted for all channels from external
  21009. devices capable of DTR format output.
  21010.  
  21011. Rev. 2.0, 02/99, page 450 of 830
  21012.  
  21013. ----------------------- Page 465-----------------------
  21014.  
  21015. Bus Mode and Channel Priority Order
  21016.  
  21017. When, for example, channel 1 is transferring data in burst mode, and a transfer request is issued
  21018. to channel 0, which has a higher priority, the channel 0 transfer is started immediately.
  21019.  
  21020. If fixed mode has been set for the priority levels (CH0 > CH1), transfer on channel 1 is
  21021. continued after transfer on channel 0 is completely finished, whether cycle steal mode or burst
  21022. mode is set for channel 0.
  21023.  
  21024. If round robin mode has been set for the priority levels, transfer on channel 1 is restarted after
  21025. one transfer unit of data is transferred on channel 0, whether cycle steal mode or burst mode is
  21026. set for channel 0. Channel execution alternates in the order: channel 1 → channel 0 → channel 1
  21027. → channel 0.
  21028.  
  21029. An example of round robin mode operation is shown in figure 14.11.
  21030.  
  21031. Since channel 1 is in burst mode (in the case of edge sensing) regardless of whether fixed mode
  21032. or round robin mode is set for the priority order, the bus is not released to the CPU until channel
  21033. 1 transfer ends.
  21034.  
  21035. CPU DMAC CH1 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH1 CPU
  21036.  
  21037. CH0 CH1 CH0
  21038.  
  21039. CPU DMAC channel 1 DMAC channel 0 and DMAC channel 1 CPU
  21040. burst mode channel 1 round robin burst mode
  21041. mode
  21042.  
  21043. Priority system: Round robin mode
  21044. Channel 0: Cycle steal mode
  21045. Channel 1: Burst mode (edge-sensing)
  21046.  
  21047. Figure 14.11 Bus Handling with Two DMAC Channels Operating
  21048.  
  21049. Note: When channel 1 is in level-sensing burst mode with the settings shown in figure 14.11,
  21050. the bus is passed to the CPU during a break in requests.
  21051.  
  21052. Rev. 2.0, 02/99, page 451 of 830
  21053.  
  21054. ----------------------- Page 466-----------------------
  21055.  
  21056. 14.3.5 Number of Bus Cycle States and '5(4 Pin Sampling Timing
  21057. '5(4
  21058.  
  21059. Number of States in Bus Cycle: The number of states in the bus cycle when the DMAC is the
  21060. bus master is controlled by the bus state controller (BSC) just as it is when the CPU is the bus
  21061. master. See section 13, Bus State Controller (BSC), for details.
  21062.  
  21063. '5(4 Pin Sampling Timing: In external request mode, the '5(4 pin is sampled at the rising
  21064. '5(4
  21065. edge of CKIO clock pulses. When '5(4 input is detected, a DMAC bus cycle is generated and
  21066. DMA transfer executed after four CKIO cycles at the earliest.
  21067.  
  21068. The second and subsequent '5(4 sampling operations are performed one cycle after the start of
  21069. the first DMAC transfer bus cycle (in the case of single address mode).
  21070.  
  21071. DRAK is output for one cycle only, once each time '5(4 is detected, regardless of the transfer
  21072. mode or '5(4 detection method. In the case of burst mode edge detection, '5(4 is sampled in
  21073. the first cycle only, and so DRAK is output in the first cycle only .
  21074.  
  21075. Operation: Figures 14.12 to 14.23 show the timing in each mode.
  21076.  
  21077. 1. Cycle Steal Mode
  21078. In cycle steal mode, The '5(4 sampling timing differs for dual address mode and single
  21079. address mode, and for level detection and edge detection of '5(4.
  21080. For example, in figure 14.12 (cycle steal mode, dual address mode, level detection), DMAC
  21081. transfer begins, at the earliest, four CKIO cycles after the first sampling operation. The
  21082. second sampling operation is performed one cycle after the start of the first DMAC transfer
  21083. write cycle. If '5(4 is not detected at this time, sampling is executed in every subsequent
  21084. cycle.
  21085. In figure 14.13 (cycle steal mode, dual address mode, edge detection), DMAC transfer
  21086. begins, at the earliest, five CKIO cycles after the first sampling operation. The second
  21087. sampling operation begins from the cycle in which the first DMAC transfer read cycle ends.
  21088. If '5(4 is not detected at this time, sampling is executed in every subsequent cycle.
  21089. In figure 14.16 (cycle steal mode, dual address mode, level detection), with SDRAM: row hit
  21090. read/write transfer using a 64-bit bus width and a 32-byte block as the data size, DMAC
  21091. transfer begins, at the earliest, four CKIO cycles after the first sampling operation. The
  21092. second sampling operation is performed in the cycle in which the first DMAC transfer write
  21093. cycle is begun.
  21094. For details of the timing for various kinds of memory access, see section 13, Bus State
  21095. Controller (BSC).
  21096. Figure 14.19 shows the case of cycle steal mode, single address mode, and level detection. In
  21097. this case, too, transfer is started, at the earliest, four CKIO cycles after the first '5(4
  21098. sampling operation. The second sampling operation is performed one cycle after the start of
  21099. the first DMAC transfer bus cycle.
  21100.  
  21101. Rev. 2.0, 02/99, page 452 of 830
  21102.  
  21103. ----------------------- Page 467-----------------------
  21104.  
  21105. Figure 14.20 shows the case of cycle steal mode, single address mode, and edge detection. In
  21106. this case, transfer is started, at the earliest, five CKIO cycles after the first '5(4 sampling
  21107. operation. The second sampling begins one cycle after the first assertion of DRAK.
  21108. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21109.  
  21110. 2. Burst Mode, Dual Address Mode, Level Detection
  21111. '5(4 sampling timing in burst mode using dual address mode and level detection is
  21112. virtually the same as for cycle steal mode.
  21113. For example, in figure 14.14, DMAC transfer begins, at the earliest, four CKIO cycles after
  21114. the first sampling operation. The second sampling operation is performed one cycle after the
  21115. start of the first DMAC transfer write cycle.
  21116. In the case of dual address mode transfer initiated by an external request, the DACK signal
  21117. can be output in either the read cycle or the write cycle of the DMAC transfer according to
  21118. the specification of the AM bit in CHCR.
  21119.  
  21120. 3. Burst Mode, Single Address Mode, Level Detection
  21121. '5(4 sampling timing in burst mode using single address mode and level detection is
  21122. shown in figure 14.21.
  21123. In the example shown in figure 14.21, DMAC transfer begins, at the earliest, four CKIO
  21124. cycles after the first sampling operation, and the second sampling operation begins one cycle
  21125. after the start of the first DMAC transfer bus cycle.
  21126. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21127. In figure 14.23, with a 32-byte data size, 64-bit bus width, and SDRAM: row hit write,
  21128. DMAC transfer begins, at the earliest, six CKIO cycles after the first sampling operation.
  21129. The second sampling operation begins one cycle after DACK is asserted for the first DMAC
  21130. transfer.
  21131.  
  21132. 4. Burst Mode, Dual Address Mode, Edge Detection
  21133. In burst mode using dual address mode and edge detection, '5(4 sampling is performed in
  21134. the first cycle only.
  21135. For example, in the case shown in figure 14.15, DMAC transfer begins, at the earliest, five
  21136. CKIO cycles after the first sampling operation. DMAC transfer then continues until the end
  21137. of the number of data transfers set in DMATCR. '5(4 is not sampled during this time, and
  21138. therefore DRAK is output in the first cycle only.
  21139. In the case of dual address mode transfer initiated by an external request, the DACK signal
  21140. can be output in either the read cycle or the write cycle of the DMAC transfer according to
  21141. the specification of the AM bit in CHCR.
  21142.  
  21143. Rev. 2.0, 02/99, page 453 of 830
  21144.  
  21145. ----------------------- Page 468-----------------------
  21146.  
  21147. 5. Burst Mode, Single Address Mode, Edge Detection
  21148. In burst mode using single address mode and edge detection, '5(4 sampling is performed
  21149. only in the first cycle.
  21150. For example, in the case shown in figure 14.22, DMAC transfer begins, at the earliest, five
  21151. cycles after the first sampling operation. DMAC transfer then continues until the end of the
  21152. number of data transfers set in DMATCR. '5(4 is not sampled during this time, and
  21153. therefore DRAK is output in the first cycle only.
  21154. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21155.  
  21156. Rev. 2.0, 02/99, page 454 of 830
  21157.  
  21158. ----------------------- Page 469-----------------------
  21159.  
  21160. E
  21161. x
  21162. CKIO
  21163. t
  21164. e Bus locked Bus locked
  21165. r
  21166. n
  21167. a
  21168. l
  21169. Source address Destination address Source address Destination address
  21170.  
  21171. B A[25:0]
  21172. u
  21173. s F
  21174. i
  21175. →→ g
  21176. u
  21177. E r
  21178. e
  21179. x
  21180. t 1 Read Write Read Write
  21181. e 4
  21182. D[63:0]
  21183. r .
  21184. n 1
  21185. a 2
  21186.  
  21187. l
  21188.  
  21189. B D DREQ0
  21190. u u
  21191. s (level
  21192. / a
  21193. ' l
  21194. '
  21195. detection) 1st 2nd
  21196.  
  21197. 5 A
  21198. 5 acceptance acceptance
  21199. ( d
  21200. (
  21201. 4 d
  21202. 4 r
  21203. ( e
  21204. L s
  21205. DREQ1
  21206. s
  21207. e
  21208. v M
  21209. e
  21210. l o
  21211. D d
  21212. e
  21213. e
  21214. DRAK0
  21215. /
  21216. t C
  21217. e
  21218. R c y
  21219. t c
  21220. e i l
  21221. v o e
  21222. . n S
  21223. 2 ) t
  21224. ,
  21225. . e Bus cycle
  21226. 0 D
  21227. CPU DMAC CPU DMAC CPU
  21228. , a
  21229. 0 A l
  21230. 2 C M
  21231. /
  21232. 9 K o
  21233. 9 d
  21234. , ( e
  21235. p R
  21236. a e
  21237. DACK0
  21238. g a
  21239. e d
  21240.  
  21241. 4 C
  21242. 5 y
  21243. 5 c
  21244. o l
  21245. e
  21246. f )
  21247. 8 : DREQ sampling and determination of channel priority
  21248. 3
  21249. 0
  21250.  
  21251. ----------------------- Page 470-----------------------
  21252.  
  21253. R
  21254. e
  21255. v
  21256. . E
  21257. 2
  21258. CKIO
  21259. . x
  21260. 0 t
  21261. , e Bus locked Bus locked
  21262. r
  21263. 0 n
  21264. 2 a
  21265. / Destination address
  21266. l
  21267. Source address Destination address Source address Source address
  21268. 9
  21269. ,9 B A[25:0]
  21270. u
  21271. p s F
  21272. a i
  21273. g →→ g
  21274. e u
  21275. 4 E r
  21276. e
  21277. 5 x
  21278. 6 t 1 D[63:0] Read Write Read Write Read
  21279. e 4
  21280. o r .
  21281. f n 1
  21282. 8 a 3
  21283. 3 l
  21284. 0 B D DREQ0
  21285. u u
  21286. s
  21287. (edge
  21288. / a
  21289. ' l
  21290. '
  21291. detection)
  21292.  
  21293. 1st 2nd 3rd 4th
  21294. 5 A
  21295. 5 acceptance acceptance acceptance accep-
  21296. ( d
  21297. ( d tance
  21298. 4
  21299. 4 r
  21300. ( e
  21301. s
  21302. DREQ1
  21303. E s
  21304. d M
  21305. g
  21306. e o
  21307. D d
  21308. e
  21309. e / DRAK0
  21310. t C
  21311. e
  21312. c y
  21313. t c
  21314. i
  21315. o l
  21316. e
  21317. n
  21318. ) S
  21319. , t
  21320. e Bus cycle
  21321. D
  21322. CPU DMAC CPU DMAC CPU DMAC
  21323. a
  21324. A l
  21325. C M
  21326. K o
  21327. d
  21328. ( e
  21329. R
  21330. e
  21331. DACK0
  21332. a
  21333. d
  21334.  
  21335. C
  21336. y
  21337. c
  21338. l
  21339. e
  21340. )
  21341. : DREQ sampling and determination of channel priority
  21342.  
  21343. ----------------------- Page 471-----------------------
  21344.  
  21345. E
  21346. x CKIO
  21347. t
  21348. e
  21349. r
  21350. Bus locked Bus locked
  21351. n
  21352. a
  21353. l
  21354.  
  21355. Source address Destination address Source address Destination address
  21356. B
  21357. u
  21358. A[25:0]
  21359. s
  21360.  
  21361. →→ F
  21362. i
  21363. E g
  21364. x u
  21365. t r
  21366. e
  21367. D[63:0]
  21368. e
  21369. Read Write Read Write
  21370. r
  21371. n 1
  21372. a 4
  21373. .
  21374. l 1
  21375. B 4
  21376. DREQ0
  21377. u
  21378. s D (level
  21379. /
  21380. '
  21381. ' u detection) 1st 2nd
  21382. 5 a
  21383. 5 l acceptance acceptance
  21384. (
  21385. (
  21386. 4 A
  21387. 4 d
  21388. ( d
  21389. L r DREQ1
  21390. e e
  21391. v s
  21392. e s
  21393. l M
  21394. D
  21395. e o
  21396. d
  21397. DRAK0
  21398. t
  21399. e e
  21400. R c /
  21401. e t B
  21402. i
  21403. v o u
  21404. . n r
  21405. 2 ) s
  21406. , t
  21407. .
  21408. 0 D M
  21409. Bus cycle CPU DMAC-1 DMAC-2 CPU
  21410. ,
  21411. 0 A o
  21412. 2 C d
  21413. / K e
  21414. 9
  21415. 9
  21416. , (
  21417. p R
  21418. a e DACK0
  21419. g a
  21420. e d
  21421.  
  21422. 4 C
  21423. 5 y
  21424. 7 c
  21425. o l
  21426. e
  21427. f )
  21428. 8 : DREQ sampling and determination of channel priority
  21429. 3
  21430. 0
  21431.  
  21432. ----------------------- Page 472-----------------------
  21433.  
  21434. R
  21435. e
  21436. v
  21437. . E
  21438. 2. x CKIO
  21439. 0 t
  21440. , e Bus locked Bus locked
  21441. r
  21442. 0 n
  21443. 2 a
  21444. /
  21445. 9 l
  21446. Source address Destination address Source address Destination address
  21447.  
  21448. ,9 B A[25:0]
  21449. u
  21450. p s
  21451. a
  21452. g →→ F
  21453. e i
  21454. 4 E g
  21455. 5 x u
  21456. 8 t r D[63:0]
  21457. e e
  21458. Read Write Read Write
  21459.  
  21460. o r 1
  21461. f n 4
  21462. 8 a .
  21463. 3 l 1
  21464. 0 B 5 DREQ0
  21465. u
  21466. s D
  21467. (edge
  21468. /
  21469. '
  21470. ' u detection) 1st
  21471. 5 a
  21472. 5
  21473. acceptance TE bit: transfer end
  21474. l
  21475. (
  21476. ( A
  21477. 4
  21478. 4 d
  21479. ( d
  21480. E r DREQ1
  21481. d e
  21482. g s
  21483. s
  21484. e
  21485. D M
  21486. e o DRAK0
  21487. t d
  21488. e e
  21489. c /
  21490. t B
  21491. i
  21492. o u
  21493. n r
  21494. ) s
  21495. , t
  21496. D M Bus cycle CPU DMAC-1 DMAC-2 CPU
  21497. A o
  21498. C d
  21499. K e
  21500.  
  21501. (
  21502. R
  21503. e DACK0
  21504. a
  21505. d
  21506.  
  21507. C
  21508. y
  21509. c
  21510. l
  21511. e
  21512. ) : DREQ sampling and determination of channel priority
  21513.  
  21514. ----------------------- Page 473-----------------------
  21515.  
  21516. E
  21517. ( x
  21518. B t CKIO
  21519. e
  21520. u r
  21521. s n
  21522. a
  21523. W
  21524. Destination
  21525. l Source address Source address
  21526.  
  21527. B
  21528. address
  21529. i
  21530. d u
  21531. t A[25:0]
  21532. h s F
  21533. : →→ i
  21534. 6 g
  21535. 4 E u
  21536. B x r
  21537. i t e
  21538. t e 1 Read Read Read Read Write Write Write Write Read Read
  21539. r
  21540. D[63:0]
  21541. s 4
  21542. , n .
  21543. S a 1
  21544. D l 6
  21545. R B
  21546. A u D DREQ0
  21547. s u
  21548. M /
  21549. (level
  21550. '
  21551. ' a
  21552. l detection)
  21553. : 5
  21554. R 5 A 1st 2nd
  21555. (
  21556. (
  21557. d
  21558. acceptance acceptance
  21559. o 4
  21560. w 4 d
  21561. ( r
  21562. H L e
  21563. s
  21564. DREQ1
  21565. i e s
  21566. t v
  21567. R e M
  21568. l
  21569.  
  21570. e D o
  21571. a d
  21572. d e e
  21573. t DRAK0
  21574. / e /
  21575. W c C
  21576. R r t y
  21577. i
  21578. e i o c
  21579. t n l
  21580. v. e ) e
  21581. ) / S
  21582. ,
  21583. 2 3 t
  21584. 0. D 2 e Bus cycle CPU DMAC-1 DMAC-2
  21585. , A B- a
  21586. l
  21587. 0 C y M
  21588. 2 K t
  21589. / e o
  21590. 9
  21591. 9 ( B d
  21592. , R l e
  21593. p e o
  21594. a a c
  21595. DACK0
  21596. g d k
  21597. e C T
  21598. 4 y r
  21599. 5 c a
  21600. 9 l n
  21601. e s
  21602. o ) f
  21603. f e
  21604. 8 r : DREQ sampling and determination of channel priority
  21605. 3
  21606. 0
  21607.  
  21608. ----------------------- Page 474-----------------------
  21609.  
  21610. R
  21611. e
  21612. v
  21613. .
  21614.  
  21615. 2
  21616. .
  21617. 0
  21618. ,
  21619.  
  21620. CKIO
  21621. 0
  21622. 2
  21623. /
  21624. 9
  21625. 9
  21626. ,
  21627. Source address Source address Source address
  21628. p F
  21629. On-chip
  21630. a i peripheral
  21631. g O g
  21632. e u
  21633. address bus
  21634. n r
  21635. 4 - e
  21636. 6 C 1
  21637. 0 h
  21638. On-chip
  21639. 4
  21640. o i .
  21641. peripheral Read Read Read
  21642. f p 1
  21643. 7
  21644. data bus
  21645. 8 S
  21646. 3 C
  21647. 0 I D
  21648. u
  21649. Destination address Destination address Destination address
  21650. (
  21651. L a A[31:0]
  21652. e l
  21653. v A
  21654. e d
  21655. l
  21656. D d
  21657. r
  21658. e e
  21659. t s D[63:0]
  21660. e
  21661. Write Write Write
  21662. s
  21663. c
  21664. t M
  21665. i
  21666. o o
  21667. n d
  21668. )
  21669. e
  21670. →→ /
  21671. C
  21672. E y Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU
  21673. c
  21674. x l
  21675. t e
  21676. e
  21677. r S
  21678. n t
  21679. e
  21680. a a
  21681. l
  21682. l
  21683. B M
  21684. u
  21685. s o
  21686. d
  21687. e
  21688.  
  21689. ----------------------- Page 475-----------------------
  21690.  
  21691. CKIO
  21692.  
  21693. Source address Source address Source address
  21694. F
  21695. i A[31:0]
  21696. E g
  21697. u
  21698. x r
  21699. t
  21700. e e
  21701. r 1
  21702. n 4
  21703. a
  21704. D[63:0] Read Read Read
  21705. .
  21706. l 1
  21707. B 8
  21708. u
  21709. s D Destination address Destination address Destination address
  21710. →→ u On-chip
  21711. a
  21712. l peripheral
  21713. O A address bus
  21714. n- d
  21715. C d
  21716. r
  21717. h
  21718. On-chip
  21719. e
  21720. i s peripheral
  21721. p
  21722. Write Write Write
  21723. s
  21724.  
  21725. data bus
  21726. S M
  21727. C o T1 T2 T1 T2 T1 T2
  21728. I
  21729. d
  21730. ( e
  21731. L /
  21732. e C
  21733. R v y Bus cycle CPU DMAC CPU DMAC CPU DMAC
  21734. e c
  21735. e l l
  21736. v. D e
  21737. e S
  21738. 2 t t
  21739. . e e
  21740. ,0 c a
  21741. t l
  21742. 0 i M
  21743. 2 o
  21744. / n
  21745. 9 ) o
  21746. 9 d
  21747. , e
  21748. p
  21749. a
  21750. g
  21751. e
  21752.  
  21753. 4
  21754. 6
  21755. 1
  21756.  
  21757. o
  21758. f
  21759.  
  21760. 8
  21761. 3
  21762. 0
  21763.  
  21764. ----------------------- Page 476-----------------------
  21765.  
  21766. R
  21767. e
  21768. v
  21769. .
  21770.  
  21771. 2
  21772. CKIO
  21773. .
  21774. 0
  21775. ,
  21776.  
  21777. 0
  21778. 2
  21779. / Source address Source address Source address Source address
  21780. 9
  21781. 9 A[25:0]
  21782. , E F
  21783. p x i
  21784. a t g
  21785. g e u
  21786. e r r
  21787. n e
  21788. 4 a
  21789. 6 l 1
  21790. 2 4
  21791. D[63:0] Read Read Read Read
  21792. B .
  21793. o u 1
  21794. f s 9
  21795. 8
  21796. 3 →→ S
  21797. 0 i DREQ0
  21798. E n
  21799. g
  21800. (level
  21801. x
  21802. t l
  21803. e
  21804. detection)
  21805. e
  21806. 1st 2nd 3rd 4th
  21807.  
  21808. r A acceptance acceptance acceptance acceptance
  21809. n
  21810. a d
  21811. l d
  21812. B r
  21813. e DREQ1
  21814. u s
  21815. s s
  21816. /
  21817. ' M
  21818. '
  21819. 5
  21820. 5 o
  21821. ( d
  21822. (
  21823. 4 e
  21824. 4
  21825. DRAK0
  21826. /
  21827. ( C
  21828. L y
  21829. e c
  21830. v l
  21831. e
  21832. e
  21833. l S
  21834. D t Bus cycle
  21835. e
  21836. CPU DMAC CPU DMAC CPU DMAC CPU DMAC CPU
  21837. e a
  21838. t l
  21839. e
  21840. c M
  21841. t
  21842. i o
  21843. o d
  21844. n e
  21845. ) DACK0
  21846.  
  21847. : DREQ sampling and determination of channel priority
  21848.  
  21849. ----------------------- Page 477-----------------------
  21850.  
  21851. CKIO
  21852.  
  21853. Source address Source address Source address
  21854. A[25:0]
  21855. E F
  21856. x i
  21857. t g
  21858. e u
  21859. r r
  21860. n e
  21861. a 1
  21862. l
  21863. 4 D[63:0] Read Read Read
  21864. B .
  21865. u 2
  21866. s 0
  21867.  
  21868. →→ S
  21869. i
  21870. E n
  21871. DREQ0
  21872. x g (edge
  21873. l
  21874. t e
  21875. e
  21876. detection) 1st 2nd 3rd
  21877.  
  21878. r A acceptance acceptance acceptance
  21879. n
  21880. a d
  21881. l d
  21882. B r
  21883. e
  21884. u s
  21885. DREQ1
  21886. s s
  21887. /
  21888. ' M
  21889. '
  21890. 5
  21891. 5 o
  21892. ( d
  21893. (
  21894. 4 e
  21895. 4
  21896. DRAK0
  21897. /
  21898. ( C
  21899. R E y
  21900. e d c
  21901. v g l
  21902. . e
  21903. e
  21904. 2 S
  21905. 0. D t
  21906. e
  21907. Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU
  21908. , e a
  21909. t
  21910. 0 e l
  21911. 2 c M
  21912. / t
  21913. 9 i o
  21914. 9 o d
  21915. , n e
  21916. p )
  21917. a DACK0
  21918. g
  21919. e
  21920.  
  21921. 4
  21922. 6
  21923. 3
  21924.  
  21925. o
  21926. f
  21927.  
  21928. 8 : DREQ sampling and determination of channel priority
  21929. 3
  21930. 0
  21931.  
  21932. ----------------------- Page 478-----------------------
  21933.  
  21934. R
  21935. e
  21936. v
  21937. .
  21938.  
  21939. 2
  21940. .
  21941. 0 CKIO
  21942. ,
  21943.  
  21944. 0
  21945. 2
  21946. /
  21947. 9
  21948. 9
  21949. Source address Source address Source address Source address
  21950. , E
  21951. p
  21952. A[25:0]
  21953. x
  21954. a t
  21955. g e F
  21956. e r i
  21957. n g
  21958. 4 a u
  21959. 6 l r
  21960. 4 B e D[63:0] Read Read Read Read
  21961. o u 1
  21962. f s 4
  21963. 8 .
  21964. 3 →→ 2
  21965. 1
  21966. 0
  21967. E DREQ0
  21968. x S
  21969. i (level
  21970. t n
  21971. e
  21972. g
  21973. detection) 1st 2nd 3rd 4th
  21974. r
  21975. n l acceptance acceptance acceptance acceptance
  21976. e
  21977. a
  21978. l A
  21979. B d
  21980. u d DREQ1
  21981. s r
  21982. / e
  21983. '
  21984. ' s
  21985. 5 s
  21986. 5
  21987. ( M
  21988. (
  21989. 4
  21990. 4 o DRAK0
  21991. ( d
  21992. L e
  21993. /
  21994. e B
  21995. v u
  21996. e r
  21997. l
  21998. s Bus cycle
  21999. D t
  22000. CPU DMAC-1 DMAC-2 DMAC-3 CPU DMAC-4
  22001.  
  22002. e M
  22003. t
  22004. e o
  22005. c d
  22006. t
  22007. i e
  22008. o
  22009. n
  22010. ) DACK0
  22011.  
  22012. : DREQ sampling and determination of channel priority
  22013.  
  22014. ----------------------- Page 479-----------------------
  22015.  
  22016. CKIO
  22017.  
  22018. Source address Source address Source address Source address
  22019. A[25:0]
  22020. E
  22021. x
  22022. t F
  22023. e
  22024. r i
  22025. n g
  22026. a u
  22027. l r
  22028. e
  22029. D[63:0] Read Read Read Read
  22030. B 1
  22031. u 4
  22032. s .
  22033. →→ 2
  22034. 2
  22035.  
  22036.  
  22037. DREQ0
  22038.  
  22039. E S (edge
  22040. x i
  22041. t n
  22042. detection)
  22043. e
  22044. 1st
  22045. r g
  22046. l acceptance
  22047. n e
  22048. a A
  22049. l
  22050.  
  22051. B d TE bit: transfer end
  22052. u d
  22053. s r
  22054. / e
  22055. '
  22056. ' s
  22057. s
  22058. 5
  22059. 5
  22060. ( M
  22061. (
  22062. 4 o
  22063. 4
  22064. DRAK0
  22065. d
  22066. R ( e
  22067. E /
  22068. e d B
  22069. v. g u
  22070. e r
  22071. 2 s
  22072. 0. D t Bus cycle CPU DMAC-1 DMAC-2 DMAC-3 DMAC-4 CPU
  22073. , e M
  22074. t
  22075. 0 e o
  22076. 2 c
  22077. / t d
  22078. 9 i e
  22079. 9 o
  22080. , n
  22081. p )
  22082. a
  22083. DACK0
  22084. g
  22085. e
  22086.  
  22087. 4
  22088. 6
  22089. 5
  22090.  
  22091. o
  22092. f
  22093.  
  22094. 8 : DREQ sampling and determination of channel priority
  22095. 3
  22096. 0
  22097.  
  22098. ----------------------- Page 480-----------------------
  22099.  
  22100. R
  22101. e
  22102. v E
  22103. . x
  22104. 2 t
  22105. . e
  22106. 0 r
  22107. CKIO
  22108. , n
  22109. 0 a
  22110. 2 l
  22111. / B
  22112. Destination Destination Destination
  22113. 9
  22114. 9 u
  22115. address address address
  22116. , s
  22117. p A[25:0]
  22118. a →→ F
  22119. g (
  22120. e B E i
  22121. g
  22122. 4 u x u
  22123. t
  22124. 6 s e r
  22125. 6 W r e
  22126. n
  22127. D[63:0] Write Write Write Write Write Write Write Write Write Write Write Write
  22128. o 1
  22129. f i a 4
  22130. d l .
  22131. 8 t 2
  22132. 3 h B 3
  22133. 0 : u
  22134. 6 s
  22135. DREQ0
  22136. 4 / S
  22137. '
  22138. ' i (level
  22139. B 5 n
  22140. i 5 g detection) 1st 2nd 3rd
  22141. (
  22142. t ( l acceptance acceptance acceptance
  22143. s 4 e
  22144. , 4
  22145. S ( A
  22146. D L d
  22147. e d
  22148. R
  22149. DREQ1
  22150. v r
  22151. A e e
  22152. l s
  22153. M D s
  22154. : e M
  22155. R t o
  22156. e
  22157. DRAK0
  22158. o c d
  22159. w t e
  22160. i
  22161. o /
  22162. H n B DMAC-1 DMAC-2 DMAC-3
  22163. i ) u
  22164. t / r
  22165. 3 s
  22166. W
  22167. Bus cycle CPU CPU
  22168. 2 t
  22169. r B- M
  22170. i
  22171. t y o Asserted 2 cycles before Asserted 2 cycles before Asserted 2 cycles before
  22172. e t d
  22173. ) e
  22174. e
  22175. start of bus cycle start of bus cycle start of bus cycle
  22176.  
  22177. B
  22178. l
  22179. o
  22180. c
  22181. DACK0
  22182. k
  22183.  
  22184. T
  22185. r
  22186. a
  22187. n
  22188. s
  22189. f : DREQ sampling and determination of channel priority
  22190. e
  22191. r
  22192.  
  22193. ----------------------- Page 481-----------------------
  22194.  
  22195. 14.3.6 Ending DMA Transfer
  22196.  
  22197. The conditions for ending DMA transfer are different for ending on individual channels and for
  22198. ending on all channels together. Except for the case where transfer ends when the value in the
  22199. DMA transfer count register (DMATCR) reaches 0, the following conditions apply to ending
  22200. transfer.
  22201.  
  22202. 1. Cycle Steal Mode (External Request, On-Chip Peripheral Module Request, Auto-Request)
  22203. When a transfer end condition is satisfied, acceptance of DMAC transfer requests is
  22204. suspended. The DMAC completes transfer for the transfer requests accepted up to the point
  22205. at which the transfer end condition was satisfied, then stops.
  22206. In cycle steal mode, the operation is the same for both edge and level transfer request
  22207. detection.
  22208. 2. Burst Mode, Edge Detection (External Request, On-Chip Peripheral Module Request, Auto-
  22209. Request)
  22210. The delay between the point at which a transfer end condition is satisfied and the point at
  22211. which the DMAC actually stops is the same as in cycle steal mode. In burst mode with edge
  22212. detection, only the first transfer request activates the DMAC, but the timing of stop request
  22213. (DE = 0 in CHCR, DME = 0 in DMAOR) sampling is the same as the transfer request
  22214. sampling timing shown in 4 and 5 under Operation in section 14.3.5. Therefore, a transfer
  22215. request is regarded as having been issued until a stop request is detected, and the
  22216. corresponding processing is executed before the DMAC stops.
  22217. 3. Burst Mode, Level Detection (External Request)
  22218. The delay between the point at which a transfer end condition is satisfied and the point at
  22219. which the DMAC actually stops is the same as in cycle steal mode. As in the case of burst
  22220. mode with edge detection, the timing of stop request (DE = 0 in CHCR, DME = 0 in
  22221. DMAOR) sampling is the same as the transfer request sampling timing shown in 2 and 3
  22222. under Operation in section 14.3.5. Therefore, a transfer request is regarded as having been
  22223. issued until a stop request is detected, and the corresponding processing is executed before
  22224. the DMAC stops.
  22225. 4. Transfer Suspension Bus Timing
  22226. Transfer suspension is executed on completion of processing for one transfer unit. In dual
  22227. address mode transfer, write cycle processing is executed even if a transfer end condition is
  22228. satisfied during the read cycle, and the transfers covered in 1, 2, and 3 above are also
  22229. executed before operation is suspended.
  22230.  
  22231. Rev. 2.0, 02/99, page 467 of 830
  22232.  
  22233. ----------------------- Page 482-----------------------
  22234.  
  22235. Conditions for Ending Transfer on Individual Channels: Transfer ends on the corresponding
  22236. channel when either of the following conditions is satisfied:
  22237.  
  22238. • The value in the DMA transfer count register (DMATCR) reaches 0.
  22239. • The DE bit in the DMA channel control register (CHCR) is cleared to 0.
  22240.  
  22241. 1. End of transfer when DMATCR = 0
  22242. When the DMATCR value reaches 0, DMA transfer ends on the corresponding channel and
  22243. the transfer end flag (TE) in CHCR is set. If the interrupt enable bit (IE) is set at this time, an
  22244. interrupt (DMTE) request is sent to the CPU.
  22245. Transfer ending when DMATCR = 0 does not follow the procedures described in 1, 2, 3, and
  22246. 4 in section 14.3.6.
  22247. 2. End of transfer when DE = 0 in CHCR
  22248. When the DMA enable bit (DE) in CHCR is cleared, DMA transfer is suspended on the
  22249. corresponding channel. The TE bit is not set in this case. Transfer ending in this case follows
  22250. the procedures described in 1, 2, 3, and 4 in section 14.3.6.
  22251.  
  22252. Conditions for Ending Transfer Simultaneously on All Channels: Transfer ends on all
  22253. channels simultaneously when either of the following conditions is satisfied:
  22254.  
  22255. • The address error bit (AE) or NMI flag (NMIF) in the DMA operation register (DMAOR) is
  22256. set.
  22257. • The DMA master enable bit (DME) in DMAOR is cleared to 0.
  22258.  
  22259. 1. End of transfer when AE = 1 in DMAOR
  22260. If the AE bit in DMAOR is set to 1 due to an address error, DMA transfer is suspended on all
  22261. channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is
  22262. passed to the CPU. Therefore, when AE is set to 1, the values in the DMA source address
  22263. register (SAR), DMA destination address register (DAR), and DMA transfer count register
  22264. (DMATCR) indicate the addresses for the DMA transfer to be performed next and the
  22265. remaining number of transfers. The TE bit is not set in this case. Before resuming transfer, it
  22266. is necessary to make a new setting for the channel that caused the address error, then write 0
  22267. to the AE bit after first reading 1 from it. Acceptance of external requests is suspended while
  22268. AE is set to 1, so a DMA transfer request must be reissued when resuming transfer.
  22269. Acceptance of internal requests is also suspended, so when resuming transfer, the DMA
  22270. transfer request enable bit for the relevant on-chip peripheral module must be cleared to 0
  22271. before the new setting is made.
  22272.  
  22273. Rev. 2.0, 02/99, page 468 of 830
  22274.  
  22275. ----------------------- Page 483-----------------------
  22276.  
  22277. 2. End of transfer when NMIF = 1 in DMAOR
  22278. If the NMIF bit in DMAOR is set to 1 due to an NMI interrupt, DMA transfer is suspended
  22279. on all channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the
  22280. bus is passed to the CPU. Therefore, when NMIF is set to 1, the values in the DMA source
  22281. address register (SAR), DMA destination address register (DAR), and DMA transfer count
  22282. register (DMATCR) indicate the addresses for the DMA transfer to be performed next and
  22283. the remaining number of transfers. The TE bit is not set in this case. Before resuming
  22284. transfer after NMI interrupt handling is completed, 0 must be written to the NMIF bit after
  22285. first reading 1 from it. As in the case of AE being set to 1, acceptance of external requests is
  22286. suspended while NMIF is set to 1, so a DMA transfer request must be reissued when
  22287. resuming transfer. Acceptance of internal requests is also suspended, so when resuming
  22288. transfer, the DMA transfer request enable bit for the relevant on-chip peripheral module must
  22289. be cleared to 0 before the new setting is made.
  22290. 3. End of transfer when DME = 0 in DMAOR
  22291. If the DME bit in DMAOR is cleared to 0, DMA transfer is suspended on all channels in
  22292. accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is passed to the
  22293. CPU. The TE bit is not set in this case. When DME is cleared to 0, the values in the DMA
  22294. source address register (SAR), DMA destination address register (DAR), and DMA transfer
  22295. count register (DMATCR) indicate the addresses for the DMA transfer to be performed next
  22296. and the remaining number of transfers. When resuming transfer, DME must be set to 1.
  22297. Operation will then be resumed from the next transfer.
  22298.  
  22299. Rev. 2.0, 02/99, page 469 of 830
  22300.  
  22301. ----------------------- Page 484-----------------------
  22302.  
  22303. 14.4 Examples of Use
  22304.  
  22305. 14.4.1 Examples of Transfer between External Memory and an External Device with
  22306. DACK
  22307.  
  22308. Examples of transfer of data in external memory to an external device with DACK using DMAC
  22309. channel 1 are considered here.
  22310.  
  22311. Table 14.8 shows the transfer conditions and the corresponding register settings.
  22312.  
  22313. Table 14.8 Conditions for Transfer between External Memory and an External Device
  22314. with DACK, and Corresponding Register Settings
  22315.  
  22316. Transfer Conditions Register Set Value
  22317.  
  22318. Transfer source: external memory SAR1 H'0C000000
  22319.  
  22320. Transfer source: external device with DACK DAR1 (Accessed by DACK)
  22321.  
  22322. Number of transfers: 32 DMATCR1 H'00000020
  22323.  
  22324. Transfer source address: decremented CHCR1 H'000022A5
  22325.  
  22326. Transfer destination address: (setting invalid)
  22327.  
  22328. Transfer request source: external pin ('5(4)
  22329. edge detection
  22330.  
  22331. Bus mode: burst
  22332.  
  22333. Transfer unit: word
  22334.  
  22335. No interrupt request at end of transfer
  22336.  
  22337. Channel priority order: 2 > 0 > 1 > 3 DMAOR H'00000201
  22338.  
  22339. Rev. 2.0, 02/99, page 470 of 830
  22340.  
  22341. ----------------------- Page 485-----------------------
  22342.  
  22343. 14.5 On-Demand Data Transfer Mode
  22344.  
  22345. 14.5.1 Operation
  22346.  
  22347. Setting the DDT bit to 1 in DMAOR causes a transition to on-demand data transfer mode (DDT
  22348. mode). In DDT mode, it is possible to specify direct single address mode transfer to channel 0
  22349. via the data bus and DDT module, and simultaneously issue a transfer request, using the
  22350. '%5(4, %$9/, 75, 7'$&., and ID [1:0] signals between an external device and the DMAC.
  22351. Figure 14.24 shows a block diagram of the DMAC, DDT, BU, and an external device (with
  22352. '%5(4, %$9/, 75, 7'$&., and ID [1:0] pins).
  22353.  
  22354. DMAC DDT
  22355. SAR0 Memory
  22356.  
  22357. DAR0
  22358. Data
  22359. DMATCR0 buffer
  22360.  
  22361. CHCR0
  22362. s
  22363. s u
  22364. Request u b
  22365. DREQ0–3 controller b a
  22366. ddtmode s t
  22367. s a
  22368. e D
  22369. r
  22370. d
  22371. bavl TR d External
  22372. ddtmode tdack id[1:0] A device (with
  22373.  
  22374. DTR DBREQ, BAVL,
  22375. BAVL TR, TDACK,
  22376. BSC
  22377. DBREQ
  22378. and ID [1:0])
  22379.  
  22380. Data buffer
  22381. TDACK FIFO or
  22382. ID[1:0] memory
  22383.  
  22384. Figure 14.24 On-Demand Transfer Mode Block Diagram
  22385.  
  22386. For channels 1 to 3, after making the settings for normal DMA transfer using the CPU, a transfer
  22387. request can be issued from an external device using the '%5(4, %$9/, 75, 7'$&., and ID
  22388. [1:0] signals (handshake protocol using the data bus). A transfer request can also be issued
  22389. simply by asserting 75, without using the external bus (handshake protocol without use of the
  22390. data bus). For channel 2, after making the DMA transfer settings in the normal way, a transfer
  22391. request can be issued directly from an external device (with '%5(4, %$9/, 75, 7'$&., and
  22392. ID [1:0] pins) by asserting '%5(4 and 75 simultaneously .
  22393.  
  22394. In DDT mode, there is a choice of five modes for performing DMA transfer.
  22395.  
  22396. Rev. 2.0, 02/99, page 471 of 830
  22397.  
  22398. ----------------------- Page 486-----------------------
  22399.  
  22400. 1. Normal data transfer mode (channel 0)
  22401. %$9/ (the data bus available signal) is asserted in response to '%5(4 (the data bus request
  22402. signal) from an external device. Two CKIO-synchronous cycles after %$9/ is asserted, the
  22403. external data bus drives the data transfer setting command (DTR command) in
  22404. synchronization with 75 (the transfer request signal). The initial settings are then made in
  22405. the DMAC channel 0 control register, and the DMA transfer is processed.
  22406. 2. Normal data transfer mode (except channel 0)
  22407. In this mode, the data transfer settings are made in the DMAC from the CPU, and DMA
  22408. transfer requests only are performed from the external device.
  22409. As in 1 above, '%5(4 is asserted from the external device and the external bus is secured,
  22410. then the DTR command is driven.
  22411. The transfer request channel can be specified by means of the two ID bits in the DTR
  22412. command.
  22413. 3. Handshake protocol using the data bus (valid for channel 0 only)
  22414. This mode is only valid for channel 0.
  22415. After the initial settings have been made in the DMAC channel 0 control register, the DDT
  22416. module asserts a data transfer request for the DMAC by setting the DTR command ID = 00
  22417. and MD = 00, and driving the DTR command.
  22418. 4. Handshake protocol without use of the data bus
  22419. The DDT module includes a function for recording the previously asserted request channel.
  22420. By using this function, it is possible to assert a transfer request for the channel for which a
  22421. request was asserted immediately before, by asserting 75 only from an external device after
  22422. a transfer request has once been made to the channel for which an initial setting has been
  22423. made in the DMAC control register (DTR command and data transfer setting by the CPU in
  22424. the DMAC).
  22425. 5. Direct data transfer mode (valid for channel 2 only)
  22426. A data transfer request can be asserted for channel 2 by asserting '5(4 and 75
  22427. simultaneously from an external device after the initial settings have been made in the
  22428. DMAC channel 2 control register.
  22429.  
  22430. Note: For details of the DTR format setting procedure, see Appendix G, SH7750 On-Demand
  22431. Data Transfer Mode.
  22432.  
  22433. Rev. 2.0, 02/99, page 472 of 830
  22434.  
  22435. ----------------------- Page 487-----------------------
  22436.  
  22437. 14.5.2 Notes on Use of DDT Module
  22438.  
  22439. 1. The handshake protocol without use of the data bus is always used, except in the case where
  22440. 75 is asserted two cycles after %$9/ is asserted (and excluding requests to channel 2 by
  22441. means of simultaneous assertion of '%5(4 and 75).
  22442. 2. If a request to channel 2 is asserted by simultaneous assertion of '%5(4 and 75 during
  22443. execution with the handshake protocol without use of the data bus, it is accepted if there is
  22444. space in the channel 2 request queue.
  22445. 3. With the handshake protocol without use of the data bus, a DMA transfer request can be
  22446. asserted again for the channel for which transfer was requested immediately before by
  22447. asserting 75 only.
  22448. 4. When channel 0 is operated using the handshake protocol without use of the data bus, MD ≠
  22449. 00 should always be transferred as initialization data*. Operation is not guaranteed if the
  22450. handshake protocol is executed without transferring initialization data.
  22451. Note: * Initialization data: MD ≠ 00, ID = 00, SZ, R/W, COUNT, ADDRESS.
  22452.  
  22453. 5. If only 75 is asserted when operating other than with the handshake protocol without use of
  22454. the data bus, this is ignored by the DDT module (which does not operate).
  22455. 6. Operation is not guaranteed if the handshake protocol using the data bus is executed for
  22456. channel 0 without transferring initialization data. (A request only is asserted for the DMAC.)
  22457. 7. The DDT module is provided with four request queues for each of channels 1 to 3. If a
  22458. request from an external device is asserted when these request queues are full, it will be
  22459. ignored. (Channel 0 has a request flag; requests asserted while this flag is set are ignored.)
  22460. 8. The DDT module uses the following procedure to process ID, MD, and SZ:
  22461. When ID = 00
  22462. a. MD = 00: ID, MD select (handshake with data bus)
  22463. b. MD ≠ 00, SZ = 111: DMAC (CHCR0 DE bit) setting (transfer end request)
  22464. c. MD ≠ 00: ADDRESS, COUNT, MD, RW, SZ, ID select (data transfer to DMAC)
  22465. When ID ≠ 00
  22466. a. Request to channels 1–3 (items other than ID ignored)
  22467. 9. A data transfer end request (ID = 00, MD ≠ 00, SZ = 111) is not accepted when the channel 0
  22468. request flag in the DDT module is set (is not accepted during the bus cycle). Therefore, if the
  22469. DTR command initialization data settings are ID = 00 and MD = 01 (edge sensing and burst
  22470. transfer), transfer cannot be halted midway. (Set MD to a value other than 01.)
  22471. 10. The handshake protocol using the data bus applies only to channel 0 (MD = 00).
  22472. 11. Except when DTR.ID = 00, data other than DTR.ID is ignored.
  22473. 12. A channel 0 DMA transfer halt request can be implemented by settings of DTR.ID = 00,
  22474. DTR.MD ≠ 00, and DTR.SZ = 111. Values set in DMAC control registers, etc., are retained.
  22475. DMAC register reads are possible, but an execution restart from an external device is not
  22476. possible.
  22477.  
  22478. Rev. 2.0, 02/99, page 473 of 830
  22479.  
  22480. ----------------------- Page 488-----------------------
  22481.  
  22482. 13. If a request is asserted for a channel other than channel 0 during execution with the
  22483. handshake protocol using the data bus, and settings of DTR.ID = 00 and DTR.MD = 00 are
  22484. sent by an external device with the handshake protocol using the data bus after DMA transfer
  22485. has been executed on that channel, a request to channel 0 is asserted. (Initialization data need
  22486. not be set when continuing in this way.)
  22487. 14.'%5(4 is already used as a bus arbitration signal, but when a request to channel 2 is
  22488. asserted by means of simultaneous assertion of '%5(4 and 75, '%5(4 is not interpreted
  22489. as a bus arbitration signal (i.e., %$9/ is not asserted by this signal).
  22490. 15. It takes one cycle for '%5(4 to be accepted by the DDT module after being asserted by an
  22491. external device, but if %$9/ is asserted from the BSC at this time, %$9/ is not asserted
  22492. since the '%5(4 assertion by the external device is not reported to the BSC.
  22493. 16. When settings of ID = 00, MD = 10, and SZ = 110 are transferred to the DDT module, the
  22494. DDT channel 0 request flag and channel 1 to 3 request queues are cleared. (If a transfer
  22495. request to a particular channel is followed by another request to the same channel while the
  22496. TE bit in CHCR remains set to 1, request queue clearance is necessary since the DMAC is
  22497. halted.)
  22498. 17. When 75 only is asserted in the handshake protocol using the data bus while the channel 0
  22499. TE flag is set after the end of the last DMA transfer, the TE flag must be cleared.
  22500. If a transfer request is sent by asserting 75 only for channel 0 when the channel 0 TE flag is
  22501. set, the DMAC will freeze. In this case, the flag can be cleared as described in 16 above.
  22502. 18. After '%5(4 is asserted, do not assert '%5(4 again until %$9/ is asserted, as this will
  22503. result in a discrepancy between the number of '%5(4 and %$9/ assertions.
  22504. 19. Check that DMA transfer is not in progress before modifying the DDT bit in DMAOR. If
  22505. DMAOR.DDT is cleared to 0 during DMA transfer in DDT mode, the DMAC will freeze. In
  22506. this case, the flag can be cleared as described in 16 above.
  22507.  
  22508. Rev. 2.0, 02/99, page 474 of 830
  22509.  
  22510. ----------------------- Page 489-----------------------
  22511.  
  22512. 14.6 Usage Notes
  22513.  
  22514. 1. When modifying SAR0–SAR3, DAR0–DAR3, DMATCR0–DMATCR3, and CHCR0–
  22515. CHCR3, first clear the DE bit for the relevant channel to 0.
  22516. 2. The NMIF bit in DMAOR is set when an NMI interrupt is input even if the DMAC is not
  22517. operating.
  22518. Confirmation method when DMA transfer is not executed correctly:
  22519. Read the NMIF, AE, and DME bits in DMAOR, the DE and TE bits in CHCR0–CHCR3, and
  22520. DMATCR0–DMATCR3. If NMIF was set before the transfer, the DMATCR transfer count
  22521. will remain at the set value. If NMIF was set during the transfer, when the DE bit is 1 and the
  22522. TE bit is 0 in CHCR0–CHCR3, the DMATCR value will indicate the remaining number of
  22523. transfers.
  22524. Also, the next addresses to be accessed can be found by reading SAR0–SAR3 and DAR0–
  22525. DAR3. If the AE bit has been set, an address error has occurred. Check the set values in
  22526. CHCR, SAR, and DAR.
  22527. 3. Check that DMA transfer is not in progress before making a transition to the module standby
  22528. state, standby mode, or deep sleep mode.
  22529. Either check that TE = 1 in CHCR0–CHCR3, or clear DME to 0 in DMAOR to terminate
  22530. DMA transfer. When DME is cleared to 0 in DMAOR, transfer halts at the end of the
  22531. currently executing DMA bus cycle. Note, therefore, that transfer may not end immediately,
  22532. depending on the transfer data size. DMA operation is not guaranteed if the module standby
  22533. state, standby mode, or deep sleep mode is entered without confirming that DMA transfer
  22534. has ended.
  22535. 4. Do not specify a DMAC, CCN, BIST, BSC, or UBC control register as the DMAC transfer
  22536. source or destination.
  22537. 5. When activating the DMAC, make the SAR, DAR, and DMATCR register settings for the
  22538. relevant channel before setting DE to 1 in CHCR, or make the register settings with DE
  22539. cleared to 0 in CHCR, then set DE to 1. It does not matter whether setting of the DME bit to
  22540. 1 in DMAOR is carried out first or last. To operate the relevant channel, DME and DE must
  22541. both be set to 1. The DMAC may not operate normally if the SAR, DAR, and DMATCR
  22542. settings are not made (with the exception of the unused register in single address mode).
  22543. 6. After the DMATCR count reaches 0 and DMA transfer ends normally, always write 0 to
  22544. DMATCR even when executing the maximum number of transfers on the same channel.
  22545. 7. When falling edge detection is used for external requests, keep the external request pin high
  22546. when making DMAC settings.
  22547. 8. When using the DMAC in single address mode, set an external address as the address. All
  22548. channels will halt due to an address error if an on-chip peripheral module address is set.
  22549.  
  22550. Rev. 2.0, 02/99, page 475 of 830
  22551.  
  22552. ----------------------- Page 490-----------------------
  22553.  
  22554. Rev. 2.0, 02/99, page 476 of 830
  22555.  
  22556. ----------------------- Page 491-----------------------
  22557.  
  22558. Section 15 Serial Communication Interface (SCI)
  22559.  
  22560. 15.1 Overview
  22561.  
  22562. The SH7750 is equipped with a single-channel serial communication interface (SCI) and a
  22563. single-channel serial communication interface with built-in FIFO registers (SCI with FIFO:
  22564. SCIF).
  22565.  
  22566. The SCI can handle both asynchronous and synchronous serial communication. A function is
  22567. also provided for serial communication between processors (multiprocessor communication
  22568. function).
  22569.  
  22570. The SCI supports a smart card interface conforming to ISO/IEC 7816-3 (Identification Card) as a
  22571. serial communication interface function for IC card interface use. For details, see section 17,
  22572. Smart Card Interface.
  22573.  
  22574. The SCIF is a dedicated asynchronous communication serial interface with built-in 16-stage
  22575. FIFO registers for both transmission and reception. For details, see section 16, Serial
  22576. Communication Interface with FIFO.
  22577.  
  22578. 15.1.1 Features
  22579.  
  22580. SCI features are listed below.
  22581.  
  22582. • Choice of synchronous or asynchronous serial communication mode
  22583.  Asynchronous mode
  22584. Serial data communication is executed using an asynchronous system in which
  22585. synchronization is achieved character by character. Serial data communication can be
  22586. carried out with standard asynchronous communication chips such as a Universal
  22587. Asynchronous Receiver/Transmitter (UART) or Asynchronous Communication Interface
  22588. Adapter (ACIA). A multiprocessor communication function is also provided that enables
  22589. serial data communication with a number of processors.
  22590. There is a choice of 12 serial data transfer formats.
  22591. Data length: 7 or 8 bits
  22592. Stop bit length: 1 or 2 bits
  22593. Parity: Even/odd/none
  22594. Multiprocessor bit: 1 or 0
  22595. Receive error detection: Parity, overrun, and framing errors
  22596. Break detection: A break can be detected by reading the RxD pin level directly
  22597. from the serial port register (SCSPTR1) when a framing error
  22598. occurs.
  22599.  
  22600. Rev. 2.0, 02/99, page 477 of 830
  22601.  
  22602. ----------------------- Page 492-----------------------
  22603.  
  22604.  Synchronous mode
  22605. Serial data communication is synchronized with a clock. Serial data communication can
  22606. be carried out with other chips that have a synchronous communication function.
  22607. There is a single serial data transfer format.
  22608. Data length: 8 bits
  22609. Receive error detection: Overrun errors
  22610. • Full-duplex communication capability
  22611. The transmitter and receiver are mutually independent, enabling transmission and reception
  22612. to be executed simultaneously. Double-buffering is used in both the transmitter and the
  22613. receiver, enabling continuous transmission and continuous reception of serial data.
  22614. • On-chip baud rate generator allows any bit rate to be selected.
  22615. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  22616. SCK pin
  22617. • Four interrupt sources
  22618. There are four interrupt sources—transmit-data-empty, transmit-end, receive-data-full, and
  22619. receive-error—that can issue requests independently. The transmit-data-empty interrupt and
  22620. receive-data-full interrupt can activate the DMA controller (DMAC) to execute a data
  22621. transfer.
  22622. • When not in use, the SCI can be stopped by halting its clock supply to reduce power
  22623. consumption.
  22624.  
  22625. Rev. 2.0, 02/99, page 478 of 830
  22626.  
  22627. ----------------------- Page 493-----------------------
  22628.  
  22629. 15.1.2 Block Diagram
  22630.  
  22631. Figure 15.1 shows a block diagram of the SCI.
  22632.  
  22633. e
  22634. c Internal
  22635. a
  22636. Module data bus f data bus
  22637. r
  22638. e
  22639. t
  22640. n
  22641. i
  22642.  
  22643. s
  22644. u
  22645. B
  22646.  
  22647. SCRDR1 SCTDR1 SCSSR1 SCBRR1
  22648. SCSCR1
  22649. Pφ
  22650. SCSMR1
  22651. RxD SCRSR1 SCTSR1
  22652. SCSPTR1 Baud rate Pφ/4
  22653. generator
  22654. Transmission/
  22655. Pφ/16
  22656. reception
  22657. control
  22658. TxD Pφ/64
  22659. Parity generation Clock
  22660.  
  22661. Parity check
  22662. External clock
  22663. SCK
  22664. TEI
  22665. TXI
  22666. RXI
  22667. ERI
  22668.  
  22669. SCI
  22670.  
  22671. SCRSR1: Receive shift register
  22672. SCRDR1: Receive data register
  22673. SCTSR1: Transmit shift register
  22674. SCTDR1: Transmit data register
  22675. SCSMR1: Serial mode register
  22676. SCSCR1: Serial control register
  22677. SCSSR1: Serial status register
  22678. SCBRR1: Bit rate register
  22679. SCSPTR1: Serial port register
  22680.  
  22681. Figure 15.1 Block Diagram of SCI
  22682.  
  22683. Rev. 2.0, 02/99, page 479 of 830
  22684.  
  22685. ----------------------- Page 494-----------------------
  22686.  
  22687. 15.1.3 Pin Configuration
  22688.  
  22689. Table 15.1 shows the SCI pin configuration.
  22690.  
  22691. Table 15.1 SCI Pins
  22692.  
  22693. Pin Name Abbreviation I/O Function
  22694.  
  22695. Serial clock pin MD0/SCK I/O Clock input/output
  22696.  
  22697. Receive data pin RxD Input Receive data input
  22698.  
  22699. Transmit data pin MD7/TxD Output Transmit data output
  22700.  
  22701. Note: The serial clock pin and transmit data pin function as mode input pins MD0 and MD7
  22702. after a power-on reset. They are made to function as serial pins by performing SCI
  22703. operation settings with the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/$ bit in
  22704. SCSMR1. Break state transmission and detection, can be set in the SCI’s SCSPTR1
  22705. register.
  22706.  
  22707. 15.1.4 Register Configuration
  22708.  
  22709. The SCI has the internal registers shown in table 15.2. These registers are used to specify
  22710. asynchronous mode or synchronous mode, the data format, and the bit rate, and to perform
  22711. transmitter/receiver control.
  22712.  
  22713. With the exception of the serial port register, the SCI registers are initialized in standby mode
  22714. and in the module standby state as well as after a power-on reset or manual reset. When
  22715. recovering from standby mode or the module standby state, the registers must be set again.
  22716.  
  22717. Table 15.2 SCI Registers
  22718.  
  22719. Initial Area 7 Access
  22720. Name Abbreviation R/W Value P4 Address Address Size
  22721.  
  22722. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  22723.  
  22724. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  22725.  
  22726. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  22727.  
  22728. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  22729. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  22730.  
  22731. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  22732. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  22733.  
  22734. Notes: 1. Only 0 can be written, to clear flags.
  22735. 2. The value of bits 2 and 0 is undefined.
  22736.  
  22737. Rev. 2.0, 02/99, page 480 of 830
  22738.  
  22739. ----------------------- Page 495-----------------------
  22740.  
  22741. 15.2 Register Descriptions
  22742.  
  22743. 15.2.1 Receive Shift Register (SCRSR1)
  22744.  
  22745. Bit: 7 6 5 4 3 2 1 0
  22746.  
  22747. R/W: — — — — — — — —
  22748.  
  22749. SCRSR1 is the register used to receive serial data.
  22750.  
  22751. The SCI sets serial data input from the RxD pin in SCRSR1 in the order received, starting with
  22752. the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it is
  22753. transferred to SCRDR1 automatically.
  22754.  
  22755. SCRSR1 cannot be directly read or written to by the CPU.
  22756.  
  22757. 15.2.2 Receive Data Register (SCRDR1)
  22758.  
  22759. Bit: 7 6 5 4 3 2 1 0
  22760.  
  22761. Initial value: 0 0 0 0 0 0 0 0
  22762.  
  22763. R/W: R R R R R R R R
  22764.  
  22765. SCRDR1 is the register that stores received serial data.
  22766.  
  22767. When the SCI has received one byte of serial data, it transfers the received data from SCRSR1 to
  22768. SCRDR1 where it is stored, and completes the receive operation. SCRSR1 is then enabled for
  22769. reception.
  22770.  
  22771. Since SCRSR1 and SCRDR1 function as a double buffer in this way, it is possible to receive data
  22772. continuously.
  22773.  
  22774. SCRDR1 is a read-only register, and cannot be written to by the CPU.
  22775.  
  22776. SCRDR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  22777. module standby state.
  22778.  
  22779. Rev. 2.0, 02/99, page 481 of 830
  22780.  
  22781. ----------------------- Page 496-----------------------
  22782.  
  22783. 15.2.3 Transmit Shift Register (SCTSR1)
  22784.  
  22785. Bit: 7 6 5 4 3 2 1 0
  22786.  
  22787. R/W: — — — — — — — —
  22788.  
  22789. SCTSR1 is the register used to transmit serial data.
  22790.  
  22791. To perform serial data transmission, the SCI first transfers transmit data from SCTDR1 to
  22792. SCTSR1, then sends the data to the TxD pin starting with the LSB (bit 0).
  22793.  
  22794. When transmission of one byte is completed, the next transmit data is transferred from SCTDR1
  22795. to SCTSR1, and transmission started, automatically. However, data transfer from SCTDR1 to
  22796. SCTSR1 is not performed if the TDRE flag in the serial status register (SCSSR1) is set to 1.
  22797.  
  22798. SCTSR1 cannot be directly read or written to by the CPU.
  22799.  
  22800. 15.2.4 Transmit Data Register (SCTDR1)
  22801.  
  22802. Bit: 7 6 5 4 3 2 1 0
  22803.  
  22804. Initial value: 1 1 1 1 1 1 1 1
  22805.  
  22806. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  22807.  
  22808. SCTDR1 is an 8-bit register that stores data for serial transmission.
  22809.  
  22810. When the SCI detects that SCTSR1 is empty, it transfers the transmit data written in SCTDR1 to
  22811. SCTSR1 and starts serial transmission. Continuous serial transmission can be carried out by
  22812. writing the next transmit data to SCTDR1 during serial transmission of the data in SCTSR1.
  22813.  
  22814. SCTDR1 can be read or written to by the CPU at all times.
  22815.  
  22816. SCTDR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  22817. module standby state.
  22818.  
  22819. Rev. 2.0, 02/99, page 482 of 830
  22820.  
  22821. ----------------------- Page 497-----------------------
  22822.  
  22823. 15.2.5 Serial Mode Register (SCSMR1)
  22824.  
  22825. Bit: 7 6 5 4 3 2 1 0
  22826.  
  22827. C/$ CHR PE O/( STOP MP CKS1 CKS0
  22828.  
  22829. Initial value: 0 0 0 0 0 0 0 0
  22830.  
  22831. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  22832.  
  22833. SCSMR1 is an 8-bit register used to set the SCI’s serial transfer format and select the baud rate
  22834. generator clock source.
  22835.  
  22836. SCSMR1 can be read or written to by the CPU at all times.
  22837.  
  22838. SCSMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  22839. module standby state.
  22840.  
  22841. Bit 7—Communication Mode (C/$): Selects asynchronous mode or synchronous mode as the
  22842. $
  22843. SCI operating mode.
  22844.  
  22845. Bit 7: C/$ Description
  22846. $
  22847.  
  22848. 0 Asynchronous mode (Initial value)
  22849.  
  22850. 1 Synchronous mode
  22851.  
  22852. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the data length in asynchronous mode.
  22853. In synchronous mode, a fixed data length of 8 bits is used regardless of the CHR setting,
  22854.  
  22855. Bit 6: CHR Description
  22856.  
  22857. 0 8-bit data (Initial value)
  22858.  
  22859. 1 7-bit data*
  22860.  
  22861. Note: * When 7-bit data is selected, the MSB (bit 7) of SCTDR1 is not transmitted.
  22862.  
  22863. Bit 5—Parity Enable (PE): In asynchronous mode, selects whether or not parity bit addition is
  22864. performed in transmission, and parity bit checking in reception. In synchronous mode, parity bit
  22865. addition and checking is not performed, regardless of the PE bit setting.
  22866.  
  22867. Bit 5: PE Description
  22868.  
  22869. 0 Parity bit addition and checking disabled (Initial value)
  22870.  
  22871. 1 Parity bit addition and checking enabled*
  22872.  
  22873. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/( bit is added to
  22874. transmit data before transmission. In reception, the parity bit is checked for the parity
  22875. (even or odd) specified by the O/( bit.
  22876.  
  22877. Rev. 2.0, 02/99, page 483 of 830
  22878.  
  22879. ----------------------- Page 498-----------------------
  22880.  
  22881. Bit 4—Parity Mode (O/(): Selects either even or odd parity for use in parity addition and
  22882. (
  22883. checking. The O/( bit setting is only valid when the PE bit is set to 1, enabling parity bit addition
  22884. and checking, in asynchronous mode. The O/( bit setting is invalid in synchronous mode, and
  22885. when parity addition and checking is disabled in asynchronous mode.
  22886.  
  22887. Bit 4: O/( Description
  22888. (
  22889. 0 Even parity*1 (Initial value)
  22890.  
  22891. 2
  22892. 1 Odd parity*
  22893.  
  22894. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the
  22895. total number of 1-bits in the transmit character plus the parity bit is even. In reception,
  22896. a check is performed to see if the total number of 1-bits in the receive character plus
  22897. the parity bit is even.
  22898. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  22899. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  22900. check is performed to see if the total number of 1-bits in the receive character plus the
  22901. parity bit is odd.
  22902.  
  22903. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length in asynchronous mode.
  22904. The STOP bit setting is only valid in asynchronous mode. If synchronous mode is set, the STOP
  22905. bit setting is invalid since stop bits are not added.
  22906.  
  22907. Bit 3: STOP Description
  22908. 0 1 stop bit*1 (Initial value)
  22909.  
  22910. 2
  22911. 1 2 stop bits*
  22912.  
  22913. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  22914. before it is sent.
  22915. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  22916. before it is sent.
  22917.  
  22918. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  22919. stop bit is 1, it is treated as a stop bit; if it is 0, it is treated as the start bit of the next transmit
  22920. character.
  22921.  
  22922. Rev. 2.0, 02/99, page 484 of 830
  22923.  
  22924. ----------------------- Page 499-----------------------
  22925.  
  22926. Bit 2—Multiprocessor Mode (MP): Selects a multiprocessor format. When a multiprocessor
  22927. format is selected, the PE bit and O/( bit parity settings are invalid. The MP bit setting is only
  22928. valid in asynchronous mode; it is invalid in synchronous mode.
  22929.  
  22930. For details of the multiprocessor communication function, see section 15.3.3, Multiprocessor
  22931. Communication Function.
  22932.  
  22933. Bit 2: MP Description
  22934.  
  22935. 0 Multiprocessor function disabled (Initial value)
  22936.  
  22937. 1 Multiprocessor format selected
  22938.  
  22939. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source for the
  22940. on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and Pφ/64,
  22941. according to the setting of bits CKS1 and CKS0.
  22942.  
  22943. For the relation between the clock source, the bit rate register setting, and the baud rate, see
  22944. section 15.2.9, Bit Rate Register (SCBRR1).
  22945.  
  22946. Bit 1: CKS1 Bit 0: CKS0 Description
  22947.  
  22948. 0 0 Pφ clock (Initial value)
  22949.  
  22950. 1 Pφ/4 clock
  22951.  
  22952. 1 0 Pφ/16 clock
  22953.  
  22954. 1 Pφ/64 clock
  22955.  
  22956. Note: Pφ: Peripheral clock
  22957.  
  22958. Rev. 2.0, 02/99, page 485 of 830
  22959.  
  22960. ----------------------- Page 500-----------------------
  22961.  
  22962. 15.2.6 Serial Control Register (SCSCR1)
  22963.  
  22964. Bit: 7 6 5 4 3 2 1 0
  22965.  
  22966. TIE RIE TE RE MPIE TEIE CKE1 CKE0
  22967.  
  22968. Initial value: 0 0 0 0 0 0 0 0
  22969.  
  22970. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  22971.  
  22972. The SCSCR1 register performs enabling or disabling of SCI transfer operations, serial clock
  22973. output in asynchronous mode, and interrupt requests, and selection of the serial clock source.
  22974.  
  22975. SCSCR1 can be read or written to by the CPU at all times.
  22976.  
  22977. SCSCR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  22978. module standby state.
  22979.  
  22980. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-data-empty interrupt
  22981. (TXI) request generation when serial transmit data is transferred from SCTDR1 to SCTSR1 and
  22982. the TDRE flag in SCSSR1 is set to 1.
  22983.  
  22984. Bit 7: TIE Description
  22985.  
  22986. 0 Transmit-data-empty interrupt (TXI) request disabled* (Initial value)
  22987.  
  22988. 1 Transmit-data-empty interrupt (TXI) request enabled
  22989.  
  22990. Note: * TXI interrupt requests can be cleared by reading 1 from the TDRE flag, then clearing it to
  22991. 0, or by clearing the TIE bit to 0.
  22992.  
  22993. Bit 6—Receive Interrupt Enable (RIE): Enables or disables receive-data-full interrupt (RXI)
  22994. request and receive-error interrupt (ERI) request generation when serial receive data is
  22995. transferred from SCRSR1 to SCRDR1 and the RDRF flag in SCSSR1 is set to 1.
  22996.  
  22997. Bit 6: RIE Description
  22998.  
  22999. 0 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  23000. request disabled* (Initial value)
  23001.  
  23002. 1 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  23003. request enabled
  23004.  
  23005. Note: * RXI and ERI interrupt requests can be cleared by reading 1 from the RDRF flag, or the
  23006. FER, PER, or ORER flag, then clearing the flag to 0, or by clearing the RIE bit to 0.
  23007.  
  23008. Rev. 2.0, 02/99, page 486 of 830
  23009.  
  23010. ----------------------- Page 501-----------------------
  23011.  
  23012. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the SCI.
  23013.  
  23014. Bit 5: TE Description
  23015. 0 Transmission disabled*1 (Initial value)
  23016.  
  23017. 2
  23018. 1 Transmission enabled*
  23019. Notes: 1. The TDRE flag in SCSSR1 is fixed at 1.
  23020. 2. In this state, serial transmission is started when transmit data is written to SCTDR1
  23021. and the TDRE flag in SCSSR1 is cleared to 0.
  23022. SCSMR1 setting must be performed to decide the transmit format before setting the
  23023. TE bit to 1.
  23024.  
  23025. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCI.
  23026.  
  23027. Bit 4: RE Description
  23028. 0 Reception disabled*1 (Initial value)
  23029.  
  23030. 2
  23031. 1 Reception enabled*
  23032. Notes: 1. Clearing the RE bit to 0 does not affect the RDRF, FER, PER, and ORER flags, which
  23033. retain their states.
  23034. 2. Serial reception is started in this state when a start bit is detected in asynchronous
  23035. mode or serial clock input is detected in synchronous mode.
  23036. SCSMR1 setting must be performed to decide the receive format before setting the
  23037. RE bit to 1.
  23038.  
  23039. Bit 3—Multiprocessor Interrupt Enable (MPIE): Enables or disables multiprocessor
  23040. interrupts. The MPIE bit setting is only valid in asynchronous mode when the MP bit in
  23041. SCSMR1 is set to 1.
  23042.  
  23043. The MPIE bit setting is invalid in synchronous mode or when the MP bit is cleared to 0.
  23044.  
  23045. Bit 3: MPIE Description
  23046. 0 Multiprocessor interrupts disabled (normal reception performed) (Initial value)
  23047. [Clearing conditions]
  23048. • When the MPIE bit is cleared to 0
  23049. • When data with MPB = 1 is received
  23050.  
  23051. 1 Multiprocessor interrupts enabled*
  23052. Receive interrupt (RXI) requests, receive-error interrupt (ERI) requests, and setting of the
  23053. RDRF, FER, and ORER flags in SCSSR1 are disabled until data with the multiprocessor
  23054. bit set to 1 is received.
  23055.  
  23056. Note: * Receive data transfer from SCRSR1 to SCRDR1, receive error detection, and setting of
  23057. the RDRF, FER, and ORER flags in SCSSR1, is not performed. When receive data
  23058. including MPB = 1 is received, the MPB bit in SCSSR1 is set to 1, the MPIE bit is cleared
  23059. to 0 automatically, and generation of RXI and ERI interrupts (when the TIE and RIE bits in
  23060. SCSCR1 are set to 1) and FER and ORER flag setting is enabled.
  23061.  
  23062. Rev. 2.0, 02/99, page 487 of 830
  23063.  
  23064. ----------------------- Page 502-----------------------
  23065.  
  23066. Bit 2—Transmit-End interrupt Enable (TEIE): Enables or disables transmit-end interrupt
  23067. (TEI) request generation when there is no valid transmit data in SCTDR1 at the time for MSB
  23068. data transmission.
  23069.  
  23070. Bit 2: TEIE Description
  23071.  
  23072. 0 Transmit-end interrupt (TEI) request disabled* (Initial value)
  23073.  
  23074. 1 Transmit-end interrupt (TEI) request enabled*
  23075.  
  23076. Note: * TEI interrupt requests can be cleared by reading 1 from the TDRE flag in SCSSR1, then
  23077. clearing it to 0 and clearing the TEND flag to 0, or by clearing the TEIE bit to 0.
  23078.  
  23079. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits are used to select the SCI
  23080. clock source and enable or disable clock output from the SCK pin. The combination of the CKE1
  23081. and CKE0 bits determines whether the SCK pin functions as the serial clock output pin or the
  23082. serial clock input pin.
  23083.  
  23084. The setting of the CKE0 bit, however, is only valid for internal clock operation (CKE1 = 0) in
  23085. asynchronous mode. The CKE0 bit setting is invalid in synchronous mode and in the case of
  23086. external clock operation (CKE1 = 1). The CKE1 and CKE0 bits must be set before determining
  23087. the SCI’s operating mode with SCSMR1.
  23088.  
  23089. For details of clock source selection, see table 15.9 in section 15.3, Operation.
  23090.  
  23091. Bit 1: CKE1 Bit 0: CKE0 Description
  23092. 0 0 Asynchronous mode Internal clock/SCK pin functions as
  23093. input pin (input signal ignored)*1
  23094.  
  23095. Synchronous mode Internal clock/SCK pin functions as
  23096. serial clock output*1
  23097.  
  23098. 1 Asynchronous mode Internal clock/SCK pin functions as
  23099. clock output*2
  23100.  
  23101. Synchronous mode Internal clock/SCK pin functions as
  23102. serial clock output
  23103. 1 0 Asynchronous mode External clock/SCK pin functions as
  23104. clock input*3
  23105.  
  23106. Synchronous mode External clock/SCK pin functions as
  23107. serial clock input
  23108. 1 Asynchronous mode External clock/SCK pin functions as
  23109. clock input*3
  23110.  
  23111. Synchronous mode External clock/SCK pin functions as
  23112. serial clock input
  23113. Notes: 1. Initial value
  23114. 2. Outputs a clock of the same frequency as the bit rate.
  23115. 3. Inputs a clock with a frequency 16 times the bit rate.
  23116.  
  23117. Rev. 2.0, 02/99, page 488 of 830
  23118.  
  23119. ----------------------- Page 503-----------------------
  23120.  
  23121. 15.2.7 Serial Status Register (SCSSR1)
  23122.  
  23123. Bit: 7 6 5 4 3 2 1 0
  23124.  
  23125. TDRE RDRF ORER FER PER TEND MPB MPBT
  23126.  
  23127. Initial value: 1 0 0 0 0 1 0 0
  23128.  
  23129. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  23130.  
  23131. Note: * Only 0 can be written, to clear the flag.
  23132.  
  23133. SCSSR1 is an 8-bit register containing status flags that indicate the operating status of the SCI,
  23134. and multiprocessor bits.
  23135.  
  23136. SCSSR1 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  23137. TDRE, RDRF, ORER, PER, and FER. Also note that in order to clear these flags they must be
  23138. read as 1 beforehand. The TEND flag and MPB flag are read-only flags and cannot be modified.
  23139.  
  23140. SCSSR1 is initialized to H'84 by a power-on reset or manual reset, in standby mode, and in the
  23141. module standby state.
  23142.  
  23143. Bit 7—Transmit Data Register Empty (TDRE): Indicates that data has been transferred from
  23144. SCTDR1 to SCTSR1 and the next serial transmit data can be written to SCTDR1.
  23145.  
  23146. Bit 7: TDRE Description
  23147.  
  23148. 0 Valid transmit data has been written to SCTDR1
  23149.  
  23150. [Clearing conditions]
  23151.  
  23152. • When 0 is written to TDRE after reading TDRE = 1
  23153.  
  23154. • When data is written to SCTDR1 by the DMAC
  23155.  
  23156. 1 There is no valid transmit data in SCTDR1 (Initial value)
  23157.  
  23158. [Setting conditions]
  23159.  
  23160. • Power-on reset, manual reset, standby mode, or module standby
  23161.  
  23162. • When the TE bit in SCSCR1 is 0
  23163.  
  23164. • When data is transferred from SCTDR1 to SCTSR1 and data can be
  23165. written to SCTDR1
  23166.  
  23167. Rev. 2.0, 02/99, page 489 of 830
  23168.  
  23169. ----------------------- Page 504-----------------------
  23170.  
  23171. Bit 6—Receive Data Register Full (RDRF): Indicates that the received data has been stored in
  23172. SCRDR1.
  23173.  
  23174. Bit 6: RDRF Description
  23175.  
  23176. 0 There is no valid receive data in SCRDR1 (Initial value)
  23177.  
  23178. [Clearing conditions]
  23179.  
  23180. • Power-on reset, manual reset, standby mode, or module standby
  23181.  
  23182. • When 0 is written to RDRF after reading RDRF = 1
  23183.  
  23184. • When data in SCRDR1 is read by the DMAC
  23185.  
  23186. 1 There is valid receive data in SCRDR1
  23187.  
  23188. [Setting condition]
  23189.  
  23190. When serial reception ends normally and receive data is transferred from
  23191. SCRSR1 to SCRDR1
  23192.  
  23193. Note: SCRDR1 and the RDRF flag are not affected and retain their previous values when an
  23194. error is detected during reception or when the RE bit in SCSCR1 is cleared to 0.
  23195. If reception of the next data is completed while the RDRF flag is still set to 1, an overrun
  23196. error will occur and the receive data will be lost.
  23197.  
  23198. Bit 5—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  23199. causing abnormal termination.
  23200.  
  23201. Bit 5: ORER Description
  23202. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23203.  
  23204. [Clearing conditions]
  23205.  
  23206. • Power-on reset, manual reset, standby mode, or module standby
  23207.  
  23208. • When 0 is written to ORER after reading ORER = 1
  23209.  
  23210. 2
  23211. 1 An overrun error occurred during reception*
  23212.  
  23213. [Setting condition]
  23214.  
  23215. When the next serial reception is completed while RDRF = 1
  23216.  
  23217. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in
  23218. SCSCR1 is cleared to 0.
  23219. 2. The receive data prior to the overrun error is retained in SCRDR1, and the data
  23220. received subsequently is lost. Serial reception cannot be continued while the ORER
  23221. flag is set to 1. In synchronous mode, serial transmission cannot be continued either.
  23222.  
  23223. Rev. 2.0, 02/99, page 490 of 830
  23224.  
  23225. ----------------------- Page 505-----------------------
  23226.  
  23227. Bit 4—Framing Error (FER): Indicates that a framing error occurred during reception in
  23228. asynchronous mode, causing abnormal termination.
  23229.  
  23230. Bit 4: FER Description
  23231. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23232.  
  23233. [Clearing conditions]
  23234.  
  23235. • Power-on reset, manual reset, standby mode, or module standby
  23236.  
  23237. • When 0 is written to FER after reading FER = 1
  23238.  
  23239. 1 A framing error occurred during reception
  23240.  
  23241. [Setting condition]
  23242.  
  23243. When the SCI checks whether the stop bit at the end of the receive data is
  23244. 2
  23245. 1 when reception ends, and the stop bit is 0*
  23246.  
  23247. Notes: 1. The FER flag is not affected and retains its previous state when the RE bit in SCSCR1
  23248. is cleared to 0.
  23249. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop
  23250. bit is not checked. If a framing error occurs, the receive data is transferred to SCRDR1
  23251. but the RDRF flag is not set. Serial reception cannot be continued while the FER flag
  23252. is set to 1.
  23253.  
  23254. Bit 3—Parity Error (PER): Indicates that a parity error occurred during reception with parity
  23255. addition in asynchronous mode, causing abnormal termination.
  23256.  
  23257. Bit 3: PER Description
  23258. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23259.  
  23260. [Clearing conditions]
  23261.  
  23262. • Power-on reset, manual reset, standby mode, or module standby
  23263.  
  23264. •• When 0 is written to PER after reading PER = 1
  23265.  
  23266. 2
  23267. 1 A parity error occurred during reception*
  23268.  
  23269. [Setting condition]
  23270.  
  23271. When, in reception, the number of 1-bits in the receive data plus the parity
  23272. bit does not match the parity setting (even or odd) specified by the O/( bit
  23273. in SCSMR1
  23274.  
  23275. Notes: 1. The PER flag is not affected and retains its previous state when the RE bit in SCSCR1
  23276. is cleared to 0.
  23277. 2. If a parity error occurs, the receive data is transferred to SCRDR1 but the RDRF flag
  23278. is not set. Serial reception cannot be continued while the PER flag is set to 1.
  23279.  
  23280. Rev. 2.0, 02/99, page 491 of 830
  23281.  
  23282. ----------------------- Page 506-----------------------
  23283.  
  23284. Bit 2—Transmit End (TEND): Indicates that there is no valid data in SCTDR1 when the last
  23285. bit of the transmit character is sent, and transmission has been ended.
  23286.  
  23287. The TEND flag is read-only and cannot be modified.
  23288.  
  23289. Bit 2: TEND Description
  23290.  
  23291. 0 Transmission is in progress
  23292.  
  23293. [Clearing conditions]
  23294.  
  23295. • When 0 is written to TDRE after reading TDRE = 1
  23296.  
  23297. • When data is written to SCTDR1 by the DMAC
  23298.  
  23299. 1 Transmission has been ended (Initial value)
  23300.  
  23301. [Setting conditions]
  23302.  
  23303. • Power-on reset, manual reset, standby mode, or module standby
  23304.  
  23305. • When the TE bit in SCSCR1 is 0
  23306.  
  23307. • When TDRE = 1 on transmission of the last bit of a 1-byte serial
  23308. transmit character
  23309.  
  23310. Bit 1—Multiprocessor Bit (MPB): When reception is performed using a multiprocessor format
  23311. in asynchronous mode, MPB stores the multiprocessor bit in the receive data.
  23312.  
  23313. The MPB flag is read-only and cannot be modified.
  23314.  
  23315. Bit 1: MPB Description
  23316.  
  23317. 0 Data with a 0 multiprocessor bit has been received* (Initial value)
  23318.  
  23319. 1 Data with a 1 multiprocessor bit has been received
  23320.  
  23321. Note: * Retains its previous state when the RE bit in SCSCR1 is cleared to 0 while using a
  23322. multiprocessor format.
  23323.  
  23324. Rev. 2.0, 02/99, page 492 of 830
  23325.  
  23326. ----------------------- Page 507-----------------------
  23327.  
  23328. Bit 0—Multiprocessor Bit Transfer (MPBT): When transmission is performed using a
  23329. multiprocessor format in asynchronous mode, MPBT stores the multiprocessor bit to be added to
  23330. the transmit data.
  23331.  
  23332. The MPBT bit setting is invalid in synchronous mode, when a multiprocessor format is not used,
  23333. and when the operation is not transmission.
  23334.  
  23335. Unlike transmit data, the MPBT bit is not double-buffered, so it is necessary to check whether
  23336. transmission has been completed before changing its value.
  23337.  
  23338. Bit 0: MPBT Description
  23339.  
  23340. 0 Data with a 0 multiprocessor bit is transmitted (Initial value)
  23341.  
  23342. 1 Data with a 1 multiprocessor bit is transmitted
  23343.  
  23344. 15.2.8 Serial Port Register (SCSPTR1)
  23345.  
  23346. Bit: 7 6 5 4 3 2 1 0
  23347.  
  23348. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  23349.  
  23350. Initial value: 0 0 0 0 0 — 0 —
  23351.  
  23352. R/W: R/W — — — R/W R/W R/W R/W
  23353.  
  23354. SCSPTR1 is an 8-bit readable/writable register that controls input/output and data for the port
  23355. pins multiplexed with the serial communication interface (SCI) pins. Input data can be read from
  23356. the RxD pin, output data written to the TxD pin, and breaks in serial transmission/reception
  23357. controlled, by means of bits 1 and 0. SCK pin data reading and output data writing can be
  23358. performed by means of bits 3 and 2. Bit 7 controls enabling and disabling of the RXI interrupt.
  23359.  
  23360. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2 and
  23361. 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is undefined.
  23362. SCSPTR1 is not initialized in the module standby state or standby mode.
  23363.  
  23364. Bit 7—Error Interrupt Only (EIO): When the EIO bit is 1, an RXI interrupt request is not sent
  23365. to the CPU even if the RIE bit is set to 1. When the DMAC is used, this setting means that only
  23366. ERI interrupts are handled by the CPU. The DMAC transfers read data to memory or another
  23367. peripheral module. This bit specifies enabling or disabling of the RXI interrupt.
  23368.  
  23369. Bit 7: EIO Description
  23370.  
  23371. 0 The RIE bit enables/disables RXI and ERI interrupts
  23372.  
  23373. When the RIE bit is 1, RXI and ERI interrupts are sent to INTC(Initial value)
  23374.  
  23375. 1 When the RIE bit is 1, only ERI interrupts are sent to INTC
  23376.  
  23377. Rev. 2.0, 02/99, page 493 of 830
  23378.  
  23379. ----------------------- Page 508-----------------------
  23380.  
  23381. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  23382.  
  23383. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin input/output. When
  23384. the SCK pin is actually set as a port output pin and outputs the value set by the SPB1DT bit, the
  23385. C/$ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be cleared to 0.
  23386.  
  23387. Bit 3: SPB1IO Description
  23388.  
  23389. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  23390.  
  23391. 1 SPB1DT bit value is output to the SCK pin
  23392.  
  23393. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin input/output
  23394. data. Input or output is specified by the SPB1IO bit (see the description of bit 3, SPB1IO, for
  23395. details). When output is specified, the value of the SPB1DT bit is output to the SCK pin. The
  23396. SCK pin value is read from the SPB1DT bit regardless of the value of the SPB1IO bit. The initial
  23397. value of this bit after a power-on or manual reset is undefined.
  23398.  
  23399. Bit 2: SPB1DT Description
  23400.  
  23401. 0 Input/output data is low-level
  23402.  
  23403. 1 Input/output data is high-level
  23404.  
  23405. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output condition.
  23406. When the TxD pin is actually set as a port output pin and outputs the value set by the SPB0DT
  23407. bit, the TE bit in SCSCR1 should be cleared to 0.
  23408.  
  23409. Bit 1: SPB0IO Description
  23410.  
  23411. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  23412.  
  23413. 1 SPB0DT bit value is output to the TxD pin
  23414.  
  23415. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data and
  23416. TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  23417. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the value
  23418. of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the SPB0DT bit
  23419. regardless of the value of the SPB0IO bit. The initial value of this bit after a power-on or manual
  23420. reset is undefined.
  23421.  
  23422. Bit 0: SPB0DT Description
  23423.  
  23424. 0 Input/output data is low-level
  23425.  
  23426. 1 Input/output data is high-level
  23427.  
  23428. SCI I/O port block diagrams are shown in figures 15.2 to 15.4.
  23429.  
  23430. Rev. 2.0, 02/99, page 494 of 830
  23431.  
  23432. ----------------------- Page 509-----------------------
  23433.  
  23434. Reset
  23435.  
  23436. R
  23437. Q D
  23438. SPB1IO
  23439. C
  23440.  
  23441. Internal data bus
  23442. SPTRW
  23443.  
  23444. Reset
  23445. MD0/SCK
  23446. R
  23447. Q D
  23448.  
  23449. SPB1DT
  23450. C SCI
  23451.  
  23452. SPTRW Clock output enable signal
  23453.  
  23454. Mode setting Serial clock output signal *
  23455. register
  23456. Serial clock input signal
  23457.  
  23458. Clock input enable signal
  23459.  
  23460. SPTRR
  23461.  
  23462. SPTRW: Write to SPTR
  23463. SPTRR: Read SPTR
  23464.  
  23465. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  23466. the CKE0 and CKE1 bits in SCSCR1 and the C/A bit in SCSMR1.
  23467.  
  23468.  
  23469. Figure 15.2 MD0/SCK Pin
  23470.  
  23471. Rev. 2.0, 02/99, page 495 of 830
  23472.  
  23473. ----------------------- Page 510-----------------------
  23474.  
  23475. Reset
  23476.  
  23477. R
  23478. Q D
  23479. SPB0IO
  23480. C Internal data bus
  23481.  
  23482. SPTRW
  23483.  
  23484. Reset
  23485. MD7/TxD
  23486. R
  23487. Q D
  23488. SPB0DT
  23489. C SCI
  23490.  
  23491. SPTRW Transmit enable signal
  23492.  
  23493. Mode setting register
  23494.  
  23495. Serial transmit data
  23496.  
  23497. SPTRW: Write to SPTR
  23498.  
  23499. Figure 15.3 MD7/TxD Pin
  23500.  
  23501. SCI
  23502. RxD
  23503.  
  23504. Serial receive data
  23505.  
  23506. Internal data bus
  23507.  
  23508. SPTRR
  23509.  
  23510. SPTRR: Read SPTR
  23511.  
  23512. Figure 15.4 RxD Pin
  23513.  
  23514. Rev. 2.0, 02/99, page 496 of 830
  23515.  
  23516. ----------------------- Page 511-----------------------
  23517.  
  23518. 15.2.9 Bit Rate Register (SCBRR1)
  23519.  
  23520. Bit: 7 6 5 4 3 2 1 0
  23521.  
  23522. Initial value: 1 1 1 1 1 1 1 1
  23523.  
  23524. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23525.  
  23526. SCBRR1 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  23527. generator operating clock selected by bits CKS1 and CKS0 in SCSMR1.
  23528.  
  23529. SCBRR1 can be read or written to by the CPU at all times.
  23530.  
  23531. SCBRR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  23532. module standby state.
  23533.  
  23534. The SCBRR1 setting is found from the following equations.
  23535.  
  23536. Asynchronous mode:
  23537.  
  23538.  
  23539. P
  23540. φ 6
  23541. N = × 10 – 1
  23542. 64 × 22n–1 × B
  23543.  
  23544. Synchronous mode:
  23545.  
  23546.  
  23547. P
  23548. φ 6
  23549. N = × 10 – 1
  23550. 8 × 22n–1 × B
  23551.  
  23552. Where B: Bit rate (bits/s)
  23553. N: SCBRR1 setting for baud rate generator (0 ≤ N ≤ 255)
  23554. Pφ: Peripheral module operating frequency (MHz)
  23555. n: Baud rate generator input clock (n = 0 to 3)
  23556. (See the table below for the relation between n and the clock.)
  23557.  
  23558. SCSMR1 Setting
  23559. n Clock CKS1 CKS0
  23560. 0 Pφ 0 0
  23561.  
  23562. 1 Pφ/4 0 1
  23563.  
  23564. 2 Pφ/16 1 0
  23565.  
  23566. 3 Pφ/64 1 1
  23567.  
  23568. Rev. 2.0, 02/99, page 497 of 830
  23569.  
  23570. ----------------------- Page 512-----------------------
  23571.  
  23572. The bit rate error in asynchronous mode is found from the following equation:
  23573.  
  23574. P × 106
  23575. φ
  23576. Error (%) = 2n–1 – 1 × 100
  23577. (N + 1) × B × 64 × 2
  23578.  
  23579. Table 15.3 shows sample SCBRR1 settings in asynchronous mode, and table 15.4 shows sample
  23580. SCBRR1 settings in synchronous mode.
  23581.  
  23582. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  23583.  
  23584. Pφφ (MHz)
  23585. 2 2.097152 2.4576 3
  23586. Bit Rate Error Error Error Error
  23587. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23588.  
  23589. 110 1 141 0.03 1 148 –0.04 1 174 –0.26 1 212 0.03
  23590. 150 1 103 0.16 1 108 0.21 1 127 0.00 1 155 0.16
  23591.  
  23592. 300 0 207 0.16 0 217 0.21 0 255 0.00 1 77 0.16
  23593. 600 0 103 0.16 0 108 0.21 0 127 0.00 0 155 0.16
  23594.  
  23595. 1200 0 51 0.16 0 54 –0.70 0 63 0.00 0 77 0.16
  23596. 2400 0 25 0.16 0 26 1.14 0 31 0.00 0 38 0.16
  23597. 4800 0 12 0.16 0 13 –2.48 0 15 0.00 0 19 –2.34
  23598. 9600 0 6 –6.99 0 6 –2.48 0 7 0.00 0 9 –2.34
  23599.  
  23600. 19200 0 2 8.51 0 2 13.78 0 3 0.00 0 4 –2.34
  23601. 31250 0 1 0.00 0 1 4.86 0 1 22.88 0 2 0.00
  23602. 38400 0 1 – 0 1 – 0 1 0.00
  23603. 18.62 14.67
  23604.  
  23605. Rev. 2.0, 02/99, page 498 of 830
  23606.  
  23607. ----------------------- Page 513-----------------------
  23608.  
  23609. Pφφ (MHz)
  23610.  
  23611. 3.6864 4 4.9152 5
  23612.  
  23613. Bit Rate Error Error Error Error
  23614. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23615.  
  23616. 110 2 64 0.70 2 70 0.03 2 86 0.31 2 88 –0.25
  23617.  
  23618. 150 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  23619.  
  23620. 300 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  23621.  
  23622. 600 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  23623.  
  23624. 1200 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  23625.  
  23626. 2400 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  23627.  
  23628. 4800 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  23629.  
  23630. 9600 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  23631.  
  23632. 19200 0 5 0.00 0 6 –6.99 0 7 0.00 0 7 1.73
  23633.  
  23634. 31250 — — — 0 3 0.00 0 4 –1.70 0 4 0.00
  23635.  
  23636. 38400 0 2 0.00 0 2 8.51 0 3 0.00 0 3 1.73
  23637.  
  23638. Legend
  23639. Blank: No setting is available.
  23640. —: A setting is available but error occurs.
  23641.  
  23642. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode (cont)
  23643.  
  23644. Pφφ (MHz)
  23645.  
  23646. 6 6.144 7.37288 8
  23647.  
  23648. Bit Rate Error Error Error Error
  23649. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23650.  
  23651. 110 2 106 –0.44 2 108 0.08 2 130 –0.07 2 141 0.03
  23652.  
  23653. 150 2 77 0.16 2 79 0.00 2 95 0.00 2 103 0.16
  23654.  
  23655. 300 1 155 0.16 1 159 0.00 1 191 0.00 1 207 0.16
  23656.  
  23657. 600 1 77 0.16 1 79 0.00 1 95 0.00 1 103 0.16
  23658.  
  23659. 1200 0 155 0.16 0 159 0.00 0 191 0.00 0 207 0.16
  23660.  
  23661. 2400 0 77 0.16 0 79 0.00 0 95 0.00 0 103 0.16
  23662.  
  23663. 4800 0 38 0.16 0 39 0.00 0 47 0.00 0 51 0.16
  23664.  
  23665. 9600 0 19 –2.34 0 19 0.00 0 23 0.00 0 25 0.16
  23666.  
  23667. 19200 0 9 –2.34 0 9 0.00 0 11 0.00 0 12 0.16
  23668.  
  23669. 31250 0 5 0.00 0 5 2.40 0 6 5.33 0 7 0.00
  23670.  
  23671. 38400 0 4 –2.34 0 4 0.00 0 5 0.00 0 6 –6.99
  23672.  
  23673. Rev. 2.0, 02/99, page 499 of 830
  23674.  
  23675. ----------------------- Page 514-----------------------
  23676.  
  23677. Pφφ (MHz)
  23678.  
  23679. 9.8304 10 12 12.288
  23680.  
  23681. Bit Rate Error Error Error Error
  23682. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23683.  
  23684. 110 2 174 –0.26 2 177 –0.25 2 212 0.03 2 217 0.08
  23685.  
  23686. 150 2 127 0.00 2 129 0.16 2 155 0.16 2 159 0.00
  23687.  
  23688. 300 1 255 0.00 2 64 0.16 2 77 0.16 2 79 0.00
  23689.  
  23690. 600 1 127 0.00 1 129 0.16 1 155 0.16 1 159 0.00
  23691.  
  23692. 1200 0 255 0.00 1 64 0.16 1 77 0.16 1 79 0.00
  23693.  
  23694. 2400 0 127 0.00 0 129 0.16 0 155 0.16 0 159 0.00
  23695.  
  23696. 4800 0 63 0.00 0 64 0.16 0 77 0.16 0 79 0.00
  23697.  
  23698. 9600 0 31 0.00 0 32 –1.36 0 38 0.16 0 39 0.00
  23699.  
  23700. 19200 0 15 0.00 0 15 1.73 0 19 0.16 0 19 0.00
  23701.  
  23702. 31250 0 9 –1.70 0 9 0.00 0 11 0.00 0 11 2.40
  23703.  
  23704. 38400 0 7 0.00 0 7 1.73 0 9 –2.34 0 9 0.00
  23705.  
  23706. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode (cont)
  23707.  
  23708. Pφφ (MHz)
  23709.  
  23710. 14.7456 16 19.6608 20
  23711.  
  23712. Bit Rate Error Error Error Error
  23713. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23714.  
  23715. 110 3 64 0.70 3 70 0.03 3 86 0.31 3 88 –0.25
  23716.  
  23717. 150 2 191 0.00 2 207 0.16 2 255 0.00 3 64 0.16
  23718.  
  23719. 300 2 95 0.00 2 103 0.16 2 127 0.00 2 129 0.16
  23720.  
  23721. 600 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  23722.  
  23723. 1200 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  23724.  
  23725. 2400 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  23726.  
  23727. 4800 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  23728.  
  23729. 9600 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  23730.  
  23731. 19200 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  23732.  
  23733. 31250 0 14 –1.70 0 15 0.00 0 19 –1.70 0 19 0.00
  23734.  
  23735. 38400 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  23736.  
  23737. Rev. 2.0, 02/99, page 500 of 830
  23738.  
  23739. ----------------------- Page 515-----------------------
  23740.  
  23741. Pφφ (MHz)
  23742. 24 24.576 28.7 30
  23743. Bit Rate Error Error Error Error
  23744. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23745.  
  23746. 110 3 106 –0.44 3 108 0.08 3 126 0.31 3 132 0.13
  23747. 150 3 77 0.16 3 79 0.00 3 92 0.46 3 97 –0.35
  23748. 300 2 155 0.16 2 159 0.00 2 186 –0.08 2 194 0.16
  23749. 600 2 77 0.16 2 79 0.00 2 92 0.46 2 97 –0.35
  23750. 1200 1 155 0.16 1 159 0.00 1 186 –0.08 1 194 0.16
  23751.  
  23752. 2400 1 77 0.16 1 79 0.00 1 92 0.46 1 97 –0.35
  23753. 4800 0 155 0.16 0 159 0.00 0 186 –0.08 0 194 –1.36
  23754.  
  23755. 9600 0 77 0.16 0 79 0.00 0 92 0.46 0 97 –0.35
  23756. 19200 0 38 0.16 0 39 0.00 0 46 –0.61 0 48 –0.35
  23757. 31250 0 23 0.00 0 24 –1.70 0 28 –1.03 0 29 0.00
  23758. 38400 0 19 –2.34 0 19 0.00 0 22 1.55 0 23 1.73
  23759.  
  23760. Table 15.4 Examples of Bit Rates and SCBRR1 Settings in Synchronous Mode
  23761.  
  23762. Pφφ (MHz)
  23763. 4 8 16 28.7 30
  23764. Bit Rate (bits/s) n N n N n N n N n N
  23765.  
  23766. 10 — — — — — — — — — —
  23767.  
  23768. 250 2 249 3 124 3 249 — — — —
  23769. 500 2 124 2 249 3 124 3 223 3 233
  23770. 1k 1 249 2 124 2 249 3 111 3 116
  23771. 2.5k 1 99 1 199 2 99 2 178 2 187
  23772. 5k 0 199 1 99 1 199 2 89 2 93
  23773.  
  23774. 10k 0 99 0 199 1 99 1 178 1 187
  23775. 25k 0 39 0 79 0 159 1 71 1 74
  23776. 50k 0 19 0 39 0 79 0 143 0 149
  23777. 100k 0 9 0 19 0 39 0 71 0 74
  23778.  
  23779. 250k 0 3 0 7 0 15 — — 0 29
  23780. 500k 0 1 0 3 0 7 — — 0 14
  23781. 1M 0 0* 0 1 0 3 — — — —
  23782. 2M 0 0* 0 1 — — — —
  23783. Note: As far as possible, the setting should be made so that the error is within 1%.
  23784. Legend
  23785. Blank: No setting is available.
  23786. —: A setting is available but error occurs.
  23787. * Continuous transmission/reception is not possible.
  23788.  
  23789. Rev. 2.0, 02/99, page 501 of 830
  23790.  
  23791. ----------------------- Page 516-----------------------
  23792.  
  23793. Table 15.5 shows the maximum bit rate for various frequencies in asynchronous mode. Tables
  23794. 15.6 and 15.7 show the maximum bit rates with external clock input.
  23795.  
  23796. Table 15.5 Maximum Bit Rate for Various Frequencies with Baud Rate Generator
  23797. (Asynchronous Mode)
  23798.  
  23799. Settings
  23800.  
  23801. Pφφ (MHz) Maximum Bit Rate (bits/s) n N
  23802.  
  23803. 2 62500 0 0
  23804.  
  23805. 2.097152 65536 0 0
  23806.  
  23807. 2.4576 76800 0 0
  23808.  
  23809. 3 93750 0 0
  23810.  
  23811. 3.6864 115200 0 0
  23812.  
  23813. 4 125000 0 0
  23814.  
  23815. 4.9152 153600 0 0
  23816.  
  23817. 8 250000 0 0
  23818.  
  23819. 9.8304 307200 0 0
  23820.  
  23821. 12 375000 0 0
  23822.  
  23823. 14.7456 460800 0 0
  23824.  
  23825. 16 500000 0 0
  23826.  
  23827. 19.6608 614400 0 0
  23828.  
  23829. 20 625000 0 0
  23830.  
  23831. 24 750000 0 0
  23832.  
  23833. 24.576 768000 0 0
  23834.  
  23835. 28.7 896875 0 0
  23836.  
  23837. 30 937500 0 0
  23838.  
  23839. Rev. 2.0, 02/99, page 502 of 830
  23840.  
  23841. ----------------------- Page 517-----------------------
  23842.  
  23843. Table 15.6 Maximum Bit Rate with External Clock Input (Asynchronous Mode)
  23844.  
  23845. Pφφ (MHz) External Input Clock (MHz) Maximum Bit Rate (bits/s)
  23846.  
  23847. 2 0.5000 31250
  23848.  
  23849. 2.097152 0.5243 32768
  23850.  
  23851. 2.4576 0.6144 38400
  23852.  
  23853. 3 0.7500 46875
  23854.  
  23855. 3.6864 0.9216 57600
  23856.  
  23857. 4 1.0000 62500
  23858.  
  23859. 4.9152 1.2288 76800
  23860.  
  23861. 8 2.0000 125000
  23862.  
  23863. 9.8304 2.4576 153600
  23864.  
  23865. 12 3.0000 187500
  23866.  
  23867. 14.7456 3.6864 230400
  23868.  
  23869. 16 4.0000 250000
  23870.  
  23871. 19.6608 4.9152 307200
  23872.  
  23873. 20 5.0000 312500
  23874.  
  23875. 24 6.0000 375000
  23876.  
  23877. 24.576 6.1440 384000
  23878.  
  23879. 28.7 7.1750 448436
  23880.  
  23881. 30 7.5000 468750
  23882.  
  23883. Table 15.7 Maximum Bit Rate with External Clock Input (Synchronous Mode)
  23884.  
  23885. Pφφ (MHz) External Input Clock (MHz) Maximum Bit Rate (bits/s)
  23886.  
  23887. 8 1.3333 1333333.3
  23888.  
  23889. 16 2.6667 2666666.7
  23890.  
  23891. 24 4.0000 4000000.0
  23892.  
  23893. 28.7 4.7833 4783333.3
  23894.  
  23895. 30 5.0000 5000000.0
  23896.  
  23897. Rev. 2.0, 02/99, page 503 of 830
  23898.  
  23899. ----------------------- Page 518-----------------------
  23900.  
  23901. 15.3 Operation
  23902.  
  23903. 15.3.1 Overview
  23904.  
  23905. The SCI can carry out serial communication in two modes: asynchronous mode in which
  23906. synchronization is achieved character by character, and synchronous mode in which
  23907. synchronization is achieved with clock pulses.
  23908.  
  23909. Selection of asynchronous or synchronous mode and the transmission format is made using
  23910. SCSMR1 as shown in table 15.8. The SCI clock source is determined by a combination of the
  23911. C/$ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1, as shown in table 15.9.
  23912.  
  23913. • Asynchronous mode
  23914.  Data length: Choice of 7 or 8 bits
  23915.  Choice of parity addition, multiprocessor bit addition, and addition of 1 or 2 stop bits (the
  23916. combination of these parameters determines the transfer format and character length)
  23917.  Detection of framing, parity, and overrun errors, and breaks, during reception
  23918.  Choice of internal or external clock as SCI clock source
  23919. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  23920. clock with the same frequency as the bit rate can be output.
  23921. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  23922. input (the on-chip baud rate generator is not used).
  23923.  
  23924. • Synchronous mode
  23925.  Transfer format: Fixed 8-bit data
  23926.  Detection of overrun errors during reception
  23927.  Choice of internal or external clock as SCI clock source
  23928. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  23929. serial clock is output off-chip.
  23930. When external clock is selected: The on-chip baud rate generator is not used, and the SCI
  23931. operates on the input serial clock.
  23932.  
  23933. Rev. 2.0, 02/99, page 504 of 830
  23934.  
  23935. ----------------------- Page 519-----------------------
  23936.  
  23937. Table 15.8 SCSMR1 Settings for Serial Transfer Format Selection
  23938.  
  23939. SCSMR1 Settings SCI Transfer Format
  23940.  
  23941. Multi-
  23942. Bit 7: Bit 6: Bit 2: Bit 5: Bit 3: Data processor Parity Stop Bit
  23943. C/$ CHR MP PE STOP Mode Length Bit Bit Length
  23944. $
  23945.  
  23946. 0 0 0 0 0 Asynchronous 8-bit data No No 1 bit
  23947. mode
  23948.  
  23949. 1 2 bits
  23950.  
  23951. 1 0 Yes 1 bit
  23952.  
  23953. 1 2 bits
  23954.  
  23955. 1 0 0 7-bit data No 1 bit
  23956.  
  23957. 1 2 bits
  23958.  
  23959. 1 0 Yes 1 bit
  23960.  
  23961. 1 2 bits
  23962.  
  23963. 0 1 * 0 Asynchronous 8-bit data Yes No 1 bit
  23964. mode
  23965. (multiprocessor
  23966. format)
  23967.  
  23968. 1 2 bits
  23969.  
  23970. 1 0 7-bit data 1 bit
  23971.  
  23972. 1 2 bits
  23973.  
  23974. 1 * * * * Synchronous 8-bit data No None
  23975. mode
  23976.  
  23977. Note: An asterisk in the table means “Don’t care.”
  23978.  
  23979. Rev. 2.0, 02/99, page 505 of 830
  23980.  
  23981. ----------------------- Page 520-----------------------
  23982.  
  23983. Table 15.9 SCSMR1 and SCSCR1 Settings for SCI Clock Source Selection
  23984.  
  23985. SCSMR1 SCSCR1 Setting SCI Transmit/Receive Clock
  23986.  
  23987. Bit 7: Bit 1: Bit 0: Clock
  23988. C/$ CKE1 CKE0 Mode Source SCK Pin Function
  23989. $
  23990.  
  23991. 0 0 0 Asynchronous Internal SCI does not use SCK pin
  23992. mode
  23993.  
  23994. 1 Outputs clock with same
  23995. frequency as bit rate
  23996.  
  23997. 1 0 External Inputs clock with frequency
  23998. of 16 times the bit rate
  23999.  
  24000. 1
  24001.  
  24002. 1 0 0 Synchronous Internal Outputs serial clock
  24003. mode
  24004.  
  24005. 1
  24006.  
  24007. 1 0 External Inputs serial clock
  24008.  
  24009. 1
  24010.  
  24011. Rev. 2.0, 02/99, page 506 of 830
  24012.  
  24013. ----------------------- Page 521-----------------------
  24014.  
  24015. 15.3.2 Operation in Asynchronous Mode
  24016.  
  24017. In asynchronous mode, characters are sent or received, each preceded by a start bit indicating the
  24018. start of communication and followed by one or two stop bits indicating the end of
  24019. communication. Serial communication is thus carried out with synchronization established on a
  24020. character-by-character basis.
  24021.  
  24022. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  24023. communication. Both the transmitter and the receiver also have a double-buffered structure, so
  24024. that data can be read or written during transmission or reception, enabling continuous data
  24025. transfer.
  24026.  
  24027. Figure 15.5 shows the general format for asynchronous serial communication.
  24028.  
  24029. In asynchronous serial communication, the transmission line is usually held in the mark state
  24030. (high level). The SCI monitors the transmission line, and when it goes to the space state (low
  24031. level), recognizes a start bit and starts serial communication.
  24032.  
  24033. One serial communication character consists of a start bit (low level), followed by data (in LSB-
  24034. first order), a parity bit (high or low level), and finally one or two stop bits (high level).
  24035.  
  24036. In asynchronous mode, the SCI performs synchronization at the falling edge of the start bit in
  24037. reception. The SCI samples the data on the eighth pulse of a clock with a frequency of 16 times
  24038. the length of one bit, so that the transfer data is latched at the center of each bit.
  24039.  
  24040. Idle state (mark state)
  24041.  
  24042. 1 (LSB) (MSB) 1
  24043.  
  24044. Serial 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  24045. data
  24046.  
  24047. Start Parity Stop
  24048. bit bit bit(s)
  24049. Transmit/receive data
  24050.  
  24051. 1 bit 7 or 8 bits 1 bit, 1 or
  24052. or none 2 bits
  24053.  
  24054. One unit of transfer data (character or frame)
  24055.  
  24056. Figure 15.5 Data Format in Asynchronous Communication (Example with 8-Bit Data,
  24057. Parity, Two Stop Bits)
  24058.  
  24059. Data Transfer Format
  24060.  
  24061. Table 15.10 shows the data transfer formats that can be used in asynchronous mode. Any of 12
  24062. transfer formats can be selected according to the SCSMR1 setting.
  24063.  
  24064. Rev. 2.0, 02/99, page 507 of 830
  24065.  
  24066. ----------------------- Page 522-----------------------
  24067.  
  24068. Table 15.10 Serial Transfer Formats (Asynchronous Mode)
  24069.  
  24070. SCSMR1 Settings Serial Transfer Format and Frame Length
  24071.  
  24072. CHR PE MP STOP 1 2 3 4 5 6 7 8 9 10 11 12
  24073.  
  24074. 0 0 0 0 S 8-bit data STOP
  24075.  
  24076. 0 0 0 1 S 8-bit data STOP STOP
  24077.  
  24078. 0 1 0 0 S 8-bit data P STOP
  24079.  
  24080. 0 1 0 1 S 8-bit data P STOP STOP
  24081.  
  24082. 1 0 0 0 S 7-bit data STOP
  24083.  
  24084. 1 0 0 1 S 7-bit data STOP STOP
  24085.  
  24086. 1 1 0 0 S 7-bit data P STOP
  24087.  
  24088. 1 1 0 1 S 7-bit data P STOP STOP
  24089.  
  24090. 0 * 1 0 S 8-bit data MPB STOP
  24091.  
  24092. 0 * 1 1 S 8-bit data MPB STOP STOP
  24093.  
  24094. 1 * 1 0 S 7-bit data MPB STOP
  24095.  
  24096. 1 * 1 1 S 7-bit data MPB STOP STOP
  24097.  
  24098. S: Start bit
  24099. STOP: Stop bit
  24100. P: Parity bit
  24101. MPB: Multiprocessor bit
  24102. Note: An asterisk in the table means “Don’t care.”
  24103.  
  24104. Rev. 2.0, 02/99, page 508 of 830
  24105.  
  24106. ----------------------- Page 523-----------------------
  24107.  
  24108. Clock
  24109.  
  24110. Either an internal clock generated by the on-chip baud rate generator or an external clock input
  24111. at the SCK pin can be selected as the SCI’s serial clock, according to the setting of the C/$ bit in
  24112. SCSMR1 and the CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection, see
  24113. table 15.9.
  24114.  
  24115. When an external clock is input at the SCK pin, the clock frequency should be 16 times the bit
  24116. rate used.
  24117.  
  24118. When the SCI is operated on an internal clock, the clock can be output from the SCK pin. The
  24119. frequency of the clock output in this case is equal to the bit rate, and the phase is such that the
  24120. rising edge of the clock is at the center of each transmit data bit, as shown in figure 15.6.
  24121.  
  24122. 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  24123.  
  24124. One frame
  24125.  
  24126. Figure 15.6 Relation between Output Clock and Transfer Data Phase
  24127. (Asynchronous Mode)
  24128.  
  24129. Data Transfer Operations
  24130.  
  24131. SCI Initialization (Asynchronous Mode): Before transmitting and receiving data, it is necessary
  24132. to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  24133.  
  24134. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared
  24135. to 0 before making the change using the following procedure. When the TE bit is cleared to 0,
  24136. the TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  24137. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  24138.  
  24139. When an external clock is used the clock should not be stopped during operation, including
  24140. initialization, since operation will be unreliable in this case.
  24141.  
  24142. Figure 15.7 shows a sample SCI initialization flowchart.
  24143.  
  24144. Rev. 2.0, 02/99, page 509 of 830
  24145.  
  24146. ----------------------- Page 524-----------------------
  24147.  
  24148. 1. Set the clock selection in SCSCR1.
  24149. Initialization
  24150. Be sure to clear bits RIE, TIE, TEIE,
  24151. and MPIE, and bits TE and RE, to 0.
  24152. Clear TE and RE bits
  24153. in SCSCR1 to 0 When clock output is selected in
  24154. asynchronous mode, it is output
  24155. immediately after SCSCR1 settings
  24156. Set CKE1 and CKE0 bits are made.
  24157. in SCSCR1 (leaving TE and 2. Set the data transfer format in
  24158. RE bits cleared to 0) SCSMR1.
  24159.  
  24160. 3. Write a value corresponding to the
  24161. Set data transfer format bit rate into SCBRR1. (Not
  24162. in SCSMR1 necessary if an external clock is
  24163.  
  24164. used.)
  24165.  
  24166. Set value in SCBRR1 4. Wait at least one bit interval, then set
  24167. the TE bit or RE bit in SCSCR1 to 1.
  24168. Wait Also set the RIE, TIE, TEIE, and
  24169. MPIE bits.
  24170.  
  24171. No Setting the TE and RE bits enables
  24172. 1-bit interval elapsed?
  24173. the TxD and RxD pins to be used.
  24174. When transmitting, the SCI will go to
  24175. Yes the mark state; when receiving, it will
  24176. go to the idle state, waiting for a start
  24177. Set TE and RE bits in SCSCR1
  24178. bit.
  24179. to 1, and set RIE, TIE, TEIE,
  24180. and MPIE bits
  24181.  
  24182. End
  24183.  
  24184. Figure 15.7 Sample SCI Initialization Flowchart
  24185.  
  24186. Rev. 2.0, 02/99, page 510 of 830
  24187.  
  24188. ----------------------- Page 525-----------------------
  24189.  
  24190. Serial Data Transmission (Asynchronous Mode): Figure 15.8 shows a sample flowchart for
  24191. serial transmission.
  24192.  
  24193. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  24194.  
  24195. Start of transmission 1. SCI status check and transmit data
  24196. write: Read SCSSR1 and check that
  24197. the TDRE flag is set to 1, then write
  24198. transmit data to SCTDR1 and clear
  24199. Read TDRE flag in SCSSR1
  24200. the TDRE flag to 0.
  24201.  
  24202. 2. Serial transmission continuation
  24203. No
  24204. TDRE = 1? procedure: To continue serial
  24205. transmission, read 1 from the TDRE
  24206. Yes flag to confirm that writing is possible,
  24207. then write data to SCTDR1, and then
  24208. Write transmit data to SCTDR1 clear the TDRE flag to 0. (Checking
  24209. and clear TDRE flag and clearing of the TDRE flag is
  24210. in SCSSR1 to 0 automatic when the direct memory
  24211. access controller (DMAC) is activated
  24212. by a transmit-data-empty interrupt
  24213. No (TXI) request, and data is written to
  24214. All data transmitted?
  24215. SCTDR1.)
  24216.  
  24217. Yes 3. Break output at the end of serial
  24218. transmission: To output a break in
  24219. serial transmission, clear the SPB0DT
  24220. Read TEND flag in SCSSR1 bit to 0 and set the SPB0IO bit to 1 in
  24221. SCSPTR, then clear the TE bit in
  24222. SCSCR1 to 0.
  24223. No
  24224. TEND = 1?
  24225.  
  24226.  
  24227. Yes
  24228.  
  24229. No
  24230. Break output?
  24231.  
  24232. Yes
  24233.  
  24234. Clear SPB0DT to 0 and
  24235. set SPB0IO to 1
  24236.  
  24237. Clear TE bit in SCSCR1 to 0
  24238.  
  24239. End of transmission
  24240.  
  24241. Figure 15.8 Sample Serial Transmission Flowchart
  24242.  
  24243. Rev. 2.0, 02/99, page 511 of 830
  24244.  
  24245. ----------------------- Page 526-----------------------
  24246.  
  24247. In serial transmission, the SCI operates as described below.
  24248.  
  24249. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  24250. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  24251. SCTSR1.
  24252. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24253. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI) is
  24254. generated.
  24255. The serial transmit data is sent from the TxD pin in the following order.
  24256. a. Start bit: One 0-bit is output.
  24257. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  24258. c. Parity bit or multiprocessor bit: One parity bit (even or odd parity), or one multiprocessor
  24259. bit is output. (A format in which neither a parity bit nor a multiprocessor bit is output can
  24260. also be selected.)
  24261. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  24262. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  24263. sent.
  24264. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is
  24265. cleared to 0, data is transferred from SCTDR1 to SCTSR1, the stop bit is sent, and then serial
  24266. transmission of the next frame is started.
  24267. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and
  24268. then the line goes to the mark state in which 1 is output continuously. If the TEIE bit in
  24269. SCSCR1 is set to 1 at this time, a TEI interrupt request is generated.
  24270.  
  24271. Figure 15.9 shows an example of the operation for transmission in asynchronous mode.
  24272.  
  24273. Rev. 2.0, 02/99, page 512 of 830
  24274.  
  24275. ----------------------- Page 527-----------------------
  24276.  
  24277. Start Data Parity Stop Start Data Parity Stop
  24278. 1 bit bit bit bit bit bit 1
  24279.  
  24280. Serial Idle state
  24281. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  24282. data (mark state)
  24283.  
  24284. TDRE
  24285.  
  24286. TEND
  24287.  
  24288. TXI interrupt TXI interrupt
  24289. request request
  24290. Data written to SCTDR1 TEI interrupt
  24291. and TDRE flag cleared to request
  24292. 0 by TXI interrupt handler
  24293.  
  24294. One frame
  24295.  
  24296. Figure 15.9 Example of Transmit Operation in Asynchronous Mode
  24297. (Example with 8-Bit Data, Parity, One Stop Bit)
  24298.  
  24299. Rev. 2.0, 02/99, page 513 of 830
  24300.  
  24301. ----------------------- Page 528-----------------------
  24302.  
  24303. Serial Data Reception (Asynchronous Mode): Figure 15.10 shows a sample flowchart for serial
  24304. reception.
  24305.  
  24306. Use the following procedure for serial data reception after enabling the SCI for reception.
  24307.  
  24308. Start of reception 1. Receive error handling and
  24309. break detection: If a receive
  24310. error occurs, read the ORER,
  24311. PER, and FER flags in
  24312. Read ORER, PER, and FER flags SCSSR1 to identify the error.
  24313. in SCSSR1 After performing the
  24314. appropriate error handling,
  24315. ensure that the ORER, PER,
  24316. PER or FER Yes
  24317. and FER flags are all cleared to
  24318. or ORER = 1?
  24319. 0. Reception cannot be
  24320. No Error handling resumed if any of these flags
  24321. are set to 1. In the case of a
  24322. framing error, a break can be
  24323. Read RDRF flag in SCSSR1
  24324. detected by reading the value
  24325. of the RxD pin.
  24326.  
  24327. No 2. SCI status check and receive
  24328. RDRF = 1?
  24329. data read : Read SCSSR1 and
  24330. check that RDRF = 1, then read
  24331. Yes
  24332. the receive data in SCRDR1
  24333. and clear the RDRF flag to 0.
  24334. Read receive data in SCRDR1,
  24335. and clear RDRF flag 3. Serial reception continuation
  24336. in SCSSR1 to 0 procedure: To continue serial
  24337. reception, complete zero-
  24338. clearing of the RDRF flag
  24339. No All data received? before the stop bit for the
  24340. current frame is received. (The
  24341. RDRF flag is cleared
  24342. Yes automatically when the direct
  24343.  
  24344. memory access controller
  24345. Clear RE bit in SCSCR1 to 0
  24346. (DMAC) is activated by an RXI
  24347. interrupt and the SCRDR1
  24348.  
  24349. value is read.)
  24350. End of reception
  24351.  
  24352. Figure 15.10 Sample Serial Reception Flowchart (1)
  24353.  
  24354. Rev. 2.0, 02/99, page 514 of 830
  24355.  
  24356. ----------------------- Page 529-----------------------
  24357.  
  24358. Error handling
  24359.  
  24360. No
  24361. ORER = 1?
  24362.  
  24363. Yes
  24364.  
  24365. Overrun error handling
  24366.  
  24367. No
  24368. FER = 1?
  24369.  
  24370. Yes
  24371.  
  24372. Yes
  24373. Break?
  24374.  
  24375. No
  24376.  
  24377. Framing error handling Clear RE bit in SCSCR1 to 0
  24378.  
  24379. No
  24380. PER = 1?
  24381.  
  24382. Yes
  24383.  
  24384. Parity error handling
  24385.  
  24386. Clear ORER, PER, and FER flags
  24387. in SCSSR1 to 0
  24388.  
  24389. End
  24390.  
  24391.  
  24392. Figure 15.10 Sample Serial Reception Flowchart (2)
  24393.  
  24394. Rev. 2.0, 02/99, page 515 of 830
  24395.  
  24396. ----------------------- Page 530-----------------------
  24397.  
  24398. In serial reception, the SCI operates as described below.
  24399.  
  24400. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  24401. synchronization and starts reception.
  24402. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  24403. 3. The parity bit and stop bit are received.
  24404. After receiving these bits, the SCI carries out the following checks.
  24405. a. Parity check: The SCI checks whether the number of 1-bits in the receive data agrees with
  24406. the parity (even or odd) set in the O/E bit in SCSMR1.
  24407. b. Stop bit check: The SCI checks whether the stop bit is 1. If there are two stop bits, only
  24408. the first is checked.
  24409. c. Status check: The SCI checks whether the RDRF flag is 0, indicating that the receive data
  24410. can be transferred from SCRSR1 to SCRDR1.
  24411. If all the above checks are passed, the RDRF flag is set to 1, and the receive data is stored in
  24412. SCRDR1.
  24413. If a receive error is detected in the error check, the operation is as shown in table 15.11.
  24414. Note: No further receive operations can be performed when a receive error has occurred. Also
  24415. note that the RDRF flag is not set to 1 in reception, and so the error flags must be cleared
  24416. to 0.
  24417.  
  24418. 4. If the EIO bit in SCSPTR1 is cleared to 0 and the RIE bit in SCSCR1 is set to 1 when the
  24419. RDRF flag changes to 1, a receive-data-full interrupt (RXI) request is generated.
  24420. If the RIE bit in SCSCR1 is set to 1 when the ORER, PER, or FER flag changes to 1, a
  24421. receive-error interrupt (ERI) request is generated. A receive-data-full request is always output
  24422. to the DMAC when the RDRF flag changes to 1.
  24423.  
  24424. Table 15.11 Receive Error Conditions
  24425.  
  24426. Receive Error Abbreviation Condition Data Transfer
  24427.  
  24428. Overrun error ORER Reception of next data is Receive data is not transferred
  24429. completed while RDRF flag from SCRSR1 to SCRDR1
  24430. in SCSSR1 is set to 1
  24431.  
  24432. Framing error FER Stop bit is 0 Receive data is transferred
  24433. from SCRSR1 to SCRDR1
  24434.  
  24435. Parity error PER Received data parity differs Receive data is transferred
  24436. from that (even or odd) set from SCRSR1 to SCRDR1
  24437. in SCSMR1
  24438.  
  24439. Figure 15.11 shows an example of the operation for reception in asynchronous mode.
  24440.  
  24441. Rev. 2.0, 02/99, page 516 of 830
  24442.  
  24443. ----------------------- Page 531-----------------------
  24444.  
  24445. Start Data Parity Stop Start Data Parity Stop
  24446. 1 bit bit bit bit bit bit
  24447.  
  24448. Serial
  24449. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  24450. data
  24451.  
  24452. RDRF
  24453.  
  24454. FER
  24455.  
  24456. RXI interrupt
  24457. request SCRDR1 data read and ERI interrupt request
  24458. RDRF flag cleared to 0 generated by framing
  24459. One frame by RXI interrupt handler error
  24460.  
  24461. Figure 15.11 Example of SCI Receive Operation
  24462. (Example with 8-Bit Data, Parity, One Stop Bit)
  24463.  
  24464. 15.3.3 Multiprocessor Communication Function
  24465.  
  24466. The multiprocessor communication function performs serial communication using a
  24467. multiprocessor format, in which a multiprocessor bit is added to the transfer data, in
  24468. asynchronous mode. Use of this function enables data transfer to be performed among a number
  24469. of processors sharing a serial transmission line.
  24470.  
  24471. When multiprocessor communication is carried out, each receiving station is addressed by a
  24472. unique ID code.
  24473.  
  24474. The serial communication cycle consists of two cycles: an ID transmission cycle which specifies
  24475. the receiving station , and a data transmission cycle. The multiprocessor bit is used to
  24476. differentiate between the ID transmission cycle and the data transmission cycle.
  24477.  
  24478. The transmitting station first sends the ID of the receiving station with which it wants to perform
  24479. serial communication as data with a 1 multiprocessor bit added. It then sends transmit data as
  24480. data with a 0 multiprocessor bit added.
  24481.  
  24482. The receiving station skips the data until data with a 1 multiprocessor bit is sent.
  24483.  
  24484. When data with a 1 multiprocessor bit is received, the receiving station compares that data with
  24485. its own ID. The station whose ID matches then receives the data sent next. Stations whose ID
  24486. does not match continue to skip the data until data with a 1 multiprocessor bit is again received.
  24487. In this way, data communication is carried out among a number of processors.
  24488.  
  24489. Figure 15.12 shows an example of inter-processor communication using a multiprocessor format.
  24490.  
  24491. Rev. 2.0, 02/99, page 517 of 830
  24492.  
  24493. ----------------------- Page 532-----------------------
  24494.  
  24495. Transmitting
  24496. station
  24497.  
  24498. Serial transmission line
  24499.  
  24500. Receiving Receiving Receiving Receiving
  24501. station A station B station C station D
  24502.  
  24503. (ID = 01) (ID = 02) (ID = 03) (ID = 04)
  24504.  
  24505. Serial
  24506. H'01 H'AA
  24507. data
  24508. (MPB = 1) (MPB = 0)
  24509.  
  24510. ID transmission cycle: Data transmission cycle:
  24511. Receiving station Data transmission to
  24512. specification receiving station specified
  24513. by ID
  24514.  
  24515. MPB: Multiprocessor bit
  24516.  
  24517. Figure 15.12 Example of Inter-Processor Communication Using Multiprocessor Format
  24518. (Transmission of Data H'AA to Receiving Station A)
  24519.  
  24520. Data Transfer Formats
  24521.  
  24522. There are four data transfer formats. When the multiprocessor format is specified, the parity bit
  24523. specification is invalid. For details, see table 15.10.
  24524.  
  24525. Clock
  24526.  
  24527. See the description under Clock in section 15.3.2.
  24528.  
  24529. Data Transfer Operations
  24530.  
  24531. Multiprocessor Serial Data Transmission: Figure 15.13 shows a sample flowchart for
  24532. multiprocessor serial data transmission.
  24533.  
  24534. Use the following procedure for multiprocessor serial data transmission after enabling the SCI for
  24535. transmission.
  24536.  
  24537. Rev. 2.0, 02/99, page 518 of 830
  24538.  
  24539. ----------------------- Page 533-----------------------
  24540.  
  24541. Start of transmission
  24542. 1. SCI status check and ID data write:
  24543. Read SCSSR1 and check that the
  24544. Read TEND flag in SCSSR1 TEND flag is set to 1, then set the
  24545. MPBT bit in SCSSR1 to 1 and write
  24546. ID data to SCTDR1. Finally, clear the
  24547. No
  24548. TEND = 1? TDRE flag to 0.
  24549.  
  24550. 2. Preparation for data transfer: Read
  24551. Yes SCSSR1 and check that the TEND
  24552. flag is set to 1, then set the MPBT bit
  24553. Set MPBT bit in SCSSR1 to 1 and
  24554. in SCSSR1 to 1.
  24555. write ID data to SCTDR1
  24556. 3. Serial data transmission: Write the
  24557. first transmit data to SCTDR1, then
  24558. Clear TDRE flag to 0
  24559. clear the TDRE flag to 0.
  24560.  
  24561. To continue data transmission, be
  24562. Read TEND flag in SCSSR1 sure to read 1 from the TDRE flag to
  24563. confirm that writing is possible, then
  24564. write data to SCTDR1, and then clear
  24565. No the TDRE flag to 0. (Checking and
  24566. TEND = 1?
  24567. clearing of the TDRE flag is
  24568. automatic when the direct memory
  24569. Yes
  24570. access controller (DMAC) is
  24571. Clear MPBT bit in SCSSR1 to 0 activated by a transmit-data-empty
  24572. interrupt (TXI) request, and data is
  24573. written to SCTDR1.)
  24574.  
  24575. Write data to SCTDR1
  24576.  
  24577. Clear TDRE flag to 0
  24578.  
  24579. Read TDRE flag in SCSSR1
  24580.  
  24581. No
  24582. TDRE = 1?
  24583.  
  24584. Yes
  24585.  
  24586. No
  24587. All data transmitted?
  24588.  
  24589. Yes
  24590.  
  24591. End of transmission
  24592.  
  24593. Figure 15.13 Sample Multiprocessor Serial Transmission Flowchart
  24594.  
  24595. Rev. 2.0, 02/99, page 519 of 830
  24596.  
  24597. ----------------------- Page 534-----------------------
  24598.  
  24599. In serial transmission, the SCI operates as described below.
  24600.  
  24601. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  24602. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  24603. SCTSR1.
  24604. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24605. transmission.
  24606. The serial transmit data is sent from the TxD pin in the following order.
  24607. a. Start bit: One 0-bit is output.
  24608. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  24609. c. Multiprocessor bit: One multiprocessor bit (MPBT value) is output.
  24610. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  24611. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  24612. sent.
  24613. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is set
  24614. to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and then the line goes to the
  24615. mark state in which 1 is output. If the TEIE bit in SCSCR1 is set to 1 at this time, a transmit-
  24616. end interrupt (TEI) request is generated.
  24617. 4. The SCI monitors the TDRE flag. When TDRE is cleared to 0, the SCI recognizes that data
  24618. has been written to SCTDR1, and transfers the data from SCTDR1 to SCTSR1.
  24619. 5. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24620. transmitting. If the transmit-data-empty interrupt enable bit (TIE bit) in SCSCR1 is set to 1 at
  24621. this time, a transmit-data-empty interrupt (TXI) request is generated.
  24622. The order of transmission is the same as in step 2.
  24623.  
  24624. Figure 15.14 shows an example of SCI operation for transmission using a multiprocessor format.
  24625.  
  24626. Rev. 2.0, 02/99, page 520 of 830
  24627.  
  24628. ----------------------- Page 535-----------------------
  24629.  
  24630. Multi- Multi- Multi-
  24631. Start Data proces- Stop Start Data proces- Stop Start Data proces- Stop
  24632. 1 bit sor bit bit bit sor bit bit bit sor bit bit 1
  24633.  
  24634. Serial Idle state
  24635. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 0 D0 D1 D7 0
  24636. data (mark state)
  24637.  
  24638. TDRE
  24639.  
  24640. TEND
  24641.  
  24642. One frame Data written to SCTDR1 TXI interrupt
  24643. and TDRE flag cleared request TEI interrupt
  24644. to 0 by TXI interrupt request
  24645. handler
  24646.  
  24647. MPBT bit cleared to 0, data
  24648. written to SCTDR1, and
  24649. TDRE flag cleared to 0 by
  24650. TEI interrupt handler
  24651.  
  24652. Figure 15.14 Example of SCI Transmit Operation (Example with 8-Bit Data,
  24653. Multiprocessor Bit, One Stop Bit)
  24654.  
  24655. Multiprocessor Serial Data Reception: Figure 15.15 shows a sample flowchart for
  24656. multiprocessor serial reception.
  24657.  
  24658. Use the following procedure for multiprocessor serial data reception after enabling the SCI for
  24659. reception.
  24660.  
  24661. Rev. 2.0, 02/99, page 521 of 830
  24662.  
  24663. ----------------------- Page 536-----------------------
  24664.  
  24665. Start of reception 1. ID reception cycle: Set the MPIE
  24666. bit in SCSCR1 to 1.
  24667.  
  24668. Set MPIE bit in SCSCR1 to 1 2. SCI status check, ID reception
  24669. and comparison: Read SCSSR1
  24670. and check that the RDRF flag is
  24671. Read ORER and FER flags set to 1, then read the receive
  24672. in SCSSR1 data in SCRDR1 and compare it
  24673. with this station’s ID.
  24674. Yes
  24675. FER = 1? or ORER = 1? If the data is not this station’s ID,
  24676. set the MPIE bit to 1 again, and
  24677. No clear the RDRF flag to 0. If the
  24678.  
  24679. Read RDRF flag in SCSSR1 data is this station’s ID, clear the
  24680. RDRF flag to 0.
  24681.  
  24682. No 3. SCI status check and data
  24683. RDRF = 1?
  24684. reception: Read SCSSR1 and
  24685. Yes check that the RDRF flag is set to
  24686. Read receive data in SCRDR1 1, then read the data in SCRDR1.
  24687.  
  24688. 4. Receive error handling and break
  24689. No detection: If a receive error
  24690. This station’s ID?
  24691. occurs, read the ORER and FER
  24692. Yes flags in SCSSR1 to identify the
  24693.  
  24694. error. After performing the
  24695. Read ORER and FER flags
  24696. appropriate error handling,
  24697. in SCSSR1
  24698. ensure that the ORER and FER
  24699. flags are all cleared to 0.
  24700. Yes
  24701. FER = 1? or ORER = 1? Reception cannot be resumed if
  24702. either of these flags is set to 1. In
  24703. No the case of a framing error, a
  24704. Read RDRF flag in SCSSR1 break can be detected by reading
  24705. the RxD pin value.
  24706. No
  24707. RDRF = 1?
  24708.  
  24709. Yes
  24710. Read receive data in SCRDR1
  24711.  
  24712. No
  24713. All data received?
  24714.  
  24715. Yes Error handling
  24716.  
  24717. End of reception
  24718.  
  24719. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (1)
  24720.  
  24721. Rev. 2.0, 02/99, page 522 of 830
  24722.  
  24723. ----------------------- Page 537-----------------------
  24724.  
  24725. Error handling
  24726.  
  24727. No
  24728. ORER = 1?
  24729.  
  24730. Yes
  24731.  
  24732. Overrun error handling
  24733.  
  24734. No
  24735. FER = 1?
  24736.  
  24737. Yes
  24738.  
  24739. Yes
  24740. Break?
  24741.  
  24742. No
  24743.  
  24744. Framing error handling Clear RE bit in SCSCR1 to 0
  24745.  
  24746. Clear ORER and FER flags
  24747. in SCSSR1 to 0
  24748.  
  24749. End
  24750.  
  24751. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (2)
  24752.  
  24753. Rev. 2.0, 02/99, page 523 of 830
  24754.  
  24755. ----------------------- Page 538-----------------------
  24756.  
  24757. Figure 15.16 shows an example of SCI operation for multiprocessor format reception.
  24758.  
  24759. Start Stop Start Data Stop
  24760. 1 bit Data (ID1) MPB bit bit (Data1) MPB bit 1
  24761.  
  24762. Serial 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 Idle state
  24763. data (mark state)
  24764.  
  24765. MPIE
  24766.  
  24767. RDRF
  24768.  
  24769. SCRDR1
  24770. ID1
  24771. value
  24772.  
  24773. RXI interrupt request SCRDR1 data read As data is not this RXI interrupt request
  24774. (multiprocessor and RDRF flag station’s ID, MPIE is not generated, and
  24775. interrupt) cleared to 0 by RXI bit is set to 1 again SCRDR1 retains its
  24776. MPIE = 0 interrupt handler state
  24777.  
  24778. (a) Data does not match station’s ID
  24779.  
  24780. Start Stop Start Data Stop
  24781. 1 bit Data (ID2) MPB bit bit (Data2) MPB bit 1
  24782.  
  24783. Serial Idle state
  24784. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1
  24785. data (mark state)
  24786.  
  24787. MPIE
  24788.  
  24789. RDRF
  24790.  
  24791. SCRDR1
  24792. value ID1 ID2 Data2
  24793.  
  24794. RXI interrupt request SCRDR1 data read As data matches this MPIE bit set
  24795. (multiprocessor interrupt) and RDRF flag station’s ID, reception to 1 again
  24796. MPIE = 0 cleared to 0 by RXI continues and data is
  24797. interrupt handler received by RXI
  24798. interrupt handler
  24799.  
  24800. (b) Data matches station’s ID
  24801.  
  24802. Figure 15.16 Example of SCI Receive Operation (Example with 8-Bit Data, Multiprocessor
  24803. Bit, One Stop Bit)
  24804.  
  24805. Rev. 2.0, 02/99, page 524 of 830
  24806.  
  24807. ----------------------- Page 539-----------------------
  24808.  
  24809. In multiprocessor mode serial reception, the SCI operates as described below.
  24810.  
  24811. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  24812. synchronization and starts reception.
  24813. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  24814. 3. If the MPIE bit is 1, MPIE is cleared to 0 when a 1 is received in the multiprocessor bit
  24815. position. If the multiprocessor bit is 0, the MPIE bit is not changed. The value of the
  24816. multiprocessor bit is transferred to the MPB bit in SCSSR1.
  24817. 4. If the MPIE bit is 0, RDRF is checked at the stop bit position, and if RDRF is 1 the overrun
  24818. error bit is set. If the stop bit is not 0, the framing error bit is set. If RDRF is 0, the value in
  24819. SCRSR1 is transferred to SCRDR1, and if the stop bit is 0, RDRF is set to 1.
  24820. If MPIE remains set to 1, the SCI ignores the received data.
  24821.  
  24822. 15.3.4 Operation in Synchronous Mode
  24823.  
  24824. In synchronous mode, data is transmitted or received in synchronization with clock pulses,
  24825. making it suitable for high-speed serial communication.
  24826.  
  24827. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  24828. communication. Both the transmitter and the receiver also have a double-buffered structure, so
  24829. that data can be read or written during transmission or reception, enabling continuous data
  24830. transfer.
  24831.  
  24832. Figure 15.17 shows the general format for synchronous serial communication.
  24833.  
  24834. One unit of transfer data (character or frame)
  24835.  
  24836. * *
  24837.  
  24838. Serial clock
  24839.  
  24840. LSB MSB
  24841.  
  24842. Serial data Don’t care Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Don’t care
  24843.  
  24844. Note: * High except in continuous transfer
  24845.  
  24846.  
  24847. Figure 15.17 Data Format in Synchronous Communication
  24848.  
  24849. Rev. 2.0, 02/99, page 525 of 830
  24850.  
  24851. ----------------------- Page 540-----------------------
  24852.  
  24853. In synchronous serial communication, data on the transmission line is output from one falling
  24854. edge of the serial clock to the next. Data confirmation is guaranteed at the rising edge of the
  24855. serial clock.
  24856.  
  24857. In serial communication, one character consists of data output starting with the LSB and ending
  24858. with the MSB. After the MSB is output, the transmission line holds the MSB state.
  24859.  
  24860. In synchronous mode, the SCI receives data in synchronization with the falling edge of the serial
  24861. clock.
  24862.  
  24863. Data Transfer Format
  24864.  
  24865. A fixed 8-bit data format is used. No parity or multiprocessor bits are added.
  24866.  
  24867. Clock
  24868.  
  24869. Either an internal clock generated by the on-chip baud rate generator or an external serial clock
  24870. input at the SCK pin can be selected, according to the setting of the C/$ bit in SCSMR1 and the
  24871. CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection, see table 15.9.
  24872.  
  24873. When the SCI is operated on an internal clock, the serial clock is output from the SCK pin.
  24874.  
  24875. Eight serial clock pulses are output in the transfer of one character, and when no transfer is
  24876. performed the clock is fixed high. In reception only, if an on-chip clock source is selected, clock
  24877. pulses are output while RE = 1. When the last data is received, RE should be cleared to 0 before
  24878. the end of bit 7.
  24879.  
  24880. Data Transfer Operations
  24881.  
  24882. SCI Initialization (Synchronous Mode): Before transmitting and receiving data, it is necessary
  24883. to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  24884.  
  24885. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared
  24886. to 0 before making the change using the following procedure. When the TE bit is cleared to 0,
  24887. the TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  24888. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  24889.  
  24890. Figure 15.18 shows a sample SCI initialization flowchart.
  24891.  
  24892. Rev. 2.0, 02/99, page 526 of 830
  24893.  
  24894. ----------------------- Page 541-----------------------
  24895.  
  24896. 1. Set the clock selection in SCSCR1.
  24897. Initialization
  24898. Be sure to clear bits RIE, TIE, TEIE,
  24899. and MPIE, TE and RE, to 0.
  24900.  
  24901. Clear TE and RE bits 2. Set the data transfer format in
  24902. in SCSCR1 to 0 SCSMR1.
  24903.  
  24904. 3. Write a value corresponding to the bit
  24905. Set RIE, TIE, TEIE, MPIE, CKE1 rate into SCBRR1. (Not necessary if
  24906. and CKE0 bits in SCSCR1 an external clock is used.)
  24907. (leaving TE and RE bits 4. Wait at least one bit interval, then set
  24908. cleared to 0) the TE bit or RE bit in SCSCR1 to 1.
  24909.  
  24910. Also set the RIE, TIE, TEIE, and MPIE
  24911. Set data transfer format
  24912. bits. Setting the TE and RE bits
  24913. in SCSMR1
  24914. enables the TxD and RxD pins to be
  24915. used.
  24916.  
  24917. Set value in SCBRR1
  24918.  
  24919.  
  24920. Wait
  24921.  
  24922. No
  24923. 1-bit interval elapsed?
  24924.  
  24925. Yes
  24926.  
  24927. Set TE and RE bits in SCSCR1
  24928. to 1, and set RIE, TIE, TEIE,
  24929. and MPIE bits
  24930.  
  24931. End
  24932.  
  24933. Figure 15.18 Sample SCI Initialization Flowchart
  24934.  
  24935. Rev. 2.0, 02/99, page 527 of 830
  24936.  
  24937. ----------------------- Page 542-----------------------
  24938.  
  24939. Serial Data Transmission (Synchronous Mode): Figure 15.19 shows a sample flowchart for
  24940. serial transmission.
  24941.  
  24942. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  24943.  
  24944. 1. SCI status check and transmit
  24945. Start of transmission
  24946. data write: Read SCSSR1 and
  24947. check that the TDRE flag is set to
  24948. 1, then write transmit data to
  24949. Read TDRE flag in SCSSR1
  24950. SCTDR1 and clear the TDRE flag
  24951. to 0.
  24952.  
  24953. No 2. To continue serial transmission,
  24954. TDRE = 1?
  24955. be sure to read 1 from the TDRE
  24956. flag to confirm that writing is
  24957. Yes possible, then write data to
  24958. SCTDR1, and then clear the
  24959. Write transmit data to SCTDR1 TDRE flag to 0. (Checking and
  24960. and clear TDRE flag clearing of the TDRE flag is
  24961. in SCSSR1 to 0 automatic when the direct
  24962. memory access controller
  24963. (DMAC) is activated by a
  24964. All data transmitted? No transmit-data-empty interrupt
  24965.  
  24966. (TXI) request, and data is written
  24967. to SCTDR1.)
  24968. Yes
  24969.  
  24970.  
  24971. Read TEND flag in SCSSR1
  24972.  
  24973. No
  24974. TEND = 1?
  24975.  
  24976. Yes
  24977.  
  24978. Clear TE bit in SCSCR1 to 0
  24979.  
  24980. End
  24981.  
  24982. Figure 15.19 Sample Serial Transmission Flowchart
  24983.  
  24984. Rev. 2.0, 02/99, page 528 of 830
  24985.  
  24986. ----------------------- Page 543-----------------------
  24987.  
  24988. In serial transmission, the SCI operates as described below.
  24989.  
  24990. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  24991. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  24992. SCTSR1.
  24993. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24994. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI)
  24995. request is generated.
  24996. When clock output mode has been set, the SCI outputs 8 serial clock pulses. When use of an
  24997. external clock has been specified, data is output synchronized with the input clock.
  24998. The serial transmit data is sent from the TxD pin starting with the LSB (bit 0) and ending
  24999. with the MSB (bit 7).
  25000. 3. The SCI checks the TDRE flag at the timing for sending the MSB (bit 7).
  25001. If the TDRE flag is cleared to 0, data is transferred from SCTDR1 to SCTSR1, and serial
  25002. transmission of the next frame is started.
  25003. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the MSB (bit 7) is sent,
  25004. and the TxD pin maintains its state.
  25005. If the TEIE bit in SCSCR1 is set to 1 at this time, a transmit-end interrupt (TEI) request is
  25006. generated.
  25007. 4. After completion of serial transmission, the SCK pin is fixed high.
  25008.  
  25009. Figure 15.20 shows an example of SCI operation in transmission.
  25010.  
  25011. Rev. 2.0, 02/99, page 529 of 830
  25012.  
  25013. ----------------------- Page 544-----------------------
  25014.  
  25015. Transfer
  25016. direction
  25017.  
  25018. Serial clock
  25019.  
  25020. LSB MSB
  25021.  
  25022. Serial data Bit 0 Bit 1 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  25023.  
  25024. TDRE
  25025.  
  25026. TEND
  25027.  
  25028. Data written to SCTDR1 TXI interrupt TEI interrupt
  25029. and TDRE flag cleared to request request
  25030. TXI interrupt 0 in TXI interrupt handler
  25031.  
  25032. request One frame
  25033.  
  25034. Figure 15.20 Example of SCI Transmit Operation
  25035.  
  25036. Serial Data Reception (Synchronous Mode): Figure 15.21 shows a sample flowchart for serial
  25037. reception.
  25038.  
  25039. Use the following procedure for serial data reception after enabling the SCI for reception.
  25040.  
  25041. When changing the operating mode from asynchronous to synchronous, be sure to check that the
  25042. ORER, PER, and FER flags are all cleared to 0. The RDRF flag will not be set if the FER or PER
  25043. flag is set to 1, and neither transmit nor receive operations will be possible.
  25044.  
  25045. Rev. 2.0, 02/99, page 530 of 830
  25046.  
  25047. ----------------------- Page 545-----------------------
  25048.  
  25049. Start of reception 1. Receive error handling: If a
  25050. receive error occurs, read the
  25051. ORER flag in SCSSR1 , and
  25052. after performing the appropriate
  25053. Read ORER flag in SCSSR1
  25054. error handling, clear the ORER
  25055. flag to 0. Transfer cannot be
  25056. resumed if the ORER flag is set
  25057. Yes
  25058. ORER = 1? to 1.
  25059.  
  25060. 2. SCI status check and receive
  25061. No Error handling data read: Read SCSSR1 and
  25062. check that the RDRF flag is set
  25063. to 1, then read the receive data
  25064. Read RDRF flag in SCSSR1
  25065. in SCRDR1 and clear the RDRF
  25066. flag to 0. Transition of the RDRF
  25067. No flag from 0 to 1 can also be
  25068. RDRF = 1?
  25069. identified by an RXI interrupt.
  25070.  
  25071. Yes 3. Serial reception continuation
  25072. procedure: To continue serial
  25073. Read receive data in SCRDR1, reception, finish reading the
  25074. and clear RDRF flag RDRF flag, reading SCRDR1,
  25075. in SCSSR1 to 0 and clearing the RDRF flag to 0,
  25076. before the MSB (bit 7) of the
  25077. No current frame is received. (The
  25078. All data received? RDRF flag is cleared
  25079. automatically when the direct
  25080. Yes memory access controller
  25081. (DMAC) is activated by a
  25082. Clear RE bit in SCSCR1 to 0 receive-data-full interrupt (RXI)
  25083.  
  25084. request and the SCRDR1 value
  25085. End of reception is read.)
  25086.  
  25087. Figure 15.21 Sample Serial Reception Flowchart (1)
  25088.  
  25089. Rev. 2.0, 02/99, page 531 of 830
  25090.  
  25091. ----------------------- Page 546-----------------------
  25092.  
  25093. Error handling
  25094.  
  25095. No
  25096. ORER = 1?
  25097.  
  25098. Yes
  25099.  
  25100. Overrun error handling
  25101.  
  25102. Clear ORER flag in SCSSR1 to 0
  25103.  
  25104. End
  25105.  
  25106. Figure 15.21 Sample Serial Reception Flowchart (2)
  25107.  
  25108. In serial reception, the SCI operates as described below.
  25109.  
  25110. 1. The SCI performs internal initialization in synchronization with serial clock input or output.
  25111. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25112. After reception, the SCI checks whether the RDRF flag is 0, indicating that the receive data
  25113. can be transferred from SCRSR1 to SCRDR1.
  25114. If this check is passed, the RDRF flag is set to 1, and the receive data is stored in SCRDR1. If
  25115. a receive error is detected in the error check, the operation is as shown in table 15.11.
  25116. Neither transmit nor receive operations can be performed subsequently when a receive error
  25117. has been found in the error check.
  25118. Also, as the RDRF flag is not set to 1 when receiving, the flag must be cleared to 0.
  25119. 3. If the RIE bit in SCRSR1 is set to 1 when the RDRF flag changes to 1, a receive-data-full
  25120. interrupt (RXI) request is generated. If the RIE bit in SCRSR1 is set to 1 when the ORER flag
  25121. changes to 1, a receive-error interrupt (ERI) request is generated.
  25122.  
  25123. Figure 15.22 shows an example of SCI operation in reception.
  25124.  
  25125. Rev. 2.0, 02/99, page 532 of 830
  25126.  
  25127. ----------------------- Page 547-----------------------
  25128.  
  25129. Transfer
  25130. direction
  25131.  
  25132. Serial clock
  25133.  
  25134. Serial data Bit 7 Bit 0 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  25135.  
  25136. RDRF
  25137.  
  25138. ORER
  25139.  
  25140. RXI interrupt Data read from RXI interrupt ERI interrupt
  25141. request SCRDR1 and RDRF request request due to
  25142. flag cleared to 0 in RXI overrun error
  25143. interrupt handler
  25144.  
  25145. One frame
  25146.  
  25147. Figure 15.22 Example of SCI Receive Operation
  25148.  
  25149. Simultaneous Serial Data Transmission and Reception (Synchronous Mode): Figure 15.23
  25150. shows a sample flowchart for simultaneous serial transmit and receive operations.
  25151.  
  25152. Use the following procedure for simultaneous serial data transmit and receive operations after
  25153. enabling the SCI for transmission and reception.
  25154.  
  25155. Rev. 2.0, 02/99, page 533 of 830
  25156.  
  25157. ----------------------- Page 548-----------------------
  25158.  
  25159. 1. SCI status check and transmit data
  25160. Start of transmission/reception
  25161. write:
  25162. Read SCSSR1 and check that the
  25163. TDRE flag is set to 1, then write
  25164. transmit data to SCTDR1 and clear
  25165. Read TDRE flag in SCSSR1
  25166. the TDRE flag to 0. Transition of the
  25167. TDRE flag from 0 to 1 can also be
  25168. No identified by a TXI interrupt.
  25169. TDRE = 1?
  25170. 2. Receive error handling:
  25171. Yes If a receive error occurs, read the
  25172. ORER flag in SCSSR1 , and after
  25173. Write transmit data performing the appropriate error
  25174. to SCTDR1 and clear TDRE flag handling, clear the ORER flag to 0.
  25175. in SCSSR1 to 0 Transmission/reception cannot be
  25176. resumed if the ORER flag is set to 1.
  25177.  
  25178. 3. SCI status check and receive data
  25179. read:
  25180. Read ORER flag in SCSSR1 Read SCSSR1 and check that the
  25181.  
  25182. RDRF flag is set to 1, then read the
  25183. Yes receive data in SCRDR1 and clear the
  25184. ORER = 1? RDRF flag to 0. Transition of the
  25185. RDRF flag from 0 to 1 can also be
  25186. No Error handling identified by an RXI interrupt.
  25187.  
  25188. 4. Serial transmission/reception
  25189. Read RDRF flag in SCSSR1 continuation procedure:
  25190. To continue serial transmission/
  25191. No reception, finish reading the RDRF
  25192. RDRF = 1? flag, reading SCRDR1, and clearing
  25193. the RDRF flag to 0, before the MSB
  25194. Yes (bit 7) of the current frame is received.
  25195. Also, before the MSB (bit 7) of the
  25196. Read receive data in SCRDR1, current frame is transmitted, read 1
  25197. and clear RDRF flag from the TDRE flag to confirm that
  25198. in SCSSR1 to 0 writing is possible, then write data to
  25199. SCTDR1 and clear the TDRE flag to
  25200. 0.
  25201. No
  25202. All data transferred? (Checking and clearing of the TDRE
  25203. flag is automatic when the DMAC is
  25204. Yes activated by a transmit-data-empty
  25205. interrupt (TXI) request, and data is
  25206. Clear TE and RE bits written to SCTDR1. Similarly, the
  25207. in SCRSR1 to 0 RDRF flag is cleared automatically
  25208. when the DMAC is activated by a
  25209. receive-data-full interrupt (RXI)
  25210. End of transmission/reception request and the SCRDR1 value is
  25211. read.)
  25212.  
  25213. Note: When switching from transmit or receive operation to simultaneous transmit and receive
  25214. operations, first clear the TE bit and RE bit to 0, then set both these bits to 1.
  25215.  
  25216. Figure 15.23 Sample Flowchart for Serial Data Transmission and Reception
  25217.  
  25218. Rev. 2.0, 02/99, page 534 of 830
  25219.  
  25220. ----------------------- Page 549-----------------------
  25221.  
  25222. 15.4 SCI Interrupt Sources and DMAC
  25223.  
  25224. The SCI has four interrupt sources: the transmit-end interrupt (TEI) request, receive-error
  25225. interrupt (ERI) request, receive-data-full interrupt (RXI) request, and transmit-data-empty
  25226. interrupt (TXI) request.
  25227.  
  25228. Table 15.12 shows the interrupt sources and their relative priorities. Individual interrupt sources
  25229. can be enabled or disabled with the TIE, RIE, and TEIE bits in SCRSR1, and the EIO bit in
  25230. SCSPTR1. Each kind of interrupt request is sent to the interrupt controller independently.
  25231.  
  25232. When the TDRE flag in the serial status register (SCSSR1) is set to 1, a TDR-empty request is
  25233. generated separately from the interrupt request. A TDR-empty request can activate the direct
  25234. memory access controller (DMAC) to perform data transfer. The TDRE flag is cleared to 0
  25235. automatically when a write to the transmit data register (SCTDR1) is performed by the DMAC.
  25236.  
  25237. When the RDRF flag in SCSSR1 is set to 1, an RDR-full request is generated separately from the
  25238. interrupt request. An RDR-full request can activate the DMAC to perform data transfer.
  25239.  
  25240. The RDRF flag is cleared to 0 automatically when a receive data register (SCRDR1) read is
  25241. performed by the DMAC.
  25242.  
  25243. When the ORER, FER, or PER flag in SCSSR1 is set to 1, an ERI interrupt request is generated.
  25244. The DMAC cannot be activated by an ERI interrupt request. When receive data processing is to
  25245. be carried out by the DMAC and receive error handling is to be performed by means of an
  25246. interrupt to the CPU, set the RIE bit to 1 and also set the EIO bit in SCSPTR1 to 1 so that an
  25247. interrupt error occurs only for a receive error. If the EIO bit is cleared to 0, interrupts to the CPU
  25248. will be generated even during normal data reception.
  25249.  
  25250. When the TEND flag in SCSSR1 is set to 1, a TEI interrupt request is generated. The DMAC
  25251. cannot be activated by a TEI interrupt request.
  25252.  
  25253. A TXI interrupt indicates that transmit data can be written, and a TEI interrupt indicates that the
  25254. transmit operation has ended.
  25255.  
  25256. Table 15.12 SCI Interrupt Sources
  25257.  
  25258. Interrupt DMAC Priority on
  25259. Source Description Activation Reset Release
  25260.  
  25261. ERI Receive error (ORER, FER, or PER) Not possible High
  25262.  
  25263. RXI Receive data register full (RDRF) Possible ↑
  25264.  
  25265. TXI Transmit data register empty (TDRE) Possible ↓
  25266.  
  25267. TEI Transmit end (TEND) Not possible Low
  25268.  
  25269. See section 5, Exceptions, for the priority order and relation to non-SCI interrupts.
  25270.  
  25271. Rev. 2.0, 02/99, page 535 of 830
  25272.  
  25273. ----------------------- Page 550-----------------------
  25274.  
  25275. 15.5 Usage Notes
  25276.  
  25277. The following points should be noted when using the SCI.
  25278.  
  25279. SCTDR1 Writing and the TDRE Flag: The TDRE flag in SCSSR1 is a status flag that
  25280. indicates that transmit data has been transferred from SCTDR1 to SCTSR1. When the SCI
  25281. transfers data from SCTDR1 to SCTSR1, the TDRE flag is set to 1.
  25282.  
  25283. Data can be written to SCTDR1 regardless of the state of the TDRE flag. However, if new data is
  25284. written to SCTDR1 when the TDRE flag is cleared to 0, the data stored in SCTDR1 will be lost
  25285. since it has not yet been transferred to SCTSR1. It is therefore essential to check that the TDRE
  25286. flag is set to 1 before writing transmit data to SCTDR1.
  25287.  
  25288. Simultaneous Multiple Receive Errors: If a number of receive errors occur at the same time,
  25289. the state of the status flags in SCSSR1 is as shown in table 15.13. If there is an overrun error,
  25290. data is not transferred from SCRSR1 to SCRDR1, and the receive data is lost.
  25291.  
  25292. Table 15.13 SCSSR1 Status Flags and Transfer of Receive Data
  25293.  
  25294. SCSSR1 Status Flags Receive Data
  25295. Transfer
  25296. SCRSR1 →→ SCRDR1
  25297.  
  25298. Receive Errors RDRF ORER FER PER
  25299.  
  25300. Overrun error 1 1 0 0 X
  25301.  
  25302. Framing error 0 0 1 0 O
  25303.  
  25304. Parity error 0 0 0 1 O
  25305.  
  25306. Overrun error + framing error 1 1 1 0 X
  25307.  
  25308. Overrun error + parity error 1 1 0 1 X
  25309.  
  25310. Framing error + parity error 0 0 1 1 O
  25311.  
  25312. Overrun error + framing error + 1 1 1 1 X
  25313. parity error
  25314.  
  25315. O: Receive data is transferred from SCRSR1 to SCRDR1.
  25316. X: Receive data is not transferred from SCRSR1 to SCRDR1.
  25317.  
  25318. Break Detection and Processing: Break signals can be detected by reading the RxD pin directly
  25319. when a framing error (FER) is detected. In the break state the input from the RxD pin consists of
  25320. all 0s, so the FER flag is set and the parity error flag (PER) may also be set. Note that the SCI
  25321. receiver continues to operate in the break state, so if the FER flag is cleared to 0 it will be set to 1
  25322. again.
  25323.  
  25324. Rev. 2.0, 02/99, page 536 of 830
  25325.  
  25326. ----------------------- Page 551-----------------------
  25327.  
  25328. Sending a Break Signal: The input/output condition and level of the TxD pin are determined by
  25329. bits SPB0IO and SPB0DT in the serial port register (SCSPTR1). This feature can be used to send
  25330. a break signal.
  25331.  
  25332. After the serial transmitter is initialized, the TxD pin function is not selected and the value of the
  25333. SPB0DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  25334. enabled). The SPB0IO and SPB0DT bits should therefore be set to 1 (designating output and
  25335. high level) beforehand.
  25336.  
  25337. To send a break signal during serial transmission, clear the SPB0DT bit to 0 (designating low
  25338. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  25339. transmitter is initialized regardless of its current state, and the TxD pin becomes an output port
  25340. outputting the value 0.
  25341.  
  25342. Receive Error Flags and Transmit Operations (Synchronous Mode Only): Transmission
  25343. cannot be started when a receive error flag (ORER, PER, or FER) is set to 1, even if the TDRE
  25344. flag is set to 1. Be sure to clear the receive error flags to 0 before starting transmission.
  25345.  
  25346. Note also that the receive error flags are not cleared to 0 by clearing the RE bit to 0.
  25347.  
  25348. Receive Data Sampling Timing and Receive Margin in Asynchronous Mode: The SCI
  25349. operates on a base clock with a frequency of 16 times the bit rate. In reception, the SCI
  25350. synchronizes internally with the fall of the start bit, which it samples on the base clock. Receive
  25351. data is latched at the rising edge of the eighth base clock pulse. The timing is shown in figure
  25352. 15.24.
  25353.  
  25354. Rev. 2.0, 02/99, page 537 of 830
  25355.  
  25356. ----------------------- Page 552-----------------------
  25357.  
  25358. 16 clocks
  25359.  
  25360. 8 clocks
  25361.  
  25362. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5
  25363.  
  25364. Base clock
  25365.  
  25366. –7.5 clocks +7.5 clocks
  25367.  
  25368. Receive data Start bit D0 D1
  25369. (RxD)
  25370.  
  25371. Synchronization
  25372. sampling timing
  25373.  
  25374. Data sampling
  25375. timing
  25376.  
  25377. Figure 15.24 Receive Data Sampling Timing in Asynchronous Mode
  25378.  
  25379. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  25380.  
  25381. M = (0.5 – 1 ) – (L – 0.5) F – | D – 0.5 | (1 + F) × 100% ................ (1)
  25382. 2N N
  25383.  
  25384. M: Receive margin (%)
  25385. N: Ratio of clock frequency to bit rate (N = 16)
  25386. D: Clock duty cycle (D = 0 to 1.0)
  25387. L: Frame length (L = 9 to 12)
  25388. F: Absolute deviation of clock frequency
  25389.  
  25390. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation (2).
  25391.  
  25392. When D = 0.5 and F = 0:
  25393.  
  25394. M = (0.5 – 1/(2 × 16)) × 100% = 46.875% ........................................ (2)
  25395.  
  25396. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  25397.  
  25398. Rev. 2.0, 02/99, page 538 of 830
  25399.  
  25400. ----------------------- Page 553-----------------------
  25401.  
  25402. When Using the DMAC: When an external clock source is used as the serial clock, the transmit
  25403. clock should not be input until at least 5 peripheral operating clock cycles after SCTDR1 is
  25404. updated by the DMAC. Incorrect operation may result if the transmit clock is input within 4
  25405. cycles after SCTDR1 is updated. (See figure 15.25)
  25406.  
  25407. SCK
  25408. t
  25409.  
  25410. TDRE
  25411.  
  25412. TxD D0 D1 D2 D3 D4 D5 D6 D7
  25413.  
  25414. Note: When operating on an external clock, set t > 4.
  25415.  
  25416. Figure 15.25 Example of Synchronous Transmission by DMAC
  25417.  
  25418. When SCRDR1 is read by the DMAC, be sure to set the SCI receive-data-full interrupt (RXI) as
  25419. the activation source with bits RS3 to RS0 in CHCR.
  25420.  
  25421. When Using Synchronous External Clock Mode:
  25422. • Do not set TE or RE to 1 until at least 4 peripheral operating clock cycles after external clock
  25423. SCK has changed from 0 to 1.
  25424. • Only set both TE and RE to 1 when external clock SCK is 1.
  25425. • In reception, note that if RE is cleared to 0 from 2.5 to 3.5 peripheral operating clock cycles
  25426. after the rising edge of the RxD D7 bit SCK input, RDRF will be set to 1 but copying to
  25427. SCRDR1 will not be possible.
  25428.  
  25429. When Using Synchronous Internal Clock Mode: In reception, note that if RE is cleared to zero
  25430. 1.5 peripheral operating clock cycles after the rising edge of the RxD D7 bit SCK output, RDRF
  25431. will be set to 1 but copying to SCRDR1 will not be possible.
  25432.  
  25433. Rev. 2.0, 02/99, page 539 of 830
  25434.  
  25435. ----------------------- Page 554-----------------------
  25436.  
  25437. Rev. 2.0, 02/99, page 540 of 830
  25438.  
  25439. ----------------------- Page 555-----------------------
  25440.  
  25441. Section 16 Serial Communication Interface with FIFO
  25442. (SCIF)
  25443.  
  25444. 16.1 Overview
  25445.  
  25446. The SH7750 is equipped with a single-channel serial communication interface with built-in
  25447. FIFO buffers (Serial Communication Interface with FIFO: SCIF). The SCIF can perform
  25448. asynchronous serial communication.
  25449.  
  25450. Sixteen-stage FIFO registers are provided for both transmission and reception, enabling fast,
  25451. efficient, and continuous communication.
  25452.  
  25453. 16.1.1 Features
  25454.  
  25455. SCIF features are listed below.
  25456.  
  25457. • Asynchronous serial communication
  25458. Serial data communication is executed using an asynchronous system in which
  25459. synchronization is achieved character by character. Serial data communication can be carried
  25460. out with standard asynchronous communication chips such as a Universal Asynchronous
  25461. Receiver/Transmitter (UART) or Asynchronous Communication Interface Adapter (ACIA).
  25462. There is a choice of 8 serial data transfer formats.
  25463.  Data length: 7 or 8 bits
  25464.  Stop bit length: 1 or 2 bits
  25465.  Parity: Even/odd/none
  25466.  Receive error detection: Parity, framing, and overrun errors
  25467.  Break detection: If the receive data following that in which a framing error occurred is
  25468. also at the space “0” level, and there is a frame error, a break is detected. When a framing
  25469. error occurs, a break can also be detected by reading the RxD2 pin level directly from the
  25470. serial port register (SCSPTR2).
  25471. • Full-duplex communication capability
  25472. The transmitter and receiver are independent units, enabling transmission and reception to be
  25473. performed simultaneously.
  25474. The transmitter and receiver both have a 16-stage FIFO buffer structure, enabling fast and
  25475. continuous serial data transmission and reception.
  25476. • On-chip baud rate generator allows any bit rate to be selected.
  25477. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  25478. SCK2 pin
  25479.  
  25480. Rev. 2.0, 02/99, page 541 of 830
  25481.  
  25482. ----------------------- Page 556-----------------------
  25483.  
  25484. • Four interrupt sources
  25485. There are four interrupt sources—transmit-FIFO-data-empty, break, receive-FIFO-data-full,
  25486. and receive-error—that can issue requests independently.
  25487. • The DMA controller (DMAC) can be activated to execute a data transfer by issuing a DMA
  25488. transfer request in the event of a transmit-FIFO-data-empty or receive-FIFO-data-full
  25489. interrupt.
  25490. • When not in use, the SCIF can be stopped by halting its clock supply to reduce power
  25491. consumption.
  25492. • Modem control functions (576 and &76) are provided.
  25493. • The amount of data in the transmit/receive FIFO registers, and the number of receive errors
  25494. in the receive data in the receive FIFO register, can be ascertained.
  25495. • A timeout error (DR) can be detected during reception.
  25496.  
  25497. Rev. 2.0, 02/99, page 542 of 830
  25498.  
  25499. ----------------------- Page 557-----------------------
  25500.  
  25501. 16.1.2 Block Diagram
  25502.  
  25503. Figure 16.1 shows a block diagram of the SCIF.
  25504.  
  25505. e
  25506. c Internal
  25507. a
  25508. Module data bus f data bus
  25509. r
  25510. e
  25511. t
  25512. n
  25513. i
  25514.  
  25515. s
  25516. u
  25517. B
  25518.  
  25519. SCFRDR2 SCFTDR2 SCSMR2 SCBRR2
  25520. (16-stage) (16-stage) SCLSR2
  25521.  
  25522. SCFDR2
  25523. Pφ
  25524. SCFCR2
  25525. RxD2 SCRSR2 SCTSR2
  25526. SCFSR2 Baud rate Pφ/4
  25527. SCSCR2 generator
  25528.  
  25529. SCSPTR2 Pφ/16
  25530.  
  25531. Transmission/
  25532. reception Pφ/64
  25533. control
  25534. TxD2
  25535. Parity generation Clock
  25536.  
  25537. Parity check
  25538.  
  25539. External clock
  25540. SCK2
  25541. TXI
  25542. CTS2 RXI
  25543. ERI
  25544. RTS2 BRI
  25545.  
  25546. SCIF
  25547.  
  25548. SCRSR2: Receive shift register SCFSR2: Serial status register
  25549. SCFRDR2: Receive FIFO data register SCBRR2: Bit rate register
  25550. SCTSR2: Transmit shift register SCSPTR2: Serial port register
  25551. SCFTDR2: Transmit FIFO data register SCFCR2: FIFO control register
  25552. SCSMR2: Serial mode register SCFDR2: FIFO data count register
  25553. SCSCR2: Serial control register SCLSR2: Line status register
  25554.  
  25555. Figure 16.1 Block Diagram of SCIF
  25556.  
  25557. Rev. 2.0, 02/99, page 543 of 830
  25558.  
  25559. ----------------------- Page 558-----------------------
  25560.  
  25561. 16.1.3 Pin Configuration
  25562.  
  25563. Table 16.1 shows the SCIF pin configuration.
  25564.  
  25565. Table 16.1 SCIF Pins
  25566.  
  25567. Pin Name Abbreviation I/O Function
  25568.  
  25569. Serial clock pin MRESET/SCK2 Input Clock input
  25570.  
  25571. Receive data pin MD2/RxD2 Input Receive data input
  25572.  
  25573. Transmit data pin MD1/TxD2 Output Transmit data output
  25574.  
  25575. Modem control pin &76 I/O Transmission enabled
  25576.  
  25577. Modem control pin MD8/576 I/O Transmission request
  25578.  
  25579. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset
  25580. is executed. The MD1/TxD2, MD2/RxD2, and MD8/576 pins function as the MD1, MD2,
  25581. and MD8 mode input pins after a power-on reset. These pins are made to function as
  25582. serial pins by performing SCIF operation settings with the TE and RE bits in SCSCR2 and
  25583. the MCE bit in SCFCR2. Break state transmission and detection can be set in the SCIF’s
  25584. SCSPTR2 register.
  25585.  
  25586. Rev. 2.0, 02/99, page 544 of 830
  25587.  
  25588. ----------------------- Page 559-----------------------
  25589.  
  25590. 16.1.4 Register Configuration
  25591.  
  25592. The SCIF has the internal registers shown in table 16.2. These registers are used to specify the
  25593. data format and bit rate, and to perform transmitter/receiver control.
  25594.  
  25595. Table 16.2 SCIF Registers
  25596.  
  25597. Abbrevia- Initial P4 Area 7 Access
  25598. Name tion R/W Value Address Address Size
  25599.  
  25600. Serial mode register SCSMR2 R/W H'0000 H'FFE80000 H'IFE80000 16
  25601.  
  25602. Bit rate register SCBRR2 R/W H'FF H'FFE80004 H'IFE80004 8
  25603.  
  25604. Serial control register SCSCR2 R/W H'0000 H'FFE80008 H'IFE80008 16
  25605.  
  25606. Transmit FIFO data register SCFTDR2 W Undefined H'FFE8000C H'IFE8000C 8
  25607. Serial status register SCFSR2 R/(W)*1 H'0060 H'FFE80010 H'IFE80010 16
  25608.  
  25609. Receive FIFO data register SCFRDR2 R Undefined H'FFE80014 H'IFE80014 8
  25610.  
  25611. FIFO control register SCFCR2 R/W H'0000 H'FFE80018 H'IFE80018 16
  25612.  
  25613. FIFO data count register SCFDR2 R H'0000 H'FFE8001C H'IFE8001C 16
  25614. Serial port register SCSPTR2 R/W H'0000*2 H'FFE80020 H'IFE80020 16
  25615.  
  25616. Line status register SCLSR2 R/(W)*3 H'0000 H'FFE80024 H'IFE80024 16
  25617.  
  25618. Notes: 1. Only 0 can be written, to clear flags. Bits 15 to 8, 3, and 2 are read-only, and cannot
  25619. be modified.
  25620. 2. The value of bits 6, 4, and 0 is undefined.
  25621. 3. Only 0 can be written, to clear flags. Bits 15 to 1 are read-only, and cannot be
  25622. modified.
  25623.  
  25624. Rev. 2.0, 02/99, page 545 of 830
  25625.  
  25626. ----------------------- Page 560-----------------------
  25627.  
  25628. 16.2 Register Descriptions
  25629.  
  25630. 16.2.1 Receive Shift Register (SCRSR2)
  25631.  
  25632. Bit: 7 6 5 4 3 2 1 0
  25633.  
  25634. R/W: — — — — — — — —
  25635.  
  25636. SCRSR2 is the register used to receive serial data.
  25637.  
  25638. The SCIF sets serial data input from the RxD2 pin in SCRSR2 in the order received, starting
  25639. with the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it
  25640. is transferred to the receive FIFO register, SCFRDR2, automatically.
  25641.  
  25642. SCRSR2 cannot be directly read or written to by the CPU.
  25643.  
  25644. 16.2.2 Receive FIFO Data Register (SCFRDR2)
  25645.  
  25646. Bit: 7 6 5 4 3 2 1 0
  25647.  
  25648. R/W: R R R R R R R R
  25649.  
  25650. SCFRDR2 is a 16-stage FIFO register that stores received serial data.
  25651.  
  25652. When the SCIF has received one byte of serial data, it transfers the received data from SCRSR2
  25653. to SCFRDR2 where it is stored, and completes the receive operation. SCRSR2 is then enabled
  25654. for reception, and consecutive receive operations can be performed until the receive FIFO
  25655. register is full (16 data bytes).
  25656.  
  25657. SCFRDR2 is a read-only register, and cannot be written to by the CPU.
  25658.  
  25659. If a read is performed when there is no receive data in the receive FIFO register, an undefined
  25660. value will be returned. When the receive FIFO register is full of receive data, subsequent serial
  25661. data is lost.
  25662.  
  25663. The contents of SCFRDR2 are undefined after a power-on reset or manual reset.
  25664.  
  25665. Rev. 2.0, 02/99, page 546 of 830
  25666.  
  25667. ----------------------- Page 561-----------------------
  25668.  
  25669. 16.2.3 Transmit Shift Register (SCTSR2)
  25670.  
  25671. Bit: 7 6 5 4 3 2 1 0
  25672.  
  25673. R/W: — — — — — — — —
  25674.  
  25675. SCTSR2 is the register used to transmit serial data.
  25676.  
  25677. To perform serial data transmission, the SCIF first transfers transmit data from SCFTDR2 to
  25678. SCTSR2, then sends the data to the TxD2 pin starting with the LSB (bit 0).
  25679.  
  25680. When transmission of one byte is completed, the next transmit data is transferred from
  25681. SCFTDR2 to SCTSR2, and transmission started, automatically.
  25682.  
  25683. SCTSR2 cannot be directly read or written to by the CPU.
  25684.  
  25685. 16.2.4 Transmit FIFO Data Register (SCFTDR2)
  25686.  
  25687. Bit: 7 6 5 4 3 2 1 0
  25688.  
  25689. R/W: W W W W W W W W
  25690.  
  25691. SCFTDR2 is a 16-stage FIFO register that stores data for serial transmission.
  25692.  
  25693. If SCTSR2 is empty when transmit data has been written to SCFTDR2, the SCIF transfers the
  25694. transmit data written in SCFTDR2 to SCTSR2 and starts serial transmission.
  25695.  
  25696. SCFTDR2 is a write-only register, and cannot be read by the CPU.
  25697.  
  25698. The next data cannot be written when SCFTDR2 is filled with 16 bytes of transmit data. Data
  25699. written in this case is ignored.
  25700.  
  25701. The contents of SCFTDR2 are undefined after a power-on reset or manual reset.
  25702.  
  25703. Rev. 2.0, 02/99, page 547 of 830
  25704.  
  25705. ----------------------- Page 562-----------------------
  25706.  
  25707. 16.2.5 Serial Mode Register (SCSMR2)
  25708.  
  25709. Bit: 15 14 13 12 11 10 9 8
  25710.  
  25711. — — — — — — — —
  25712.  
  25713. Initial value: 0 0 0 0 0 0 0 0
  25714.  
  25715. R/W: R R R R R R R R
  25716.  
  25717. Bit: 7 6 5 4 3 2 1 0
  25718.  
  25719. — CHR PE O/( STOP — CKS1 CKS0
  25720.  
  25721. Initial value: 0 0 0 0 0 0 0 0
  25722.  
  25723. R/W: R R/W R/W R/W R/W R R/W R/W
  25724.  
  25725. SCSMR2 is a 16-bit register used to set the SCIF’s serial transfer format and select the baud rate
  25726. generator clock source.
  25727.  
  25728. SCSMR2 can be read or written to by the CPU at all times.
  25729.  
  25730. SCSMR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  25731. standby mode or in the module standby state.
  25732.  
  25733. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  25734.  
  25735. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the asynchronous mode data length.
  25736.  
  25737. Bit 6: CHR Description
  25738.  
  25739. 0 8-bit data (Initial value)
  25740.  
  25741. 1 7-bit data*
  25742.  
  25743. Note: * When 7-bit data is selected, the MSB (bit 7) of SCFTDR2 is not transmitted.
  25744.  
  25745. Bit 5—Parity Enable (PE): Selects whether or not parity bit addition is performed in
  25746. transmission, and parity bit checking in reception.
  25747.  
  25748. Bit 5: PE Description
  25749.  
  25750. 0 Parity bit addition and checking disabled (Initial value)
  25751.  
  25752. 1 Parity bit addition and checking enabled*
  25753.  
  25754. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/( bit is added to
  25755. transmit data before transmission. In reception, the parity bit is checked for the parity
  25756. (even or odd) specified by the O/( bit.
  25757.  
  25758. Rev. 2.0, 02/99, page 548 of 830
  25759.  
  25760. ----------------------- Page 563-----------------------
  25761.  
  25762. Bit 4—Parity Mode (O/(): Selects either even or odd parity for use in parity addition and
  25763. (
  25764. checking. The O/( bit setting is only valid when the PE bit is set to 1, enabling parity bit
  25765. addition and checking. The O/( bit setting is invalid when parity addition and checking is
  25766. disabled.
  25767.  
  25768. Bit 4: O/( Description
  25769. (
  25770. 0 Even parity*1 (Initial value)
  25771.  
  25772. 2
  25773. 1 Odd parity*
  25774.  
  25775. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the
  25776. total number of 1-bits in the transmit character plus the parity bit is even. In reception,
  25777. a check is performed to see if the total number of 1-bits in the receive character plus
  25778. the parity bit is even.
  25779. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  25780. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  25781. check is performed to see if the total number of 1-bits in the receive character plus the
  25782. parity bit is odd.
  25783.  
  25784. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length.
  25785.  
  25786. Bit 3: STOP Description
  25787. 0 1 stop bit*1 (Initial value)
  25788.  
  25789. 2
  25790. 1 2 stop bits*
  25791.  
  25792. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  25793. before it is sent.
  25794. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  25795. before it is sent.
  25796.  
  25797. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  25798. stop bit is 1, it is treated as a stop bit; if it is 0, it is treated as the start bit of the next transmit
  25799. character.
  25800.  
  25801. Bit 2—Reserved: This bit is always read as 0, and should only be written with 0.
  25802.  
  25803. Rev. 2.0, 02/99, page 549 of 830
  25804.  
  25805. ----------------------- Page 564-----------------------
  25806.  
  25807. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source for the
  25808. on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and Pφ/64,
  25809. according to the setting of bits CKS1 and CKS0.
  25810.  
  25811. For the relation between the clock source, the bit rate register setting, and the baud rate, see
  25812. section 16.2.8, Bit Rate Register (SCBRR2).
  25813.  
  25814. Bit 1: CKS1 Bit 0: CKS0 Description
  25815.  
  25816. 0 0 Pφ clock (Initial value)
  25817.  
  25818. 1 Pφ/4 clock
  25819.  
  25820. 1 0 Pφ/16 clock
  25821.  
  25822. 1 Pφ/64 clock
  25823.  
  25824. Note: Pφ: Peripheral clock
  25825.  
  25826. 16.2.6 Serial Control Register (SCSCR2)
  25827.  
  25828. Bit: 15 14 13 12 11 10 9 8
  25829.  
  25830. — — — — — — — —
  25831.  
  25832. Initial value: 0 0 0 0 0 0 0 0
  25833.  
  25834. R/W: R R R R R R R R
  25835.  
  25836. Bit: 7 6 5 4 3 2 1 0
  25837.  
  25838. TIE RIE TE RE REIE — CKE1 —
  25839.  
  25840. Initial value: 0 0 0 0 0 0 0 0
  25841.  
  25842. R/W: R/W R/W R/W R/W R/W R R/W R
  25843.  
  25844. The SCSCR2 register performs enabling or disabling of SCIF transfer operations, and interrupt
  25845. requests, and selection of the serial clock source.
  25846.  
  25847. SCSCR2 can be read or written to by the CPU at all times.
  25848.  
  25849. SCSCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  25850. standby mode or in the module standby state.
  25851.  
  25852. Bits 15 to 8, 2, and 0—Reserved: These bits are always read as 0, and should only be written
  25853. with 0.
  25854.  
  25855. Rev. 2.0, 02/99, page 550 of 830
  25856.  
  25857. ----------------------- Page 565-----------------------
  25858.  
  25859. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-FIFO-data-empty
  25860. interrupt (TXI) request generation when serial transmit data is transferred from SCFTDR2 to
  25861. SCTSR2, the number of data bytes in the transmit FIFO register falls to or below the transmit
  25862. trigger set number, and the TDFE flag in the serial status register (SCFSR2) is set to 1.
  25863.  
  25864. Bit 7: TIE Description
  25865.  
  25866. 0 Transmit-FIFO-data-empty interrupt (TXI) request disabled* (Initial value)
  25867.  
  25868. 1 Transmit-FIFO-data-empty interrupt (TXI) request enabled
  25869.  
  25870. Note: * TXI interrupt requests can be cleared by writing transmit data exceeding the transmit
  25871. trigger set number to SCFTDR2, reading 1 from the TDFE flag, then clearing it to 0, or by
  25872. clearing the TIE bit to 0.
  25873.  
  25874. Bit 6—Receive Interrupt Enable (RIE): Enables or disables generation of a receive-data-full
  25875. interrupt (RXI) request when the RDF flag or DR flag in SCFSR2 is set to 1, a receive-error
  25876. interrupt (ERI) request when the ER flag in SCFSR2 is set to 1, and a break interrupt (BRI)
  25877. request when the BRK flag in SCFSR2 or the ORER flag in SCLSR2 is set to 1.
  25878.  
  25879. Bit 6: RIE Description
  25880.  
  25881. 0 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  25882. request, and break interrupt (BRI) request disabled* (Initial value)
  25883.  
  25884. 1 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  25885. request, and break interrupt (BRI) request enabled
  25886.  
  25887. Note: * An RXI interrupt request can be cleared by reading 1 from the RDF or DR flag, then
  25888. clearing the flag to 0, or by clearing the RIE bit to 0. ERI and BRI interrupt requests can be
  25889. cleared by reading 1 from the ER, BRK, or ORER flag, then clearing the flag to 0, or by
  25890. clearing the RIE and REIE bits to 0.
  25891.  
  25892. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the SCIF.
  25893.  
  25894. Bit 5: TE Description
  25895.  
  25896. 0 Transmission disabled (Initial value)
  25897.  
  25898. 1 Transmission enabled*
  25899.  
  25900. Note: * Serial transmission is started when transmit data is written to SCFTDR2 in this state.
  25901. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be
  25902. made, the transmission format decided, and the transmit FIFO reset, before the TE bit is
  25903. set to 1.
  25904.  
  25905. Rev. 2.0, 02/99, page 551 of 830
  25906.  
  25907. ----------------------- Page 566-----------------------
  25908.  
  25909. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCIF.
  25910.  
  25911. Bit 4: RE Description
  25912. 0 Reception disabled*1 (Initial value)
  25913.  
  25914. 2
  25915. 1 Reception enabled*
  25916.  
  25917. Notes: 1. Clearing the RE bit to 0 does not affect the DR, ER, BRK, RDF, FER, PER, and ORER
  25918. flags, which retain their states.
  25919. 2. Serial transmission is started when a start bit is detected in this state.
  25920. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be
  25921. made, the reception format decided, and the receive FIFO reset, before the RE bit is
  25922. set to 1.
  25923.  
  25924. Bit 3—Receive Error Interrupt Enable (REIE): Enables or disables generation of receive-
  25925. error interrupt (ERI) and break interrupt (BRI) requests. The REIE bit setting is valid only when
  25926. the RIE bit is 0.
  25927.  
  25928. Bit 3: REIE Description
  25929.  
  25930. 0 Receive-error interrupt (ERI) and break interrupt (BRI) requests disabled*
  25931. (Initial value)
  25932.  
  25933. 1 Receive-error interrupt (ERI) and break interrupt (BRI) requests enabled
  25934.  
  25935. Note: * Receive-error interrupt (ERI) and break interrupt (BRI) requests can be cleared by reading
  25936. 1 from the ER, BRK, or ORER flag, then clearing the flag to 0, or by clearing the RIE and
  25937. REIE bits to 0. When REIE is set to 1, ERI and BRI interrupt requests will be generated
  25938. even if RIE is cleared to 0. In DMAC transfer, this setting is made if the interrupt controller
  25939. is to be notified of ERI and BRI interrupt requests.
  25940.  
  25941. Bit 1—Clock Enable 1 (CKE1): Selects the SCIF clock source. The CKE1 bit must be set
  25942. before determining the SCIF’s operating mode with SCSMR2.
  25943.  
  25944. Bit 1: CKE1 Description
  25945. 0 Internal clock/SCK2 pin functions as input pin (input signal ignored)*1
  25946.  
  25947. 2
  25948. 1 External clock/SCK2 pin functions as clock input*
  25949.  
  25950. Notes: 1. Initial value
  25951. 2. Inputs a clock with a frequency 16 times the bit rate.
  25952.  
  25953. Rev. 2.0, 02/99, page 552 of 830
  25954.  
  25955. ----------------------- Page 567-----------------------
  25956.  
  25957. 16.2.7 Serial Status Register (SCFSR2)
  25958.  
  25959. Bit: 15 14 13 12 11 10 9 8
  25960.  
  25961. PER3 PER2 PER1 PER0 FER3 FER2 FER1 FER0
  25962.  
  25963. Initial value: 0 0 0 0 0 0 0 0
  25964.  
  25965. R/W: R R R R R R R R
  25966.  
  25967. Bit: 7 6 5 4 3 2 1 0
  25968.  
  25969. ER TEND TDFE BRK FER PER RDF DR
  25970.  
  25971. Initial value: 0 1 1 0 0 0 0 0
  25972.  
  25973. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R R R/(W)* R/(W)*
  25974.  
  25975. Note: * Only 0 can be written, to clear the flag.
  25976.  
  25977. SCFSR2 is a 16-bit register. The lower 8 bits consist of status flags that indicate the operating
  25978. status of the SCIF, and the upper 8 bits indicate the number of receive errors in the data in the
  25979. receive FIFO register.
  25980.  
  25981. SCFSR2 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  25982. ER, TEND, TDFE, BRK, RDF, and DR. Also note that in order to clear these flags they must be
  25983. read as 1 beforehand. The FER flag and PER flag are read-only flags and cannot be modified.
  25984.  
  25985. SCFSR2 is initialized to H'0060 by a power-on reset or manual reset. It is not initialized in
  25986. standby mode or in the module standby state.
  25987.  
  25988. Bits 15 to 12—Number of Parity Errors (PER3–PER0): These bits indicate the number of
  25989. data bytes in which a parity error occurred in the receive data stored in SCFRDR2.
  25990.  
  25991. After the ER bit in SCFSR2 is set, the value indicated by bits 15 to 12 is the number of data
  25992. bytes in which a parity error occurred.
  25993.  
  25994. If all 16 bytes of receive data in SCFRDR2 have parity errors, the value indicated by bits PER3
  25995. to PER0 will be 0.
  25996.  
  25997. Bits 11 to 8—Number of Framing Errors (FER3–FER0): These bits indicate the number of
  25998. data bytes in which a framing error occurred in the receive data stored in SCFRDR2.
  25999.  
  26000. After the ER bit in SCFSR2 is set, the value indicated by bits 11 to 8 is the number of data bytes
  26001. in which a framing error occurred.
  26002.  
  26003. If all 16 bytes of receive data in SCFRDR2 have framing errors, the value indicated by bits
  26004. FER3 to FER0 will be 0.
  26005.  
  26006. Rev. 2.0, 02/99, page 553 of 830
  26007.  
  26008. ----------------------- Page 568-----------------------
  26009.  
  26010. Bit 7—Receive Error (ER): Indicates that a framing error or parity error occurred during
  26011. reception.*1
  26012.  
  26013. Bit 7: ER Description
  26014.  
  26015. 0 No framing error or parity error occurred during reception (Initial value)
  26016.  
  26017. [Clearing conditions]
  26018.  
  26019. • Power-on reset or manual reset
  26020.  
  26021. • When 0 is written to ER after reading ER = 1
  26022.  
  26023. 1 A framing error or parity error occurred during reception
  26024.  
  26025. [Setting conditions]
  26026.  
  26027. • When the SCIF checks whether the stop bit at the end of the receive
  26028. data is 1 when reception ends, and the stop bit is 0*2
  26029.  
  26030. • When, in reception, the number of 1-bits in the receive data plus the
  26031. parity bit does not match the parity setting (even or odd) specified by
  26032. the O/( bit in SCSMR2
  26033.  
  26034. Notes: 1. The ER flag is not affected and retains its previous state when the RE bit in SCSCR2
  26035. is cleared to 0. When a receive error occurs, the receive data is still transferred to
  26036. SCFRDR2, and reception continues.
  26037. The FER and PER bits in SCFSR2 can be used to determine whether there is a
  26038. receive error in the data read from SCFRDR2.
  26039. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop
  26040. bit is not checked.
  26041.  
  26042. Rev. 2.0, 02/99, page 554 of 830
  26043.  
  26044. ----------------------- Page 569-----------------------
  26045.  
  26046. Bit 6—Transmit End (TEND): Indicates that there is no valid data in SCFTDR2 when the last
  26047. bit of the transmit character is sent, and transmission has been ended.
  26048.  
  26049. Bit 6: TEND Description
  26050.  
  26051. 0 Transmission is in progress
  26052.  
  26053. [Clearing conditions]
  26054.  
  26055. • When transmit data is written to SCFTDR2, and 0 is written to TEND
  26056. after reading TEND = 1
  26057.  
  26058. • When data is written to SCFTDR2 by the DMAC
  26059.  
  26060. 1 Transmission has been ended (Initial value)
  26061.  
  26062. [Setting conditions]
  26063.  
  26064. • Power-on reset or manual reset
  26065.  
  26066. • When the TE bit in SCSCR2 is 0
  26067.  
  26068. • When there is no transmit data in SCFTDR2 on transmission of the last
  26069. bit of a 1-byte serial transmit character
  26070.  
  26071. Rev. 2.0, 02/99, page 555 of 830
  26072.  
  26073. ----------------------- Page 570-----------------------
  26074.  
  26075. Bit 5—Transmit FIFO Data Empty (TDFE): Indicates that data has been transferred from
  26076. SCFTDR2 to SCTSR2, the number of data bytes in SCFTDR2 has fallen to or below the
  26077. transmit trigger data number set by bits TTRG1 and TTRG0 in the FIFO control register
  26078. (SCFCR2), and new transmit data can be written to SCFTDR2.
  26079.  
  26080. Bit 5: TDFE Description
  26081.  
  26082. 0 A number of transmit data bytes exceeding the transmit trigger set number
  26083. have been written to SCFTDR2
  26084.  
  26085. [Clearing conditions]
  26086.  
  26087. • When transmit data exceeding the transmit trigger set number is written
  26088. to SCFTDR2, and 0 is written to TDFE after reading TDFE = 1
  26089.  
  26090. • When transmit data exceeding the transmit trigger set number is written
  26091. to SCFTDR2 by the DMAC
  26092.  
  26093. 1 The number of transmit data bytes in SCFTDR2 does not exceed the
  26094. transmit trigger set number (Initial value)
  26095.  
  26096. [Setting conditions]
  26097.  
  26098. • Power-on reset or manual reset
  26099.  
  26100. • When the number of SCFTDR2 transmit data bytes falls to or below the
  26101. transmit trigger set number as the result of a transmit operation*
  26102.  
  26103. Note: * As SCFTDR2 is a 16-byte FIFO register, the maximum number of bytes that can be
  26104. written when TDFE = 1 is 16 - (transmit trigger set number). Data written in excess of this
  26105. will be ignored.
  26106. The number of data bytes in SCFTDR2 is indicated by the upper bits of SCFDR2.
  26107.  
  26108. Bit 4—Break Detect (BRK): Indicates that a receive data break signal has been detected.
  26109.  
  26110. Bit 4: BRK Description
  26111.  
  26112. 0 A break signal has not been received (Initial value)
  26113.  
  26114. [Clearing conditions]
  26115.  
  26116. • Power-on reset or manual reset
  26117.  
  26118. • When 0 is written to BRK after reading BRK = 1
  26119.  
  26120. 1 A break signal has been received*
  26121.  
  26122. [Setting condition]
  26123.  
  26124. When data with a framing error is received, followed by the space “0” level
  26125. (low level ) for at least one frame length
  26126.  
  26127. Note: * When a break is detected, the receive data (H'00) following detection is not transferred to
  26128. SCFRDR2. When the break ends and the receive signal returns to mark “1”, receive data
  26129. transfer is resumed.
  26130.  
  26131. Rev. 2.0, 02/99, page 556 of 830
  26132.  
  26133. ----------------------- Page 571-----------------------
  26134.  
  26135. Bit 3—Framing Error (FER): Indicates a framing error in the data read from SCFRDR2.
  26136.  
  26137. Bit 3: FER Description
  26138.  
  26139. 0 There is no framing error in the receive data read from SCFRDR2
  26140. (Initial value)
  26141.  
  26142. [Clearing conditions]
  26143.  
  26144. • Power-on reset or manual reset
  26145.  
  26146. • When there is no framing error in SCFRDR2 read data
  26147.  
  26148. 1 There is a framing error in the receive data read from SCFRDR2
  26149.  
  26150. [Setting condition]
  26151.  
  26152. When there is a framing error in SCFRDR2 read data
  26153.  
  26154. Bit 2—Parity Error (PER): Indicates a parity error in the data read from SCFRDR2.
  26155.  
  26156. Bit 2: PER Description
  26157.  
  26158. 0 There is no parity error in the receive data read from SCFRDR2
  26159. (Initial value)
  26160.  
  26161. [Clearing conditions]
  26162.  
  26163. • Power-on reset or manual reset
  26164.  
  26165. • When there is no parity error in SCFRDR2 read data
  26166.  
  26167. 1 There is a parity error in the receive data read from SCFRDR2
  26168.  
  26169. [Setting condition]
  26170.  
  26171. When there is a parity error in SCFRDR2 read data
  26172.  
  26173. Rev. 2.0, 02/99, page 557 of 830
  26174.  
  26175. ----------------------- Page 572-----------------------
  26176.  
  26177. Bit 1—Receive FIFO Data Full (RDF): Indicates that the received data has been transferred
  26178. from SCRSR2 to SCFRDR2, and the number of receive data bytes in SCFRDR2 is equal to or
  26179. greater than the receive trigger number set by bits RTRG1 and RTRG0 in the FIFO control
  26180. register (SCFCR2).
  26181.  
  26182. Bit 1: RDF Description
  26183.  
  26184. 0 The number of receive data bytes in SCFRDR2 is less than the receive
  26185. trigger set number (Initial value)
  26186.  
  26187. [Clearing conditions]
  26188.  
  26189. • Power-on reset or manual reset
  26190.  
  26191. • When SCFRDR2 is read until the number of receive data bytes in
  26192. SCFRDR2 falls below the receive trigger set number, and 0 is written to
  26193. RDF after reading RDF = 1
  26194.  
  26195. • When SCFRDR2 is read by the DMAC until the number of receive data
  26196. bytes in SCFRDR2 falls below the receive trigger set number
  26197.  
  26198. 1 The number of receive data bytes in SCFRDR2 is equal to or greater than
  26199. the receive trigger set number
  26200.  
  26201. [Setting condition]
  26202.  
  26203. When SCFRDR2 contains at least the receive trigger set number of receive
  26204. data bytes*
  26205.  
  26206. Note: * SCFRDR2 is a 16-byte FIFO register. When RDF = 1, at least the receive trigger set
  26207. number of data bytes can be read. If all the data in SCFRDR2 is read and another read is
  26208. performed, the data value will be undefined. The number of receive data bytes in
  26209. SCFRDR2 is indicated by the lower bits of SCFDR2.
  26210.  
  26211. Rev. 2.0, 02/99, page 558 of 830
  26212.  
  26213. ----------------------- Page 573-----------------------
  26214.  
  26215. Bit 0—Receive Data Ready (DR): Indicates that there are fewer than the receive trigger set
  26216. number of data bytes in SCFRDR2, and no further data has arrived for at least 15 etu after the
  26217. stop bit of the last data received.
  26218.  
  26219. Bit 0: DR Description
  26220.  
  26221. 0 Reception is in progress or has ended normally and there is no receive
  26222. data left in SCFRDR2 (Initial value)
  26223.  
  26224. [Clearing conditions]
  26225.  
  26226. • Power-on reset or manual reset
  26227.  
  26228. • When all the receive data in SCFRDR2 has been read, and 0 is written
  26229. to DR after reading DR = 1
  26230.  
  26231. • When all the receive data in SCFRDR2 has been read by the DMAC
  26232.  
  26233. 1 No further receive data has arrived
  26234.  
  26235. [Setting condition]
  26236.  
  26237. When SCFRDR2 contains fewer than the receive trigger set number of
  26238. receive data bytes, and no further data has arrived for at least 15 etu after
  26239. the stop bit of the last data received*
  26240.  
  26241. Note: * Equivalent to 1.5 frames with an 8-bit, 1-stop-bit format.
  26242. etu: Elementary time unit (time for transfer of 1 bit)
  26243.  
  26244. Rev. 2.0, 02/99, page 559 of 830
  26245.  
  26246. ----------------------- Page 574-----------------------
  26247.  
  26248. 16.2.8 Bit Rate Register (SCBRR2)
  26249.  
  26250. Bit: 7 6 5 4 3 2 1 0
  26251.  
  26252. Initial value: 1 1 1 1 1 1 1 1
  26253.  
  26254. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  26255.  
  26256. SCBRR2 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  26257. generator operating clock selected by bits CKS1 and CKS0 in SCSMR2.
  26258.  
  26259. SCBRR2 can be read or written to by the CPU at all times.
  26260.  
  26261. SCBRR2 is initialized to H'FF by a power-on reset or manual reset. It is not initialized in
  26262. standby mode or in the module standby state.
  26263.  
  26264. The SCBRR2 setting is found from the following equation.
  26265.  
  26266. Asynchronous mode:
  26267.  
  26268.  
  26269. P
  26270. φ 6
  26271. N = × 10 – 1
  26272. 64 × 22n–1 × B
  26273.  
  26274. Where B: Bit rate (bits/s)
  26275. N: SCBRR2 setting for baud rate generator (0 ≤ N ≤ 255)
  26276. Pφ: Peripheral module operating frequency (MHz)
  26277. n: Baud rate generator input clock (n = 0 to 3)
  26278. (See the table below for the relation between n and the clock.)
  26279.  
  26280. SCSMR2 Setting
  26281.  
  26282. n Clock CKS1 CKS0
  26283.  
  26284. 0 Pφ 0 0
  26285.  
  26286. 1 Pφ/4 0 1
  26287.  
  26288. 2 Pφ/16 1 0
  26289.  
  26290. 3 Pφ/64 1 1
  26291.  
  26292. The bit rate error in asynchronous mode is found from the following equation:
  26293.  
  26294. P × 106
  26295. φ
  26296. Error (%) = 2n–1 – 1 × 100
  26297. (N + 1) × B × 64 × 2
  26298.  
  26299. Rev. 2.0, 02/99, page 560 of 830
  26300.  
  26301. ----------------------- Page 575-----------------------
  26302.  
  26303. 16.2.9 FIFO Control Register (SCFCR2)
  26304.  
  26305. Bit: 15 14 13 12 11 10 9 8
  26306.  
  26307. — — — — — — — —
  26308.  
  26309. Initial value: 0 0 0 0 0 0 0 0
  26310.  
  26311. R/W: R R R R R R R R
  26312.  
  26313. Bit: 7 6 5 4 3 2 1 0
  26314.  
  26315. RTRG1 RTRG0 TTRG1 TTRG0 MCE TFRST RFRST LOOP
  26316.  
  26317. Initial value: 0 0 0 0 0 0 0 0
  26318.  
  26319. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  26320.  
  26321. SCFCR2 performs data count resetting and trigger data number setting for the transmit and
  26322. receive FIFO registers, and also contains a loopback test enable bit.
  26323.  
  26324. SCFCR2 can be read or written to by the CPU at all times.
  26325.  
  26326. SCFCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  26327. standby mode or in the module standby state.
  26328.  
  26329. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  26330.  
  26331. Bits 7 and 6—Receive FIFO Data Number Trigger (RTRG1, RTRG0): These bits are used to
  26332. set the number of receive data bytes that sets the receive data full (RDF) flag in the serial status
  26333. register (SCFSR2).
  26334.  
  26335. The RDF flag is set when the number of receive data bytes in SCFRDR2 is equal to or greater
  26336. than the trigger set number shown in the following table.
  26337.  
  26338. Bit 7: RTRG1 Bit 6: RTRG0 Receive Trigger Number
  26339.  
  26340. 0 0 1*
  26341.  
  26342. 1 4
  26343.  
  26344. 1 0 8
  26345.  
  26346. 1 14
  26347.  
  26348. Note: * Initial value
  26349.  
  26350. Rev. 2.0, 02/99, page 561 of 830
  26351.  
  26352. ----------------------- Page 576-----------------------
  26353.  
  26354. Bits 5 and 4—Transmit FIFO Data Number Trigger (TTRG1, TTRG0): These bits are used
  26355. to set the number of remaining transmit data bytes that sets the transmit FIFO data register
  26356. empty (TDFE) flag in the serial status register (SCFSR2). The TDFE flag is set when the number
  26357. of transmit data bytes in SCFTDR2 is equal to or less than the trigger set number shown in the
  26358. following table.
  26359.  
  26360. Bit 5: TTRG1 Bit 4: TTRG0 Transmit Trigger Number
  26361.  
  26362. 0 0 8 (8) *
  26363.  
  26364. 1 4 (12)
  26365.  
  26366. 1 0 2 (14)
  26367.  
  26368. 1 1 (15)
  26369.  
  26370. Note: * Initial value. Figures in parentheses are the number of empty bytes in SCFTDR2 when the
  26371. flag is set.
  26372.  
  26373. Bit 3—Modem Control Enable (MCE): Enables the &76 and 576 modem control signals.
  26374.  
  26375. Bit 3: MCE Description
  26376.  
  26377. 0 Modem signals disabled* (Initial value)
  26378.  
  26379. 1 Modem signals enabled
  26380.  
  26381. Note: * &76 is fixed at active-0 regardless of the input value, and 576 output is also fixed at 0.
  26382.  
  26383. Bit 2—Transmit FIFO Data Register Reset (TFRST): Invalidates the transmit data in the
  26384. transmit FIFO data register and resets it to the empty state.
  26385.  
  26386. Bit 2: TFRST Description
  26387.  
  26388. 0 Reset operation disabled* (Initial value)
  26389.  
  26390. 1 Reset operation enabled
  26391.  
  26392. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  26393.  
  26394. Bit 1—Receive FIFO Data Register Reset (RFRST): Invalidates the receive data in the
  26395. receive FIFO data register and resets it to the empty state.
  26396.  
  26397. Bit 1: RFRST Description
  26398.  
  26399. 0 Reset operation disabled* (Initial value)
  26400.  
  26401. 1 Reset operation enabled
  26402.  
  26403. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  26404.  
  26405. Rev. 2.0, 02/99, page 562 of 830
  26406.  
  26407. ----------------------- Page 577-----------------------
  26408.  
  26409. Bit 0—Loopback Test (LOOP): Internally connects the transmit output pin (TxD2) and receive
  26410. input pin (RxD2), and the 576 pin and &76 pin, enabling loopback testing.
  26411.  
  26412. Bit 0: LOOP Description
  26413.  
  26414. 0 Loopback test disabled (Initial value)
  26415.  
  26416. 1 Loopback test enabled
  26417.  
  26418. 16.2.10 FIFO Data Count Register (SCFDR2)
  26419.  
  26420. SCFDR2 is a 16-bit register that indicates the number of data bytes stored in SCFTDR2 and
  26421. SCFRDR2.
  26422.  
  26423. The upper 8 bits show the number of transmit data bytes in SCFTDR2, and the lower 8 bits show
  26424. the number of receive data bytes in SCFRDR2.
  26425.  
  26426. SCFDR2 can be read by the CPU at all times.
  26427.  
  26428. Bit: 15 14 13 12 11 10 9 8
  26429.  
  26430. — — — T4 T3 T2 T1 T0
  26431.  
  26432. Initial value: 0 0 0 0 0 0 0 0
  26433.  
  26434. R/W: R R R R R R R R
  26435.  
  26436. These bits show the number of untransmitted data bytes in SCFTDR2. A value of H'00 indicates
  26437. that there is no transmit data, and a value of H'10 indicates that SCFTDR2 is full of transmit
  26438. data.
  26439.  
  26440. Bit: 7 6 5 4 3 2 1 0
  26441.  
  26442. — — — R4 R3 R2 R1 R0
  26443.  
  26444. Initial value: 0 0 0 0 0 0 0 0
  26445.  
  26446. R/W: R R R R R R R R
  26447.  
  26448. These bits show the number of receive data bytes in SCFRDR2. A value of H'00 indicates that
  26449. there is no receive data, and a value of H'10 indicates that SCFRDR2 is full of receive data.
  26450.  
  26451. Rev. 2.0, 02/99, page 563 of 830
  26452.  
  26453. ----------------------- Page 578-----------------------
  26454.  
  26455. 16.2.11 Serial Port Register (SCSPTR2)
  26456.  
  26457. Bit: 15 14 13 12 11 10 9 8
  26458.  
  26459. — — — — — — — —
  26460.  
  26461. Initial value: 0 0 0 0 0 0 0 0
  26462.  
  26463. R/W: R R R R R R R R
  26464.  
  26465. Bit: 7 6 5 4 3 2 1 0
  26466.  
  26467. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  26468.  
  26469. Initial value: 0 — 0 — 0 0 0 —
  26470.  
  26471. R/W: R/W R/W R/W R/W R R R/W R/W
  26472.  
  26473. SCSPTR2 is a 16-bit readable/writable register that controls input/output and data for the port
  26474. pins multiplexed with the serial communication interface (SCIF) pins. Input data can be read
  26475. from the RxD2 pin, output data written to the TxD2 pin, and breaks in serial
  26476. transmission/reception controlled, by means of bits 1 and 0. Data can be read from, and output
  26477. data written to, the &76 pin by means of bits 5 and 4. Data can be read from, and output data
  26478. written to, the 576 pin by means of bits 6 and 7.
  26479.  
  26480. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6, 4,
  26481. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0 is
  26482. undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  26483.  
  26484. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  26485.  
  26486. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies the serial port 576 pin input/output
  26487. condition. When the 576 pin is actually set as a port output pin and outputs the value set by the
  26488. RTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  26489.  
  26490. Bit 7: RTSIO Description
  26491.  
  26492. 0 RTSDT bit value is not output to 576 pin (Initial value)
  26493.  
  26494. 1 RTSDT bit value is output to 576 pin
  26495.  
  26496. Rev. 2.0, 02/99, page 564 of 830
  26497.  
  26498. ----------------------- Page 579-----------------------
  26499.  
  26500. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port 576 pin input/output
  26501. data. Input or output is specified by the RTSIO bit (see the description of bit 7, RTSIO, for
  26502. details). In output mode, the RTSDT bit value is output to the 576 pin. The 576 pin value is
  26503. read from the RTSDT bit regardless of the value of the RTSIO bit. The initial value of this bit
  26504. after a power-on reset or manual reset is undefined.
  26505.  
  26506. Bit 6: RTSDT Description
  26507.  
  26508. 0 Input/output data is low-level
  26509.  
  26510. 1 Input/output data is high-level
  26511.  
  26512. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies the serial port &76 pin input/output
  26513. condition. When the &76 pin is actually set as a port output pin and outputs the value set by the
  26514. CTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  26515.  
  26516. Bit 5: CTSIO Description
  26517.  
  26518. 0 CTSDT bit value is not output to &76 pin (Initial value)
  26519.  
  26520. 1 CTSDT bit value is output to &76 pin
  26521.  
  26522. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port &76 pin input/output
  26523. data. Input or output is specified by the CTSIO bit (see the description of bit 5, CTSIO, for
  26524. details). In output mode, the CTSDT bit value is output to the &76 pin. The &76 pin value is
  26525. read from the CTSDT bit regardless of the value of the CTSIO bit. The initial value of this bit
  26526. after a power-on reset or manual reset is undefined.
  26527.  
  26528. Bit 4: CTSDT Description
  26529.  
  26530. 0 Input/output data is low-level
  26531.  
  26532. 1 Input/output data is high-level
  26533.  
  26534. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  26535.  
  26536. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output condition.
  26537. When the TxD2 pin is actually set as a port output pin and outputs the value set by the SPB2DT
  26538. bit, the TE bit in SCSCR2 should be cleared to 0.
  26539.  
  26540. Bit 1: SPB2IO Description
  26541.  
  26542. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  26543.  
  26544. 1 SPB2DT bit value is output to the TxD2 pin
  26545.  
  26546. Rev. 2.0, 02/99, page 565 of 830
  26547.  
  26548. ----------------------- Page 580-----------------------
  26549.  
  26550. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data and
  26551. TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  26552. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the
  26553. value of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the
  26554. SPB2DT bit regardless of the value of the SPB2IO bit. The initial value of this bit after a power-
  26555. on reset or manual reset is undefined.
  26556.  
  26557. Bit 0: SPB2DT Description
  26558.  
  26559. 0 Input/output data is low-level
  26560.  
  26561. 1 Input/output data is high-level
  26562.  
  26563. SCIF I/O port block diagrams are shown in figures 16.2 to 16.5.
  26564.  
  26565. Reset
  26566.  
  26567. R D7
  26568. Q D
  26569. RTSIO
  26570. C Internal data bus
  26571.  
  26572. SPTRW
  26573.  
  26574. Reset
  26575. MD8/RTS2
  26576. R D6
  26577. Q D
  26578. RTSDT
  26579. C SCIF
  26580.  
  26581. Modem control
  26582. SPTRW
  26583. enable signal*
  26584.  
  26585. Mode setting RTS2 signal
  26586. register
  26587.  
  26588. SPTRR
  26589.  
  26590. SPTRW: Write to SPTR
  26591. SPTRR: Read SPTR
  26592.  
  26593. Note: * The RTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  26594.  
  26595. Figure 16.2 MD8/576 Pin
  26596. 576
  26597.  
  26598. Rev. 2.0, 02/99, page 566 of 830
  26599.  
  26600. ----------------------- Page 581-----------------------
  26601.  
  26602. Reset
  26603. R D5
  26604.  
  26605. Q D
  26606. CTSIO
  26607. C Internal data bus
  26608.  
  26609. SPTRW
  26610.  
  26611. Reset
  26612. CTS2
  26613. R
  26614. D4
  26615. Q D
  26616. CTSDT
  26617. C SCIF
  26618.  
  26619. SPTRW
  26620.  
  26621. CTS2 signal
  26622.  
  26623. Modem control enable signal*
  26624.  
  26625. SPTRR
  26626.  
  26627. SPTRW: Write to SPTR
  26628. SPTRR: Read SPTR
  26629.  
  26630. Note: * The CTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  26631.  
  26632.  
  26633. Figure 16.3 &76 Pin
  26634. &76
  26635.  
  26636. Rev. 2.0, 02/99, page 567 of 830
  26637.  
  26638. ----------------------- Page 582-----------------------
  26639.  
  26640. Reset
  26641.  
  26642. R
  26643. D1
  26644. Q D
  26645. SPB2IO
  26646. C Internal data bus
  26647.  
  26648. SPTRW
  26649.  
  26650. Reset
  26651. MD1/TxD2
  26652. R D0
  26653. Q D
  26654. SPB2DT
  26655. C SCIF
  26656.  
  26657. Transmit enable
  26658. SPTRW
  26659. signal
  26660.  
  26661. Mode setting
  26662. register Serial transmit data
  26663.  
  26664. SPTRW: Write to SPTR
  26665.  
  26666. Figure 16.4 MD1/TxD2 Pin
  26667.  
  26668. SCIF
  26669. MD2/RxD2
  26670.  
  26671. Serial receive
  26672. Mode setting data
  26673. register
  26674.  
  26675. D0
  26676.  
  26677. Internal data bus
  26678.  
  26679.  
  26680. SPTRR
  26681.  
  26682. SPTRR: Read SPTR
  26683.  
  26684. Figure 16.5 MD2/RxD2 Pin
  26685.  
  26686. Rev. 2.0, 02/99, page 568 of 830
  26687.  
  26688. ----------------------- Page 583-----------------------
  26689.  
  26690. 16.2.12 Line Status Register (SCLSR2)
  26691.  
  26692. Bit: 15 14 13 12 11 10 9 8
  26693.  
  26694. — — — — — — — —
  26695.  
  26696. Initial value: 0 0 0 0 0 0 0 0
  26697.  
  26698. R/W: R R R R R R R R
  26699.  
  26700. Bit: 7 6 5 4 3 2 1 0
  26701.  
  26702. — — — — — — — ORER
  26703.  
  26704. Initial value: 0 0 0 0 0 0 0 0
  26705.  
  26706. R/W: R R R R R R R (R/W)*
  26707.  
  26708. Note: * Only 0 can be written, to clear the flag.
  26709.  
  26710. Bits 15 to 1—Reserved: These bits are always read as 0, and should only be written with 0.
  26711.  
  26712. Bit 0—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  26713. causing abnormal termination.
  26714.  
  26715. Bit 0: ORER Description
  26716. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  26717.  
  26718. [Clearing conditions]
  26719.  
  26720. • Power-on reset or manual reset
  26721.  
  26722. • When 0 is written to ORER after reading ORER = 1
  26723.  
  26724. 2
  26725. 1 An overrun error occurred during reception*
  26726.  
  26727. [Setting condition]
  26728.  
  26729. When the next serial reception is completed while the receive FIFO is full
  26730.  
  26731. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in
  26732. SCSCR2 is cleared to 0.
  26733. 2. The receive data prior to the overrun error is retained in SCFRDR2, and the data
  26734. received subsequently is lost. Serial reception cannot be continued while the ORER
  26735. flag is set to 1.
  26736.  
  26737. Rev. 2.0, 02/99, page 569 of 830
  26738.  
  26739. ----------------------- Page 584-----------------------
  26740.  
  26741. 16.3 Operation
  26742.  
  26743. 16.3.1 Overview
  26744.  
  26745. The SCIF can carry out serial communication in asynchronous mode, in which synchronization
  26746. is achieved character by character. See section 15.3.2, Operation in Asynchronous Mode, for
  26747. details.
  26748.  
  26749. Sixteen-stage FIFO buffers are provided for both transmission and reception, reducing the CPU
  26750. overhead and enabling fast, continuous communication to be performed. 576 and &76 signals
  26751. are also provided as modem control signals.
  26752.  
  26753. Rev. 2.0, 02/99, page 570 of 830
  26754.  
  26755. ----------------------- Page 585-----------------------
  26756.  
  26757. The transmission format is selected using the serial mode register (SCSMR2), as shown in table
  26758. 16.3. The SCIF clock source is determined by the CKE1 bit in the serial control register
  26759. (SCSCR2), as shown in table 16.4.
  26760.  
  26761. • Data length: Choice of 7 or 8 bits
  26762. • Choice of parity addition and addition of 1 or 2 stop bits (the combination of these
  26763. parameters determines the transfer format and character length)
  26764. • Detection of framing errors, parity errors, receive-FIFO-data-full state, overrun errors,
  26765. receive-data-ready state, and breaks, during reception
  26766. • Indication of the number of data bytes stored in the transmit and receive FIFO registers
  26767. • Choice of internal or external clock as SCIF clock source
  26768. When internal clock is selected: The SCIF operates on the baud rate generator clock.
  26769. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  26770. input (the on-chip baud rate generator is not used).
  26771.  
  26772. Table 16.3 SCSMR2 Settings for Serial Transfer Format Selection
  26773.  
  26774. SCSMR2 Settings SCIF Transfer Format
  26775.  
  26776. Bit 6: Bit 5: Bit 3: Data Multiprocessor Parity Stop Bit
  26777. CHR PE STOP Mode Length Bit Bit Length
  26778.  
  26779. 0 0 0 Asynchronous mode 8-bit data No No 1 bit
  26780.  
  26781. 1 2 bits
  26782.  
  26783. 1 0 Yes 1 bit
  26784.  
  26785. 1 2 bits
  26786.  
  26787. 1 0 0 7-bit data No 1 bit
  26788.  
  26789. 1 2 bits
  26790.  
  26791. 1 0 Yes 1 bit
  26792.  
  26793. 1 2 bits
  26794.  
  26795. Table 16.4 SCSCR2 Settings for SCIF Clock Source Selection
  26796.  
  26797. SCSCR2 Setting SCIF Transmit/Receive Clock
  26798.  
  26799. Bit 1: CKE1 Mode Clock Source SCK2 Pin Function
  26800.  
  26801. 0 Asynchronous mode Internal SCIF does not use SCK2 pin
  26802.  
  26803. 1 External Inputs clock with frequency of 16
  26804. times the bit rate
  26805.  
  26806. Rev. 2.0, 02/99, page 571 of 830
  26807.  
  26808. ----------------------- Page 586-----------------------
  26809.  
  26810. 16.3.2 Serial Operation
  26811.  
  26812. Data Transfer Format
  26813.  
  26814. Table 16.5 shows the data transfer formats that can be used. Any of 8 transfer formats can be
  26815. selected according to the SCSMR2 settings.
  26816.  
  26817. Table 16.5 Serial Transfer Formats
  26818.  
  26819. SCSMR2
  26820. Settings Serial Transfer Format and Frame Length
  26821.  
  26822. CHR PE STOP 1 2 3 4 5 6 7 8 9 10 11 12
  26823.  
  26824. 0 0 0 S 8-bit data STOP
  26825.  
  26826. 0 0 1 S 8-bit data STOP STOP
  26827.  
  26828. 0 1 0 S 8-bit data P STOP
  26829.  
  26830. 0 1 1 S 8-bit data P STOP STOP
  26831.  
  26832. 1 0 0 S 7-bit data STOP
  26833.  
  26834. 1 0 1 S 7-bit data STOP STOP
  26835.  
  26836. 1 1 0 S 7-bit data P STOP
  26837.  
  26838. 1 1 1 S 7-bit data P STOP STOP
  26839.  
  26840. S: Start bit
  26841. STOP: Stop bit
  26842. P: Parity bit
  26843.  
  26844. Rev. 2.0, 02/99, page 572 of 830
  26845.  
  26846. ----------------------- Page 587-----------------------
  26847.  
  26848. Clock
  26849.  
  26850. Either an internal clock generated by the on-chip baud rate generator or an external clock input
  26851. at the SCK2 pin can be selected as the SCIF’s serial clock, according to the setting of the CKE1
  26852. bit in SCSCR2. For details of SCIF clock source selection, see table 16.4.
  26853.  
  26854. When an external clock is input at the SCK2 pin, the clock frequency should be 16 times the bit
  26855. rate used.
  26856.  
  26857. Data Transfer Operations
  26858.  
  26859. SCIF Initialization: Before transmitting and receiving data, it is necessary to clear the TE and
  26860. RE bits in SCSCR2 to 0, then initialize the SCIF as described below.
  26861.  
  26862. When the transfer format, etc., is changed, the TE and RE bits must be cleared to 0 before
  26863. making the change using the following procedure. When the TE bit is cleared to 0, SCTSR2 is
  26864. initialized. Note that clearing the TE and RE bits to 0 does not change the contents of SCFSR2,
  26865. SCFTDR2, or SCFRDR2. The TE bit should be cleared to 0 after all transmit data has been sent
  26866. and the TEND flag in SCFSR2 has been set. TEND can also be cleared to 0 during transmission,
  26867. but the data being transmitted will go to the mark state after the clearance. Before setting TE
  26868. again to start transmission, the TFRST bit in SCFCR2 should first be set to 1 to reset SCFTDR2.
  26869.  
  26870. When an external clock is used the clock should not be stopped during operation, including
  26871. initialization, since operation will be unreliable in this case.
  26872.  
  26873. Figure 16.6 shows a sample SCIF initialization flowchart.
  26874.  
  26875. Rev. 2.0, 02/99, page 573 of 830
  26876.  
  26877. ----------------------- Page 588-----------------------
  26878.  
  26879. Initialization 1. Set the clock selection in SCSCR2.
  26880.  
  26881. Be sure to clear bits RIE and TIE,
  26882. and bits TE and RE, to 0.
  26883. Clear TE and RE bits
  26884. 2. Set the data transfer format in
  26885. in SCSCR2 to 0
  26886. SCSMR2.
  26887.  
  26888. 3. Write a value corresponding to the
  26889. Set TFRST and RFRST bits
  26890. bit rate into SCBRR2. (Not
  26891. in SCFCR2 to 1
  26892. necessary if an external clock is
  26893. used.)
  26894. Set CKE1 bit in SCSCR2 4. Wait at least one bit interval, then
  26895. (leaving TE and RE bits set the TE bit or RE bit in SCSCR2
  26896. cleared to 0) to 1. Also set the RIE, REIE, and
  26897.  
  26898. TIE bits.
  26899.  
  26900. Set data transfer format Setting the TE and RE bits enables
  26901. in SCSMR2 the TxD2 and RxD2 pins to be
  26902. used. When transmitting, the SCIF
  26903. will go to the mark state; when
  26904. Set value in SCBRR2 receiving, it will go to the idle state,
  26905.  
  26906. Wait waiting for a start bit.
  26907.  
  26908. No
  26909. 1-bit interval elapsed?
  26910.  
  26911. Yes
  26912.  
  26913. Set RTRG1–0, TTRG1–0,
  26914. and MCE bits in SCFCR2
  26915. Clear TFRST and RFRST bits to 0
  26916.  
  26917. Set TE and RE bits
  26918. in SCSCR2 to 1,
  26919. and set RIE, TIE, and REIE bits
  26920.  
  26921. End
  26922.  
  26923. Figure 16.6 Sample SCIF Initialization Flowchart
  26924.  
  26925. Rev. 2.0, 02/99, page 574 of 830
  26926.  
  26927. ----------------------- Page 589-----------------------
  26928.  
  26929. Serial Data Transmission: Figure 16.7 shows a sample flowchart for serial transmission.
  26930.  
  26931. Use the following procedure for serial data transmission after enabling the SCIF for
  26932. transmission.
  26933.  
  26934.  
  26935. Start of transmission 1. SCIF status check and transmit data
  26936. write:
  26937.  
  26938. Read SCFSR2 and check that the
  26939. Read TDFE flag in SCFSR2 TDFE flag is set to 1, then write
  26940. transmit data to SCFTDR2, read 1
  26941. No from the TDFE and TEND flags, then
  26942. TDFE = 1? clear these flags to 0.
  26943.  
  26944. The number of transmit data bytes
  26945. Yes
  26946. that can be written is 16 - (transmit
  26947. Write transmit data (16 - transmit trigger set number).
  26948.  
  26949. trigger set number) to SCFTDR2, 2. Serial transmission continuation
  26950. read 1 from TDFE flag and TEND procedure:
  26951. flag in SCFSR2, then clear to 0
  26952. To continue serial transmission, read
  26953. 1 from the TDFE flag to confirm that
  26954. All data transmitted? No writing is possible, then write data to
  26955.  
  26956. SCFTDR2, and then clear the TDFE
  26957. Yes flag to 0.
  26958.  
  26959. 3. Break output at the end of serial
  26960. Read TEND flag in SCFSR2 transmission:
  26961.  
  26962. To output a break in serial
  26963. No transmission, clear the SPB2DT bit to
  26964. TEND = 1? 0 and set the SPB2IO bit to 1 in
  26965. SCSPTR2, then clear the TE bit in
  26966. Yes SCSCR2 to 0.
  26967.  
  26968. No In steps 1 and 2, it is possible to
  26969. Break output? ascertain the number of data bytes
  26970.  
  26971. that can be written from the number
  26972. Yes of transmit data bytes in SCFTDR2
  26973.  
  26974. Clear SPB2DT to 0 and indicated by the upper 8 bits of
  26975. SCFDR2.
  26976. set SPB2IO to 1
  26977.  
  26978. Clear TE bit in SCSCR2 to 0
  26979.  
  26980. End of transmission
  26981.  
  26982. Figure 16.7 Sample Serial Transmission Flowchart
  26983.  
  26984. Rev. 2.0, 02/99, page 575 of 830
  26985.  
  26986. ----------------------- Page 590-----------------------
  26987.  
  26988. In serial transmission, the SCIF operates as described below.
  26989.  
  26990. 1. When data is written into SCFTDR2, the SCIF transfers the data from SCFTDR2 to SCTSR2
  26991. and starts transmitting. Confirm that the TDFE flag in the serial status register (SCFSR2) is
  26992. set to 1 before writing transmit data to SCFTDR2. The number of data bytes that can be
  26993. written is at least (16 - transmit trigger setting).
  26994. 2. When data is transferred from SCFTDR2 to SCTSR2 and transmission is started, consecutive
  26995. transmit operations are performed until there is no transmit data left in SCFTDR2. When the
  26996. number of transmit data bytes in SCFTDR2 falls to or below the transmit trigger number set
  26997. in the FIFO control register (SCFCR2), the TDFE flag is set. If the TIE bit in SCSCR2 is set
  26998. to 1 at this time, a transmit-FIFO-data-empty interrupt (TXI) request is generated.
  26999. The serial transmit data is sent from the TxD2 pin in the following order.
  27000. a. Start bit: One 0-bit is output.
  27001. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  27002. c. Parity bit: One parity bit (even or odd parity) is output. (A format in which a parity bit is
  27003. not output can also be selected.)
  27004. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  27005. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  27006. sent.
  27007. 3. The SCIF checks the SCFTDR2 transmit data at the timing for sending the stop bit. If data is
  27008. present, the data is transferred from SCFTDR2 to SCTSR2, the stop bit is sent, and then
  27009. serial transmission of the next frame is started.
  27010. If there is no transmit data, the TEND flag in SCFSR2 is set to 1, the stop bit is sent, and
  27011. then the line goes to the mark state in which 1 is output.
  27012.  
  27013. Figure 16.8 shows an example of the operation for transmission in asynchronous mode.
  27014.  
  27015. Rev. 2.0, 02/99, page 576 of 830
  27016.  
  27017. ----------------------- Page 591-----------------------
  27018.  
  27019. Start Data Parity Stop Start Data Parity Stop
  27020. 1 bit bit bit bit bit bit 1
  27021.  
  27022. Serial Idle state
  27023. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  27024. data (mark state)
  27025.  
  27026. TDFE
  27027.  
  27028. TEND
  27029.  
  27030. TXI interrupt TXI interrupt
  27031. request request
  27032. Data written to SCFTDR2
  27033. and TDFE flag read as 1
  27034. then cleared to 0 by TXI
  27035. interrupt handler
  27036.  
  27037. One frame
  27038.  
  27039. Figure 16.8 Example of Transmit Operation
  27040. (Example with 8-Bit Data, Parity, One Stop Bit)
  27041.  
  27042. 4. When modem control is enabled, transmission can be stopped and restarted in accordance
  27043. with the &76 input value. When &76 is set to 1, if transmission is in progress, the line
  27044. goes to the mark state after transmission of one frame. When &76 is set to 0, the next
  27045. transmit data is output starting from the start bit.
  27046. Figure 16.9 shows an example of the operation when modem control is used.
  27047.  
  27048. Start ParityStop Start
  27049. bit bit bit bit
  27050.  
  27051. Serial data
  27052. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1
  27053. TxD2
  27054.  
  27055. CTS2
  27056.  
  27057. Drive high before stop bit
  27058.  
  27059. Figure 16.9 Example of Operation Using Modem Control (&76)
  27060. &76
  27061.  
  27062. Rev. 2.0, 02/99, page 577 of 830
  27063.  
  27064. ----------------------- Page 592-----------------------
  27065.  
  27066. Serial Data Reception: Figure 16.10 shows a sample flowchart for serial reception.
  27067.  
  27068. Use the following procedure for serial data reception after enabling the SCIF for reception.
  27069.  
  27070. Start of reception 1. Receive error handling and
  27071. break detection: Read the DR,
  27072. ER, and BRK flags in
  27073. Read ER, DR, BRK flags in SCFSR2, and the ORER flag
  27074. SCFSR2 and ORER in SCLSR2, to identify any
  27075. flag in SCLSR2 error, perform the appropriate
  27076. error handling, then clear the
  27077. DR, ER, BRK, and ORER
  27078. flags to 0. In the case of a
  27079. ER or DR or BRK or ORER Yes framing error, a break can also
  27080.  
  27081. = 1? be detected by reading the
  27082. value of the RxD2 pin.
  27083. No Error handling
  27084. 2. SCIF status check and receive
  27085. data read : Read SCFSR2 and
  27086. Read RDF flag in SCFSR2 check that RDF = 1, then read
  27087. the receive data in SCFRDR2,
  27088. read 1 from the RDF flag, and
  27089. No
  27090. RDF = 1? then clear the RDF flag to 0.
  27091. The transition of the RDF flag
  27092. Yes from 0 to 1 can also be
  27093. identified by an RXI interrupt.
  27094. Read receive data in
  27095. 3. Serial reception continuation
  27096. SCFRDR2, and clear RDF
  27097. procedure: To continue serial
  27098. flag in SCFSR2 to 0
  27099. reception, read at least the
  27100. receive trigger set number of
  27101. No receive data bytes from
  27102. All data received?
  27103. SCFRDR2, read 1 from the
  27104. RDF flag, then clear the RDF
  27105. Yes
  27106. flag to 0. The number of
  27107. Clear RE bit in SCSCR2 to 0 receive data bytes in
  27108. SCFRDR2 can be ascertained
  27109. by reading the lower bits of
  27110. End of reception SCFDR2.
  27111.  
  27112. Figure 16.10 Sample Serial Reception Flowchart (1)
  27113.  
  27114. Rev. 2.0, 02/99, page 578 of 830
  27115.  
  27116. ----------------------- Page 593-----------------------
  27117.  
  27118. 1. Whether a framing error or parity error
  27119. Error handling
  27120. has occurred in the receive data read
  27121. from SCFRDR2 can be ascertained
  27122. No from the FER and PER bits in
  27123. ORER = 1? SCFSR2.
  27124.  
  27125. Yes 2. When a break signal is received,
  27126. receive data is not transferred to
  27127. Overrun error handling SCFRDR2 while the BRK flag is set.
  27128. However, note that the last data in
  27129. SCFRDR2 is H'00 (the break data in
  27130. which a framing error occurred is
  27131. No
  27132. ER = 1? stored).
  27133.  
  27134.  
  27135. Yes
  27136.  
  27137. Receive error handling
  27138.  
  27139. No
  27140. BRK = 1?
  27141.  
  27142. Yes
  27143.  
  27144. Break handling
  27145.  
  27146. No
  27147. DR = 1?
  27148.  
  27149. Yes
  27150.  
  27151. Read receive data in SCFRDR2
  27152.  
  27153. Clear DR, ER, BRK flags
  27154. in SCFSR2,
  27155. and ORER flag in SCLSR2, to 0
  27156.  
  27157. End
  27158.  
  27159. Figure 16.10 Sample Serial Reception Flowchart (2)
  27160.  
  27161. Rev. 2.0, 02/99, page 579 of 830
  27162.  
  27163. ----------------------- Page 594-----------------------
  27164.  
  27165. In serial reception, the SCIF operates as described below.
  27166.  
  27167. 1. The SCIF monitors the transmission line, and if a 0 start bit is detected, performs internal
  27168. synchronization and starts reception.
  27169. 2. The received data is stored in SCRSR2 in LSB-to-MSB order.
  27170. 3. The parity bit and stop bit are received.
  27171. After receiving these bits, the SCIF carries out the following checks.
  27172. a. Stop bit check: The SCIF checks whether the stop bit is 1. If there are two stop bits, only
  27173. the first is checked.
  27174. b. The SCIF checks whether receive data can be transferred from the receive shift register
  27175. (SCRSR2) to SCFRDR2.
  27176. c. Overrun error check: The SCIF checks that the ORER flag is 0, indicating that no overrun
  27177. error has occurred.
  27178. d. Break check: The SCIF checks that the BRK flag is 0, indicating that the break state is
  27179. not set.
  27180. If all the above checks are passed, the receive data is stored in SCFRDR2.
  27181.  
  27182. Note: Reception continues when parity error, framing error occurs.
  27183.  
  27184. 4. If the RIE bit in SCSCR2 is set to 1 when the RDF or DR flag changes to 1, a receive-FIFO-
  27185. data-full interrupt (RXI) request is generated.
  27186. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the ER flag changes to 1, a receive-
  27187. error interrupt (ERI) request is generated.
  27188. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the BRK or ORER flag changes to 1, a
  27189. break reception interrupt (BRI) request is generated.
  27190.  
  27191. Figure 16.11 shows an example of the operation for reception.
  27192.  
  27193. Rev. 2.0, 02/99, page 580 of 830
  27194.  
  27195. ----------------------- Page 595-----------------------
  27196.  
  27197. Start Data Parity Stop Start Data Parity Stop
  27198. 1 bit bit bit bit bit bit
  27199.  
  27200. Serial
  27201. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  27202. data
  27203.  
  27204. RDF
  27205.  
  27206. FER
  27207.  
  27208. RXI interrupt
  27209. request Data read and RDF flag ERI interrupt request
  27210.  
  27211. One frame read as 1 then cleared to generated by receive
  27212. 0 by RXI interrupt handler error
  27213.  
  27214. Figure 16.11 Example of SCIF Receive Operation
  27215. (Example with 8-Bit Data, Parity, One Stop Bit)
  27216.  
  27217. 5. When modem control is enabled, the 576 signal is output when SCFRDR2 is empty. When
  27218. 576 is 0, reception is possible. When 576 is 1, this indicates that SCFRDR2 contains 15
  27219. or more bytes of data, and there is no free space, reception is not possible.
  27220. Figure 16.12 shows an example of the operation when modem control is used.
  27221.  
  27222. Start Parity Stop Start
  27223. bit bit bit bit
  27224. Serial data
  27225. 0 D0 D1 D2 D7 0/1 1 0
  27226. RxD2
  27227.  
  27228. RTS2
  27229.  
  27230. Figure 16.12 Example of Operation Using Modem Control (576)
  27231. 576
  27232.  
  27233. Rev. 2.0, 02/99, page 581 of 830
  27234.  
  27235. ----------------------- Page 596-----------------------
  27236.  
  27237. 16.4 SCIF Interrupt Sources and the DMAC
  27238.  
  27239. The SCIF has four interrupt sources: transmit-FIFO-data-empty interrupt (TXI) request, receive-
  27240. error interrupt (ERI) request, receive-FIFO-data-full interrupt (RXI) request, and break interrupt
  27241. (BRI) request.
  27242.  
  27243. Table 16.6 shows the interrupt sources and their order of priority. The interrupt sources are
  27244. enabled or disabled by means of the TIE, RIE, and REIE bits in SCSCR2. A separate interrupt
  27245. request is sent to the interrupt controller for each of these interrupt sources.
  27246.  
  27247. When transmission/reception is carried out using the DMAC, output of interrupt requests to the
  27248. interrupt controller can be inhibited by clearing the RIE bit in SCSCR2 to 0. By setting the REIE
  27249. bit to 1 while the RIE bit is cleared to 0, it is possible to output ERI and BRI interrupt requests,
  27250. but not RXI interrupt requests.
  27251.  
  27252. When the TDFE flag in the serial status register (SCFSR2) is set to 1, a transmit-FIFO-data-
  27253. empty request is generated separately from the interrupt request. A transmit-FIFO-data-empty
  27254. request can activate the DMAC to perform data transfer.
  27255.  
  27256. When the RDF flag or DR flag in SCFSR2 is set to 1, a receive-FIFO-data-full request is
  27257. generated separately from the interrupt request. A receive-FIFO-data-full request can activate
  27258. the DMAC to perform data transfer.
  27259.  
  27260. When using the DMAC for transmission/reception, set and enable the DMAC before making the
  27261. SCIF settings. See section 14, Direct Memory Access Controller (DMAC), for details of the
  27262. DMAC setting procedure.
  27263.  
  27264. When the BRK flag in SCFSR2 or the ORER flag in the line status register (SCLSR2) is set to 1,
  27265. a BRI interrupt request is generated.
  27266.  
  27267. The TXI interrupt indicates that transmit data can be written, and the RXI interrupt indicates that
  27268. there is receive data in SCFRDR2.
  27269.  
  27270. Table 16.6 SCIF Interrupt Sources
  27271.  
  27272. Interrupt DMAC Priority on
  27273. Source Description Activation Reset Release
  27274.  
  27275. ERI Interrupt initiated by receive error flag (ER) Not possible High
  27276.  
  27277. RXI Interrupt initiated by receive FIFO data full flag Possible ↑
  27278. (RDF) or receive data ready flag (DR)
  27279.  
  27280. BRI Interrupt initiated by break flag (BRK) or overrun Not possible
  27281. error flag (ORER) ↓
  27282.  
  27283. TXI Interrupt initiated by transmit FIFO data empty Possible Low
  27284. flag (TDFE)
  27285.  
  27286. Rev. 2.0, 02/99, page 582 of 830
  27287.  
  27288. ----------------------- Page 597-----------------------
  27289.  
  27290. See section 5, Exceptions, for priorities and the relationship with non-SCIF interrupts.
  27291.  
  27292. 16.5 Usage Notes
  27293.  
  27294. Note the following when using the SCIF.
  27295.  
  27296. SCFTDR2 Writing and the TDFE Flag: The TDFE flag in the serial status register (SCFSR2)
  27297. is set when the number of transmit data bytes written in the transmit FIFO data register
  27298. (SCFTDR2) has fallen to or below the transmit trigger number set by bits TTRG1 and TTRG0 in
  27299. the FIFO control register (SCFCR2). After TDFE is set, transmit data up to the number of empty
  27300. bytes in SCFTDR2 can be written, allowing efficient continuous transmission.
  27301.  
  27302. However, if the number of data bytes written in SCFTDR2 is equal to or less than the transmit
  27303. trigger number, the TDFE flag will be set to 1 again after being read as 1 and cleared to 0. TDFE
  27304. clearing should therefore be carried out when SCFTDR2 contains more than the transmit trigger
  27305. number of transmit data bytes.
  27306.  
  27307. The number of transmit data bytes in SCFTDR2 can be found from the upper 8 bits of the FIFO
  27308. data count register (SCFDR2).
  27309.  
  27310. SCFRDR2 Reading and the RDF Flag: The RDF flag in the serial status register (SCFSR2) is
  27311. set when the number of receive data bytes in the receive FIFO data register (SCFRDR2) has
  27312. become equal to or greater than the receive trigger number set by bits RTRG1 and RTRG0 in the
  27313. FIFO control register (SCFCR2). After RDF is set, receive data equivalent to the trigger number
  27314. can be read from SCFRDR2, allowing efficient continuous reception.
  27315.  
  27316. However, if the number of data bytes in SCFRDR2 is equal to or greater than the trigger
  27317. number, the RDF flag will be set to 1 again if it is cleared to 0. RDF should therefore be cleared
  27318. to 0 after being read as 1 after all the receive data has been read.
  27319.  
  27320. The number of receive data bytes in SCFRDR2 can be found from the lower 8 bits of the FIFO
  27321. data count register (SCFDR2).
  27322.  
  27323. Break Detection and Processing: Break signals can be detected by reading the RxD2 pin
  27324. directly when a framing error (FER) is detected. In the break state the input from the RxD2 pin
  27325. consists of all 0s, so the FER flag is set and the parity error flag (PER) may also be set.
  27326.  
  27327. Although the SCIF stops transferring receive data to SCFRDR2 after receiving a break, the
  27328. receive operation continues.
  27329.  
  27330. Sending a Break Signal: The input/output condition and level of the TxD2 pin are determined
  27331. by bits SPB2IO and SPB2DT in the serial port register (SCSPTR2). This feature can be used to
  27332. send a break signal.
  27333.  
  27334. Rev. 2.0, 02/99, page 583 of 830
  27335.  
  27336. ----------------------- Page 598-----------------------
  27337.  
  27338. After the serial transmitter is initialized, the TxD2 pin function is not selected and the value of
  27339. the SPB2DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  27340. enabled). The SPB2IO and SPB2DT bits should therefore be set to 1 (designating output and
  27341. high level) beforehand.
  27342.  
  27343. To send a break signal during serial transmission, clear the SPB2DT bit to 0 (designating low
  27344. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  27345. transmitter is initialized, regardless of its current state, and 0 is output from the TxD2 pin.
  27346.  
  27347. Receive Data Sampling Timing and Receive Margin: The SCIF operates on a base clock with
  27348. a frequency of 16 times the bit rate. In reception, the SCIF synchronizes internally with the fall
  27349. of the start bit, which it samples on the base clock. Receive data is latched at the rising edge of
  27350. the eighth base clock pulse. The timing is shown in figure 16.13.
  27351.  
  27352. 16 clocks
  27353.  
  27354. 8 clocks
  27355.  
  27356. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5
  27357.  
  27358. Base clock
  27359.  
  27360. –7.5 clocks +7.5 clocks
  27361.  
  27362. Receive data Start bit D0 D1
  27363. (RxD2)
  27364.  
  27365. Synchronization
  27366. sampling timing
  27367.  
  27368. Data sampling
  27369. timing
  27370.  
  27371. Figure 16.13 Receive Data Sampling Timing in Asynchronous Mode
  27372.  
  27373. Rev. 2.0, 02/99, page 584 of 830
  27374.  
  27375. ----------------------- Page 599-----------------------
  27376.  
  27377. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  27378.  
  27379. M = (0.5 – 1 ) – (L – 0.5) F – | D – 0.5 | (1 + F) × 100% ..................... (1)
  27380. 2N N
  27381.  
  27382. M: Receive margin (%)
  27383. N: Ratio of clock frequency to bit rate (N = 16)
  27384. D: Clock duty cycle (D = 0 to 1.0)
  27385. L: Frame length (L = 9 to 12)
  27386. F: Absolute deviation of clock frequency
  27387.  
  27388. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation
  27389. (2).
  27390.  
  27391. When D = 0.5 and F = 0:
  27392.  
  27393. M = (0.5 – 1 / (2 × 16) ) × 100% = 46.875% ........................................... (2)
  27394.  
  27395. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  27396.  
  27397. SCK2/MRESET: As the manual reset pin is multiplexed with the SCK2 pin, a manual reset
  27398. must not be executed while the SCIF is operating in external clock mode.
  27399.  
  27400. When Using the DMAC: When using the DMAC for transmission/reception, inhibit output of
  27401. RXI and TXI interrupt requests to the interrupt controller. If interrupt request output is enabled,
  27402. interrupt requests to the interrupt controller will be cleared by the DMAC without regard to the
  27403. interrupt handler.
  27404.  
  27405. Serial Ports: Note that, when the SCIF pin value is read using a serial port, the value read will
  27406. be the value two peripheral clock cycles earlier.
  27407.  
  27408. Overrun error flag: SCIF overrun error flag is not set in the case that overrun error and flaming
  27409. error occurred simultaneously in receiving data, that means 17th byte data which overrun was
  27410. accompanying with flaming error. In such case, only SCFSR2. ER flag which shows occurrence
  27411. of flaming error is set. RxFIFO stores data received before the overrun and does not store (i. e.
  27412. lose) overrun data. SCIF has no bit which corresponds to SCFSR2. FER for the lost data.
  27413.  
  27414. In addition to the overrun error handling software routine, exception handler should check co-
  27415. occurrence of overrun error when a flaming error is occurred and when a co-occurrence is found,
  27416. it should handle also overrun error (When (i) a overrun error solely occurred without
  27417. accompanying with other receive error and (ii) when a parity error is accompanied with overrun
  27418. error, usual overrun error handling can be used. Overrun error handling should rather be done
  27419. primarily).
  27420.  
  27421. Rev. 2.0, 02/99, page 585 of 830
  27422.  
  27423. ----------------------- Page 600-----------------------
  27424.  
  27425. Flow chart:
  27426. Framing error occurrence
  27427. When flaming error (SCFSR. ER=1) is occurred, bit7 to
  27428.  
  27429. bit0 should be read out from SCFDR2. If bit7 to bit0
  27430. Bits 7 to 0 No
  27431. in SCFDR2 = H'10? equals H'10, contents of the RxFIFO should be read.
  27432.  
  27433. When the data received last is not accompanied with
  27434. Yes
  27435. flaming error (SCFSR2. FER=0) both overrun error
  27436. Normal error handling
  27437. handling and flaming error handling shoud be
  27438.  
  27439. PER or FER bit Yes conducted.
  27440. in SCFSR2 set to 1?
  27441.  
  27442.  
  27443. No
  27444. Error handling
  27445.  
  27446. Read receive FIFO
  27447.  
  27448. No
  27449. Last data?
  27450.  
  27451. Yes
  27452.  
  27453. Overrun error handling
  27454. +
  27455. framing error handling
  27456.  
  27457. Figure 16.14 Overrun Error Flag
  27458.  
  27459. Rev. 2.0, 02/99, page 586 of 830
  27460.  
  27461. ----------------------- Page 601-----------------------
  27462.  
  27463. Section 17 Smart Card Interface
  27464.  
  27465. 17.1 Overview
  27466.  
  27467. An IC card (smart card) interface conforming to ISO/IEC 7816-3 (Identification Card) is
  27468. supported as a serial communication interface (SCI) extension function.
  27469.  
  27470. Switching between the normal serial communication interface and the smart card interface is
  27471. carried out by means of a register setting.
  27472.  
  27473. 17.1.1 Features
  27474.  
  27475. Features of the smart card interface are listed below.
  27476.  
  27477. • Asynchronous mode
  27478.  Data length: 8 bits
  27479.  Parity bit generation and checking
  27480.  Transmission of error signal (parity error) in receive mode
  27481.  Error signal detection and automatic data retransmission in transmit mode
  27482.  Direct convention and inverse convention both supported
  27483. • On-chip baud rate generator allows any bit rate to be selected
  27484. • Three interrupt sources
  27485. There are three interrupt sources—transmit-data-empty, receive-data-full, and
  27486. transmit/receive error—that can issue requests independently.
  27487. The transmit-data-empty interrupt and receive-data-full interrupt can activate the DMA
  27488. controller (DMAC) to execute data transfer.
  27489.  
  27490. Rev. 2.0, 02/99, page 587 of 830
  27491.  
  27492. ----------------------- Page 602-----------------------
  27493.  
  27494. 17.1.2 Block Diagram
  27495.  
  27496. Figure 17.1 shows a block diagram of the smart card interface.
  27497.  
  27498. e
  27499. c Internal
  27500. a
  27501. Module data bus f data bus
  27502. r
  27503. e
  27504. t
  27505. n
  27506. i
  27507.  
  27508. s
  27509. u
  27510. B
  27511.  
  27512. SCRDR1 SCTDR1 SCSCMR1 SCBRR1
  27513. SCSSR1
  27514. Pφ
  27515. SCSCR1
  27516. RxD SCRSR1 SCTSR1
  27517. Baud rate
  27518. SCSMR1 Pφ/4
  27519. generator
  27520. SCSPTR1
  27521. Transmission/ Pφ/16
  27522. reception
  27523. control Pφ/64
  27524. TxD
  27525. Parity generation Clock
  27526.  
  27527. Parity check
  27528.  
  27529. External clock
  27530. SCK
  27531.  
  27532. TXI
  27533. RXI
  27534. ERI
  27535.  
  27536. SCI
  27537.  
  27538. SCSCMR1: Smart card mode register
  27539. SCRSR1: Receive shift register
  27540. SCRDR1: Receive data register
  27541. SCTSR1: Transmit shift register
  27542. SCTDR1: Transmit data register
  27543. SCSMR1: Serial mode register
  27544. SCSCR1: Serial control register
  27545. SCSSR1: Serial status register
  27546. SCBRR1: Bit rate register
  27547. SCSPTR1: Serial port register
  27548.  
  27549. Figure 17.1 Block Diagram of Smart Card Interface
  27550.  
  27551. Rev. 2.0, 02/99, page 588 of 830
  27552.  
  27553. ----------------------- Page 603-----------------------
  27554.  
  27555. 17.1.3 Pin Configuration
  27556.  
  27557. Table 17.1 shows the smart card interface pin configuration.
  27558.  
  27559. Table 17.1 Smart Card Interface Pins
  27560.  
  27561. Pin Name Abbreviation I/O Function
  27562.  
  27563. Serial clock pin MD0/SCK I/O Clock input/output
  27564.  
  27565. Receive data pin RxD Input Receive data input
  27566.  
  27567. Transmit data pin MD7/TxD Output Transmit data output
  27568.  
  27569. 17.1.4 Register Configuration
  27570.  
  27571. The smart card interface has the internal registers shown in table 17.2. Details of the SCBRR1,
  27572. SCTDR1, SCRDR1, and SCSPTR1 registers are the same as for the normal SCI function: see the
  27573. register descriptions in section 15, Serial Communication Interface.
  27574.  
  27575. With the exception of the serial port register, the smart card interface registers are initialized in
  27576. standby mode and in the module standby state as well as by a power-on reset or manual reset.
  27577. When recovering from standby mode or the module standby state, the registers must be set
  27578. again.
  27579.  
  27580. Table 17.2 Smart Card Interface Registers
  27581.  
  27582. Initial Area 7 Access
  27583. Name Abbreviation R/W Value P4 Address Address Size
  27584.  
  27585. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  27586.  
  27587. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  27588.  
  27589. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  27590.  
  27591. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  27592. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  27593.  
  27594. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  27595.  
  27596. Smart card mode SCSCMR1 R/W H'00 H'FFE00018 H'1FE00018 8
  27597. register
  27598. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  27599.  
  27600. Notes: 1. Only 0 can be written, to clear flags.
  27601. 2. The value of bits 2 and 0 is undefined.
  27602.  
  27603. Rev. 2.0, 02/99, page 589 of 830
  27604.  
  27605. ----------------------- Page 604-----------------------
  27606.  
  27607. 17.2 Register Descriptions
  27608.  
  27609. Only registers that have been added, and bit functions that have been modified, for the smart
  27610. card interface are described here.
  27611.  
  27612. 17.2.1 Smart Card Mode Register (SCSCMR1)
  27613.  
  27614. SCSCMR1 is an 8-bit readable/writable register that selects the smart card interface function.
  27615. SCSCMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in
  27616. the module standby state.
  27617.  
  27618. Bit: 7 6 5 4 3 2 1 0
  27619.  
  27620. — — — — SDIR SINV — SMIF
  27621.  
  27622. Initial value: — — — — 0 0 — 0
  27623.  
  27624. R/W: — — — — R/W R/W — R/W
  27625.  
  27626. Bits 7 to 4 and 1—Reserved: These bits are always read as 0, and should only be written with
  27627. 0.
  27628.  
  27629. Bit 3—Smart Card Data Transfer Direction (SDIR): Selects the serial/parallel conversion
  27630. format.
  27631.  
  27632. Bit 3: SDIR Description
  27633.  
  27634. 0 SCTDR1 contents are transmitted LSB-first (Initial value)
  27635.  
  27636. Receive data is stored in SCRDR1 LSB-first
  27637.  
  27638. 1 SCTDR1 contents are transmitted MSB-first
  27639.  
  27640. Receive data is stored in SCRDR1 MSB-first
  27641.  
  27642. Bit 2—Smart Card Data Invert (SINV): Specifies inversion of the data logic level. This
  27643. function is used together with the bit 3 function for communication with an inverse convention
  27644. card. The SINV bit does not affect the logic level of the parity bit. For parity-related setting
  27645. procedures, see section 17.3.4, Register Settings.
  27646.  
  27647. Bit 2: SINV Description
  27648.  
  27649. 0 SCTDR1 contents are transmitted as they are (Initial value)
  27650.  
  27651. Receive data is stored in SCRDR1 as it is
  27652.  
  27653. 1 SCTDR1 contents are inverted before being transmitted
  27654.  
  27655. Receive data is stored in SCRDR1 in inverted form
  27656.  
  27657. Rev. 2.0, 02/99, page 590 of 830
  27658.  
  27659. ----------------------- Page 605-----------------------
  27660.  
  27661. Bit 0—Smart Card Interface Mode Select (SMIF): Enables or disables the smart card
  27662. interface function.
  27663.  
  27664. Bit 0: SMIF Description
  27665.  
  27666. 0 Smart card interface function is disabled (Initial value)
  27667.  
  27668. 1 Smart card interface function is enabled
  27669.  
  27670. 17.2.2 Serial Mode Register (SCSMR1)
  27671.  
  27672. Bit 7 of SCSMR1 has a different function in smart card interface mode.
  27673.  
  27674. Bit: 7 6 5 4 3 2 1 0
  27675.  
  27676. GM(C/$) CHR PE O/( STOP MP CKS1 CKS0
  27677.  
  27678. Initial value: 0 0 0 0 0 0 0 0
  27679.  
  27680. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27681.  
  27682. Bit 7—GSM Mode (GM): Sets the smart card interface function to GSM mode.
  27683.  
  27684. With the normal smart card interface, this bit is cleared to 0. Setting this bit to 1 selects GSM
  27685. mode, an additional mode for controlling the timing for setting the TEND flag that indicates
  27686. completion of transmission, and the type of clock output used. The details of the additional clock
  27687. output control mode are specified by the CKE1 and CKE0 bits in the serial control register
  27688. (SCSCR1). In GSM mode, the pulse width is guaranteed when SCK start/stop specifications are
  27689. made by CKE1 and CKE0.
  27690.  
  27691. Bit 7: GM Description
  27692.  
  27693. 0 Normal smart card interface mode operation (Initial value)
  27694.  
  27695. • The TEND flag is set 12.5 etu after the beginning of the start bit
  27696.  
  27697. • Clock output on/off control only
  27698.  
  27699. 1 GSM mode smart card interface mode operation
  27700.  
  27701. • The TEND flag is set 11.0 etu after the beginning of the start bit
  27702.  
  27703. • Clock output on/off and fixed-high/fixed-low control (set in SCSCR1)
  27704.  
  27705. Note: etu: Elementary time unit (time for transfer of 1 bit)
  27706.  
  27707. Bits 6 to 0: Operate in the same way as for the normal SCI. See section 15, Serial
  27708. Communication Interface, for details. With the smart card interface, the following settings
  27709. should be used: CHR = 0, PE = 1, STOP = 1, MP = 0.
  27710.  
  27711. Rev. 2.0, 02/99, page 591 of 830
  27712.  
  27713. ----------------------- Page 606-----------------------
  27714.  
  27715. 17.2.3 Serial Control Register (SCSCR1)
  27716.  
  27717. Bits 1 and 0 of SCSCR1 have a different function in smart card interface mode.
  27718.  
  27719. Bit: 7 6 5 4 3 2 1 0
  27720.  
  27721. TIE RIE TE RE — — CKE1 CKE0
  27722.  
  27723. Initial value: 0 0 0 0 0 0 0 0
  27724.  
  27725. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27726.  
  27727. Bits 7 to 4: Operate in the same way as for the normal SCI. See section 15, Serial
  27728. Communication Interface, for details.
  27729.  
  27730. Bits 3 and 2: Not used with the smart card interface.
  27731.  
  27732. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits specify the function of the
  27733. SCK pin. In smart card interface mode, an internal clock is always used as the clock source. In
  27734. smart card interface mode, it is possible to specify a fixed high level or fixed low level for the
  27735. clock output, in addition to the usual switching between enabling and disabling of the clock
  27736. output.
  27737.  
  27738. GM CKE1 CKE0 SCK Pin Function
  27739.  
  27740. 0 0 0 Port I/O pin
  27741.  
  27742. 1 Clock output as SCK output pin
  27743.  
  27744. 1 0 Invalid setting: must not be used
  27745.  
  27746. 1 Invalid setting: must not be used
  27747.  
  27748. 1 0 0 Output pin with output fixed low
  27749.  
  27750. 1 Clock output as output pin
  27751.  
  27752. 1 0 Output pin with output fixed high
  27753.  
  27754. 1 Clock output as output pin
  27755.  
  27756. Rev. 2.0, 02/99, page 592 of 830
  27757.  
  27758. ----------------------- Page 607-----------------------
  27759.  
  27760. 17.2.4 Serial Status Register (SCSSR1)
  27761.  
  27762. Bit 4 of SCSSR1 has a different function in smart card interface mode. Coupled with this, the
  27763. setting conditions for bit 2 (TEND) are also different.
  27764.  
  27765. Bit: 7 6 5 4 3 2 1 0
  27766.  
  27767. TDRE RDRF ORER FER/ PER TEND — —
  27768. ERS
  27769.  
  27770. Initial value: 1 0 0 0 0 1 0 0
  27771.  
  27772. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  27773.  
  27774. Note: * Only 0 can be written, to clear the flag.
  27775.  
  27776. Bits 7 to 5: Operate in the same way as for the normal SCI. See section 15, Serial
  27777. Communication Interface, for details.
  27778.  
  27779. Bit 4—Error Signal Status (ERS): In smart card interface mode, bit 4 indicates the status of
  27780. the error signal sent back from the receiving side during transmission. Framing errors are not
  27781. detected in smart card interface mode.
  27782.  
  27783. Bit 4: ERS Description
  27784.  
  27785. 0 Normal reception, no error signal (Initial value)
  27786.  
  27787. [Clearing conditions]
  27788.  
  27789. • Power-on reset, manual reset, standby mode, or module standby
  27790.  
  27791. • When 0 is written to ERS after reading ERS = 1
  27792.  
  27793. 1 An error signal has been sent from the receiving side indicating detection of
  27794. a parity error
  27795.  
  27796. [Setting condition]
  27797.  
  27798. • When the low level of the error signal is detected
  27799.  
  27800. Note: Clearing the TE bit in SCSCR1 to 0 does not affect the ERS flag, which retains its previous
  27801. state.
  27802.  
  27803. Bit 3—Parity Error (PER): Operates in the same way as for the normal SCI. See section 15,
  27804. Serial Communication Interface, for details.
  27805.  
  27806. Rev. 2.0, 02/99, page 593 of 830
  27807.  
  27808. ----------------------- Page 608-----------------------
  27809.  
  27810. Bit 2—Transmit End (TEND): The setting conditions for the TEND flag are as follows.
  27811.  
  27812. Bit 2: TEND Description
  27813.  
  27814. 0 Transmission in progress
  27815.  
  27816. [Clearing condition]
  27817.  
  27818. •• When 0 is written to TDRE after reading TDRE = 1
  27819.  
  27820. 1 Transmission has been ended (Initial value)
  27821.  
  27822. [Setting conditions]
  27823.  
  27824. • Power-on reset, manual reset, standby mode, or module standby
  27825.  
  27826. • When the TE bit in SCSCR1 is 0 and the FER/ERS bit is also 0
  27827.  
  27828. • When the GM bit in SCSMR1 is 0, and TDRE = 1 and FER/ERS = 0
  27829. (normal transmission) 2.5 etu after transmission of a 1-byte serial
  27830. character
  27831.  
  27832. • When the GM bit in SCSMR1 is 1, and TDRE = 1 and FER/ERS = 0
  27833. (normal transmission) 1.0 etu after transmission of a 1-byte serial
  27834. character
  27835.  
  27836. etu: Elementary Time Unit
  27837.  
  27838. Bits 1 and 0: Not used with the smart card interface.
  27839.  
  27840. Rev. 2.0, 02/99, page 594 of 830
  27841.  
  27842. ----------------------- Page 609-----------------------
  27843.  
  27844. 17.3 Operation
  27845.  
  27846. 17.3.1 Overview
  27847.  
  27848. The main functions of the smart card interface are as follows.
  27849.  
  27850. • One frame consists of 8-bit data plus a parity bit.
  27851. • In transmission, a guard time of at least 2 etu (elementary time unit: the time for transfer of
  27852. one bit) is left between the end of the parity bit and the start of the next frame.
  27853. • If a parity error is detected during reception, a low error signal level is output for a 1-etu
  27854. period 10.5 etu after the start bit.
  27855. • If an error signal is detected during transmission, the same data is transmitted automatically
  27856. after the elapse of 2 etu or longer.
  27857. • Only asynchronous communication is supported; there is no synchronous communication
  27858. function.
  27859.  
  27860. Rev. 2.0, 02/99, page 595 of 830
  27861.  
  27862. ----------------------- Page 610-----------------------
  27863.  
  27864. 17.3.2 Pin Connections
  27865.  
  27866. Figure 17.2 shows a schematic diagram of smart card interface related pin connections.
  27867.  
  27868. In communication with an IC card, since both transmission and reception are carried out on a
  27869. single data transmission line, the TxD pin and RxD pin should be connected outside the chip.
  27870. The data transmission line should be pulled up on the VCC power supply side with a resistor.
  27871. The TxD pin is multiplexed with MD7, so caution is required in a reset.
  27872.  
  27873. When the clock generated on the smart card interface is used by an IC card, the SCK pin output
  27874. is input to the CLK pin of the IC card. No connection is needed if the IC card uses an internal
  27875. clock.
  27876.  
  27877. Chip port output is used as the reset signal.
  27878.  
  27879. Other pins must normally be connected to the power supply or ground.
  27880.  
  27881. Note: If an IC card is not connected, and both TE and RE are set to 1, closed
  27882. transmission/reception is possible, enabling self-diagnosis to be carried out.
  27883.  
  27884. VCC
  27885.  
  27886.  
  27887. TxD
  27888. IO
  27889. Data line
  27890. RxD
  27891.  
  27892. SCK Clock line
  27893. CLK
  27894.  
  27895. SH7750 Px (port) Reset line RST
  27896.  
  27897. Connected equipment IC card
  27898.  
  27899. Figure 17.2 Schematic Diagram of Smart Card Interface Pin Connections
  27900.  
  27901. Rev. 2.0, 02/99, page 596 of 830
  27902.  
  27903. ----------------------- Page 611-----------------------
  27904.  
  27905. 17.3.3 Data Format
  27906.  
  27907. Figure 17.3 shows the smart card interface data format. In reception in this mode, a parity check
  27908. is carried out on each frame, and if an error is detected an error signal is sent back to the
  27909. transmitting side to request retransmission of the data. If an error signal is detected during
  27910. transmission, the same data is retransmitted.
  27911.  
  27912. When there is no parity error
  27913.  
  27914. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  27915.  
  27916. Transmitting station output
  27917.  
  27918. When a parity error occurs
  27919.  
  27920. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp DE
  27921.  
  27922. Transmitting station output
  27923.  
  27924. Receiving
  27925. station
  27926. Ds: Start bit output
  27927. D0–D7: Data bits
  27928. Dp: Parity bit
  27929. DE: Error signal
  27930.  
  27931.  
  27932. Figure 17.3 Smart Card Interface Data Format
  27933.  
  27934. Rev. 2.0, 02/99, page 597 of 830
  27935.  
  27936. ----------------------- Page 612-----------------------
  27937.  
  27938. The operation sequence is as follows.
  27939.  
  27940. 1. When the data line is not in use it is in the high-impedance state, and is fixed high with a
  27941. pull-up resistor.
  27942. 2. The transmitting station starts transmission of one frame of data. The data frame starts with a
  27943. start bit (Ds, low-level), followed by 8 data bits (D0 to D7) and a parity bit (Dp).
  27944. 3. With the smart card interface, the data line then returns to the high-impedance state. The data
  27945. line is pulled high with a pull-up resistor.
  27946. 4. The receiving station carries out a parity check.
  27947. If there is no parity error and the data is received normally, the receiving station waits for
  27948. reception of the next data.
  27949. If a parity error occurs, however, the receiving station outputs an error signal (DE, low-level)
  27950. to request retransmission of the data. After outputting the error signal for the prescribed
  27951. length of time, the receiving station places the signal line in the high-impedance state again.
  27952. The signal line is pulled high again by a pull-up resistor.
  27953. 5. If the transmitting station does not receive an error signal, it proceeds to transmit the next
  27954. data frame.
  27955. If it receives an error signal, however, it returns to step 2 and retransmits the erroneous data.
  27956.  
  27957. 17.3.4 Register Settings
  27958.  
  27959. Table 17.3 shows a bit map of the registers used by the smart card interface. Bits indicated as 0
  27960. or 1 must be set to the value shown. The setting of other bits is described below.
  27961.  
  27962. Table 17.3 Smart Card Interface Register Settings
  27963.  
  27964. Bit
  27965.  
  27966. Register Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
  27967.  
  27968. SCSMR1 GM 0 1 O/( 1 0 CKS1 CKS0
  27969.  
  27970. SCBRR1 BRR7 BRR6 BRR5 BRR4 BRR3 BRR2 BRR1 BRR0
  27971.  
  27972. SCSCR1 TIE RIE TE RE 0 0 CKE1 CKE0
  27973.  
  27974. SCTDR1 TDR7 TDR6 TDR5 TDR4 TDR3 TDR2 TDR1 TDR0
  27975.  
  27976. SCSSR1 TDRE RDRF ORER FER/ERS PER TEND 0 0
  27977.  
  27978. SCRDR1 RDR7 RDR6 RDR5 RDR4 RDR3 RDR2 RDR1 RDR0
  27979.  
  27980. SCSCMR1 — — — — SDIR SINV — SMIF
  27981.  
  27982. SCSPTR1 EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  27983.  
  27984. Note: A dash indicates an unused bit.
  27985.  
  27986. Rev. 2.0, 02/99, page 598 of 830
  27987.  
  27988. ----------------------- Page 613-----------------------
  27989.  
  27990. Serial Mode Register (SCSMR1) Settings: The GM bit is used to select the timing of TEND
  27991. flag setting, and, together with the CKE1 and CKE0 bits in the serial control register (SCSCR1),
  27992. to select the clock output state.
  27993.  
  27994. The O/( bit is cleared to 0 if the IC card is of the direct convention type, and set to 1 if of the
  27995. inverse convention type.
  27996.  
  27997. Bits CKS1 and CKS0 select the clock source of the on-chip baud rate generator. See section
  27998. 17.3.5, Clock.
  27999.  
  28000. I/O data Ds Da Db Dc Dd De Df Dg Dh Dp DE
  28001.  
  28002. Guard
  28003. time
  28004.  
  28005. 12.5 etu
  28006. TXI
  28007. GM = 0
  28008. (TEND interrupt)
  28009.  
  28010. 11.0 etu
  28011. GM = 1
  28012.  
  28013. Figure 17.4 TEND Generation Timing
  28014.  
  28015. Bit Rate Register (SCBRR1) Setting: SCBRR1 is used to set the bit rate. See section 17.3.5,
  28016. Clock, for the method of calculating the value to be set.
  28017.  
  28018. Serial Control Register (SCSCR1) Settings: The function of the TIE, RIE, TE, and RE bits is
  28019. the same as for the normal SCI. See section 15, Serial Communication Interface, for details.
  28020.  
  28021. The CKE1 and CKE0 bits specify the clock output state. See section 17.3.5, Clock, for details.
  28022.  
  28023. Smart Card Mode Register (SCSCMR1) Settings: The SDIR bit and SINV bit are both
  28024. cleared to 0 if the IC card is of the direct convention type, and both set to 1 if of the inverse
  28025. convention type.
  28026.  
  28027. The SMIF bit is set to 1 when the smart card interface is used.
  28028.  
  28029. Figure 17.5 shows examples of register settings and the waveform of the start character for the
  28030. two types of IC card (direct convention and inverse convention).
  28031.  
  28032. With the direct convention type, the logic 1 level corresponds to state Z and the logic 0 level to
  28033. state A, and transfer is performed in LSB-first order. The start character data in this case is
  28034. H'3B. The parity bit is 1 since even parity is stipulated for the smart card.
  28035.  
  28036. Rev. 2.0, 02/99, page 599 of 830
  28037.  
  28038. ----------------------- Page 614-----------------------
  28039.  
  28040. With the inverse convention type, the logic 1 level corresponds to state A and the logic 0 level to
  28041. state Z, and transfer is performed in MSB-first order. The start character data in this case is
  28042. H'3F. The parity bit is 0, corresponding to state Z, since even parity is stipulated for the smart
  28043. card.
  28044.  
  28045. Inversion specified by the SINV bit applies only to the data bits, D7 to D0. For parity bit
  28046. inversion, the O/( bit in SCSMR1 is set to odd parity mode. (This applies to both transmission
  28047. and reception).
  28048.  
  28049. (Z) A Z Z A Z Z Z A A Z (Z) State
  28050.  
  28051. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  28052.  
  28053. (a) Direct convention (SDIR = SINV = O/E = 0)
  28054.  
  28055. (Z) A Z Z A A A A A A Z (Z) State
  28056.  
  28057. Ds D7 D6 D5 D4 D3 D2 D1 D0 Dp
  28058.  
  28059. (b) Inverse convention (SDIR = SINV = O/E = 1)
  28060.  
  28061. Figure 17.5 Sample Start Character Waveforms
  28062.  
  28063. Rev. 2.0, 02/99, page 600 of 830
  28064.  
  28065. ----------------------- Page 615-----------------------
  28066.  
  28067. 17.3.5 Clock
  28068.  
  28069. Only an internal clock generated by the on-chip baud rate generator can be used as the
  28070. transmit/receive clock for the smart card interface. The bit rate is set with the bit rate register
  28071. (SCBRR1) and the CKS1 and CKS0 bits in the serial mode register (SCSMR1). The equation for
  28072. calculating the bit rate is shown below. Table 17.5 shows some sample bit rates.
  28073.  
  28074. If clock output is selected with CKE0 set to 1, a clock with a frequency of 372 times the bit rate
  28075. is output from the SCK pin.
  28076.  
  28077.  
  28078. P
  28079. B = φ × 106
  28080. 1488 × 22n–1 × (N + 1)
  28081.  
  28082. Where: N = Value set in SCBRR1 (0 ≤ N ≤ 255)
  28083. B = Bit rate (bits/s)
  28084. Pφ = Peripheral module operating frequency (MHz)
  28085. n = 0 to 3 (See table 17.4)
  28086.  
  28087. Table 17.4 Values of n and Corresponding CKS1 and CKS0 Settings
  28088.  
  28089. n CKS1 CKS0
  28090.  
  28091. 0 0 0
  28092.  
  28093. 1 0 1
  28094.  
  28095. 2 1 0
  28096.  
  28097. 3 1 1
  28098.  
  28099. Table 17.5 Examples of Bit Rate B (bits/s) for Various SCBRR1 Settings (When n = 0)
  28100.  
  28101. Pφφ (MHz)
  28102.  
  28103. N 7.1424 10.00 10.7136 14.2848 25.0 33.0 50.0
  28104.  
  28105. 0 9600.0 13440.9 14400.0 19200.0 33602.2 44354.8 67204.3
  28106.  
  28107. 1 4800.0 6720.4 7200.0 9600.0 16801.1 22177.4 33602.2
  28108.  
  28109. 2 3200.0 4480.3 4800.0 6400.0 11200.7 14784.9 22401.4
  28110.  
  28111. Note: Bit rates are rounded to one decimal place.
  28112.  
  28113. Rev. 2.0, 02/99, page 601 of 830
  28114.  
  28115. ----------------------- Page 616-----------------------
  28116.  
  28117. The method of calculating the value to be set in the bit rate register (SCBRR1) from the
  28118. peripheral module operating frequency and bit rate is shown below. Here, N is an integer in the
  28119. range 0 ≤ N ≤ 255, and the smaller error is specified.
  28120.  
  28121.  
  28122. P
  28123. φ 6
  28124. N = × 10 – 1
  28125. 1488 × 22n–1 × B
  28126.  
  28127. Table 17.6 Examples of SCBRR1 Settings for Bit Rate B (bits/s) (When n = 0)
  28128.  
  28129. Pφφ (MHz)
  28130.  
  28131. 7.1424 10.00 10.7136 14.2848 25.00 33.00 50.00
  28132.  
  28133. Bits/s N Error N Error N Error N Error N Error N Error N Error
  28134.  
  28135. 9600 0 0.00 1 30.00 1 25.00 1 8.99 3 14.27 4 8.22 6 0.01
  28136.  
  28137. Table 17.7 Maximum Bit Rate at Various Frequencies (Smart Card Interface Mode)
  28138.  
  28139. Pφφ (MHz) Maximum Bit Rate (bits/s) N n
  28140.  
  28141. 7.1424 19200 0 0
  28142.  
  28143. 10.00 26882 0 0
  28144.  
  28145. 10.7136 28800 0 0
  28146.  
  28147. 16.00 43010 0 0
  28148.  
  28149. 20.00 53763 0 0
  28150.  
  28151. 25.0 67204 0 0
  28152.  
  28153. 30.0 80645 0 0
  28154.  
  28155. 33.0 88710 0 0
  28156.  
  28157. 50.0 67204 0 0
  28158.  
  28159. The bit rate error is given by the following equation:
  28160.  
  28161. φ
  28162. P
  28163. Error (%) = 1488 × 22n–1 × B × (N + 1) × 106 – 1 × 100
  28164.  
  28165. Table 17.8 shows the relationship between the smart card interface transmit/receive clock
  28166. register settings and the output state.
  28167.  
  28168. Rev. 2.0, 02/99, page 602 of 830
  28169.  
  28170. ----------------------- Page 617-----------------------
  28171.  
  28172. Table 17.8 Register Settings and SCK Pin State
  28173.  
  28174. Register Values SCK Pin
  28175.  
  28176. Setting SMIF GM CKE1 CKE0 Output State
  28177. 1*1 1 0 0 0 Port Determined by setting of SPB1IO
  28178.  
  28179. and SPB1DT bits in SCSPTR1
  28180.  
  28181. 1 0 0 1 SCK (serial clock) output state
  28182. 2*2 1 1 0 0 Low output Low-level output state
  28183.  
  28184. 1 1 0 1 SCK (serial clock) output state
  28185. 3*2 1 1 1 0 High output High-level output state
  28186.  
  28187. 1 1 1 1 SCK (serial clock) output state
  28188.  
  28189. Notes: 1. The SCK output state changes as soon as the CKE0 bit setting is changed.
  28190. Clear the CKE1 bit to 0.
  28191. 2. Stopping and starting the clock by changing the CKE0 bit setting does not affect the
  28192. clock duty cycle.
  28193.  
  28194. Width is Width is
  28195. Port value
  28196. undefined undefined Port value
  28197.  
  28198. SCK
  28199.  
  28200. (a) When GM = 0
  28201.  
  28202. CKE1 value Specified Specified
  28203. width width CKE1 value
  28204.  
  28205. SCK
  28206.  
  28207. (b) When GM = 1
  28208.  
  28209. Figure 17.6 Difference in Clock Output According to GM Bit Setting
  28210.  
  28211. Rev. 2.0, 02/99, page 603 of 830
  28212.  
  28213. ----------------------- Page 618-----------------------
  28214.  
  28215. 17.3.6 Data Transfer Operations
  28216.  
  28217. Initialization: Before transmitting and receiving data, the smart card interface must be
  28218. initialized as described below. Initialization is also necessary when switching from transmit
  28219. mode to receive mode, or vice versa. Figure 17.7 shows a sample initialization processing
  28220. flowchart.
  28221.  
  28222. 1. Clear the TE and RE bits in the serial control register (SCSCR1) to 0.
  28223. 2. Clear error flags FER/ERS, PER, and ORER in the serial status register (SCSSR1) to 0.
  28224. 3. Set the GM bit, parity bit (O/(), and baud rate generator select bits (CKS1 and CKS0) in the
  28225. serial mode register (SCSMR1). Clear the CHR and MP bits to 0, and set the STOP and PE
  28226. bits to 1.
  28227. 4. Set the SMIF, SDIR, and SINV bits in the smart card mode register (SCSCMR1).
  28228. When the SMIF bit is set to 1, the TxD pin and RxD pin both go to the high-impedance state.
  28229. 5. Set the value corresponding to the bit rate in the bit rate register (SCBRR1).
  28230. 6. Set the clock source select bits (CKE1 and CKE0) in SCSCR1. Clear the TIE, RIE, TE, RE,
  28231. MPIE, and TEIE bits to 0.
  28232. If the CKE0 bit is set to 1, the clock is output from the SCK pin.
  28233. 7. Wait at least one bit interval, then set the TIE, RIE, TE, and RE bits in SCSCR1. Do not set
  28234. the TE bit and RE bit at the same time, except for self-diagnosis.
  28235.  
  28236. Rev. 2.0, 02/99, page 604 of 830
  28237.  
  28238. ----------------------- Page 619-----------------------
  28239.  
  28240. Initialization
  28241.  
  28242. Clear TE and RE bits
  28243. 1
  28244. in SCSCR1 to 0
  28245.  
  28246. Clear FER/ERS, PER, and
  28247. 2
  28248. ORER flags in SCSCR1 to 0
  28249.  
  28250. In SCSMR1, set parity in O/E bit,
  28251. clock in CKS1 and CKS0 bits, 3
  28252. and set GM
  28253.  
  28254. Set SMIF, SDIR, and SINV bits
  28255. 4
  28256. in SCSCMR1
  28257.  
  28258. Set value in SCBRR1 5
  28259.  
  28260. In SCSCR1, set clock in CKE1
  28261. and CKE0 bits, and clear TIE, 6
  28262. RIE, TE, RE, MPIE, and
  28263. TEIE bits to 0.
  28264.  
  28265. Wait
  28266.  
  28267. No
  28268. 1-bit interval elapsed?
  28269.  
  28270. Yes
  28271.  
  28272. Set TIE, RIE, TE, and RE bits
  28273. 7
  28274. in SCSCR1
  28275.  
  28276. End
  28277.  
  28278. Figure 17.7 Sample Initialization Flowchart
  28279.  
  28280. Rev. 2.0, 02/99, page 605 of 830
  28281.  
  28282. ----------------------- Page 620-----------------------
  28283.  
  28284. Serial Data Transmission: As data transmission in smart card mode involves error signal
  28285. sampling and retransmission processing, the processing procedure is different from that for the
  28286. normal SCI. Figure 17.8 shows a sample transmission processing flowchart.
  28287.  
  28288. 1. Perform smart card interface mode initialization as described in Initialization above.
  28289. 2. Check that the FER/ERS error flag in SCSSR1 is cleared to 0.
  28290. 3. Repeat steps 2 and 3 until it can be confirmed that the TEND flag in SCSSR1 is set to 1.
  28291. 4. Write the transmit data to SCTDR1, clear the TDRE flag to 0, and perform the transmit
  28292. operation. The TEND flag is cleared to 0.
  28293. 5. To continue transmitting data, go back to step 2.
  28294. 6. To end transmission, clear the TE bit to 0.
  28295.  
  28296. With the above processing, interrupt handling is possible.
  28297.  
  28298. If transmission ends and the TEND flag is set to 1 while the TIE bit is set to 1 and interrupt
  28299. requests are enabled, a transmit-data-empty interrupt (TXI) request will be generated. If an error
  28300. occurs in transmission and the ERS flag is set to 1 while the RIE bit is set to 1 and interrupt
  28301. requests are enabled, a transmit/receive-error interrupt (ERI) request will be generated. See
  28302. Interrupt Operation below for details.
  28303.  
  28304. Rev. 2.0, 02/99, page 606 of 830
  28305.  
  28306. ----------------------- Page 621-----------------------
  28307.  
  28308. Start
  28309.  
  28310. Initialization 1
  28311.  
  28312. Start of transmission
  28313.  
  28314. 2
  28315. No
  28316. FER/ERS = 0?
  28317.  
  28318. Yes
  28319. Error handling
  28320.  
  28321. No
  28322. TEND = 1? 3
  28323.  
  28324. Yes
  28325.  
  28326. Write transmit data to SCTDR1,
  28327. and clear TDRE flag 4
  28328. in SCSSR1 to 0
  28329.  
  28330. No
  28331. All data transmitted? 5
  28332.  
  28333. Yes
  28334.  
  28335. No
  28336. FER/ERS = 0?
  28337.  
  28338. Yes
  28339. Error handling
  28340.  
  28341. No
  28342. TEND = 1?
  28343.  
  28344. Yes
  28345.  
  28346. Clear TE bit in SCSCR1 to 0 6
  28347.  
  28348. End of transmission
  28349.  
  28350. Figure 17.8 Sample Transmission Processing Flowchart
  28351.  
  28352. Rev. 2.0, 02/99, page 607 of 830
  28353.  
  28354. ----------------------- Page 622-----------------------
  28355.  
  28356. Serial Data Reception: Data reception in smart card mode uses the same processing procedure
  28357. as for the normal SCI. Figure 17.9 shows a sample reception processing flowchart.
  28358.  
  28359. 1. Perform smart card interface mode initialization as described in Initialization above.
  28360. 2. Check that the ORER flag and PER flag in SCSSR1 are cleared to 0. If either is set, perform
  28361. the appropriate receive error handling, then clear both the ORER and the PER flag to 0.
  28362. 3. Repeat steps 2 and 3 until it can be confirmed that the RDRF flag is set to 1.
  28363. 4. Read the receive data from SCRDR1.
  28364. 5. To continue receiving data, clear the RDRF flag to 0 and go back to step 2.
  28365. 6. To end reception, clear the RE bit to 0.
  28366.  
  28367. With the above processing, interrupt handling is possible.
  28368.  
  28369. If reception ends and the RDRF flag is set to 1 while the RIE bit is set to 1 and interrupt requests
  28370. are enabled, a receive-data-full interrupt (RXI) request will be generated. If an error occurs in
  28371. reception and either the ORER flag or the PER flag is set to 1, a transmit/receive-error interrupt
  28372. (ERI) request will be generated.
  28373.  
  28374. See Interrupt Operation below for details.
  28375.  
  28376. If a parity error occurs during reception and the PER flag is set to 1, the received data is still
  28377. transferred to SCRDR1, and therefore this data can be read.
  28378.  
  28379. Rev. 2.0, 02/99, page 608 of 830
  28380.  
  28381. ----------------------- Page 623-----------------------
  28382.  
  28383. Start
  28384.  
  28385. Initialization 1
  28386.  
  28387. Start of reception
  28388.  
  28389. 2
  28390. No
  28391. ORER = 0 and PER = 0?
  28392.  
  28393. Yes
  28394. Error handling
  28395.  
  28396. No
  28397. RDRF = 1? 3
  28398.  
  28399. Yes
  28400.  
  28401. Read receive data from
  28402. SCRDR1 and clear RDRF flag 4
  28403. in SCSSR1 to 0
  28404.  
  28405. No All data received? 5
  28406.  
  28407. Yes
  28408.  
  28409. Clear RE bit in SCSCR1 to 0 6
  28410.  
  28411. End of reception
  28412.  
  28413. Figure 17.9 Sample Reception Processing Flowchart
  28414.  
  28415. Mode Switching Operation: When switching from receive mode to transmit mode, first
  28416. confirm that the receive operation has been completed, then start from initialization, clearing RE
  28417. to 0 and setting TE to 1. The RDRF flag or the PER and ORER flags can be used to check that
  28418. the receive operation has been completed.
  28419.  
  28420. When switching from transmit mode to receive mode, first confirm that the transmit operation
  28421. has been completed, then start from initialization, clearing TE to 0 and setting RE to 1. The
  28422. TEND flag can be used to check that the transmit operation has been completed.
  28423.  
  28424. Rev. 2.0, 02/99, page 609 of 830
  28425.  
  28426. ----------------------- Page 624-----------------------
  28427.  
  28428. Interrupt Operation: There are three interrupt sources in smart card interface mode, generating
  28429. transmit-data-empty interrupt (TXI) requests, transmit/receive-error interrupt (ERI) requests, and
  28430. receive-data-full interrupt (RXI) requests. The transmit-end interrupt (TEI) request cannot be
  28431. used in this mode.
  28432.  
  28433. When the TEND flag in SCSSR1 is set to 1, a TXI interrupt request is generated.
  28434.  
  28435. When the RDRF flag in SCSSR1 is set to 1, an RXI interrupt request is generated.
  28436.  
  28437. When any of flags ORER, PER, and FER/ERS in SCSSR1 is set to 1, an ERI interrupt request is
  28438. generated. The relationship between the operating states and interrupt sources is shown in table
  28439. 17.9.
  28440.  
  28441. Table 17.9 Smart Card Mode Operating States and Interrupt Sources
  28442.  
  28443. Operating State Flag Mask Bit Interrupt Source
  28444.  
  28445. Transmit mode Normal operation TEND TIE TXI
  28446.  
  28447. Error FER/ERS RIE ERI
  28448.  
  28449. Receive mode Normal operation RDRF RIE RXI
  28450.  
  28451. Error PER, ORER RIE ERI
  28452.  
  28453. Data Transfer Operation by DMAC: In smart card mode, as with the normal SCI, transfer can
  28454. be carried out using the DMAC. In a transmit operation, when the TEND flag in SCSSR1 is set
  28455. to 1, a TXI interrupt is requested. If the TXI request is designated beforehand as a DMAC
  28456. activation source, the DMAC will be activated by the TXI request, and transfer of the transmit
  28457. data will be carried out. The TEND flag is automatically cleared to 0 when data transfer is
  28458. performed by the DMAC. In the event of an error, the SCI retransmits the same data
  28459. automatically. The TEND flag remains cleared to 0 during this time, and the DMAC is not
  28460. activated. Thus, the number of bytes specified by the SCI and DMAC are transmitted
  28461. automatically, including retransmission following an error. However, the ERS flag is not cleared
  28462. automatically when an error occurs, and therefore the RIE bit should be set to 1 beforehand so
  28463. that an ERI request will be generated in the event of an error, and the ERS flag will be cleared.
  28464.  
  28465. In a receive operation, an RXI interrupt request is generated when the RDRF flag in SCSSR1 is
  28466. set to 1. If the RXI request is designated beforehand as a DMAC activation source, the DMAC
  28467. will be activated by the RXI request, and transfer of the receive data will be carried out.. The
  28468. RDRF flag is cleared to 0 automatically when data transfer is performed by the DMAC. If an
  28469. error occurs, an error flag is set but the RDRF flag is not. The DMAC is not activated, but
  28470. instead, an ERI interrupt request is sent to the CPU. The error flag must therefore be cleared.
  28471.  
  28472. When performing data transfer using the DMAC, it is essential to set and enable the DMAC
  28473. before carrying out SCI settings. For details of the DMAC setting procedures, see section 14,
  28474. Direct Memory Access Controller (DMAC).
  28475.  
  28476. Rev. 2.0, 02/99, page 610 of 830
  28477.  
  28478. ----------------------- Page 625-----------------------
  28479.  
  28480. 17.4 Usage Notes
  28481.  
  28482. The following points should be noted when using the SCI as a smart card interface.
  28483.  
  28484. (1) Receive Data Sampling Timing and Receive Margin
  28485.  
  28486. In asynchronous mode, the SCI operates on a base clock with a frequency of 372 times the
  28487. transfer rate. In reception, the SCI synchronizes internally with the fall of the start bit, which it
  28488. samples on the base clock. Receive data is latched at the rising edge of the 186th base clock
  28489. pulse. The timing is shown in figure 17.10.
  28490.  
  28491. 372 clocks
  28492.  
  28493. 186 clocks
  28494.  
  28495. 0 185 371 0 185 371 0
  28496. Base clock
  28497.  
  28498. Start
  28499. Receive data
  28500. bit D0 D1
  28501. (RxD)
  28502.  
  28503. Synchronization
  28504. sampling timing
  28505.  
  28506. Data sampling
  28507. timing
  28508.  
  28509. Figure 17.10 Receive Data Sampling Timing in Smart Card Mode
  28510.  
  28511. The receive margin in smart card mode can therefore be expressed as shown in the following
  28512. equation.
  28513.  
  28514. 1 | D – 0.5 |
  28515. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100%
  28516. 2N N
  28517.  
  28518. M: Receive margin (%)
  28519. N: Ratio of clock frequency to bit rate (N = 372)
  28520. D: Clock duty cycle (D = 0 to 1.0)
  28521. L: Frame length (L =10)
  28522. F: Absolute deviation of clock frequency
  28523.  
  28524. Rev. 2.0, 02/99, page 611 of 830
  28525.  
  28526. ----------------------- Page 626-----------------------
  28527.  
  28528. From the above equation, if F = 0 and D = 0.5, the receive margin is 49.866%, as given by the
  28529. following equation.
  28530.  
  28531. When D = 0.5 and F = 0:
  28532.  
  28533. M = (0.5 – 1/2 × 372) × 100% = 49.866%
  28534.  
  28535. (2) Retransfer Operations
  28536.  
  28537. Retransfer operations are performed by the SCI in receive mode and transmit mode as described
  28538. below.
  28539.  
  28540. Retransfer Operation when SCI is in Receive Mode: Figure 17.11 illustrates the retransfer
  28541. operation when the SCI is in receive mode.
  28542.  
  28543. 1. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is
  28544. automatically set to 1. If the RIE bit in SCSCR1 is enabled at this time, an ERI interrupt
  28545. request is generated. The PER bit in SCSSR1 should be cleared to 0 before the next parity bit
  28546. is sampled.
  28547. 2. The RDRF bit in SCSSR1 is not set for a frame in which an error has occurred.
  28548. 3. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is not set
  28549. to 1.
  28550. 4. If no error is found when the received parity bit is checked, the receive operation is judged to
  28551. have been completed normally, and the RDRF bit in SCSSR1 is automatically set to 1. If the
  28552. RIE bit in SCSCR1 is enabled at this time, an RXI interrupt request is generated.
  28553. 5. When a normal frame is received, the pin retains the high-impedance state at the timing for
  28554. error signal transmission.
  28555.  
  28556. nth transfer frame Retransferred frame Transfer frame n+1
  28557.  
  28558. (DE)
  28559. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp DE Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp Ds D0 D1 D2 D3 D4
  28560. 5
  28561.  
  28562. RDRF
  28563.  
  28564. 2 4
  28565. PER
  28566.  
  28567. 1 3
  28568.  
  28569. Figure 17.11 Retransfer Operation in SCI Receive Mode
  28570.  
  28571. Rev. 2.0, 02/99, page 612 of 830
  28572.  
  28573. ----------------------- Page 627-----------------------
  28574.  
  28575. Retransfer Operation when SCI is in Transmit Mode: Figure 17.12 illustrates the retransfer
  28576. operation when the SCI is in transmit mode.
  28577.  
  28578. 1. If an error signal is sent back from the receiving side after transmission of one frame is
  28579. completed, the FER/ERS bit in SCSSR1 is set to 1. If the RIE bit in SCSCR1 is enabled at
  28580. this time, an ERI interrupt request is generated. The FER/ERS bit in SCSSR1 should be
  28581. cleared to 0 before the next parity bit is sampled.
  28582. 2. The TEND bit in SCSSR1 is not set for a frame for which an error signal indicating an error
  28583. is received.
  28584. 3. If an error signal is not sent back from the receiving side, the FER/ERS bit in SCSSR1 is not
  28585. set.
  28586. 4. If an error signal is not sent back from the receiving side, transmission of one frame,
  28587. including a retransfer, is judged to have been completed, and the TEND bit in SCSSR1 is set
  28588. to 1. If the TIE bit in SCSCR1 is enabled at this time, a TXI interrupt request is generated.
  28589.  
  28590. Figure 17.12 Retransfer Operation in SCI Transmit Mode
  28591.  
  28592. Rev. 2.0, 02/99, page 613 of 830
  28593.  
  28594. ----------------------- Page 628-----------------------
  28595.  
  28596. (3) Standby Mode and Clock
  28597.  
  28598. When switching between smart card interface mode and standby mode, the following procedures
  28599. should be used to maintain the clock duty cycle.
  28600.  
  28601. Switching from Smart Card Interface Mode to Standby Mode:
  28602. 1. Set the SBP1IO and SBP1DT bits in SCSPTR1 to the values for the fixed output state in
  28603. standby mode.
  28604. 2. Write 0 to the TE and RE bits in the serial control register (SCSCR1) to stop transmit/receive
  28605. operations. At the same time, set the CKE1 bit to the value for the fixed output state in
  28606. standby mode.
  28607. 3. Write 0 to the CKE0 bit in SCSCR1 to stop the clock.
  28608. 4. Wait for one serial clock cycle. During this period, the duty cycle is preserved and clock
  28609. output is fixed at the specified level.
  28610. 5. Write H'00 to the serial mode register (SCSMR1) and smart card mode register (SCSMR1).
  28611. 6. Make the transition to the standby state.
  28612.  
  28613. Returning from Standby Mode to Smart Card Interface Mode:
  28614. 7. Clear the standby state.
  28615. 8. Set the CKE1 bit in SCSCR1 to the value for the fixed output state at the start of standby (the
  28616. current SCK pin state).
  28617. 9. Set smart card interface mode and output the clock. Clock signal generation is started with
  28618. the normal duty cycle.
  28619.  
  28620. Normal operation Standby mode Normal operation
  28621.  
  28622. 1 2 3 4 5 6 7 8 9
  28623.  
  28624. Figure 17.13 Procedure for Stopping and Restarting the Clock
  28625.  
  28626. Rev. 2.0, 02/99, page 614 of 830
  28627.  
  28628. ----------------------- Page 629-----------------------
  28629.  
  28630. (4) Power-On and Clock
  28631.  
  28632. The following procedure should be used to secure the clock duty cycle after powering on.
  28633.  
  28634. 1. The initial state is port input and high impedance. Use pull-up or pull-down resistors to fix
  28635. the potential.
  28636. 2. Fix at the output specified by the CKE1 bit in the serial control register (SCSCR1).
  28637. 3. Set the serial mode register (SCSMR1) and smart card mode register (SCSCMR1), and
  28638. switch to smart card mode operation.
  28639. 4. Set the CKE0 bit in SCSCR1 to 1 to start clock output.
  28640.  
  28641. Rev. 2.0, 02/99, page 615 of 830
  28642.  
  28643. ----------------------- Page 630-----------------------
  28644.  
  28645. Rev. 2.0, 02/99, page 616 of 830
  28646.  
  28647. ----------------------- Page 631-----------------------
  28648.  
  28649. Section 18 I/O Ports
  28650.  
  28651. 18.1 Overview
  28652.  
  28653. The SH7750 has a 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port.
  28654.  
  28655. 18.1.1 Features
  28656.  
  28657. The features of the general-purpose I/O port are as follows:
  28658.  
  28659. • 20-bit I/O port with input/output direction independently specifiable for each bit
  28660. • Pull-up can be specified independently for each bit.
  28661. • Interrupt input is possible for 16 of the 20 I/O port bits.
  28662. • Use or non-use of the I/O port can be selected with the PORTEN bit in bus control register 2
  28663. (BCR2).
  28664.  
  28665. The features of the SCI I/O port are as follows:
  28666.  
  28667. • Data can be output when the I/O port is designated for output and SCI enabling has not been
  28668. set. This allows break function transmission.
  28669. • The RxD pin value can be read at all times, allowing break state detection.
  28670. • SCK pin control is possible when the I/O port is designated for output and SCI enabling has
  28671. not been set.
  28672. • The SCK pin value can be read at all times.
  28673.  
  28674. The features of the SCIF I/O port are as follows:
  28675.  
  28676. • Data can be output when the I/O port is designated for output and SCIF enabling has not
  28677. been set. This allows break function transmission.
  28678. • The RxD2 pin value can be read at all times, allowing break state detection.
  28679. • &76 and 576 pin control is possible when the I/O port is designated for output and SCIF
  28680. enabling has not been set.
  28681. • The &76 and 576 pin values can be read at all times.
  28682.  
  28683. Rev. 2.0, 02/99, page 617 of 830
  28684.  
  28685. ----------------------- Page 632-----------------------
  28686.  
  28687. 18.1.2 Block Diagrams
  28688.  
  28689. Figure 18.1 shows a block diagram of the 16-bit general-purpose I/O port.
  28690.  
  28691. PBnPUP
  28692. PORTEN Pull-up resistor
  28693.  
  28694. Internal bus
  28695. 0 Port 15 (input/
  28696. Dn output data X output)/D47
  28697. P to
  28698. D Q 1 M Port 0 (input/
  28699.  
  28700. PDTRW C output)/D32
  28701.  
  28702. BCK
  28703.  
  28704. 0
  28705. DnDIR
  28706. X
  28707. P
  28708. 1 M
  28709. PBnIO
  28710.  
  28711. 0 Data input strobe
  28712. X
  28713. P
  28714. 1
  28715. M C
  28716. Q
  28717. D
  28718.  
  28719. Interrupt PTIRENn BCK
  28720. controller Dn input data
  28721.  
  28722. PORTEN 0: Port not available 1: Port available
  28723. PBnPuP 0: Pull-up 1: Pull-up off
  28724. DnDIR 0: Input 1: Output
  28725. PBnIO 0: Input 1: Output
  28726. PTIRENn 0: Interrupt input disabled 1: Interrupt input enabled
  28727.  
  28728. Figure 18.1 16-Bit Port
  28729.  
  28730. Rev. 2.0, 02/99, page 618 of 830
  28731.  
  28732. ----------------------- Page 633-----------------------
  28733.  
  28734. Figure 18.2 shows a block diagram of the 4-bit general-purpose I/O port.
  28735.  
  28736. PBnPUP
  28737. Pull-up resistor
  28738. PORTEN
  28739.  
  28740. Internal bus
  28741. 0 Port 19 (input/
  28742. Dn output data X output)/D51
  28743. P to
  28744. D Q 1 M Port 16 (input/
  28745.  
  28746. PDTRW C output)/D48
  28747.  
  28748. BCK
  28749.  
  28750. 0
  28751. DnDIR
  28752. X
  28753. P
  28754. 1 M
  28755. PBnIO
  28756.  
  28757. 0 Data input strobe
  28758.  
  28759. X
  28760. P
  28761. M 1 C
  28762. Q D
  28763.  
  28764. BCK
  28765. Dn input data
  28766.  
  28767. PORTEN 0: Port not available 1: Port available
  28768. PBnPuP 0: Pull-up 1: Pull-up off
  28769. DnDIR 0: Input 1: Output
  28770. PBnIO 0: Input 1: Output
  28771.  
  28772. Figure 18.2 4-Bit Port
  28773.  
  28774. Rev. 2.0, 02/99, page 619 of 830
  28775.  
  28776. ----------------------- Page 634-----------------------
  28777.  
  28778. SCI I/O port block diagrams are shown in figures 18.3 to 18.5.
  28779.  
  28780. Reset
  28781.  
  28782. R
  28783. Q D
  28784. SPB1IO
  28785. C
  28786.  
  28787. Internal data bus
  28788. SPTRW
  28789.  
  28790. Reset
  28791.  
  28792. MD0/SCK
  28793. R
  28794. Q D
  28795.  
  28796. SPB1DT
  28797. C SCI
  28798.  
  28799. SPTRW Clock output enable signal
  28800.  
  28801. Mode setting Serial clock output signal *
  28802. register
  28803. Serial clock input signal
  28804.  
  28805. Clock input enable signal
  28806.  
  28807. SPTRR
  28808.  
  28809. SPTRW: Write to SPTR
  28810. SPTRR: Read SPTR
  28811.  
  28812. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  28813. the CKE0 and CKE1 bits in SCSCR1 and the C/A bit in SCSMR1.
  28814.  
  28815. Figure 18.3 MD0/SCK Pin
  28816.  
  28817. Rev. 2.0, 02/99, page 620 of 830
  28818.  
  28819. ----------------------- Page 635-----------------------
  28820.  
  28821. Reset
  28822.  
  28823. R
  28824. Q D
  28825. SPB0IO
  28826. C Internal data bus
  28827.  
  28828. SPTRW
  28829.  
  28830. Reset
  28831. MD7/TxD
  28832. R
  28833. Q D
  28834. SPB0DT
  28835. C SCI
  28836.  
  28837. SPTRW Transmit enable signal
  28838.  
  28839. Mode setting register
  28840.  
  28841. Serial transmit data
  28842.  
  28843. SPTRW: Write to SPTR
  28844.  
  28845. Figure 18.4 MD7/TxD Pin
  28846.  
  28847. SCI
  28848. RxD
  28849.  
  28850. Serial receive data
  28851.  
  28852. Internal data bus
  28853.  
  28854. SPTRR
  28855.  
  28856. SPTRR: Read SPTR
  28857.  
  28858. Figure 18.5 RxD Pin
  28859.  
  28860. Rev. 2.0, 02/99, page 621 of 830
  28861.  
  28862. ----------------------- Page 636-----------------------
  28863.  
  28864. SCIF I/O port block diagrams are shown in figures 18.6 to 18.9.
  28865.  
  28866. Reset
  28867.  
  28868. R
  28869. Q D
  28870. SPB2IO
  28871. C Internal data bus
  28872.  
  28873. SPTRW
  28874.  
  28875. Reset
  28876. MD1/TxD2
  28877. R
  28878. Q D
  28879. SPB2DT
  28880. C SCIF
  28881.  
  28882. Transmit enable
  28883. SPTRW
  28884. signal
  28885.  
  28886. Mode setting
  28887. register Serial transmit data
  28888.  
  28889. SPTRW: Write to SPTR
  28890.  
  28891. Figure 18.6 MD1/TxD2 Pin
  28892.  
  28893. SCIF
  28894. MD2/RxD2
  28895.  
  28896. Serial receive
  28897. Mode setting data
  28898. register
  28899.  
  28900. Internal data bus
  28901.  
  28902.  
  28903. SPTRR
  28904.  
  28905. SPTRR: Read SPTR
  28906.  
  28907. Figure 18.7 MD2/RxD2 Pin
  28908.  
  28909. Rev. 2.0, 02/99, page 622 of 830
  28910.  
  28911. ----------------------- Page 637-----------------------
  28912.  
  28913. Reset
  28914. R
  28915.  
  28916. Q D
  28917. CTSIO
  28918. C Internal data bus
  28919.  
  28920. SPTRW
  28921.  
  28922. Reset
  28923. CTS2
  28924. R
  28925.  
  28926. Q D
  28927. CTSDT
  28928. C SCIF
  28929.  
  28930. SPTRW
  28931.  
  28932. CTS2 signal
  28933.  
  28934. Modem control enable
  28935. signal*
  28936.  
  28937. SPTRR
  28938.  
  28939. SPTRW: Write to SPTR
  28940. SPTRR: Read SPTR
  28941.  
  28942. Note: * MCE bit in SCFCR2: signal that designates modem control as the CTS2 pin function.
  28943.  
  28944. Figure 18.8 &76 Pin
  28945. &76
  28946.  
  28947. Reset
  28948.  
  28949. R
  28950. Q D
  28951. RTSIO
  28952. C Internal data bus
  28953.  
  28954. SPTRW
  28955.  
  28956. Reset
  28957. MD8/RTS2
  28958. R
  28959. Q D
  28960. RTSDT
  28961. C SCIF
  28962.  
  28963. Modem control
  28964. SPTRW
  28965. enable signal*
  28966.  
  28967. Mode setting
  28968. register RTS2 signal
  28969.  
  28970. SPTRR
  28971.  
  28972. SPTRW: Write to SPTR
  28973. SPTRR: Read SPTR
  28974.  
  28975. Note: * MCE bit in SCFCR2: signal that designates modem control as the RTS2 pin function.
  28976.  
  28977. Figure 18.9 MD8/576 Pin
  28978. 576
  28979.  
  28980. Rev. 2.0, 02/99, page 623 of 830
  28981.  
  28982. ----------------------- Page 638-----------------------
  28983.  
  28984. 18.1.3 Pin Configuration
  28985.  
  28986. Table 18.1 shows the 20-bit general-purpose I/O port pin configuration.
  28987.  
  28988. Table 18.1 20-Bit General-Purpose I/O Port Pins
  28989.  
  28990. Pin Name Signal I/O Function
  28991.  
  28992. Port 19 pin PORT19 I/O I/O port
  28993.  
  28994. Port 18 pin PORT18 I/O I/O port
  28995.  
  28996. Port 17 pin PORT17 I/O I/O port
  28997.  
  28998. Port 16 pin PORT16 I/O I/O port
  28999.  
  29000. Port 15 pin PORT15 I/O* I/O port / GPIO interrupt
  29001.  
  29002. Port 14 pin PORT14 I/O* I/O port / GPIO interrupt
  29003.  
  29004. Port 13 pin PORT13 I/O* I/O port / GPIO interrupt
  29005.  
  29006. Port 12 pin PORT12 I/O* I/O port / GPIO interrupt
  29007.  
  29008. Port 11 pin PORT11 I/O* I/O port / GPIO interrupt
  29009.  
  29010. Port 10 pin PORT10 I/O* I/O port / GPIO interrupt
  29011.  
  29012. Port 9 pin PORT9 I/O* I/O port / GPIO interrupt
  29013.  
  29014. Port 8 pin PORT8 I/O* I/O port / GPIO interrupt
  29015.  
  29016. Port 7 pin PORT7 I/O* I/O port / GPIO interrupt
  29017.  
  29018. Port 6 pin PORT6 I/O* I/O port / GPIO interrupt
  29019.  
  29020. Port 5 pin PORT5 I/O* I/O port / GPIO interrupt
  29021.  
  29022. Port 4 pin PORT4 I/O* I/O port / GPIO interrupt
  29023.  
  29024. Port 3 pin PORT3 I/O* I/O port / GPIO interrupt
  29025.  
  29026. Port 2 pin PORT2 I/O* I/O port / GPIO interrupt
  29027.  
  29028. Port 1 pin PORT1 I/O* I/O port / GPIO interrupt
  29029.  
  29030. Port 0 pin PORT0 I/O* I/O port / GPIO interrupt
  29031.  
  29032. Note: * When port pins are used as GPIO interrupts, they must be set to input mode. The input
  29033. setting can be made in the PCTRA register.
  29034.  
  29035. Rev. 2.0, 02/99, page 624 of 830
  29036.  
  29037. ----------------------- Page 639-----------------------
  29038.  
  29039. Table 18.2 shows the SCI I/O port pin configuration.
  29040.  
  29041. Table 18.2 SCI I/O Port Pins
  29042.  
  29043. Pin Name Abbreviation I/O Function
  29044.  
  29045. Serial clock pin MD0/SCK I/O Clock input/output
  29046.  
  29047. Receive data pin RxD Input Receive data input
  29048.  
  29049. Transmit data pin MD7/TxD Output Transmit data output
  29050.  
  29051. Note: Pins MD0/SCK and MD7/TxD function as mode input pins MD0 and MD7 after a power-on
  29052. reset. They are made to function as serial pins by performing SCI operation settings with
  29053. the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/$ bit in SCSMR1. Break state
  29054. transmission and detection can be performed by means of a setting in the SCI’s SCSPTR1
  29055. register.
  29056.  
  29057. Table 18.3 shows the SCIF I/O port pin configuration.
  29058.  
  29059. Table 18.3 SCIF I/O Port Pins
  29060.  
  29061. Pin Name Abbreviation I/O Function
  29062.  
  29063. Serial clock pin MRESET/SCK2 Input Clock input
  29064.  
  29065. Receive data pin MD2/RxD2 Input Receive data input
  29066.  
  29067. Transmit data pin MD1/TxD2 Output Transmit data output
  29068.  
  29069. Modem control pin &76 I/O Transmission enabled
  29070.  
  29071. Modem control pin MD8/576 I/O Transmission request
  29072.  
  29073. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset
  29074. is executed. The MD1/TxD2, MD2/RxD2, and MD8/576 pins function as the MD1, MD2,
  29075. and MD8 mode input pins after a power-on reset. These pins are made to function as
  29076. serial pins by performing SCIF operation settings with the TE and RE bits in SCSCR2 and
  29077. the MCE bit in SCFCR2. Break state transmission and detection can be set in the SCIF’s
  29078. SCSPTR2 register.
  29079.  
  29080. Rev. 2.0, 02/99, page 625 of 830
  29081.  
  29082. ----------------------- Page 640-----------------------
  29083.  
  29084. 18.1.4 Register Configuration
  29085.  
  29086. The 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port have seven registers, as
  29087. shown in table 18.4.
  29088.  
  29089. Table 18.4 I/O Port Registers
  29090.  
  29091. Area 7 Access
  29092. Name Abbreviation R/W Initial Value* P4 Address Address Size
  29093.  
  29094. Port control register A PCTRA R/W H'00000000 H'FF80002C H'1F80002C 32
  29095.  
  29096. Port data register A PDTRA R/W Undefined H'FF800030 H'1F800030 16
  29097.  
  29098. Port control register B PCTRB R/W H'00000000 H'FF800040 H'1F800040 32
  29099.  
  29100. Port data register B PDTRB R/W Undefined H'FF800044 H'1F800044 16
  29101.  
  29102. GPIO interrupt control GPIOIC R/W H'00000000 H'FF800048 H'1F800048 16
  29103. register
  29104.  
  29105. Serial port register SCSPTR1 R/W Undefined H'FFE0001C H'1FE0001C 8
  29106.  
  29107. Serial port register SCSPTR2 R/W Undefined H'FFE80020 H'1FE80020 16
  29108.  
  29109. Note: * Initialized by a power-on reset.
  29110.  
  29111. Rev. 2.0, 02/99, page 626 of 830
  29112.  
  29113. ----------------------- Page 641-----------------------
  29114.  
  29115. 18.2 Register Descriptions
  29116.  
  29117. 18.2.1 Port Control Register A (PCTRA)
  29118.  
  29119. Port control register A (PCTRA) is a 32-bit readable/writable register that controls the
  29120. input/output direction and pull-up for each bit in the 16-bit port (port 15 pin to port 0 pin). As
  29121. the initial value of port data register A (PDTRA) is undefined, all the bits in the 16-bit port
  29122. should be set to output with PCTRA after writing a value to the PDTRA register.
  29123.  
  29124. PCTRA is initialized to H'00000000 by a power-on reset. It is not initialized by a manual reset
  29125. or in standby mode, and retains its contents.
  29126.  
  29127. Bit: 31 30 29 28 27 26 25 24
  29128.  
  29129. PB15PUP PB15IO PB14PUP PB14IO PB13PUP PB13IO PB12PUP PB12IO
  29130.  
  29131. Initial value: 0 0 0 0 0 0 0 0
  29132.  
  29133. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29134.  
  29135. Bit: 23 22 21 20 19 18 17 16
  29136.  
  29137. PB11PUP PB11IO PB10PUP PB10IO PB9PUP PB9IO PB8PUP PB8IO
  29138.  
  29139. Initial value: 0 0 0 0 0 0 0 0
  29140.  
  29141. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29142.  
  29143. Bit: 15 14 13 12 11 10 9 8
  29144.  
  29145. PB7PUP PB7IO PB6PUP PB6IO PB5PUP PB5IO PB4PUP PB4IO
  29146.  
  29147. Initial value: 0 0 0 0 0 0 0 0
  29148.  
  29149. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29150.  
  29151. Bit: 7 6 5 4 3 2 1 0
  29152.  
  29153. PB3PUP PB3IO PB2PUP PB2IO PB1PUP PB1IO PB0PUP PB0IO
  29154.  
  29155. Initial value: 0 0 0 0 0 0 0 0
  29156.  
  29157. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29158.  
  29159. Rev. 2.0, 02/99, page 627 of 830
  29160.  
  29161. ----------------------- Page 642-----------------------
  29162.  
  29163. Bit 2n + 1 (n = 0–15)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the 16-
  29164. bit port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a port
  29165. pin set to output by bit PBnIO.
  29166.  
  29167. Bit 2n + 1: PBnPUP Description
  29168.  
  29169. 0 Bit m (m = 0–15) of 16-bit port is pulled up (Initial value)
  29170.  
  29171. 1 Bit m (m = 0–15) of 16-bit port is not pulled up
  29172.  
  29173. Bit 2n (n = 0–15)—Port I/O Control (PBnIO): Specifies whether each bit in the 16-bit port is
  29174. an input or an output.
  29175.  
  29176. Bit 2n: PBnIO Description
  29177.  
  29178. 0 Bit m (m = 0–15) of 16-bit port is an input (Initial value)
  29179.  
  29180. 1 Bit m (m = 0–15) of 16-bit port is an output
  29181.  
  29182. 18.2.2 Port Data Register A (PDTRA)
  29183.  
  29184. Port data register A (PDTRA) is a 16-bit readable/writable register used as a data latch for each
  29185. bit in the 16-bit port. When a bit is set as an output, the value written to the PDTRA register is
  29186. output from the external pin. When a value is read from the PDTRA register while a bit is set as
  29187. an input, the external pin value sampled on the external bus clock is read. When a bit is set as an
  29188. output, the value written to the PDTRA register is read.
  29189.  
  29190. PDTR is not initialized by a power-on or manual reset, or in standby mode, and retains its
  29191. contents.
  29192.  
  29193. Bit: 15 14 13 12 11 10 9 8
  29194.  
  29195. PB15DT PB14DT PB13DT PB12DT PB11DT PB10DT PB9DT PB8DT
  29196.  
  29197. Initial value: — — — — — — — —
  29198.  
  29199. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29200.  
  29201. Bit: 7 6 5 4 3 2 1 0
  29202.  
  29203. PB7DT PB6DT PB5DT PB4DT PB3DT PB2DT PB1DT PB0DT
  29204.  
  29205. Initial value: — — — — — — — —
  29206.  
  29207. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29208.  
  29209. Rev. 2.0, 02/99, page 628 of 830
  29210.  
  29211. ----------------------- Page 643-----------------------
  29212.  
  29213. 18.2.3 Port Control Register B (PCTRB)
  29214.  
  29215. Port control register B (PCTRB) is a 32-bit readable/writable register that controls the
  29216. input/output direction and pull-up for each bit in the 4-bit port (port 19 pin to port 16 pin). As
  29217. the initial value of port data register B (PDTRB) is undefined, each bit in the 4-bit port should be
  29218. set to output with PCTRB after writing a value to the PDTRB register.
  29219.  
  29220. PCTRB is initialized to H'00000000 by a power-on reset. It is not initialized by a manual reset
  29221. or in standby mode, and retains its contents.
  29222.  
  29223. Bit: 31 30 29 28 27 26 25 24
  29224.  
  29225. — — — — — — — —
  29226.  
  29227. Initial value: 0 0 0 0 0 0 0 0
  29228.  
  29229. R/W: R R R R R R R R
  29230.  
  29231. Bit: 23 22 21 20 19 18 17 16
  29232.  
  29233. — — — — — — — —
  29234.  
  29235. Initial value: 0 0 0 0 0 0 0 0
  29236.  
  29237. R/W: R R R R R R R R
  29238.  
  29239. Bit: 15 14 13 12 11 10 9 8
  29240.  
  29241. — — — — — — — —
  29242.  
  29243. Initial value: 0 0 0 0 0 0 0 0
  29244.  
  29245. R/W: R R R R R R R R
  29246.  
  29247. Bit: 7 6 5 4 3 2 1 0
  29248.  
  29249. PB19PUP PB19IO PB18PUP PB18IO PB17PUP PB17IO PB16PUP PB16IO
  29250.  
  29251. Initial value: 0 0 0 0 0 0 0 0
  29252.  
  29253. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29254.  
  29255. Bit 2n + 1 (n = 0–3)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the 4-bit
  29256. port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a port pin
  29257. set to output by bit PBnIO.
  29258.  
  29259. Bit 2n + 1: PBnPUP Description
  29260.  
  29261. 0 Bit m (m = 16–19) of 4-bit port is pulled up (Initial value)
  29262.  
  29263. 1 Bit m (m = 16–19) of 4-bit port is not pulled up
  29264.  
  29265. Rev. 2.0, 02/99, page 629 of 830
  29266.  
  29267. ----------------------- Page 644-----------------------
  29268.  
  29269. Bit 2n (n = 0–3)—Port I/O Control (PBnIO): Specifies whether each bit in the 4-bit port is an
  29270. input or an output.
  29271.  
  29272. Bit 2n: PBnIO Description
  29273.  
  29274. 0 Bit m (m = 16–19) of 4-bit port is an input (Initial value)
  29275.  
  29276. 1 Bit m (m = 16–19) of 4-bit port is an output
  29277.  
  29278. 18.2.4 Port Data Register B (PDTRB)
  29279.  
  29280. Port data register B (PDTRB) is a 16-bit readable/writable register used as a data latch for each
  29281. bit in the 4-bit port. When a bit is set as an output, the value written to the PDTRB register is
  29282. output from the external pin. When a value is read from the PDTRB register while a bit is set as
  29283. an input, the external pin value sampled on the external bus clock is read. When a bit is set as an
  29284. output, the value written to the PDTRB register is read.
  29285.  
  29286. PDTRB is not initialized by a power-on or manual reset, or in standby mode, and retains its
  29287. contents.
  29288.  
  29289. Bit: 15 14 13 12 11 10 9 8
  29290.  
  29291. — — — — — — — —
  29292.  
  29293. Initial value: 0 0 0 0 0 0 0 0
  29294.  
  29295. R/W: R R R R R R R R
  29296.  
  29297. Bit: 7 6 5 4 3 2 1 0
  29298.  
  29299. — — — — PB19DT PB18DT PB17DT PB16DT
  29300.  
  29301. Initial value: 0 0 0 0 — — — —
  29302.  
  29303. R/W: R R R R R/W R/W R/W R/W
  29304.  
  29305. Rev. 2.0, 02/99, page 630 of 830
  29306.  
  29307. ----------------------- Page 645-----------------------
  29308.  
  29309. 18.2.5 GPIO Interrupt Control Register (GPIOIC)
  29310.  
  29311. The GPIO interrupt control register (GPIOIC) is a 16-bit readable/writable register that performs
  29312. 16-bit interrupt input control.
  29313.  
  29314. GPIOIC is initialized to H'0000 by a power-on reset. It is not initialized by a manual reset or in
  29315. standby mode, and retains its contents.
  29316.  
  29317. GPIO interrupts are active-low level interrupts. Bit-by-bit masking is possible, and the OR of all
  29318. the bits set as GPIO interrupts is used for interrupt detection. Which bits interrupts are input to
  29319. can be identified by reading the PDTRA register.
  29320.  
  29321. Bit: 15 14 13 12 11 10 9 8
  29322.  
  29323. PTIREN15 PTIREN14 PTIREN13 PTIREN12 PTIREN11 PTIREN10 PTIREN9 PTIREN8
  29324.  
  29325. Initial value: 0 0 0 0 0 0 0 0
  29326.  
  29327. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29328.  
  29329. Bit: 7 6 5 4 3 2 1 0
  29330.  
  29331. PTIREN7 PTIREN6 PTIREN5 PTIREN4 PTIREN3 PTIREN2 PTIREN1 PTIREN0
  29332.  
  29333. Initial value: 0 0 0 0 0 0 0 0
  29334.  
  29335. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29336.  
  29337. Bit n (n = 0–15)—Port Interrupt Enable (PTIRENn): Specifies whether interrupt input is
  29338. performed for each bit.
  29339.  
  29340. Bit n: PTIRENn Description
  29341.  
  29342. 0 Port m (m = 0–15) of 16-bit port is used as a normal I/O port (Initial
  29343. value)
  29344.  
  29345. 1 Port m (m = 0–15) of 16-bit port is used as a GPIO interrupt*
  29346.  
  29347. Note: * When using an interrupt, set the corresponding port to input in the PCTRA register before
  29348. making the PTIRENn setting.
  29349.  
  29350. Rev. 2.0, 02/99, page 631 of 830
  29351.  
  29352. ----------------------- Page 646-----------------------
  29353.  
  29354. 18.2.6 Serial Port Register (SCSPTR1)
  29355.  
  29356. Bit: 7 6 5 4 3 2 1 0
  29357.  
  29358. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  29359.  
  29360. Initial value: 0 0 0 0 0 — 0 —
  29361.  
  29362. R/W: R/W — — — R/W R/W R/W R/W
  29363.  
  29364. The serial port register (SCSPTR1) is an 8-bit readable/writable register that controls
  29365. input/output and data for the port pins multiplexed with the serial communication interface (SCI)
  29366. pins. Input data can be read from the RxD pin, output data written to the TxD pin, and breaks in
  29367. serial transmission/reception controlled, by means of bits 1 and 0. SCK pin data reading and
  29368. output data writing can be performed by means of bits 3 and 2. Bit 7 controls enabling and
  29369. disabling of the RXI interrupt.
  29370.  
  29371. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2 and
  29372. 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is undefined.
  29373. SCSPTR1 is not initialized in the module standby state or standby mode.
  29374.  
  29375. Bit 7—Error Interrupt Only (EIO): See section 15.2.8, Serial Port Register (SCSPTR1).
  29376.  
  29377. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  29378.  
  29379. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin input/output. When
  29380. the SCK pin is actually set as a port output pin and outputs the value set by the SPB1DT bit, the
  29381. C/$ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be cleared to 0.
  29382.  
  29383. Bit 3: SPB1IO Description
  29384.  
  29385. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  29386.  
  29387. 1 SPB1DT bit value is output to the SCK pin
  29388.  
  29389. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin input/output
  29390. data. Input or output is specified by the SPB1IO bit (see the description of bit 3, SPB1IO, for
  29391. details). When output is specified, the value of the SPB1DT bit is output to the SCK pin. The
  29392. SCK pin value is read from the SPB1DT bit regardless of the value of the SPB1IO bit. The
  29393. initial value of this bit after a power-on reset or manual reset is undefined.
  29394.  
  29395. Bit 2: SPB1DT Description
  29396.  
  29397. 0 Input/output data is low-level
  29398.  
  29399. 1 Input/output data is high-level
  29400.  
  29401. Rev. 2.0, 02/99, page 632 of 830
  29402.  
  29403. ----------------------- Page 647-----------------------
  29404.  
  29405. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output condition.
  29406. When the TxD pin is actually set as a port output pin and outputs the value set by the SPB0DT
  29407. bit, the TE bit in SCSCR1 should be cleared to 0.
  29408.  
  29409. Bit 1: SPB0IO Description
  29410.  
  29411. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  29412.  
  29413. 1 SPB0DT bit value is output to the TxD pin
  29414.  
  29415. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data and
  29416. TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  29417. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the
  29418. value of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the SPB0DT
  29419. bit regardless of the value of the SPB0IO bit. The initial value of this bit after a power-on reset
  29420. or manual reset is undefined.
  29421.  
  29422. Bit 0: SPB0DT Description
  29423.  
  29424. 0 Input/output data is low-level
  29425.  
  29426. 1 Input/output data is high-level
  29427.  
  29428. 18.2.7 Serial Port Register (SCSPTR2)
  29429.  
  29430. Bit: 15 14 13 12 11 10 9 8
  29431.  
  29432. — — — — — — — —
  29433.  
  29434. Initial value: 0 0 0 0 0 0 0 0
  29435.  
  29436. R/W: R R R R R R R R
  29437.  
  29438. Bit: 7 6 5 4 3 2 1 0
  29439.  
  29440. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  29441.  
  29442. Initial value: 0 — 0 — 0 0 0 —
  29443.  
  29444. R/W: R/W R/W R/W R/W R R R/W R/W
  29445.  
  29446. The serial port register (SCSPTR2) is a 16-bit readable/writable register that controls
  29447. input/output and data for the port pins multiplexed with the serial communication interface
  29448. (SCIF) pins. Input data can be read from the RxD2 pin, output data written to the TxD2 pin, and
  29449. breaks in serial transmission/reception controlled, by means of bits 1 and 0. &76 pin data
  29450. reading and output data writing can be performed by means of bits 5 and 4, and 576 pin data
  29451. reading and output data writing by means of bits 7 and 6.
  29452.  
  29453. Rev. 2.0, 02/99, page 633 of 830
  29454.  
  29455. ----------------------- Page 648-----------------------
  29456.  
  29457. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6, 4,
  29458. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0 is
  29459. undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  29460.  
  29461. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  29462.  
  29463. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies serial port 576 pin input/output. When
  29464. the 576 pin is actually set as a port output pin and outputs the value set by the RTSDT bit, the
  29465. MCE bit in SCFCR2 should be cleared to 0.
  29466.  
  29467. Bit 7: RTSIO Description
  29468.  
  29469. 0 RTSDT bit value is not output to the 576 pin (Initial value)
  29470.  
  29471. 1 RTSDT bit value is output to the 576 pin
  29472.  
  29473. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port 576 pin input/output
  29474. data. Input or output is specified by the RTSIO pin (see the description of bit 7, RTSIO, for
  29475. details). When the 576 pin is designated as an output, the value of the RTSDT bit is output to
  29476. the 576 pin. The 576 pin value is read from the RTSDT bit regardless of the value of the
  29477. RTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  29478.  
  29479. Bit 6: RTSDT Description
  29480.  
  29481. 0 Input/output data is low-level
  29482.  
  29483. 1 Input/output data is high-level
  29484.  
  29485. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies serial port &76 pin input/output. When
  29486. the &76 pin is actually set as a port output pin and outputs the value set by the CTSDT bit, the
  29487. MCE bit in SCFCR2 should be cleared to 0.
  29488.  
  29489. Bit 5: CTSIO Description
  29490.  
  29491. 0 CTSDT bit value is not output to the &76 pin (Initial value)
  29492.  
  29493. 1 CTSDT bit value is output to the &76 pin
  29494.  
  29495. Rev. 2.0, 02/99, page 634 of 830
  29496.  
  29497. ----------------------- Page 649-----------------------
  29498.  
  29499. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port &76 pin input/output
  29500. data. Input or output is specified by the CTSIO pin (see the description of bit 5, CTSIO, for
  29501. details). When the &76 pin is designated as an output, the value of the CTSDT bit is output to
  29502. the &76 pin. The &76 pin value is read from the CTSDT bit regardless of the value of the
  29503. CTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  29504.  
  29505. Bit 4: CTSDT Description
  29506.  
  29507. 0 Input/output data is low-level
  29508.  
  29509. 1 Input/output data is high-level
  29510.  
  29511. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  29512.  
  29513. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output condition.
  29514. When the TxD2 pin is actually set as a port output pin and outputs the value set by the SPB2DT
  29515. bit, the TE bit in SCSCR2 should be cleared to 0.
  29516.  
  29517. Bit 1: SPB2IO Description
  29518.  
  29519. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  29520.  
  29521. 1 SPB2DT bit value is output to the TxD2 pin
  29522.  
  29523. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data and
  29524. TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  29525. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the
  29526. value of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the
  29527. SPB2DT bit regardless of the value of the SPB2IO bit. The initial value of this bit after a power-
  29528. on reset or manual reset is undefined.
  29529.  
  29530. Bit 0: SPB2DT Description
  29531.  
  29532. 0 Input/output data is low-level
  29533.  
  29534. 1 Input/output data is high-level
  29535.  
  29536. Rev. 2.0, 02/99, page 635 of 830
  29537.  
  29538. ----------------------- Page 650-----------------------
  29539.  
  29540. Rev. 2.0, 02/99, page 636 of 830
  29541.  
  29542. ----------------------- Page 651-----------------------
  29543.  
  29544. Section 19 Interrupt Controller (INTC)
  29545.  
  29546. 19.1 Overview
  29547.  
  29548. The interrupt controller (INTC) ascertains the priority of interrupt sources and controls interrupt
  29549. requests to the CPU. The INTC registers set the order of priority of each interrupt, allowing the
  29550. user to handle interrupt requests according to user-set priority.
  29551.  
  29552. 19.1.1 Features
  29553.  
  29554. The INTC has the following features.
  29555.  
  29556. • Fifteen interrupt priority levels can be set
  29557. By setting the three interrupt priority registers, the priorities of on-chip peripheral module
  29558. interrupts can be selected from 15 levels for different request sources.
  29559. • NMI noise canceler function
  29560. The NMI input level bit indicates the NMI pin state. The pin state can be checked by reading
  29561. this bit in the interrupt exception handler, enabling it to be used as a noise canceler.
  29562. • NMI request masking when SR.BL bit is set
  29563. It is possible to select whether or not NMI requests are to be masked when the SR.BL bit is
  29564. set.
  29565.  
  29566. Rev. 2.0, 02/99, page 637 of 830
  29567.  
  29568. ----------------------- Page 652-----------------------
  29569.  
  29570. 19.1.2 Block Diagram
  29571.  
  29572. Figure 19.1 shows a block diagram of the INTC.
  29573.  
  29574. NMI
  29575. Input control
  29576. IRL3–
  29577. IRL0
  29578. 4 4
  29579.  
  29580. TMU (Interrupt request)
  29581. Com- Interrupt
  29582. RTC (Interrupt request) Priority
  29583. identifier parator request
  29584. SCI (Interrupt request)
  29585.  
  29586. SCIF (Interrupt request) SR
  29587.  
  29588. WDT (Interrupt request) I3 I2 I1 I0
  29589.  
  29590. REF (Interrupt request) CPU
  29591.  
  29592. DMAC (Interrupt request)
  29593.  
  29594. Hitachi- (Interrupt request)
  29595. UDI
  29596. GPIO (Interrupt request)
  29597.  
  29598. IPR
  29599. ICR
  29600.  
  29601. IPRA–IPRC
  29602.  
  29603. s
  29604. u
  29605. b
  29606.  
  29607. l
  29608. a
  29609. Bus interface n
  29610. r
  29611. e
  29612. t
  29613. n
  29614. I
  29615.  
  29616. INTC
  29617.  
  29618. TMU: Timer unit
  29619. RTC: Realtime clock unit
  29620. SCI: Serial communication interface
  29621. SCIF: Serial communication interface with FIFO
  29622. WDT: Watchdog timer
  29623. REF: Memory refresh controller section of the bus state controller
  29624. DMAC:Direct memory access controller
  29625. Hitachi-UDI: Hitachi-UDI unit
  29626. GPIO: I/O port
  29627. ICR: Interrupt control register
  29628. IPRA–IPRC: Interrupt priority registers A–C
  29629. SR: Status register
  29630.  
  29631.  
  29632. Figure 19.1 Block Diagram of INTC
  29633.  
  29634. Rev. 2.0, 02/99, page 638 of 830
  29635.  
  29636. ----------------------- Page 653-----------------------
  29637.  
  29638. 19.1.3 Pin Configuration
  29639.  
  29640. Table 19.1 shows the INTC pin configuration.
  29641.  
  29642. Table 191 INTC Pins
  29643.  
  29644. Pin Name Abbreviation I/O Function
  29645.  
  29646. Nonmaskable interrupt NMI Input Input of nonmaskable interrupt request
  29647. input pin signal
  29648.  
  29649. Interrupt input pins ,5/–,5/ Input Input of interrupt request signals
  29650. (maskable by I3–I0 in SR)
  29651.  
  29652. 19.1.4 Register Configuration
  29653.  
  29654. The INTC has the registers shown in table 19.2.
  29655.  
  29656. Table 19.2 INTC Registers
  29657.  
  29658. Initial Area 7 Access
  29659. Name Abbreviation R/W Value*1 P4 Address Address Size
  29660.  
  29661. 2
  29662. Interrupt control ICR R/W * H'FFD00000 H'1FD00000 16
  29663. register
  29664.  
  29665. Interrupt priority IPRA R/W H'0000 H'FFD00004 H'1FD00004 16
  29666. register A
  29667.  
  29668. Interrupt priority IPRB R/W H'0000 H'FFD00008 H'1FD00008 16
  29669. register B
  29670.  
  29671. Interrupt priority IPRC R/W H'0000 H'FFD0000C H'1FD0000C 16
  29672. register C
  29673.  
  29674. Notes: 1. Initialized by a power-on reset or manual reset.
  29675. 2. H'8000 when the NMI pin is high, H'0000 when the NMI pin is low.
  29676.  
  29677. Rev. 2.0, 02/99, page 639 of 830
  29678.  
  29679. ----------------------- Page 654-----------------------
  29680.  
  29681. 19.2 Interrupt Sources
  29682.  
  29683. There are three types of interrupt sources: NMI, RL, and on-chip peripheral modules. Each
  29684. interrupt has a priority level (16–0), with level 16 as the highest and level 1 as the lowest. When
  29685. level 0 is set, the interrupt is masked and interrupt requests are ignored.
  29686.  
  29687. 19.2.1 NMI Interrupt
  29688.  
  29689. The NMI interrupt has the highest priority level of 16. It is always accepted unless the BL bit in
  29690. the status register in the CPU is set to 1. In sleep or standby mode, the interrupt is accepted even
  29691. if the BL bit is set to 1.
  29692.  
  29693. A setting can also be made to have the NMI interrupt accepted even if the BL bit is set to 1.
  29694.  
  29695. Input from the NMI pin is edge-detected. The NMI edge select bit (NMIE) in the interrupt
  29696. control register (ICR) is used to select either rising or falling edge. When the NMIE bit in the
  29697. ICR register is modified, the NMI interrupt is not detected for a maximum of 6 bus clock cycles
  29698. after the modification.
  29699.  
  29700. NMI interrupt exception handling does not affect the interrupt mask level bits (I3–I0) in the
  29701. status register (SR).
  29702.  
  29703. Rev. 2.0, 02/99, page 640 of 830
  29704.  
  29705. ----------------------- Page 655-----------------------
  29706.  
  29707. 19.2.2 IRL Interrupts
  29708.  
  29709. IRL interrupts are input by level at pins ,5/–,5/. The priority level is the level indicated by
  29710. pins ,5/–,5/. An ,5/–,5/ value of 0 (0000) indicates the highest-level interrupt request
  29711. (interrupt priority level 15). A value of 15 (1111) indicates no interrupt request (interrupt priority
  29712. level 0).
  29713.  
  29714. SH7750
  29715.  
  29716. Interrupt Priority 4 IRL3 to IRL0
  29717. requests encoder
  29718. IRL3 to IRL0
  29719.  
  29720. Figure 19.2 Example of IRL Interrupt Connection
  29721.  
  29722. Rev. 2.0, 02/99, page 641 of 830
  29723.  
  29724. ----------------------- Page 656-----------------------
  29725.  
  29726. Table 19.3 ,5/–,5/ Pins and Interrupt Levels
  29727. ,5/ ,5/
  29728.  
  29729. ,5/ ,5/ ,5/ ,5/ Interrupt Priority Level Interrupt Request
  29730. ,5/ ,5/ ,5/ ,5/
  29731.  
  29732. 0 0 0 0 15 Level 15 interrupt request
  29733.  
  29734. 1 14 Level 14 interrupt request
  29735.  
  29736. 1 0 13 Level 13 interrupt request
  29737.  
  29738. 1 12 Level 12 interrupt request
  29739.  
  29740. 1 0 0 11 Level 11 interrupt request
  29741.  
  29742. 1 10 Level 10 interrupt request
  29743.  
  29744. 1 0 9 Level 9 interrupt request
  29745.  
  29746. 1 8 Level 8 interrupt request
  29747.  
  29748. 1 0 0 0 7 Level 7 interrupt request
  29749.  
  29750. 1 6 Level 6 interrupt request
  29751.  
  29752. 1 0 5 Level 5 interrupt request
  29753.  
  29754. 1 4 Level 4 interrupt request
  29755.  
  29756. 1 0 0 3 Level 3 interrupt request
  29757.  
  29758. 1 2 Level 2 interrupt request
  29759.  
  29760. 1 0 1 Level 1 interrupt request
  29761.  
  29762. 1 0 No interrupt request
  29763.  
  29764. A noise-cancellation feature is built in, and the IRL interrupt is not detected unless the levels
  29765. sampled at every bus clock cycle remain unchanged for three consecutive cycles, so that no
  29766. transient level on the IRL pin change is detected. In standby mode, as the bus clock is stopped,
  29767. noise cancellation is performed using the 32.768 kHz clock for the RTC instead. When the RTC
  29768. is not used, therefore, interruption by means of IRL interrupts cannot be performed in standby
  29769. mode.
  29770.  
  29771. The priority level of the IRL interrupt must not be lowered unless the interrupt is accepted and
  29772. the interrupt handling starts. However, the priority level can be changed to a higher one.
  29773.  
  29774. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by IRL interrupt
  29775. handling.
  29776.  
  29777. Pins ,5/–,5/ can be used for four independent interrupt requests by setting the IRLM bit to 1
  29778. in the ICR register.
  29779.  
  29780. Rev. 2.0, 02/99, page 642 of 830
  29781.  
  29782. ----------------------- Page 657-----------------------
  29783.  
  29784. Table 19.4 ,5/–,5/ Pins and Interrupt Levels (When IRLM = 1)
  29785. ,5/ ,5/
  29786.  
  29787. ,5/ ,5/ ,5/ ,5/ Interrupt Priority Level Interrupt Request
  29788. ,5/ ,5/ ,5/ ,5/
  29789.  
  29790. 1/0 1/0 1/0 0 13 IRL0
  29791.  
  29792. 1/0 1/0 0 1 10 IRL1
  29793.  
  29794. 1/0 0 1 1 7 IRL2
  29795.  
  29796. 0 1 1 1 4 IRL3
  29797.  
  29798. 19.2.3 On-Chip Peripheral Module Interrupts
  29799.  
  29800. On-chip peripheral module interrupts are generated by the following nine modules:
  29801.  
  29802. • Hitachi-UDI unit (Hitachi-UDI)
  29803. • Direct memory access controller (DMAC)
  29804. • Timer unit (TMU)
  29805. • Realtime clock (RTC)
  29806. • Serial communication interface (SCI)
  29807. • Serial communication interface with FIFO (SCIF)
  29808. • Bus state controller (BSC)
  29809. • Watchdog timer (WDT)
  29810. • I/O port (GPIO)
  29811.  
  29812. Not every interrupt source is assigned a different interrupt vector, bus sources are reflected in the
  29813. interrupt event register (INTEVT), so it is easy to identify sources by using the INTEVT register
  29814. value as a branch offset in the exception handling routine.
  29815.  
  29816. A priority level from 15 to 0 can be set for each module by means of interrupt priority registers
  29817. A to C (IPRA–IPRC).
  29818.  
  29819. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by on-chip peripheral
  29820. module interrupt handling.
  29821.  
  29822. On-chip peripheral module interrupt source flag and interrupt enable flag updating should only
  29823. be carried out when the BL bit in the status register (SR) is set to 1. To prevent acceptance of an
  29824. erroneous interrupt from an interrupt source that should have been updated, first read the on-chip
  29825. peripheral register containing the relevant flag, then clear the BL bit to 0. This will secure the
  29826. necessary timing internally. When updating a number of flags, there is no problem if only the
  29827. register containing the last flag updated is read.
  29828.  
  29829. Rev. 2.0, 02/99, page 643 of 830
  29830.  
  29831. ----------------------- Page 658-----------------------
  29832.  
  29833. If flag updating is performed while the BL bit is cleared to 0, the program may jump to the
  29834. interrupt handling routine when the INTEVT register value is 0. In this case, interrupt handling
  29835. is initiated due to the timing relationship between the flag update and interrupt request
  29836. recognition within the chip. Processing can be continued without any problem by executing an
  29837. RTE instruction.
  29838.  
  29839. 19.2.4 Interrupt Exception Handling and Priority
  29840.  
  29841. Table 19.5 lists the codes for the interrupt event register (INTEVT), and the order of interrupt
  29842. priority. Each interrupt source is assigned a unique INTEVT code. The start address of the
  29843. interrupt handler is common to each interrupt source. This is why, for instance, the value of
  29844. INTEVT is used as an offset at the start of the interrupt handler and branched to in order to
  29845. identify the interrupt source.
  29846.  
  29847. The order of priority of the on-chip peripheral modules is specified as desired by setting priority
  29848. levels from 0 to 15 in interrupt priority registers A to C (IPRA–IPRC). The order of priority of
  29849. the on-chip peripheral modules is set to 0 by a reset.
  29850.  
  29851. When the priorities for multiple interrupt sources are set to the same level and such interrupts
  29852. are generated simultaneously, they are handled according to the default priority order shown in
  29853. table 19.5.
  29854.  
  29855. Updating of interrupt priority registers A to C should only be carried out when the BL bit in the
  29856. status register (SR) is set to 1. To prevent erroneous interrupt acceptance, first read one of the
  29857. interrupt priority registers, then clear the BL bit to 0. This will secure the necessary timing
  29858. internally.
  29859.  
  29860. Rev. 2.0, 02/99, page 644 of 830
  29861.  
  29862. ----------------------- Page 659-----------------------
  29863.  
  29864. Table 19.5 Interrupt Exception Handling Sources and Priority Order
  29865.  
  29866. INTEVT Interrupt Priority IPR (Bit Priority within Default
  29867. Interrupt Source Code (Initial Value) Numbers) IPR Setting Unit Priority
  29868.  
  29869. NMI H'1C0 16 — — High
  29870.  
  29871. IRL ,5/–,5/ = 0 H'200 15 — —
  29872.  
  29873. ,5/–,5/ = 1 H'220 14 — —
  29874.  
  29875. ,5/–,5/ = 2 H'240 13 — —
  29876.  
  29877. ,5/–,5/ = 3 H'260 12 — —
  29878.  
  29879. ,5/–,5/ = 4 H'280 11 — —
  29880.  
  29881. ,5/–,5/ = 5 H'2A0 10 — —
  29882.  
  29883. ,5/–,5/ = 6 H'2C0 9 — —
  29884.  
  29885. ,5/–,5/ = 7 H'2E0 8 — —
  29886.  
  29887. ,5/–,5/ = 8 H'300 7 — —
  29888.  
  29889. ,5/–,5/ = 9 H'320 6 — —
  29890.  
  29891. ,5/–,5/ = A H'340 5 — —
  29892.  
  29893. ,5/–,5/ = B H'360 4 — —
  29894.  
  29895. ,5/–,5/ = C H'380 3 — —
  29896.  
  29897. ,5/–,5/ = D H'3A0 2 — —
  29898.  
  29899. ,5/–,5/ = E H'3C0 1 — —
  29900.  
  29901. IRL0 H'240 13 — —
  29902.  
  29903. IRL1 H'2A0 10 — —
  29904.  
  29905. IRL2 H'300 7 — —
  29906.  
  29907. IRL3 H'360 4 — —
  29908.  
  29909. Hitachi- Hitachi-UDI H'600 15–0 (0) IPRC (3–0) —
  29910. UDI
  29911.  
  29912. GPIO GPIOI H'620 15–0 (0) IPRC (15–12) —
  29913.  
  29914. DMAC DMTE0 H'640 15–0 (0) IPRC (11–8) High
  29915.  
  29916. DMTE1 H'660
  29917.  
  29918. DMTE2 H'680
  29919.  
  29920. DMTE3 H'6A0
  29921.  
  29922. DMAE H'6C0 Low
  29923.  
  29924. TMU0 TUNI0 H'400 15–0 (0) IPRA (15–12) —
  29925.  
  29926. TMU1 TUNI1 H'420 15–0 (0) IPRA (11–8) —
  29927.  
  29928. TMU2 TUNI2 H'440 15–0 (0) IPRA (7–4) High
  29929.  
  29930. TICPI2 H'460 Low Low
  29931.  
  29932. Rev. 2.0, 02/99, page 645 of 830
  29933.  
  29934. ----------------------- Page 660-----------------------
  29935.  
  29936. Table 19.5 Interrupt Exception Handling Sources and Priority Order (cont)
  29937.  
  29938. INTEVT Interrupt Priority IPR (Bit Priority within Default
  29939. Interrupt Source Code (Initial Value) Numbers) IPR Setting Unit Priority
  29940.  
  29941. RTC ATI H'480 15–0 (0) IPRA (3–0) High High
  29942. ↑
  29943. ↓
  29944. Low
  29945.  
  29946. PRI H'4A0
  29947.  
  29948. CUI H'4C0
  29949.  
  29950. SCI1 ERI H'4E0 15–0 (0) IPRB (7–4) High
  29951.  
  29952. RXI H'500
  29953.  
  29954. TXI H'520
  29955.  
  29956. TEI H'540 Low
  29957.  
  29958. SCIF ERI H'700 15–0 (0) IPRC (7–4) High
  29959.  
  29960. RXI H'720
  29961.  
  29962. BRI H'740
  29963.  
  29964. TXI H'760 Low
  29965.  
  29966. WDT ITI H'560 15–0 (0) IPRB (15–12) —
  29967.  
  29968. REF RCMI H'580 15–0 (0) IPRB (11–8) High
  29969.  
  29970. ROVI H'5A0 Low Low
  29971.  
  29972. Note: TUNI0–TUNI2: Underflow interrupts
  29973. TICPI2: Input capture interrupt
  29974. ATI: Alarm interrupt
  29975. PRI: Periodic interrupt
  29976. CUI: Carry-up interrupt
  29977. ERI: Receive-error interrupt
  29978. RXI: Receive-data-full interrupt
  29979. TXI: Transmit-data-empty interrupt
  29980. TEI: Transmit-end interrupt
  29981. BRI: Break interrupt request
  29982. ITI: Interval timer interrupt
  29983. RCMI: Compare-match interrupt
  29984. ROVI: Refresh counter overflow interrupt
  29985. Hitachi-UDI: Hitachi-UDI interrupt
  29986. GPIOI: I/O port interrupt
  29987. DMTE0–DMTE3: DMAC transfer end interrupts
  29988. DMAE: DMAC address error interrupt
  29989.  
  29990. Rev. 2.0, 02/99, page 646 of 830
  29991.  
  29992. ----------------------- Page 661-----------------------
  29993.  
  29994. 19.3 Register Descriptions
  29995.  
  29996. 19.3.1 Interrupt Priority Registers A to C (IPRA–IPRC)
  29997.  
  29998. Interrupt priority registers A to C (IPRA–IPRC) are 16-bit readable/writable registers that set
  29999. priority levels from 0 to 15 for on-chip peripheral module interrupts. These registers are
  30000. initialized to H'0000 by a reset. They are not initialized in standby mode.
  30001.  
  30002. Bit: 15 14 13 12 11 10 9 8
  30003.  
  30004. Bit name:
  30005.  
  30006. Initial value: 0 0 0 0 0 0 0 0
  30007.  
  30008. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30009.  
  30010. Bit: 7 6 5 4 3 2 1 0
  30011.  
  30012. Bit name:
  30013.  
  30014. Initial value: 0 0 0 0 0 0 0 0
  30015.  
  30016. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30017.  
  30018. Table 19.6 shows the relationship between the interrupt request sources and the IPRA–IPRC
  30019. register bits.
  30020.  
  30021. Table 19.6 Interrupt Request Sources and IPRA–IPRC Registers
  30022.  
  30023. Bits
  30024.  
  30025. Register 15–12 11–8 7–4 3–0
  30026.  
  30027. Interrupt priority register A TMU0 TMU1 TMU2 RTC
  30028. Interrupt priority register B WDT REF*1 SCI1 Reserved*2
  30029.  
  30030. Interrupt priority register C GPIO DMAC SCIF Hitachi-UDI
  30031.  
  30032. Notes: 1. REF is the memory refresh unit in the bus state controller (BSC). See section 13, Bus
  30033. State Controller (BSC), for details.
  30034. 2. Reserved bits: These bits are always read as 0 and should always be written with 0.
  30035.  
  30036. As shown in table 19.6, four on-chip peripheral modules are assigned to each register. Interrupt
  30037. priority levels are established by setting a value from H'F (1111) to H'0 (0000) in each of the
  30038. four-bit groups: 15–12, 11–8, 7–4, and 3–0. Setting H'F designates priority level 15 (the highest
  30039. level), and setting H'0 designates priority level 0 (requests are masked).
  30040.  
  30041. Rev. 2.0, 02/99, page 647 of 830
  30042.  
  30043. ----------------------- Page 662-----------------------
  30044.  
  30045. 19.3.2 Interrupt Control Register (ICR)
  30046.  
  30047. The interrupt control register (ICR) is a 16-bit register that sets the input signal detection mode
  30048. for external interrupt input pin NMI and indicates the input signal level at the NMI pin. This
  30049. register is initialized by a power-on reset or manual reset. It is not initialized in standby mode.
  30050.  
  30051. Bit: 15 14 13 12 11 10 9 8
  30052.  
  30053. Bit name: NMIL MAI — — — — NMIB NMIE
  30054.  
  30055. Initial value: 0/1* 0 0 0 0 0 0 0
  30056.  
  30057. R/W: R R/W — — — — R/W R/W
  30058.  
  30059. Bit: 7 6 5 4 3 2 1 0
  30060.  
  30061. Bit name: IRLM — — — — — — —
  30062.  
  30063. Initial value: 0 0 0 0 0 0 0 0
  30064.  
  30065. R/W: R/W — — — — — — —
  30066.  
  30067. Note: * 1 when NMI pin input is high, 0 when low.
  30068.  
  30069. Bit 15—NMI Input Level (NMIL): Sets the level of the signal input at the NMI pin. This bit
  30070. can be read to determine the NMI pin level. It cannot be modified.
  30071.  
  30072. Bit 15: NMIL Description
  30073.  
  30074. 0 NMI pin input level is low
  30075.  
  30076. 1 NMI pin input level is high
  30077.  
  30078. Bit 14—NMI Interrupt Mask (MAI): Specifies whether or not all interrupts are to be masked
  30079. while the NMI pin input level is low, irrespective of the CPU’s SR.BL bit.
  30080.  
  30081. Bit 14: MAI Description
  30082.  
  30083. 0 Interrupts enabled even while NMI pin is low (Initial value)
  30084.  
  30085. 1 Interrupts disabled while NMI pin is low*
  30086.  
  30087. Note: * NMI interrupts are accepted in normal operation and in sleep mode.
  30088. In standby mode, all interrupts are masked, and standby is not cleared, while the NMI pin
  30089. is low.
  30090.  
  30091. Rev. 2.0, 02/99, page 648 of 830
  30092.  
  30093. ----------------------- Page 663-----------------------
  30094.  
  30095. Bit 9—NMI Block Mode (NMIB): Specifies whether an NMI request is to be held pending or
  30096. detected immediately while the SR.BL bit is set to 1.
  30097.  
  30098. Bit 9: NMIB Description
  30099.  
  30100. 0 NMI interrupt requests held pending while SR.BL bit is set to 1
  30101. (Initial value)
  30102.  
  30103. 1 NMI interrupt requests detected while SR.BL bit is set to 1
  30104.  
  30105. Notes: 1. If interrupt requests are enabled while SR.BL = 1, the previous exception information
  30106. will be lost, and so must be saved beforehand.
  30107. 2. This bit is cleared automatically by NMI acceptance.
  30108.  
  30109. Bit 8—NMI Edge Select (NMIE): Specifies whether the falling or rising edge of the interrupt
  30110. request signal to the NMI pin is detected.
  30111.  
  30112. Bit 8: NMIE Description
  30113.  
  30114. 0 Interrupt request detected on falling edge of NMI input (Initial value)
  30115.  
  30116. 1 Interrupt request detected on rising edge of NMI input
  30117.  
  30118. Bit 7—IRL Pin Mode (IRLM): Specifies whether pins ,5/–,5/ are to be used as level-
  30119. encoded interrupt requests or as four independent interrupt requests.
  30120.  
  30121. Bit 7: IRLM Description
  30122.  
  30123. 0 ,5/ pins used as level-encoded interrupt requests (Initial value)
  30124.  
  30125. 1 ,5/ pins used as four independent interrupt requests
  30126.  
  30127. Bits 13 to 10 and 6 to 0—Reserved: These bits are always read as 0, and should only be written
  30128. with 0.
  30129.  
  30130. Rev. 2.0, 02/99, page 649 of 830
  30131.  
  30132. ----------------------- Page 664-----------------------
  30133.  
  30134. 19.4 INTC Operation
  30135.  
  30136. 19.4.1 Interrupt Operation Sequence
  30137.  
  30138. The sequence of operations when an interrupt is generated is described below. Figure 19.3 shows
  30139. a flowchart of the operations.
  30140.  
  30141. 1. The interrupt request sources send interrupt request signals to the interrupt controller.
  30142. 2. The interrupt controller selects the highest-priority interrupt from the interrupt requests sent,
  30143. according to the priority levels set in interrupt priority registers A to C (IPRA–IPRC).
  30144. Lower-priority interrupts are held pending. If two of these interrupts have the same priority
  30145. level, or if multiple interrupts occur within a single module, the interrupt with the highest
  30146. priority according to table 19.5, Interrupt Exception Handling Sources and Priority Order, is
  30147. selected.
  30148. 3. The priority level of the interrupt selected by the interrupt controller is compared with the
  30149. interrupt mask bits (I3–I0) in the status register (SR) of the CPU. If the request priority level
  30150. is higher that the level in bits I3–I0, the interrupt controller accepts the interrupt and sends an
  30151. interrupt request signal to the CPU.
  30152. 4. The CPU accepts an interrupt at a break between instructions.
  30153. 5. The interrupt source code is set in the interrupt event register (INTEVT).
  30154. 6. The status register (SR) and program counter (PC) are saved to SSR and SPC, respectively.
  30155. 7. The block bit (BL), mode bit (MD), and register bank bit (RB) in SR are set to 1.
  30156. 8. The CPU jumps to the start address of the interrupt handler (the sum of the value set in the
  30157. vector base register (VBR) and H'00000600).
  30158.  
  30159. The interrupt handler may branch with the INTEVT register value as its offset in order to
  30160. identify the interrupt source. This enables it to branch to the handling routine for the particular
  30161. interrupt source.
  30162.  
  30163. Notes: 1. The interrupt mask bits (I3–I0) in the status register (SR) are not changed by
  30164. acceptance of an interrupt in the SH7750.
  30165. 2. The interrupt source flag should be cleared in the interrupt handler. To ensure that an
  30166. interrupt request that should have been cleared is not inadvertently accepted again,
  30167. read the interrupt source flag after it has been cleared, then wait for the interval
  30168. shown in table 19.7 (Time for priority decision and SR mask bit comparison) before
  30169. clearing the BL bit or executing an RTE instruction.
  30170.  
  30171. Rev. 2.0, 02/99, page 650 of 830
  30172.  
  30173. ----------------------- Page 665-----------------------
  30174.  
  30175. Program
  30176. execution state
  30177.  
  30178. Interrupt No
  30179. generated?
  30180.  
  30181. Yes
  30182.  
  30183. (BL bit
  30184. in SR = 0) or No
  30185. (sleep or standby
  30186. mode)?
  30187. NMIB in No
  30188.  
  30189. ICR = 1 and
  30190. Yes
  30191. NMI?
  30192. No
  30193. NMI? Yes
  30194.  
  30195. Yes
  30196.  
  30197. Level 15 No
  30198.  
  30199. interrupt?
  30200.  
  30201. Yes
  30202. Level 14 No
  30203. I3–I0* = interrupt?
  30204. Yes
  30205. level 14 or
  30206. lower? Yes
  30207. Level 1 No
  30208. No I3–I0 = interrupt?
  30209. Yes
  30210. Set interrupt source level 13 or Yes
  30211. in INTEVT lower?
  30212.  
  30213. No
  30214. Yes I3–I0 =
  30215. Save SR to SSR; level 0?
  30216. save PC to SPC
  30217. No
  30218.  
  30219. Set BL, MD, RB bits
  30220. in SR to 1
  30221.  
  30222. Branch to exception
  30223. handler
  30224.  
  30225. Note: * I3–I0: Interrupt mask bits in status register (SR)
  30226.  
  30227. Figure 19.3 Interrupt Operation Flowchart
  30228.  
  30229. Rev. 2.0, 02/99, page 651 of 830
  30230.  
  30231. ----------------------- Page 666-----------------------
  30232.  
  30233. 19.4.2 Multiple Interrupts
  30234.  
  30235. When handling multiple interrupts, interrupt handling should include the following procedures:
  30236.  
  30237. 1. Branch to a specific interrupt handler corresponding to a code set in the INTEVT register.
  30238. The code in INTEVT can be used as a branch-offset for branching to the specific handler.
  30239. 2. Clear the interrupt source in the corresponding interrupt handler.
  30240. 3. Save SPC and SSR to the stack.
  30241. 4. Clear the BL bit in SR, and set the accepted interrupt level in the interrupt mask bits in SR.
  30242. 5. Handle the interrupt.
  30243. 6. Set the BL bit in SR to 1.
  30244. 7. Restore SSR and SPC from memory.
  30245. 8. Execute the RTE instruction.
  30246.  
  30247. When these procedures are followed in order, an interrupt of higher priority than the one being
  30248. handled can be accepted after clearing BL in step 4. This enables the interrupt response time to
  30249. be shortened for urgent processing.
  30250.  
  30251. 19.4.3 Interrupt Masking with MAI Bit
  30252.  
  30253. By setting the MAI bit to 1 in the ICR register, it is possible to mask interrupts while the NMI
  30254. pin is low, irrespective of the BL and IMASK bits in the SR register.
  30255.  
  30256. • In normal operation and sleep mode
  30257. All interrupts are masked while the NMI pin is low. However, an NMI interrupt only is
  30258. generated by a transition at the NMI pin.
  30259. • In standby mode
  30260. All interrupts are masked while the NMI pin is low, and an NMI interrupt is not generated by
  30261. a transition at the NMI pin. Therefore, standby cannot be cleared by an NMI interrupt while
  30262. the MAI bit is set to 1.
  30263.  
  30264. Rev. 2.0, 02/99, page 652 of 830
  30265.  
  30266. ----------------------- Page 667-----------------------
  30267.  
  30268. 19.5 Interrupt Response Time
  30269.  
  30270. The time from generation of an interrupt request until interrupt exception handling is performed
  30271. and fetching of the first instruction of the exception handler is started (the interrupt response
  30272. time) is shown in table 19.7.
  30273.  
  30274. Table 19.7 Interrupt Response Time
  30275.  
  30276. Number of States
  30277.  
  30278. Peripheral
  30279. Item NMI RL Modules Notes
  30280.  
  30281. Time for priority decision and 1Icyc + 4Bcyc 1Icyc + 7Bcyc 1Icyc + 2Bcyc
  30282. SR mask bit comparison
  30283.  
  30284. Wait time until end of S – 1 (≥ 0) × S – 1 (≥ 0) × S – 1 (≥ 0) ×
  30285. sequence being executed by Icyc Icyc Icyc
  30286. CPU
  30287.  
  30288. Time from interrupt exception 4 × Icyc 4 × Icyc 4 × Icyc
  30289. handling (save of SR and PC)
  30290. until fetch of first instruction of
  30291. exception handler is started
  30292.  
  30293. Response Total 5Icyc + 4Bcyc 5Icyc + 7Bcyc 5Icyc + 2Bcyc
  30294. time + (S – 1)Icyc + (S – 1)Icyc + (S – 1)Icyc
  30295.  
  30296. Minimum 13Icyc 19Icyc 9Icyc When Icyc:
  30297. case Bcyc = 2:1
  30298.  
  30299. Maximum 36 + S Icyc 60 + S Icyc 20 + S Icyc When Icyc:
  30300. case Bcyc = 8:1
  30301.  
  30302. Icyc: One cycle of internal clock supplied to CPU, etc.
  30303. Bcyc: One CKIO cycle
  30304. S: Latency of instruction
  30305.  
  30306. Rev. 2.0, 02/99, page 653 of 830
  30307.  
  30308. ----------------------- Page 668-----------------------
  30309.  
  30310. Rev. 2.0, 02/99, page 654 of 830
  30311.  
  30312. ----------------------- Page 669-----------------------
  30313.  
  30314. Section 20 User Break Controller (UBC)
  30315.  
  30316. 20.1 Overview
  30317.  
  30318. The user break controller (UBC) provides functions that simplify program debugging. When
  30319. break conditions are set in the UBC, a user break interrupt is generated according to the contents
  30320. of the bus cycle generated by the CPU. This function makes it easy to design an effective self-
  30321. monitoring debugger, enabling programs to be debugged with the chip alone, without using an
  30322. in-circuit emulator.
  30323.  
  30324. 20.1.1 Features
  30325.  
  30326. The UBC has the following features.
  30327.  
  30328. • Two break channels (A and B)
  30329. User break interrupts can be generated on independent conditions for channels A and B, or
  30330. on sequential conditions (sequential break setting: channel A → channel B).
  30331. • The following can be set as break compare conditions:
  30332.  Address (selection of 32-bit virtual address and ASID for comparison):
  30333. Address: All bits compared/lower 10 bits masked/lower 12 bits masked/lower 16 bits
  30334. masked/lower 20 bits masked/all bits masked
  30335. ASID: All bits compared/all bits masked
  30336.  Data (channel B only, 32-bit mask capability)
  30337.  Bus cycle: Instruction access/operand access
  30338.  Read/write
  30339.  Operand size: Byte/word/longword/quadword
  30340. • An instruction access cycle break can be effected before or after the instruction is executed.
  30341.  
  30342. Rev. 2.0, 02/99, page 655 of 830
  30343.  
  30344. ----------------------- Page 670-----------------------
  30345.  
  30346. 20.1.2 Block Diagram
  30347.  
  30348. Figure 20.1 shows a block diagram of the UBC.
  30349.  
  30350. Access Address Data
  30351. control bus bus
  30352.  
  30353. Channel A
  30354.  
  30355. Access BBRA
  30356. comparator
  30357.  
  30358. BARA
  30359.  
  30360. Address
  30361. comparator BASRA
  30362.  
  30363. BAMRA
  30364.  
  30365. Channel B
  30366.  
  30367. Access
  30368. BBRB
  30369. comparator
  30370.  
  30371. BARB
  30372.  
  30373. Address
  30374. comparator BASRB
  30375.  
  30376. BAMRB
  30377.  
  30378. Data BDRB
  30379.  
  30380. comparator
  30381.  
  30382. BDMRB
  30383.  
  30384. BBRA: Break bus cycle register A
  30385. BARA: Break address register A
  30386. BASRA: Break ASID register A
  30387. BAMRA: Break address mask register A
  30388. BBRB: Break bus cycle register B
  30389. BARB: Break address register B Control BRCR
  30390. BASRB: Break ASID register B
  30391. BAMRB: Break address mask register B
  30392.  
  30393. BDRB: Break data register B
  30394. User break trap request
  30395. BDMRB: Break data mask register B
  30396. BRCR: Break control register
  30397.  
  30398.  
  30399. Figure 20.1 Block Diagram of User Break Controller
  30400.  
  30401. Rev. 2.0, 02/99, page 656 of 830
  30402.  
  30403. ----------------------- Page 671-----------------------
  30404.  
  30405. Table 20.1 shows the UBC registers.
  30406.  
  30407. Table 20.1 UBC Registers
  30408.  
  30409. Area 7 Access
  30410. Name Abbreviation R/W Initial Value P4 Address Address Size
  30411.  
  30412. Break address BARA R/W Undefined H'FF200000 H'1F200000 32
  30413. register A
  30414.  
  30415. Break address BAMRA R/W Undefined H'FF200004 H'1F200004 8
  30416. mask
  30417. register A
  30418.  
  30419. Break bus BBRA R/W H'0000 H'FF200008 H'1F200008 16
  30420. cycle register A
  30421.  
  30422. Break ASID BASRA R/W Undefined H'FF000014 H'1F000014 8
  30423. register A
  30424.  
  30425. Break address BARB R/W Undefined H'FF20000C H'1F20000C 32
  30426. register B
  30427.  
  30428. Break address BAMRB R/W Undefined H'FF200010 H'1F200010 8
  30429. mask
  30430. register B
  30431.  
  30432. Break bus BBRB R/W H'0000 H'FF200014 H'1F200014 16
  30433. cycle register B
  30434.  
  30435. Break ASID BASRB R/W Undefined H'FF000018 H'1F000018 8
  30436. register B
  30437.  
  30438. Break data BDRB R/W Undefined H'FF200018 H'1F200018 32
  30439. register B
  30440.  
  30441. Break data BDMRB R/W Undefined H'FF20001C H'1F20001C 32
  30442. mask register B
  30443.  
  30444. Break control BRCR R/W H'0000* H'FF200020 H'1F200020 16
  30445. register
  30446.  
  30447. Note: * Some bits are not initialized. See section 20.2.12, Break Control Register (BRCR), for
  30448. details.
  30449.  
  30450. Rev. 2.0, 02/99, page 657 of 830
  30451.  
  30452. ----------------------- Page 672-----------------------
  30453.  
  30454. 20.2 Register Descriptions
  30455.  
  30456. 20.2.1 Access to UBC Control Registers
  30457.  
  30458. The access size must be the same as the control register size. If the sizes are different, a write
  30459. will not be effected in a UBC register write operation, and a read operation will return an
  30460. undefined value. UBC control register contents cannot be transferred to a floating-point register
  30461. using a floating-point memory load instruction.
  30462.  
  30463. When a UBC control register is updated, use either of the following methods to make the
  30464. updated value valid:
  30465.  
  30466. 1. Execute an RTE instruction after the memory store instruction that updated the register. The
  30467. updated value will be valid from the RTE instruction jump destination onward.
  30468. 2. Execute instructions requiring 5 states for execution after the memory store instruction that
  30469. updated the register. As the SH7750 executes two instructions in parallel and a minimum of
  30470. 0.5 state is required for execution of one instruction, 11 instructions must be inserted. The
  30471. updated value will be valid from the 6th state onward.
  30472.  
  30473. Rev. 2.0, 02/99, page 658 of 830
  30474.  
  30475. ----------------------- Page 673-----------------------
  30476.  
  30477. 20.2.2 Break Address Register A (BARA)
  30478.  
  30479. Bit: 31 30 29 28 27 26 25 24
  30480.  
  30481. BAA31 BAA30 BAA29 BAA28 BAA27 BAA26 BAA25 BAA24
  30482.  
  30483. Initial value: * * * * * * * *
  30484.  
  30485. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30486.  
  30487. Bit: 23 22 21 20 19 18 17 16
  30488.  
  30489. BAA23 BAA22 BAA21 BAA20 BAA19 BAA18 BAA17 BAA16
  30490.  
  30491. Initial value: * * * * * * * *
  30492.  
  30493. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30494.  
  30495. Bit: 15 14 13 12 11 10 9 8
  30496.  
  30497. BAA15 BAA14 BAA13 BAA12 BAA11 BAA10 BAA9 BAA8
  30498.  
  30499. Initial value: * * * * * * * *
  30500.  
  30501. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30502.  
  30503. Bit: 7 6 5 4 3 2 1 0
  30504.  
  30505. BAA7 BAA6 BAA5 BAA4 BAA3 BAA2 BAA1 BAA0
  30506.  
  30507. Initial value: * * * * * * * *
  30508.  
  30509. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30510.  
  30511. Note: *: Undefined
  30512.  
  30513. Break address register A (BARA) is a 32-bit readable/writable register that specifies the virtual
  30514. address used in the channel A break conditions. BARA is not initialized by a power-on reset or
  30515. manual reset.
  30516.  
  30517. Bits 31 to 0—Break Address A31 to A0 (BAA31–BAA0): These bits hold the virtual address
  30518. (bits 31–0) used in the channel A break conditions.
  30519.  
  30520. Rev. 2.0, 02/99, page 659 of 830
  30521.  
  30522. ----------------------- Page 674-----------------------
  30523.  
  30524. 20.2.3 Break ASID Register A (BASRA)
  30525.  
  30526. Bit: 7 6 5 4 3 2 1 0
  30527.  
  30528. BASA7 BASA6 BASA5 BASA4 BASA3 BASA2 BASA1 BASA0
  30529.  
  30530. Initial value: * * * * * * * *
  30531.  
  30532. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30533.  
  30534. Note: *: Undefined
  30535.  
  30536. Break ASID register A (BASRA) is an 8-bit readable/writable register that specifies the ASID
  30537. used in the channel A break conditions. BASRA is not initialized by a power-on reset or manual
  30538. reset.
  30539.  
  30540. Bits 7 to 0—Break ASID A7 to A0 (BASA7–BASA0): These bits hold the ASID (bits 7–0)
  30541. used in the channel A break conditions.
  30542.  
  30543. 20.2.4 Break Address Mask Register A (BAMRA)
  30544.  
  30545. Bit: 7 6 5 4 3 2 1 0
  30546.  
  30547. — — — — BAMA2 BASMA BAMA1 BAMA0
  30548.  
  30549. Initial value: 0 0 0 0 * * * *
  30550.  
  30551. R/W: R R R R R/W R/W R/W R/W
  30552.  
  30553. Note: *: Undefined
  30554.  
  30555. Break address mask register A (BAMRA) is an 8-bit readable/writable register that specifies
  30556. which bits are to be masked in the break ASID set in BASRA and the break address set in
  30557. BARA. BAMRA is not initialized by a power-on reset or manual reset.
  30558.  
  30559. Bits 7 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  30560.  
  30561. Bit 2—Break ASID Mask A (BASMA): Specifies whether all bits of the channel A break ASID
  30562. (BASA7–BASA0) are to be masked.
  30563.  
  30564. Bit 2: BASMA Description
  30565.  
  30566. 0 All BASRA bits are included in break conditions
  30567.  
  30568. 1 No BASRA bits are included in break conditions
  30569.  
  30570. Rev. 2.0, 02/99, page 660 of 830
  30571.  
  30572. ----------------------- Page 675-----------------------
  30573.  
  30574. Bits 3, 1, and 0—Break Address Mask A2 to A0 (BAMA2–BAMA0): These bits specify
  30575. which bits of the channel A break address (BAA31–BAA0) set in BARA are to be masked.
  30576.  
  30577. Bit 3: BAMA2 Bit 1: BAMA1 Bit 0: BAMA0 Description
  30578.  
  30579. 0 0 0 All BARA bits are included in break conditions
  30580.  
  30581. 1 Lower 10 bits of BARA are masked, and not
  30582. included in break conditions
  30583.  
  30584. 1 0 Lower 12 bits of BARA are masked, and not
  30585. included in break conditions
  30586.  
  30587. 1 All BARA bits are masked, and not included
  30588. in break conditions
  30589.  
  30590. 1 0 0 Lower 16 bits of BARA are masked, and not
  30591. included in break conditions
  30592.  
  30593. 1 Lower 20 bits of BARA are masked, and not
  30594. included in break conditions
  30595.  
  30596. 1 * Reserved (cannot be set)
  30597.  
  30598. Note: *: Don’t care
  30599.  
  30600. 20.2.5 Break Bus Cycle Register A (BBRA)
  30601.  
  30602. Bit: 15 14 13 12 11 10 9 8
  30603.  
  30604. — — — — — — — —
  30605.  
  30606. Initial value: 0 0 0 0 0 0 0 0
  30607.  
  30608. R/W: R R R R R R R R
  30609.  
  30610. Bit: 7 6 5 4 3 2 1 0
  30611.  
  30612. — SZA2 IDA1 IDA0 RWA1 RWA0 SZA1 SZA0
  30613.  
  30614. Initial value: 0 0 0 0 0 0 0 0
  30615.  
  30616. R/W: R R/W R/W R/W R/W R/W R/W R/W
  30617.  
  30618. Break bus cycle register A (BBRA) is a 16-bit readable/writable register that sets three
  30619. conditions—(1) instruction access/operand access, (2) read/write, and (3) operand size—from
  30620. among the channel A break conditions.
  30621.  
  30622. BBRA is initialized to H'0000 by a power-on reset. It retains its value in standby mode.
  30623.  
  30624. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  30625.  
  30626. Rev. 2.0, 02/99, page 661 of 830
  30627.  
  30628. ----------------------- Page 676-----------------------
  30629.  
  30630. Bits 5 and 4—Instruction Access/Operand Access Select A (IDA1, IDA0): These bits specify
  30631. whether an instruction access cycle or an operand access cycle is used as the bus cycle in the
  30632. channel A break conditions.
  30633.  
  30634. Bit 5: IDA1 Bit 4: IDA0 Description
  30635.  
  30636. 0 0 Condition comparison is not performed (Initial value)
  30637.  
  30638. 1 Instruction access cycle is used as break condition
  30639.  
  30640. 1 0 Operand access cycle is used as break condition
  30641.  
  30642. 1 Instruction access cycle or operand access cycle is used as
  30643. break condition
  30644.  
  30645. Bits 3 and 2—Read/Write Select A (RWA1, RWA0): These bits specify whether a read cycle
  30646. or write cycle is used as the bus cycle in the channel A break conditions.
  30647.  
  30648. Bit 3: RWA1 Bit 2: RWA0 Description
  30649.  
  30650. 0 0 Condition comparison is not performed (Initial value)
  30651.  
  30652. 1 Read cycle is used as break condition
  30653.  
  30654. 1 0 Write cycle is used as break condition
  30655.  
  30656. 1 Read cycle or write cycle is used as break condition
  30657.  
  30658. Bits 6, 1, and 0—Operand Size Select A (SZA2–SZA0): These bits select the operand size of
  30659. the bus cycle used as a channel A break condition.
  30660.  
  30661. Bit 6: SZA2 Bit 1: SZA1 Bit 0: SZA0 Description
  30662.  
  30663. 0 0 0 Operand size is not included in break conditions
  30664. (Initial value)
  30665.  
  30666. 1 Byte access is used as break condition
  30667.  
  30668. 1 0 Word access is used as break condition
  30669.  
  30670. 1 Longword access is used as break condition
  30671.  
  30672. 1 0 0 Quadword access is used as break condition
  30673.  
  30674. 1 Reserved (cannot be set)
  30675.  
  30676. 1 * Reserved (cannot be set)
  30677.  
  30678. Note: *: Don’t care
  30679.  
  30680. Rev. 2.0, 02/99, page 662 of 830
  30681.  
  30682. ----------------------- Page 677-----------------------
  30683.  
  30684. 20.2.6 Break Address Register B (BARB)
  30685.  
  30686. BARB is the channel B break address register. The bit configuration is the same as for BARA.
  30687.  
  30688. 20.2.7 Break ASID Register B (BASRB)
  30689.  
  30690. BASRB is the channel B break ASID register. The bit configuration is the same as for BASRA.
  30691.  
  30692. 20.2.8 Break Address Mask Register B (BAMRB)
  30693.  
  30694. BAMRB is the channel B break address mask register. The bit configuration is the same as for
  30695. BAMRA.
  30696.  
  30697. 20.2.9 Break Data Register B (BDRB)
  30698.  
  30699. Bit: 31 30 29 28 27 26 25 24
  30700.  
  30701. BDB31 BDB30 BDB29 BDB28 BDB27 BDB26 BDB25 BDB24
  30702.  
  30703. Initial value: * * * * * * * *
  30704.  
  30705. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30706.  
  30707. Bit: 23 22 21 20 19 18 17 16
  30708.  
  30709. BDB23 BDB22 BDB21 BDB20 BDB19 BDB18 BDB17 BDB16
  30710.  
  30711. Initial value: * * * * * * * *
  30712.  
  30713. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30714.  
  30715. Bit: 15 14 13 12 11 10 9 8
  30716.  
  30717. BDB15 BDB14 BDB13 BDB12 BDB11 BDB10 BDB9 BDB8
  30718.  
  30719. Initial value: * * * * * * * *
  30720.  
  30721. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30722.  
  30723. Bit: 7 6 5 4 3 2 1 0
  30724.  
  30725. BDB7 BDB6 BDB5 BDB4 BDB3 BDB2 BDB1 BDB0
  30726.  
  30727. Initial value: * * * * * * * *
  30728.  
  30729. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30730.  
  30731. Note: *: Undefined
  30732.  
  30733. Break data register B (BDRB) is a 32-bit readable/writable register that specifies the data (bits
  30734. 31–0) to be used in the channel B break conditions. BDRB is not initialized by a power-on reset
  30735. or manual reset.
  30736.  
  30737. Rev. 2.0, 02/99, page 663 of 830
  30738.  
  30739. ----------------------- Page 678-----------------------
  30740.  
  30741. Bits 31 to 0—Break Data B31 to B0 (BDB31–BDB0): These bits hold the data (bits 31–0) to
  30742. be used in the channel B break conditions.
  30743.  
  30744. 20.2.10 Break Data Mask Register B (BDMRB)
  30745.  
  30746. Bit: 31 30 29 28 27 26 25 24
  30747.  
  30748. BDMB31 BDMB30 BDMB29 BDMB28 BDMB27 BDMB26 BDMB25 BDMB24
  30749.  
  30750. Initial value: * * * * * * * *
  30751.  
  30752. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30753.  
  30754. Bit: 23 22 21 20 19 18 17 16
  30755.  
  30756. BDMB23 BDMB22 BDMB21 BDMB20 BDMB19 BDMB18 BDMB17 BDMB16
  30757.  
  30758. Initial value: * * * * * * * *
  30759.  
  30760. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30761.  
  30762. Bit: 15 14 13 12 11 10 9 8
  30763.  
  30764. BDMB15 BDMB14 BDMB13 BDMB12 BDMB11 BDMB10 BDMB9 BDMB8
  30765.  
  30766. Initial value: * * * * * * * *
  30767.  
  30768. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30769.  
  30770. Bit: 7 6 5 4 3 2 1 0
  30771.  
  30772. BDMB7 BDMB6 BDMB5 BDMB4 BDMB3 BDMB2 BDMB1 BDMB0
  30773.  
  30774. Initial value: * * * * * * * *
  30775.  
  30776. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30777.  
  30778. Note: *: Undefined
  30779.  
  30780. Break data mask register B (BDMRB) is a 32-bit readable/writable register that specifies which
  30781. bits of the break data set in BDRB are to be masked. BDMRB is not initialized by a power-on
  30782. reset or manual reset.
  30783.  
  30784. Rev. 2.0, 02/99, page 664 of 830
  30785.  
  30786. ----------------------- Page 679-----------------------
  30787.  
  30788. Bits 31 to 0—Break Data Mask B31 to B0 (BDMB31–BDMB0): These bits specify whether
  30789. the corresponding bit of the channel B break data (BDB31–BDB0) set in BDRB is to be masked.
  30790.  
  30791. Bit 31–0: BDMBn Description
  30792.  
  30793. 0 Channel B break data bit BDBn is included in break conditions
  30794.  
  30795. 1 Channel B break data bit BDBn is masked, and not included in break
  30796. conditions
  30797.  
  30798. n = 31 to 0
  30799. Note: When the data bus value is included in the break conditions, the operand size should be
  30800. specified. When byte size is specified, set the same data in bits 15–8 and 7–0 of BDRB
  30801. and BDMRB.
  30802.  
  30803. 20.2.11 Break Bus Cycle Register B (BBRB)
  30804.  
  30805. BBRB is the channel B bus break register. The bit configuration is the same as for BBRA.
  30806.  
  30807. 20.2.12 Break Control Register (BRCR)
  30808.  
  30809. Bit: 15 14 13 12 11 10 9 8
  30810.  
  30811. CMFA CMFB — — — PCBA — —
  30812.  
  30813. Initial value: 0 0 0 0 0 * 0 0
  30814.  
  30815. R/W: R/W R/W R R R R/W R R
  30816.  
  30817. Bit: 7 6 5 4 3 2 1 0
  30818.  
  30819. DBEB PCBB — — SEQ — — UBDE
  30820.  
  30821. Initial value: * * 0 0 * 0 0 0
  30822.  
  30823. R/W: R/W R/W R R R/W R R R/W
  30824.  
  30825. Note: *: Undefined
  30826.  
  30827. The break control register (BRCR) is a 16-bit readable/writable register that specifies (1)
  30828. whether channels A and B are to be used as two independent channels or in a sequential
  30829. condition, (2) whether the break is to be effected before or after instruction execution, (3)
  30830. whether the BDRB register is to be included in the channel B break conditions, and (4) whether
  30831. the user break debug function is to be used. BRCR also contains condition match flags. The
  30832. CMFA, CMFB, and UBDE bits in BRCR are initialized to 0 by a power-on reset, but retain their
  30833. value in standby mode. The value of the PCBA, DBEB, PCBB, and SEQ bits is undefined after a
  30834. power-on reset or manual reset, so these bits should be initialized by software as necessary.
  30835.  
  30836. Rev. 2.0, 02/99, page 665 of 830
  30837.  
  30838. ----------------------- Page 680-----------------------
  30839.  
  30840. Bit 15—Condition Match Flag A (CMFA): Set to 1 when a break condition set for channel A
  30841. is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once being set,
  30842. it should be cleared with a write.)
  30843.  
  30844. Bit 15: CMFA Description
  30845.  
  30846. 0 Channel A break condition is not matched (Initial value)
  30847.  
  30848. 1 Channel A break condition match has occurred
  30849.  
  30850. Bit 14—Condition Match Flag B (CMFB): Set to 1 when a break condition set for channel B
  30851. is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once being set,
  30852. it should be cleared with a write.)
  30853.  
  30854. Bit 14: CMFB Description
  30855.  
  30856. 0 Channel B break condition is not matched (Initial value)
  30857.  
  30858. 1 Channel B break condition match has occurred
  30859.  
  30860. Bits 13 to 11—Reserved: These bits are always read as 0, and should only be written with 0.
  30861.  
  30862. Bit 10—Instruction Access Break Select A (PCBA): Specifies whether a channel A instruction
  30863. access cycle break is to be effected before or after the instruction is executed. This bit is not
  30864. initialized by a power-on reset or manual reset.
  30865.  
  30866. Bit 10: PCBA Description
  30867.  
  30868. 0 Channel A PC break is effected before instruction execution
  30869.  
  30870. 1 Channel A PC break is effected after instruction execution
  30871.  
  30872. Bits 9 and 8—Reserved: These bits are always read as 0, and should only be written with 0.
  30873.  
  30874. Bit 7—Data Break Enable B (DBEB): Specifies whether the data bus condition is to be
  30875. included in the channel B break conditions. This bit is not initialized by a power-on reset or
  30876. manual reset.
  30877.  
  30878. Bit 7: DBEB Description
  30879.  
  30880. 0 Data bus condition is not included in channel B conditions
  30881.  
  30882. 1 Data bus condition is included in channel B conditions
  30883.  
  30884. Note: When the data bus is included in the break conditions, bits IDB1–0 in break bus cycle
  30885. register B (BBRB) should be set to 10 or 11.
  30886.  
  30887. Rev. 2.0, 02/99, page 666 of 830
  30888.  
  30889. ----------------------- Page 681-----------------------
  30890.  
  30891. Bit 6—PC Break Select B (PCBB): Specifies whether a channel B instruction access cycle
  30892. break is to be effected before or after the instruction is executed. This bit is not initialized by a
  30893. power-on reset or manual reset.
  30894.  
  30895. Bit 6: PCBB Description
  30896.  
  30897. 0 Channel B PC break is effected before instruction execution
  30898.  
  30899. 1 Channel B PC break is effected after instruction execution
  30900.  
  30901. Bits 5 and 4—Reserved: These bits are always read as 0, and should only be written with 0.
  30902.  
  30903. Bit 3—Sequence Condition Select (SEQ): Specifies whether the conditions for channels A and
  30904. B are to be independent or sequential. This bit is not initialized by a power-on reset or manual
  30905. reset.
  30906.  
  30907. Bit 3: SEQ Description
  30908.  
  30909. 0 Channel A and B comparisons are performed as independent conditions
  30910.  
  30911. 1 Channel A and B comparisons are performed as sequential conditions
  30912. (channel A → channel B)
  30913.  
  30914. Bits 2 and 1—Reserved: These bits are always read as 0, and should only be written with 0.
  30915.  
  30916. Bit 0—User Break Debug Enable (UBDE): Specifies whether the user break debug function
  30917. (see section 20.4, User Break Debug Support Function) is to be used.
  30918.  
  30919. Bit 0: UBDE Description
  30920.  
  30921. 0 User break debug function is not used (Initial value)
  30922.  
  30923. 1 User break debug function is used
  30924.  
  30925. Rev. 2.0, 02/99, page 667 of 830
  30926.  
  30927. ----------------------- Page 682-----------------------
  30928.  
  30929. 20.3 Operation
  30930.  
  30931. 20.3.1 Explanation of Terms Relating to Accesses
  30932.  
  30933. An instruction access is an access that obtains an instruction. An operand access is any memory
  30934. access for the purpose of instruction execution. For example, the access to address PC+disp×2+4
  30935. in the instruction MOV.W @(disp,PC), Rn (an access very close to the program counter) is an
  30936. operand access. The fetching of an instruction from the branch destination when a branch
  30937. instruction is executed is also an instruction access. As the term “data” is used to distinguish
  30938. data from an address, the term “operand access” is used in this section.
  30939.  
  30940. In the SH7750, all operand accesses are treated as either read accesses or write accesses. The
  30941. following instructions require special attention:
  30942.  
  30943. • PREF, OCBP, and OCBWB instructions: Treated as read accesses.
  30944. • MOVCA and OCBI instructions: Treated as write accesses.
  30945. • TAS instruction: Treated as one read access and one write access.
  30946.  
  30947. The operand accesses for the PREF, OCBP, OCBWB, and OCBI instructions are accesses with
  30948. no access data.
  30949.  
  30950. The SH7750 handles all operand accesses as having a data size. The data size can be byte, word,
  30951. longword, or quadword. The operand data size for the PREF, OCBP, OCBWB, MOVCA, and
  30952. OCBI instructions is treated as longword.
  30953.  
  30954. Rev. 2.0, 02/99, page 668 of 830
  30955.  
  30956. ----------------------- Page 683-----------------------
  30957.  
  30958. 20.3.2 Explanation of Terms Relating to Instruction Intervals
  30959.  
  30960. In this section, “1 (2, 3, ...) instruction(s) after...”, as a measure of the distance between two
  30961. instructions, is defined as follows. A branch is counted as an interval of two instructions.
  30962.  
  30963. • Example of sequence of instructions with no branch:
  30964. 100 Instruction A (0 instructions after instruction A)
  30965. 102 Instruction B (1 instruction after instruction A)
  30966. 104 Instruction C (2 instructions after instruction A)
  30967. 106 Instruction D (3 instructions after instruction A)
  30968.  
  30969. • Example of sequence of instructions with a branch (however, the example of a sequence of
  30970. instructions with no branch should be applied when the branch destination of a delayed
  30971. branch instruction is the instruction itself + 4):
  30972. 100 Instruction A: BT/S L200 (0 instructions after instruction A)
  30973. 102 Instruction B (1 instruction after instruction A, 0 instructions after instruction
  30974. B)
  30975. L200 200 Instruction C (3 instructions after instruction A, 2 instructions after instruction
  30976. B)
  30977. 202 Instruction D (4 instructions after instruction A, 3 instructions after instruction
  30978. B)
  30979.  
  30980. 20.3.3 User Break Operation Sequence
  30981.  
  30982. The sequence of operations from setting of break conditions to user break exception handling is
  30983. described below.
  30984.  
  30985. 1. Specify pre- or post-execution breaking in the case of an instruction access, inclusion or
  30986. exclusion of the data bus value in the break conditions in the case of an operand access, and
  30987. use of independent or sequential channel A and B break conditions, in the break control
  30988. register (BRCR). Set the break addresses in the break address registers for each channel
  30989. (BARA, BARB), the ASIDs corresponding to the break space in the break ASID registers
  30990. (BASRA, BASRB), and the address and ASID masking methods in the break address mask
  30991. registers (BAMRA, BAMRB). If the data bus value is to be included in the break conditions,
  30992. also set the break data in the break data register (BDRB) and the data mask in the break data
  30993. mask register (BDMRB).
  30994.  
  30995. 2. Set the break bus conditions in the break bus cycle registers (BBRA, BBRB). If even one of
  30996. the BBRA/BBRB instruction access/operand access select (ID bit) and read/write select
  30997. groups (RW bit) is set to 00, a user break interrupt will not be generated on the
  30998. corresponding channel. Make the BBRA and BBRB settings after all other break-related
  30999. register settings have been completed. If breaks are enabled with BBRA/BBRB while the
  31000.  
  31001. Rev. 2.0, 02/99, page 669 of 830
  31002.  
  31003. ----------------------- Page 684-----------------------
  31004.  
  31005. break address, data, or mask register, or the break control register is in the initial state after a
  31006. reset, a break may be generated inadvertently.
  31007.  
  31008. 3. The operation when a break condition is satisfied depends on the BL bit (in the CPU’s SR
  31009. register). When the BL bit is 0, exception handling is started and the condition match flag
  31010. (CMFA/CMFB) for the respective channel is set for the matched condition. When the BL bit
  31011. is 1, the condition match flag (CMFA/CMFB) for the respective channel is set for the
  31012. matched condition but exception handling is not started.
  31013. The condition match flags (CMFA, CMFB) are set by a branch condition match, but are not
  31014. reset. Therefore, a memory store instruction should be used on the BRCR register to clear the
  31015. flags to 0. See section 20.3.6, Condition Match Flag Setting, for the exact setting conditions
  31016. for the condition match flags.
  31017.  
  31018. 4. When sequential condition mode has been selected, and the channel B condition is matched
  31019. after the channel A condition has been matched, a break is effected at the instruction at
  31020. which the channel B condition was matched. See section 20.3.8, Contiguous A and B
  31021. Settings for Sequential Conditions, for the operation when the channel A condition match
  31022. and channel B condition match occur close together. With sequential conditions, only the
  31023. channel B condition match flag is set. When sequential condition mode has been selected, if
  31024. it is wished to clear the channel A match when the channel A condition has been matched
  31025. but the channel B condition has not yet been matched, this can be done by writing 0 to the
  31026. SEQ bit in the BRCR register.
  31027.  
  31028. 20.3.4 Instruction Access Cycle Break
  31029.  
  31030. 1. When an instruction access/read/word setting is made in the break bus cycle register
  31031. (BBRA/BBRB), an instruction access cycle can be used as a break condition. In this case,
  31032. breaking before or after execution of the relevant instruction can be selected with the
  31033. PCBA/PCBB bit in the break control register (BRCR). When an instruction access cycle is
  31034. used as a break condition, clear the LSB of the break address registers (BARA, BARB) to 0.
  31035. A break will not be generated if this bit is set to 1.
  31036.  
  31037. 2. When a pre-execution break is specified, the break is effected when it is confirmed that the
  31038. instruction is to be fetched and executed. Therefore, an overrun-fetched instruction (an
  31039. instruction that is fetched but not executed when a branch or exception occurs) cannot be
  31040. used in a break. However, if a TLB miss or TLB protection violation exception occurs at the
  31041. time of the fetch of an instruction subject to a break, the break exception handling is carried
  31042. out first. The instruction TLB exception handling is performed when the instruction is re-
  31043. executed (see section 5.4, Exception Types and Priorities). Also, since a delayed branch
  31044. instruction and the delay slot instruction are executed as a single instruction, if a pre-
  31045. execution break is specified for a delay slot instruction, the break will be effected before
  31046. execution of the delayed branch instruction. However, a pre-execution break cannot be
  31047. specified for the delay slot instruction for an RTE instruction.
  31048.  
  31049. Rev. 2.0, 02/99, page 670 of 830
  31050.  
  31051. ----------------------- Page 685-----------------------
  31052.  
  31053. 3. With a pre-execution break, the instruction set as a break condition is executed, then a break
  31054. interrupt is generated before the next instruction is executed. When a post-execution break is
  31055. set for a delayed branch instruction, the delay slot is executed and the break is effected
  31056. before execution of the instruction at the branch destination (when the branch is made) or the
  31057. instruction two instructions ahead of the branch instruction (when the branch is not made).
  31058.  
  31059. 4. When an instruction access cycle is set for channel B, break data register B (BDRB) is
  31060. ignored in judging whether there is an instruction access match. Therefore, a break condition
  31061. specified by the DBEB bit in BRCR is not executed.
  31062.  
  31063. 20.3.5 Operand Access Cycle Break
  31064.  
  31065. 1. In the case of an operand access cycle break, the bits included in address bus comparison
  31066. vary as shown below according to the data size specification in the break bus cycle register
  31067. (BBRA/BBRB).
  31068.  
  31069. Data Size Address Bits Compared
  31070.  
  31071. Quadword (100) Address bits A31–A3
  31072.  
  31073. Longword (011) Address bits A31–A2
  31074.  
  31075. Word (010) Address bits A31–A1
  31076.  
  31077. Byte (001) Address bits A31–A0
  31078.  
  31079. Not included in condition (000) In quadword access, address bits A31–A3
  31080.  
  31081. In longword access, address bits A31–A2
  31082.  
  31083. In word access, address bits A31–A1
  31084.  
  31085. In byte access, address bits A31–A0
  31086.  
  31087. 2. When data value is included in break conditions in channel B
  31088. When a data value is included in the break conditions, set the DBEB bit in the break control
  31089. register (BRCR) to 1. In this case, break data register B (BDRB) and break data mask
  31090. register B (BDMRB) settings are necessary in addition to the address condition. A user break
  31091. interrupt is generated when all three conditions—address, ASID, and data—are matched.
  31092. When a quadword access occurs, the 64-bit access data is divided into an upper 32 bits and
  31093. lower 32 bits, and interpreted as two 32-bit data units. A break is generated if either of the
  31094. 32-bit data units satisfies the data match condition.
  31095. Set the IDB1–0 bits in break bus cycle register B (BBRB) to 10 or 11. When byte data is
  31096. specified, the same data should be set in the two bytes comprising bits 15–8 and bits 7–0 in
  31097. break data register B (BDRB) and break data mask register B (BDMRB). When word or byte
  31098. is set, bits 31–16 of BDRB and BDMRB are ignored.
  31099.  
  31100. 3. When the DBEB bit in the break control register (BRCR) is set to 1, a break is not generated
  31101. by an operand access with no access data (an operand access in a PREF, OCBP, OCBWB, or
  31102. OCBI instruction).
  31103.  
  31104. Rev. 2.0, 02/99, page 671 of 830
  31105.  
  31106. ----------------------- Page 686-----------------------
  31107.  
  31108. 20.3.6 Condition Match Flag Setting
  31109.  
  31110. 1. Instruction access with post-execution condition, or operand access
  31111. The flag is set when execution of the instruction that causes the break is completed. As an
  31112. exception to this, however, in the case of an instruction with more than one operand access
  31113. the flag may be set on detection of the match condition alone, without waiting for execution
  31114. of the instruction to be completed.
  31115. Example 1:
  31116. 100 BT L200 (branch performed)
  31117. 102 Instruction (operand access break on channel A) → flag not set
  31118. Example 2:
  31119. 110 FADD (FPU exception)
  31120. 112 Instruction (operand access break on channel A) → flag not set
  31121.  
  31122. 2. Instruction access with pre-execution condition
  31123. The flag is set when the break match condition is detected.
  31124. Example 1:
  31125. 110 Instruction (pre-execution break on channel A) → flag set
  31126. 112 Instruction (pre-execution break on channel B) → flag not set
  31127. Example 2:
  31128. 110 Instruction (pre-execution break on channel B, instruction access TLB miss) → flag set
  31129.  
  31130. 20.3.7 Program Counter (PC) Value Saved
  31131.  
  31132. 1. When instruction access (pre-execution) is set as a break condition, the program counter (PC)
  31133. value saved to SPC in user break interrupt handling is the address of the instruction at which
  31134. the break condition match occurred. In this case, a user break interrupt is generated and the
  31135. fetched instruction is not executed.
  31136. 2. When instruction access (post-execution) is set as a break condition, the program counter
  31137. (PC) value saved to SPC in user break interrupt handling is the address of the instruction to
  31138. be executed after the instruction at which the break condition match occurred. In this case,
  31139. the fetched instruction is executed, and a user break interrupt is generated before execution
  31140. of the next instruction.
  31141. 3. When an instruction access (post-execution) break condition is set for a delayed branch
  31142. instruction, the delay slot instruction is executed and a user break is effected before
  31143. execution of the instruction at the branch destination (when the branch is made) or the
  31144. instruction two instructions ahead of the branch instruction (when the branch is not made). In
  31145. this case, the PC value saved to SPC is the address of the branch destination (when the
  31146. branch is made) or the instruction following the delay slot instruction (when the branch is not
  31147. made).
  31148.  
  31149. Rev. 2.0, 02/99, page 672 of 830
  31150.  
  31151. ----------------------- Page 687-----------------------
  31152.  
  31153. 4. When operand access (address only) is set as a break condition, the address of the instruction
  31154. to be executed after the instruction at which the condition match occurred is saved to SPC.
  31155. 5. When operand access (address + data) is set as a break condition, execution of the instruction
  31156. at which the condition match occurred is completed. A user break interrupt is generated
  31157. before execution of instructions from one instruction later to four instructions later. It is not
  31158. possible to specify at which instruction, from one later to four later, the interrupt will be
  31159. generated. The start address of the instruction after the instruction for which execution is
  31160. completed at the point at which user break interrupt handling is started is saved to SPC. If an
  31161. instruction between one instruction later and four instructions later causes another exception,
  31162. control is performed as follows. Designating the exception caused by the break as exception
  31163. 1, and the exception caused by an instruction between one instruction later and four
  31164. instructions later as exception 2, the fact that memory updating and register updating that
  31165. essentially cannot be performed by exception 2 cannot be performed is guaranteed
  31166. irrespective of the existence of exception 1. The program counter value saved is the address
  31167. of the first instruction for which execution is suppressed. Whether exception 1 or exception 2
  31168. is used for the exception jump destination and the value written to the exception register
  31169. (EXPEVT/INTEVT) is not guaranteed. However, if exception 2 is from a source not
  31170. synchronized with an instruction (external interrupt or peripheral module interrupt),
  31171. exception 1 is used for the exception jump destination and the value written to the exception
  31172. register (EXPEVT/INTEVT).
  31173.  
  31174. 20.3.8 Contiguous A and B Settings for Sequential Conditions
  31175.  
  31176. When channel A match and channel B match timings are close together, a sequential break may
  31177. not be guaranteed. Rules relating to the guaranteed range are given below.
  31178.  
  31179. 1. Instruction access matches on both channel A and channel B
  31180.  
  31181. Instruction B is 0 instructions after Equivalent to setting the same address. Do not use
  31182. instruction A this setting.
  31183.  
  31184. Instruction B is 1 instruction after Sequential operation is not guaranteed.
  31185. instruction A
  31186.  
  31187. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  31188. after instruction A
  31189.  
  31190. 2. Instruction access match on channel A, operand access match on channel B
  31191.  
  31192. Instruction B is 0 or 1 instruction after Sequential operation is not guaranteed.
  31193. instruction A
  31194.  
  31195. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  31196. after instruction A
  31197.  
  31198. Rev. 2.0, 02/99, page 673 of 830
  31199.  
  31200. ----------------------- Page 688-----------------------
  31201.  
  31202. 3. Operand access match on channel A, instruction access match on channel B
  31203.  
  31204. Instruction B is 0 to 3 instructions after Sequential operation is not guaranteed.
  31205. instruction A
  31206.  
  31207. Instruction B is 4 or more instructions Sequential operation is guaranteed.
  31208. after instruction A
  31209.  
  31210. 4. Operand access matches on both channel A and channel B
  31211. Do not make a setting such that a single operand access will match the break conditions of
  31212. both channel A and channel B. There are no other restrictions. For example, sequential
  31213. operation is guaranteed even if two accesses within a single instruction match channel A and
  31214. channel B conditions in turn.
  31215.  
  31216. 20.3.9 Usage Notes
  31217.  
  31218. 1. Do not execute a post-execution instruction access break for the SLEEP instruction.
  31219. 2. Do not make an operand access break setting between 1 and 3 instructions before a SLEEP
  31220. instruction.
  31221. 3. The value of the BL bit referenced in a user break exception depends on the break setting, as
  31222. follows.
  31223. a. Pre-execution instruction access break: The BL bit value before the executed instruction
  31224. is referenced.
  31225. b. Post-execution instruction access break: The OR of the BL bit values before and after the
  31226. executed instruction is referenced.
  31227. c. Operand access break (address/data): The BL bit value after the executed instruction is
  31228. referenced.
  31229. d. In the case of an instruction that modifies the BL bit
  31230.  
  31231. SL.BL Pre- Post- Pre- Post- Operand Access
  31232. Execution Execution Execution Execution (Address/Data)
  31233. Instruction Instruction Instruction Instruction
  31234. Access Access Access Access
  31235.  
  31236. 0 → 0 A A A A A
  31237.  
  31238. 1 → 0 M M M M A
  31239.  
  31240. 0 → 1 A M A M M
  31241.  
  31242. 1 → 1 M M M M M
  31243.  
  31244. A: Accepted
  31245. M: Masked
  31246.  
  31247. Rev. 2.0, 02/99, page 674 of 830
  31248.  
  31249. ----------------------- Page 689-----------------------
  31250.  
  31251. e. In the case of an RTE delay slot
  31252. The BL bit value before execution of a delay slot instruction is the same as the BL bit
  31253. value before execution of an RTE instruction. The BL bit value after execution of a delay
  31254. slot instruction is the same as the first BL bit value for the first instruction executed on
  31255. returning by means of an RTE instruction (the same as the value of the BL bit in SSR
  31256. before execution of the RTE instruction).
  31257. f. If an interrupt or exception is accepted with the BL bit cleared to 0, the value of the BL
  31258. bit before execution of the first instruction of the exception handling routine is 1.
  31259.  
  31260. 4. If channels A and B both match independently at virtually the same time, and, as a result, the
  31261. SPC value is the same for both user break interrupts, only one user break interrupt is
  31262. generated, but both the CMFA bit and the CMFB bit are set. For example:
  31263. 110 Instruction (post-execution instruction break on channel A) → SPC = 112, CMFA = 1
  31264. 112 Instruction (pre-execution instruction break on channel B) → SPC = 112, CMFB = 1
  31265.  
  31266. 5. The PCBA or PCBB bit in BRCR is invalid for an instruction access break setting.
  31267.  
  31268. 6. When the SEQ bit in BRCR is 1, the internal sequential break state is initialized by a channel
  31269. B condition match. For example: A → A → B (user break generated) → B (no break
  31270. generated)
  31271.  
  31272. 7. In the event of contention between a re-execution type exception and a post-execution break
  31273. in a multistep instruction, the re-execution type exception is generated. In this case, the CMF
  31274. bit may or may not be set to 1 when the break condition occurs.
  31275.  
  31276. 8. A post-execution break is classified as a completion type exception. Consequently, in the
  31277. event of contention between a completion type exception and a post-execution break, the
  31278. post-execution break is suppressed in accordance with the priorities of the two events. For
  31279. example, in the case of contention between a TRAPA instruction and a post-execution break,
  31280. the user break is suppressed. However, in this case, the CMF bit is set by the occurrence of
  31281. the break condition.
  31282.  
  31283. 20.4 User Break Debug Support Function
  31284.  
  31285. The user break debug support function enables the processing used in the event of a user break
  31286. exception to be changed. When a user break exception occurs, if the UBDE bit is set to 1 in the
  31287. BRCR register, the DBR register value will be used as the branch destination address instead of
  31288. [VBR + offset]. The value of R15 is saved in the SGR register regardless of the value of the
  31289. UBDE bit in the BRCR register or the kind of exception event. A flowchart of the user break
  31290. debug support function is shown in figure 20.2.
  31291.  
  31292. Rev. 2.0, 02/99, page 675 of 830
  31293.  
  31294. ----------------------- Page 690-----------------------
  31295.  
  31296. Exception/interrupt
  31297. generation
  31298.  
  31299. Hardware operation
  31300. SPC ← PC
  31301. SSR ← SR
  31302. SR.BL ← B'1
  31303.  
  31304. SR.MD ← B'1
  31305.  
  31306. SR.RB ← B'1
  31307.  
  31308. Exception Exception/ Trap
  31309. interrupt/trap?
  31310.  
  31311. Interrupt
  31312.  
  31313. EXPEVT ← exception code INTEVT ← interrupt code TRA ← TRAPA (imm)
  31314.  
  31315. SGR ← R15
  31316.  
  31317. No Yes
  31318. Reset exception?
  31319.  
  31320. Yes (BRCR.UBDE == 1) && No
  31321. (user break exception)?
  31322.  
  31323. PC ← DBR PC ← VBR + vector offset PC ← H'A0000000
  31324.  
  31325. Debug program Exception handler
  31326.  
  31327. R15 ← SGR
  31328. (STC instruction)
  31329.  
  31330. Execute RTE instruction
  31331. PC ← SPC
  31332. SR ← SSR
  31333.  
  31334. End of exception
  31335. operations
  31336.  
  31337. Figure 20.2 User Break Debug Support Function Flowchart
  31338.  
  31339. Rev. 2.0, 02/99, page 676 of 830
  31340.  
  31341. ----------------------- Page 691-----------------------
  31342.  
  31343. 20.5 Examples of Use
  31344.  
  31345. Instruction Access Cycle Break Condition Settings
  31346.  
  31347. • Register settings: BASRA = H'80 / BARA = H'00000404 / BAMRA = H'00 /
  31348. BBRA = H'0014 / BASRB = H'70 / BARB = H'00008010 / BAMRB = H'01 /
  31349. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0400
  31350.  
  31351. Conditions set: Independent channel A/channel B mode
  31352.  Channel A: ASID: H'80 / address: H'00000404 / address mask: H'00
  31353. Bus cycle: instruction access (post-instruction-execution), read (operand size not included
  31354. in conditions)
  31355.  Channel B: ASID: H'70 / address: H'00008010 / address mask: H'01
  31356. Data: H'00000000 / data mask: H'00000000
  31357. Bus cycle: instruction access (pre-instruction-execution), read (operand size not included
  31358. in conditions)
  31359.  
  31360. A user break is generated after execution of the instruction at address H'00000404 with
  31361. ASID = H'80, or before execution of an instruction at addresses H'00008000–H'000083FE
  31362. with ASID = H'70.
  31363.  
  31364. • Register settings: BASRA = H'80 / BARA = H'00037226 / BAMRA = H'00 /
  31365. BBRA = H'0016 / BASRB = H'70 / BARB = H'0003722E / BAMRB = H'00 /
  31366. BBRB = H'0016 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0008
  31367.  
  31368. Conditions set: Channel A → channel B sequential mode
  31369.  Channel A: ASID: H'80 / address: H'00037226 / address mask: H'00
  31370. Bus cycle: instruction access (pre-instruction-execution), read, word
  31371.  Channel B: ASID: H'70 / address: H'0003722E / address mask: H'00
  31372. Data: H'00000000 / data mask: H'00000000
  31373. Bus cycle: instruction access (pre-instruction-execution), read, word
  31374.  
  31375. The instruction at address H'00037266 with ASID = H'80 is executed, then a user break is
  31376. generated before execution of the instruction at address H'0003722E with ASID = H'70.
  31377.  
  31378. Rev. 2.0, 02/99, page 677 of 830
  31379.  
  31380. ----------------------- Page 692-----------------------
  31381.  
  31382. • Register settings: BASRA = H'80 / BARA = H'00027128 / BAMRA = H'00 /
  31383. BBRA = H'001A / BASRB = H'70 / BARB = H'00031415 / BAMRB = H'00 /
  31384. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0000
  31385.  
  31386. Conditions set: Independent channel A/channel B mode
  31387.  Channel A: ASID: H'80 / address: H'00027128 / address mask: H'00
  31388. Bus cycle: CPU, instruction access (pre-instruction-execution), write, word
  31389.  Channel B: ASID: H'70 / address: H'00031415 / address mask: H'00
  31390. Data: H'00000000 / data mask: H'00000000
  31391. Bus cycle: CPU, instruction access (pre-instruction-execution), read (operand size not
  31392. included in conditions)
  31393.  
  31394. A user break interrupt is not generated on channel A since the instruction access is not a
  31395. write cycle.
  31396. A user break interrupt is not generated on channel B since instruction access is performed on
  31397. an even address.
  31398.  
  31399. Operand Access Cycle Break Condition Settings
  31400.  
  31401. • Register settings: BASRA = H'80 / BARA = H'00123456 / BAMRA = H'00 /
  31402. BBRA = H'0024 / BASRB = H'70/ BARB = H'000ABCDE / BAMRB = H'02 /
  31403. BBRB = H'002A / BDRB = H'0000A512 / BDMRB = H'00000000 / BRCR = H'0080
  31404.  
  31405. Conditions set: Independent channel A/channel B mode
  31406.  Channel A: ASID: H'80 / address: H'00123456 / address mask: H'00
  31407. Bus cycle: operand access, read (operand size not included in conditions)
  31408.  Channel B: ASID: H'70 / address: H'000ABCDE / address mask: H'02
  31409. Data: H'0000A512 / data mask: H'00000000
  31410. Bus cycle: operand access, write, word
  31411. Data break enabled
  31412.  
  31413. On channel A, a user break interrupt is generated in the event of a longword read at address
  31414. H'00123454, a word read at address H'00123456, or a byte read at address H'00123456, with
  31415. ASID = H'80.
  31416. On channel B, a user break interrupt is generated when H'A512 is written by word access to
  31417. any address from H'000AB000 to H'000ABFFE with ASID = H'70.
  31418.  
  31419. Rev. 2.0, 02/99, page 678 of 830
  31420.  
  31421. ----------------------- Page 693-----------------------
  31422.  
  31423. Section 21 Hitachi User Debug Interface (Hitachi-UDI)
  31424.  
  31425. 21.1 Overview
  31426.  
  31427. 21.1.1 Features
  31428.  
  31429. The Hitachi user debug interface (Hitachi-UDI) is a serial input/output interface conforming to
  31430. JTAG, IEEE 1149.1, and IEEE Standard Test Access Port and Boundary-Scan Architecture. The
  31431. SH7750’s Hitachi-UDI does not support boundary-scan, but is used for emulator connection. The
  31432. functions of this interface should not be used when using an emulator. Refer to the emulator
  31433. manual for the method of connecting the emulator. The Hitachi-UDI uses six pins (TCK, TMS,
  31434. TD, TDO, 7567, and $6(%5./BRKACK). The pin functions and serial transfer protocol
  31435. conform to the JTAG specifications.
  31436.  
  31437. Rev. 2.0, 02/99, page 679 of 830
  31438.  
  31439. ----------------------- Page 694-----------------------
  31440.  
  31441. 21.1.2 Block Diagram
  31442.  
  31443. Figure 21.1 shows a block diagram of the Hitachi-UDI. The TAP (test access port) controller and
  31444. control registers are reset independently of the chip reset pin by driving the 7567 pin low or
  31445. setting TMS to 1 and applying TCK for at least five clock cycles. The other circuits are reset and
  31446. initialized in an ordinary reset. The Hitachi-UDI circuit has four internal registers: SDBPR,
  31447. SDIR, SDDRH, and SDDRL (these last two together designated SDDR). The SDBPR register
  31448. supports the JTAG bypass mode, SDIR is the command register, and SDDR is the data register.
  31449. SDIR can be accessed directly from the TDI and TDO pins.
  31450.  
  31451. Interrupt/reset
  31452. Break etc.
  31453. ASEBRK/BRKACK
  31454. control
  31455.  
  31456. TCK
  31457.  
  31458. TAP
  31459. TMS Decoder
  31460. controller
  31461.  
  31462. TRST
  31463.  
  31464. TDI
  31465. s
  31466. u
  31467. SDIR b
  31468. e
  31469. r l
  31470. e u
  31471. t d
  31472. s
  31473. i o
  31474. g m
  31475. SDBPR e l
  31476. r
  31477. t a
  31478. f r
  31479. i SDDRH e
  31480. h
  31481. S h
  31482. p
  31483. i
  31484. SDDRL r
  31485. e
  31486. P
  31487. TDO MUX
  31488.  
  31489. Figure 21.1 Block Diagram of Hitachi-UDI Circuit
  31490.  
  31491. Rev. 2.0, 02/99, page 680 of 830
  31492.  
  31493. ----------------------- Page 695-----------------------
  31494.  
  31495. 21.1.3 Pin Configuration
  31496.  
  31497. Table 21.1 shows the Hitachi-UDI pin configuration.
  31498.  
  31499. Table 21.1 Hitachi-UDI Pins
  31500.  
  31501. Pin Name Abbreviation I/O Function When Not Used
  31502. Clock pin TCK Input Same as the JTAG serial clock input Open*1
  31503.  
  31504. pin. Data is transferred from data
  31505. input pin TDI to the Hitachi-UDI
  31506. circuit, and data is read from data
  31507. output pin TDO, in synchronization
  31508. with this signal.
  31509. Mode pin TMS Input The mode select input pin. Changing Open*1
  31510.  
  31511. this signal in synchronization with
  31512. TCK determines the meaning of the
  31513. data input from TDI. The protocol
  31514. conforms to the JTAG (IEEE Std
  31515. 1149.1) specification.
  31516. Reset pin 7567 Input The input pin that resets the Hitachi- 2
  31517. Fix at ground*
  31518. UDI. This signal is received
  31519. asynchronously with respect to TCK,
  31520. and effects a reset of the JTAG
  31521. interface circuit when low. 7567
  31522. must be driven low for a certain
  31523. period when powering on, regardless
  31524. of whether or not JTAG is used. This
  31525. differs from the IEEE specification.
  31526. Data input TDI Input The data input pin. Data is sent to Open*1
  31527.  
  31528. pin the Hitachi-UDI circuit by changing
  31529. this signal in synchronization with
  31530. TCK.
  31531.  
  31532. Data output TDO Output The data output pin. Data is sent to Open
  31533. pin the Hitachi-UDI circuit by reading this
  31534. signal in synchronization with TCK.
  31535. Emulator pin $6(%5./ Input/ Dedicated emulator pin Open*1
  31536.  
  31537. BRKACK output
  31538.  
  31539. Notes: 1. Pulled up inside the chip. When designing a board that allows use of an emulator, or
  31540. when using interrupts and resets via the Hitachi-UDI, there is no problem in
  31541. connecting a pullup resistance externally.
  31542. 2. When designing a board that enables the use of an emulator, or when using interrupts
  31543. and resets via the Hitachi-UDI, drive 7567 low for a period overlapping 5(6(7 at
  31544. power-on, and also provide for control by 7567 alone.
  31545.  
  31546. Rev. 2.0, 02/99, page 681 of 830
  31547.  
  31548. ----------------------- Page 696-----------------------
  31549.  
  31550. The maximum frequency of TCK (TMS, TDI, TDO) is 20 MHz. Make the TCK or SH7750 CPG
  31551. setting so that the TCK frequency is lower than that of the SH7750’s on-chip peripheral module
  31552. clock.
  31553.  
  31554. 21.1.4 Register Configuration
  31555.  
  31556. Table 21.2 shows the Hitachi-UDI registers. Except for SDBPR, these registers are mapped in
  31557. the control register space and can be referenced by the CPU.
  31558.  
  31559. Table 21.2 Hitachi-UDI Registers
  31560.  
  31561. Hitachi-UDI
  31562. CPU Side Side
  31563.  
  31564. Abbre- P4 Area 7 Access Access Initial
  31565. Name viation R/W Address Address Size R/W Size Value*
  31566.  
  31567. Instruction SDIR R H'FFF00000 H'1FF00000 16 R/W 16 H'FFFF
  31568. register
  31569.  
  31570. Data register H SDDR/ R/W H'FFF00008 H'1FF00008 32/16 — 32 Undefined
  31571. SDDRH
  31572.  
  31573. Data register L SDDRL R/W H'FFF0000A H'1FF0000A 16 — — Undefined
  31574.  
  31575. Bypass register SDBPR — — — — R/W 1 Undefined
  31576.  
  31577. Note: * Initialized when the 7567 pin goes low or when the TAP is in the Test-Logic-Reset state.
  31578.  
  31579. Rev. 2.0, 02/99, page 682 of 830
  31580.  
  31581. ----------------------- Page 697-----------------------
  31582.  
  31583. 21.2 Register Descriptions
  31584.  
  31585. 21.2.1 Instruction Register (SDIR)
  31586.  
  31587. The instruction register (SDIR) is a 16-bit register that can only be read by the CPU. In the
  31588. initial state, bypass mode is set. The value (command) is set from the serial input pin (TDI).
  31589. SDIR is initialized by the 7567 pin or in the TAP Test-Logic-Reset state. When this register is
  31590. written to from the Hitachi-UDI, writing is possible regardless of the CPU mode. However, if a
  31591. read is performed by the CPU while writing is in progress, it may not be possible to read the
  31592. correct value. In this case, SDIR should be read twice, and then read again if the read values do
  31593. not match. Operation is undefined if a reserved command is set in this register.
  31594.  
  31595. Bit: 15 14 13 12 11 10 9 8
  31596.  
  31597. TI3 TI2 TI1 TI0 — — — —
  31598.  
  31599. Initial value: 1 1 1 1 1 1 1 1
  31600.  
  31601. R/W: R R R R R R R R
  31602.  
  31603. Bit: 7 6 5 4 3 2 1 0
  31604.  
  31605. — — — — — — — —
  31606.  
  31607. Initial value: 1 1 1 1 1 1 1 1
  31608.  
  31609. R/W: R R R R R R R R
  31610.  
  31611. Bits 15 to 12—Test Instruction Bits (TI3–TI0)
  31612.  
  31613. Bit 15: TI3 Bit 14: TI2 Bit 13: TI1 Bit 12: TI0 Description
  31614.  
  31615. 0 0 — — Reserved
  31616.  
  31617. 1 0 — Reserved
  31618.  
  31619. 1 0 Hitachi-UDI reset negate
  31620.  
  31621. 1 Hitachi-UDI reset assert
  31622.  
  31623. 1 0 0 — Reserved
  31624.  
  31625. 1 — Hitachi-UDI interrupt
  31626.  
  31627. 1 0 — Reserved
  31628.  
  31629. 1 0 Reserved
  31630.  
  31631. 1 Bypass mode (Initial value)
  31632.  
  31633. Bits 11 to 0—Reserved: These bits are always read as 1, and should only be written with 1.
  31634.  
  31635. Rev. 2.0, 02/99, page 683 of 830
  31636.  
  31637. ----------------------- Page 698-----------------------
  31638.  
  31639. 21.2.2 Data Register (SDDR)
  31640.  
  31641. The data register (SDDR) is a 32-bit register, comprising the two 16-bit registers SDDRH and
  31642. SDDRL, that can be read and written to by the CPU. The value in this register is not initialized
  31643. by a 7567 or CPU reset.
  31644.  
  31645. Bit: 31 30 29 28 27 26 25 24
  31646.  
  31647. Initial value: * * * * * * * *
  31648.  
  31649. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31650.  
  31651. Bit: 23 22 21 20 19 18 17 16
  31652.  
  31653. Initial value: * * * * * * * *
  31654.  
  31655. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31656.  
  31657. Bit: 15 14 13 12 11 10 9 8
  31658.  
  31659. Initial value: * * * * * * * *
  31660.  
  31661. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31662.  
  31663. Bit: 7 6 5 4 3 2 1 0
  31664.  
  31665. Initial value: * * * * * * * *
  31666.  
  31667. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31668.  
  31669. Note: *: Undefined
  31670.  
  31671. Bits 31 to 0—DR Data: These bits store the SDDR value.
  31672.  
  31673. 21.2.3 Bypass Register (SDBPR)
  31674.  
  31675. The bypass register (SDBPR) is a one-bit register that cannot be accessed by the CPU. When
  31676. bypass mode is set in SDIR, SDBPR is connected between the TDI pin and TDO pin of the
  31677. Hitachi-UDI.
  31678.  
  31679. Rev. 2.0, 02/99, page 684 of 830
  31680.  
  31681. ----------------------- Page 699-----------------------
  31682.  
  31683. 21.3 Operation
  31684.  
  31685. 21.3.1 TAP Control
  31686.  
  31687. Figure 21.2 shows the internal states of the TAP control circuit. These conform to the state
  31688. transitions specified by JTAG.
  31689.  
  31690. • The transition condition is the TMS value at the rising edge of TCK.
  31691. • The TDI value is sampled at the rising edge of TCK, and shifted at the falling edge.
  31692. • The TDO value changes at the falling edge of TCK. When not in the Shift-DR or Shift-IR
  31693. state, TDO is in the high-impedance state.
  31694. • In a transition to 7567 = 0, a transition is made to the Test-Logic-Reset state
  31695. asynchronously with respect to TCK.
  31696.  
  31697. 1 Test-Logic-Reset
  31698.  
  31699. 0
  31700.  
  31701. 1 1 1
  31702. 0 Run-Test/Idle Select-DR-Scan Select-IR-Scan
  31703.  
  31704. 0 0
  31705.  
  31706. 1 1
  31707. Capture-DR Capture-IR
  31708.  
  31709. 0 0
  31710.  
  31711. Shift-DR 0 Shift-IR 0
  31712.  
  31713. 1 1
  31714.  
  31715. 1 1
  31716. Exit1-DR Exit1-IR
  31717.  
  31718. 0 0
  31719.  
  31720. Pause-DR 0 Pause-IR 0
  31721.  
  31722. 1 1
  31723.  
  31724. 0 0
  31725. Exit2-DR Exit2-IR
  31726.  
  31727. 1 1
  31728.  
  31729. Update-DR Update-IR
  31730.  
  31731. 1 0 1 0
  31732.  
  31733. Figure 21.2 TAP Control State Transition Diagram
  31734.  
  31735. Rev. 2.0, 02/99, page 685 of 830
  31736.  
  31737. ----------------------- Page 700-----------------------
  31738.  
  31739. 21.3.2 Hitachi-UDI Reset
  31740.  
  31741. A power-on reset is effected by an SDIR command. A reset is effected by sending a Hitachi-UDI
  31742. reset assert command, and then sending a Hitachi-UDI reset negate command, from the Hitachi-
  31743. UDI pin (see figure 21.3). The interval required between the Hitachi-UDI reset assert command
  31744. and the Hitachi-UDI reset negate command is the same as the length of time the reset pin is held
  31745. low in order to effect a power-on reset.
  31746.  
  31747. Hitachi-UDI Hitachi-UDI
  31748. Hitachi-UDI pin reset assert reset negate
  31749.  
  31750. Chip internal reset
  31751.  
  31752. CPU state Normal Reset Reset processing
  31753.  
  31754. Figure 21.3 Hitachi-UDI Reset
  31755.  
  31756. 21.3.3 Hitachi-UDI Interrupt
  31757.  
  31758. The Hitachi-UDI interrupt function generates an interrupt by setting a command value in SDIR
  31759. from the Hitachi-UDI. The Hitachi-UDI interrupt is of general exception/interrupt operation
  31760. type, with a branch to an address based on VBR and return effected by means of an RTE
  31761. instruction. The exception code stored in control register INTEVT in this case is H'600. The
  31762. priority of the Hitachi-UDI interrupt can be controlled with bits 3 to 0 of control register IPRC.
  31763.  
  31764. The Hitachi-UDI interrupt request signal is asserted for about eight SH7750 on-chip peripheral
  31765. clock cycles after the command is set. The number of assertion cycles is determined by the ratio
  31766. of TCK to the on-chip peripheral clock frequency. As the assertion period is limited, the CPU
  31767. may sometimes miss a request. The Hitachi-UDI interrupt command automatically changes to
  31768. the bypass command immediately after being set.
  31769.  
  31770. 21.3.4 Bypass
  31771.  
  31772. The Hitachi-UDI pins can be set to the bypass mode specified by JTAG by setting a command in
  31773. SDIR from the Hitachi-UDI.
  31774.  
  31775. Rev. 2.0, 02/99, page 686 of 830
  31776.  
  31777. ----------------------- Page 701-----------------------
  31778.  
  31779. 21.4 Usage Notes
  31780.  
  31781. 1. SDIR Command
  31782. Once an SDIR command has been set, it remains unchanged until initialization by asserting
  31783. 7567 or placing the TAP in the Test-Logic-Reset state, or until another command (other
  31784. than a Hitachi-UDI interrupt command) is written from the Hitachi-UDI.
  31785. 2. SDIR Commands in Sleep Mode
  31786. Sleep mode is cleared by a Hitachi-UDI interrupt or Hitachi-UDI reset, and these exception
  31787. requests are accepted in this mode. In standby mode, neither a Hitachi-UDI interrupt nor a
  31788. Hitachi-UDI reset is accepted..
  31789. 3. The Hitachi-UDI is used for emulator connection. Therefore, Hitachi-UDI functions cannot
  31790. be used when an emulator is used.
  31791. 4. The SH7750’s Hitachi-UDI pins must not be connected to a boundary-scan signal loop on the
  31792. board.
  31793.  
  31794. Rev. 2.0, 02/99, page 687 of 830
  31795.  
  31796. ----------------------- Page 702-----------------------
  31797.  
  31798. Rev. 2.0, 02/99, page 688 of 830
  31799.  
  31800. ----------------------- Page 703-----------------------
  31801.  
  31802. Section 22 Pin Description
  31803.  
  31804. 22.1 Pin Arrangement
  31805.  
  31806.  
  31807. K
  31808.  
  31809. ) ) ) C )
  31810. V V V A T V
  31811. 3 3. 3. K E 3
  31812. 3. 3 3 R 6 S 3.
  31813. ( (
  31814. B ( 1 2 B 1 2 B A E 2 (
  31815. N G G L L / S 1 0 S 2 2 D R S C C
  31816. E P P L L K I S S 1 0 A E E X M T T T 2
  31817. L 2 C P P R O U U / R L 2
  31818. C I R C C T R R
  31819. A O L - - - - B / T T K K / / / / 2 / K - - A L
  31820. T I A S D D D I K S O E 6 A A C C 5 4 3 5 4 3 2 1 0 9 8 7 K 8 L D S T A
  31821. X K T S D D D D C M D S D T T A A D D D 2 2 2 2 2 2 1 1 D C D C D S X T
  31822. E C X V V V V T T T T A M S S D D M M M A A A A A A A A M S M T V V E X
  31823.  
  31824. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  31825. NMI
  31826. A
  31827. RDY IRL3
  31828. RESET IRL2
  31829.  
  31830. B
  31831. CS0 IRL1
  31832. CS1
  31833. IRL0
  31834. C 1 2
  31835. CS6 L L MD1/TXD2
  31836. L L
  31837. P P
  31838. BS - - MD0/SCK
  31839. D S S
  31840. D47 S S D63
  31841. V V
  31842.  
  31843.  
  31844.  
  31845. D32
  31846. E T 2 D48
  31847. D46 S D62
  31848.  
  31849. S
  31850. T
  31851. CS4 R 1 0 C
  31852.  
  31853. T
  31854. D33 F CS5 A A D49
  31855. Reserved
  31856. D61
  31857. D45
  31858.  
  31859. RD2
  31860.  
  31861. MD2/RXD2
  31862. D34
  31863. D50
  31864. G
  31865. D44 D60
  31866.  
  31867. RD/WR2
  31868.  
  31869.  
  31870.  
  31871. D35 D51
  31872.  
  31873.  
  31874. H
  31875. D43 D59
  31876.  
  31877.  
  31878.  
  31879.  
  31880. D36 D52
  31881. J
  31882. D42 D58
  31883.  
  31884.  
  31885.  
  31886.  
  31887.  
  31888. BGA256
  31889.  
  31890. D37 D53
  31891. K
  31892.  
  31893. (Top view)
  31894.  
  31895. D41
  31896. D57
  31897. L
  31898.  
  31899.  
  31900.  
  31901. D38 D54
  31902.  
  31903.  
  31904. D40 D56
  31905.  
  31906. M
  31907.  
  31908.  
  31909. D39 D55
  31910.  
  31911. D15 D31
  31912.  
  31913. N
  31914.  
  31915.  
  31916.  
  31917.  
  31918.  
  31919. D0 D16
  31920.  
  31921. D14 D30
  31922.  
  31923. P 1 0
  31924. K K
  31925.  
  31926.  
  31927. D1 A A D17
  31928. R R DREQ1
  31929.  
  31930.  
  31931. D13 D29
  31932.  
  31933. R BACK/BSREQ D D
  31934. DREQ0
  31935.  
  31936.  
  31937. D2 BREQ/BSACK D18
  31938. RXD
  31939. D12 D28
  31940.  
  31941. T
  31942.  
  31943.  
  31944. D3 D19
  31945.  
  31946.  
  31947.  
  31948. D11 D27
  31949.  
  31950. U
  31951.  
  31952.  
  31953. D4 D20
  31954.  
  31955. D10 D26
  31956.  
  31957. V
  31958.  
  31959.  
  31960.  
  31961.  
  31962. D5 D21
  31963.  
  31964. D9 D25
  31965. W
  31966.  
  31967.  
  31968. D6
  31969. Y
  31970.  
  31971.  
  31972. 8 7 E 5 4 1 0 7 6 5 4 3 2 1 0 9 8 7 O 2 6 5 4 3 2 3 2 S E R D R 6 G 3 4 2
  31973. D D K M M M M 1 1 1 1 1 1 1 1 A A A I O A A A A A S S A M R M E 2 2 2
  31974. A A A A A A A A K I W W D D D
  31975. C Q Q Q Q K C C R A / O O Q R
  31976. D D D D C R D I I D /
  31977. C 7
  31978. / / / / R C C /
  31979. F I
  31980. 5 4 1 0 / / I 6 M
  31981. S S S S S 2 / S VDDQ (IO, 3.3 V)
  31982. 3 Q
  31983. A A A A S M M A D
  31984. C C C C A Q C /
  31985. / / / / C Q / 7 VSSQ (IO, 0 V)
  31986. 5 4 1 0 / D D 6 S
  31987. /
  31988. E E E E / E
  31989.  
  31990. D 2 3 A
  31991. W W W W R S S W C
  31992. A A / VDD (internal, 1.8 V)
  31993. 7
  31994. C C E
  31995. /
  31996. 2 /
  31997. E 3 W VSS (internal, 0 V)
  31998. E
  31999. W W
  32000. NC
  32001.  
  32002. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  32003. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  32004. and RTC are used.
  32005.  
  32006. Figure 22.1 Pin Arrangement (256-Pin BGA)
  32007.  
  32008. Rev. 2.0, 02/99, page 689 of 830
  32009.  
  32010. ----------------------- Page 704-----------------------
  32011.  
  32012.  
  32013. K
  32014.  
  32015. ) ) ) C )
  32016. V V V A T V
  32017. 3 3. 3. K E 3
  32018. 3. 3 3 R 6 S 3.
  32019. ( ( ( B 1 2 B A E 2 D (
  32020. G G 1 1 2 2 / S 1 0 S 2 2 R S E C
  32021. P L L L L K I S S A E E D T V T C 2
  32022. P L L L L R O 1 0 M X R T
  32023. L C C P P P P I U U R C C / T R R R L 2
  32024. A L - - - - - - T B / T T K K / / / 2 / / K 2 E - - A L
  32025. T A S D S D S D S I K S O E 6 A A C C 5 4 3 5 4 3 2 1 0 9 8 K 7 8 L S S D S T A
  32026. X T S D S D S D R D C M D S D T T 1 0 A A D D D 2 2 2 2 2 2 1 1 C D D C T E D S X T
  32027. E X V V V V V V T T T T T A M S S A A D D M M M A A A A A A A A S M M T C R V V E X
  32028.  
  32029.  
  32030. 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
  32031. 0 0 0 0 0 0 0 0 0 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 5 5 5
  32032. 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  32033. RDY 1 156 NMI
  32034. RESET 2 155 IRL3
  32035. CS0 3 154 IRL2
  32036. CS1 4 153 IRL1
  32037. CS4 5 152 IRL0
  32038. CS5 6 151 MD2/RXD2
  32039. CS6 7 150 MD1/TXD2
  32040. BS 8 149 MD0/SCK
  32041. 9 148
  32042.  
  32043.  
  32044.  
  32045.  
  32046. 10 147
  32047.  
  32048.  
  32049.  
  32050.  
  32051. D47 11 146 D63
  32052. D32 12 145 D48
  32053. 13 144
  32054.  
  32055. 14 143
  32056.  
  32057. D46 15 142 D62
  32058. D33 16 141 D49
  32059. D45 17 140 D61
  32060. D34 18 139 D50
  32061. D44 19 138 D60
  32062. D35 20 137 D51
  32063. 21 136
  32064. QFP208
  32065. 22 135
  32066.  
  32067.  
  32068.  
  32069. D43 23 134 D59
  32070. D36 24 Top view 133 D52
  32071. D42 25 132 D58
  32072. D37 26 131 D53
  32073. D41 27 130 D57
  32074. D38 28 129 D54
  32075. D40 29 128 D56
  32076. D39 30 127 D55
  32077. 31 126
  32078.  
  32079.  
  32080.  
  32081.  
  32082. 32 125
  32083.  
  32084.  
  32085.  
  32086.  
  32087. D15 33 124 D31
  32088. D0 34 123 D16
  32089. D14 35 122 D30
  32090. D1 36 121 D17
  32091. D13 37 120 D29
  32092. D2 38 119 D18
  32093. 39 118
  32094. 40 VDD (internal, 1.8 V) 117
  32095.  
  32096. D12 41 116 D28
  32097. D3 42 VSS (internal, 0 V) 115 D19
  32098. 43 114
  32099.  
  32100. 44 113
  32101.  
  32102. VDDQ (IO, 3.3 V)
  32103. D11 45 112 D27
  32104. D4 46 111 D20
  32105. D10 47 VSSQ (IO, 0 V) 110 D26
  32106. D5 48 109 D21
  32107. D9 49 108 D25
  32108. D6 50 107 DREQ1
  32109. BACK/BSREQ 51 106 DREQ0
  32110. BREQ/BSACK 52 105 RXD
  32111. 0 1 2 3 4
  32112. 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0
  32113. 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 1 1 1 1 1
  32114.  
  32115.  
  32116.  
  32117. 8 7 E 5 4 1 0 7 6 5 4 3 2 1 0 9 8 7 O 6 5 4 3 2 1 0 3 2 S E R D R 6 G 3 4 2
  32118. D D K M M M M 1 1 1 1 1 1 1 1 A A A I A A A A A K K S S A M W R W M E 2 2 2
  32119. C Q Q Q Q A A A A A A A A K A A C C R A / C C Q R D D D
  32120. D D D D C R R R D I I D /
  32121. 7
  32122. / / / / D D F R O O /
  32123. I
  32124. 5 4 1 0 / / I 6 M
  32125. S S S S S 2 / S
  32126. 3 Q
  32127. A A A A S M M A D
  32128. C C C C A Q C /
  32129. / / / / C Q / 7
  32130. 5 4 1 0 / D D 6 S
  32131. /
  32132. E E E E D 2 / E A
  32133. 3
  32134. W W W W R S S W C
  32135. A A /
  32136. 7
  32137. C C E
  32138. /
  32139. 2 /
  32140. 3 W
  32141. E E
  32142. W W
  32143.  
  32144. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  32145. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  32146. and RTC are used.
  32147.  
  32148. Figure 22.2 Pin Arrangement (208-Pin QFP)
  32149.  
  32150. Rev. 2.0, 02/99, page 690 of 830
  32151.  
  32152. ----------------------- Page 705-----------------------
  32153.  
  32154. 22.2 Pin Functions
  32155.  
  32156. 22.2.1 Pin Functions (256-Pin BGA)
  32157.  
  32158. Table 22.1 Pin Functions
  32159.  
  32160. No. Pin Pin Name I/O Function Reset Memory Interface
  32161. No.
  32162.  
  32163. SRAM DRAM SDRAM PCMCIA MPX
  32164.  
  32165. 1 B2 5'< I Bus ready 5'< 5'< 5'<
  32166.  
  32167. 2 B1 5(6(7 I Reset 5(6(7
  32168.  
  32169. 3 C2 &6 O Chip select 0 &6 &6
  32170.  
  32171. 4 C1 &6 O Chip select 1 &6 &6
  32172.  
  32173. 5 D4 &6 O Chip select 4 &6 &6
  32174.  
  32175. 6 D3 &6 O Chip select 5 &6 &($ &6
  32176.  
  32177. 7 D2 &6 O Chip select 6 &6 &(% &6
  32178.  
  32179. 8 D1 %6 O Bust start (%6) (%6) (%6) (%6) (%6)
  32180.  
  32181. 9 E4 VSSQ Power IO GND (0 V)
  32182.  
  32183. 10 E3 O / /
  32184. 5' = 5' &$66 2( &$6 2( )5$0(
  32185. )5$0(
  32186.  
  32187. 11 F3 VDDQ Power IO VDD (3.3 V)
  32188.  
  32189. 12 F4 VSSQ Power IO GND (0 V)
  32190.  
  32191. 13 E2 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32192.  
  32193. 14 E1 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32194.  
  32195. 15 G3 VDD Power Internal VDD
  32196. (1.8 V)
  32197.  
  32198. 16 G4 VSS Power Internal GND
  32199. (0 V)
  32200.  
  32201. 17 F2 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32202.  
  32203. 18 F1 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32204.  
  32205. 19 H3 VDDQ Power IO VDD (3.3 V)
  32206.  
  32207. 20 H4 VSSQ Power IO GND (0 V)
  32208.  
  32209. 21 G2 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32210.  
  32211. 22 G1 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32212.  
  32213. 23 H2 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32214.  
  32215. 24 H1 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32216.  
  32217. 25 J3 VDDQ Power IO VDD (3.3 V)
  32218.  
  32219. 26 J4 VSSQ Power IO GND (0 V)
  32220.  
  32221. 27 J2 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32222.  
  32223. 28 J1 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32224.  
  32225. Rev. 2.0, 02/99, page 691 of 830
  32226.  
  32227. ----------------------- Page 706-----------------------
  32228.  
  32229. Table 22.1 Pin Functions (cont)
  32230.  
  32231. No. Pin Pin Name I/O Function Reset Memory Interface
  32232. No.
  32233.  
  32234. SRAM DRAM SDRAM PCMCIA MPX
  32235.  
  32236. 29 K2 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32237.  
  32238. 30 K1 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32239.  
  32240. 31 K3 VDDQ Power IO VDD (3.3 V)
  32241.  
  32242. 32 K4 VSSQ Power IO GND (0 V)
  32243.  
  32244. 33 L1 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32245.  
  32246. 34 L2 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32247.  
  32248. 35 M1 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32249.  
  32250. 36 M2 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32251.  
  32252. 37 L3 VDDQ Power IO VDD (3.3 V)
  32253.  
  32254. 38 L4 VSSQ Power IO GND (0 V)
  32255.  
  32256. 39 N1 D15 I/O Data A15
  32257.  
  32258. 40 N2 D0 I/O Data A0
  32259.  
  32260. 41 P1 D14 I/O Data A14
  32261.  
  32262. 42 P2 D1 I/O Data A1
  32263.  
  32264. 43 M3 VDDQ Power IO VDD (3.3 V)
  32265.  
  32266. 44 M4 VSSQ Power IO GND (0 V)
  32267.  
  32268. 45 R1 D13 I/O Data A13
  32269.  
  32270. 46 R2 D2 I/O Data A2
  32271.  
  32272. 47 P3 VDD Power Internal VDD
  32273. (1.8 V)
  32274.  
  32275. 48 P4 VSS Power Internal GND
  32276. (0 V)
  32277.  
  32278. 49 T1 D12 I/O Data A12
  32279.  
  32280. 50 T2 D3 I/O Data A3
  32281.  
  32282. 51 R3 VDDQ Power IO VDD (3.3 V)
  32283.  
  32284. 52 R4 VSSQ Power IO GND (0 V)
  32285.  
  32286. 53 U1 D11 I/O Data A11
  32287.  
  32288. 54 U2 D4 I/O Data A4
  32289.  
  32290. 55 V1 D10 I/O Data A10
  32291.  
  32292. 56 V2 D5 I/O Data A5
  32293.  
  32294. 57 T3 VDDQ Power IO VDD (3.3 V)
  32295.  
  32296. 58 T4 VSSQ Power IO GND (0 V)
  32297.  
  32298. 59 W1 D9 I/O Data A9
  32299.  
  32300. 60 Y1 D6 I/O Data A6
  32301.  
  32302. Rev. 2.0, 02/99, page 692 of 830
  32303.  
  32304. ----------------------- Page 707-----------------------
  32305.  
  32306. Table 22.1 Pin Functions (cont)
  32307.  
  32308. No. Pin Pin Name I/O Function Reset Memory Interface
  32309. No.
  32310.  
  32311. SRAM DRAM SDRAM PCMCIA MPX
  32312.  
  32313. 61 U3 %$&./ O Bus
  32314. %65(4 acknowledge/
  32315. bus request
  32316.  
  32317. 62 V3 %5(4/ I Bus request/bus
  32318. %6$&. acknowledge
  32319.  
  32320. 63 W2 D8 I/O Data A8
  32321.  
  32322. 64 Y2 D7 I/O Data A7
  32323.  
  32324. 65 W3 CKE O Clock output CKE
  32325. enable
  32326.  
  32327. 66 V5 VDDQ Power IO VDD (3.3 V)
  32328.  
  32329. 67 U5 VSSQ Power IO GND (0 V)
  32330.  
  32331. 68 Y3 / / O D47–D40 select DQM5
  32332. :( &$6 :( &$6
  32333. DQM5 signal
  32334.  
  32335. 69 W4 / / O D39–D32 select DQM4
  32336. :( &$6 :( &$6
  32337. DQM4 signal
  32338.  
  32339. 70 Y4 / / O D15–D8 select DQM1
  32340. :( &$6 :( &$6 :(
  32341. DQM1 signal
  32342.  
  32343. 71 W5 / / O D7–D0 select DQM0
  32344. :( &$6 :( &$6
  32345. DQM0 signal
  32346.  
  32347. 72 Y5 A17 O Address
  32348.  
  32349. 73 V6 VDDQ Power IO VDD (3.3 V)
  32350.  
  32351. 74 U6 VSSQ Power IO GND (0 V)
  32352.  
  32353. 75 W6 A16 O Address
  32354.  
  32355. 76 Y6 A15 O Address
  32356.  
  32357. 77 V7 VDD Power Internal VDD
  32358. (1.8 V)
  32359.  
  32360. 78 U7 VSS Power Internal GND
  32361. (0 V)
  32362.  
  32363. 79 W7 A14 O Address
  32364.  
  32365. 80 Y7 A13 O Address
  32366.  
  32367. 81 V8 VDDQ Power IO VDD (3.3 V)
  32368.  
  32369. 82 U8 VSSQ Power IO GND (0 V)
  32370.  
  32371. 83 V4 NC
  32372.  
  32373. 84 W8 A12 O Address
  32374.  
  32375. 85 Y8 A11 O Address
  32376.  
  32377. 86 W9 A10 O Address
  32378.  
  32379. Rev. 2.0, 02/99, page 693 of 830
  32380.  
  32381. ----------------------- Page 708-----------------------
  32382.  
  32383. Table 22.1 Pin Functions (cont)
  32384.  
  32385. No. Pin Pin Name I/O Function Reset Memory Interface
  32386. No.
  32387.  
  32388. SRAM DRAM SDRAM PCMCIA MPX
  32389.  
  32390. 87 V9 VDDQ Power IO VDD (3.3 V)
  32391.  
  32392. 88 U9 VSSQ Power IO GND (0 V)
  32393.  
  32394. 89 Y9 A9 O Address
  32395.  
  32396. 90 W10 A8 O Address
  32397.  
  32398. 91 Y10 A7 O Address
  32399.  
  32400. 92 Y11 CKIO O Clock output CKIO
  32401.  
  32402. 93 V10 VDDQ Power IO VDD (3.3 V)
  32403.  
  32404. 94 U10 VSSQ Power IO GND (0 V)
  32405.  
  32406. 95 W11 CKIO2 O = CKIO* CKIO
  32407.  
  32408. 96 Y12 A6 O Address
  32409.  
  32410. 97 W12 A5 O Address
  32411.  
  32412. 98 Y13 A4 O Address
  32413.  
  32414. 99 V11 VDDQ Power IO VDD (3.3 V)
  32415.  
  32416. 100 U11 VSSQ Power IO GND (0 V)
  32417.  
  32418. 101 W13 A3 O Address
  32419.  
  32420. 102 Y14 A2 O Address
  32421.  
  32422. 103 V12 DRAK1 O DMAC1 request
  32423. acknowledge
  32424.  
  32425. 104 U13 DRAK0 O DMAC0 request
  32426. acknowledge
  32427.  
  32428. 105 V13 VDDQ Power IO VDD (3.3 V)
  32429.  
  32430. 106 U12 VSSQ Power IO GND (0 V)
  32431.  
  32432. 107 W14 &6 O Chip select 3 &6 (&6) &6 &6
  32433.  
  32434. 108 Y15 &6 O Chip select 2 &6 (&6) &6 &6
  32435.  
  32436. 109 V14 VDD Power Internal VDD
  32437. (1.8 V)
  32438.  
  32439. 110 U14 VSS Power Internal GND
  32440. (0 V)
  32441.  
  32442. 111 W15 5$6 O 5$6 5$6 5$6
  32443.  
  32444. 112 Y16 / / O Read/ /
  32445. 5' &$66 &$6 2( &$6 2( )5$0(
  32446. )5$0( )5$0(
  32447.  
  32448. 113 V15 VDDQ Power IO VDD (3.3 V)
  32449.  
  32450. 114 U15 VSSQ Power IO GND (0 V)
  32451.  
  32452. Note: * CKIO2 is not connected to PLL2.
  32453.  
  32454. Rev. 2.0, 02/99, page 694 of 830
  32455.  
  32456. ----------------------- Page 709-----------------------
  32457.  
  32458. Table 22.1 Pin Functions (cont)
  32459.  
  32460. No. Pin Pin Name I/O Function Reset Memory Interface
  32461. No.
  32462.  
  32463. SRAM DRAM SDRAM PCMCIA MPX
  32464.  
  32465. 115 W16 RD/:5 O Read/write RD/:5 RD/:5 RD/:5
  32466.  
  32467. 116 Y17 / / O D23–D16 select DQM2
  32468. :( &$6 :( &$6 ,&,25'
  32469. DQM2/ signal
  32470. ,&,25'
  32471.  
  32472. 117 W17 / / O D31–D24 select DQM3
  32473. :( &$6 :( &$6 ,&,2:5
  32474. DQM3/ signal
  32475. ,&,2:5
  32476.  
  32477. 118 Y18 / / O D55–D48 select :( &$6 DQM6
  32478. :( &$6
  32479. DQM6 signal
  32480.  
  32481. 119 V16 VDDQ Power IO VDD (3.3 V)
  32482.  
  32483. 120 U16 VSSQ Power IO GND (0 V)
  32484.  
  32485. 121 W18 / / O D63–D56 select DQM7
  32486. :( &$6 :( &$6 5(*
  32487. DQM7/5(* signal
  32488.  
  32489. 122 Y19 D23 I/O Data A23
  32490.  
  32491. 123 W19 D24 I/O Data A24
  32492.  
  32493. 124 Y20 D22 I/O Data A22
  32494.  
  32495. 125 V17 RXD I SCI data input
  32496.  
  32497. 126 U17 '5(4 I Request from
  32498. DMAC0
  32499.  
  32500. 127 U18 '5(4 I Request from
  32501. DMAC1
  32502.  
  32503. 128 W20 D25 I/O Data A25
  32504.  
  32505. 129 T18 VDDQ Power IO VDD (3.3 V)
  32506.  
  32507. 130 T17 VSSQ Power IO GND (0 V)
  32508.  
  32509. 131 V19 D21 I/O Data A21
  32510.  
  32511. 132 V20 D26 I/O Data
  32512.  
  32513. 133 U19 D20 I/O Data A20
  32514.  
  32515. 134 U20 D27 I/O Data
  32516.  
  32517. 135 R18 VDDQ Power IO VDD (3.3 V)
  32518.  
  32519. 136 R17 VSSQ Power IO GND (0 V)
  32520.  
  32521. 137 T19 D19 I/O Data A19
  32522.  
  32523. 138 T20 D28 I/O Data
  32524.  
  32525. 139 P18 VDD Power Internal VDD
  32526. (1.8 V)
  32527.  
  32528. 140 P17 VSS Power Internal GND
  32529. (0 V)
  32530.  
  32531. 141 R19 D18 I/O Data A18
  32532.  
  32533. Rev. 2.0, 02/99, page 695 of 830
  32534.  
  32535. ----------------------- Page 710-----------------------
  32536.  
  32537. Table 22.1 Pin Functions (cont)
  32538.  
  32539. No. Pin Pin Name I/O Function Reset Memory Interface
  32540. No.
  32541.  
  32542. SRAM DRAM SDRAM PCMCIA MPX
  32543.  
  32544. 142 R20 D29 I/O Data
  32545.  
  32546. 143 N18 VDDQ Power IO VDD (3.3 V)
  32547.  
  32548. 144 N17 VSSQ Power IO GND (0 V)
  32549.  
  32550. 145 P19 D17 I/O Data A17
  32551.  
  32552. 146 P20 D30 I/O Data
  32553.  
  32554. 147 N19 D16 I/O Data A16
  32555.  
  32556. 148 N20 D31 I/O Data
  32557.  
  32558. 149 M18 VDDQ Power IO VDD (3.3 V)
  32559.  
  32560. 150 M17 VSSQ Power IO GND (0 V)
  32561.  
  32562. 151 M19 D55 I/O Data
  32563.  
  32564. 152 M20 D56 I/O Data
  32565.  
  32566. 153 L19 D54 I/O Data
  32567.  
  32568. 154 L20 D57 I/O Data
  32569.  
  32570. 155 L18 VDDQ Power IO VDD (3.3 V)
  32571.  
  32572. 156 L17 VSSQ Power IO GND (0 V)
  32573.  
  32574. 157 K20 D53 I/O Data
  32575.  
  32576. 158 K19 D58 I/O Data
  32577.  
  32578. 159 J20 D52 I/O Data
  32579.  
  32580. 160 J19 D59 I/O Data
  32581.  
  32582. 161 K18 VDDQ Power IO VDD (3.3 V)
  32583.  
  32584. 162 K17 VSSQ Power IO GND (0 V)
  32585.  
  32586. 163 H20 D51 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32587.  
  32588. 164 H19 D60 I/O Data
  32589.  
  32590. 165 G20 D50 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32591.  
  32592. 166 G19 D61 I/O Data ACCSIZE0
  32593.  
  32594. 167 J18 VDDQ Power IO VDD (3.3 V)
  32595.  
  32596. 168 J17 VSSQ Power IO GND (0 V)
  32597.  
  32598. 169 F20 D49 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32599.  
  32600. 170 F19 D62 I/O Data ACCSIZE1
  32601.  
  32602. 171 G18 VDD Power Internal VDD
  32603. (1.8 V)
  32604.  
  32605. 172 G17 VSS Power Internal GND
  32606. (0 V)
  32607.  
  32608. 173 E20 D48 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32609.  
  32610. Rev. 2.0, 02/99, page 696 of 830
  32611.  
  32612. ----------------------- Page 711-----------------------
  32613.  
  32614. Table 22.1 Pin Functions (cont)
  32615.  
  32616. No. Pin Pin Name I/O Function Reset Memory Interface
  32617. No.
  32618.  
  32619. SRAM DRAM SDRAM PCMCIA MPX
  32620.  
  32621. 174 E19 D63 I/O Data ACCSIZE2
  32622.  
  32623. 175 F18 VDDQ Power IO VDD (3.3 V)
  32624.  
  32625. 176 F17 VSSQ Power IO GND (0 V)
  32626.  
  32627. 177 E17 VSSQ Power IO GND (0 V)
  32628.  
  32629. 178 E18 RD/:5 O = RD/:5 RD/:5 RD/:5 RD/:5
  32630.  
  32631. 179 D20 MD0/SCK I/O Mode/SCI MD0 SCK SCK SCK SCK SCK
  32632. clock
  32633.  
  32634. 180 D19 MD1/TXD2 I/O Mode SCIF dataMD1 TXD2 TXD2 TXD2 TXD2 TXD2
  32635. output
  32636.  
  32637. 181 D18 MD2/RXD2 I Mode/SCIF dataMD2 RXD2 RXD2 RXD2 RXD2 RXD2
  32638. input
  32639.  
  32640. 182 C20 ,5/ I Interrupt 0
  32641.  
  32642. 183 C19 ,5/ I Interrupt 1
  32643.  
  32644. 184 B20 ,5/ I Interrupt 2
  32645.  
  32646. 185 C18 ,5/ I Interrupt 3
  32647.  
  32648. 186 A20 NMI I Nonmaskable
  32649. interrupt
  32650.  
  32651. 187 B19 XTAL2 O RTC crystal
  32652. resonator pin
  32653.  
  32654. 188 A19 EXTAL2 I RTC crystal
  32655. resonator pin
  32656.  
  32657. 189 B18 VSS-RTC Power RTC GND
  32658. (0 V)
  32659.  
  32660. 190 A18 VDD-RTC Power RTC VDD
  32661. (3.3 V)
  32662.  
  32663. 191 D17 Reserved I Pull up to
  32664. 3.3. V
  32665.  
  32666. 192 C17 VSS Power Internal GND
  32667. (0 V)
  32668.  
  32669. 193 B17 VDDQ Power IO VDD (3.3 V)
  32670.  
  32671. 194 C16 &76 I/O SCIF data
  32672. control (CTS)
  32673.  
  32674. 195 A17 TCLK I/O RTC/TMU
  32675. clock
  32676.  
  32677. 196 B16 MD8/576 I/O Mode/SCIF dataMD8 576 576 576 576 576
  32678. control (RTS)
  32679.  
  32680. 197 C15 VDDQ Power IO VDD (3.3 V)
  32681.  
  32682. Rev. 2.0, 02/99, page 697 of 830
  32683.  
  32684. ----------------------- Page 712-----------------------
  32685.  
  32686. Table 22.1 Pin Functions (cont)
  32687.  
  32688. No. Pin Pin Name I/O Function Reset Memory Interface
  32689. No.
  32690.  
  32691. SRAM DRAM SDRAM PCMCIA MPX
  32692.  
  32693. 198 D15 VSSQ Power IO GND (0 V)
  32694.  
  32695. 199 B15 MD7/TXD I/O Mode/SCI MD7 TXD TXD TXD TXD TXD
  32696. data output
  32697.  
  32698. 200 A16 SCK2/ I SCIF clock/ 05(6(7 SCK2 SCK2 SCK2 SCK2 SCK2
  32699. 05(6(7 manual reset
  32700.  
  32701. 201 C14 VDD Power Internal VDD
  32702. (1.8 V)
  32703.  
  32704. 202 D14 VSS Power Internal GND
  32705. (0 V)
  32706.  
  32707. 203 A15 A18 O Address
  32708.  
  32709. 204 B14 A19 O Address
  32710.  
  32711. 205 C13 VDDQ Power IO VDD (3.3 V)
  32712.  
  32713. 206 D13 VSSQ Power IO GND (0 V)
  32714.  
  32715. 207 A14 A20 O Address
  32716.  
  32717. 208 B13 A21 O Address
  32718.  
  32719. 209 A13 A22 O Address
  32720.  
  32721. 210 B12 A23 O Address
  32722.  
  32723. 211 C12 VDDQ Power IO VDD (3.3 V)
  32724.  
  32725. 212 D12 VSSQ Power IO GND (0 V)
  32726.  
  32727. 213 A12 A24 O Address
  32728.  
  32729. 214 B11 A25 O Address
  32730.  
  32731. 215 A11 MD3/&($ I/O Mode/ MD3 &($
  32732. PCMCIA-CE
  32733.  
  32734. 216 A10 MD4/&(% I/O Mode/ MD4 &(%
  32735. PCMCIA-CE
  32736.  
  32737. 217 C11 VDDQ Power IO VDD (3.3 V)
  32738.  
  32739. 218 D11 VSSQ Power IO GND (0 V)
  32740.  
  32741. 219 B10 MD5/5$6 I/O Mode/5$6 MD5 5$6
  32742. (DRAM)
  32743.  
  32744. 220 A9 DACK0 O DMAC0 bus
  32745. acknowledge
  32746.  
  32747. 221 B9 DACK1 O DMAC1 bus
  32748. acknowledge
  32749.  
  32750. 222 C8 A0 O Address
  32751.  
  32752. 223 C10 VDDQ Power IO VDD (3.3 V)
  32753.  
  32754. 224 D10 VSSQ Power IO GND (0 V)
  32755.  
  32756. Rev. 2.0, 02/99, page 698 of 830
  32757.  
  32758. ----------------------- Page 713-----------------------
  32759.  
  32760. Table 22.1 Pin Functions (cont)
  32761.  
  32762. No. Pin Pin Name I/O Function Reset Memory Interface
  32763. No.
  32764.  
  32765. SRAM DRAM SDRAM PCMCIA MPX
  32766.  
  32767. 225 D8 A1 O Address
  32768.  
  32769. 226 A8 STATUS0 O Status
  32770.  
  32771. 227 B8 STATUS1 O Status
  32772.  
  32773. 228 A7 MD6/ I Mode/,2,6 MD6 ,2,6
  32774. ,2,6 (PCMCIA)
  32775.  
  32776. 229 C9 VDDQ Power IO VDD (3.3 V)
  32777.  
  32778. 230 D9 VSSQ Power IO GND (0 V)
  32779.  
  32780. 231 B7 $6(%5./ I/O Pin break/
  32781. BRKACK acknowledge
  32782. (Hitachi-UDI)
  32783.  
  32784. 232 A6 TDO O Data out
  32785. (Hitachi-UDI)
  32786.  
  32787. 233 C7 VDD Power Internal VDD
  32788. (1.8 V)
  32789.  
  32790. 234 D7 VSS Power Internal GND
  32791. (0 V)
  32792.  
  32793. 235 B6 TMS I Mode
  32794. (Hitachi-UDI)
  32795.  
  32796. 236 A5 TCK I Clock
  32797. (Hitachi-UDI)
  32798.  
  32799. 237 B5 TDI I Data in (Hitachi-
  32800. UDI)
  32801.  
  32802. 238 C4 7567 I Reset
  32803. (Hitachi-UDI)
  32804.  
  32805. 239 C3 &.,2(1% I CKIO2, 5' ,
  32806. RD/:5 enable
  32807.  
  32808. 240 C6 NC
  32809.  
  32810. 241 A4 VDD-PLL2 Power PLL2 VDD
  32811. (3.3V)
  32812.  
  32813. 242 D6 VSS-PLL2 Power PLL2 GND (0V)
  32814.  
  32815. 243 B4 VDD-PLL1 Power PLL1 VDD
  32816. (3.3V)
  32817.  
  32818. 244 D5 VSS-PLL1 Power PLL1 GND (0V)
  32819.  
  32820. 245 A3 VDD-CPG Power CPG VDD
  32821. (3.3V)
  32822.  
  32823. 246 B3 VSS-CPG Power CPG GND (0V)
  32824.  
  32825. 247 A2 XTAL O Crystal
  32826. resonator
  32827.  
  32828. Rev. 2.0, 02/99, page 699 of 830
  32829.  
  32830. ----------------------- Page 714-----------------------
  32831.  
  32832. Table 22.1 Pin Functions (cont)
  32833.  
  32834. Memory Interface
  32835.  
  32836. Pin
  32837. No. No. Pin Name I/O Function Reset SRAM DRAM SDRAM PCMCIA MPX
  32838.  
  32839. 248 A1 EXTAL I External input
  32840. clock/crystal
  32841. resonator
  32842.  
  32843. 249 C5 NC
  32844.  
  32845. 250 D16 NC
  32846.  
  32847. 251 H17 NC
  32848.  
  32849. 252 H18 NC
  32850.  
  32851. 253 N3 NC
  32852.  
  32853. 254 N4 NC
  32854.  
  32855. 255 U4 NC
  32856.  
  32857. 256 V18 NC
  32858.  
  32859. I: Input
  32860. O: Output
  32861. I/O: Input/output
  32862. Power: Power supply
  32863.  
  32864. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  32865. system power supply, and power must be supplied continuously. Even if only the RTC
  32866. is operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD,
  32867. and VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  32868. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  32869. the on-chip PLL circuits are used.
  32870. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the
  32871. on-chip crystal resonator is used.
  32872. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the
  32873. on-chip RTC is used.
  32874. 5. VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are connected inside the
  32875. package.
  32876.  
  32877. Rev. 2.0, 02/99, page 700 of 830
  32878.  
  32879. ----------------------- Page 715-----------------------
  32880.  
  32881. 22.2.2 Pin Functions (208-Pin QFP)
  32882.  
  32883. Table 22.2 Pin Functions
  32884.  
  32885. Pin Pin Name I/O Function Reset Memory Interface
  32886. No.
  32887.  
  32888. SRAM DRAM SDRAM PCMCIA MPX
  32889.  
  32890. 1 5'< I Bus ready 5'< 5'< 5'<
  32891.  
  32892. 2 5(6(7 I Reset 5(6(7
  32893.  
  32894. 3 &6 O Chip select 0 &6 &6
  32895.  
  32896. 4 &6 O Chip select 1 &6 &6
  32897.  
  32898. 5 &6 O Chip select 4 &6 &6
  32899.  
  32900. 6 &6 O Chip select 5 &6 &($ &6
  32901.  
  32902. 7 &6 O Chip select 6 &6 &(% &6
  32903.  
  32904. 8 %6 O Bust start (%6) (%6) (%6) (%6) (%6)
  32905.  
  32906. 9 VDDQ Power IO VDD (3.3 V)
  32907.  
  32908. 10 VSSQ Power IO GND (0 V)
  32909.  
  32910. 11 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32911.  
  32912. 12 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32913.  
  32914. 13 VDD Power Internal VDD
  32915. (1.8 V)
  32916.  
  32917. 14 VSS Power Internal GND
  32918. (0 V)
  32919.  
  32920. 15 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32921.  
  32922. 16 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32923.  
  32924. 17 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32925.  
  32926. 18 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32927.  
  32928. 19 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32929.  
  32930. 20 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32931.  
  32932. 21 VDDQ Power IO VDD (3.3 V)
  32933.  
  32934. 22 VSSQ Power IO GND (0 V)
  32935.  
  32936. 23 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32937.  
  32938. 24 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32939.  
  32940. 25 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32941.  
  32942. 26 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32943.  
  32944. 27 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32945.  
  32946. 28 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32947.  
  32948. 29 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32949.  
  32950. 30 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32951.  
  32952. Rev. 2.0, 02/99, page 701 of 830
  32953.  
  32954. ----------------------- Page 716-----------------------
  32955.  
  32956. Table 22.2 Pin Functions (cont)
  32957.  
  32958. Pin Pin Name I/O Function Reset Memory Interface
  32959. No.
  32960.  
  32961. SRAM DRAM SDRAM PCMCIA MPX
  32962.  
  32963. 31 VDDQ Power IO VDD (3.3 V)
  32964.  
  32965. 32 VSSQ Power IO GND (0 V)
  32966.  
  32967. 33 D15 I/O Data A15
  32968.  
  32969. 34 D0 I/O Data A0
  32970.  
  32971. 35 D14 I/O Data A14
  32972.  
  32973. 36 D1 I/O Data A1
  32974.  
  32975. 37 D13 I/O Data A13
  32976.  
  32977. 38 D2 I/O Data A2
  32978.  
  32979. 39 VDD Power Internal VDD
  32980. (1.8 V)
  32981.  
  32982. 40 VSS Power Internal GND
  32983. (0 V)
  32984.  
  32985. 41 D12 I/O Data A12
  32986.  
  32987. 42 D3 I/O Data A3
  32988.  
  32989. 43 VDDQ Power IO VDD (3.3 V)
  32990.  
  32991. 44 VSSQ Power IO GND (0 V)
  32992.  
  32993. 45 D11 I/O Data A11
  32994.  
  32995. 46 D4 I/O Data A4
  32996.  
  32997. 47 D10 I/O Data A10
  32998.  
  32999. 48 D5 I/O Data A5
  33000.  
  33001. 49 D9 I/O Data A9
  33002.  
  33003. 50 D6 I/O Data A6
  33004.  
  33005. 51 %$&./ O Bus
  33006. %65(4 acknowledge/
  33007. bus request
  33008.  
  33009. 52 %5(4/ I Bus request/bus
  33010. %6$&. acknowledge
  33011.  
  33012. 53 D8 I/O Data A8
  33013.  
  33014. 54 D7 I/O Data A7
  33015.  
  33016. 55 CKE O Clock output CKE
  33017. enable
  33018.  
  33019. 56 VDDQ Power IO VDD (3.3 V)
  33020.  
  33021. 57 VSSQ Power IO GND (0 V)
  33022.  
  33023. 58 / / O D47–D40 select DQM5
  33024. :( &$6 :( &$6
  33025. DQM5 signal
  33026.  
  33027. Rev. 2.0, 02/99, page 702 of 830
  33028.  
  33029. ----------------------- Page 717-----------------------
  33030.  
  33031. Table 22.2 Pin Functions (cont)
  33032.  
  33033. Pin Pin Name I/O Function Reset Memory Interface
  33034. No.
  33035.  
  33036. SRAM DRAM SDRAM PCMCIA MPX
  33037.  
  33038. 59 / / O D39–D32 select :( &$6 DQM4
  33039. :( &$6
  33040. DQM4 signal
  33041.  
  33042. 60 / / O D15–D8 select :( &$6 DQM1 :(
  33043. :( &$6
  33044. DQM1 signal
  33045.  
  33046. 61 / / O D7–D0 select :( &$6 DQM0
  33047. :( &$6
  33048. DQM0 signal
  33049.  
  33050. 62 A17 O Address
  33051.  
  33052. 63 A16 O Address
  33053.  
  33054. 64 A15 O Address
  33055.  
  33056. 65 VDD Power Internal VDD
  33057. (1.8 V)
  33058.  
  33059. 66 VSS Power Internal GND
  33060. (0 V)
  33061.  
  33062. 67 A14 O Address
  33063.  
  33064. 68 A13 O Address
  33065.  
  33066. 69 VDDQ Power IO VDD (3.3 V)
  33067.  
  33068. 70 VSSQ Power IO GND (0 V)
  33069.  
  33070. 71 A12 O Address
  33071.  
  33072. 72 A11 O Address
  33073.  
  33074. 73 A10 O Address
  33075.  
  33076. 74 A9 O Address
  33077.  
  33078. 75 A8 O Address
  33079.  
  33080. 76 A7 O Address
  33081.  
  33082. 77 CKIO O Clock output CKIO
  33083.  
  33084. 78 VDDQ Power IO VDD (3.3 V)
  33085.  
  33086. 79 VSSQ Power IO GND (0 V)
  33087.  
  33088. 80 A6 O Address
  33089.  
  33090. 81 A5 O Address
  33091.  
  33092. 82 A4 O Address
  33093.  
  33094. 83 A3 O Address
  33095.  
  33096. 84 A2 O Address
  33097.  
  33098. 85 DRAK1 O DMAC1 request
  33099. acknowledge
  33100.  
  33101. 86 DRAK0 O DMAC0 request
  33102. acknowledge
  33103.  
  33104. 87 VDDQ Power IO VDD (3.3 V)
  33105.  
  33106. Rev. 2.0, 02/99, page 703 of 830
  33107.  
  33108. ----------------------- Page 718-----------------------
  33109.  
  33110. Table 22.2 Pin Functions (cont)
  33111.  
  33112. Pin Pin Name I/O Function Reset Memory Interface
  33113. No.
  33114.  
  33115. SRAM DRAM SDRAM PCMCIA MPX
  33116.  
  33117. 88 VSSQ Power IO GND (0 V)
  33118.  
  33119. 89 &6 O Chip select 3 &6 (&6) &6 &6
  33120.  
  33121. 90 &6 O Chip select 2 &6 (&6) &6 &6
  33122.  
  33123. 91 VDD Power Internal VDD
  33124. (1.8 V)
  33125.  
  33126. 92 VSS Power Internal GND
  33127. (0 V)
  33128.  
  33129. 93 5$6 O 5$6 5$6 5$6
  33130.  
  33131. 94 / / O Read/ /
  33132. 5' &$66 &$6 2( &$6 2( )5$0(
  33133. )5$0( )5$0(
  33134.  
  33135. 95 RD/:5 O Read/write RD/:5 RD/:5 RD/:5
  33136.  
  33137. 96 / / O D23–D16 select DQM2
  33138. :( &$6 :( &$6 ,&,25'
  33139. DQM2/ signal
  33140. ,&,25'
  33141.  
  33142. 97 / / O D31–D24 select DQM3
  33143. :( &$6 :( &$6 ,&,2:5
  33144. DQM3/ signal
  33145. ,&,2:5
  33146.  
  33147. 98 / / O D55–D48 select :( &$6 DQM6
  33148. :( &$6
  33149. DQM6 signal
  33150.  
  33151. 99 VDDQ Power IO VDD (3.3 V)
  33152.  
  33153. 100 VSSQ Power IO GND (0 V)
  33154.  
  33155. 101 / / O D63–D56 select DQM7
  33156. :( &$6 :( &$6 5(*
  33157. DQM7/5(* signal
  33158.  
  33159. 102 D23 I/O Data A23
  33160.  
  33161. 103 D24 I/O Data A24
  33162.  
  33163. 104 D22 I/O Data A22
  33164.  
  33165. 105 RXD I SCI data input
  33166.  
  33167. 106 '5(4 I Request from
  33168. DMAC0
  33169.  
  33170. 107 '5(4 I Request from
  33171. DMAC1
  33172.  
  33173. 108 D25 I/O Data A25
  33174.  
  33175. 109 D21 I/O Data A21
  33176.  
  33177. 110 D26 I/O Data
  33178.  
  33179. 111 D20 I/O Data A20
  33180.  
  33181. 112 D27 I/O Data
  33182.  
  33183. 113 VDDQ Power IO VDD (3.3 V)
  33184.  
  33185. Rev. 2.0, 02/99, page 704 of 830
  33186.  
  33187. ----------------------- Page 719-----------------------
  33188.  
  33189. Table 22.2 Pin Functions (cont)
  33190.  
  33191. Pin Pin Name I/O Function Reset Memory Interface
  33192. No.
  33193.  
  33194. SRAM DRAM SDRAM PCMCIA MPX
  33195.  
  33196. 114 VSSQ Power IO GND (0 V)
  33197.  
  33198. 115 D19 I/O Data A19
  33199.  
  33200. 116 D28 I/O Data
  33201.  
  33202. 117 VDD Power Internal VDD
  33203. (1.8 V)
  33204.  
  33205. 118 VSS Power Internal GND
  33206. (0 V)
  33207.  
  33208. 119 D18 I/O Data A18
  33209.  
  33210. 120 D29 I/O Data
  33211.  
  33212. 121 D17 I/O Data A17
  33213.  
  33214. 122 D30 I/O Data
  33215.  
  33216. 123 D16 I/O Data A16
  33217.  
  33218. 124 D31 I/O Data
  33219.  
  33220. 125 VDDQ Power IO VDD (3.3 V)
  33221.  
  33222. 126 VSSQ Power IO GND (0 V)
  33223.  
  33224. 127 D55 I/O Data
  33225.  
  33226. 128 D56 I/O Data
  33227.  
  33228. 129 D54 I/O Data
  33229.  
  33230. 130 D57 I/O Data
  33231.  
  33232. 131 D53 I/O Data
  33233.  
  33234. 132 D58 I/O Data
  33235.  
  33236. 133 D52 I/O Data
  33237.  
  33238. 134 D59 I/O Data
  33239.  
  33240. 135 VDDQ Power IO VDD (3.3 V)
  33241.  
  33242. 136 VSSQ Power IO GND (0 V)
  33243.  
  33244. 137 D51 I/O Data
  33245.  
  33246. 138 D60 I/O Data
  33247.  
  33248. 139 D50 I/O Data
  33249.  
  33250. 140 D61 I/O Data ACCSIZE0
  33251.  
  33252. 141 D49 I/O Data
  33253.  
  33254. 142 D62 I/O Data ACCSIZE1
  33255.  
  33256. 143 VDD Power Internal VDD
  33257. (1.8 V)
  33258.  
  33259. 144 VSS Power Internal GND
  33260. (0 V)
  33261.  
  33262. Rev. 2.0, 02/99, page 705 of 830
  33263.  
  33264. ----------------------- Page 720-----------------------
  33265.  
  33266. Table 22.2 Pin Functions (cont)
  33267.  
  33268. Pin Pin Name I/O Function Reset Memory Interface
  33269. No.
  33270.  
  33271. SRAM DRAM SDRAM PCMCIA MPX
  33272.  
  33273. 145 D48 I/O Data
  33274.  
  33275. 146 D63 I/O Data ACCSIZE2
  33276.  
  33277. 147 VDDQ Power IO VDD (3.3 V)
  33278.  
  33279. 148 VSSQ Power IO GND (0 V)
  33280.  
  33281. 149 MD0/SCK I/O Mode/SCI clock MD0 SCK SCK SCK SCK SCK
  33282.  
  33283. 150 MD1/TXD2 I/O Mode SCIF data MD1 TXD2 TXD2 TXD2 TXD2 TXD2
  33284. output
  33285.  
  33286. 151 MD2/RXD2 I Mode/SCIF data MD2 RXD2 RXD2 RXD2 RXD2 RXD2
  33287. input
  33288.  
  33289. 152 ,5/ I Interrupt 0
  33290.  
  33291. 153 ,5/ I Interrupt 1
  33292.  
  33293. 154 ,5/ I Interrupt 2
  33294.  
  33295. 155 ,5/ I Interrupt 3
  33296.  
  33297. 156 NMI I Nonmaskable
  33298. interrupt
  33299.  
  33300. 157 XTAL2 O RTC crystal
  33301. resonator pin
  33302.  
  33303. 158 EXTAL2 I RTC crystal
  33304. resonator pin
  33305.  
  33306. 159 VSS-RTC Power RTC GND
  33307. (0 V)
  33308.  
  33309. 160 VDD-RTC Power RTC VDD
  33310. (3.3 V)
  33311.  
  33312. 161 Reserved I Pull up to
  33313. 3.3. V
  33314.  
  33315. 162 VSS Power Internal GND
  33316. (0 V)
  33317.  
  33318. 163 VDDQ Power IO VDD (3.3 V)
  33319.  
  33320. 164 &76 I/O SCIF data control
  33321. (CTS)
  33322.  
  33323. 165 TCLK I/O RTC/TMU
  33324. clock
  33325.  
  33326. 166 MD8/576 I/O Mode/SCIF data MD8 576 576 576 576 576
  33327. control (RTS)
  33328.  
  33329. 167 MD7/TXD I/O Mode/SCI data MD7 TXD TXD TXD TXD TXD
  33330. output
  33331.  
  33332. 168 SCK2/ I SCIF clock/ 05(6(7 SCK2 SCK2 SCK2 SCK2 SCK2
  33333. 05(6(7 manual reset
  33334.  
  33335. Rev. 2.0, 02/99, page 706 of 830
  33336.  
  33337. ----------------------- Page 721-----------------------
  33338.  
  33339. Table 22.2 Pin Functions (cont)
  33340.  
  33341. Pin Pin Name I/O Function Reset Memory Interface
  33342. No.
  33343.  
  33344. SRAM DRAM SDRAM PCMCIA MPX
  33345.  
  33346. 169 VDD Power Internal VDD
  33347. (1.8 V)
  33348.  
  33349. 170 VSS Power Internal GND
  33350. (0 V)
  33351.  
  33352. 171 A18 O Address
  33353.  
  33354. 172 A19 O Address
  33355.  
  33356. 173 A20 O Address
  33357.  
  33358. 174 A21 O Address
  33359.  
  33360. 175 A22 O Address
  33361.  
  33362. 176 A23 O Address
  33363.  
  33364. 177 VDDQ Power IO VDD (3.3 V)
  33365.  
  33366. 178 VSSQ Power IO GND (0 V)
  33367.  
  33368. 179 A24 O Address
  33369.  
  33370. 180 A25 O Address
  33371.  
  33372. 181 MD3/&($ I/O Mode/ MD3 &($
  33373. PCMCIA-CE
  33374.  
  33375. 182 MD4/&(% I/O Mode/ MD4 &(%
  33376. PCMCIA-CE
  33377.  
  33378. 183 MD5/5$6 I/O Mode/5$6 MD5 5$6
  33379. (DRAM)
  33380.  
  33381. 184 DACK0 O DMAC0 bus
  33382. acknowledge
  33383.  
  33384. 185 DACK1 O DMAC1 bus
  33385. acknowledge
  33386.  
  33387. 186 A0 O Address
  33388.  
  33389. 187 VDDQ Power IO VDD (3.3 V)
  33390.  
  33391. 188 VSSQ Power IO GND (0 V)
  33392.  
  33393. 189 A1 O Address
  33394.  
  33395. 190 STATUS0 O Status
  33396.  
  33397. 191 STATUS1 O Status
  33398.  
  33399. 192 MD6/ I Mode/,2,6 MD6 ,2,6
  33400. ,2,6 (PCMCIA)
  33401.  
  33402. 193 $6(%5./ I/O Pin break/
  33403. BRKACK acknowledge
  33404. (Hitachi-UDI)
  33405.  
  33406. 194 TDO O Data out
  33407. (Hitachi-UDI)
  33408.  
  33409. Rev. 2.0, 02/99, page 707 of 830
  33410.  
  33411. ----------------------- Page 722-----------------------
  33412.  
  33413. Table 22.2 Pin Functions (cont)
  33414.  
  33415. Pin Pin Name I/O Function Reset Memory Interface
  33416. No.
  33417.  
  33418. SRAM DRAM SDRAM PCMCIA MPX
  33419.  
  33420. 195 VDD Power Internal VDD
  33421. (1.8 V)
  33422.  
  33423. 196 VSS Power Internal GND
  33424. (0 V)
  33425.  
  33426. 197 TMS I Mode
  33427. (Hitachi-UDI)
  33428.  
  33429. 198 TCK I Clock
  33430. (Hitachi-UDI)
  33431.  
  33432. 199 TDI I Data in
  33433. (Hitachi-UDI)
  33434.  
  33435. 200 7567 I Reset
  33436. (Hitachi-UDI)
  33437.  
  33438. 201 VDD-PLL2 Power PLL2 VDD (3.3V)
  33439.  
  33440. 202 VSS-PLL2 Power PLL2 GND (0V)
  33441.  
  33442. 203 VDD-PLL1 Power PLL1 VDD (3.3V)
  33443.  
  33444. 204 VSS-PLL1 Power PLL1 GND (0V)
  33445.  
  33446. 205 VDD-CPG Power CPG VDD (3.3V)
  33447.  
  33448. 206 VSS-CPG Power CPG GND (0V)
  33449.  
  33450. 207 XTAL O Crystal resonator
  33451.  
  33452. 208 EXTAL I External input
  33453. clock/crystal
  33454. resonator
  33455.  
  33456. I: Input
  33457. O: Output
  33458. I/O: Input/output
  33459. Power: Power supply
  33460.  
  33461. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  33462. system power supply, and power must be supplied continuously. Even if only the RTC
  33463. is operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD,
  33464. and VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  33465. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  33466. the on-chip PLL circuits are used.
  33467. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the
  33468. on-chip crystal resonator is used.
  33469. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the
  33470. on-chip RTC is used.
  33471. 5. With the QFP package, VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are not
  33472. connected inside the package.
  33473. 6. The 5' , RD/:5 , CKIO2, and &.,2(1% pins are not provided on the QFP
  33474. package.
  33475. 7. With the QFP package, the maximum external bus operating frequency is 83 MHz.
  33476.  
  33477. Rev. 2.0, 02/99, page 708 of 830
  33478.  
  33479. ----------------------- Page 723-----------------------
  33480.  
  33481. Section 23 Electrical Characteristics
  33482.  
  33483. 23.1 Absolute Maximum Ratings
  33484.  
  33485. Table 23.1 Absolute Maximum Ratings
  33486.  
  33487. Item Symbol Value Unit
  33488.  
  33489. I/O, PLL, RTC power supply voltage V –0.3 to 4.2 V
  33490. DDQ
  33491.  
  33492. VDD-PLL1/2 ,
  33493. ,
  33494. V
  33495. DD-RTC
  33496.  
  33497. V
  33498. DD-CPG
  33499.  
  33500. Internal power supply voltage V –0.3 to 2.5 V
  33501. DD
  33502.  
  33503. Input voltage V –0.3 to V + 0.3 V
  33504. in DDQ
  33505.  
  33506. Operating temperature Topr –20 to 75 °C
  33507.  
  33508. Storage temperature Tstg –55 to 125 °C
  33509.  
  33510. Note: Permanent damage to the chip may result if the maximum ratings are exceeded.
  33511. VDD (1.8 V) should be input after input of VDDQ , VDD-PLL1/2 , VDD-RTC , and VDD-CPG (3.3 V).
  33512.  
  33513. Rev. 2.0, 02/99, page 709 of 830
  33514.  
  33515. ----------------------- Page 724-----------------------
  33516.  
  33517. 23.2 DC Characteristics
  33518.  
  33519. Table 23.2 DC Characteristics
  33520.  
  33521. (Ta = –20 to +75°C)
  33522.  
  33523. Item Symbol Min Typ Max Unit Test Conditions
  33524.  
  33525. Power supply VDDQ 3.0 3.3 3.6 V Normal mode, sleep
  33526. voltage VDD-PLL1/2 mode, standby mode
  33527. V
  33528. DD-CPG
  33529.  
  33530. V
  33531. DD-RTC
  33532.  
  33533. VDD 1.6 1.8 2.0 Normal mode, sleep
  33534. mode, standby mode
  33535.  
  33536. Current Normal IDD — 840 — mA VDDQ, VDD-PLL1/2, VDD-RTC,
  33537. dissipation operation VDD-CPG = 3.3 V
  33538. V = 1.8 V
  33539. DD
  33540. *1 f = 200 MHz
  33541. *2 f = 100 MHz
  33542. *3 f = 50 MHz
  33543.  
  33544. — 420 —
  33545.  
  33546. — 210 —
  33547. Sleep mode — 150*1 —
  33548.  
  33549. — 80*2 —
  33550.  
  33551. — 40*3 —
  33552.  
  33553. Standby mode — TBD — A Ta = 25 C (RTC on)
  33554. µ °
  33555. — TBD — Ta > 50°C (RTC on)
  33556. — TBD — Ta = 25°C (RTC off)
  33557. — TBD — Ta > 50°C (RTC off)
  33558. Current Normal IDDQ — 160*1 — mA VDDQ, VDD-PLL1/2, VDD-RTC,
  33559.  
  33560. dissipation operation VDD-CPG = 3.3 V
  33561. V = 1.8 V
  33562. DD
  33563. *1 f = 200 MHz,
  33564.  
  33565. t = 100 MHz
  33566. cyc
  33567. *2 f = 100 MHz,
  33568.  
  33569. t = 50 MHz
  33570. cyc
  33571. *3 f = 50 MHz,
  33572.  
  33573. t = 25 MHz
  33574. cyc
  33575.  
  33576. — 80*2 —
  33577.  
  33578. — 40*3 —
  33579.  
  33580. Sleep mode — 40*1 —
  33581.  
  33582. — 20*2 —
  33583.  
  33584. — 10*3 —
  33585.  
  33586. Standby mode — TBD — A Ta = 25 C (RTC on)
  33587. µ °
  33588. — TBD — Ta > 50°C (RTC on)
  33589.  
  33590. — TBD — Ta = 25°C (RTC off)
  33591. — TBD — Ta > 50°C (RTC off)
  33592.  
  33593. Rev. 2.0, 02/99, page 710 of 830
  33594.  
  33595. ----------------------- Page 725-----------------------
  33596.  
  33597. Table 23.2 DC Characteristics (cont)
  33598.  
  33599. (Ta = –20 to +75°C)
  33600.  
  33601. Item Symbol Min Typ Max Unit Test Conditions
  33602.  
  33603. Input voltage 5(6(7, VIH VDDQ × — VDDQ + V
  33604. NMI, 7567 , 0.9 0.3
  33605. $6(%5./
  33606. BRKACK
  33607.  
  33608. Other input 2.0 — VDDQ +
  33609. pins 0.3
  33610.  
  33611. 5(6(7, VIL –0.3 — VDDQ ×
  33612. NMI, 7567 , 0.1
  33613. $6(%5./
  33614. BRKACK
  33615.  
  33616. Other input –0.3 — VDDQ ×
  33617. pins 0.2
  33618.  
  33619. Output All output VOH 2.4 — — V
  33620. voltage pins
  33621.  
  33622. V — — 0.55
  33623. OL
  33624.  
  33625. Pull-up Port pins Rpull 20 60 180 kΩ
  33626. resistance
  33627.  
  33628. Pin All pins CL — — 10 pF
  33629. capacitance
  33630.  
  33631. Notes: 1. Connect VDD-PLL1/2 , VDD-RTC , and VDD-CPG to VDDQ , and VSS-CPG , VSS-PLL1/2 , and VSSQ-RTC to GND,
  33632. regardless of whether or not the PLL circuits and RTC are used.
  33633. 2. The current dissipation values are for V min = V – 0.5 V and V max = 0.5 V with
  33634. IH DDQ IL
  33635.  
  33636. all output pins unloaded.
  33637. 3. To reduce the leakage current in standby mode, the RTC must be turned on.
  33638. 4. IDDQ is the sum of the VDDQ , VDD-PLL1/2 , VDD-RTC , and VDD-CPG 3.3 V system currents.
  33639.  
  33640. Rev. 2.0, 02/99, page 711 of 830
  33641.  
  33642. ----------------------- Page 726-----------------------
  33643.  
  33644. Table 23.3 Permissible Output Currents
  33645.  
  33646. (Ta = –20 to +75°C)
  33647.  
  33648. Item Symbol Min Typ Max Unit
  33649.  
  33650. Permissible output low current IOL — — 2 mA
  33651. (per pin)
  33652.  
  33653. Permissible output low current ΣIOL — — 120
  33654. (total)
  33655.  
  33656. Permissible output high current –IOH — — 2
  33657. (per pin)
  33658.  
  33659. Permissible output high current Σ(–IOH) — — 40
  33660. (total)
  33661.  
  33662. Note: To protect chip reliability, do not exceed the output current values in table 23.3.
  33663.  
  33664. 23.3 AC Characteristics
  33665.  
  33666. In principle, SH7750 input should be synchronous. Unless specified otherwise, ensure that the
  33667. setup time and hold times for each input signal are observed.
  33668.  
  33669. Table 23.4 Clock Timing
  33670.  
  33671. Item Symbol Min Typ Max Unit Notes
  33672.  
  33673. Operating CPU, FPU, cache, TLB f 1 — 200 MHz
  33674. frequency
  33675.  
  33676. External bus 1 — 100
  33677.  
  33678. Peripheral modules 1 — 50
  33679.  
  33680. Rev. 2.0, 02/99, page 712 of 830
  33681.  
  33682. ----------------------- Page 727-----------------------
  33683.  
  33684. 23.3.1 Clock and Control Signal Timing
  33685.  
  33686. Table 23.5 Clock and Control Signal Timing
  33687.  
  33688. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF)
  33689. DDQ DD a L
  33690.  
  33691. Item Symbol Min Max Unit Figure
  33692.  
  33693. EXTAL PLL1, 2 1/2 divider fEX 16 66.7 MHz
  33694. clock input operating operating
  33695. frequency
  33696.  
  33697. 1/2 divider not f 8 33.3
  33698. EX
  33699.  
  33700. operating
  33701.  
  33702. PLL1, 2 1/2 divider fEX 2 66.7
  33703. not operating
  33704. operating
  33705.  
  33706. 1/2 divider not f 1 33.3
  33707. EX
  33708.  
  33709. operating
  33710.  
  33711. EXTAL clock input cycle time tEXcyc 15 1000 ns 23.1
  33712.  
  33713. EXTAL clock input low-level pulse width tEXL 3.5 ns 23.1
  33714.  
  33715. EXTAL clock input high-level pulse width tEXH 3.5 ns 23.1
  33716.  
  33717. EXTAL clock output rise time tEXr 4 ns 23.1
  33718.  
  33719. EXTAL clock input fall time tEXf 4 ns 23.1
  33720.  
  33721. CKIO clock PLL2 operating fOP 25 100 MHz
  33722. output
  33723.  
  33724. PLL2 not operating fOP 1 100 MHz
  33725.  
  33726. CKIO clock output cycle time tcyc 10 1000 ns 23.2
  33727.  
  33728. CKIO clock output low-level pulse width tCKOL 1 — ns 23.2
  33729.  
  33730. CKIO clock output high-level pulse width tCKOH 1 — ns 23.2
  33731.  
  33732. CKIO clock output rise time tCKOr — 4 ns 23.2
  33733.  
  33734. CKIO clock output fall time tCKOf — 4 ns 23.2
  33735.  
  33736. Rev. 2.0, 02/99, page 713 of 830
  33737.  
  33738. ----------------------- Page 728-----------------------
  33739.  
  33740. Table 23.5 Clock and Control Signal Timing (cont)
  33741.  
  33742. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF)
  33743. DDQ DD a L
  33744.  
  33745. Item Symbol Min Max Unit Figure
  33746.  
  33747. Power-on oscillation settling time tOSC1 10 — ms 23.3, 23.5
  33748.  
  33749. Power-on oscillation settling time/mode tOSCMD 10 — ms 23.3, 23.5
  33750. settling
  33751.  
  33752. SCK2 reset setup time tSCK2RS 20 — ns 23.11
  33753.  
  33754. SCK2 reset hold time tSCK2RH 20 — ns 23.3, 23.5, 23.11
  33755.  
  33756. MD reset setup time tMDRS 3 — tcyc 23.12
  33757.  
  33758. MD reset hold time tMDRH 20 — ns 23.3, 23.5, 23.12
  33759.  
  33760. 5(6(7 assert time tRESW 20 — tcyc 23.3, 23.4, 23.5,
  33761. 23.6, 23.11
  33762.  
  33763. PLL synchronization settling time tPLL 200 — µs 23.9, 23.10
  33764.  
  33765. Standby return oscillation settling time 1 tOSC2 10 — ms 23.4, 23.6
  33766.  
  33767. Standby return oscillation settling time 2 tOSC3 5 — ms 23.7
  33768.  
  33769. Standby return oscillation settling time 3 tOSC4 5 — ms 23.8
  33770.  
  33771. IRL interrupt determination time tIRLSTB — 200 µs 23.10
  33772. (RTC used, standby mode)
  33773.  
  33774. 7567 reset hold time tTRSTRH 0 ns 23.3, 23.5
  33775.  
  33776. Note: When a crystal resonator is connected to EXTAL and XTAL, the maximum frequency is
  33777. 33.3 MHz. When a 3rd overtone crystal resonator is used, an external tank circuit is
  33778. necessary.
  33779.  
  33780. tEXcyc
  33781.  
  33782. tEXH tEXL
  33783.  
  33784. VIH VIH VIH
  33785. 1/2VDDQ 1/2VDDQ
  33786.  
  33787. VIL VIL
  33788.  
  33789. tEXf tEXr
  33790.  
  33791. Note: When the clock is input from the EXTAL pin
  33792.  
  33793. Figure 23.1 EXTAL Clock Input Timing
  33794.  
  33795. Rev. 2.0, 02/99, page 714 of 830
  33796.  
  33797. ----------------------- Page 729-----------------------
  33798.  
  33799. t
  33800. cyc
  33801.  
  33802. tCKOH tCKOL
  33803.  
  33804. VOH VOH VOH
  33805. 1/2VDDQ 1/2VDDQ
  33806.  
  33807. VOL VOL
  33808.  
  33809. tCKOf tCKOr
  33810.  
  33811. Figure 23.2 CKIO Clock Output Timing
  33812.  
  33813. Stable oscillation
  33814.  
  33815. CKIO,
  33816. internal clock
  33817.  
  33818. VDD VDD min
  33819. tRESW
  33820. tOSC1
  33821.  
  33822. RESET
  33823.  
  33824. tSCK2RH
  33825.  
  33826. SCK2
  33827.  
  33828. tOSCMD tMDRH
  33829.  
  33830. MD8, MD7,
  33831. MD2–MD0
  33832.  
  33833. tTRSTRH
  33834.  
  33835. TRST
  33836.  
  33837. Notes: 1. Oscillation settling time when on-chip resonator is used
  33838. 2. PLL2 not operating
  33839.  
  33840.  
  33841. Figure 23.3 Power-On Oscillation Settling Time
  33842.  
  33843. Rev. 2.0, 02/99, page 715 of 830
  33844.  
  33845. ----------------------- Page 730-----------------------
  33846.  
  33847. Standby Stable oscillation
  33848.  
  33849. CKIO,
  33850. internal clock
  33851.  
  33852. tRESW
  33853.  
  33854. tOSC2
  33855.  
  33856. RESET
  33857.  
  33858. Notes: 1. Oscillation settling time when on-chip resonator is used
  33859. 2. PLL2 not operating
  33860.  
  33861.  
  33862. Figure 23.4 Standby Return Oscillation Settling Time (Return by 5(6(7)
  33863. 5(6(7
  33864.  
  33865. Stable oscillation
  33866.  
  33867. Internal clock
  33868.  
  33869. VDD min
  33870. VDD
  33871. tRESW
  33872. tOSC1
  33873.  
  33874. RESET
  33875.  
  33876. tSCK2RH
  33877.  
  33878. SCK2
  33879.  
  33880. tOSCMD tMDRH
  33881.  
  33882. MD8, MD7,
  33883. MD2–MD0
  33884. tTRSTRH
  33885.  
  33886. TRST
  33887.  
  33888. CKIO
  33889.  
  33890. Notes: 1. Oscillation settling time when on-chip resonator is used
  33891. 2. PLL2 operating
  33892.  
  33893. Figure 23.5 Power-On Oscillation Settling Time
  33894.  
  33895. Rev. 2.0, 02/99, page 716 of 830
  33896.  
  33897. ----------------------- Page 731-----------------------
  33898.  
  33899. Standby Stable oscillation
  33900.  
  33901. Internal
  33902. clock
  33903. tRESW
  33904. tOSC2
  33905.  
  33906. RESET
  33907.  
  33908. CKIO
  33909.  
  33910. Notes: 1. Oscillation settling time when on-chip resonator is used
  33911. 2. PLL2 operating
  33912.  
  33913. Figure 23.6 Standby Return Oscillation Settling Time (Return by 5(6(7)
  33914. 5(6(7
  33915.  
  33916. Standby Stable oscillation
  33917.  
  33918. CKIO,
  33919. internal clock
  33920.  
  33921. tOSC3
  33922.  
  33923. NMI
  33924.  
  33925. Note: Oscillation settling time when on-chip resonator is used
  33926.  
  33927. Figure 23.7 Standby Return Oscillation Settling Time (Return by NMI)
  33928.  
  33929. Rev. 2.0, 02/99, page 717 of 830
  33930.  
  33931. ----------------------- Page 732-----------------------
  33932.  
  33933. Standby Stable oscillation
  33934.  
  33935. CKIO,
  33936. internal clock
  33937.  
  33938. tOSC4
  33939.  
  33940. IRL3–IRL0
  33941.  
  33942. Note: Oscillation settling time when on-chip resonator is used
  33943.  
  33944.  
  33945. Figure 23.8 Standby Return Oscillation Settling Time (Return by ,5/–,5/)
  33946. ,5/ ,5/
  33947.  
  33948. Reset or NMI
  33949. interrupt request
  33950.  
  33951. Stable input clock Stable input clock
  33952.  
  33953. EXTAL input
  33954.  
  33955. PLL synchronization tPLL × 2 PLL synchronization
  33956.  
  33957. PLL output,
  33958. CKIO output
  33959.  
  33960. Internal clock
  33961.  
  33962. STATUS1–
  33963. Normal Standby Normal
  33964. STATUS0
  33965.  
  33966. Figure 23.9 PLL Synchronization Settling Time in Case of 5(6(7 or NMI Interrupt
  33967. 5(6(7
  33968.  
  33969. Rev. 2.0, 02/99, page 718 of 830
  33970.  
  33971. ----------------------- Page 733-----------------------
  33972.  
  33973. IRL3–IRL0
  33974. interrupt request
  33975.  
  33976. Stable input clock Stable input clock
  33977.  
  33978. EXTAL input
  33979.  
  33980. PLL synchronization tIRLSTB tPLL × 2 PLL synchronization
  33981.  
  33982. PLL output,
  33983. CKIO output
  33984.  
  33985. Internal clock
  33986.  
  33987. STATUS1–
  33988. Normal Standby Normal
  33989. STATUS0
  33990.  
  33991. Figure 23.10 PLL Synchronization Settling Time in Case of IRL Interrupt
  33992.  
  33993. CKIO
  33994.  
  33995. tRESW
  33996.  
  33997. RESET
  33998.  
  33999. tSCK2RS tSCK2RH
  34000.  
  34001. SCK2
  34002.  
  34003. Figure 23.11 Manual Reset Input Timing
  34004.  
  34005. RESET
  34006.  
  34007. tMDRS
  34008. tMDRH
  34009.  
  34010. MD6–MD3
  34011.  
  34012. Figure 23.12 Mode Input Timing
  34013.  
  34014. Rev. 2.0, 02/99, page 719 of 830
  34015.  
  34016. ----------------------- Page 734-----------------------
  34017.  
  34018. 23.3.2 Control Signal Timing
  34019.  
  34020. Table 23.6 Control Signal Timing
  34021.  
  34022. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  34023. DDQ DD a L
  34024.  
  34025. 66 MHz 83 MHz 100 MHz
  34026.  
  34027. Item Symbol Min Max Min Max Min Max Unit Figure Note
  34028.  
  34029. %5(4 setup time tBREQS 2 — 2 — 2 — ns BGA
  34030.  
  34031. 3.5 — 1.5 — — — ns QFP
  34032.  
  34033. %5(4 hold time t 1.5 — 1.5 — 1.5 — ns
  34034. BREQH
  34035.  
  34036. %$&. delay time tBACKD — 10 — 8 — 6 ns
  34037.  
  34038. Bus tri-state delay time tBOFF1 — 15 — 12 — 10 ns
  34039.  
  34040. Bus tri-state delay time tBOFF2 — 2 — 2 — 2 tcyc 23.13
  34041. to standby mode
  34042.  
  34043. Bus buffer on time t — 15 — 12 — 10 ns
  34044. BON1
  34045.  
  34046. Bus buffer on time from t — 1 — 1 — 1 t 23.13
  34047. BON2 cyc
  34048.  
  34049. standby
  34050.  
  34051. STATUS0/1 delay time tSTD1 — 11 — 9 — 7 ns 23.13
  34052.  
  34053. STATUS0/1 delay time tSTD2 — 2 — 2 — 2 tcyc 23.13
  34054. to standby
  34055.  
  34056. Rev. 2.0, 02/99, page 720 of 830
  34057.  
  34058. ----------------------- Page 735-----------------------
  34059.  
  34060. Normal operation Standby mode Normal operation
  34061.  
  34062. CKIO
  34063.  
  34064. STATUS 0, STATUS 1 Normal Standby Normal
  34065.  
  34066. tSTD2 tSTD1
  34067.  
  34068. CSn, RD, RD/WR,
  34069. WEn, BS, RAS, RAS2,
  34070. CE2A, CE2B, RD2, tBOFF2 tBON2
  34071. RD/WR2
  34072.  
  34073. A25–A0, D63–D0
  34074.  
  34075. DACKn, DRAKn, SCK,
  34076. * TXD, TXD2, CTS2,
  34077. RTS2
  34078.  
  34079. Note: * When the PHZ bit in STBCR is set to 1, these pins go to the high-impedance state (except
  34080. for pins being used as port pins, which retain their port state).
  34081.  
  34082. Figure 23.13 Pin Drive Timing for Standby Mode
  34083.  
  34084. Rev. 2.0, 02/99, page 721 of 830
  34085.  
  34086. ----------------------- Page 736-----------------------
  34087.  
  34088. 23.3.3. Bus Timing
  34089.  
  34090. Table 23.7 Bus Timing
  34091.  
  34092. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  34093. DDQ DD a L
  34094.  
  34095. 66 MHz 83 MHz 100 MHz
  34096. Item Symbol Min Max Min Max Min Max Unit Notes
  34097. Address delay time tAD — 10 — 8 — 6 ns
  34098. %6 delay time tBSD — 10 — 8 — 6 ns
  34099.  
  34100. &6 delay time tCSD — 10 — 8 — 6 ns
  34101.  
  34102. 5: delay time tRWD — 10 — 8 — 6 ns
  34103.  
  34104. 5' delay time tRSD — 10 — 8 — 6 ns
  34105.  
  34106. Read data setup time tRDS 2 — 2 — 2 — ns BGA
  34107. 3.5 — 3.5 — — — ns QFP
  34108. Read data hold time t 1.5 — 1.5 — 1.5 — ns
  34109. RDH
  34110.  
  34111. :( delay time (falling tWEDF — 10 — 8 — 6 ns Relative
  34112. edge) to CKIO
  34113. falling
  34114. edge
  34115. :( delay time tWED1 — 10 — 8 — 6 ns
  34116.  
  34117. Write data delay time tWDD — 10 — 8 — 6 ns
  34118.  
  34119. 5'< setup time tRDYS 2 — 2 — 2 — ns BGA
  34120.  
  34121. 3.5 — 3.5 — — — ns QFP
  34122.  
  34123. 5'< hold time tRDYH 1.5 — 1.5 — 1.5 ns
  34124.  
  34125. 5$6 delay time tRASD — 10 — 8 — 6 ns
  34126.  
  34127. &$6 delay time 1 tCASD1 — 10 — 8 — 6 ns DRAM
  34128.  
  34129. &$6 delay time 2 tCASD2 — 10 — 8 — 6 ns SDRAM
  34130.  
  34131. CKE delay time tCKED — 10 — 8 — 6 ns SDRAM
  34132. DQM delay time tDQMD — 10 — 8 — 6 ns SDRAM
  34133. )5$0( delay time tFMD — 10 — 8 — 6 ns MPX
  34134.  
  34135. ,2,6 setup time tIO16S 2 — 2 — 2 — ns BGA
  34136.  
  34137. 3.5 — 3.5 — — — ns QFP
  34138.  
  34139. ,2,6 hold time tIO16H 1.5 — 1.5 — 1.5 — ns PCMCIA
  34140.  
  34141. ,&,2:5 delay time tICWSDF — 10 — 8 — 6 ns PCMCIA
  34142. (falling edge)
  34143. ,&,25' delay time tICRSD — 10 — 8 — 6 ns PCMCIA
  34144.  
  34145. DACK delay time tDACD — 10 — 8 — 6 ns
  34146.  
  34147. Rev. 2.0, 02/99, page 722 of 830
  34148.  
  34149. ----------------------- Page 737-----------------------
  34150.  
  34151. Table 23.7 Bus Timing (cont)
  34152.  
  34153. 66 MHz 83 MHz 100 MHz
  34154.  
  34155. Item Symbol Min Max Min Max Min Max Unit Notes
  34156.  
  34157. DACK delay time tDACDF — 10 — 8 — 6 ns Relative
  34158. (falling edge) to CKIO
  34159. falling
  34160. edge
  34161.  
  34162. Rev. 2.0, 02/99, page 723 of 830
  34163.  
  34164. ----------------------- Page 738-----------------------
  34165.  
  34166. T1 T2
  34167.  
  34168. CKIO
  34169.  
  34170. tAD tAD
  34171.  
  34172. A25–A0
  34173.  
  34174. tCSD tCSD
  34175.  
  34176. CSn
  34177.  
  34178. tRWD tRWD
  34179.  
  34180. RD/WR
  34181.  
  34182. tRSD tRSD tRSD
  34183.  
  34184. RD
  34185.  
  34186. D63–D0 tRDS tRDH
  34187.  
  34188. (read)
  34189.  
  34190. tWED1
  34191. tWEDF tWEDF
  34192.  
  34193. WEn
  34194.  
  34195. tWDD tWDD tWDD
  34196.  
  34197. D63–D0
  34198. (write)
  34199.  
  34200. tBSD tBSD
  34201.  
  34202. BS
  34203.  
  34204. RDY
  34205.  
  34206. tDACD
  34207. tDACD tDACD
  34208. DACKn
  34209. (SA: IO ← memory)
  34210.  
  34211. tDACDF
  34212. tDACDF
  34213. DACKn
  34214. (SA: IO → memory)
  34215.  
  34216. tDACD tDACD
  34217. DACKn
  34218. (DA)
  34219.  
  34220. Note: IO: DACK device
  34221. SA: Single address DMA transfer
  34222. DA: Dual address DMA transfer
  34223. DACK set to active-high
  34224.  
  34225. Figure 23.14 SRAM Bus Cycle: Basic Bus Cycle (No Wait)
  34226.  
  34227. Rev. 2.0, 02/99, page 724 of 830
  34228.  
  34229. ----------------------- Page 739-----------------------
  34230.  
  34231. T1 Tw T2
  34232.  
  34233. CKIO
  34234.  
  34235. tAD tAD
  34236.  
  34237. A25–A0
  34238.  
  34239. tCSD tCSD
  34240.  
  34241. CSn
  34242.  
  34243. tRWD tRWD
  34244.  
  34245. RD/WR
  34246.  
  34247. tRSD tRSD tRSD
  34248.  
  34249. RD
  34250.  
  34251. D63–D0 tRDS tRDH
  34252.  
  34253. (read)
  34254.  
  34255. tWED1
  34256. tWEDF tWEDF
  34257.  
  34258. WEn
  34259.  
  34260. tWDD tWDD tWDD
  34261.  
  34262. D63–D0
  34263. (write)
  34264.  
  34265. tBSD tBSD
  34266.  
  34267. BS
  34268.  
  34269. tRDYS tRDYH
  34270.  
  34271. RDY
  34272.  
  34273. tDACD
  34274. tDACD tDACD
  34275. DACKn
  34276. (SA: IO ← memory)
  34277.  
  34278. tDACDF
  34279. tDACDF
  34280. DACKn
  34281. (SA: IO → memory)
  34282.  
  34283. tDACD tDACD
  34284. DACKn
  34285. (DA)
  34286.  
  34287. Note: IO: DACK device
  34288. SA: Single address DMA transfer
  34289. DA: Dual address DMA transfer
  34290.  
  34291.  
  34292. Figure 23.15 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait)
  34293.  
  34294. Rev. 2.0, 02/99, page 725 of 830
  34295.  
  34296. ----------------------- Page 740-----------------------
  34297.  
  34298. T1 Tw Twe T2
  34299.  
  34300. CKIO
  34301.  
  34302. tAD tAD
  34303.  
  34304. A25–A0
  34305.  
  34306. tCSD tCSD
  34307.  
  34308. CSn
  34309.  
  34310. tRWD tRWD
  34311.  
  34312. RD/WR
  34313.  
  34314. tRSD tRSD tRSD
  34315.  
  34316. RD
  34317.  
  34318. D63–D0 tRDS tRDH
  34319.  
  34320. (read)
  34321.  
  34322. tWED1
  34323. tWEDF tWEDF
  34324.  
  34325. WEn
  34326.  
  34327. tWDD tWDD tWDD
  34328.  
  34329. D63–D0
  34330. (write)
  34331.  
  34332. tBSD tBSD
  34333.  
  34334. BS
  34335.  
  34336. tRDYS tRDYH
  34337.  
  34338. RDY
  34339.  
  34340. tDACD tRDYS tRDYH
  34341.  
  34342. DACKn tDACD tDACD
  34343.  
  34344. (SA: IO ← memory)
  34345.  
  34346. tDACDF
  34347. tDACDF
  34348. DACKn
  34349. (SA: IO → memory)
  34350.  
  34351. tDACD tDACD
  34352. DACKn
  34353. (DA)
  34354.  
  34355. Note: IO: DACK device
  34356. SA: Single address DMA transfer
  34357. DA: Dual address DMA transfer
  34358.  
  34359.  
  34360. Figure 23.16 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait + One External Wait)
  34361.  
  34362. Rev. 2.0, 02/99, page 726 of 830
  34363.  
  34364. ----------------------- Page 741-----------------------
  34365.  
  34366. TS1 T1 T2 TH1
  34367.  
  34368. CKIO
  34369.  
  34370. tAD tAD
  34371. A25–A0
  34372.  
  34373. tCSD tCSD
  34374. CSn
  34375.  
  34376. tRWD tRWD
  34377.  
  34378. RD/WR
  34379.  
  34380. tRSD tRSD tRSD
  34381. RD
  34382.  
  34383. D63–D0 tRDS tRDH
  34384. (read)
  34385.  
  34386. tWED1
  34387. tWEDF tWEDF
  34388. WEn
  34389.  
  34390. tWDD tWDD tWDD
  34391.  
  34392. D63–D0
  34393. (write)
  34394.  
  34395. tBSD tBSD
  34396.  
  34397. BS
  34398.  
  34399. RDY
  34400.  
  34401. tDACD tDACD
  34402. DACKn tDACD
  34403. (SA: IO ← memory)
  34404.  
  34405. tDACDF
  34406. tDACDF
  34407. DACKn
  34408. (SA: IO → memory)
  34409.  
  34410. tDACD tDACD
  34411. DACKn
  34412. (DA)
  34413.  
  34414. Figure 23.17 SRAM Bus Cycle: Basic Bus Cycle (No Wait, Address Setup/Hold Time
  34415. Insertion, AnS = 1, AnH = 1)
  34416.  
  34417. Rev. 2.0, 02/99, page 727 of 830
  34418.  
  34419. ----------------------- Page 742-----------------------
  34420.  
  34421. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  34422.  
  34423. CKIO
  34424. tAD tAD
  34425.  
  34426. A25–A5
  34427. tAD
  34428.  
  34429. A4–A0
  34430.  
  34431. tCSD tCSD
  34432.  
  34433. CSn
  34434. tRWD tRWD
  34435.  
  34436. RD/WR
  34437. tRSD
  34438. tRSD tRSD
  34439.  
  34440. RD
  34441.  
  34442. D63–D0 tRDS tRDH tRDS tRDH
  34443.  
  34444. (read)
  34445.  
  34446. tBSD tBSD
  34447.  
  34448. BS
  34449.  
  34450. RDY
  34451. tDACD tDACD
  34452. tDACD
  34453. DACKn
  34454. (SA: IO ← memory)
  34455. tDACD tDACD
  34456.  
  34457. DACKn
  34458. (DA)
  34459.  
  34460. Note: IO: DACK device
  34461. SA: Single address DMA transfer
  34462. DA: Dual address DMA transfer
  34463. DACK set to active-high
  34464.  
  34465. Figure 23.18 Burst ROM Bus Cycle (No Wait)
  34466.  
  34467. Rev. 2.0, 02/99, page 728 of 830
  34468.  
  34469. ----------------------- Page 743-----------------------
  34470.  
  34471. (
  34472. 1
  34473. s
  34474. t
  34475.  
  34476. D
  34477. a
  34478. t
  34479. a
  34480. :
  34481.  
  34482. O
  34483. n
  34484. e
  34485. T1 Tw Twe TB2 TB1 Twb TB2 TB1 Twb TB2 TB1 Twb T2
  34486.  
  34487. I
  34488. n
  34489. t CKIO
  34490. e
  34491. r
  34492. n
  34493. tAD tAD
  34494. a
  34495. l A25–A5
  34496.  
  34497. W tAD
  34498. a F
  34499. i
  34500. t i
  34501. g A4–A0
  34502. + u
  34503. O r t
  34504. e
  34505. tCSD CSD
  34506. n 2
  34507. e 3 CSn
  34508. E .
  34509. 1
  34510. x 9
  34511. tRWD tRWD
  34512. t
  34513. e
  34514. r B
  34515. RD/WR
  34516. n u
  34517. a r
  34518. t t
  34519. l
  34520. RSD RSD
  34521. s
  34522. W t RD
  34523. a R t
  34524. i O
  34525. t t RDH
  34526. t RDS t RDS
  34527. ;
  34528. RDH
  34529. M
  34530. D63–D0
  34531.  
  34532. 2
  34533. (read)
  34534. n B
  34535. d u
  34536. R /
  34537. t
  34538. 3 s
  34539. BSD
  34540. e r C
  34541. v
  34542. BS
  34543. d
  34544. . / y
  34545. t
  34546.  
  34547. RDYH
  34548. 2 4 c t
  34549. t
  34550. t t
  34551. . l
  34552. RDYS RDYS RDYH
  34553. 0 h e
  34554. ,
  34555.  
  34556. RDY
  34557. 0 D
  34558. 2 a
  34559. tRDYS tRDYH
  34560. / t
  34561. tDACD
  34562. 9 a DACKn
  34563. 9 :
  34564. , t
  34565. O
  34566. (SA: IO ← memory) DACD
  34567. p
  34568. n
  34569. t t
  34570. a
  34571. DACD DACD
  34572. g e
  34573. e I DACKn
  34574. 7 n (DA)
  34575. 2 t
  34576. e
  34577. 9 r
  34578. o n
  34579. f a
  34580. l
  34581. 8
  34582. 3 W
  34583. 0
  34584. a
  34585. i
  34586. t
  34587. )
  34588.  
  34589. ----------------------- Page 744-----------------------
  34590.  
  34591. R
  34592. e
  34593. v
  34594. .
  34595.  
  34596. 2
  34597. .
  34598. 0
  34599. ,
  34600.  
  34601. 0 (
  34602. 2 N TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  34603. / o
  34604. 9
  34605. ,9 W CKIO
  34606. p a
  34607. i
  34608. t
  34609. a
  34610. AD
  34611. t
  34612. tAD
  34613. g ,
  34614. e A
  34615. A25–A5
  34616.  
  34617. 7 d t
  34618. 3 d
  34619. AD
  34620. 0 r F
  34621. o e i A4–A0
  34622. f s g
  34623. s u
  34624. 8 S r t t
  34625. 3
  34626. CSD CSD
  34627. 0 e e
  34628. t 2
  34629. u
  34630. CSn
  34631. 3
  34632. p .
  34633. 2
  34634. t
  34635. /
  34636. tRWD RWD
  34637. H 0
  34638. o
  34639. RD/WR
  34640.  
  34641. l B
  34642. d
  34643. u
  34644. t tRSD
  34645. T
  34646. RSD
  34647. r
  34648. i s
  34649. RD
  34650. m t
  34651. e R tRDS tRDH tRDS tRDH
  34652. I O D63–D0
  34653. n M (read)
  34654. s
  34655. e
  34656. t
  34657.  
  34658. BSD
  34659. r B
  34660. tBSD
  34661. t
  34662. i u
  34663. o
  34664. BS
  34665. s
  34666. n
  34667. , C
  34668. A y
  34669. n c RDY
  34670. l
  34671. S e
  34672. t
  34673. =
  34674. tDACD DACD tDACD
  34675. DACKn
  34676. 1
  34677. , (SA: IO ← memory)
  34678.  
  34679. A
  34680. n t t
  34681. H
  34682. DACD DACD
  34683. DACKn
  34684.  
  34685. =
  34686. (DA)
  34687.  
  34688. 1
  34689. )
  34690.  
  34691. ----------------------- Page 745-----------------------
  34692.  
  34693. F
  34694. i
  34695. g
  34696. u T1 Tw Twe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe T2
  34697. r
  34698. e
  34699.  
  34700. 2
  34701. CKIO
  34702. 3
  34703. .
  34704. 2 t t
  34705. 1
  34706. AD AD
  34707.  
  34708.  
  34709. A25`A5
  34710.  
  34711. B
  34712. u t
  34713. r
  34714. AD
  34715. s A4`A0
  34716. t
  34717.  
  34718. R t t
  34719. O
  34720. CSD CSD
  34721. M
  34722. CSn
  34723.  
  34724.  
  34725. B
  34726. u
  34727. tRWD tRWD
  34728. s
  34729.  
  34730. RD/WR
  34731. C
  34732. y
  34733. c t
  34734. l
  34735. tRSD tRSD RSD
  34736. e
  34737.  
  34738. (
  34739. RD
  34740. O
  34741. n t t t t
  34742. e
  34743. RDS RDH RDS RDH
  34744. D63`D0
  34745. I
  34746. n (read)
  34747. t
  34748. e
  34749. r
  34750. t t tBSD tBSD
  34751. n
  34752. BSD BSD
  34753. a BS
  34754. R l
  34755. e W
  34756. v
  34757. . a
  34758. t t t t
  34759.  
  34760. RDYS RDYH RDYS RDYH
  34761. 2 i
  34762. t
  34763. .
  34764. ,0 + RDY
  34765.  
  34766. 0 O t t tRDYS tRDYH
  34767. 2
  34768. RDYS RDYH
  34769. / n
  34770. 9 e
  34771. 9
  34772. t t t
  34773. E
  34774. DACD DACD DACD
  34775. , DACKn
  34776. p x
  34777. t
  34778. (SA: IO ← memory)
  34779. a e
  34780. g r
  34781. e n t
  34782.  
  34783. t
  34784. a
  34785. DACD DACD
  34786. 7
  34787. 3 l
  34788. DACKn
  34789.  
  34790. 1 W (DA)
  34791. o a
  34792. f
  34793. i
  34794. 8 t
  34795. )
  34796. 3
  34797. 0
  34798.  
  34799. ----------------------- Page 746-----------------------
  34800.  
  34801. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  34802.  
  34803. R CKIO
  34804. e
  34805. v t t
  34806. . AD AD
  34807.  
  34808. 2 Row
  34809. .
  34810. BANK
  34811. ,0 F
  34812. i
  34813. 0 g
  34814. tAD
  34815. 2 u
  34816. r
  34817. Precharge-sel
  34818. /
  34819. Row H/L
  34820. 9 e
  34821. 9
  34822. , 2
  34823. p 3
  34824. .
  34825. a 2
  34826. Addr Row column
  34827. g 2
  34828. e t t
  34829.  
  34830. CSD
  34831.  
  34832. CSD
  34833. 7 S
  34834. 3
  34835. CSn
  34836. ( y
  34837. 2 R n
  34838. o C c t
  34839. h
  34840. t
  34841. f
  34842. RWD RWD
  34843. 8 D r
  34844. o
  34845. RD/WR
  34846. 3 = n
  34847. 0
  34848. 1 o t t
  34849. u
  34850. RASD RASD
  34851. ,
  34852.  
  34853. C s RAS
  34854. A D t t
  34855. R
  34856. CASD2 CASD2
  34857. S
  34858. tCASD2
  34859. L A CASS
  34860. a M
  34861. t
  34862. e A
  34863. n
  34864. t tDQMD
  34865. u
  34866. DQMD
  34867. c
  34868. y t DQMn
  34869. o
  34870. = -
  34871. P
  34872. 3 r
  34873. tRDS tRDH
  34874. ,
  34875. e D63–D0
  34876. T c d0
  34877. h
  34878. (read)
  34879. P
  34880. a
  34881. t
  34882. C
  34883. WDD
  34884. r t
  34885. g
  34886. WDD
  34887. = e D63–D0
  34888. 3 B (write)
  34889. )
  34890. u
  34891. s
  34892. tBSD tBSD
  34893.  
  34894. C
  34895. BS
  34896. y
  34897. c
  34898. l
  34899. e
  34900. :
  34901. CKE
  34902. S
  34903. i
  34904. n
  34905. g
  34906. t tDACD tDACD
  34907. l
  34908. DACD
  34909. e DACKn
  34910.  
  34911. (SA: IO ← memory)
  34912.  
  34913. Note: IO: DACK device
  34914. SA: Single address DMA transfer
  34915. DA: Dual address DMA transfer
  34916. DACK set to active-high
  34917.  
  34918. ----------------------- Page 747-----------------------
  34919.  
  34920. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  34921.  
  34922. CKIO
  34923. F t
  34924. i
  34925. AD tAD
  34926. g
  34927. u BANK Row
  34928. r
  34929. e
  34930.  
  34931. 2
  34932. tAD
  34933. 3 Precharge-sel
  34934. .
  34935. 2
  34936. Row H/L
  34937. 3
  34938.  
  34939.  
  34940.  
  34941. S Addr
  34942. y
  34943. Row c0
  34944. n
  34945. ( c t t
  34946. h
  34947. CSD
  34948. R
  34949. CSD
  34950. r
  34951. CSn
  34952. C o
  34953. D n
  34954. o t
  34955. =
  34956. t
  34957. u
  34958. RWD RWD
  34959. s
  34960. 1
  34961. RD/WR
  34962.  
  34963. , D
  34964. C R t t
  34965. A
  34966. RASD
  34967. A
  34968. RASD
  34969. S M
  34970. RAS
  34971.  
  34972. L t t
  34973. a A
  34974. CASD2 CASD2
  34975. t
  34976. t u
  34977. CASD2
  34978. e
  34979. n t
  34980. CASS
  34981. o
  34982. c -
  34983. y P
  34984. = r
  34985. t tDQMD
  34986. e
  34987. DQMD
  34988.  
  34989. 3 c DQMn
  34990. , h
  34991. T a
  34992. R P r
  34993. e g
  34994. t tRDH
  34995. C
  34996. RDS
  34997. v e D63–D0
  34998. . R
  34999. d0 d1 d2 d3
  35000. 2 = (read)
  35001. . e
  35002. 3
  35003. t
  35004. 0 a
  35005. WDD
  35006. , ) d tWDD
  35007. 0 D63–D0
  35008. 2 B (write)
  35009. / u
  35010. 9 s
  35011. 9
  35012. , C tBSD tBSD
  35013. p y BS
  35014. a c
  35015. g l
  35016. e e
  35017. :
  35018. 7 B CKE
  35019. 3
  35020. 3 u
  35021. r
  35022. o s
  35023. f t
  35024.  
  35025. 8
  35026. tDACD tDACD tDACD
  35027. 3 DACKn
  35028. 0 (SA: IO ← memory)
  35029.  
  35030. ----------------------- Page 748-----------------------
  35031.  
  35032. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35033.  
  35034. CKIO
  35035.  
  35036. tAD tAD
  35037.  
  35038. BANK Row
  35039.  
  35040. tRWD tAD
  35041.  
  35042. Precharge-sel Row H/L
  35043.  
  35044. tRWD
  35045.  
  35046. Addr Row c0
  35047.  
  35048. tCSD tCSD
  35049.  
  35050. CSn
  35051.  
  35052. tRWD tRWD
  35053.  
  35054. RD/WR
  35055.  
  35056. tRASD tRASD
  35057.  
  35058. RAS
  35059.  
  35060. tCASD2 tCASD2 tCASD2
  35061.  
  35062. CASS
  35063.  
  35064. tDQMD tDQMD
  35065.  
  35066. DQMn
  35067.  
  35068. D63–D0 tRDS tRDH
  35069. (read) d0 d1 d2 d3
  35070.  
  35071. tWDD tWDD
  35072. D63–D0
  35073. (write)
  35074.  
  35075. tBSD tBSD
  35076.  
  35077. BS
  35078.  
  35079. CKE
  35080.  
  35081. tDACD tDACD tDACD
  35082.  
  35083. DACKn
  35084. (SA: IO ← memory)
  35085.  
  35086. Figure 23.24 Synchronous DRAM Normal Read Bus Cycle: ACT + READ Commands,
  35087. Burst (RCD = 1, CAS Latency = 3)
  35088.  
  35089. Rev. 2.0, 02/99, page 734 of 830
  35090.  
  35091. ----------------------- Page 749-----------------------
  35092.  
  35093. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35094.  
  35095. CKIO
  35096.  
  35097. tAD tAD tAD
  35098.  
  35099. BANK Row
  35100.  
  35101. tAD
  35102.  
  35103. Precharge-sel Row H/L
  35104.  
  35105. Addr Row c0
  35106.  
  35107. tCSD tCSD
  35108. CSn
  35109.  
  35110. tRWD tRWD
  35111.  
  35112. RD/WR
  35113.  
  35114. tRASD tRASD tRASD tRASD
  35115.  
  35116. RAS
  35117.  
  35118. tCASD2 tCASD2 tCASD2
  35119.  
  35120. CASS
  35121.  
  35122. tDQMD tDQMD
  35123.  
  35124. DQMn
  35125.  
  35126. D63–D0 tRDS tRDH
  35127.  
  35128. (read) d0 d1 d2 d3
  35129.  
  35130. tWDD tWDD
  35131. D63–D0
  35132. (write)
  35133.  
  35134. tBSD tBSD
  35135.  
  35136. BS
  35137.  
  35138. CKE
  35139.  
  35140. tDACD tDACD tDACD
  35141. DACKn
  35142. (SA: IO ← memory)
  35143.  
  35144. Figure 23.25 Synchronous DRAM Normal Read Bus Cycle: PRE + ACT + READ
  35145. Commands, Burst (TPC = 1, RCD = 1, CAS Latency = 3)
  35146.  
  35147. Rev. 2.0, 02/99, page 735 of 830
  35148.  
  35149. ----------------------- Page 750-----------------------
  35150.  
  35151. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35152.  
  35153. CKIO
  35154.  
  35155. tAD tAD
  35156.  
  35157. BANK Row
  35158.  
  35159. Precharge-sel H/L
  35160.  
  35161. Addr
  35162. c0
  35163.  
  35164. tCSD tCSD
  35165.  
  35166. CSn
  35167.  
  35168. tRWD tRWD
  35169.  
  35170. RD/WR
  35171.  
  35172. tRASD tRASD
  35173.  
  35174. RAS
  35175.  
  35176. tCASD2 tCASD2
  35177.  
  35178. CASS
  35179.  
  35180. tDQMD tDQMD
  35181.  
  35182. DQMn
  35183.  
  35184. D63–D0 tRDS tRDH
  35185.  
  35186. (read) d0 d1 d2 d3
  35187.  
  35188. tWDD tWDD
  35189. D63–D0
  35190. (write)
  35191.  
  35192. tBSD tBSD
  35193.  
  35194. BS
  35195.  
  35196. CKE
  35197.  
  35198. tDACD tDACD tDACD
  35199.  
  35200. DACKn
  35201. (SA: IO ← memory)
  35202.  
  35203. Figure 23.26 Synchronous DRAM Normal Read Bus Cycle: READ Command, Burst
  35204. (CAS Latency = 3)
  35205.  
  35206. Rev. 2.0, 02/99, page 736 of 830
  35207.  
  35208. ----------------------- Page 751-----------------------
  35209.  
  35210. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  35211.  
  35212. CKIO
  35213.  
  35214. tAD tAD
  35215.  
  35216. BANK Row
  35217.  
  35218. tAD
  35219. Precharge-sel Row H/L
  35220.  
  35221. Addr Row column
  35222.  
  35223. tCSD tCSD
  35224.  
  35225. CSn
  35226.  
  35227. tRWD tRWD
  35228.  
  35229. RD/WR
  35230.  
  35231. tRASD tRASD
  35232.  
  35233. RAS
  35234.  
  35235. tCASD2 tCASD2
  35236. tCASD2
  35237.  
  35238. CASS
  35239.  
  35240. tDQMD tDQMD
  35241.  
  35242. DQMn
  35243.  
  35244. tWDD
  35245. tWDD tWDD
  35246. D63–D0
  35247. c0
  35248. (write)
  35249.  
  35250. tBSD tBSD
  35251. BS
  35252.  
  35253. CKE
  35254. tDACD tDACD
  35255. DACKn
  35256. (SA: IO → memory)
  35257.  
  35258. Figure 23.27 Synchronous DRAM Auto-Precharge Write Bus Cycle: Single
  35259. (RCD = 1, TRWL = 2, TPC = 1)
  35260.  
  35261. Rev. 2.0, 02/99, page 737 of 830
  35262.  
  35263. ----------------------- Page 752-----------------------
  35264.  
  35265. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  35266.  
  35267. CKIO
  35268.  
  35269. tAD tAD
  35270.  
  35271. BANK Row
  35272.  
  35273. tAD
  35274. Precharge-sel Row H/L
  35275.  
  35276. Addr Row c0
  35277.  
  35278. tCSD tCSD
  35279.  
  35280. CSn
  35281.  
  35282. tRWD tRWD
  35283.  
  35284. RD/WR
  35285.  
  35286. tRASD tRASD
  35287.  
  35288. RAS
  35289.  
  35290. tCASD2 tCASD2
  35291. tCASD2
  35292.  
  35293. CASS
  35294.  
  35295. tDQMD tDQMD
  35296.  
  35297. DQMn
  35298.  
  35299. tWDD
  35300. tWDD tWDD
  35301. D63–D0
  35302. d0 d1 d2 d3
  35303. (write)
  35304.  
  35305. tBSD tBSD
  35306. BS
  35307.  
  35308. CKE
  35309. tDACD tDACD
  35310. DACKn
  35311. (SA: IO → memory)
  35312.  
  35313. Figure 23.28 Synchronous DRAM Auto-Precharge Write Bus Cycle: Burst
  35314. (RCD = 1, TRWL = 2, TPC = 1)
  35315.  
  35316. Rev. 2.0, 02/99, page 738 of 830
  35317.  
  35318. ----------------------- Page 753-----------------------
  35319.  
  35320. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  35321.  
  35322. CKIO
  35323.  
  35324. tAD tAD
  35325.  
  35326. BANK Row
  35327.  
  35328. tAD
  35329.  
  35330. Precharge-sel Row H/L
  35331.  
  35332. Addr Row c0
  35333.  
  35334. tCSD tCSD
  35335.  
  35336. CSn
  35337.  
  35338. tRWD tRWD
  35339.  
  35340. RD/WR
  35341.  
  35342. tRASD tRASD
  35343.  
  35344. RAS
  35345.  
  35346. tCASD2 tCASD2
  35347. tCASD2
  35348.  
  35349. CASS
  35350.  
  35351. tDQMD tDQMD
  35352.  
  35353. DQMn
  35354.  
  35355. tWDD
  35356. tWDD tWDD
  35357. D63–D0
  35358. d0 d1 d2 d3
  35359. (write)
  35360.  
  35361. tBSD tBSD
  35362. BS
  35363.  
  35364. CKE
  35365.  
  35366. tDACD tDACD
  35367.  
  35368. DACKn
  35369. (SA: IO → memory)
  35370.  
  35371. Figure 23.29 Synchronous DRAM Normal Write Bus Cycle: ACT + WRITE Commands,
  35372. Burst (RCD = 1, TRWL = 2)
  35373.  
  35374. Rev. 2.0, 02/99, page 739 of 830
  35375.  
  35376. ----------------------- Page 754-----------------------
  35377.  
  35378. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  35379.  
  35380. CKIO
  35381.  
  35382. tAD tAD tAD
  35383.  
  35384. BANK Row Row
  35385.  
  35386. tAD
  35387. Precharge-sel H/L Row H/L
  35388.  
  35389. Addr Row c0
  35390.  
  35391. tCSD tCSD
  35392.  
  35393. CSn
  35394.  
  35395. tRWD tRWD tRWD tRWD
  35396.  
  35397. RD/WR
  35398.  
  35399. tRASD tRASD tRASD tRASD
  35400.  
  35401. RAS
  35402.  
  35403. tCASD2 tCASD2
  35404. tCASD2
  35405.  
  35406. CASS
  35407.  
  35408. tDQMD tDQMD
  35409.  
  35410. DQMn
  35411.  
  35412. tWDD
  35413. tWDD tWDD
  35414. D63–D0
  35415. (write) d0 d1 d2 d3
  35416.  
  35417. tBSD tBSD
  35418. BS
  35419.  
  35420. CKE
  35421. tDACD tDACD tDACD
  35422.  
  35423. DACKn
  35424. (SA: IO → memory)
  35425.  
  35426. Figure 23.30 Synchronous DRAM Normal Write Bus Cycle: PRE + ACT + WRITE
  35427. Commands, Burst (TPC = 1, RCD = 1, TRWL = 2)
  35428.  
  35429. Rev. 2.0, 02/99, page 740 of 830
  35430.  
  35431. ----------------------- Page 755-----------------------
  35432.  
  35433. Tnop (Tnop) Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  35434.  
  35435. CKIO
  35436.  
  35437. tAD tAD
  35438.  
  35439. BANK Row
  35440.  
  35441. Precharge-sel H/L
  35442.  
  35443. Addr c0
  35444.  
  35445. tCSD tCSD
  35446.  
  35447. CSn
  35448.  
  35449. tRWD tRWD
  35450.  
  35451. RD/WR
  35452.  
  35453. RAS
  35454.  
  35455. tCASD2 tCASD2
  35456.  
  35457. CASS
  35458.  
  35459. tDQMD tDQMD
  35460.  
  35461. DQMn
  35462.  
  35463. tWDD
  35464. tWDD tWDD
  35465. D63–D0
  35466. d0 d1 d2 d3
  35467. (write)
  35468.  
  35469. tBSD tBSD
  35470. BS
  35471.  
  35472. CKE
  35473. tDACD SA-DMA tDACD
  35474.  
  35475. DACKn
  35476. (SA: IO → memory)
  35477.  
  35478. Normal write
  35479.  
  35480. Note: In the case of SA-DMA only, the (Tnop) cycle is inserted, and the DACKn signal is output as shown
  35481. by the solid line. In a normal write, the (Tnop) cycle is omitted and the DACKn signal is output as
  35482. shown by the dotted line.
  35483.  
  35484. Figure 23.31 Synchronous DRAM Normal Write Bus Cycle: WRITE Command, Burst
  35485. (TRWL = 2)
  35486.  
  35487. Rev. 2.0, 02/99, page 741 of 830
  35488.  
  35489. ----------------------- Page 756-----------------------
  35490.  
  35491. Tpr Tpc
  35492.  
  35493. CKIO
  35494.  
  35495. tAD tAD
  35496.  
  35497. BANK Row
  35498.  
  35499. Precharge-sel H/L
  35500.  
  35501. Addr
  35502.  
  35503. tCSD tCSD
  35504.  
  35505. CSn
  35506.  
  35507. tRWD tRWD
  35508.  
  35509. RD/WR
  35510.  
  35511. tRASD tRASD
  35512.  
  35513. RAS
  35514.  
  35515. tCASD2 tCASD2
  35516.  
  35517. CASS
  35518.  
  35519. tDQMD tDQMD
  35520.  
  35521. DQMn
  35522.  
  35523. tWDD tWDD
  35524. D63–D0
  35525. (write)
  35526.  
  35527. tBSD
  35528. BS
  35529.  
  35530. CKE
  35531.  
  35532. tDACD tDACD
  35533.  
  35534. DACKn
  35535.  
  35536. Figure 23.32 Synchronous DRAM Bus Cycle: Synchronous DRAM Precharge Command
  35537. (TPC = 1)
  35538.  
  35539. Rev. 2.0, 02/99, page 742 of 830
  35540.  
  35541. ----------------------- Page 757-----------------------
  35542.  
  35543. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  35544.  
  35545. CKIO
  35546.  
  35547. tAD tAD
  35548.  
  35549. BANK
  35550.  
  35551. Precharge-sel
  35552.  
  35553. Addr
  35554.  
  35555. tCSD tCSD tCSD tCSD
  35556.  
  35557. CSn
  35558.  
  35559. tRWD tRWD
  35560.  
  35561. RD/WR
  35562.  
  35563. tRASD tRASD tRASD tRASD
  35564.  
  35565. RAS
  35566.  
  35567. tCASD2 tCASD2 tCASD2 tCASD2
  35568.  
  35569. CASS
  35570.  
  35571. tDQMD tDQMD
  35572. DQMn
  35573.  
  35574. tWDD tWDD
  35575. D63–D0
  35576. (write)
  35577.  
  35578. tBSD
  35579.  
  35580. BS
  35581.  
  35582. CKE
  35583. tDACD tDACD
  35584.  
  35585. DACKn
  35586.  
  35587. Figure 23.33 Synchronous DRAM Bus Cycle: Synchronous DRAM Auto-Refresh
  35588. (TRAS = 1, TRC = 1)
  35589.  
  35590. Rev. 2.0, 02/99, page 743 of 830
  35591.  
  35592. ----------------------- Page 758-----------------------
  35593.  
  35594. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  35595.  
  35596. CKIO
  35597.  
  35598. tAD tAD
  35599.  
  35600. BANK
  35601.  
  35602. Precharge-sel
  35603.  
  35604. Addr
  35605.  
  35606. tCSD
  35607. tCSD tCSD tCSD
  35608.  
  35609. CSn
  35610.  
  35611. tRWD tRWD
  35612.  
  35613. RD/WR
  35614.  
  35615. tRASD
  35616. tRASD tRASD tRASD
  35617.  
  35618. RAS
  35619.  
  35620. tCASD2
  35621. tCASD2 tCASD2 tCASD2
  35622.  
  35623. CASS
  35624.  
  35625. tDQMD tDQMD
  35626. DQMn
  35627.  
  35628. tWDD tWDD
  35629.  
  35630. D63–D0
  35631. (write)
  35632.  
  35633. tBSD
  35634.  
  35635. BS
  35636.  
  35637. tCKED tCKED
  35638.  
  35639. CKE
  35640.  
  35641. tDACD tDACD
  35642.  
  35643. DACKn
  35644.  
  35645. Figure 23.34 Synchronous DRAM Bus Cycle: Synchronous DRAM Self-Refresh (TRC = 1)
  35646.  
  35647. Rev. 2.0, 02/99, page 744 of 830
  35648.  
  35649. ----------------------- Page 759-----------------------
  35650.  
  35651. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  35652.  
  35653. CKIO
  35654.  
  35655. tAD tAD tAD
  35656.  
  35657. BANK
  35658.  
  35659. Precharge-sel
  35660.  
  35661. Addr
  35662.  
  35663. tCSD tCSD tCSD
  35664.  
  35665. CSn
  35666.  
  35667. tRWD tRWD tRWD
  35668.  
  35669. RD/WR
  35670.  
  35671. tRASD tRASD tRASD
  35672.  
  35673. RAS
  35674.  
  35675. tCASD2 tCASD2 tCASD2 tCASD2
  35676.  
  35677. CASS
  35678.  
  35679. tDQMD tDQMD
  35680.  
  35681. DQMn
  35682.  
  35683. tWDD tWDD
  35684. D63–D0
  35685. (write)
  35686.  
  35687. tBSD
  35688.  
  35689. BS
  35690.  
  35691. CKE
  35692.  
  35693. tDACD tDACD
  35694.  
  35695. DACKn
  35696.  
  35697. Figure 23.35 (a) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  35698. Setting (PALL)
  35699.  
  35700. Rev. 2.0, 02/99, page 745 of 830
  35701.  
  35702. ----------------------- Page 760-----------------------
  35703.  
  35704. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  35705.  
  35706. CKIO
  35707.  
  35708. tAD tAD tAD
  35709.  
  35710. BANK
  35711.  
  35712. Precharge-sel
  35713.  
  35714. Addr
  35715.  
  35716. tCSD tCSD tCSD
  35717.  
  35718. CSn
  35719.  
  35720. tRWD tRWD tRWD
  35721.  
  35722. RD/WR
  35723.  
  35724. tRASD tRASD tRASD
  35725.  
  35726. RAS
  35727.  
  35728. tCASD2 tCASD2 tCASD2 tCASD2
  35729.  
  35730. CASS
  35731.  
  35732. tDQMD tDQMD
  35733.  
  35734. DQMn
  35735.  
  35736. tWDD tWDD
  35737. D63–D0
  35738. (write)
  35739.  
  35740. tBSD
  35741.  
  35742. BS
  35743.  
  35744. CKE
  35745.  
  35746. tDACD tDACD
  35747.  
  35748. DACKn
  35749.  
  35750. Figure 23.35 (b) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  35751. Setting (SET)
  35752.  
  35753. Rev. 2.0, 02/99, page 746 of 830
  35754.  
  35755. ----------------------- Page 761-----------------------
  35756.  
  35757. Tr1 Tr2 Tc1 Tc2 Tpc Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  35758.  
  35759. CKIO
  35760.  
  35761. tAD tAD tAD tAD tAD tAD
  35762.  
  35763. A25–A0 Row column Row column
  35764. (
  35765. (
  35766. 1
  35767. )
  35768.  
  35769. t tCSD tCSD tCSD
  35770. R
  35771. CSD
  35772. C
  35773. CSn
  35774. D t t
  35775.  
  35776. tRWD tRWD RWD RWD
  35777. =
  35778.  
  35779. 0
  35780. RD/WR
  35781. ,
  35782.  
  35783. A t t t tRASD t tRASD
  35784. n
  35785. RASD RASD RASD RASD
  35786. W F RAS
  35787. i
  35788. g
  35789. = u
  35790. r
  35791. 0
  35792. t t t t t t
  35793. e
  35794. CASD1 CASD1 CASD1 CASD1 CASD1 CASD1
  35795. ,
  35796.  
  35797. T 2
  35798. CASn
  35799. 3
  35800. P .
  35801. C 3
  35802. 6
  35803.  
  35804. t t t t
  35805. =
  35806. RDS RDH RDS RDH
  35807.  
  35808. D63–D0
  35809.  
  35810. 1 D (read)
  35811. ; R
  35812. (
  35813. A
  35814. t t
  35815. 2
  35816. WDD WDD
  35817. ) M tWDD tWDD tWDD tWDD
  35818. R D63–D0
  35819. C B (write)
  35820. D u
  35821. s
  35822. R = C
  35823. 1 y
  35824. t t tBSD tBSD
  35825. e
  35826. BSD BSD
  35827. , c
  35828. v
  35829. BS
  35830. . A l
  35831. e
  35832. 2 n s
  35833. ,0. W t t t t t t
  35834.  
  35835. DACD DACD DACD DACD DACD DACD
  35836. 0 = DACKn
  35837. 2
  35838. / 1 (SA: IO ← memory)
  35839. 9 ,
  35840. ,9 T
  35841. p P
  35842. C
  35843. t t t
  35844. a
  35845. DACD DACD DACD tDACD tDACD tDACD
  35846. g DACKn
  35847. e = (SA: IO → memory)
  35848. 7 2
  35849. 4 )
  35850. 7
  35851.  
  35852. o
  35853. f
  35854.  
  35855. 8
  35856. 3 Note: IO: DACK device (2)
  35857. 0
  35858. (1)
  35859. SA: Single address DMA transfer
  35860. DA: Dual address DMA transfer
  35861. DACK set to active-high
  35862.  
  35863. ----------------------- Page 762-----------------------
  35864.  
  35865. T1r Tr2 Tc1 Tc2 Tce Tpc
  35866.  
  35867. CKIO
  35868.  
  35869. tAD tAD tAD
  35870.  
  35871. A25–A0 Row column
  35872.  
  35873. tCSD tCSD
  35874.  
  35875. CSn
  35876.  
  35877. tRWD tRWD
  35878.  
  35879. RD/WR
  35880.  
  35881. tRASD tRASD tRASD
  35882. RAS
  35883.  
  35884. tCASD1 tCASD1 tCASD1
  35885. CASn
  35886.  
  35887. tRDS tRDH
  35888. D63–D0
  35889. (read)
  35890.  
  35891. tWDD
  35892. D63–D0
  35893. (write)
  35894.  
  35895. tBSD tBSD
  35896.  
  35897. BS
  35898.  
  35899. tDACD tDACD
  35900. DACKn
  35901. (SA: IO ← memory)
  35902.  
  35903. Figure 23.37 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  35904.  
  35905. Rev. 2.0, 02/99, page 748 of 830
  35906.  
  35907. ----------------------- Page 763-----------------------
  35908.  
  35909. F
  35910. T1r Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  35911. i
  35912. g
  35913. u CKIO
  35914. r
  35915. e
  35916.  
  35917. 2 t t t t
  35918. 3
  35919. AD AD AD AD
  35920. .
  35921. 3 A25–A0 Row c0 c1 c2 c3
  35922. 8
  35923.  
  35924.  
  35925.  
  35926. D tCSD tCSD
  35927. R
  35928. A
  35929. CSn
  35930. M
  35931.  
  35932. B
  35933. u
  35934. tRWD tRWD
  35935. r
  35936. s RD/WR
  35937. t
  35938.  
  35939. B
  35940. u
  35941. s
  35942. tRASD tRASD tRASD
  35943.  
  35944. C RAS
  35945. y
  35946. c
  35947. l
  35948. e
  35949.  
  35950. (
  35951. E
  35952. tRWD tCASD1 tCASD1 tCASD1 tCASD1
  35953. D
  35954. CASn
  35955. O
  35956.  
  35957. M
  35958. o
  35959. d
  35960. D63–D0 tRDS tRDH tRDS tRDH
  35961. e
  35962. , (read) d0 d1 d2 d3
  35963. R R
  35964. e
  35965. v. C tWDD
  35966. 2 D
  35967. 0. = D63–D0
  35968. ,
  35969. 0
  35970. 0
  35971. (write)
  35972. ,
  35973. 2 A
  35974. /
  35975. 9 n
  35976. ,9 W tBSD tBSD tBSD tBSD
  35977. p
  35978. a = BS
  35979. g 0
  35980. e ,
  35981.  
  35982. 7 T
  35983. 4 P
  35984. 9
  35985. C t t t
  35986. o
  35987. DACD DACD DACD
  35988. DACKn
  35989. f =
  35990. 8
  35991. (SA: IO ← memory)
  35992. 3 1
  35993. )
  35994. 0
  35995.  
  35996. ----------------------- Page 764-----------------------
  35997.  
  35998. R
  35999. e F
  36000. i
  36001. v. g
  36002. u
  36003. 2. r
  36004. 0 e
  36005. , 2 Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tce Tpc
  36006. 0 3
  36007. 2 .
  36008. / 3 CKIO
  36009. 9 9
  36010. 9
  36011. ,
  36012. t t
  36013.  
  36014. AD AD t
  36015.  
  36016. AD
  36017. p D
  36018. a R A25–A0 Row c0 c1 c2 c3
  36019. g
  36020. e A t t
  36021. M
  36022. CSD CSD
  36023.  
  36024. 7
  36025. 5
  36026. CSn
  36027. 0 B
  36028. o u t t
  36029. r
  36030. RWD RWD
  36031. f
  36032. s
  36033. 8 t
  36034. 3
  36035. RD/WR
  36036. 0 B
  36037. u
  36038. tRASD t
  36039. s
  36040. tRASD RASD
  36041.  
  36042. C RAS
  36043. y
  36044. c
  36045. l
  36046. e
  36047. tCASD1
  36048.  
  36049. t t t t t
  36050. (
  36051. CASD1 CASD1 CASD1 CASD1 CASD1
  36052. E CASn
  36053. D
  36054. O
  36055.  
  36056. M D63–D0 tRDS tRDH tRDS tRDH
  36057. o
  36058. (read) d0 d1 d2 d3
  36059. d
  36060. e
  36061. , t
  36062. WDD
  36063. R D63–D0
  36064. C (write)
  36065. D
  36066.  
  36067. =
  36068. tBSD tBSD
  36069.  
  36070. 1 BS
  36071. ,
  36072.  
  36073. A
  36074. n t t
  36075. W
  36076. DACD DACD tDACD
  36077.  
  36078. DACKn
  36079. = (SA: IO ← memory)
  36080.  
  36081. 1
  36082. ,
  36083.  
  36084. T
  36085. P
  36086. C
  36087.  
  36088. =
  36089.  
  36090. 1
  36091. )
  36092.  
  36093. ----------------------- Page 765-----------------------
  36094.  
  36095. F
  36096. i
  36097. g
  36098. u
  36099. r
  36100. e
  36101.  
  36102. 2
  36103. 3
  36104. .
  36105. 4
  36106. 0
  36107.  
  36108.  
  36109.  
  36110. D
  36111. R Tcw Tc2 Tcnw Tc1 Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tce Tpc
  36112. A
  36113. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw
  36114. M CKIO
  36115.  
  36116. B
  36117. tAD tAD tAD
  36118. u A25–A0 row c0 c1 c2 c3
  36119. r
  36120. s
  36121. t
  36122.  
  36123. tCSD
  36124. B
  36125. tCSD
  36126. CSn
  36127. u
  36128. s
  36129. C C
  36130. A
  36131. tRWD tRWD
  36132. y
  36133. S c
  36134. RD/WR
  36135. l
  36136. N e tRASD
  36137. e
  36138. t
  36139. ( t RASD
  36140. g E
  36141. RASD
  36142. RAS
  36143. a D
  36144. t
  36145. e O
  36146. P
  36147. tCASD1 tCASD1 tCASD1 tCASD1 t
  36148. M
  36149. CASD1
  36150. u CASn
  36151. l o
  36152. s
  36153. e d
  36154. e
  36155. W , D63–D0 tRDS tRDH tRDS tRDH
  36156. i R (read) d0 d1 d2 d3
  36157. d C
  36158. t
  36159. R h D
  36160. tWDD
  36161. D63–D0
  36162. e )
  36163. v = (write)
  36164. .
  36165. 1
  36166. 2 , t t
  36167. .
  36168. BSD BSD
  36169. ,0 A BS
  36170. n
  36171. 0 W
  36172. 2 t
  36173. /
  36174. DACD
  36175. 9
  36176. tDACD
  36177. =
  36178. DACKn tDACD
  36179. 9
  36180. , 1 (SA: IO ← memory)
  36181. p ,
  36182. a T
  36183. g P
  36184. e
  36185. 7 C
  36186. 5 =
  36187. 1
  36188. 1
  36189. o ,
  36190. f 2
  36191. 8 -
  36192. 3 C
  36193. 0 y
  36194. c
  36195. l
  36196. e
  36197.  
  36198. ----------------------- Page 766-----------------------
  36199.  
  36200. R
  36201. e
  36202. v
  36203. .
  36204.  
  36205. 2
  36206. .
  36207. 0
  36208. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  36209. ,
  36210.  
  36211. 0
  36212. 2 F
  36213. CKIO
  36214. / i
  36215. 9 g
  36216. ,9 u t t t t
  36217. r
  36218. AD AD AD AD
  36219. p e
  36220. a Row c0 c1 c2 c3
  36221. 2
  36222. A25–A0
  36223. g
  36224. e 3
  36225. .
  36226. t
  36227. 4
  36228. CSD
  36229. 7
  36230. 1
  36231. t
  36232. 5
  36233. CSD
  36234.  
  36235. 2 CSn
  36236. o ( D
  36237. f E R
  36238. 8 D A
  36239. 3
  36240. O
  36241. t t
  36242. 0 M
  36243. RWD RWD
  36244.  
  36245. M
  36246. RD/WR
  36247. B
  36248. o u
  36249. d r
  36250. e s
  36251. tRASD tRASD
  36252. , t
  36253.  
  36254. R B RAS
  36255. C u
  36256. D s
  36257. C
  36258. tCASD1
  36259.  
  36260. tCASD1 tCASD1 tCASD1 t
  36261. =
  36262. CASD1
  36263. y
  36264. 0 c
  36265. CASn
  36266. l
  36267. , e
  36268. A :
  36269. n R
  36270. W
  36271. t t t t
  36272. A
  36273. D63–D0 RDS RDH RDS RDH
  36274. S (read) d0 d1 d2 d3
  36275. =
  36276. 0 D tWDD
  36277. ) o
  36278. w D63–D0
  36279. n (write)
  36280.  
  36281. M tBSD tBSD tBSD tBSD
  36282. o
  36283. d BS
  36284. e
  36285.  
  36286. S
  36287. t
  36288. a
  36289. t t t t
  36290. e
  36291. DACD DACD DACD
  36292. DACKn
  36293. (SA: IO ← memory)
  36294.  
  36295. ----------------------- Page 767-----------------------
  36296.  
  36297. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  36298.  
  36299. F CKIO
  36300. i
  36301. g
  36302. u
  36303. r
  36304. e
  36305. tAD tAD tAD
  36306.  
  36307. 2 c0 c1 c2 c3
  36308. 3
  36309. A25–A0
  36310. .
  36311. 4
  36312. 2
  36313. tCSD
  36314.  
  36315. t
  36316.  
  36317. CSD
  36318. D
  36319. R
  36320. CSn
  36321. ( A
  36322. E M
  36323. D
  36324. t t
  36325. B
  36326. RWD RWD
  36327. O u
  36328.  
  36329. RD/WR
  36330. M r
  36331. s
  36332. t
  36333. o
  36334. RAS-down
  36335. d B mode ended
  36336. e u
  36337. tRASD
  36338. , s
  36339. R C RAS
  36340. C y
  36341. c
  36342. t
  36343. D
  36344. CASD1
  36345. l
  36346. e
  36347. t t t t
  36348. =
  36349. CASD1 CASD1 CASD1 CASD1
  36350. :
  36351.  
  36352. 0 R CASn
  36353. , A
  36354. A S
  36355. n
  36356. R W D
  36357. o
  36358. D63–D0 tRDS tRDH tRDS tRDH
  36359. e = w (read)
  36360. v. 0 n d0 d1 d2 d3
  36361. 2 ) M
  36362. tWDD
  36363. .
  36364. ,0 o D63–D0
  36365. 0 d
  36366. e (write)
  36367. 2
  36368. / C
  36369. 9
  36370. 9 o
  36371. tBSD tBSD tBSD tBSD
  36372. , n
  36373. p t
  36374. i BS
  36375. a n
  36376. g u
  36377. e a
  36378. 7 t
  36379. i
  36380. 5 o t t
  36381. 3 n
  36382. DACD DACD
  36383.  
  36384. o
  36385. DACKn
  36386. f
  36387. (SA: IO ← memory)
  36388. 8
  36389. 3
  36390. 0
  36391.  
  36392. ----------------------- Page 768-----------------------
  36393.  
  36394. F
  36395. R i
  36396. g
  36397. e u Tc2 Tc1 Tc2 Tpc
  36398. v
  36399. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1
  36400. . r
  36401. e
  36402. 2
  36403. . 2 CKIO
  36404. 0 3
  36405. , .
  36406. 0 4
  36407. 2 3 tAD tAD tAD
  36408. /
  36409. 9
  36410. 9 D
  36411. A25–A0 Row c0 c1 c2 c3
  36412. , R
  36413. p
  36414. a A t t
  36415. g M
  36416. CSD CSD
  36417. e CSn
  36418.  
  36419. 7 B
  36420. 5 u
  36421. 4 r
  36422. s
  36423. t t
  36424. o
  36425. RWD RWD
  36426. t
  36427. f
  36428. B
  36429. RD/WR
  36430. 8
  36431. 3 u
  36432. 0 s
  36433.  
  36434. C
  36435. tRASD tRASD tRASD
  36436. y
  36437. c
  36438. l
  36439. RAS
  36440. e
  36441.  
  36442. (
  36443. F tCASD1 t t t t
  36444. a
  36445. CASD1 CASD1 CASD1 CASD1
  36446. s
  36447. t
  36448. CASn
  36449.  
  36450. P
  36451. a
  36452. g
  36453. e
  36454. D63–D0 tRDS tRDH tRDS tRDH
  36455.  
  36456. M (read) d0 d1 d2 d3
  36457. o
  36458. tWDD
  36459. d
  36460. e
  36461. tWDD tWDD tWDD
  36462. ,
  36463. D63–D0
  36464. R (write) d0 d1 d2 d3
  36465. C
  36466. D
  36467.  
  36468. =
  36469. tBSD tBSD
  36470.  
  36471. 0
  36472. , BS
  36473.  
  36474. A
  36475. n
  36476. W tDACD tDACD tDACD
  36477.  
  36478. =
  36479. DACKn
  36480.  
  36481. 0
  36482. (SA: IO ← memory)
  36483. ,
  36484.  
  36485. T tDACD tDACD t
  36486. P
  36487. DACD
  36488. C DACKn
  36489. (SA: IO → memory)
  36490. =
  36491.  
  36492. 1
  36493. )
  36494.  
  36495. ----------------------- Page 769-----------------------
  36496.  
  36497. F
  36498. i
  36499. g
  36500. u
  36501. r
  36502. e
  36503.  
  36504. 2
  36505. 3
  36506. .
  36507. 4
  36508. 4 Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tpc
  36509.  
  36510.  
  36511.  
  36512. D CKIO
  36513. R
  36514. A tAD tAD tAD
  36515. M A25–A0 Row c0 c1 c2 c3
  36516.  
  36517. B
  36518. u
  36519. tCSD tCSD
  36520. r
  36521. s
  36522. CSn
  36523. t
  36524.  
  36525. B t t
  36526. u
  36527. RWD RWD
  36528. s RD/WR
  36529.  
  36530. C t
  36531. y
  36532. RASD t
  36533. c
  36534. tRASD RASD
  36535. l
  36536. e RAS
  36537.  
  36538. (
  36539. F t
  36540. a
  36541. CASD1 tCASD1 tCASD1 tCASD1 tCASD1
  36542. s
  36543. t
  36544. CASn
  36545.  
  36546. P
  36547. a t
  36548. g
  36549. D63–D0 tRDS tRDH tRDS RDH
  36550. e
  36551. (read) d0 d1 d2 d3
  36552. M
  36553. tWDD
  36554. o
  36555. tWDD tWDD t
  36556. d
  36557. WDD
  36558. R
  36559. D63–D0
  36560. e
  36561. d0 d1 d2 d3
  36562. e
  36563. (write)
  36564. ,
  36565.  
  36566. v. R
  36567. 2 C
  36568. tBSD tBSD
  36569. 0. D BS
  36570. ,
  36571. 0 = t
  36572. 2
  36573. DACD
  36574. / 1 t tDACD
  36575. 9 ,
  36576. DACD
  36577.  
  36578. A
  36579. DACKn
  36580. 9
  36581. , n (SA: IO ← memory)
  36582. p W tDACD
  36583. a
  36584. tDACD tDACD
  36585. g
  36586. e =
  36587. DACKn
  36588. (SA: IO → memory)
  36589. 7 1
  36590. 5 ,
  36591. 5 T
  36592. o P
  36593. f C
  36594. 8
  36595. 3 =
  36596. 0
  36597. 1
  36598. )
  36599.  
  36600. ----------------------- Page 770-----------------------
  36601.  
  36602. R (
  36603. e F
  36604. v. a
  36605. s
  36606. 2 t
  36607. .
  36608. 0 P
  36609. , a
  36610. 0 g
  36611. 2 e
  36612. /
  36613. 9 M
  36614. 9
  36615. , o
  36616.  
  36617. Tc1 Tcw Tc2 Tcnw Tcnw Tc1
  36618. d
  36619. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcw Tc2 Tcnw Tpc
  36620. p
  36621. a e
  36622. , CKIO
  36623. g
  36624. e R
  36625.  
  36626. t t t
  36627. C
  36628. AD AD AD
  36629. 7
  36630. 5 D
  36631. A25–A0
  36632. F
  36633. Row c0 c1 c2 c3
  36634. 6 i
  36635. o = g t tCSD
  36636. u
  36637. CSD
  36638. f 1 CSn
  36639. 8 , r
  36640. 3 A e
  36641. 0 2
  36642. t t
  36643. n
  36644. RWD RWD
  36645. 3
  36646. W
  36647. RD/WR
  36648. .
  36649. 4
  36650. 5
  36651. t
  36652. =
  36653. RASD t
  36654.  
  36655. t RASD
  36656.  
  36657.  
  36658. RASD
  36659.  
  36660. 1 D RAS
  36661. ,
  36662. T R t t t
  36663. A
  36664. CASD1 t CASD1 t CASD1
  36665. P
  36666. CASD1 CASD1
  36667. C M
  36668. CASn
  36669.  
  36670. = B D63–D0 tRDS tRDH tRDS tRDH
  36671. 1 u
  36672. ,
  36673. (read) d0 d1 d2 d3
  36674. r t
  36675. 2
  36676. WDD
  36677. s
  36678. t
  36679. t t
  36680. - WDD WDD t
  36681. C
  36682. WDD
  36683. B
  36684. D63–D0
  36685. d0 d1 d2 d3
  36686. y u (write)
  36687. c s
  36688. l
  36689. e C
  36690. tBSD tBSD
  36691.  
  36692. C y BS
  36693. A c
  36694. l
  36695. tDACD
  36696. S e t t
  36697.  
  36698. DACD DACD
  36699. N
  36700. DACKn
  36701. e (SA: IO ← memory)
  36702. g
  36703. tDACD t t
  36704. a
  36705. DACD DACD
  36706. t DACKn
  36707. e
  36708. (SA: IO → memory)
  36709. P
  36710. u
  36711. l
  36712. s
  36713. e
  36714.  
  36715. W
  36716. i
  36717. d
  36718. t
  36719. h
  36720. )
  36721.  
  36722. ----------------------- Page 771-----------------------
  36723.  
  36724. F
  36725. i
  36726. g
  36727. u
  36728. r
  36729. e
  36730.  
  36731. 2
  36732. 3
  36733. .
  36734. 4
  36735. 6
  36736. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  36737.  
  36738.  
  36739.  
  36740. D CKIO
  36741. R
  36742. A
  36743. tAD tAD tAD tAD
  36744. M A25–A0 Row c0 c1 c2 c3
  36745.  
  36746. B
  36747. u
  36748. tCSD tCSD tCSD
  36749. r
  36750. s CSn
  36751. t
  36752.  
  36753. B
  36754. u
  36755. tRWD tRWD tRWD
  36756. s
  36757. RD/WR
  36758. C
  36759. y
  36760. c
  36761. tRASD
  36762. l t
  36763. e
  36764. RASD
  36765. :
  36766.  
  36767. R
  36768. RAS
  36769. A
  36770. n A
  36771. S
  36772. t t t t t
  36773. W
  36774. CASD1 CASD1 CASD1 CASD1 CASD1
  36775.  
  36776. D
  36777. CASn
  36778.  
  36779. = o
  36780. 0 w
  36781. ) n
  36782. D63–D0 tRDS tRDH tRDS tRDH
  36783.  
  36784. M (read) t d0 d1 d2 d3
  36785. o
  36786. WDD
  36787. d tWDD tWDD tWDD
  36788. R e D63–D0
  36789. e S
  36790. d0 d1 d2 d3
  36791. (write)
  36792. v t
  36793. . a
  36794. 2 t
  36795. . e t t
  36796. 0
  36797. BSD BSD
  36798. (
  36799. , F
  36800. 0
  36801. BS
  36802. a
  36803. 2 s
  36804. / t
  36805. 9
  36806. 9 P
  36807. tDACD tDACD tDACD
  36808. , a DACKn
  36809. p g
  36810. a e
  36811. (SA: IO ← memory)
  36812. g M
  36813. e
  36814. tDACD tDACD tDACD
  36815. 7 o
  36816. d
  36817. DACKn
  36818. 5
  36819. 7 e (SA: IO → memory)
  36820. ,
  36821.  
  36822. o R
  36823. f
  36824. 8 C
  36825. 3 D
  36826. 0
  36827. =
  36828.  
  36829. 0
  36830. ,
  36831.  
  36832. ----------------------- Page 772-----------------------
  36833.  
  36834. F
  36835. i
  36836. g
  36837. R u
  36838. e r
  36839. v e
  36840. .
  36841. 2 2
  36842. . 3
  36843. 0 .
  36844. 4
  36845. Tc1 Tc2 Tc1 Tc2
  36846. , Tnop Tc1 Tc2 Tc1 Tc2
  36847. 0 7
  36848. 2 CKIO
  36849. / D
  36850. 9
  36851. ,9 R t t
  36852. A
  36853. AD AD
  36854. p
  36855. a M
  36856. A25–A0 c0 c1 c2 c3
  36857. g
  36858. e B t t
  36859. 7 u
  36860. CSD tCSD CSD
  36861. 5 r CSn
  36862. 8 s
  36863. t
  36864. o B
  36865. f
  36866. t t
  36867. u
  36868. t
  36869. 8
  36870. RWD RWD RWD
  36871. 3 s RD/WR
  36872. 0 C
  36873. R y
  36874. c t
  36875. C l
  36876. RAS down mode ended RASD
  36877. e
  36878. D : RAS
  36879. = R t t t t
  36880. A
  36881. CASD1 CASD1 CASD1 CASD1
  36882. 0
  36883. tCASD1
  36884. , S
  36885. A
  36886. CASn
  36887. D
  36888. n o
  36889. W w t t t
  36890. n
  36891. RDS t RDS RDH
  36892.  
  36893. D63–D0 RDH
  36894. =
  36895. M
  36896. (read) d0 d1 d2 d3
  36897.  
  36898. 0 tWDD
  36899. ) o t
  36900. d
  36901. WDD tWDD tWDD
  36902. e
  36903. D63–D0
  36904.  
  36905. d0 d1 d2 d3
  36906. C (write)
  36907. o
  36908. n t t
  36909. t
  36910. BSD BSD
  36911. i
  36912. n
  36913. u
  36914. BS
  36915. a
  36916. t
  36917. i
  36918. o
  36919. tDACD tDACD tDACD
  36920. n DACKn
  36921.  
  36922. ( (SA: IO ← memory)
  36923. F
  36924. a t t t
  36925. s
  36926. DACD DACD DACD
  36927. t
  36928. DACKn
  36929. P (SA: IO → memory)
  36930. a
  36931. g
  36932. e
  36933.  
  36934. M
  36935. o
  36936. d
  36937. e
  36938. ,
  36939.  
  36940. ----------------------- Page 773-----------------------
  36941.  
  36942. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  36943.  
  36944. CKIO
  36945.  
  36946. tAD
  36947.  
  36948. A25–A0
  36949.  
  36950. tCSD
  36951.  
  36952. CSn
  36953.  
  36954. tRWD
  36955.  
  36956. RD/WR
  36957.  
  36958. tRASD tRASD tRASD
  36959.  
  36960. RAS
  36961.  
  36962. tCASD1
  36963. tCASD1 tCASD1
  36964.  
  36965. CASn
  36966.  
  36967. tWDD
  36968.  
  36969. D63–D0
  36970. (write)
  36971.  
  36972. BS
  36973.  
  36974. tDACD
  36975. DACKn
  36976. (SA: IO ← memory)
  36977.  
  36978. tDACD
  36979.  
  36980. DACKn
  36981. (SA: IO → memory)
  36982.  
  36983. Figure 23.48 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 0, TRC = 1)
  36984.  
  36985. Rev. 2.0, 02/99, page 759 of 830
  36986.  
  36987. ----------------------- Page 774-----------------------
  36988.  
  36989. TRr1 TRr2 TRr3 TRr4 TRr4w TRr5 Trc Trc Trc
  36990.  
  36991. CKIO
  36992.  
  36993. tAD
  36994.  
  36995. A25–A0
  36996.  
  36997. tCSD
  36998.  
  36999. CSn
  37000.  
  37001. tRWD
  37002.  
  37003. RD/WR
  37004.  
  37005. tRASD tRASD tRASD
  37006.  
  37007. RAS
  37008. tCASD1
  37009. tCASD1 tCASD1
  37010.  
  37011. CASn
  37012.  
  37013. tWDD
  37014.  
  37015. D63–D0
  37016. (write)
  37017.  
  37018. BS
  37019.  
  37020. tDACD
  37021. DACKn
  37022. (SA: IO ← memory)
  37023.  
  37024. tDACD
  37025.  
  37026. DACKn
  37027. (SA: IO → memory)
  37028.  
  37029. Figure 23.49 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 1, TRC = 1)
  37030.  
  37031. Rev. 2.0, 02/99, page 760 of 830
  37032.  
  37033. ----------------------- Page 775-----------------------
  37034.  
  37035. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  37036.  
  37037. CKIO
  37038.  
  37039. tAD
  37040.  
  37041. A25–A0
  37042.  
  37043. tCSD
  37044.  
  37045. CSn
  37046.  
  37047. tRWD
  37048.  
  37049. RD/WR
  37050.  
  37051. tRASD tRASD tRASD
  37052.  
  37053. RAS
  37054.  
  37055. tCASD1 tCASD1 tCASD1
  37056.  
  37057. CASn
  37058.  
  37059. tWDD
  37060.  
  37061. D63–D0
  37062. (write)
  37063.  
  37064. BS
  37065.  
  37066. tDACD
  37067. DACKn
  37068. (SA: IO ← memory)
  37069.  
  37070. tDACD
  37071. DACKn
  37072. (SA: IO → memory)
  37073.  
  37074. Figure 23.50 DRAM Bus Cycle: DRAM Self-Refresh (TRC = 1)
  37075.  
  37076. Rev. 2.0, 02/99, page 761 of 830
  37077.  
  37078. ----------------------- Page 776-----------------------
  37079.  
  37080. Tpcm1 Tpcm2 Tpcm0 Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  37081. R
  37082. e CKIO
  37083. v. F
  37084. i
  37085. 2 g t t t t
  37086. .
  37087. AD AD AD AD
  37088. 0 u
  37089. , r A25–A0
  37090. 0 e
  37091. 2 2
  37092. / 3
  37093. 9
  37094. t t t t
  37095. .
  37096. CSD CSD CSD CSD
  37097. 9 5
  37098. , 1
  37099. CExx
  37100. (
  37101. p 2 REG (WE7)
  37102. a ) (
  37103. g P 1 t t t t
  37104. e )
  37105. RWD RWD RWD RWD
  37106. 7 O C P RD/WR
  37107. 6 n M C
  37108. 2 e C M
  37109. o I t t t t t
  37110. I
  37111. t
  37112. C
  37113. RSD
  37114. f
  37115. RSD RSD RSD
  37116. A
  37117. RSD RSD
  37118. 8 n I
  37119. t
  37120. RD
  37121. 3 e M A
  37122. 0 r
  37123. n e M t t
  37124. m
  37125. RDS RDH
  37126. a
  37127. tRDS tRDH
  37128. e
  37129. D15–D0
  37130. l o m
  37131. W
  37132. (read)
  37133. r
  37134. y o t t
  37135. a
  37136. WED1
  37137.  
  37138. WED1
  37139. i B r t t
  37140. y
  37141. t WEDF t WEDF
  37142. t
  37143. WEDF WEDF
  37144. u
  37145. + B
  37146. WE1
  37147. s
  37148. O C u t
  37149. s
  37150. tWDD WDD
  37151. n y C t t t t
  37152. c
  37153. WDD WDD WDD
  37154. e
  37155. WDD
  37156. l y
  37157. D15–D0
  37158.  
  37159. E e c (write)
  37160. x ( l
  37161. t T e
  37162. e E (
  37163. t t tBSD
  37164. T
  37165. BSD BSD
  37166. r
  37167. D
  37168. t
  37169. n
  37170. BSD
  37171. a E BS
  37172. l = D
  37173. W 1 = t t
  37174. ,
  37175. RDYS RDYH
  37176.  
  37177. a T 0
  37178. i , RDY
  37179. t E
  37180. ) H T t t
  37181. E
  37182. RDYS RDYH
  37183.  
  37184. t t t t
  37185. H
  37186. DACD
  37187. =
  37188. DACD DACD DACD
  37189.  
  37190. 1
  37191. DACKn
  37192. , = (DA)
  37193.  
  37194. 0
  37195. ,
  37196.  
  37197. N TED TEH
  37198. o
  37199.  
  37200. W (1)
  37201. a
  37202. (2)
  37203. i
  37204. t
  37205. )
  37206. Note: IO: DACK device
  37207. SA: Single address DMA transfer
  37208. DA: Dual address DMA transfer
  37209. DACK set to active-high
  37210.  
  37211. ----------------------- Page 777-----------------------
  37212.  
  37213. Tpci1 Tpci2 Tpci0 Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  37214.  
  37215. F CKIO
  37216. i
  37217. g
  37218. u t t t t
  37219. r
  37220. AD AD AD AD
  37221. e
  37222. A25–A0
  37223. 2
  37224. 3
  37225. .
  37226. 5 tCSD tCSD tCSD tCSD
  37227. ( 2
  37228. 2
  37229. CExx
  37230.  
  37231. ) ( REG (WE7)
  37232. O P 1
  37233. )
  37234. C
  37235. t t t t
  37236. n P
  37237. RWD RWD RWD RWD
  37238. e M C RD/WR
  37239. I C M
  37240. n
  37241. t I
  37242. t t
  37243. C
  37244. ICRSD ICRSD
  37245. e A
  37246. t t t
  37247. r
  37248. ICRSD ICRSD ICRSD
  37249. I
  37250. n I A
  37251. / ICIORD (WE2)
  37252. a O
  37253. l I
  37254.  
  37255. W /
  37256. B O
  37257. tRDS tRDH t t
  37258. u
  37259. D15–D0 RDS RDH
  37260. a s B
  37261. i (read)
  37262. t C u
  37263. + s
  37264. tICWSDF tICWSDF tICWSDF
  37265. y
  37266. C
  37267. t
  37268. O
  37269. t
  37270. c
  37271. ICWSDF ICWSDF
  37272. n l y
  37273. e ICIOWR (WE3)
  37274. c
  37275. e ( l
  37276. T e
  37277. t
  37278. E
  37279. tWDD WDD
  37280.  
  37281. E (
  37282. t t t
  37283. x
  37284. WDD WDD
  37285. T
  37286. WDD
  37287. t D E D15–D0
  37288. e
  37289. r (write)
  37290. R n = D
  37291. e a 1 = t t t
  37292. v l ,
  37293. BSD BSD BSD
  37294.  
  37295. .
  37296. t
  37297. W T 0
  37298. BSD
  37299.  
  37300. 2. E , BS
  37301. 0 a H T
  37302. i
  37303. , t E
  37304. t t
  37305.  
  37306. RDYS RDYH
  37307. 0 ) = H
  37308. 2 RDY
  37309. / 1 =
  37310. 9 , t
  37311. 9
  37312. IO16S tRDYS tRDYH
  37313. 0
  37314. tIO16H
  37315. ,
  37316. ,
  37317. p N IOIS16
  37318. a
  37319. g o t t
  37320.  
  37321. t t IO16S IO16H
  37322. e
  37323. DACD DACD t t
  37324. W
  37325. DACD DACD
  37326. DACKn
  37327. 7
  37328. 6 a (DA)
  37329. 3 i
  37330. t
  37331. )
  37332. o
  37333. f
  37334.  
  37335. 8 (1)
  37336. 3 (2)
  37337. 0
  37338.  
  37339. ----------------------- Page 778-----------------------
  37340.  
  37341. F
  37342. i
  37343. g
  37344. R u
  37345. e r
  37346. e
  37347. v Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w
  37348. . 2
  37349. 2 3
  37350. . .
  37351. 0 5 CKIO
  37352. , 3
  37353. 0 t t
  37354. 2
  37355. AD AD
  37356. / P
  37357. 9 C
  37358. A25–A1
  37359. 9
  37360. , M
  37361. p
  37362. t
  37363. C
  37364. AD
  37365. a
  37366. g I A0
  37367. e A
  37368.  
  37369. 7 I
  37370. /
  37371. t t t
  37372. 6
  37373. CSD CSD CSD
  37374. 4 O CExx
  37375. REG (WE7)
  37376. o B
  37377. f
  37378. u
  37379. 8 s
  37380. tRWD tRWD
  37381. 3
  37382. 0 C RD/WR
  37383. y
  37384. c
  37385. l
  37386. tICRSD t tICRSD
  37387. e
  37388. ICRSD
  37389.  
  37390. ( ICIORD (WE2)
  37391. T
  37392. E tRDS tRDH
  37393. D D15–D0
  37394. (read)
  37395. =
  37396. t t t
  37397. 1
  37398. ICWSDF ICWSDF tICWSDF ICWSDF
  37399. , t
  37400.  
  37401. ICWSDF
  37402. T
  37403. E
  37404. ICIOWR (WE3)
  37405. H tWDD tWDD tWDD
  37406.  
  37407. =
  37408. tWDD tWDD
  37409.  
  37410. 1
  37411. D15–D0
  37412. ,
  37413. (write)
  37414. O
  37415. n t tBSD
  37416. e
  37417. BSD
  37418.  
  37419. I
  37420. n BS
  37421. t
  37422. e
  37423. tRDYS tRDYH tRDYS tRDYH
  37424. r
  37425. n
  37426. a
  37427. l RDY
  37428.  
  37429. W
  37430. a
  37431. i IOIS16
  37432. t
  37433. ,
  37434.  
  37435. B tIO16S tIO16H
  37436. u
  37437. s
  37438.  
  37439. S
  37440. i
  37441. z
  37442. i
  37443. n
  37444. g
  37445. )
  37446.  
  37447. ----------------------- Page 779-----------------------
  37448.  
  37449. Tm1 Tmd1w Tmd1 Tm0 Tmd1w Tmd1w Tmd1
  37450. (
  37451. 2
  37452. )
  37453. CKIO
  37454.  
  37455. M F
  37456. i
  37457. t t t t
  37458. P
  37459. FMD FMD FMD FMD
  37460. g
  37461. X u RD/FRAME
  37462. r t t
  37463. B e
  37464. RDS RDS
  37465. t t t t t t
  37466. a 2
  37467. WDD WDD RDH WDD WDD RDH
  37468. s 3
  37469. i
  37470. A D0 A D0
  37471. . D63–D0
  37472. c 5
  37473. B 4
  37474. u
  37475. (
  37476. t t t t
  37477. s
  37478. CSD CSD CSD CSD
  37479. 1
  37480. C ) CSn
  37481. y M
  37482. c
  37483. l P
  37484. t t t t
  37485. e
  37486. RWD RWD RWD RWD
  37487. : X
  37488. R B
  37489. e
  37490. RD/WR
  37491. a a
  37492. s
  37493. d i
  37494. c
  37495. tWED1 tWED1 tWED1 tWED1
  37496. (
  37497. 1 B
  37498. WEn
  37499. s u
  37500. t
  37501. s t t
  37502. D
  37503. t t RDYS RDYH
  37504. C
  37505. RDYS RDYH
  37506. a
  37507. t y
  37508. a c
  37509. : l
  37510. RDY t t
  37511. e
  37512. t RDYS RDYH
  37513. O :
  37514. BSD t tBSD
  37515.  
  37516. t BSD
  37517. n R
  37518. BSD
  37519. e e
  37520. I a BS
  37521. n d
  37522. t
  37523. e ( t t
  37524. 1
  37525. DACD DACD t t
  37526. r
  37527. DACD DACD
  37528. R n s
  37529. t
  37530. e a D DACKn
  37531. v l (DA)
  37532. . W a
  37533. 2 t
  37534. . a a
  37535. 0 i :
  37536. ,0 t O
  37537. +
  37538. (1) (2)
  37539. 2 n
  37540. / O e
  37541. 9 1st data bus cycle information 1st data bus cycle information
  37542. 9 n I
  37543. , e n D63–D61: Access size
  37544. D63–D61: Access size
  37545. t
  37546. p E e 000: Byte 000: Byte
  37547. a r
  37548. g x n 001: Word (2 bytes) 001: Word (2 bytes)
  37549. e t a
  37550. e 010: Long (4 bytes) 010: Long (4 bytes)
  37551. 7 r l
  37552. n W
  37553. 011: Quad (8 bytes) 011: Quad (8 bytes)
  37554. 6
  37555. 5 a 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37556. l a
  37557. o W i D25–D0: Address D25–D0: Address
  37558. f t
  37559. )
  37560. 8 a
  37561. 3 i Note: IO: DACK device
  37562. 0 t
  37563. ) SA: Single address DMA transfer
  37564.  
  37565. DA: Dual address DMA transfer
  37566. DACK set to active-high
  37567.  
  37568. ----------------------- Page 780-----------------------
  37569.  
  37570. (
  37571. R 3
  37572. e )
  37573. v. M Tm1 Tmd1 Tm1 Tmd1w Tmd1 Tm1 Tmd1w Tmd1w Tmd1
  37574. 2. P
  37575. 0 X
  37576. ,
  37577. CKIO
  37578. 0 B F
  37579. i
  37580. 2 a ( g
  37581. t t tFMD tFMD t t
  37582. 2
  37583. FMD FMD FMD FMD
  37584. / s u
  37585. 9 i )
  37586. 9 c r
  37587. RD/FRAME
  37588. , B M e
  37589. p u P 2 t t t t t t t t t
  37590. a 3
  37591. WDD WDD WDD WDD WDD WDD WDD WDD WDD
  37592. g s X . D63–D0
  37593. 5
  37594. A D0 A D0 A D0
  37595. e C B 5
  37596. 7 y a
  37597. 6 c
  37598. t t t t t t
  37599. s (
  37600. CSD CSD CSD CSD CSD CSD
  37601. 6 l i 1
  37602. e c )
  37603. o :
  37604. CSn
  37605. f W B M
  37606. u
  37607. t t t
  37608. 8
  37609. RWD RWD RWD
  37610. 3 r s P tRWD tRWD tRWD
  37611. 0 i C X
  37612. t
  37613. e
  37614. y B
  37615. RD/WR
  37616.  
  37617. ( c
  37618. 1 l a t t t t t t
  37619. s e s
  37620. WED1 WED1 WED1 WED1 WED1 WED1
  37621. t : i
  37622. c
  37623. WEn
  37624. D W B
  37625. a
  37626. t t
  37627. r u
  37628. RDYS RDYH
  37629. t
  37630. tRDYS tRDYH tRDYS tRDYH
  37631. a i s
  37632. t
  37633. : e C
  37634. O
  37635. RDY
  37636. (
  37637. t t
  37638. y
  37639. RDYS RDYH
  37640. 1
  37641. t t tBSD
  37642. n
  37643. BSD
  37644. c
  37645. BSD
  37646. s t t
  37647. l
  37648. t
  37649. e t
  37650. BSD BSD BSD
  37651. e
  37652. I D :
  37653. n
  37654. BS
  37655. t a W
  37656. e t
  37657. a r
  37658. t t t t t
  37659. r
  37660. DACD DACD tDACD DACD DACD DACD
  37661. : i
  37662. n t
  37663. a O e DACKn
  37664. l n ( (DA)
  37665. W e 1
  37666. s
  37667. a I t
  37668. i n D
  37669. t t
  37670. e a
  37671. + r t (1) (2) (3)
  37672. O n a
  37673. a :
  37674. n l N 1st data bus cycle information 1st data bus cycle information 1st data bus cycle information
  37675. e W o D63–D61: Access size D63–D61: Access size D63–D61: Access size
  37676. E a W
  37677. x
  37678. 000: Byte 000: Byte 000: Byte
  37679. i
  37680. t t a
  37681. e )
  37682. 001: Word (2 bytes) 001: Word (2 bytes) 001: Word (2 bytes)
  37683. i
  37684. r t 010: Long (4 bytes) 010: Long (4 bytes) 010: Long (4 bytes)
  37685. n )
  37686. a 011: Quad (8 bytes) 011: Quad (8 bytes) 011: Quad (8 bytes)
  37687.  
  37688. l
  37689. 1xx: Burst (32 bytes) 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37690. W D25–D0: Address D25–D0: Address D25–D0: Address
  37691. a
  37692. i
  37693. t
  37694. )
  37695.  
  37696. ----------------------- Page 781-----------------------
  37697.  
  37698. F
  37699. i
  37700. g
  37701. u Tm1 Tmd1w Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  37702. r
  37703. e
  37704.  
  37705. 2
  37706. CKIO
  37707. (
  37708. 2 3
  37709. ) .
  37710. t t t t
  37711. 5
  37712. FMD FMD FMD FMD
  37713.  
  37714. M 6 RD/FRAME
  37715. P (
  37716. X 1
  37717. tWDD tWDD tRDS tRDH tWDD tWDD tRDS tRDH
  37718. ) D63–D0
  37719. 2 B
  37720. A D0 D1 D2 D3 A D0 D1 D2 D3
  37721. n u M
  37722. d s 2 P tCSD tCSD tCSD tCSD
  37723. / C n X
  37724. 3
  37725. r y d B CSn
  37726. d c /
  37727. 3
  37728. t
  37729. / l u
  37730. RWD
  37731. 4 e r s t t t
  37732. d
  37733. RWD RWD RWD
  37734. t :
  37735. h B / C
  37736. 4 RD/WR
  37737. D u t y
  37738. a r h c t t t t
  37739. l
  37740. WED1 WED1 WED1 WED1
  37741. t s D e
  37742. a t
  37743. WEn
  37744. :
  37745. : R a B tRDYH t
  37746. t
  37747. RDYS
  37748. E e a u tRDYS tRDYH tRDYS tRDYH
  37749. x a : r
  37750. t d N s
  37751. e t
  37752. RDY
  37753.  
  37754. r ( o
  37755. t t
  37756. 1 R
  37757. BSD BSD
  37758. n s I tBSD tBSD
  37759. a t n e
  37760. l t a
  37761. D
  37762. BS
  37763. W e d
  37764. a r (
  37765. n
  37766. t t t
  37767. a t
  37768. t
  37769. 1
  37770. DACD DACD DACD DACD
  37771. i a a s
  37772. R t : l t DACKn
  37773. e C N W D (DA)
  37774. v
  37775. . o o a a
  37776. 2 n I i t
  37777. . t n t a
  37778. 0 r t ) :
  37779. , o e O
  37780. l
  37781. 0
  37782. (1) (2)
  37783. ) r
  37784. 2 n n
  37785. / a e 1st data bus cycle information 1st data bus cycle information
  37786. 9 l
  37787. 9 I D63–D61: Access size D63–D61: Access size
  37788. , W n
  37789. t 000: Byte 000: Byte
  37790. p a e
  37791. a i r 001: Word (2 bytes) 001: Word (2 bytes)
  37792. g t n
  37793. ;
  37794. 010: Long (4 bytes) 010: Long (4 bytes)
  37795. e a
  37796. l 011: Quad (8 bytes) 011: Quad (8 bytes)
  37797. 7
  37798. 6 W 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37799. 7
  37800. a
  37801. D25–D0: Address D25–D0: Address
  37802.  
  37803. o i
  37804. f t
  37805. ;
  37806. 8
  37807. 3
  37808. 0
  37809.  
  37810. ----------------------- Page 782-----------------------
  37811.  
  37812. R
  37813. e
  37814. v. F
  37815. i
  37816. 2 g
  37817. Tm1 Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  37818. 0. u
  37819. , r
  37820. e
  37821. CKIO
  37822. 0
  37823. 2 2 ( 2
  37824. / 2 3
  37825. t t t t
  37826. 9 n
  37827. FMD FMD FMD FMD
  37828. ) .
  37829. 9 d M 5 RD/FRAME
  37830. , / 7
  37831. p 3 P
  37832. a r
  37833. t t
  37834. X
  37835. t t
  37836. (
  37837. WDD
  37838. d
  37839. WDD WDD WDD
  37840. g / 1 D63–D0
  37841. e 4 B )
  37842. A D0 D1 D2 D3 A D0 D1 D2 D3
  37843.  
  37844. 7 t u M
  37845. h
  37846. 6 s
  37847. P
  37848. t t t t
  37849. 8 D
  37850. CSD CSD CSD CSD
  37851. C 2 X
  37852. o a y n CSn
  37853. f t d
  37854. 8 a c / B t
  37855. l
  37856. t
  37857. 3
  37858. RWD
  37859. : u
  37860. RWD
  37861. 3 e r t t
  37862. 0 N : s
  37863. RWD RWD
  37864. d
  37865. o B / C
  37866. u 4
  37867. RD/WR
  37868. I t y
  37869. n r h c
  37870. s l
  37871. t t t t
  37872. t
  37873. WED1 WED1 WED1 WED1
  37874. e t D e
  37875. :
  37876. WEn
  37877. r W a B
  37878. n t tRDYH t
  37879. a r
  37880. RDYS
  37881. l i a u t t t t
  37882. :
  37883. RDYS RDYH RDYS RDYH
  37884. t r
  37885. W e N s
  37886. t
  37887. (
  37888. RDY
  37889. a 1 o W t t
  37890. i s I
  37891. BSD BSD
  37892. t t t
  37893. t n r
  37894. BSD BSD
  37895. + D t i
  37896. e t
  37897. e
  37898. BS
  37899. E a r
  37900. x t n (
  37901. t a a 1 t t t t
  37902. :
  37903. DACD DACD DACD
  37904. e s
  37905. DACD
  37906. l
  37907. r O W t
  37908. n D
  37909. DACKn
  37910. a n a a (DA)
  37911. l e
  37912. i t
  37913. W I t a
  37914. n ) :
  37915. a t O
  37916. i e
  37917. t r n (1) (2)
  37918. C n e
  37919. a
  37920. o l I 1st data bus cycle information 1st data bus cycle information
  37921. n W n D63–D61: Access size D63–D61: Access size
  37922. t t
  37923. r e
  37924. a
  37925. 000: Byte 000: Byte
  37926. o r
  37927. l i n
  37928. ) t 001: Word (2 bytes) 001: Word (2 bytes)
  37929. ; a
  37930. l 010: Long (4 bytes) 010: Long (4 bytes)
  37931.  
  37932. W 011: Quad (8 bytes) 011: Quad (8 bytes)
  37933. a
  37934. 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37935. i
  37936. t
  37937. D25–D0: Address D25–D0: Address
  37938. ;
  37939.  
  37940. ----------------------- Page 783-----------------------
  37941.  
  37942. T1 T2 T1 Tw T2 T1 Tw Twe T2
  37943.  
  37944. CKIO
  37945.  
  37946. tAD tAD tAD tAD tAD tAD
  37947.  
  37948. A25–A0
  37949.  
  37950. (
  37951. 3
  37952. tCSD tCSD tCSD tCSD tCSD tCSD
  37953. )
  37954. CSn
  37955. B F
  37956. a i
  37957. s g
  37958. i u
  37959. t t t t t t
  37960. c
  37961. RWD RWD RWD RWD RWD RWD
  37962. r
  37963. R e
  37964. RD/WR
  37965.  
  37966. e ( 2
  37967. a 2 3
  37968. )
  37969. t t t t t t t t t
  37970. d .
  37971. RSD RSD RSD RSD RSD RSD RSD RSD RSD
  37972.  
  37973. B 5
  37974. C 8
  37975. RD
  37976. a (
  37977. y s 1
  37978. c i ) M
  37979. t t t t t t
  37980. c
  37981. RDS RDH RDS RDH RDS RDH
  37982. l B D63–D0
  37983. e R a e (read)
  37984. ( m
  37985. t
  37986. e
  37987. WED1 t t
  37988. O s
  37989. WED1 WED1
  37990. a i o
  37991. c
  37992. t t t t t t
  37993. n d
  37994. WEDF WED1 WEDF WED1 WEDF WED1
  37995. r
  37996. e C R y WEn
  37997. I y e B
  37998. n a
  37999. t c d y
  38000. tBSD tBSD t
  38001. e l
  38002. BSD
  38003. e t
  38004. r C e
  38005. tBSD t t
  38006.  
  38007. BSD BSD
  38008. n ( y C
  38009. a O c o BS
  38010. l
  38011. n l n
  38012. W e e t tRDYS t t
  38013. (
  38014. RDYS RDYH
  38015. I r
  38016. t
  38017. a N
  38018. RDYH
  38019. i n o
  38020. t t o l
  38021.  
  38022. RDY
  38023. + e W S
  38024. r
  38025. t t
  38026. R R
  38027. RDYS RDYH
  38028. n
  38029. t t t t t
  38030. O
  38031. DACD DACD DACD DACD DACD
  38032. e a a A t t t t
  38033. v n i
  38034. DACD DACD DACD DACD
  38035. . e l t M
  38036. W )
  38037. DACKn
  38038.  
  38039. 2
  38040. E
  38041. (SA: IO ← memory)
  38042. 0. x a B
  38043. , t i u
  38044. t
  38045. 0 e ) s t t t t tDACD tDACD
  38046. r
  38047. DACD
  38048. 2
  38049. DACD DACD DACD
  38050. / n C
  38051. 9 a y DACKn
  38052. 9 l c (DA)
  38053. , l
  38054. p W e
  38055. s
  38056. a a
  38057. g i
  38058. e t
  38059. )
  38060. 7
  38061. 6
  38062. 9 (1) (2) (3)
  38063.  
  38064. o
  38065. f
  38066.  
  38067. 8 Note: IO: DACK device
  38068. 3
  38069. 0
  38070. SA: Single address DMA transfer
  38071. DA: Dual address DMA transfer
  38072. DACK set to active-high
  38073.  
  38074. ----------------------- Page 784-----------------------
  38075.  
  38076. TS1 T1 T2 TH1
  38077.  
  38078. CKIO
  38079.  
  38080. tAD tAD
  38081.  
  38082. A25–A0
  38083.  
  38084. tCSD tCSD
  38085.  
  38086. CSn
  38087.  
  38088. tRWD tRWD
  38089.  
  38090. RD/WR
  38091.  
  38092. tRSD tRSD tRSD
  38093.  
  38094. RD
  38095.  
  38096. D63–D0 tRDS tRDH
  38097.  
  38098. (read)
  38099. tWED1
  38100. tWEDF tWED1
  38101.  
  38102. WEn
  38103.  
  38104. tBSD
  38105. tBSD
  38106.  
  38107. BS
  38108.  
  38109. RDY
  38110.  
  38111. tDACD tDACD
  38112. DACKn
  38113. (SA: IO ← memory)
  38114.  
  38115. tDACD tDACD
  38116.  
  38117. DACKn
  38118. (DA)
  38119.  
  38120. Figure 23.59 Memory Byte Control SRAM Bus Cycle: Basic Read Cycle (No Wait,
  38121. Address Setup/Hold Time Insertion, AnS = 1, AnH = 1)
  38122.  
  38123. Rev. 2.0, 02/99, page 770 of 830
  38124.  
  38125. ----------------------- Page 785-----------------------
  38126.  
  38127. 23.3.4 Peripheral Module Signal Timing
  38128.  
  38129. Table 23.8 Peripheral Module Signal Timing
  38130.  
  38131. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  38132. DDQ DD a L
  38133.  
  38134. 66 MHz 83 MHz 100 MHz
  38135.  
  38136. Module Item Symbol Min Max Min Max Min Max Unit Figure
  38137.  
  38138. TMU, Timer clock pulse tTCLKWH 4 — 4 — 4 — Pcyc* 23.60
  38139. RTC width (high)
  38140.  
  38141. Timer clock pulse tTCLKWL 4 — 4 — 4 — Pcyc* 23.60
  38142. width (low)
  38143.  
  38144. Timer clock rise tTCLKr — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38145. time
  38146.  
  38147. Timer clock fall tTCLKf — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38148. time
  38149.  
  38150. Oscillation settling tROSC — 3 — 3 — 3 s 23.61
  38151. time
  38152.  
  38153. SCI Input clock cycle tScyc 4 — 4 — 4 — Pcyc* 23.62
  38154. (asynchronous)
  38155.  
  38156. Input clock cycle tScyc 6 — 6 — 6 — Pcyc* 23.62
  38157. (synchronous)
  38158.  
  38159. Input clock pulse tSCKW 0.4 0.6 0.4 0.6 0.4 0.6 tScyc 23.62
  38160. width
  38161.  
  38162. Input clock rise tSCKr — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38163. time
  38164.  
  38165. Input clock fall tSCKf — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38166. time
  38167.  
  38168. Transfer data t — 30 — 30 — 30 ns 23.63
  38169. TXD
  38170.  
  38171. delay time
  38172.  
  38173. Receive data tRXS 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38174. setup time
  38175. (synchronous)
  38176.  
  38177. Receive data tRXH 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38178. hold time
  38179. (synchronous)
  38180.  
  38181. Rev. 2.0, 02/99, page 771 of 830
  38182.  
  38183. ----------------------- Page 786-----------------------
  38184.  
  38185. Table 23.8 Peripheral Module Signal Timing (cont)
  38186.  
  38187. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  38188. DDQ DD a L
  38189.  
  38190. 66 MHz 83 MHz 100 MHz
  38191.  
  38192. Module Item Symbol Min Max Min Max Min Max Unit Figure Note
  38193.  
  38194. I/O ports Output data delay tPORTD — 10 — 8 — 6 ns 23.64
  38195. time
  38196.  
  38197. Input data setup tPORTS 2 — 2 — 2 — ns 23.64 BGABGA
  38198. time
  38199.  
  38200. 3.5 — 3.5 — — — ns QFPQFP
  38201.  
  38202. Input data hold tPORTH 1.5 — 1.5 — 1.5 — ns 23.64
  38203. time
  38204.  
  38205. DMAC '5(4Q setup time tDRQS 2 — 2 — 2 — ns 23.65 BGABGA
  38206.  
  38207. 3.5 — 3.5 — — — ns QFPQFP
  38208.  
  38209. '5(4Q hold time t 1.5 — 1.5 — 1.5 — ns 23.65
  38210. DRQH
  38211.  
  38212. DRAKn delay time tDRAKD — 10 — 8 — 6 ns 23.65
  38213.  
  38214. Hitachi- Input clock cycle tTCKcyc 50 — 50 — 50 — ns 23.66
  38215. UDI
  38216.  
  38217. Input clock pulse tTCKH 15 — 15 — 15 — ns 23.66
  38218. width (high)
  38219.  
  38220. Input clock pulse tTCKL 15 — 15 — 15 — ns 23.66
  38221. width (low)
  38222.  
  38223. Input clock rise tTCKr — 10 — 10 — 10 ns 23.66
  38224. time
  38225.  
  38226. Input clock fall tTCKf — 10 — 10 — 10 ns 23.66
  38227. time
  38228.  
  38229. Hitachi- $6(%5. setup t 10 — 10 — 10 — t 23.67
  38230. ASEBRKS cyc
  38231.  
  38232. UDI time
  38233.  
  38234. $6(%5. hold time t 10 — 10 — 10 — t 23.67
  38235. ASEBRKH cyc
  38236.  
  38237. TDI/TMS setup tTDIS 15 — 15 — 15 — ns 23.68
  38238. time
  38239.  
  38240. TDI/TMS hold time t 15 — 15 — 15 — ns 23.68
  38241. TDIH
  38242.  
  38243. TDO delay time tTDO 0 10 0 10 0 10 ns 23.68
  38244.  
  38245. ASE-PINBRK tPINBRK 2 — 2 — 2 — Pcy 23.69
  38246. pulse width c*
  38247.  
  38248. Note: * Pcyc: P clock cycles
  38249.  
  38250. Rev. 2.0, 02/99, page 772 of 830
  38251.  
  38252. ----------------------- Page 787-----------------------
  38253.  
  38254. TCLK
  38255.  
  38256. tTCLKWH tTCLKWL
  38257. tTCLKf tTCLKr
  38258.  
  38259. Figure 23.60 TCLK Input Timing
  38260.  
  38261. Stable oscillation
  38262.  
  38263. RTC internal clock
  38264.  
  38265. V
  38266. cc
  38267. V min
  38268. cc tROSC
  38269.  
  38270. Figure 23.61 RTC Oscillation Settling Time at Power-On
  38271.  
  38272. tSCKW
  38273.  
  38274. SCK, SCK2
  38275.  
  38276. t
  38277. Scyc
  38278. tSCKf tSCKr
  38279.  
  38280. Figure 23.62 SCK Input Clock Timing
  38281.  
  38282. t
  38283. Scyc
  38284.  
  38285. SCK
  38286.  
  38287. tTXD tTXD
  38288.  
  38289. TXD
  38290.  
  38291. RXD
  38292.  
  38293. tRXS tRXH
  38294.  
  38295. Figure 23.63 SCI I/O Synchronous Mode Clock Timing
  38296. Rev. 2.0, 02/99, page 773 of 830
  38297.  
  38298. ----------------------- Page 788-----------------------
  38299.  
  38300. CKIO
  38301.  
  38302. Ports 19–0
  38303. (read)
  38304.  
  38305. tPORTS tPORTH
  38306.  
  38307. tPORTD tPORTD
  38308. Ports 19–0
  38309. (write)
  38310.  
  38311. Figure 23.64 I/O Port Input/Output Timing
  38312.  
  38313. CKIO
  38314.  
  38315. tDRQH tDRQH
  38316.  
  38317. DREQn
  38318.  
  38319. tDRQS tDRQS
  38320.  
  38321. tDRAKD
  38322. DRAKn
  38323.  
  38324. Figure 23.65 '5(4/DRAK Timing
  38325. '5(4
  38326.  
  38327. tTCKcyc
  38328.  
  38329. tTCKH tTCKL
  38330.  
  38331. VIH VIH VIH
  38332. 1/2VDDQ 1/2VDDQ
  38333.  
  38334. VIL VIL
  38335.  
  38336. tTCKf tTCKr
  38337.  
  38338. Note: When clock is input from TCK pin
  38339.  
  38340. Figure 23.66 TCK Input Timing
  38341.  
  38342. Rev. 2.0, 02/99, page 774 of 830
  38343.  
  38344. ----------------------- Page 789-----------------------
  38345.  
  38346. RESET
  38347.  
  38348. SCK2/
  38349. MRESET
  38350.  
  38351. tASEBRKS tASEBRKH tASEBRKS tASEBRKH
  38352.  
  38353. ASEBRK/
  38354. BRKACK
  38355.  
  38356. Figure 23.67 Reset Hold Timing
  38357.  
  38358. t
  38359. TCK TCKcyc
  38360.  
  38361. TDI tTDIS tTDIH
  38362. TMS
  38363.  
  38364. tTDO
  38365. TDO
  38366.  
  38367. Figure 23.68 Hitachi-UDI Data Transfer Timing
  38368.  
  38369. tPINBRK
  38370.  
  38371.  
  38372. ASEBRK
  38373.  
  38374. Figure 23.69 Pin Break Timing
  38375.  
  38376. Rev. 2.0, 02/99, page 775 of 830
  38377.  
  38378. ----------------------- Page 790-----------------------
  38379.  
  38380. 23.3.5 AC Characteristic Test Conditions
  38381.  
  38382. The AC characteristic test conditions are as follows:
  38383.  
  38384. • Input/output signal reference level: 1.5 V (VDDQ = 3.3 ±0.3 V)
  38385. • Input pulse level: VSSQ–3.0 V (VSSQ–VDDQ for 5(6(7, 7567, NMI, and $6(%5./BRKACK)
  38386. • Input rise/fall time: 1 ns
  38387.  
  38388. The output load circuit is shown in figure 23.70.
  38389.  
  38390. IOL
  38391.  
  38392. LSI output pin DUT output
  38393.  
  38394. CL VREF
  38395.  
  38396. IOH
  38397.  
  38398. Notes: 1. C is the total value, including the capacitance of the test jig, etc.
  38399. L
  38400. The capacitance of each pin is set to 30 pF.
  38401. 2. IOL and IOH values are as shown in table 23.3, Permissible Output Currents.
  38402.  
  38403. Figure 23.70 Output Load Circuit
  38404.  
  38405. Rev. 2.0, 02/99, page 776 of 830
  38406.  
  38407. ----------------------- Page 791-----------------------
  38408.  
  38409. 23.3.6 Delay Time Variation Due to Load Capacitance
  38410.  
  38411. A graph (reference data) of the variation in delay time when a load capacitance greater than that
  38412. stipulated (30 pF) is connected to the SH7750’s pins is shown below. The graph shown in figure
  38413. 23.71 should be taken into consideration if the stipulated capacitance is exceeded when
  38414. connecting an external device.
  38415.  
  38416. The graph will not be linear if the connected load capacitance exceeds the range shown in figure
  38417. 23.71.
  38418.  
  38419. +4.0 ns
  38420.  
  38421. +3.0 ns
  38422.  
  38423. e
  38424. m
  38425. i
  38426. T
  38427. +2.0 ns
  38428. y
  38429. a
  38430. l
  38431. e
  38432. D
  38433.  
  38434. +1.0 ns
  38435.  
  38436. +0.0 ns
  38437. +0 pF +25 pF +50 pF
  38438.  
  38439. Load Capacitance
  38440.  
  38441. Figure 23.71 Load Capacitance vs. Delay Time
  38442.  
  38443. Rev. 2.0, 02/99, page 777 of 830
  38444.  
  38445. ----------------------- Page 792-----------------------
  38446.  
  38447. Rev. 2.0, 02/99, page 778 of 830
  38448.  
  38449. ----------------------- Page 793-----------------------
  38450.  
  38451. Appendix A Address List
  38452.  
  38453. Table A.1 Address List
  38454.  
  38455. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38456. Address*1 Reset Reset nization
  38457.  
  38458. Clock
  38459.  
  38460. CCN PTEH H'FF00 0000 H'1F00 0000 32 Undefined Undefined Held Held Iclk
  38461.  
  38462. CCN PTEL H'FF00 0004 H'1F00 0004 32 Undefined Undefined Held Held Iclk
  38463.  
  38464. CCN TTB H'FF00 0008 H'1F00 0008 32 Undefined Undefined Held Held Iclk
  38465.  
  38466. CCN TEA H'FF00 000C H'1F00 000C 32 Undefined Held Held Held Iclk
  38467.  
  38468. CCN MMUCR H'FF00 0010 H'1F00 0010 32 H'0000 0000 H'0000 0000 Held Held Iclk
  38469.  
  38470. CCN BASRA H'FF00 0014 H'1F00 0014 8 Undefined Held Held Held Iclk
  38471.  
  38472. CCN BASRB H'FF00 0018 H'1F00 0018 8 Undefined Held Held Held Iclk
  38473.  
  38474. CCN CCR H'FF00 001C H'1F00 001C 32 H'0000 0000 H'0000 0000 Held Held Iclk
  38475.  
  38476. CCN TRA H'FF00 0020 H'1F00 0020 32 Undefined Undefined Held Held Iclk
  38477.  
  38478. CCN EXPEVT H'FF00 0024 H'1F00 0024 32 H'0000 0000 H'0000 0020 Held Held Iclk
  38479.  
  38480. CCN INTEVT H'FF00 0028 H'1F00 0028 32 Undefined Undefined Held Held Iclk
  38481.  
  38482. CCN PTEA H'FF00 0034 H'1F00 0034 32 Undefined Undefined Held Held Iclk
  38483.  
  38484. CCN QACR0 H'FF00 0038 H'1F00 0038 32 Undefined Undefined Held Held Iclk
  38485.  
  38486. CCN QACR1 H'FF00 003C H'1F00 003C 32 Undefined Undefined Held Held Iclk
  38487.  
  38488. UBC BARA H'FF20 0000 H'1F20 0000 32 Undefined Held Held Held Iclk
  38489.  
  38490. UBC BAMRA H'FF20 0004 H'1F20 0004 8 Undefined Held Held Held Iclk
  38491.  
  38492. UBC BBRA H'FF20 0008 H'1F20 0008 16 H'0000 Held Held Held Iclk
  38493.  
  38494. UBC BARB H'FF20 000C H'1F20 000C 32 Undefined Held Held Held Iclk
  38495.  
  38496. UBC BAMRB H'FF20 0010 H'1F20 0010 8 Undefined Held Held Held Iclk
  38497.  
  38498. UBC BBRB H'FF20 0014 H'1F20 0014 16 H'0000 Held Held Held Iclk
  38499.  
  38500. UBC BDRB H'FF20 0018 H'1F20 0018 32 Undefined Held Held Held Iclk
  38501.  
  38502. UBC BDMRB H'FF20 001C H'1F20 001C 32 Undefined Held Held Held Iclk
  38503.  
  38504. 2
  38505. UBC BRCR H'FF20 0020 H'1F20 0020 16 H'0000* Held Held Held Iclk
  38506.  
  38507. BSC BCR1 H'FF80 0000 H'1F80 0000 32 H'0000 0000*2 Held Held Held Bclk
  38508.  
  38509. 2
  38510. BSC BCR2 H'FF80 0004 H'1F80 0004 16 H'3FFC* Held Held Held Bclk
  38511.  
  38512. BSC WCR1 H'FF80 0008 H'1F80 0008 32 H'7777 7777 Held Held Held Bclk
  38513.  
  38514. BSC WCR2 H'FF80 000C H'1F80 000C 32 H'FFFE EFFF Held Held Held Bclk
  38515.  
  38516. BSC WCR3 H'FF80 0010 H'1F80 0010 32 H'0777 7777 Held Held Held Bclk
  38517.  
  38518. Rev. 2.0, 02/99, page 779 of 830
  38519.  
  38520. ----------------------- Page 794-----------------------
  38521.  
  38522. Table A.1 Address List (cont)
  38523.  
  38524. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38525. Address*1 Reset Reset nization
  38526.  
  38527. Clock
  38528.  
  38529. BSC MCR H'FF80 0014 H'1F80 0014 32 H'0000 0000 Held Held Held Bclk
  38530.  
  38531. BSC PCR H'FF80 0018 H'1F80 0018 16 H'0000 Held Held Held Bclk
  38532.  
  38533. BSC RTCSR H'FF80 001C H'1F80 001C 16 H'0000 Held Held Held Bclk
  38534.  
  38535. BSC RTCNT H'FF80 0020 H'1F80 0020 16 H'0000 Held Held Held Bclk
  38536.  
  38537. BSC RTCOR H'FF80 0024 H'1F80 0024 16 H'0000 Held Held Held Bclk
  38538.  
  38539. BSC RFCR H'FF80 0028 H'1F80 0028 16 H'0000 Held Held Held Bclk
  38540.  
  38541. BSC PCTRA H'FF80 002C H'1F80 002C 32 H'0000 0000 Held Held Held Bclk
  38542.  
  38543. BSC PDTRA H'FF80 0030 H'1F80 0030 16 Undefined Held Held Held Bclk
  38544.  
  38545. BSC PCTRB H'FF80 0040 H'1F80 0040 32 H'0000 0000 Held Held Held Bclk
  38546.  
  38547. BSC PDTRB H'FF80 0044 H'1F80 0044 16 Undefined Held Held Held Bclk
  38548.  
  38549. BSC GPIOIC H'FF80 0048 H'1F80 0048 16 H'0000 0000 Held Held Held Bclk
  38550.  
  38551. BSC SDMR2 H'FF90 xxxx H'1F90 xxxx 8 Write-only Bclk
  38552.  
  38553. BSC SDMR3 H'FF94 xxxx H'1F94 xxxx 8 Bclk
  38554.  
  38555. DMAC SAR0 H'FFA0 0000 H'1FA0 0000 32 Undefined Undefined Held Held Bclk
  38556.  
  38557. DMAC DAR0 H'FFA0 0004 H'1FA0 0004 32 Undefined Undefined Held Held Bclk
  38558.  
  38559. DMAC DMATCR0 H'FFA0 0008 H'1FA0 0008 32 Undefined Undefined Held Held Bclk
  38560.  
  38561. DMAC CHCR0 H'FFA0 000C H'1FA0 000C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38562.  
  38563. DMAC SAR1 H'FFA0 0010 H'1FA0 0010 32 Undefined Undefined Held Held Bclk
  38564.  
  38565. DMAC DAR1 H'FFA0 0014 H'1FA0 0014 32 Undefined Undefined Held Held Bclk
  38566.  
  38567. DMAC DMATCR1 H'FFA0 0018 H'1FA0 0018 32 Undefined Undefined Held Held Bclk
  38568.  
  38569. DMAC CHCR1 H'FFA0 001C H'1FA0 001C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38570.  
  38571. DMAC SAR2 H'FFA0 0020 H'1FA0 0020 32 Undefined Undefined Held Held Bclk
  38572.  
  38573. DMAC DAR2 H'FFA0 0024 H'1FA0 0024 32 Undefined Undefined Held Held Bclk
  38574.  
  38575. DMAC DMATCR2 H'FFA0 0028 H'1FA0 0028 32 Undefined Undefined Held Held Bclk
  38576.  
  38577. DMAC CHCR2 H'FFA0 002C H'1FA0 002C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38578.  
  38579. DMAC SAR3 H'FFA0 0030 H'1FA0 0030 32 Undefined Undefined Held Held Bclk
  38580.  
  38581. DMAC DAR3 H'FFA0 0034 H'1FA0 0034 32 Undefined Undefined Held Held Bclk
  38582.  
  38583. DMAC DMATCR3 H'FFA0 0038 H'1FA0 0038 32 Undefined Undefined Held Held Bclk
  38584.  
  38585. DMAC CHCR3 H'FFA0 003C H'1FA0 003C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38586.  
  38587. DMAC DMAOR H'FFA0 0040 H'1FA0 0040 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38588.  
  38589. Rev. 2.0, 02/99, page 780 of 830
  38590.  
  38591. ----------------------- Page 795-----------------------
  38592.  
  38593. Table A.1 Address List (cont)
  38594.  
  38595. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38596. Address*1 Reset Reset nization
  38597.  
  38598. Clock
  38599. CPG FRQCR H'FFC0 0000 H'1FC0 0000 16 *2 Held Held Held Pclk
  38600.  
  38601. CPG STBCR H'FFC0 0004 H'1FC0 0004 8 H'00 Held Held Held Pclk
  38602.  
  38603. 3
  38604. CPG WTCNT H'FFC0 0008 H'1FC0 0008 8/16* H'00 Held Held Held Pclk
  38605.  
  38606. 3
  38607. CPG WTCSR H'FFC0 000C H'1FC0 000C 8/16* H'00 Held Held Held Pclk
  38608.  
  38609. CPG STBCR2 H'FFC0 0010 H'1FC0 0010 8 H'00 Held Held Held Pclk
  38610.  
  38611. RTC R64CNT H'FFC8 0000 H'1FC8 0000 8 Held Held Held Held Pclk
  38612.  
  38613. RTC RSECCNT H'FFC8 0004 H'1FC8 0004 8 Held Held Held Held Pclk
  38614.  
  38615. RTC RMINCNT H'FFC8 0008 H'1FC8 0008 8 Held Held Held Held Pclk
  38616.  
  38617. RTC RHRCNT H'FFC8 000C H'1FC8 000C 8 Held Held Held Held Pclk
  38618.  
  38619. RTC RWKCNT H'FFC8 0010 H'1FC8 0010 8 Held Held Held Held Pclk
  38620.  
  38621. RTC RDAYCNT H'FFC8 0014 H'1FC8 0014 8 Held Held Held Held Pclk
  38622.  
  38623. RTC RMONCNT H'FFC8 0018 H'1FC8 0018 8 Held Held Held Held Pclk
  38624.  
  38625. RTC RYRCNT H'FFC8 001C H'1FC8 001C 16 Held Held Held Held Pclk
  38626. RTC RSECAR H'FFC8 0020 H'1FC8 0020 8 Held *2 Held Held Held Pclk
  38627.  
  38628. RTC RMINAR H'FFC8 0024 H'1FC8 0024 8 Held *2 Held Held Held Pclk
  38629.  
  38630. RTC RHRAR H'FFC8 0028 H'1FC8 0028 8 Held *2 Held Held Held Pclk
  38631.  
  38632. 2
  38633. RTC RWKAR H'FFC8 002C H'1FC8 002C 8 Held * Held Held Held Pclk
  38634. RTC RDAYAR H'FFC8 0030 H'1FC8 0030 8 Held *2 Held Held Held Pclk
  38635.  
  38636. RTC RMONAR H'FFC8 0034 H'1FC8 0034 8 Held *2 Held Held Held Pclk
  38637.  
  38638. RTC RCR1 H'FFC8 0038 H'1FC8 0038 8 H'00*2 H'00*2 Held Held Pclk
  38639.  
  38640. RTC RCR2 H'FFC8 003C H'1FC8 003C 8 H'09*2 H'00*2 Held Held Pclk
  38641.  
  38642. INTC ICR H'FFD0 0000 H'1FD0 0000 16 H'0000*2 H'0000*2 Held Held Pclk
  38643.  
  38644. INTC IPRA H'FFD0 0004 H'1FD0 0004 16 H'0000 H'0000 Held Held Pclk
  38645.  
  38646. INTC IPRB H'FFD0 0008 H'1FD0 0008 16 H'0000 H'0000 Held Held Pclk
  38647.  
  38648. INTC IPRC H'FFD0 000C H'1FD0 000C 16 H'0000 H'0000 Held Held Pclk
  38649.  
  38650. TMU TOCR H'FFD8 0000 H'1FD8 0000 8 H'00 H'00 Held Held Pclk
  38651. TMU TSTR H'FFD8 0004 H'1FD8 0004 8 H'00 H'00 Held H'00*2 Pclk
  38652.  
  38653. TMU TCOR0 H'FFD8 0008 H'1FD8 0008 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38654.  
  38655. TMU TCNT0 H'FFD8 000C H'1FD8 000C 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38656.  
  38657. TMU TCR0 H'FFD8 0010 H'1FD8 0010 16 H'0000 H'0000 Held Held Pclk
  38658.  
  38659. Rev. 2.0, 02/99, page 781 of 830
  38660.  
  38661. ----------------------- Page 796-----------------------
  38662.  
  38663. Table A.1 Address List (cont)
  38664.  
  38665. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38666. Address*1 Reset Reset nization
  38667.  
  38668. Clock
  38669.  
  38670. TMU TCOR1 H'FFD8 0014 H'1FD8 0014 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38671.  
  38672. TMU TCNT1 H'FFD8 0018 H'1FD8 0018 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38673.  
  38674. TMU TCR1 H'FFD8 001C H'1FD8 001C 16 H'0000 H'0000 Held Held Pclk
  38675.  
  38676. TMU TCOR2 H'FFD8 0020 H'1FD8 0020 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38677.  
  38678. TMU TCNT2 H'FFD8 0024 H'1FD8 0024 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38679.  
  38680. TMU TCR2 H'FFD8 0028 H'1FD8 0028 16 H'0000 H'0000 Held Held Pclk
  38681.  
  38682. TMU TCPR2 H'FFD8 002C H'1FD8 002C 32 Held Held Held Held Pclk
  38683.  
  38684. SCI SCSMR1 H'FFE0 0000 H'1FE0 0000 8 H'00 H'00 Held H'00 Pclk
  38685.  
  38686. SCI SCBRR1 H'FFE0 0004 H'1FE0 0004 8 H'FF H'FF Held H'FF Pclk
  38687.  
  38688. SCI SCSCR1 H'FFE0 0008 H'1FE0 0008 8 H'00 H'00 Held H'00 Pclk
  38689.  
  38690. SCI SCTDR1 H'FFE0 000C H'1FE0 000C 8 H'FF H'FF Held H'FF Pclk
  38691.  
  38692. SCI SCSSR1 H'FFE0 0010 H'1FE0 0010 8 H'84 H'84 Held H'84 Pclk
  38693.  
  38694. SCI SCRDR1 H'FFE0 0014 H'1FE0 0014 8 H'00 H'00 Held H'00 Pclk
  38695.  
  38696. SCI SCSCMR1 H'FFE0 0018 H'1FE0 0018 8 H'00 H'00 Held H'00 Pclk
  38697. SCI SCSPTR1 H'FFE0 001C H'1FE0 001C 8 H'00*2 H'00*2 Held H'00*2 Pclk
  38698.  
  38699. SCIF SCSMR2 H'FFE8 0000 H'1FE8 0000 16 H'0000 H'0000 Held Held Pclk
  38700.  
  38701. SCIF SCBRR2 H'FFE8 0004 H'1FE8 0004 8 H'FF H'FF Held Held Pclk
  38702.  
  38703. SCIF SCSCR2 H'FFE8 0008 H'1FE8 0008 16 H'0000 H'0000 Held Held Pclk
  38704.  
  38705. SCIF SCFTDR2 H'FFE8 000C H'1FE8 000C 8 Undefined Undefined Held Held Pclk
  38706.  
  38707. SCIF SCFSR2 H'FFE8 0010 H'1FE8 0010 16 H'0060 H'0060 Held Held Pclk
  38708.  
  38709. SCIF SCFRDR2 H'FFE8 0014 H'1FE8 0014 8 Undefined Undefined Held Held Pclk
  38710.  
  38711. SCIF SCFCR2 H'FFE8 0018 H'1FE8 0018 16 H'0000 H'0000 Held Held Pclk
  38712.  
  38713. SCIF SCFDR2 H'FFE8 001C H'1FE8 001C 16 H'0000 H'0000 Held Held Pclk
  38714. SCIF SCSPTR2 H'FFE8 0020 H'1FE8 0020 16 H'0000*2 H'0000*2 Held Held Pclk
  38715.  
  38716. SCIF SCLSR2 H'FFE8 0024 H'1FE8 0024 16 H'0000 H'0000 Held Held Pclk
  38717.  
  38718. Hitachi- SDIR H'FFF0 0000 H'1FF0 0000 16 H'FFFF*2 Held Held Held Pclk
  38719.  
  38720. UDI
  38721.  
  38722. Hitachi- SDDR H'FFF0 0008 H'1FF0 0008 32 Held Held Held Held Pclk
  38723. UDI
  38724. Notes: 1. With control registers, the above addresses in the physical page number field can be
  38725. accessed by means of a TLB setting. When these addresses are referenced directly
  38726. without using the TLB, operations are limited.
  38727. 2. Includes undefined bits. See the descriptions of the individual modules.
  38728. 3. Use word-size access when writing. Perform the write with the upper byte set to H'5A
  38729. or H'A5, respectively. Byte- and longword-size writes cannot be used.
  38730. Use byte-size access when reading.
  38731.  
  38732. Rev. 2.0, 02/99, page 782 of 830
  38733.  
  38734. ----------------------- Page 797-----------------------
  38735.  
  38736. Appendix B Package Dimensions
  38737.  
  38738. Unit :mm
  38739.  
  38740. 4× 0.20
  38741.  
  38742. 27.0
  38743. A 20 18 16 14 12 10 8 6 4 2
  38744. B 19 17 15 13 11 9 7 5 3 1
  38745.  
  38746. A
  38747. B
  38748. C
  38749. D
  38750. E
  38751. 5 F
  38752. 3 G
  38753. 6
  38754. 0. H
  38755. J
  38756. 0
  38757. . K
  38758. 7 L
  38759. 2
  38760. M
  38761. 7 N
  38762. 2
  38763. 1. P
  38764. R
  38765. T
  38766. U
  38767. V
  38768. W
  38769. Y
  38770.  
  38771. 1 0.635 1.27
  38772. .
  38773. 0.35 C 2
  38774.  
  38775. 0.15 C
  38776.  
  38777. A
  38778. 1
  38779. C .
  38780. 0
  38781.  
  38782. ±
  38783.  
  38784. 0
  38785. 6
  38786. .
  38787. 0
  38788.  
  38789. 256 × φ0.75 ± 0.15 Hitachi Code BP-256
  38790. 0.30 S C A S B S
  38791. 0.10 S C JEDEC Code MO-151
  38792. EIAJ Code –
  38793. Details of the part A Weight 3.0 g
  38794.  
  38795. Figure B.1 Package Dimensions (256-Pin BGA)
  38796.  
  38797. Rev. 2.0, 02/99, page 783 of 830
  38798.  
  38799. ----------------------- Page 798-----------------------
  38800.  
  38801. 30.6 ± 0.2 Unit: mm
  38802.  
  38803. 28
  38804.  
  38805. 156 105
  38806.  
  38807. 157 104
  38808.  
  38809. 2
  38810. .
  38811. 0
  38812.  
  38813. ±
  38814.  
  38815. 6
  38816. . 5
  38817. 0 .
  38818. 3 0
  38819.  
  38820. 208 53
  38821. x
  38822. a
  38823. 1 52 M 5 4
  38824. 0.22 ± 0.05 0 0
  38825. 0.10 M 0 6 0 0. .
  38826. 0.20 ± 0.04 2. 5. ± ± 1.25 1.3
  38827. 3
  38828. 3 7 5
  38829. 1 1
  38830. . . 0° – 8°
  38831. 0 0
  38832.  
  38833.  
  38834. 0 5
  38835. 1. 1. 0.5 ± 0.1
  38836. 0 0
  38837. 0.10 + –
  38838. 5
  38839. 1 Hitachi Code FP-208E
  38840. .
  38841. 0 JEDEC —
  38842.  
  38843. Dimension including the plating thickness EIAJ Conforms
  38844. Base material dimension Weight (reference value) 5.3 g
  38845.  
  38846. Figure B.2 Package Dimensions (208-Pin QFP)
  38847.  
  38848. Rev. 2.0, 02/99, page 784 of 830
  38849.  
  38850. ----------------------- Page 799-----------------------
  38851.  
  38852. Appendix C Mode Pin Settings
  38853.  
  38854. The MD8–MD0 pin values are input in the event of a power-on reset via the 5(6(7 or
  38855. SCK2/05(6(7 pin.
  38856.  
  38857. Clock Modes
  38858.  
  38859. Pin Values Frequency PLL1 PLL2 Initial Clock Frequency
  38860. Divider 1 Ratio*2
  38861.  
  38862. Mode MD2 MD1 MD0 CPU Bus Peripheral
  38863. Clock Clock Module
  38864. Clock
  38865.  
  38866. 0 0 0 0 Off On On 6 3/2 3/2
  38867.  
  38868. 1 0 0 1 Off On On 6 1 1
  38869.  
  38870. 2 0 1 0 On On On 3 1 1/2
  38871.  
  38872. 3 0 1 1 Off On On 6 2 1
  38873.  
  38874. 4 1 0 0 On On On 3 3/2 3/4
  38875.  
  38876. 5 1 0 1 Off On On 6 3 3/2
  38877.  
  38878. Notes: 1. MD2–MD0 pin value combinations other than those shown above cannot be set.
  38879. 2. Taking the input clock (EXTAL or crystal resonator frequency) as 1.
  38880.  
  38881. Area 0 Bus Width
  38882.  
  38883. Pin Value
  38884.  
  38885. MD4 MD3 Bus Width
  38886.  
  38887. 0 0 64 bits
  38888.  
  38889. 1 8 bits
  38890.  
  38891. 1 0 16 bits
  38892.  
  38893. 1 32 bits
  38894.  
  38895. Endian
  38896.  
  38897. Pin Value
  38898.  
  38899. MD5 Endian
  38900.  
  38901. 0 Big endian
  38902.  
  38903. 1 Little endian
  38904.  
  38905. Rev. 2.0, 02/99, page 785 of 830
  38906.  
  38907. ----------------------- Page 800-----------------------
  38908.  
  38909. Area 0 Memory Type
  38910.  
  38911. Pin Value
  38912.  
  38913. MD6 Memory Type
  38914.  
  38915. 0 MPX bus
  38916.  
  38917. 1 Normal memory
  38918.  
  38919. Master/Slave
  38920.  
  38921. Pin Value
  38922.  
  38923. MD7 Master/Slave
  38924.  
  38925. 0 Slave
  38926.  
  38927. 1 Master
  38928.  
  38929. Clock Input
  38930.  
  38931. Pin Value
  38932.  
  38933. MD8 Clock Input
  38934.  
  38935. 0 External input clock
  38936.  
  38937. 1 Crystal resonator
  38938.  
  38939. Rev. 2.0, 02/99, page 786 of 830
  38940.  
  38941. ----------------------- Page 801-----------------------
  38942.  
  38943. Appendix D &.,2(1% Pin Configuration
  38944.  
  38945. SH7750 VDDQ
  38946. rd_pullup_control
  38947.  
  38948. rd_dt_ RD/CASS/FRAME
  38949.  
  38950. rd_hiz_control VDDQ
  38951.  
  38952. RD2
  38953.  
  38954. VDDQ
  38955. rdwr_pullup_control
  38956.  
  38957. rdwr_dt_ RD/WR
  38958.  
  38959. rdwr_hiz_control VDDQ
  38960.  
  38961. RD/WR2
  38962.  
  38963. PLL2
  38964. Bus clock CKIO
  38965.  
  38966. ckio_hiz_control
  38967.  
  38968. CKIO2
  38969.  
  38970. VDDQ
  38971.  
  38972. VSSQ
  38973.  
  38974. CKIO2ENB
  38975.  
  38976. Figure D.1 &.,2(1% Pin Configuration
  38977. &.,2(1%
  38978.  
  38979. Rev. 2.0, 02/99, page 787 of 830
  38980.  
  38981. ----------------------- Page 802-----------------------
  38982.  
  38983. &.,2(1% Description
  38984. &.,2(1%
  38985.  
  38986. 0 5' , RD/:5 , and CKIO2 have the same pin states as 5' , RD/:5 , and
  38987. CKIO, respectively
  38988.  
  38989. 1 5' , RD/:5 , and CKIO2 are in the high-impedance state
  38990.  
  38991. Note: CKIO is fed back to PLL2 to coordinate the external clock and internal clock phases.
  38992. However, CKIO2 is not fed back.
  38993.  
  38994. Rev. 2.0, 02/99, page 788 of 830
  38995.  
  38996. ----------------------- Page 803-----------------------
  38997.  
  38998. Appendix E Pin Functions
  38999.  
  39000. E.1 Pin States
  39001.  
  39002. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State
  39003.  
  39004. Signal Name I/O Reset Reset Sleep Standby Bus Notes
  39005. (Power-On) (Manual) Released
  39006.  
  39007. Master Slave Master Slave
  39008.  
  39009. D0–D7 I/O Z Z Z Z Z Z Z
  39010.  
  39011. D8–D15 I/O Z Z Z Z Z Z Z
  39012.  
  39013. D16–D23 I/O Z Z Z Z Z Z Z
  39014.  
  39015. D24–D31 I/O Z Z Z Z Z Z Z
  39016.  
  39017. D32–D39 I/O Z Z ZK ZK ZK ZK ZK Output
  39018. state held
  39019. when
  39020. used as
  39021. port
  39022.  
  39023. D40–D47 I/O Z Z ZK ZK ZK ZK ZK Output
  39024. state held
  39025. when
  39026. used as
  39027. port
  39028.  
  39029. D48–D55 I/O Z Z Z Z Z Z Z
  39030.  
  39031. D56–D63 I/O Z Z Z Z Z Z Z
  39032.  
  39033. A0, A1, A18–A25 O Z Z Z Z Z Z Z
  39034. A2–A17 O Z Z ZO*9 Z O ZO*7 Z
  39035.  
  39036. 5(6(7 I I I I I I I I
  39037.  
  39038. %$&./%65(4 O H H H H O H O
  39039.  
  39040. %5(4/%6$&. I I I I I I I I
  39041. %6 O H Z H Z O*4 ZH*7 Z
  39042.  
  39043. CKE O H Z O*6 Z O*6 L O*6
  39044.  
  39045. &6–&6 O H Z H Z O*4 ZH*7 Z
  39046.  
  39047. 5$6 O H Z O*6 Z O*4 ZO*5 ZO*5
  39048.  
  39049. 5'/&$66 O H Z O*6 Z O*4 ZO*5 ZO*5
  39050.  
  39051. RD/:5 O H Z H Z O*4 ZH*7 Z
  39052.  
  39053. 5'< I I I I I I I I
  39054.  
  39055. Rev. 2.0, 02/99, page 789 of 830
  39056.  
  39057. ----------------------- Page 804-----------------------
  39058.  
  39059. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  39060.  
  39061. Signal Name I/O Reset Reset Sleep Standby Bus Notes
  39062. (Power-On) (Manual) Released
  39063.  
  39064. Master Slave Master Slave
  39065. :(/&$6/DQM7 O H Z O*6 Z O*4 ZO*5 ZO*5
  39066.  
  39067. :(/&$6/DQM6 O H Z O*6 Z O*4 ZO*5 ZO*5
  39068.  
  39069. :(/&$6/DQM5 O H Z O*6 Z O*4 ZO*5 ZO*5
  39070.  
  39071. :(/&$6/DQM4 O H Z O*6 Z O*4 ZO*5 ZO*5
  39072.  
  39073. :(/&$6/DQM3 O H Z O*6 Z O*4 ZO*5 ZO*5
  39074.  
  39075. :(/&$6/DQM2 O H Z O*6 Z O*4 ZO*5 ZO*5
  39076.  
  39077. :(/&$6/DQM1 O H Z O*6 Z O*4 ZO*5 ZO*5
  39078.  
  39079. :(/&$6/DQM0 O H Z O*6 Z O*4 ZO*5 ZO*5
  39080.  
  39081. DACK1–DACK0 O L L L L O*4 ZO*8 O DMAC
  39082.  
  39083. MD7/TXD I/O I I I I IO ZO*8 IO SCI
  39084.  
  39085. MD6/,2,6 I I I I I I I I PCMCIA
  39086. (I/O)
  39087.  
  39088. 1 6 4 5 5
  39089. MD5/5$6 I/O* I I IO* I IO* IO* IO* DRAM2
  39090.  
  39091. 2 4 7
  39092. MD4/&(% I/O* I I IH I IO* IH* I PCMCIA
  39093.  
  39094. 3 4 7
  39095. MD3/&($ I/O* I I IH I IO* IH* I PCMCIA
  39096. CKIO O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39097.  
  39098. STATUS1– O O O O O O O O
  39099. STATUS0
  39100.  
  39101. ,5/–,5/ I I I I I I I I INTC
  39102.  
  39103. NMI I I I I I I I I INTC
  39104.  
  39105. '5(4–'5(4 I I I I I I I I DMAC
  39106. DRAK1–DRAK0 O L L L L O*4 ZO*8 O DMAC
  39107.  
  39108. MD0/SCK I/O I I I I IO IO*8 IO SCI
  39109.  
  39110. RXD I I I I I I I I SCI
  39111.  
  39112. SCK2/05(6(7 I I I I I I I I SCIF
  39113. MD1/TXD2 I/O I I I I IO IO*8 IO SCIF
  39114.  
  39115. MD2/RXD2 I I I I I I I I SCIF
  39116. &76 I/O I I I I IO IO*8 IO SCIF
  39117.  
  39118. MD8/576 I/O I I I I IO IO*8 IO SCIF
  39119.  
  39120. TCLK I/O I I I I IO IO IO TMU
  39121.  
  39122. Rev. 2.0, 02/99, page 790 of 830
  39123.  
  39124. ----------------------- Page 805-----------------------
  39125.  
  39126. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  39127.  
  39128. Signal Name I/O Reset Reset Sleep Standby Bus Notes
  39129. (Power-On) (Manual) Released
  39130.  
  39131. Master Slave Master Slave
  39132.  
  39133. TDO I/O O O O O O O O Hitachi-
  39134. UDI
  39135.  
  39136. TMS I I I I I I I I Hitachi-
  39137. UDI
  39138.  
  39139. TCK I I I I I I I I Hitachi-
  39140. UDI
  39141.  
  39142. TDI I I I I I I I I Hitachi-
  39143. UDI
  39144.  
  39145. 7567 I I I I I I I I Hitachi-
  39146. UDI
  39147. CKIO2*10 O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39148.  
  39149. 5'*10 O H Z O*6 Z O*4 ZO*5 ZO*5
  39150.  
  39151. RD/:5*10 O H Z H Z O*4 ZH*7 Z
  39152.  
  39153. &.,2(1% I I I I I I I I
  39154.  
  39155. Notes: I: Input
  39156. O: Output
  39157. H: High-level output
  39158. L: Low-level output
  39159. Z: High-impedance
  39160. K: Output state held
  39161.  
  39162. 1. Output when area 2 DRAM is used.
  39163. 2. Output when area 5 PCMCIA is used.
  39164. 3. Output when area 6 PCMCIA is used.
  39165. 4. Depends on refresh and DMAC operations.
  39166. 5. Z (I) or O (refresh), depending on register setting (BCR1.HIZCNT).
  39167. 6. Depends on refresh operation.
  39168. 7. Z (I) or H (state held), depending on register setting (BCR1.HIZMEM).
  39169. 8. Z or O, depending on register setting (STBCR.PHZ).
  39170. 9. Output when refreshing is set.
  39171. 10. Operation in respective state when &.,2(1% = 0; Z when &.,2(1% = 1.
  39172. 11. Z or O, depending on register setting (FRQCR.CKOEN).
  39173.  
  39174. Rev. 2.0, 02/99, page 791 of 830
  39175.  
  39176. ----------------------- Page 806-----------------------
  39177.  
  39178. E.2 Handling of Unused Pins
  39179.  
  39180. • When RTC is not used
  39181.  EXTAL2: Pull up to 3.3 V
  39182.  XTAL2: Leave unconnected
  39183.  VDD-RTC: Power supply (3.3 V)
  39184.  VSS-RTC: Power supply (0 V)
  39185. • When PLL1 is not used
  39186.  VDD-PLL1: Power supply (3.3 V)
  39187.  VSS-PLL1: Power supply (0 V)
  39188. • When PLL2 is not used
  39189.  VDD-PLL2: Power supply (3.3 V)
  39190.  VSS-PLL2: Power supply (0 V)
  39191. • When on-chip crystal oscillator is not used
  39192.  XTAL: Leave unconnected
  39193.  VDD-CPG: Power supply (3.3 V)
  39194.  VSS-CPG: Power supply (0 V)
  39195.  
  39196. Rev. 2.0, 02/99, page 792 of 830
  39197.  
  39198. ----------------------- Page 807-----------------------
  39199.  
  39200. Appendix F Synchronous DRAM Address
  39201. Multiplexing Tables
  39202.  
  39203. (1) BUS 64 (16M: 512k × 16b × 2) × 4
  39204. AMX 0 AMXEXT 0 16M, column-addr-8bit 8MB
  39205.  
  39206. SH7750 Address Pins Synchronous DRAM Function
  39207. Address Pins
  39208.  
  39209. RAS Cycle CAS Cycle
  39210.  
  39211. A14 A22 A22 A11 BANK selects bank address
  39212.  
  39213. A13 A21 H/L A10 Address precharge setting
  39214.  
  39215. A12 A20 0 A9 Address
  39216.  
  39217. A11 A19 0 A8
  39218.  
  39219. A10 A18 A10 A7
  39220.  
  39221. A9 A17 A9 A6
  39222.  
  39223. A8 A16 A8 A5
  39224.  
  39225. A7 A15 A7 A4
  39226.  
  39227. A6 A14 A6 A3
  39228.  
  39229. A5 A13 A5 A2
  39230.  
  39231. A4 A12 A4 A1
  39232.  
  39233. A3 A11 A3 A0
  39234.  
  39235. A2 Not used
  39236.  
  39237. A1 Not used
  39238.  
  39239. A0 Not used
  39240.  
  39241. Rev. 2.0, 02/99, page 793 of 830
  39242.  
  39243. ----------------------- Page 808-----------------------
  39244.  
  39245. (2) BUS 32 (16M: 512k × 16b × 2) × 2
  39246. AMX 0 AMXEXT 0 16M, column-addr-8bit 4MB
  39247.  
  39248. SH7750 Address Pins Synchronous DRAM Function
  39249. Address Pins
  39250.  
  39251. RAS Cycle CAS Cycle
  39252.  
  39253. A14
  39254.  
  39255. A13 A21 A21 A11 BANK selects bank address
  39256.  
  39257. A12 A20 H/L A10 Address precharge setting
  39258.  
  39259. A11 A19 0 A9 Address
  39260.  
  39261. A10 A18 0 A8
  39262.  
  39263. A9 A17 A9 A7
  39264.  
  39265. A8 A16 A8 A6
  39266.  
  39267. A7 A15 A7 A5
  39268.  
  39269. A6 A14 A6 A4
  39270.  
  39271. A5 A13 A5 A3
  39272.  
  39273. A4 A12 A4 A2
  39274.  
  39275. A3 A11 A3 A1
  39276.  
  39277. A2 A10 A2 A0
  39278.  
  39279. A1 Not used
  39280.  
  39281. A0 Not used
  39282.  
  39283. Rev. 2.0, 02/99, page 794 of 830
  39284.  
  39285. ----------------------- Page 809-----------------------
  39286.  
  39287. (3) BUS 64 (16M: 512k × 16b × 2) × 4
  39288. AMX 0 AMXEXT 1 16M, column-addr-8bit 8MB
  39289.  
  39290. SH7750 Address Pins Synchronous DRAM Function
  39291. Address Pins
  39292.  
  39293. RAS Cycle CAS Cycle
  39294.  
  39295. A14 A21 A21 A11 BANK selects bank address
  39296.  
  39297. A13 A22 H/L A10 Address precharge setting
  39298.  
  39299. A12 A20 0 A9 Address
  39300.  
  39301. A11 A19 0 A8
  39302.  
  39303. A10 A18 A10 A7
  39304.  
  39305. A9 A17 A9 A6
  39306.  
  39307. A8 A16 A8 A5
  39308.  
  39309. A7 A15 A7 A4
  39310.  
  39311. A6 A14 A6 A3
  39312.  
  39313. A5 A13 A5 A2
  39314.  
  39315. A4 A12 A4 A1
  39316.  
  39317. A3 A11 A3 A0
  39318.  
  39319. A2 Not used
  39320.  
  39321. A1 Not used
  39322.  
  39323. A0 Not used
  39324.  
  39325. Rev. 2.0, 02/99, page 795 of 830
  39326.  
  39327. ----------------------- Page 810-----------------------
  39328.  
  39329. (4) BUS 32 (16M: 512k × 16b × 2) × 2
  39330. AMX 0 AMXEXT 1 16M, column-addr-8bit 4MB
  39331.  
  39332. SH7750 Address Pins Synchronous DRAM Function
  39333. Address Pins
  39334.  
  39335. RAS Cycle CAS Cycle
  39336.  
  39337. A14
  39338.  
  39339. A13 A20 A20 A11 BANK selects bank address
  39340.  
  39341. A12 A21 H/L A10 Address precharge setting
  39342.  
  39343. A11 A19 0 A9 Address
  39344.  
  39345. A10 A18 0 A8
  39346.  
  39347. A9 A17 A9 A7
  39348.  
  39349. A8 A16 A8 A6
  39350.  
  39351. A7 A15 A7 A5
  39352.  
  39353. A6 A14 A6 A4
  39354.  
  39355. A5 A13 A5 A3
  39356.  
  39357. A4 A12 A4 A2
  39358.  
  39359. A3 A11 A3 A1
  39360.  
  39361. A2 A10 A2 A0
  39362.  
  39363. A1 Not used
  39364.  
  39365. A0 Not used
  39366.  
  39367. Rev. 2.0, 02/99, page 796 of 830
  39368.  
  39369. ----------------------- Page 811-----------------------
  39370.  
  39371. (5) BUS 64 (16M: 1M × 8b × 2) × 8
  39372. AMX 1 AMXEXT 0 16M, column-addr-9bit 16MB
  39373.  
  39374. SH7750 Address Pins Synchronous DRAM Function
  39375. Address Pins
  39376.  
  39377. RAS Cycle CAS Cycle
  39378.  
  39379. A14 A23 A23 A11 BANK selects bank address
  39380.  
  39381. A13 A22 H/L A10 Address precharge setting
  39382.  
  39383. A12 A21 0 A9 Address
  39384.  
  39385. A11 A20 A11 A8
  39386.  
  39387. A10 A19 A10 A7
  39388.  
  39389. A9 A18 A9 A6
  39390.  
  39391. A8 A17 A8 A5
  39392.  
  39393. A7 A16 A7 A4
  39394.  
  39395. A6 A15 A6 A3
  39396.  
  39397. A5 A14 A5 A2
  39398.  
  39399. A4 A13 A4 A1
  39400.  
  39401. A3 A12 A3 A0
  39402.  
  39403. A2 Not used
  39404.  
  39405. A1 Not used
  39406.  
  39407. A0 Not used
  39408.  
  39409. Rev. 2.0, 02/99, page 797 of 830
  39410.  
  39411. ----------------------- Page 812-----------------------
  39412.  
  39413. (6) BUS 32 (16M: 1M × 8b × 2) × 4
  39414. AMX 1 AMXEXT 0 16M, column-addr-9bit 8MB
  39415.  
  39416. SH7750 Address Pins Synchronous DRAM Function
  39417. Address Pins
  39418.  
  39419. RAS Cycle CAS Cycle
  39420.  
  39421. A14
  39422.  
  39423. A13 A22 A22 A11 BANK selects bank address
  39424.  
  39425. A12 A21 H/L A10 Address precharge setting
  39426.  
  39427. A11 A20 0 A9 Address
  39428.  
  39429. A10 A19 A10 A8
  39430.  
  39431. A9 A18 A9 A7
  39432.  
  39433. A8 A17 A8 A6
  39434.  
  39435. A7 A16 A7 A5
  39436.  
  39437. A6 A15 A6 A4
  39438.  
  39439. A5 A14 A5 A3
  39440.  
  39441. A4 A13 A4 A2
  39442.  
  39443. A3 A12 A3 A1
  39444.  
  39445. A2 A11 A2 A0
  39446.  
  39447. A1 Not used
  39448.  
  39449. A0 Not used
  39450.  
  39451. Rev. 2.0, 02/99, page 798 of 830
  39452.  
  39453. ----------------------- Page 813-----------------------
  39454.  
  39455. (7) BUS 64 (16M: 1M × 8b × 2) × 8
  39456. AMX 1 AMXEXT 1 16M, column-addr-9bit 16MB
  39457.  
  39458. SH7750 Address Pins Synchronous DRAM Function
  39459. Address Pins
  39460.  
  39461. RAS Cycle CAS Cycle
  39462.  
  39463. A14 A22 A22 A11 BANK selects bank address
  39464.  
  39465. A13 A23 H/L A10 Address precharge setting
  39466.  
  39467. A12 A21 0 A9 Address
  39468.  
  39469. A11 A20 A11 A8
  39470.  
  39471. A10 A19 A10 A7
  39472.  
  39473. A9 A18 A9 A6
  39474.  
  39475. A8 A17 A8 A5
  39476.  
  39477. A7 A16 A7 A4
  39478.  
  39479. A6 A15 A6 A3
  39480.  
  39481. A5 A14 A5 A2
  39482.  
  39483. A4 A13 A4 A1
  39484.  
  39485. A3 A12 A3 A0
  39486.  
  39487. A2 Not used
  39488.  
  39489. A1 Not used
  39490.  
  39491. A0 Not used
  39492.  
  39493. Rev. 2.0, 02/99, page 799 of 830
  39494.  
  39495. ----------------------- Page 814-----------------------
  39496.  
  39497. (8) BUS 32 (16M: 1M × 8b × 2) × 4
  39498. AMX 1 AMXEXT 1 16M, column-addr-9bit 8MB
  39499.  
  39500. SH7750 Address Pins Synchronous DRAM Function
  39501. Address Pins
  39502.  
  39503. RAS Cycle CAS Cycle
  39504.  
  39505. A14
  39506.  
  39507. A13 A21 A21 A11 BANK selects bank address
  39508.  
  39509. A12 A22 H/L A10 Address precharge setting
  39510.  
  39511. A11 A20 0 A9 Address
  39512.  
  39513. A10 A19 A10 A8
  39514.  
  39515. A9 A18 A9 A7
  39516.  
  39517. A8 A17 A8 A6
  39518.  
  39519. A7 A16 A7 A5
  39520.  
  39521. A6 A15 A6 A4
  39522.  
  39523. A5 A14 A5 A3
  39524.  
  39525. A4 A13 A4 A2
  39526.  
  39527. A3 A12 A3 A1
  39528.  
  39529. A2 A11 A2 A0
  39530.  
  39531. A1 Not used
  39532.  
  39533. A0 Not used
  39534.  
  39535. Rev. 2.0, 02/99, page 800 of 830
  39536.  
  39537. ----------------------- Page 815-----------------------
  39538.  
  39539. (9) BUS 64 (64M: 1M × 16b × 4) × 4
  39540. AMX 2 64M, column-addr-8bit 32MB
  39541.  
  39542. SH7750 Address Pins Synchronous DRAM Function
  39543. Address Pins
  39544.  
  39545. RAS Cycle CAS Cycle
  39546.  
  39547. A16 A24 A24 A13 BANK selects bank address
  39548.  
  39549. A15 A23 A23 A12
  39550.  
  39551. A14 A22 0 A11 Address precharge setting
  39552.  
  39553. A13 A21 H/L A10
  39554.  
  39555. A12 A20 0 A9 Address
  39556.  
  39557. A11 A19 0 A8
  39558.  
  39559. A10 A18 A10 A7
  39560.  
  39561. A9 A17 A9 A6
  39562.  
  39563. A8 A16 A8 A5
  39564.  
  39565. A7 A15 A7 A4
  39566.  
  39567. A6 A14 A6 A3
  39568.  
  39569. A5 A13 A5 A2
  39570.  
  39571. A4 A12 A4 A1
  39572.  
  39573. A3 A11 A3 A0
  39574.  
  39575. A2 Not used
  39576.  
  39577. A1 Not used
  39578.  
  39579. A0 Not used
  39580.  
  39581. Rev. 2.0, 02/99, page 801 of 830
  39582.  
  39583. ----------------------- Page 816-----------------------
  39584.  
  39585. (10) BUS 32 (64M: 1M × 16b × 4) × 2
  39586. AMX 2 64M, column-addr-8bit 16MB
  39587.  
  39588. SH7750 Address Pins Synchronous DRAM Function
  39589. Address Pins
  39590.  
  39591. RAS Cycle CAS Cycle
  39592.  
  39593. A16
  39594.  
  39595. A15 A23 A23 A13 BANK selects bank address
  39596.  
  39597. A14 A22 A22 A12
  39598.  
  39599. A13 A21 0 A11 Address precharge setting
  39600.  
  39601. A12 A20 H/L A10
  39602.  
  39603. A11 A19 0 A9 Address
  39604.  
  39605. A10 A18 0 A8
  39606.  
  39607. A9 A17 A9 A7
  39608.  
  39609. A8 A16 A8 A6
  39610.  
  39611. A7 A15 A7 A5
  39612.  
  39613. A6 A14 A6 A4
  39614.  
  39615. A5 A13 A5 A3
  39616.  
  39617. A4 A12 A4 A2
  39618.  
  39619. A3 A11 A3 A1
  39620.  
  39621. A2 A10 A2 A0
  39622.  
  39623. A1 Not used
  39624.  
  39625. A0 Not used
  39626.  
  39627. Rev. 2.0, 02/99, page 802 of 830
  39628.  
  39629. ----------------------- Page 817-----------------------
  39630.  
  39631. (11) BUS 64 (64M: 2M × 8b × 4) × 8
  39632. AMX 3 64M, column-addr-9bit 64MB
  39633.  
  39634. SH7750 Address Pins Synchronous DRAM Function
  39635. Address Pins
  39636.  
  39637. RAS Cycle CAS Cycle
  39638.  
  39639. A16 A25 A25 A13 BANK selects bank address
  39640.  
  39641. A15 A24 A24 A12
  39642.  
  39643. A14 A23 0 A11 Address precharge setting
  39644.  
  39645. A13 A22 H/L A10
  39646.  
  39647. A12 A21 0 A9 Address
  39648.  
  39649. A11 A20 A11 A8
  39650.  
  39651. A10 A19 A10 A7
  39652.  
  39653. A9 A18 A9 A6
  39654.  
  39655. A8 A17 A8 A5
  39656.  
  39657. A7 A16 A7 A4
  39658.  
  39659. A6 A15 A6 A3
  39660.  
  39661. A5 A14 A5 A2
  39662.  
  39663. A4 A13 A4 A1
  39664.  
  39665. A3 A12 A3 A0
  39666.  
  39667. A2 Not used
  39668.  
  39669. A1 Not used
  39670.  
  39671. A0 Not used
  39672.  
  39673. Rev. 2.0, 02/99, page 803 of 830
  39674.  
  39675. ----------------------- Page 818-----------------------
  39676.  
  39677. (12) BUS 32 (64M: 2M × 8b × 4) × 4
  39678. AMX 3 64M, column-addr-9bit 32MB
  39679.  
  39680. SH7750 Address Pins Synchronous DRAM Function
  39681. Address Pins
  39682.  
  39683. RAS Cycle CAS Cycle
  39684.  
  39685. A16
  39686.  
  39687. A15 A24 A24 A13 BANK selects bank address
  39688.  
  39689. A14 A23 A23 A12
  39690.  
  39691. A13 A22 0 A11 Address precharge setting
  39692.  
  39693. A12 A21 H/L A10
  39694.  
  39695. A11 A20 0 A9 Address
  39696.  
  39697. A10 A19 A10 A8
  39698.  
  39699. A9 A18 A9 A7
  39700.  
  39701. A8 A17 A8 A6
  39702.  
  39703. A7 A16 A7 A5
  39704.  
  39705. A6 A15 A6 A4
  39706.  
  39707. A5 A14 A5 A3
  39708.  
  39709. A4 A13 A4 A2
  39710.  
  39711. A3 A12 A3 A1
  39712.  
  39713. A2 A11 A2 A0
  39714.  
  39715. A1 Not used
  39716.  
  39717. A0 Not used
  39718.  
  39719. Rev. 2.0, 02/99, page 804 of 830
  39720.  
  39721. ----------------------- Page 819-----------------------
  39722.  
  39723. (13) BUS 64 (64M: 512k × 32b × 4) × 2
  39724. AMX 4 64M, column-addr-8bit 16MB
  39725.  
  39726. SH7750 Address Pins Synchronous DRAM Function
  39727. Address Pins
  39728.  
  39729. RAS Cycle CAS Cycle
  39730.  
  39731. A15 A23 A23 A12 BANK selects bank address
  39732.  
  39733. A14 A22 A22 A11
  39734.  
  39735. A13 A21 H/L A10 Address precharge setting
  39736.  
  39737. A12 A20 0 A9 Address
  39738.  
  39739. A11 A19 0 A8
  39740.  
  39741. A10 A18 A10 A7
  39742.  
  39743. A9 A17 A9 A6
  39744.  
  39745. A8 A16 A8 A5
  39746.  
  39747. A7 A15 A7 A4
  39748.  
  39749. A6 A14 A6 A3
  39750.  
  39751. A5 A13 A5 A2
  39752.  
  39753. A4 A12 A4 A1
  39754.  
  39755. A3 A11 A3 A0
  39756.  
  39757. A2 Not used
  39758.  
  39759. A1 Not used
  39760.  
  39761. A0 Not used
  39762.  
  39763. Rev. 2.0, 02/99, page 805 of 830
  39764.  
  39765. ----------------------- Page 820-----------------------
  39766.  
  39767. (14) BUS 32 (64M: 512k × 32b × 4) × 1
  39768. AMX 4 64M, column-addr-8bit 8MB
  39769.  
  39770. SH7750 Address Pins Synchronous DRAM Function
  39771. Address Pins
  39772.  
  39773. RAS Cycle CAS Cycle
  39774.  
  39775. A15
  39776.  
  39777. A14 A22 A22 A12 BANK selects bank address
  39778.  
  39779. A13 A21 A21 A11
  39780.  
  39781. A12 A20 H/L A10 Address precharge setting
  39782.  
  39783. A11 A19 0 A9 Address
  39784.  
  39785. A10 A18 0 A8
  39786.  
  39787. A9 A17 A9 A7
  39788.  
  39789. A8 A16 A8 A6
  39790.  
  39791. A7 A15 A7 A5
  39792.  
  39793. A6 A14 A6 A4
  39794.  
  39795. A5 A13 A5 A3
  39796.  
  39797. A4 A12 A4 A2
  39798.  
  39799. A3 A11 A3 A1
  39800.  
  39801. A2 A10 A2 A0
  39802.  
  39803. A1 Not used
  39804.  
  39805. A0 Not used
  39806.  
  39807. Rev. 2.0, 02/99, page 806 of 830
  39808.  
  39809. ----------------------- Page 821-----------------------
  39810.  
  39811. (15) BUS 64 (64M: 1M × 32b × 2) × 2
  39812. AMX 5 64M, column-addr-8bit 16MB
  39813.  
  39814. SH7750 Address Pins Synchronous DRAM Function
  39815. Address Pins
  39816.  
  39817. RAS Cycle CAS Cycle
  39818.  
  39819. A15 A23 A23 A12 BANK selects bank address
  39820.  
  39821. A14 A22 0 A11
  39822.  
  39823. A13 A21 H/L A10 Address precharge setting
  39824.  
  39825. A12 A20 0 A9 Address
  39826.  
  39827. A11 A19 0 A8
  39828.  
  39829. A10 A18 A10 A7
  39830.  
  39831. A9 A17 A9 A6
  39832.  
  39833. A8 A16 A8 A5
  39834.  
  39835. A7 A15 A7 A4
  39836.  
  39837. A6 A14 A6 A3
  39838.  
  39839. A5 A13 A5 A2
  39840.  
  39841. A4 A12 A4 A1
  39842.  
  39843. A3 A11 A3 A0
  39844.  
  39845. A2 Not used
  39846.  
  39847. A1 Not used
  39848.  
  39849. A0 Not used
  39850.  
  39851. Rev. 2.0, 02/99, page 807 of 830
  39852.  
  39853. ----------------------- Page 822-----------------------
  39854.  
  39855. (16) BUS 32 (64M: 1M × 32b × 2) × 1
  39856. AMX 5 64M, column-addr-8bit 8MB
  39857.  
  39858. SH7750 Address Pins Synchronous DRAM Function
  39859. Address Pins
  39860.  
  39861. RAS Cycle CAS Cycle
  39862.  
  39863. A15
  39864.  
  39865. A14 A22 A22 A12 BANK selects bank address
  39866.  
  39867. A13 A21 0 A11
  39868.  
  39869. A12 A20 H/L A10 Address precharge setting
  39870.  
  39871. A11 A19 0 A9 Address
  39872.  
  39873. A10 A18 0 A8
  39874.  
  39875. A9 A17 A9 A7
  39876.  
  39877. A8 A16 A8 A6
  39878.  
  39879. A7 A15 A7 A5
  39880.  
  39881. A6 A14 A6 A4
  39882.  
  39883. A5 A13 A5 A3
  39884.  
  39885. A4 A12 A4 A2
  39886.  
  39887. A3 A11 A3 A1
  39888.  
  39889. A2 A10 A2 A0
  39890.  
  39891. A1 Not used
  39892.  
  39893. A0 Not used
  39894.  
  39895. Rev. 2.0, 02/99, page 808 of 830
  39896.  
  39897. ----------------------- Page 823-----------------------
  39898.  
  39899. (17) BUS 64 (16M: 256k × 32b × 2) × 2
  39900. AMX 7 16M, column-addr-8bit 4MB
  39901.  
  39902. SH7750 Address Pins Synchronous DRAM Function
  39903. Address Pins
  39904.  
  39905. RAS Cycle CAS Cycle
  39906.  
  39907. A13 A21 A21 A10 BANK selects bank address
  39908.  
  39909. A12 A20 H/L A9 Address precharge setting
  39910.  
  39911. A11 A19 0 A8 Address
  39912.  
  39913. A10 A18 A10 A7
  39914.  
  39915. A9 A17 A9 A6
  39916.  
  39917. A8 A16 A8 A5
  39918.  
  39919. A7 A15 A7 A4
  39920.  
  39921. A6 A14 A6 A3
  39922.  
  39923. A5 A13 A5 A2
  39924.  
  39925. A4 A12 A4 A1
  39926.  
  39927. A3 A11 A3 A0
  39928.  
  39929. A2 Not used
  39930.  
  39931. A1 Not used
  39932.  
  39933. A0 Not used
  39934.  
  39935. Rev. 2.0, 02/99, page 809 of 830
  39936.  
  39937. ----------------------- Page 824-----------------------
  39938.  
  39939. (18) BUS 32 (16M: 256k × 32b × 2) × 1
  39940. AMX 7 16M, column-addr-8bit 2MB
  39941.  
  39942. SH7750 Address Pins Synchronous DRAM Function
  39943. Address Pins
  39944.  
  39945. RAS Cycle CAS Cycle
  39946.  
  39947. A13
  39948.  
  39949. A12 A20 A20 A10 BANK selects bank address
  39950.  
  39951. A11 A19 H/L A9 Address precharge setting
  39952.  
  39953. A10 A18 0 A8 Address
  39954.  
  39955. A9 A17 A9 A7
  39956.  
  39957. A8 A16 A8 A6
  39958.  
  39959. A7 A15 A7 A5
  39960.  
  39961. A6 A14 A6 A4
  39962.  
  39963. A5 A13 A5 A3
  39964.  
  39965. A4 A12 A4 A2
  39966.  
  39967. A3 A11 A3 A1
  39968.  
  39969. A2 A10 A2 A0
  39970.  
  39971. A1 Not used
  39972.  
  39973. A0 Not used
  39974.  
  39975. Rev. 2.0, 02/99, page 810 of 830
  39976.  
  39977. ----------------------- Page 825-----------------------
  39978.  
  39979. Appendix G SH7750 On-Demand Data Transfer Mode
  39980.  
  39981. G.1 Pins in DDT Mode
  39982.  
  39983. Figure G.1 shows the system configuration in DDT mode.
  39984.  
  39985. DBREQ/DREQ0
  39986.  
  39987. BAVL/DRACK0
  39988.  
  39989. TR/DREQ1
  39990.  
  39991. TDACK/DACK0
  39992.  
  39993. SH7750 ID1, ID0/DRAK1, DACK1 External device
  39994.  
  39995. CLK
  39996.  
  39997. D63–D0
  39998.  
  39999. A25–A0, RAS, CAS, WE, DQMn, CKE
  40000.  
  40001. Synchronous
  40002. DRAM
  40003.  
  40004. Figure G.1 System Configuration in On-Demand Data Transfer Mode
  40005.  
  40006. • '%5(4 : Data bus release request signal for transmitting the data transfer request format
  40007. '%5(4
  40008. (DTR format) or a DMA request from an external device to the DMAC
  40009. If there is a wait for release of the data bus, an external device can have the data bus released
  40010. by asserting '%5(4. When '%5(4 is accepted, the BSC asserts %$9/.
  40011.  
  40012. • %$9/ : Data bus D63–D0 release signal
  40013. %$9/
  40014. Assertion of %$9/ means that the data bus will be released two cycles later.
  40015.  
  40016. • 75 : Transfer request signal
  40017. 75
  40018. Assertion of 75 has the following different meanings.
  40019.  In normal data transfer mode (except channel 0), 75 is asserted, and at the same time the
  40020. DTR format is output, two cycles after %$9/ is asserted.
  40021.  In the case of the handshake protocol without use of the data bus, asserting 75 enables a
  40022. transfer request to be issued for the channel for which a transfer request was made
  40023. immediately before. This function can be used only when %$9/ is not asserted two cycles
  40024. earlier.
  40025.  In the case of direct data transfer mode (valid only for channel 2), a direct transfer request
  40026. can be made to channel 2 by asserting '%5(4 and 75 simultaneously.
  40027.  
  40028. Rev. 2.0, 02/99, page 811 of 830
  40029.  
  40030. ----------------------- Page 826-----------------------
  40031.  
  40032. • 7'$&. : Reply strobe signal for external device from DMAC
  40033. 7'$&.
  40034. In the case of a read cycle, the SH7750 asserts 7'$&. in the same cycle in which valid read
  40035. data is carried. In the case of a write cycle, the SH7750 asserts 7'$&. two cycles before the
  40036. valid write data output cycle.
  40037.  
  40038. • ID1, ID0: Channel number notification signals
  40039.  00: Channel 0 (means demand data transfer)
  40040.  01: Channel 1
  40041.  10: Channel 2
  40042.  11: Channel 3
  40043.  
  40044. Data Transfer Request Format
  40045.  
  40046. 63 61 60 59 57 55 48 31 0
  40047.  
  40048. SZ ID MD COUNT (Reserved) ADDRESS
  40049.  
  40050. R/W
  40051.  
  40052. Figure G.2 Data Transfer Request Format
  40053.  
  40054. The data transfer request format (DTR format) consists of 64 bits. In the case of normal data
  40055. transfer mode (channel 0, except channel 0) and the handshake protocol using the data bus, the
  40056. transfer data size, read/write access, channel number, transfer request mode, number of transfers,
  40057. and transfer source or transfer destination address are specified. A specification in bits 47–32 is
  40058. invalid.
  40059.  
  40060. In normal data transfer mode (channel 0), only single address mode can be set. With the DTR
  40061. format, DS = (0: MD = 10, 11, 1: MD = 01), RL = 0, AL = 0, DM[1:0] = 01, SM[1:0] = 01,
  40062. RS[3:0] = (0010: R/W = 0, 0011: R/W = 1), TM = (0: MD = 11, 1: MD = 01, 10), TS[2:0] =
  40063. (SZ), and IE = 0 settings are made in DMA channel control register 0, COUNT is set in transfer
  40064. count register 0, and ADDRESS is set in source/destination address register 0. Therefore, in
  40065. DDT mode, the above control registers cannot be written to by the CPU, but can be read.
  40066.  
  40067. Rev. 2.0, 02/99, page 812 of 830
  40068.  
  40069. ----------------------- Page 827-----------------------
  40070.  
  40071. Bits 63 to 61: Transmit Size (SZ2–SZ0)
  40072. • 000: Byte size (8-bit) specification
  40073. • 001: Word size (16-bit) specification
  40074. • 010: Longword size (32-bit) specification
  40075. • 011: Quadword size (64-bit) specification
  40076. • 100: 32-byte block transfer specification
  40077. • 101: Reserved
  40078. • 110: Reserved
  40079. • 111: Transfer end specification
  40080.  
  40081. Bit 60: Read/Write (R/W)
  40082. • 0: Memory read specification
  40083. • 1: Memory write specification
  40084.  
  40085. Bits 59 and 58: Channel Number (ID1, ID0)
  40086. • 00: Channel 0 (demand data transfer)
  40087. • 01: Channel 1
  40088. • 10: Channel 2
  40089. • 11: Channel 3
  40090.  
  40091. Bits 57 and 56: Transfer Request Mode (MD1, MD0)
  40092. • 00: Handshake protocol (data bus used)
  40093. • 01: Burst mode (edge detection) specification
  40094. • 10: Burst mode (level detection) specification
  40095. • 11: Cycle steal mode specification
  40096.  
  40097. Bits 55 to 48: Transfer Count (COUNT7–COUNT0)
  40098. • 00000000: Maximum number of transfers (16M)
  40099.  
  40100. Bits 47 to 32: Reserved
  40101.  
  40102. Bits 31 to 0: Address (ADDRESS31–ADDRESS0)
  40103. • R/W = 0: Transfer source address specification
  40104. • R/W = 1: Transfer destination address specification
  40105.  
  40106. Notes: 1. Only the ID field is valid for channels 1 to 3.
  40107. 2. To start data transfer on channel 0, the initial value of MD in the DTR format must be
  40108. 01, 10, or 11.
  40109. 3. The COUNT field is ignored if MD = 00.
  40110. 4. In edge-sense burst mode, DMA transfer is executed continuously. In level-sense burst
  40111. mode and cycle steal mode, a handshake protocol is used to transfer each unit of data.
  40112.  
  40113. Rev. 2.0, 02/99, page 813 of 830
  40114.  
  40115. ----------------------- Page 828-----------------------
  40116.  
  40117. 5. The maximum number of transfers can be specified by setting COUNT = 0 as DTR
  40118. format initialization data. If the amount of data to be transferred is unknown, set
  40119. COUNT = 0, start DMA transfer, and transfer the DTR format (ID = 00, MD ≠ 00,
  40120. SZ = 111) when the required amount of data has been transferred. This will terminate
  40121. DMA transfer on channel 0.
  40122. In this case, the TE bit in DMA channel control register 0 is not set, but transfer
  40123. cannot be restarted.
  40124.  
  40125. G.2 Transfer Request Acceptance on Each Channel
  40126.  
  40127. On channel 0, a DMA data transfer request can be made by means of the DTR format. No further
  40128. transfer requests are accepted between DTR format acceptance and the end of the data transfer.
  40129.  
  40130. On channels 1 to 3, output a transfer request from an external device by means of the DTR
  40131. format (ID = 01, 10, or 11) after making DMAC control register settings in the same way as in
  40132. normal DMA mode. Each of channels 1 to 3 has a request queue that can accept up to four
  40133. transfer requests. When a request queue is full, the fifth and subsequent transfer requests will be
  40134. ignored, and so transfer requests must not be output.
  40135.  
  40136. CLK
  40137.  
  40138. DBREQ
  40139.  
  40140. BAVL
  40141.  
  40142. TR
  40143.  
  40144. A25–A0 RA CA
  40145.  
  40146.  
  40147. D63–D0 DTR D0 D1 D2 D3
  40148.  
  40149. RAS,
  40150. CAS, WE BA RD
  40151.  
  40152. TDACK
  40153.  
  40154. ID1, ID0 00
  40155.  
  40156. Figure G.3 Single Address Mode/Burst Mode/External Bus →→ External Device 32-Byte
  40157. Block Transfer/Channel 0 On-Demand Data Transfer
  40158.  
  40159. Rev. 2.0, 02/99, page 814 of 830
  40160.  
  40161. ----------------------- Page 829-----------------------
  40162.  
  40163. CLK
  40164.  
  40165. DBREQ
  40166.  
  40167. BAVL
  40168.  
  40169. TR
  40170.  
  40171. A25–A0 RA CA
  40172.  
  40173.  
  40174. D63–D0 DTR D0 D1 D2 D3
  40175.  
  40176. RAS,
  40177. BA WT
  40178. CAS, WE
  40179.  
  40180. TDACK
  40181.  
  40182. ID1, ID0
  40183.  
  40184. Figure G.4 Single Address Mode/Burst Mode/External Device →→ External Bus 32-Byte
  40185. Block Transfer/Channel 0 On-Demand Data Transfer
  40186.  
  40187. CLK
  40188.  
  40189. DBREQ
  40190.  
  40191. BAVL
  40192.  
  40193. TR
  40194.  
  40195. A25–A0 RA CA CA CA
  40196.  
  40197.  
  40198. D63–D0 DTR D0 D1
  40199.  
  40200. RAS,
  40201. BA RD RD RD
  40202. CAS, WE
  40203.  
  40204. DQMn
  40205.  
  40206. TDACK
  40207.  
  40208. ID1, ID0 00 00
  40209.  
  40210. Figure G.5 Single Address Mode/Burst Mode/External Bus →→ External Device 64-Bit
  40211. Transfer/Channel 0 On-Demand Data Transfer
  40212.  
  40213. Rev. 2.0, 02/99, page 815 of 830
  40214.  
  40215. ----------------------- Page 830-----------------------
  40216.  
  40217. CLK
  40218.  
  40219. DBREQ
  40220.  
  40221. BAVL
  40222.  
  40223. TR
  40224.  
  40225. A25–A0 RA CA CA
  40226.  
  40227.  
  40228. D63–D0 DTR D0 D1
  40229.  
  40230. RAS,
  40231. BA WT WT
  40232. CAS, WE
  40233.  
  40234. DQMn
  40235.  
  40236. TDACK
  40237.  
  40238. ID1, ID0
  40239.  
  40240. Figure G.6 Single Address Mode/Burst Mode/External Device →→ External Bus 64-Bit
  40241. Transfer/Channel 0 On-Demand Data Transfer
  40242.  
  40243. CLK
  40244.  
  40245. DBREQ
  40246.  
  40247. BAVL
  40248.  
  40249. TR
  40250.  
  40251. A25–A0 CA CA
  40252.  
  40253.  
  40254. D63–D0 DTR D0 D1 D2 D3 DTR D0 D1
  40255. MD = 10 or 11 MD = 00
  40256.  
  40257. CMD WT WT
  40258.  
  40259. TDACK
  40260.  
  40261. ID1, ID0
  40262.  
  40263. Start of data transfer Next transfer request
  40264.  
  40265.  
  40266.  
  40267. Figure G.7 Handshake Protocol Using Data Bus
  40268. (Channel 0 On-Demand Data Transfer)
  40269.  
  40270. Rev. 2.0, 02/99, page 816 of 830
  40271.  
  40272. ----------------------- Page 831-----------------------
  40273.  
  40274. CLK
  40275.  
  40276. DBREQ
  40277.  
  40278. BAVL
  40279.  
  40280. TR
  40281.  
  40282. A25–A0 CA CA
  40283.  
  40284.  
  40285. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  40286. MD = 10 or 11
  40287.  
  40288. CMD WT WT
  40289.  
  40290. TDACK
  40291.  
  40292. ID1, ID0
  40293.  
  40294. Start of data transfer Next transfer request
  40295.  
  40296.  
  40297.  
  40298. Figure G.8 Handshake Protocol without Use of Data Bus
  40299. (Channel 0 On-Demand Data Transfer)
  40300.  
  40301. Rev. 2.0, 02/99, page 817 of 830
  40302.  
  40303. ----------------------- Page 832-----------------------
  40304.  
  40305. CLK
  40306.  
  40307. DBREQ
  40308.  
  40309. BAVL
  40310.  
  40311. TR
  40312.  
  40313. A25–A0 RA CA
  40314.  
  40315. D63–D0 D0 D1 D2 D3
  40316.  
  40317. RAS, CAS,
  40318. BA RD
  40319. WE
  40320.  
  40321. Figure G.9 Read from Synchronous DRAM Precharge Bank
  40322.  
  40323. CLK
  40324.  
  40325. DBREQ
  40326.  
  40327. Transfer requests can be accepted
  40328.  
  40329. BAVL
  40330.  
  40331. TR
  40332.  
  40333. A25–A0 RA CA
  40334.  
  40335. D63–D0 D0 D1 D2 D3
  40336.  
  40337. RAS, CAS,
  40338. PCH BA RD
  40339. WE
  40340.  
  40341. Figure G.10 Read from Synchronous DRAM Non-Precharge Bank (Row Miss)
  40342.  
  40343. Rev. 2.0, 02/99, page 818 of 830
  40344.  
  40345. ----------------------- Page 833-----------------------
  40346.  
  40347. CLK
  40348.  
  40349. DBREQ
  40350.  
  40351. BAVL
  40352.  
  40353. TR
  40354.  
  40355. A25–A0 CA
  40356.  
  40357. D63–D0 D0 D1 D2 D3
  40358.  
  40359. RAS, CAS,
  40360. RD
  40361. WE
  40362.  
  40363. Figure G.11 Read from Synchronous DRAM (Row Hit)
  40364.  
  40365. CLK
  40366.  
  40367. DBREQ
  40368.  
  40369. BAVL
  40370.  
  40371. TR
  40372.  
  40373. A25–A0 RA CA
  40374.  
  40375. D63–D0 D0 D1 D2 D3
  40376.  
  40377. RAS, CAS,
  40378. BA WT
  40379. WE
  40380.  
  40381. Figure G.12 Write to Synchronous DRAM Precharge Bank
  40382.  
  40383. Rev. 2.0, 02/99, page 819 of 830
  40384.  
  40385. ----------------------- Page 834-----------------------
  40386.  
  40387. CLK
  40388.  
  40389. DBREQ
  40390.  
  40391. Transfer requests can be accepted
  40392.  
  40393. BAVL
  40394.  
  40395. TR
  40396.  
  40397. A25–A0 RA CA
  40398.  
  40399. D63–D0 D0 D1 D2 D3
  40400.  
  40401. RAS, CAS,
  40402. PCH BA WT
  40403. WE
  40404.  
  40405. Figure G.13 Write to Synchronous DRAM Non-Precharge Bank (Row Miss)
  40406.  
  40407. CLK
  40408.  
  40409. DBREQ
  40410.  
  40411. BAVL
  40412.  
  40413. TR
  40414.  
  40415. A25–A0 CA
  40416.  
  40417. D63–D0 D0 D1 D2 D3
  40418.  
  40419. RAS, CAS,
  40420. WT
  40421. WE
  40422.  
  40423. Figure G.14 Write to Synchronous DRAM (Row Hit)
  40424.  
  40425. Rev. 2.0, 02/99, page 820 of 830
  40426.  
  40427. ----------------------- Page 835-----------------------
  40428.  
  40429. CLK
  40430.  
  40431. DBREQ
  40432.  
  40433. BAVL
  40434.  
  40435. TR
  40436.  
  40437. A25–A0 RA CA
  40438.  
  40439.  
  40440. D63–D0 DTR D0 D1 D2
  40441.  
  40442. RAS,
  40443. BA RD
  40444. CAS, WE
  40445.  
  40446. TDACK
  40447.  
  40448. ID1, ID0 00
  40449.  
  40450. Figure G.15 Single Address Mode/Burst Mode/External Bus →→ External Device 32-Byte
  40451. Block Transfer/Channel 0 On-Demand Data Transfer
  40452.  
  40453. Rev. 2.0, 02/99, page 821 of 830
  40454.  
  40455. ----------------------- Page 836-----------------------
  40456.  
  40457. DMA Operation Register (DMAOR)
  40458.  
  40459. 31 15 9 8 2 1 0
  40460.  
  40461. PR[1:0] AE
  40462. DDT NMIF
  40463.  
  40464. DDT: 0: Normal DMA mode DME
  40465. 1: On-demand data transfer mode
  40466.  
  40467. Figure G.16 DDT Mode Setting
  40468.  
  40469. CLK
  40470.  
  40471. DBREQ
  40472.  
  40473. BAVL
  40474. No DMA request sampling
  40475.  
  40476. TR
  40477.  
  40478. A25–A0 CA CA
  40479.  
  40480.  
  40481. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3 D1 D2 D3
  40482. MD = 01
  40483.  
  40484. CMD WT WT
  40485.  
  40486. TDACK
  40487.  
  40488. ID1, ID0
  40489.  
  40490. Start of data transfer
  40491.  
  40492. Figure G.17 Single Address Mode/Burst Mode/Edge Detection/
  40493. External Device →→ External Bus Data Transfer
  40494.  
  40495. Rev. 2.0, 02/99, page 822 of 830
  40496.  
  40497. ----------------------- Page 837-----------------------
  40498.  
  40499. CLK
  40500.  
  40501. DBREQ
  40502.  
  40503. BAVL
  40504. Wait for next DMA request
  40505.  
  40506. TR
  40507.  
  40508. A25–A0 CA CA
  40509.  
  40510.  
  40511. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  40512. MD = 10
  40513.  
  40514. CMD RD RD
  40515.  
  40516. TDACK
  40517.  
  40518. ID1, ID0
  40519.  
  40520. Start of data transfer
  40521.  
  40522. Figure G.18 Single Address Mode/Burst Mode/Level Detection/
  40523. External Bus →→ External Device Data Transfer
  40524.  
  40525. CLK
  40526.  
  40527. DBREQ
  40528.  
  40529. BAVL
  40530.  
  40531. TR
  40532.  
  40533. A25–A0 CA CA CA
  40534.  
  40535.  
  40536. D63–D0 DTR D0 D2 D3
  40537. MD = 01 Idle cycle Idle cycle Idle cycle
  40538.  
  40539. CMD RD RD RD
  40540.  
  40541. DQMn
  40542.  
  40543. TDACK
  40544.  
  40545. ID1, ID0
  40546.  
  40547. Figure G.19 Single Address Mode/Burst Mode/Edge Detection/Byte, Word, Longword,
  40548. Quadword/External Bus →→ External Device Data Transfer
  40549.  
  40550. Rev. 2.0, 02/99, page 823 of 830
  40551.  
  40552. ----------------------- Page 838-----------------------
  40553.  
  40554. CLK
  40555.  
  40556. DBREQ
  40557.  
  40558. BAVL
  40559.  
  40560. TR
  40561.  
  40562. A25–A0 CA CA CA
  40563.  
  40564.  
  40565. D63–D0 DTR D0 D1 D3
  40566.  
  40567. MD = 01
  40568.  
  40569. CMD WT WT WT
  40570.  
  40571. DQMn
  40572. Idle cycle Idle cycle Idle cycle
  40573.  
  40574. TDACK
  40575.  
  40576. ID1, ID0
  40577.  
  40578. Figure G.20 Single Address Mode/Burst Mode/Edge Detection/Byte, Word, Longword,
  40579. Quadword/External Device →→ External Bus Data Transfer
  40580.  
  40581. Rev. 2.0, 02/99, page 824 of 830
  40582.  
  40583. ----------------------- Page 839-----------------------
  40584.  
  40585. CLK
  40586.  
  40587. DBREQ
  40588.  
  40589. BAVL
  40590.  
  40591. TR
  40592.  
  40593. A25–A0 RA CA
  40594.  
  40595.  
  40596. D63–D0 DTR D0 D1 D2 D3
  40597.  
  40598. ID = 1, 2, or 3
  40599. RAS,
  40600. BA RD
  40601. CAS, WE
  40602.  
  40603. TDACK
  40604.  
  40605. ID1, ID0 01 or 10 or 11
  40606.  
  40607. Figure G.21 Single Address Mode/Burst Mode/32-Byte Block Transfer/DMA Transfer
  40608. Request to Channels 1–3 Using Data Bus
  40609.  
  40610. Rev. 2.0, 02/99, page 825 of 830
  40611.  
  40612. ----------------------- Page 840-----------------------
  40613.  
  40614. CLK
  40615.  
  40616. DBREQ
  40617.  
  40618. BAVL
  40619.  
  40620. TR
  40621.  
  40622. A25–A0 RA CA
  40623.  
  40624.  
  40625. D63–D0 D0 D1 D2 D3
  40626.  
  40627. RAS,
  40628. BA RD
  40629. CAS, WE
  40630.  
  40631. TDACK
  40632.  
  40633. ID1, ID0 10
  40634.  
  40635. No DTR cycle, so requests can be made at any time
  40636.  
  40637. Figure G.22 Single Address Mode/Burst Mode/32-Byte Block Transfer/
  40638. External Bus →→ External Device Data Transfer/
  40639. Direct Data Transfer Request to Channel 2 without Using Data Bus
  40640.  
  40641. Rev. 2.0, 02/99, page 826 of 830
  40642.  
  40643. ----------------------- Page 841-----------------------
  40644.  
  40645. Four requests can be queued Handshaking is necessary
  40646. to send additional requests
  40647.  
  40648. CLK
  40649.  
  40650. 3rd 4th 5th
  40651.  
  40652. DBREQ
  40653.  
  40654. BAVL
  40655. No more requests
  40656.  
  40657. TR
  40658.  
  40659. A25–A0 RA CA CA CA
  40660.  
  40661. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  40662.  
  40663. RAS,
  40664. CAS, WE BA RD RD RD NOP
  40665.  
  40666. TDACK
  40667.  
  40668. ID1, ID0
  40669.  
  40670. Must be ignored
  40671. (no request transmitted)
  40672.  
  40673. Figure G.23 Single Address Mode/Burst Mode/External Bus →→ External Device Data
  40674. Transfer/Direct Data Transfer Request to Channel 2
  40675.  
  40676. Rev. 2.0, 02/99, page 827 of 830
  40677.  
  40678. ----------------------- Page 842-----------------------
  40679.  
  40680. Four requests can be queued Handshaking is necessary
  40681. to send additional requests
  40682.  
  40683. CLK
  40684.  
  40685. 3rd 4th 5th
  40686.  
  40687. DBREQ
  40688.  
  40689. BAVL
  40690.  
  40691. TR
  40692.  
  40693. A25–A0 RA CA CA CA
  40694.  
  40695. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  40696.  
  40697. RAS,
  40698. BA WT WT WT NOP
  40699. CAS, WE
  40700.  
  40701. TDACK
  40702.  
  40703. ID1, ID0
  40704.  
  40705. Must be ignored
  40706. (no request transmitted)
  40707.  
  40708.  
  40709. Figure G.24 Single Address Mode/Burst Mode/External Device →→ External Bus Data
  40710. Transfer/Direct Data Transfer Request to Channel 2
  40711.  
  40712. Rev. 2.0, 02/99, page 828 of 830
  40713.  
  40714. ----------------------- Page 843-----------------------
  40715.  
  40716. Four requests can be queued Handshaking is necessary
  40717. to send additional requests
  40718.  
  40719. CLK
  40720.  
  40721. 3rd 4th 5th
  40722.  
  40723. DBREQ
  40724.  
  40725. BAVL
  40726.  
  40727. TR
  40728.  
  40729. A25–A0 CA CA CA
  40730.  
  40731. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  40732.  
  40733. RAS,
  40734. RD RD RD NOP
  40735. CAS, WE
  40736.  
  40737. TDACK
  40738.  
  40739. ID1, ID0
  40740.  
  40741. Must be ignored
  40742. (no request transmitted)
  40743.  
  40744. Figure G.25 Single Address Mode/Burst Mode/External Bus →→ External Device Data
  40745. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  40746.  
  40747. Rev. 2.0, 02/99, page 829 of 830
  40748.  
  40749. ----------------------- Page 844-----------------------
  40750.  
  40751. Four requests can be queued
  40752. Handshaking is necessary
  40753. to send additional requests
  40754.  
  40755. CLK
  40756.  
  40757. 3rd 4th 5th
  40758.  
  40759. DBREQ
  40760.  
  40761. BAVL
  40762.  
  40763. TR
  40764.  
  40765. A25–A0 CA CA CA
  40766.  
  40767. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  40768.  
  40769. RAS,
  40770. WT WT WT NOP
  40771. CAS, WE
  40772.  
  40773. TDACK
  40774.  
  40775. ID1, ID0
  40776.  
  40777. Must be ignored
  40778. (no request transmitted)
  40779.  
  40780. Figure G.26 Single Address Mode/Burst Mode/External Device →→ External Bus Data
  40781. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  40782.  
  40783. Rev. 2.0, 02/99, page 830 of 830
Advertisement
Add Comment
Please, Sign In to add comment