Advertisement
atreyu187

Dreamcast Guides : SH-4 Hardware Manual

Jan 4th, 2013
336
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.  
  12174. Internal clock
  12175.  
  12176. TCNT N + 1 N N – 1
  12177.  
  12178. Figure 12.4 Count Timing when Operating on Internal Clock
  12179.  
  12180. • Operating on external clock
  12181. External clock pin (TCLK) input can be selected as the timer clock by means of the TPSC2–
  12182. TPSC0 bits in TCR. The detected edge (rising, falling, or both edges) can be selected with
  12183. the CKEG1 and CKEG0 bits in TCR.
  12184. Figure 12.5 shows the timing for both-edge detection.
  12185.  
  12186.  
  12187. External clock
  12188. input pin
  12189.  
  12190. TCNT N + 1 N N – 1
  12191.  
  12192. Figure 12.5 Count Timing when Operating on External Clock
  12193.  
  12194. Rev. 2.0, 02/99, page 259 of 830
  12195.  
  12196. ----------------------- Page 274-----------------------
  12197.  
  12198. • Operating on on-chip RTC output clock
  12199. The on-chip RTC output clock can be selected as the timer clock by means of the TPSC2–
  12200. TPSC0 bits in TCR. Figure 12.6 shows the timing in this case.
  12201.  
  12202. RTC output clock
  12203.  
  12204. TCNT N + 1 N N – 1
  12205.  
  12206. Figure 12.6 Count Timing when Operating on On-Chip RTC Output Clock
  12207.  
  12208. 12.3.2 Input Capture Function
  12209.  
  12210. Channel 2 has an input capture function.
  12211.  
  12212. The procedure for using the input capture function is as follows:
  12213.  
  12214. 1. Use the TCOE bit in the timer output control register (TOCR) to set the TCLK pin to input
  12215. mode.
  12216. 2. Use bits TPSC2–TPSC0 in the timer control register (TCR) to set an internal clock or the on-
  12217. chip RTC output clock as the timer operating clock.
  12218. 3. Use bits IPCE1 and IPCE0 in TCR to specify use of the input capture function, and whether
  12219. interrupts are to generated when this function is used.
  12220. 4. Use bits CKEG1 and CKEG0 in TCR to specify whether the rising or falling edge of the
  12221. TCLK signal is to be used to set the timer counter (TCNT) value in the input capture register
  12222. (TCPR2).
  12223.  
  12224. This function cannot be used in standby mode.
  12225.  
  12226. When input capture occurs, the TCNT2 value is set in TCPR2 only when the ICPF bit in TCR2
  12227. is 0. Also, a new DMAC transfer request is not generated until processing of the previous request
  12228. is finished.
  12229.  
  12230. Rev. 2.0, 02/99, page 260 of 830
  12231.  
  12232. ----------------------- Page 275-----------------------
  12233.  
  12234. Figure 12.7 shows the operation timing when the input capture function is used (with TCLK
  12235. rising edge detection).
  12236.  
  12237. TCOR value set in TCNT
  12238. TCNT value on underflow
  12239.  
  12240. TCOR
  12241.  
  12242. H'00000000 Time
  12243.  
  12244. TCLK
  12245.  
  12246. TCPR2 TCNT value set
  12247.  
  12248. TICPI2
  12249.  
  12250. Figure 12.7 Operation Timing when Using Input Capture Function
  12251.  
  12252. Rev. 2.0, 02/99, page 261 of 830
  12253.  
  12254. ----------------------- Page 276-----------------------
  12255.  
  12256. 12.4 Interrupts
  12257.  
  12258. There are four TMU interrupt sources, comprising underflow interrupts and the input capture
  12259. interrupt (when the input capture function is used). Underflow interrupts are generated on
  12260. channels 0 to 2, and input capture interrupts on channel 2 only.
  12261.  
  12262. An underflow interrupt request is generated (for each channel) according to the AND of UNF
  12263. and the interrupt enable bit (UNIE) in TCR.
  12264.  
  12265. When the input capture function is used and an input capture request is generated, an interrupt is
  12266. requested if the input capture input flag (ICPF) in TCR2 is 1 and the input capture control bits
  12267. (ICPE1, ICPE0) in TCR2 are 11.
  12268.  
  12269. The TMU interrupt sources are summarized in table 12.3.
  12270.  
  12271. Table 12.3 TMU Interrupt Sources
  12272.  
  12273. Channel Interrupt Source Description Priority
  12274.  
  12275. 0 TUNI0 Underflow interrupt 0 High
  12276.  
  12277. 1 TUNI1 Underflow interrupt 1 ↑
  12278.  
  12279. 2 TUNI2 Underflow interrupt 2 ↓
  12280.  
  12281. TICPI2 Input capture interrupt 2 Low
  12282.  
  12283. Rev. 2.0, 02/99, page 262 of 830
  12284.  
  12285. ----------------------- Page 277-----------------------
  12286.  
  12287. 12.5 Usage Notes
  12288.  
  12289. 12.5.1 Register Writes
  12290.  
  12291. When performing a register write, timer count operation must be stopped by clearing the start bit
  12292. (STR0–STR2) for the relevant channel in the timer start register (TSTR).
  12293.  
  12294. 12.5.2 TCNT Register Reads
  12295.  
  12296. When performing a TCNT register read, processing for synchronization with the timer count
  12297. operation is performed. If a timer count operation and register read processing are performed
  12298. simultaneously, the TCNT counter value prior to the count-down operation is read by means of
  12299. the synchronization processing.
  12300.  
  12301. 12.5.3 Resetting the RTC Frequency Divider
  12302.  
  12303. When the on-chip RTC output clock is selected as the count clock, the RTC frequency divider
  12304. should be reset.
  12305.  
  12306. 12.5.4 External Clock Frequency
  12307.  
  12308. Ensure that the external clock frequency for any channel does not exceed Pφ/4.
  12309.  
  12310. Rev. 2.0, 02/99, page 263 of 830
  12311.  
  12312. ----------------------- Page 278-----------------------
  12313.  
  12314. Rev. 2.0, 02/99, page 264 of 830
  12315.  
  12316. ----------------------- Page 279-----------------------
  12317.  
  12318. Section 13 Bus State Controller (BSC)
  12319.  
  12320. 13.1 Overview
  12321.  
  12322. The functions of the bus state controller (BSC) include division of the physical address space,
  12323. and output of control signals in accordance with various types of memory and bus interface
  12324. specifications. The BSC functions allow DRAM, synchronous DRAM, SRAM, ROM, etc., to be
  12325. connected directly to the SH7750 without the use of external circuitry, and also support the
  12326. PCMCIA interface protocol, enabling system design to be simplified and data transfers to be
  12327. carried out at high speed by a compact system.
  12328.  
  12329. 13.1.1 Features
  12330.  
  12331. The BSC has the following features:
  12332.  
  12333. • Physical address space is managed as 7 independent areas
  12334.  Maximum 64 Mbytes for each of areas 0 to 6
  12335.  Bus width of each area can be set in a register (except area 0, which uses an external pin
  12336. setting)
  12337.  Wait state insertion by 5'< pin
  12338.  Wait state insertion can be controlled by program
  12339.  Specification of types of memory connectable to each area
  12340.  Output of control signals allowing direct connection of memory to each area
  12341.  Automatic wait cycle insertion to prevent data bus collisions in case of consecutive
  12342. memory accesses to different areas, or a read access followed by a write access to the
  12343. same area
  12344.  Write strobe setup time and hold time periods can be inserted in a write cycle to enable
  12345. connection to low-speed memory
  12346. • Normal memory (SRAM) interface
  12347.  Wait state insertion can be controlled by program
  12348.  Wait state insertion by 5'< pin
  12349. Connectable areas: 0 to 6
  12350. Settable bus widths: 64, 32, 16, 8
  12351. • DRAM interface
  12352.  Row address/column address multiplexing according to DRAM capacity
  12353.  Burst operation (fast page mode, EDO mode)
  12354.  CAS-before-RAS refresh and self-refresh
  12355.  8-CAS byte control for power-down operation
  12356.  DRAM connection control signal timing can be controlled by register settings
  12357.  
  12358. Rev. 2.0, 02/99, page 265 of 830
  12359.  
  12360. ----------------------- Page 280-----------------------
  12361.  
  12362.  Consecutive accesses to the same row address
  12363. Connectable areas: 2, 3
  12364. Settable bus widths: 64, 32, 16
  12365. • Synchronous DRAM interface
  12366.  Row address/column address multiplexing according to synchronous DRAM capacity
  12367.  Burst operation
  12368.  Auto-refresh and self-refresh
  12369.  Synchronous DRAM connection control signal timing can be controlled by register
  12370. settings
  12371.  Consecutive accesses to the same row address
  12372. Connectable areas: 2, 3
  12373. Settable bus widths: 64, 32
  12374. • Burst ROM interface
  12375.  Wait state insertion can be controlled by program
  12376.  Burst operation, executing the number of transfers set in a register
  12377. Connectable areas: 0, 5, 6
  12378. Settable bus widths: 32, 16, 8
  12379. • MPX bus interface
  12380.  Address/data multiplexing
  12381. Connectable areas: 0 to 6
  12382. Settable bus widths: 64, 32
  12383. • Byte control SRAM interface
  12384.  SRAM interface with byte control
  12385. Connectable areas: 1, 4
  12386. Settable bus widths: 64, 32, 16
  12387. • PCMCIA interface
  12388.  Wait state insertion can be controlled by program
  12389.  Bus sizing function for I/O bus width
  12390. • Fine refreshing control
  12391.  Supports refresh operation immediately after self-refresh operation in low-power DRAM
  12392. by means of refresh counter overflow interrupt function
  12393. • Refresh counter can be used as interval timer
  12394.  Interrupt request generated by compare-match
  12395.  Interrupt request generated by refresh counter overflow
  12396.  
  12397. Rev. 2.0, 02/99, page 266 of 830
  12398.  
  12399. ----------------------- Page 281-----------------------
  12400.  
  12401. 13.1.2 Block Diagram
  12402.  
  12403. Figure 13.1 shows a block diagram of the BSC.
  12404.  
  12405. s
  12406. u
  12407. b
  12408.  
  12409. l
  12410. a
  12411. n
  12412. r
  12413. e
  12414. Bus t
  12415. n
  12416. I
  12417. interface
  12418.  
  12419. WCR1
  12420. Wait
  12421. RDY
  12422. control unit WCR2
  12423.  
  12424. WCR3
  12425.  
  12426. CS6–CS0 Area BCR1
  12427. CE2A–CE2B control unit
  12428.  
  12429. BCR2
  12430. BS
  12431. RD
  12432. RD/WR MCR s
  12433. u
  12434. b
  12435. WE7–WE0
  12436. e
  12437. l
  12438. RAS u
  12439. d
  12440. CAS, CASxx Memory o
  12441. CKE control unit M
  12442. ICIORD, ICIOWR PCR
  12443.  
  12444. REG
  12445. IOIS16 RFCR
  12446.  
  12447. s
  12448. u
  12449. b RTCNT
  12450.  
  12451. l
  12452. a
  12453. r
  12454. e
  12455. Interrupt h Refresh
  12456. p Comparator
  12457. i
  12458. controller r control unit
  12459. e
  12460. P
  12461.  
  12462. RTCOR
  12463.  
  12464. RTCSR
  12465.  
  12466. BSC
  12467.  
  12468. WCR: Wait control register RFCR: Refresh count register
  12469. BCR: Bus control register RTCNT: Refresh timer count register
  12470. MCR: Memory control register RTCOR: Refresh time constant register
  12471. PCR: PCMCIA control register RTCSR: Refresh timer control/status register
  12472.  
  12473. Figure 13.1 Block Diagram of BSC
  12474.  
  12475. Rev. 2.0, 02/99, page 267 of 830
  12476.  
  12477. ----------------------- Page 282-----------------------
  12478.  
  12479. 13.1.3 Pin Configuration
  12480.  
  12481. Table 13.1 shows the BSC pin configuration.
  12482.  
  12483. Table 13.1 BSC Pins
  12484.  
  12485. Name Signals I/O Description
  12486.  
  12487. Address bus A25–A0 O Address output
  12488.  
  12489. Data bus D63–D52, I/O Data input/output
  12490. D51–D32
  12491. When port functions are used, D51–D32 cannot be
  12492. used. Leave open.
  12493.  
  12494. Data bus/port D51–D32/ I/O When port functions are not used: data input/output
  12495. PORT19–
  12496. When port functions are used: input/output port
  12497. PORT0
  12498. (input or output set for each bit by register)
  12499.  
  12500. Bus cycle start %6 O Signal that indicates the start of a bus cycle
  12501.  
  12502. When using synchronous DRAM: asserted once for
  12503. a burst transfer
  12504.  
  12505. For other burst transfers: asserted each data cycle
  12506.  
  12507. Chip select 6–0 &6–&6 O Chip select signals that indicate the area being
  12508. accessed
  12509.  
  12510. &6 and &6 are also used as PCMCIA &($ and
  12511. &(%
  12512.  
  12513. Read/write RD/:5 O Data bus input/output direction designation signal
  12514.  
  12515. Also used as the DRAM/synchronous
  12516. DRAM/PCMCIA write designation signal
  12517.  
  12518. Row address 5$6 O 5$6 signal when using DRAM/synchronous DRAM
  12519. strobe
  12520.  
  12521. Read/column 5'/&$66/ O Strobe signal that indicates a read cycle
  12522. address strobe/ )5$0(
  12523. When using synchronous DRAM: &$6 signal
  12524. cycle frame
  12525. When using MPX bus: )5$0( signal
  12526.  
  12527. Data enable 0 :(/&$6/ O When using synchronous DRAM: selection signal
  12528. DQM0 for D7–D0
  12529.  
  12530. When using DRAM: &$6 signal for D7–D0
  12531.  
  12532. In other cases: write strobe signal for D7–D0
  12533.  
  12534. Data enable 1 :(/&$6/ O When using synchronous DRAM: selection signal
  12535. DQM1 for D15–D8
  12536.  
  12537. When using DRAM: &$6 signal for D15–D8
  12538.  
  12539. When using PCMCIA: write strobe signal
  12540.  
  12541. In other cases: write strobe signal for D15–D8
  12542.  
  12543. Rev. 2.0, 02/99, page 268 of 830
  12544.  
  12545. ----------------------- Page 283-----------------------
  12546.  
  12547. Table 13.1 BSC Pins (cont)
  12548.  
  12549. Name Signals I/O Description
  12550.  
  12551. Data enable 2 :(/&$6/ O When using synchronous DRAM: selection signal
  12552. DQM2/,&,25' for D23–D16
  12553.  
  12554. When using DRAM: &$6 signal for D23–D16
  12555.  
  12556. When using PCMCIA: ,&,25' signal
  12557.  
  12558. In other cases: write strobe signal for D23–D16
  12559.  
  12560. Data enable 3 :(/&$6/ O When using synchronous DRAM: selection signal
  12561. DQM3/,&,2:5 for D31–D24
  12562.  
  12563. When using DRAM: &$6 signal for D31–D24
  12564.  
  12565. When using PCMCIA: ,&,2:5 signal
  12566.  
  12567. In other cases: write strobe signal for D31–D24
  12568.  
  12569. Data enable 4 :(/&$6/ O When using synchronous DRAM: selection signal
  12570. DQM4 for D39–D32
  12571.  
  12572. When using DRAM: &$6 signal for D39–D32
  12573.  
  12574. In other cases: write strobe signal for D39–D32
  12575.  
  12576. Data enable 5 :(/&$6/ O When using synchronous DRAM: selection signal
  12577. DQM5 for D47–D40
  12578.  
  12579. When using DRAM: &$6 signal for D47–D40
  12580.  
  12581. In other cases: write strobe signal for D47–D40
  12582.  
  12583. Data enable 6 :(/&$6/ O When using synchronous DRAM: selection signal
  12584. DQM6 for D55–D48
  12585.  
  12586. When using DRAM: &$6 signal for D55–D48
  12587.  
  12588. In other cases: write strobe signal for D55–D48
  12589.  
  12590. Data enable 7 :(/&$6/ O When using synchronous DRAM: selection signal
  12591. DQM7/5(* for D63–D56
  12592.  
  12593. When using DRAM: &$6 signal for D63–D56
  12594.  
  12595. When using PCMCIA: 5(* signal
  12596.  
  12597. In other cases: write strobe signal for D63–D56
  12598.  
  12599. Ready 5'< I Wait state request signal
  12600.  
  12601. Area 0 MPX bus MD6/,2,6 I In power-on reset: Designates area 0 bus as MPX
  12602. specification/16-bit bus (1: SRAM, 0: MPX)
  12603. I/O
  12604. When using PCMCIA: 16-bit I/O designation signal.
  12605. Valid only in little-endian mode.
  12606.  
  12607. Clock enable CKE O Synchronous DRAM clock enable control signal
  12608.  
  12609. Bus release %5(4/ I Bus release request signal/bus acknowledge signal
  12610. request %6$&.
  12611.  
  12612. Rev. 2.0, 02/99, page 269 of 830
  12613.  
  12614. ----------------------- Page 284-----------------------
  12615.  
  12616. Table 13.1 BSC Pins (cont)
  12617.  
  12618. Name Signals I/O Description
  12619.  
  12620. Bus use %$&./ O Bus use permission signal/bus request
  12621. permission %65(4
  12622. Area 0 bus MD3/&($*1 I/O In power-on reset: external space area 0 bus width
  12623.  
  12624. width/PCMCIA MD4/&(%*2 specification signal
  12625. card select When using PCMCIA: &($ , &(%
  12626.  
  12627. Endian switchover/ MD5/5$6*3 I/O Endian specification in a power-on reset.
  12628.  
  12629. row address strobe 5$6 when DRAM is connected to area 2
  12630.  
  12631. Master/slave MD7/TXD I/O Indicates master/slave status in a power-on reset.
  12632. switchover
  12633. Serial interface TXD
  12634.  
  12635. DMAC0 DACK0 O DMAC channel 0 data acknowledge
  12636. acknowledge
  12637. signal
  12638.  
  12639. DMAC1 DACK1 O DMAC channel 1 data acknowledge
  12640. acknowledge
  12641. signal
  12642.  
  12643. Read/column 5' O Same signal as 5'/&$66/)5$0(
  12644. address strobe/ This signal is used when the 5'/&$66/)5$0(
  12645. cycle frame 2 signal load is heavy.
  12646.  
  12647. Read/write 2 RD/:5 O Same signal as RD/:5
  12648.  
  12649. This signal is used when the RD/:5 signal load is
  12650. heavy.
  12651.  
  12652. Notes: 1. MD3/&($ input/output switching is performed by BCR1.A56PCM. Output is selected
  12653. when BCR1.A56PCM = 1.
  12654. 2. MD4/&(% input/output switching is performed by BCR1.A56PCM. Output is selected
  12655. when BCR1.A56PCM = 1.
  12656. 3. MD5/5$6 input/output switching is performed by BCR1.DRAMTP. Output is selected
  12657. when BCR1.DRAMTP (2–0) = 101.
  12658.  
  12659. Rev. 2.0, 02/99, page 270 of 830
  12660.  
  12661. ----------------------- Page 285-----------------------
  12662.  
  12663. 13.1.4 Register Configuration
  12664.  
  12665. The BSC has the 11 registers shown in table 13.2. In addition, the synchronous DRAM mode
  12666. register incorporated in synchronous DRAM can also be accessed as an SH7750 register. The
  12667. functions of these registers include control of direct interfaces to various types of memory, wait
  12668. states, and refreshing.
  12669.  
  12670. Table 13.2 BSC Registers
  12671.  
  12672. Abbrevia- R/W Initial P4 Area 7 Access
  12673. Name tion Value Address Address Size
  12674.  
  12675. Bus control register 1 BCR1 R/W H'0000 0000 H'FF80 0000 H'1F80 0000 32
  12676.  
  12677. Bus control register 2 BCR2 R/W H'3FFC H'FF80 0004 H'1F80 0004 16
  12678.  
  12679. Wait state control WCR1 R/W H'7777 7777 H'FF80 0008 H'1F80 0008 32
  12680. register 1
  12681.  
  12682. Wait state control WCR2 R/W H'FFFE EFFF H'FF80 000C H'1F80 000C 32
  12683. register 2
  12684.  
  12685. Wait state control WCR3 R/W H'0777 7777 H'FF80 0010 H'1F80 0010 32
  12686. register 3
  12687.  
  12688. Memory control register MCR R/W H'0000 0000 H'FF80 0014 H'1F80 0014 32
  12689.  
  12690. PCMCIA control register PCR R/W H'0000 H'FF80 0018 H'1F80 0018 16
  12691.  
  12692. Refresh timer RTCSR R/W H'0000 H'FF80 001C H'1F80 001C 16
  12693. control/status register
  12694.  
  12695. Refresh timer counter RTCNT R/W H'0000 H'FF80 0020 H'1F80 0020 16
  12696.  
  12697. Refresh time constant RTCOR R/W H'0000 H'FF80 0024 H'1F80 0024 16
  12698. counter
  12699.  
  12700. Refresh count register RFCR R/W H'0000 H'FF80 0028 H'1F80 0028 16
  12701.  
  12702. Synchronous For SDMR2 W — H'FF90 xxxx* H'1F90 xxxx 8
  12703. DRAM mode area 2
  12704. registers
  12705.  
  12706. For SDMR3 H'FF94 xxxx* H'1F94 xxxx
  12707. area 3
  12708.  
  12709. Note: * For details, see section 13.2.8, Synchronous DRAM Mode Registers.
  12710.  
  12711. Rev. 2.0, 02/99, page 271 of 830
  12712.  
  12713. ----------------------- Page 286-----------------------
  12714.  
  12715. 13.1.5 Overview of Areas
  12716.  
  12717. Space Divisions: The architecture of the SH7750 provides a 32-bit virtual address space. The
  12718. virtual space is divided into five areas according to the upper address value. External space
  12719. comprises a 29-bit address space, divided into eight areas.
  12720.  
  12721. The virtual space can be allocated to any external space by means of the memory management
  12722. unit (MMU). Details are given in section 3, Memory Management Unit (MMU). This section
  12723. describes the areas into which the external space is divided.
  12724.  
  12725. With the SH7750, various kinds of memory or PC cards can be connected to the seven areas of
  12726. external space as shown in table 13.3, and chip select signals (&6–&6, &($, &(%) are
  12727. output for each of these areas. &6 is asserted when accessing area 0, and &6 when accessing
  12728. area 6. When DRAM or synchronous DRAM is connected to area 2 or 3, signals such as 5$6,
  12729. &$6, RD/:5, and DQM are also asserted. When the PCMCIA interface is selected for area 5 or
  12730. 6, &($/&(% is asserted in addition to &6/&6 for the byte to be accessed.
  12731.  
  12732. 256
  12733.  
  12734. H'0000 0000 Area 0 (CS0) H'0000 0000
  12735.  
  12736. Area 1 (CS1) H'0400 0000
  12737.  
  12738. P0 and P0 and Area 2 (CS2) H'0800 0000
  12739. U0 areas U0 areas
  12740. Area 3 (CS3) H'0C00 0000
  12741.  
  12742. Area 4 (CS4) H'1000 0000
  12743.  
  12744. Area 5 (CS5) H'1400 0000
  12745. H'8000 0000
  12746. P1 area P1 area Area 6 (CS6) H'1800 0000
  12747. H'1C00 0000
  12748. H'A000 0000 Area 7 (reserved area)
  12749. P2 area P2 area H'1FFF FFFF
  12750.  
  12751. H'C000 0000
  12752. P3 area P3 area
  12753.  
  12754. H'E000 0000 Store queue area Store queue area
  12755. H'E400 0000
  12756. P4 area P4 area
  12757. H'FFFF FFFF
  12758.  
  12759. Physical space Virtual space External space
  12760. (MMU off) (MMU on)
  12761.  
  12762. Notes: 1. When the MMU is off (MMUCR.AT = 0), the top 3 bits of the 32-bit address are ignored, and
  12763. memory is mapped onto a fixed 29-bit external space.
  12764. 2. When the MMU is on (MMUCR.AT = 1), the P0, U0, P3, and store queue areas can be
  12765. mapped onto any external space using the TLB.
  12766. For details, see section 3, Memory Management Unit (MMU).
  12767.  
  12768. Figure 13.2 Correspondence between Virtual Address Space and External Address Space
  12769.  
  12770. Rev. 2.0, 02/99, page 272 of 830
  12771.  
  12772. ----------------------- Page 287-----------------------
  12773.  
  12774. Table 13.3 External Address Space Map
  12775.  
  12776. External Connectable Settable Bus
  12777. Area Addresses Size Memory Widths Access Size
  12778. 0 H'00000000– 64 Mbytes Normal memory 8, 16, 32, 64*1 8 , 16, 32 ,
  12779.  
  12780. H'03FFFFFF 64
  12781. Burst ROM 8, 16, 32*1
  12782. MPX 32, 64*1
  12783. 1 H'04000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12784.  
  12785. H'07FFFFFF 64
  12786. MPX 32, 64*2
  12787. Byte control SRAM 16, 32, 64*2
  12788. 2 H'08000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12789.  
  12790. H'0BFFFFFF 64
  12791.  
  12792. 2 3
  12793. Synchronous DRAM 32, 64* ,*
  12794.  
  12795. 2 3
  12796. ,
  12797. DRAM 16, 32* *
  12798. MPX 32, 64*2
  12799. 3 H'0C000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12800.  
  12801. H'0FFFFFFF 64
  12802.  
  12803. 2 3
  12804. Synchronous DRAM 32, 64* ,*
  12805.  
  12806. 2 3
  12807. ,
  12808. DRAM 16, 32, 64* *
  12809. MPX 32, 64*2
  12810. 4 H'10000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12811.  
  12812. H'13FFFFFF 64
  12813. MPX 32, 64*2
  12814. Byte control RAM 16, 32, 64*2
  12815. 5 H'14000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12816.  
  12817. H'17FFFFFF 64
  12818. MPX 32, 64*2
  12819. Burst ROM 8, 16, 32*2
  12820.  
  12821. 2 4
  12822. ,
  12823. PCMCIA 8, 16* *
  12824. 6 H'18000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8 , 16, 32 ,
  12825.  
  12826. H'1BFFFFFF 64
  12827. MPX 32, 64*2
  12828. Burst ROM 8,16, 32*2
  12829.  
  12830. 2 4
  12831. ,
  12832. PCMCIA 8,16* *
  12833. 7*5 H'1C000000– 64 Mbytes — — n: 0 to 7
  12834.  
  12835. H'1FFFFFFF
  12836. Notes: 1. Memory bus width specified by external pins
  12837. 2. Memory bus width specified by register
  12838. 3. With synchronous DRAM interface, bus width is 32 or 64 bits only.
  12839. With DRAM interface, bus width is 16 or 32 bits only for area 2, and 16, 32, or 64 bits
  12840. only for area 3.
  12841. 4. With PCMCIA interface, bus width is 8 or 16 bits only.
  12842. 5. Do not access a reserved area, as operation cannot be guaranteed in this case.
  12843.  
  12844. Rev. 2.0, 02/99, page 273 of 830
  12845.  
  12846. ----------------------- Page 288-----------------------
  12847.  
  12848. Area 0: H'00000000 Normal memory/burst ROM/MPX
  12849.  
  12850. Area 1: H'04000000 Normal memory/MPX/byte control
  12851. SRAM
  12852.  
  12853. Area 2: H'08000000 Normal memory/synchronous DRAM/
  12854. DRAM/MPX
  12855.  
  12856. Area 3: H'0C000000 Normal memory/synchronous DRAM/
  12857. DRAM/MPX
  12858.  
  12859. Area 4: H'10000000 Normal memory/MPX/byte control
  12860. SRAM
  12861.  
  12862. Area 5: H'14000000 Normal memory/burst ROM/PCMCIA/
  12863. MPX
  12864. The PCMCIA interface is
  12865. Area 6: H'18000000 Normal memory/burst ROM/PCMCIA/ for memory and I/O card use
  12866.  
  12867. MPX
  12868.  
  12869. Figure 13.3 External Space Allocation
  12870.  
  12871. Memory Bus Width: In the SH7750, the memory bus width can be set independently for each
  12872. space. For area 0, a bus size of 8, 16, 32, or 64 bits can be selected in a power-on reset, using
  12873. external pins. The relationship between the external pins (MD4 and MD3) and the bus width in a
  12874. power-on reset is shown below.
  12875.  
  12876. MD4 MD3 Bus Width
  12877.  
  12878. 0 0 64 bits
  12879.  
  12880. 1 8 bits
  12881.  
  12882. 1 0 16 bits
  12883.  
  12884. 1 32 bits
  12885.  
  12886. When normal memory or ROM is used in areas 1 to 6, a bus width of 8, 16, 32, or 64 bits can be
  12887. selected with bus control register 2 (BCR2). When burst ROM is used, a bus width of 8, 16, or
  12888. 32 bits can be selected. When byte control SRAM is used, a bus width of 16, 32, or 64 bits can
  12889. be selected. When the MPX bus is used, a bus width of 32 or 64 bits can be selected. When the
  12890. DRAM interface is used, a bus width of 16, 32, or 64 bits can be selected with the memory
  12891. control register (MCR). When the DRAM interface is used for area 2 or 3, a bus width of 16 or
  12892. 32 bits should be set. For the synchronous DRAM interface, set a bus width of 32 or 64 bits in
  12893. the MCR register.
  12894.  
  12895. When using the PCMCIA interface, set a bus width of 8 or 16 bits.
  12896.  
  12897. Rev. 2.0, 02/99, page 274 of 830
  12898.  
  12899. ----------------------- Page 289-----------------------
  12900.  
  12901. When using port functions, set a bus width of 8, 16, or 32 bits for all areas.
  12902.  
  12903. For details, see section 13.2.2, Bus Control Register 2 (BCR2), and section 13.2.6, Memory
  12904. Control Register (MCR).
  12905.  
  12906. The area 7 address range, H'1C000000 to H'1FFFFFFFF, is a reserved space and must not be
  12907. used.
  12908.  
  12909. 13.1.6 PCMCIA Support
  12910.  
  12911. The SH7750 supports PCMCIA compliant interface specifications for physical space areas 5 and
  12912. 6.
  12913.  
  12914. The interfaces supported are basically the IC memory card interface and I/O card interface
  12915. stipulated in JEIDA specifications version 4.2 (PCMCIA2.1).
  12916.  
  12917. Physical space areas 5 and 6 support both the IC memory card interface and the I/O card
  12918. interface.
  12919.  
  12920. The PCMCIA interface is supported only in little-endian mode.
  12921.  
  12922. Table 13.4 PCMCIA Interface Features
  12923.  
  12924. Item Features
  12925.  
  12926. Access Random access
  12927.  
  12928. Data bus 8/16 bits
  12929.  
  12930. Memory type Mask ROM, OTPROM, EPROM, EEPROM, flash memory, SRAM
  12931.  
  12932. Common memory capacity Max. 64 Mbytes
  12933.  
  12934. Attribute memory capacity Max. 64 Mbytes
  12935.  
  12936. Others Dynamic bus sizing for I/O bus width, access to PCMCIA interface
  12937. from address translation areas
  12938.  
  12939. Rev. 2.0, 02/99, page 275 of 830
  12940.  
  12941. ----------------------- Page 290-----------------------
  12942.  
  12943. Table 13.5 PCMCIA Support Interfaces
  12944.  
  12945. IC Memory Card Interface I/O Card Interface Corresponding
  12946. SH7750 Pin
  12947.  
  12948. Signal Signal
  12949. Pin Name I/O Function Name I/O Function
  12950.  
  12951. 1 GND Ground GND Ground —
  12952.  
  12953. 2 D3 I/O Data D3 I/O Data D3
  12954.  
  12955. 3 D4 I/O Data D4 I/O Data D4
  12956.  
  12957. 4 D5 I/O Data D5 I/O Data D5
  12958.  
  12959. 5 D6 I/O Data D6 I/O Data D6
  12960.  
  12961. 6 D7 I/O Data D7 I/O Data D7
  12962.  
  12963. 7 &( I Card enable &( I Card enable &6 or &6
  12964.  
  12965. 8 A10 I Address A10 I Address A10
  12966.  
  12967. 9 2( I Output enable 2( I Output enable 5'
  12968.  
  12969. 10 A11 I Address A11 I Address A11
  12970.  
  12971. 11 A9 I Address A9 I Address A9
  12972.  
  12973. 12 A8 I Address A8 I Address A8
  12974.  
  12975. 13 A13 I Address A13 I Address A13
  12976.  
  12977. 14 A14 I Address A14 I Address A14
  12978.  
  12979. 15 :(/3*0 I Write enable :(/3*0 I Write enable :(
  12980.  
  12981. 16 5'</%6< O Ready/busy ,5(4 O Interrupt request Sensed on port
  12982.  
  12983. 17 VCC Operating power VCC Operating power —
  12984. supply supply
  12985.  
  12986. 18 VPP1 Programming VPP1 Programming/ —
  12987. power supply peripheral power
  12988. supply
  12989.  
  12990. 19 A16 I Address A16 I Address A16
  12991.  
  12992. 20 A15 I Address A15 I Address A15
  12993.  
  12994. 21 A12 I Address A12 I Address A12
  12995.  
  12996. 22 A7 I Address A7 I Address A7
  12997.  
  12998. 23 A6 I Address A6 I Address A6
  12999.  
  13000. 24 A5 I Address A5 I Address A5
  13001.  
  13002. 25 A4 I Address A4 I Address A4
  13003.  
  13004. 26 A3 I Address A3 I Address A3
  13005.  
  13006. 27 A2 I Address A2 I Address A2
  13007.  
  13008. 28 A1 I Address A1 I Address A1
  13009.  
  13010. Rev. 2.0, 02/99, page 276 of 830
  13011.  
  13012. ----------------------- Page 291-----------------------
  13013.  
  13014. Table 13.5 PCMCIA Support Interfaces (cont)
  13015.  
  13016. IC Memory Card Interface I/O Card Interface Corresponding
  13017. SH7750 Pin
  13018.  
  13019. Signal Signal
  13020. Pin Name I/O Function Name I/O Function
  13021.  
  13022. 29 A0 I Address A0 I Address A0
  13023.  
  13024. 30 D0 I/O Data D0 I/O Data D0
  13025.  
  13026. 31 D1 I/O Data D1 I/O Data D1
  13027.  
  13028. 32 D2 I/O Data D2 I/O Data D2
  13029.  
  13030. 33 :3 O Write protect ,2,6 O 16-bit I/O port ,2,6
  13031.  
  13032. 34 GND Ground GND Ground —
  13033.  
  13034. 35 GND Ground GND Ground —
  13035.  
  13036. 36 &' O Card detection &' O Card detection Sensed on port
  13037.  
  13038. 37 D11 I/O Data D11 I/O Data D11
  13039.  
  13040. 38 D12 I/O Data D12 I/O Data D12
  13041.  
  13042. 39 D13 I/O Data D13 I/O Data D13
  13043.  
  13044. 40 D14 I/O Data D14 I/O Data D14
  13045.  
  13046. 41 D15 I/O Data D15 I/O Data D15
  13047.  
  13048. 42 &( I Card enable &( I Card enable &($ or &(%
  13049.  
  13050. 43 RFSH I Refresh request RFSH I Refresh request Output from
  13051. port
  13052.  
  13053. 44 RFU Reserved ,25' I I/O read ,&,25'
  13054.  
  13055. 45 RFU Reserved ,2:5 I I/O write ,&,2:5
  13056.  
  13057. 46 A17 I Address A17 I Address A17
  13058.  
  13059. 47 A18 I Address A18 I Address A18
  13060.  
  13061. 48 A19 I Address A19 I Address A19
  13062.  
  13063. 49 A20 I Address A20 I Address A20
  13064.  
  13065. 50 A21 I Address A21 I Address A21
  13066.  
  13067. 51 VCC Power supply VCC Power supply —
  13068.  
  13069. 52 VPP2 Programming VPP2 Programming/ —
  13070. power supply peripheral power
  13071. supply
  13072.  
  13073. 53 A22 I Address A22 I Address A22
  13074.  
  13075. 54 A23 I Address A23 I Address A23
  13076.  
  13077. 55 A24 I Address A24 I Address A24
  13078.  
  13079. 56 A25 I Address A25 I Address A25
  13080.  
  13081. Rev. 2.0, 02/99, page 277 of 830
  13082.  
  13083. ----------------------- Page 292-----------------------
  13084.  
  13085. Table 13.5 PCMCIA Support Interfaces (cont)
  13086.  
  13087. IC Memory Card Interface I/O Card Interface Corresponding
  13088. SH7750 Pin
  13089.  
  13090. Signal Signal
  13091. Pin Name I/O Function Name I/O Function
  13092.  
  13093. 57 RFU Reserved RFU Reserved —
  13094.  
  13095. 58 RESET I Reset RESET I Reset Output from
  13096. port
  13097.  
  13098. 59 :$,7 O Wait request :$,7 O Wait request 5'<
  13099.  
  13100. 60 RFU Reserved ,13$&. O Input acknowledge —
  13101.  
  13102. 61 5(* I Attribute memory 5(* I Attribute memory :(
  13103. space select space select
  13104.  
  13105. 62 BVD2 O Battery voltage 63.5 O Digital speech Sensed on port
  13106. detection signal
  13107.  
  13108. 63 BVD1 O Battery voltage 676&+* O Card status Sensed on port
  13109. detection change
  13110.  
  13111. 64 D8 I/O Data D8 I/O Data D8
  13112.  
  13113. 65 D9 I/O Data D9 I/O Data D9
  13114.  
  13115. 66 D10 I/O Data D10 I/O Data D10
  13116.  
  13117. 67 &' O Card detection &' O Card detection Sensed on port
  13118.  
  13119. 68 GND Ground GND Ground —
  13120.  
  13121. Rev. 2.0, 02/99, page 278 of 830
  13122.  
  13123. ----------------------- Page 293-----------------------
  13124.  
  13125. 13.2 Register Descriptions
  13126.  
  13127. 13.2.1 Bus Control Register 1 (BCR1)
  13128.  
  13129. Bus control register 1 (BCR1) is a 32-bit readable/writable register that specifies the function,
  13130. bus cycle status, etc., of each area.
  13131.  
  13132. BCR1 is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset
  13133. or in standby mode. External memory other than area 0 should not be accessed until register
  13134. initialization is completed.
  13135.  
  13136. Bit: 31 30 29 28 27 26 25 24
  13137.  
  13138. Bit name: ENDIAN MASTER A0MPX — — — IPUP OPUP
  13139.  
  13140. Initial value: 0/1* 0/1* 0/1* 0 0 0 0 0
  13141.  
  13142. R/W: R R R R R R R/W R/W
  13143.  
  13144. Bit: 23 22 21 20 19 18 17 16
  13145.  
  13146. Bit name: — — A1MBC A4MBC BREQEN PSHR MEMMPX —
  13147.  
  13148. Initial value: 0 0 0 0 0 0 0 0
  13149.  
  13150. R/W: R R R/W R/W R/W R/W R/W R
  13151.  
  13152. Bit: 15 14 13 12 11 10 9 8
  13153.  
  13154. Bit name: HIZMEM HIZCNT A0BST2 A0BST1 A0BST0 A5BST2 A5BST1 A5BST0
  13155.  
  13156. Initial value: 0 0 0 0 0 0 0 0
  13157.  
  13158. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13159.  
  13160. Bit: 7 6 5 4 3 2 1 0
  13161.  
  13162. Bit name: A6BST2 A6BST1 A6BST0 DRAMTP2 DRAMTP1 DRAMTP0 — A56PCM
  13163.  
  13164. Initial value: 0 0 0 0 0 0 0 0
  13165.  
  13166. R/W: R/W R/W R/W R/W R/W R/W R R/W
  13167.  
  13168. Note: * These bits sample external pin values in a power-on reset.
  13169.  
  13170. Rev. 2.0, 02/99, page 279 of 830
  13171.  
  13172. ----------------------- Page 294-----------------------
  13173.  
  13174. Bit 31—Endian Flag (ENDIAN): Samples the value of the endian specification external pin
  13175. (MD5) in a power-on reset. The endian mode of all spaces is determined by this bit. ENDIAN is
  13176. a read-only bit.
  13177.  
  13178. Bit 31: ENDIAN Description
  13179.  
  13180. 0 In a power-on reset, the endian setting external pin (MD5) is low,
  13181. designating big-endian mode for the SH7750
  13182.  
  13183. 1 In a power-on reset, the endian setting external pin (MD5) is high,
  13184. designating little-endian mode for the SH7750
  13185.  
  13186. Bit 30—Master/Slave Flag (MASTER): Samples the value of the master/slave specification
  13187. external pin (MD7) in a power-on reset. The master/slave status of all spaces is determined by
  13188. this bit. MASTER is a read-only bit.
  13189.  
  13190. Bit 30: MASTER Description
  13191.  
  13192. 0 In a power-on reset, the master/slave setting external pin (MD7) is low,
  13193. designating master mode for the SH7750
  13194.  
  13195. 1 In a power-on reset, the master/slave setting external pin (MD7) is high,
  13196. designating slave mode for the SH7750
  13197.  
  13198. Bit 29—Area 0 Memory Type (A0MPX): Samples the value of the area 0 memory type
  13199. specification external pin (MD6) in a power-on reset. The memory type of area 0 is determined
  13200. by this bit. A0MPX is a read-only bit.
  13201.  
  13202. Bit 29: A0MPX Description
  13203.  
  13204. 0 In a power-on reset, the external pin specifying the area 0 memory type
  13205. (MD6) is low, designating the area 0 memory type as normal memory
  13206.  
  13207. 1 In a power-on reset, the external pin specifying the area 0 memory type
  13208. (MD6) is high, designating the area 0 memory type as MPX
  13209.  
  13210. Bits 28 to 26, 23, 22, 16, and 1—Reserved: These bits are always read as 0, and should only be
  13211. written with 0.
  13212.  
  13213. Rev. 2.0, 02/99, page 280 of 830
  13214.  
  13215. ----------------------- Page 295-----------------------
  13216.  
  13217. Bit 25—Control Input Pin Pull-Up Resistor Control (IPUP): Specifies the pull-up resistor
  13218. status for control input pins (NMI, ,5/–,5/, %5(4, MD6/,2,6, 5'<). IPUP is initialized
  13219. by a power-on reset.
  13220.  
  13221. Bit 25: IPUP Description
  13222.  
  13223. 0 Pull-up resistor is on for control input pins (NMI, ,5/–,5/ , %5(4 ,
  13224. MD6/,2,6 , 5'<) (Initial value)
  13225.  
  13226. 1 Pull-up resistor is off for control input pins (NMI, ,5/–,5/ , %5(4 ,
  13227. MD6/,2,6 , 5'<)
  13228.  
  13229. Bit 24—Control Output Pin Pull-Up Resistor Control (OPUP): Specifies the pull-up resistor
  13230. status for control output pins (A[25:0], %6, &6Q, 5', :(Q, RD/:5, 5$6, 5$6, &($,
  13231. &(%, 5', RD/:5) when high-impedance. OPUP is initialized by a power-on reset.
  13232.  
  13233. Bit 24: OPUP Description
  13234.  
  13235. 0 Pull-up resistor is on for control output pins (A[25:0], %6, &6Q , 5' , :(Q ,
  13236. RD/:5 , 5$6, 5$6 , &($ , &(% , 5' , RD/:5) (Initial value)
  13237.  
  13238. 1 Pull-up resistor is off for control output pins (A[25:0], %6, &6Q , 5' , :(Q ,
  13239. RD/:5 , 5$6, 5$6 , &($ , &(% , 5' , RD/:5)
  13240.  
  13241. Bit 21—Area 1 SRAM Byte Control Mode (A1MBC): MPX has priority when an MPX bus
  13242. specification is made. This bit is initialized by a power-on reset.
  13243.  
  13244. Bit 21: A1MBC Description
  13245.  
  13246. 0 Area 1 SRAM is set to normal mode (Initial value)
  13247.  
  13248. 1 Area 1 SRAM is set to byte control mode
  13249.  
  13250. Bit 20—Area 4 SRAM Byte Control Mode (A4MBC): MPX has priority when an MPX bus
  13251. specification is made. This bit is initialized by a power-on reset.
  13252.  
  13253. Bit 20: A4MBC Description
  13254.  
  13255. 0 Area 4 SRAM is set to normal mode (Initial value)
  13256.  
  13257. 1 Area 4 SRAM is set to byte control mode
  13258.  
  13259. Rev. 2.0, 02/99, page 281 of 830
  13260.  
  13261. ----------------------- Page 296-----------------------
  13262.  
  13263. Bit 19—BREQ Enable (BREQEN): Indicates whether external requests can be accepted.
  13264. BREQEN is initialized to the external request acceptance disabled state by a power-on reset. It is
  13265. ignored in the case of a slave mode startup.
  13266.  
  13267. Bit 19: BREQEN Description
  13268.  
  13269. 0 External requests are not accepted (Initial value)
  13270.  
  13271. 1 External requests are accepted
  13272.  
  13273. Bit 18—Partial-Sharing Bit (PSHR): Sets partial-sharing mode. PSHR is valid only in the case
  13274. of a master mode startup.
  13275.  
  13276. Bit 18: PSHR Description
  13277.  
  13278. 0 Master mode (Initial value)
  13279.  
  13280. 1 Partial-sharing mode
  13281.  
  13282. Bit 17—Area 1 to 6 MPX Bus Specification (MEMMPX): Sets the MPX bus when areas 1 to
  13283. 6 are set as normal memory (or burst ROM). MEMMPX is initialized by a power-on reset.
  13284.  
  13285. Bit 17: MEMMPX Description
  13286.  
  13287. 0 Basic interface (or burst ROM interface) is selected when areas 1 to 6 are
  13288. set as normal memory (or burst ROM) (Initial value)
  13289.  
  13290. 1 MPX bus interface is selected when areas 1 to 6 are set as normal memory
  13291. (or burst ROM)
  13292.  
  13293. Bit 15—High-Z Control (HIZMEM): Specifies the state of address and other signals (A[25:0],
  13294. %6, &6Q, RD/:5, &($, &(%, RD/:5) in standby mode.
  13295.  
  13296. Bit 15: HIZMEM Description
  13297.  
  13298. 0 The A[25:0], %6, &6Q , RD/:5 , &($ , &(% , and RD/WR2 signals go to
  13299. high-impedance (High-Z) in standby mode and when the bus is released
  13300. (Initial value)
  13301.  
  13302. 1 The A[25:0], %6, &6Q , RD/:5 , &($ , &(% , and RD/:5 signals drive in
  13303. standby mode
  13304.  
  13305. Rev. 2.0, 02/99, page 282 of 830
  13306.  
  13307. ----------------------- Page 297-----------------------
  13308.  
  13309. Bit 14—High-Z Control (HIZCNT): Specifies the state of the 5$6 and &$6 signals in standby
  13310. mode and when the bus is released.
  13311.  
  13312. Bit 14: HIZCNT Description
  13313.  
  13314. 0 The 5$6, 5$6 , :(Q/&$6Q/DQMn, 5'/&$66/)5$0( , and 5' signals
  13315. go to high-impedance (High-Z) in standby mode and when the bus is
  13316. released (Initial value)
  13317.  
  13318. 1 The 5$6, 5$6 , :(Q/&$6Q/DQMn, 5'/&$66/)5$0( , and 5' signals
  13319. drive in standby mode and when the bus is released
  13320.  
  13321. Bits 13 to 11—Area 0 Burst ROM Control (A0BST2–A0BST0): These bits specify whether
  13322. burst ROM is used in external space area 0. When burst ROM is used, they also specify the
  13323. number of accesses in a burst. If area 0 is an MPX interface area, these bits are ignored.
  13324.  
  13325. Bit 13: A0BST2 Bit 12: A0BST1 Bit 11: A0BST0 Description
  13326.  
  13327. 0 0 0 Area 0 is accessed as normal memory
  13328. (Initial value)
  13329.  
  13330. 1 Area 0 is accessed as burst ROM (4
  13331. consecutive accesses)
  13332.  
  13333. Can be used with 8-, 16-, or 32-bit bus
  13334. width
  13335.  
  13336. 1 0 Area 0 is accessed as burst ROM (8
  13337. consecutive accesses)
  13338.  
  13339. Can be used with 8-, 16-, or 32-bit bus
  13340. width
  13341.  
  13342. 1 Area 0 is accessed as burst ROM (16
  13343. consecutive accesses)
  13344.  
  13345. Can only be used with 8- or 16-bit bus
  13346. width. Do not specify for 32-bit bus width
  13347.  
  13348. 1 0 0 Area 0 is accessed as burst ROM (32
  13349. consecutive accesses)
  13350.  
  13351. Can only be used with 8-bit bus width
  13352.  
  13353. 1 Reserved
  13354.  
  13355. 1 0 Reserved
  13356.  
  13357. 1 Reserved
  13358.  
  13359. Rev. 2.0, 02/99, page 283 of 830
  13360.  
  13361. ----------------------- Page 298-----------------------
  13362.  
  13363. Bits 10 to 8—Area 5 Burst Enable (A5BST2–A5BST0): These bits specify whether burst
  13364. ROM is used in external space area 5. When burst ROM is used, they also specify the number of
  13365. accesses in a burst. If area 5 is an MPX interface area, these bits are ignored.
  13366.  
  13367. Bit 10: A5BST2 Bit 9: A5BST1 Bit 8: A5BST0 Description
  13368.  
  13369. 0 0 0 Area 5 is accessed in normal mode
  13370. (Initial value)
  13371.  
  13372. 1 Area 5 is burst-accessed (4 consecutive
  13373. accesses)
  13374.  
  13375. Can be used with 8-, 16-, or 32--bit bus
  13376. width
  13377.  
  13378. 1 0 Area 5 is burst-accessed (8 consecutive
  13379. accesses)
  13380.  
  13381. Can be used with 8-, 16-, or 32-bit bus
  13382. width
  13383.  
  13384. 1 Area 5 is burst-accessed (16 consecutive
  13385. accesses)
  13386.  
  13387. Can only be used with 8- or 16-bit bus
  13388. width. Do not specify for 32-bit bus width
  13389.  
  13390. 1 0 0 Area 5 is burst-accessed (32 consecutive
  13391. accesses)
  13392.  
  13393. Can only be used with 8-bit bus width
  13394.  
  13395. 1 Reserved
  13396.  
  13397. 1 0 Reserved
  13398.  
  13399. 1 Reserved
  13400.  
  13401. Note: Clear to 0 when PCMCIA is used.
  13402.  
  13403. Rev. 2.0, 02/99, page 284 of 830
  13404.  
  13405. ----------------------- Page 299-----------------------
  13406.  
  13407. Bits 7 to 5—Area 6 Burst Enable (A6BST2–A6BST0): These bits specify whether burst ROM
  13408. is used in external space area 6. When burst ROM is used, they also specify the number of
  13409. accesses in a burst. If area 6 is an MPX interface area, these bits are ignored.
  13410.  
  13411. Bit 7: A6BST2 Bit 6: A6BST1 Bit 5: A6BST0 Description
  13412.  
  13413. 0 0 0 Area 6 is accessed in normal mode
  13414. (Initial value)
  13415.  
  13416. 1 Area 6 is burst-accessed (4 consecutive
  13417. accesses)
  13418.  
  13419. Can be used with 8-, 16-, or 32--bit bus
  13420. width
  13421.  
  13422. 1 0 Area 6 is burst-accessed (8 consecutive
  13423. accesses)
  13424.  
  13425. Can be used with 8-, 16-, or 32-bit bus
  13426. width
  13427.  
  13428. 1 Area 6 is burst-accessed (16 consecutive
  13429. accesses)
  13430.  
  13431. Can only be used with 8- or 16-bit bus
  13432. width. Do not specify for 32-bit bus width
  13433.  
  13434. 1 0 0 Area 6 is burst-accessed (32 consecutive
  13435. accesses)
  13436.  
  13437. Can only be used with 8-bit bus width
  13438.  
  13439. 1 Reserved
  13440.  
  13441. 1 0 Reserved
  13442.  
  13443. 1 Reserved
  13444.  
  13445. Note: Clear to 0 when PCMCIA is used.
  13446.  
  13447. Rev. 2.0, 02/99, page 285 of 830
  13448.  
  13449. ----------------------- Page 300-----------------------
  13450.  
  13451. Bits 4 to 2—Area 2 and 3 Memory Type (DRAMTP2–DRAMTP0): These bits specify the
  13452. type of memory connected to external space areas 2 and 3. ROM, SRAM, flash ROM, etc., can
  13453. be directly connected as normal memory. DRAM and synchronous DRAM can also be directly
  13454. connected.
  13455.  
  13456. Bit 4: DRAMTP2 Bit 3: DRAMTP1 Bit 2: DRAMTP0 Description
  13457.  
  13458. 0 0 0 Areas 2 and 3 are normal memory or
  13459. MPX*1
  13460.  
  13461. (Initial value)
  13462.  
  13463. 1 Reserved (Cannot be set)
  13464. 1 0 Area 2 is normal memory or MPX*1, area
  13465.  
  13466. 3 is synchronous DRAM
  13467.  
  13468. 1 Areas 2 and 3 are synchronous DRAM
  13469. 1 0 0 Area 2 is normal memory or MPX*1, area
  13470.  
  13471. 3 is DRAM
  13472. 1 Areas 2 and 3 are DRAM*2
  13473.  
  13474. 1 0 Reserved (Cannot be set)
  13475.  
  13476. 1 Reserved (Cannot be set)
  13477.  
  13478. Note: 1. Selection of normal memory or MPX is determined by the setting of the MEMMPX bit
  13479. 2. When this mode is selected, 16 or 32 bits should be specified as the bus width for
  13480. areas 2 and 3. In this mode the MD5 pin is designated for output as the 5$6 pin.
  13481.  
  13482. Bit 0—Area 5 and 6 Bus Type (A56PCM): Specifies whether external space areas 5 and 6 are
  13483. accessed as PCMCIA space. The setting of these bits has priority over the MEMMPX and
  13484. AnBST bit settings.
  13485.  
  13486. Bit 0: A56PCM Description
  13487.  
  13488. 0 External space areas 5 and 6 are accessed as normal memory
  13489. (Initial value)
  13490.  
  13491. 1 External space areas 5 and 6 are accessed as PCMCIA space*
  13492.  
  13493. Note: * The MD3 pin is designated for output as the &($ pin.
  13494. The MD4 pin is designated for output as the &(% pin.
  13495.  
  13496. Rev. 2.0, 02/99, page 286 of 830
  13497.  
  13498. ----------------------- Page 301-----------------------
  13499.  
  13500. 13.2.2 Bus Control Register 2 (BCR2)
  13501.  
  13502. Bus control register 2 (BCR2) is a 16-bit readable/writable register that specifies the bus width
  13503. for each area, and whether a 16-bit port is used.
  13504.  
  13505. BCR2 is initialized to H'3FFC by a power-on reset, but is not initialized by a manual reset or in
  13506. standby mode. External memory other than area 0 should not be accessed until register
  13507. initialization is completed.
  13508.  
  13509. Bit: 15 14 13 12 11 10 9 8
  13510.  
  13511. Bit name: A0SZ1 A0SZ0 A6SZ1 A6SZ0 A5SZ1 A5SZ0 A4SZ1 A4SZ0
  13512.  
  13513. Initial value: 0/1* 0/1* 1 1 1 1 1 1
  13514.  
  13515. R/W: R R R/W R/W R/W R/W R/W R/W
  13516.  
  13517. Bit: 7 6 5 4 3 2 1 0
  13518.  
  13519. Bit name: A3SZ1 A3SZ0 A2SZ1 A2SZ0 A1SZ1 A0SZ0 — PORTEN
  13520.  
  13521. Initial value: 1 1 1 1 1 1 0 0
  13522.  
  13523. R/W: R/W R/W R/W R/W R/W R/W — R/W
  13524.  
  13525. Note: * These bits sample the values of the external pins that specify the area 0 bus size.
  13526.  
  13527. Bits 15 and 14—Area 0 Bus Width (A0SZ1, A0SZ0): These bits sample the external pins
  13528. (MD3 and MD4) that specify the bus size in a power-on reset. They are read-only bits.
  13529.  
  13530. Bits 2n + 1, 2n—Area n (1 to 6) Bus Width Specification (AnSZ1, AnSZ0): These bits specify
  13531. the bus width of physical space area n (n = 1 to 6).
  13532.  
  13533. (Bit 0): PORTEN Bit 2n + 1: AnSZ1 Bit 2n: AnSZ0 Description
  13534.  
  13535. 0 0 0 Bus width is 64 bits (Initial value)
  13536.  
  13537. 1 Bus width is 8 bits
  13538.  
  13539. 1 0 Bus width is 16 bits
  13540.  
  13541. 1 Bus width is 32 bits
  13542.  
  13543. 1 0 0 Reserved (Setting prohibited)
  13544.  
  13545. 1 Bus width is 8 bits
  13546.  
  13547. 1 0 Bus width is 16 bits
  13548.  
  13549. 1 Bus width is 32 bits
  13550.  
  13551. Bit 1—Reserved: This bit is always read as 0, and should only be written with 0.
  13552.  
  13553. Rev. 2.0, 02/99, page 287 of 830
  13554.  
  13555. ----------------------- Page 302-----------------------
  13556.  
  13557. Bit 0—Port Function Enable (PORTEN): Specifies whether pins D51 to D32 are used as a 20-
  13558. bit port. When this function is used, a bus width of 8, 16, or 32 bits should be set for all areas.
  13559.  
  13560. Bit 0: PORTEN Description
  13561.  
  13562. 0 D51 to D32 are not used as a port (Initial value)
  13563.  
  13564. 1 D51 to D32 are used as a port
  13565.  
  13566. 13.2.3 Wait Control Register 1 (WCR1)
  13567.  
  13568. Wait control register 1 (WCR1) is a 32-bit readable/writable register that specifies the number of
  13569. idle state insertion cycles for each area. With some kinds of memory, data bus drive does not go
  13570. off immediately after the read signal from off-chip goes off. As a result, there is a possibility of
  13571. a data bus collision when consecutive memory accesses are performed on memory in different
  13572. areas, or when a memory write is performed immediately after a read. In the SH7750, the
  13573. number of idle cycles set in the WCR1 register are inserted automatically if there is a possibility
  13574. of this kind of data bus collision.
  13575.  
  13576. WCR1 is initialized to H'77777777 by a power-on reset, but is not initialized by a manual reset
  13577. or in standby mode.
  13578.  
  13579. Bit: 31 30 29 28 27 26 25 24
  13580. Bit name: — DMAIW2 DMAIW1 DMAIW0 — A6IW2 A6IW1 A6IW0
  13581.  
  13582. Initial value: 0 1 1 1 0 1 1 1
  13583. R/W: R R/W R/W R/W R R/W R/W R/W
  13584.  
  13585. Bit: 23 22 21 20 19 18 17 16
  13586. Bit name: — A5IW2 A5IW1 A5IW0 — A4IW2 A4IW1 A4IW0
  13587.  
  13588. Initial value: 0 1 1 1 0 1 1 1
  13589. R/W: R R/W R/W R/W R R/W R/W R/W
  13590.  
  13591. Bit: 15 14 13 12 11 10 9 8
  13592. Bit name: — A3IW2 A3IW1 A3IW0 — A2IW2 A2IW1 A2IW0
  13593.  
  13594. Initial value: 0 1 1 1 0 1 1 1
  13595. R/W: R R/W R/W R/W R R/W R/W R/W
  13596.  
  13597. Bit: 7 6 5 4 3 2 1 0
  13598.  
  13599. Bit name: — A1IW2 A1IW1 A1IW0 — A0IW2 A0IW1 A0IW0
  13600.  
  13601. Initial value: 0 1 1 1 0 1 1 1
  13602. R/W: R R/W R/W R/W R R/W R/W R/W
  13603.  
  13604. Rev. 2.0, 02/99, page 288 of 830
  13605.  
  13606. ----------------------- Page 303-----------------------
  13607.  
  13608. Bits 31, 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0, and should
  13609. only be written with 0.
  13610.  
  13611. Bits 30 to 28— DMAIW-DACK Device Inter-Cycle Idle Specification (DMAIW2–
  13612. DMAIW0): These bits specify the number of idle cycles between bus cycles to be inserted when
  13613. switching from a DACK device to another space, or from a read access to a write access on the
  13614. same device. The DMAIW bits are valid only for DMA single address transfer; with DMA dual
  13615. address transfer, inter-area idle cycles are inserted.
  13616.  
  13617. Bits 4n + 2 to 4n—Area n (6 to 0) Inter-Cycle Idle Specification (AnlW2–AnlW0): These
  13618. bits specify the number of idle cycles between bus cycles to be inserted when switching from
  13619. external space area n (n = 6 to 0) to another space, or from a read access to a write access in the
  13620. same space.
  13621.  
  13622. DMAIW2/AnIW2 DMAIW1/AnIW1 DMAIW0/AnIW0 Inserted Idle Cycles
  13623.  
  13624. 0 0 0 0
  13625.  
  13626. 1 1
  13627.  
  13628. 1 0 2
  13629.  
  13630. 1 3
  13631.  
  13632. 1 0 0 6
  13633.  
  13634. 1 9
  13635.  
  13636. 1 0 12
  13637.  
  13638. 1 15 (Initial value)
  13639.  
  13640. Rev. 2.0, 02/99, page 289 of 830
  13641.  
  13642. ----------------------- Page 304-----------------------
  13643.  
  13644. • Idle Insertion between Accesses
  13645.  
  13646. Preceding Following Cycle Same Different
  13647. Cycle Area Area
  13648.  
  13649. Same Area Different Area
  13650.  
  13651. Read Write Read Write MPX MPX
  13652. Address Address
  13653. Output Output
  13654.  
  13655. CPU DMA CPU DMA CPU DMA CPU DMA
  13656.  
  13657. Read M M M M M M M (1) M (1)
  13658.  
  13659. Write M M M M M (1)
  13660.  
  13661. DMA read M M M M M M — M (1)
  13662. (memory →
  13663. device)
  13664.  
  13665. DMA write D D D D* D D D D — D (1)
  13666. (device →
  13667. memory)
  13668.  
  13669. M, D: WCR1 wait insertion
  13670. (One cycle inserted in MPX access even if WCR1 is cleared to 0)
  13671. M: Memory setting (area 0 to area 6)
  13672. D: DMA setting
  13673. *: No insertion in consecutive accesses to same device
  13674.  
  13675. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  13676. and bits A3IW2–A3IW0 to 000.
  13677.  
  13678. Rev. 2.0, 02/99, page 290 of 830
  13679.  
  13680. ----------------------- Page 305-----------------------
  13681.  
  13682. 13.2.4 Wait Control Register 2 (WCR2)
  13683.  
  13684. Wait control register 2 (WCR2) is a 32-bit readable/writable register that specifies the number of
  13685. wait state insertion cycles for each area. It also specifies the data access pitch when performing
  13686. burst memory access. This enables low-speed memory to be directly connected without using
  13687. external circuitry.
  13688.  
  13689. WCR2 is initialized to H'FFFEEFFF by a power-on reset, but is not initialized by a manual reset
  13690. or in standby mode.
  13691.  
  13692. Bit: 31 30 29 28 27 26 25 24
  13693.  
  13694. Bit name: A6W2 A6W1 A6W0 A6B2 A6B1 A6B0 A5W2 A5W1
  13695.  
  13696. Initial value: 1 1 1 1 1 1 1 1
  13697.  
  13698. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13699.  
  13700. Bit: 23 22 21 20 19 18 17 16
  13701.  
  13702. Bit name: A5W0 A5B2 A5B1 A5B0 A4W2 A4W1 A4W0 —
  13703.  
  13704. Initial value: 1 1 1 1 1 1 1 0
  13705.  
  13706. R/W: R/W R/W R/W R/W R/W R/W R/W R
  13707.  
  13708. Bit: 15 14 13 12 11 10 9 8
  13709.  
  13710. Bit name: A3W2 A3W1 A3W0 — A2W2 A2W1 A2W0 A1W2
  13711.  
  13712. Initial value: 1 1 1 0 1 1 1 1
  13713.  
  13714. R/W: R/W R/W R/W R R/W R/W R/W R/W
  13715.  
  13716. Bit: 7 6 5 4 3 2 1 0
  13717.  
  13718. Bit name: A1W1 A1W0 A0W2 A0W1 A0W0 A0B2 A0B1 A0B0
  13719.  
  13720. Initial value: 1 1 1 1 1 1 1 1
  13721.  
  13722. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13723.  
  13724. Rev. 2.0, 02/99, page 291 of 830
  13725.  
  13726. ----------------------- Page 306-----------------------
  13727.  
  13728. Bits 31 to 29—Area 6 Wait Control (A6W2—A6W0): These bits specify the number of wait
  13729. states to be inserted for external space area 6.
  13730.  
  13731. Description
  13732.  
  13733. First Cycle
  13734.  
  13735. Bit 31: A6W2 Bit 30: A6W1 Bit 29: A6W0 Inserted Wait States 5'< Pin
  13736. 5'<
  13737.  
  13738. 0 0 0 0 Ignored
  13739.  
  13740. 1 1 Enabled
  13741.  
  13742. 1 0 2 Enabled
  13743.  
  13744. 1 3 Enabled
  13745.  
  13746. 1 0 0 6 Enabled
  13747.  
  13748. 1 9 Enabled
  13749.  
  13750. 1 0 12 Enabled
  13751.  
  13752. 1 15 (Initial value) Enabled
  13753.  
  13754. Bits 28 to 26—Area 6 Burst Pitch (A6B2–A6B0): These bits specify the burst pitch in a burst
  13755. transfer.
  13756.  
  13757. Description
  13758.  
  13759. Burst Cycle (Excluding First Cycle)
  13760.  
  13761. Bit 28: A6B2 Bit 27: A6B1 Bit 26: A6B0 States Per Data Transfer 5'< Pin
  13762. 5'<
  13763.  
  13764. 0 0 0 0 Ignored
  13765.  
  13766. 1 1 Enabled
  13767.  
  13768. 1 0 2 Enabled
  13769.  
  13770. 1 3 Enabled
  13771.  
  13772. 1 0 0 4 Enabled
  13773.  
  13774. 1 5 Enabled
  13775.  
  13776. 1 0 6 Enabled
  13777.  
  13778. 1 7 (Initial value) Enabled
  13779.  
  13780. Rev. 2.0, 02/99, page 292 of 830
  13781.  
  13782. ----------------------- Page 307-----------------------
  13783.  
  13784. Bits 25 to 23—Area 5 Wait Control (A5W2–A5W0): These bits specify the number of wait
  13785. states to be inserted for external space area 5.
  13786.  
  13787. Description
  13788.  
  13789. First Cycle
  13790.  
  13791. Bit 25: A5W2 Bit 24: A5W1 Bit 23: A5W0 Inserted Wait States 5'< Pin
  13792. 5'<
  13793.  
  13794. 0 0 0 0 Ignored
  13795.  
  13796. 1 1 Enabled
  13797.  
  13798. 1 0 2 Enabled
  13799.  
  13800. 1 3 Enabled
  13801.  
  13802. 1 0 0 6 Enabled
  13803.  
  13804. 1 9 Enabled
  13805.  
  13806. 1 0 12 Enabled
  13807.  
  13808. 1 15 (Initial value) Enabled
  13809.  
  13810. Bits 22 to 20—Area 5 Burst Pitch (A5B2–A5B0): These bits specify the burst pitch in a burst
  13811. transfer.
  13812.  
  13813. Description
  13814.  
  13815. Burst Cycle (Excluding First Cycle)
  13816.  
  13817. Bit 22: A5B2 Bit 21: A5B1 Bit 20: A5B0 Burst Pitch Per Data Transfer 5'< Pin
  13818. 5'<
  13819.  
  13820. 0 0 0 0 Ignored
  13821.  
  13822. 1 1 Enabled
  13823.  
  13824. 1 0 2 Enabled
  13825.  
  13826. 1 3 Enabled
  13827.  
  13828. 1 0 0 4 Enabled
  13829.  
  13830. 1 5 Enabled
  13831.  
  13832. 1 0 6 Enabled
  13833.  
  13834. 1 7 (Initial value) Enabled
  13835.  
  13836. Rev. 2.0, 02/99, page 293 of 830
  13837.  
  13838. ----------------------- Page 308-----------------------
  13839.  
  13840. Bits 19 to 17—Area 4 Wait Control (A4W2–A4W0): These bits specify the number of wait
  13841. states to be inserted for external space area 4.
  13842.  
  13843. Description
  13844.  
  13845. Bit 19: A4W2 Bit 18: A4W1 Bit 17: A4W0 Inserted Wait States 5'< Pin
  13846. 5'<
  13847.  
  13848. 0 0 0 0 Ignored
  13849.  
  13850. 1 1 Enabled
  13851.  
  13852. 1 0 2 Enabled
  13853.  
  13854. 1 3 Enabled
  13855.  
  13856. 1 0 0 6 Enabled
  13857.  
  13858. 1 9 Enabled
  13859.  
  13860. 1 0 12 Enabled
  13861.  
  13862. 1 15 (Initial value) Enabled
  13863.  
  13864. Bits 16 and 12—Reserved: These bits are always read as 0, and should only be written with 0.
  13865.  
  13866. Bits 15 to 13—Area 3 Wait Control (A3W2–A3W0): These bits specify the number of wait
  13867. states to be inserted for external space area 3. External wait input is only enabled when normal
  13868. memory is used, and is ignored when DRAM or synchronous DRAM is used.
  13869.  
  13870. • When Normal Memory is Used
  13871.  
  13872. Description
  13873.  
  13874. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Inserted Wait States 5'< Pin
  13875. 5'<
  13876.  
  13877. 0 0 0 0 Ignored
  13878.  
  13879. 1 1 Enabled
  13880.  
  13881. 1 0 2 Enabled
  13882.  
  13883. 1 3 Enabled
  13884.  
  13885. 1 0 0 6 Enabled
  13886.  
  13887. 1 9 Enabled
  13888.  
  13889. 1 0 12 Enabled
  13890.  
  13891. 1 15 (Initial value) Enabled
  13892.  
  13893. Rev. 2.0, 02/99, page 294 of 830
  13894.  
  13895. ----------------------- Page 309-----------------------
  13896.  
  13897. • When DRAM or Synchronous DRAM is Used*1
  13898.  
  13899. Description
  13900.  
  13901. DRAM &$6 Synchronous DRAM
  13902. &$6
  13903. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Assertion Width &$6 Latency Cycles
  13904. &$6
  13905.  
  13906. 0 0 0 1 Inhibited
  13907.  
  13908. 2
  13909. 1 2 1*
  13910.  
  13911. 1 0 3 2
  13912.  
  13913. 1 4 3
  13914.  
  13915. 2
  13916. 1 0 0 7 4*
  13917.  
  13918. 2
  13919. 1 10 5*
  13920.  
  13921. 1 0 13 Inhibited
  13922.  
  13923. 1 16 Inhibited
  13924.  
  13925. Notes: 1. External wait input is always ignored.
  13926. 2. Inhibited in RAS down mode.
  13927.  
  13928. Bits 11 to 9—Area 2 Wait Control (A2W2–A2W0): These bits specify the number of wait
  13929. states to be inserted for external space area 2. External wait input is only enabled when normal
  13930. memory is used, and is ignored when DRAM or synchronous DRAM is used.
  13931.  
  13932. • When Normal Memory is Used
  13933.  
  13934. Description
  13935.  
  13936. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Inserted Wait States 5'< Pin
  13937. 5'<
  13938.  
  13939. 0 0 0 0 Ignored
  13940.  
  13941. 1 1 Enabled
  13942.  
  13943. 1 0 2 Enabled
  13944.  
  13945. 1 3 Enabled
  13946.  
  13947. 1 0 0 6 Enabled
  13948.  
  13949. 1 9 Enabled
  13950.  
  13951. 1 0 12 Enabled
  13952.  
  13953. 1 15 (Initial value) Enabled
  13954.  
  13955. Rev. 2.0, 02/99, page 295 of 830
  13956.  
  13957. ----------------------- Page 310-----------------------
  13958.  
  13959. • When DRAM or Synchronous DRAM is Used*
  13960.  
  13961. Description
  13962.  
  13963. DRAM &$6 Synchronous DRAM
  13964. &$6
  13965. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Assertion Width &$6 Latency Cycles
  13966. &$6
  13967.  
  13968. 0 0 0 1 Inhibited
  13969.  
  13970. 1 2 1
  13971.  
  13972. 1 0 3 2
  13973.  
  13974. 1 4 3
  13975.  
  13976. 1 0 0 7 4
  13977.  
  13978. 1 10 5
  13979.  
  13980. 1 0 13 Inhibited
  13981.  
  13982. 1 16 Inhibited
  13983.  
  13984. Note: * External wait input is always ignored.
  13985.  
  13986. Bits 8 to 6—Area 1 Wait Control (A1W2–A1W0): These bits specify the number of wait
  13987. states to be inserted for external space area 1.
  13988.  
  13989. Description
  13990.  
  13991. Bit 8: A1W2 Bit 7: A1W1 Bit 6: A1W0 Inserted Wait States 5'< Pin
  13992. 5'<
  13993.  
  13994. 0 0 0 0 Ignored
  13995.  
  13996. 1 1 Enabled
  13997.  
  13998. 1 0 2 Enabled
  13999.  
  14000. 1 3 Enabled
  14001.  
  14002. 1 0 0 6 Enabled
  14003.  
  14004. 1 9 Enabled
  14005.  
  14006. 1 0 12 Enabled
  14007.  
  14008. 1 15 (Initial value) Enabled
  14009.  
  14010. Rev. 2.0, 02/99, page 296 of 830
  14011.  
  14012. ----------------------- Page 311-----------------------
  14013.  
  14014. Bits 5 to 3—Area 0 Wait Control (A0W2 to A0W0): These bits specify the number of wait
  14015. states to be inserted for external space area 0.
  14016.  
  14017. Description
  14018.  
  14019. First Cycle
  14020.  
  14021. Bit 5: A0W2 Bit 4: A0W1 Bit 3: A0W0 Inserted Wait States 5'< Pin
  14022. 5'<
  14023.  
  14024. 0 0 0 0 Ignored
  14025.  
  14026. 1 1 Enabled
  14027.  
  14028. 1 0 2 Enabled
  14029.  
  14030. 1 3 Enabled
  14031.  
  14032. 1 0 0 6 Enabled
  14033.  
  14034. 1 9 Enabled
  14035.  
  14036. 1 0 12 Enabled
  14037.  
  14038. 1 15 (Initial value) Enabled
  14039.  
  14040. Bits 2 to 0—Area 0 Burst Pitch (A0B2–A0B0): These bits specify the burst pitch in a burst
  14041. transfer.
  14042.  
  14043. Description
  14044.  
  14045. Burst Cycle (Excluding First Cycle)
  14046.  
  14047. Bit 2: A0B2 Bit 1: A0B1 Bit 0: A0B0 Burst Pitch Per Data Transfer 5'< Pin
  14048. 5'<
  14049.  
  14050. 0 0 0 0 Ignored
  14051.  
  14052. 1 1 Enabled
  14053.  
  14054. 1 0 2 Enabled
  14055.  
  14056. 1 3 Enabled
  14057.  
  14058. 1 0 0 4 Enabled
  14059.  
  14060. 1 5 Enabled
  14061.  
  14062. 1 0 6 Enabled
  14063.  
  14064. 1 7 (Initial value) Enabled
  14065.  
  14066. Rev. 2.0, 02/99, page 297 of 830
  14067.  
  14068. ----------------------- Page 312-----------------------
  14069.  
  14070. • When MPX is Used (Areas 0 to 6)
  14071.  
  14072. Bit 4n + 2: Bit 4n + 1: Bit 4n: Description
  14073. AnW2 AnW1 AnW0
  14074.  
  14075. Inserted Wait States 5'< Pin
  14076. 5'<
  14077.  
  14078. 1st Data 2nd Data
  14079. Onward
  14080.  
  14081. Read Write
  14082.  
  14083. 0 0 0 1 0 0 Enabled
  14084.  
  14085. 1 1 Enabled
  14086.  
  14087. 1 0 2 2 Enabled
  14088.  
  14089. 1 3 3 Enabled
  14090.  
  14091. 1 0 0 1 0 1 Enabled
  14092.  
  14093. 1 1 Enabled
  14094.  
  14095. 1 0 2 2 Enabled
  14096.  
  14097. 1 3 3 Enabled
  14098.  
  14099. (n = 6 to 0)
  14100.  
  14101. Rev. 2.0, 02/99, page 298 of 830
  14102.  
  14103. ----------------------- Page 313-----------------------
  14104.  
  14105. 13.2.5 Wait Control Register 3 (WCR3)
  14106.  
  14107. Wait control register 3 (WCR3) is a 32-bit readable/writable register that specifies the cycles
  14108. inserted in the setup time from the address until assertion of the write strobe, and the data hold
  14109. time from negation of the strobe, for each area. This enables low-speed memory to be directly
  14110. connected without using external circuitry.
  14111.  
  14112. WCR3 is initialized to H'07777777 by a power-on reset, but is not initialized by a manual reset
  14113. or in standby mode.
  14114.  
  14115. Bit: 31 30 29 28 27 26 25 24
  14116.  
  14117. Bit name: — — — — — A6S0 A6H1 A6H0
  14118.  
  14119. Initial value: 0 0 0 0 0 1 1 1
  14120.  
  14121. R/W: R R R R R R/W R/W R/W
  14122.  
  14123. Bit: 23 22 21 20 19 18 17 16
  14124.  
  14125. Bit name: — A5S0 A5H1 A5H0 — A4S0 A4H1 A4H0
  14126.  
  14127. Initial value: 0 1 1 1 0 1 1 1
  14128.  
  14129. R/W: R R/W R/W R/W R R/W R/W R/W
  14130.  
  14131. Bit: 15 14 13 12 11 10 9 8
  14132.  
  14133. Bit name: — A3S0 A3H1 A3H0 — A2S0 A2H1 A2H0
  14134.  
  14135. Initial value: 0 1 1 1 0 1 1 1
  14136.  
  14137. R/W: R R/W R/W R/W R R/W R/W R/W
  14138.  
  14139. Bit: 7 6 5 4 3 2 1 0
  14140.  
  14141. Bit name: — A1S0 A1H1 A0H0 — A0S0 A0H1 A0H0
  14142.  
  14143. Initial value: 0 1 1 1 0 1 1 1
  14144.  
  14145. R/W: R R/W R/W R/W R R/W R/W R/W
  14146.  
  14147. Rev. 2.0, 02/99, page 299 of 830
  14148.  
  14149. ----------------------- Page 314-----------------------
  14150.  
  14151. Bits 31 to 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0, and should
  14152. only be written with 0.
  14153.  
  14154. Valid only for normal memory and burst ROM:
  14155.  
  14156. Bit 4n + 2—Area n (6 to 0) Write Strobe Setup Time (AnS0): Specifies the number of cycles
  14157. inserted in the setup time from the address until assertion of the read/write strobe.
  14158.  
  14159. Bit 4n + 2: AnS0 Waits Inserted in Setup
  14160.  
  14161. 0 0
  14162.  
  14163. 1 1 (Initial value)
  14164.  
  14165. (n = 6 to 0)
  14166.  
  14167. Valid only for normal memory and burst ROM:
  14168.  
  14169. Bits 4n + 1 and 4n—Area n (6 to 0) Data Hold Time (AnH1, AnH0): When writing, these bits
  14170. specify the number of cycles to be inserted in the hold time from negation of the write strobe.
  14171. When reading, they specify the number of cycles to be inserted in the hold time from the data
  14172. sampling timing.
  14173.  
  14174. Bit 4n + 1: AnH1 Bit 4n: AnH0 Waits Inserted in Hold
  14175.  
  14176. 0 0 0
  14177.  
  14178. 1 1
  14179.  
  14180. 1 0 2
  14181.  
  14182. 1 3 (Initial value)
  14183.  
  14184. (n = 6 to 0)
  14185.  
  14186. Rev. 2.0, 02/99, page 300 of 830
  14187.  
  14188. ----------------------- Page 315-----------------------
  14189.  
  14190. 13.2.6 Memory Control Register (MCR)
  14191.  
  14192. The memory control register (MCR) is a 32-bit readable/writable register that specifies 5$6 and
  14193. &$6 timing and burst control for DRAM and synchronous DRAM (areas 2 and 3), address
  14194. multiplexing, and refresh control. This enables DRAM and synchronous DRAM to be directly
  14195. connected without using external circuitry.
  14196.  
  14197. MCR is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset or
  14198. in standby mode. Bits RASD, MRSET, TRC2–0, TPC2–0, RCD1–0, TRWL2–0, TRAS2–0, BE,
  14199. SZ1–0, AMXEXT, AMX2–0, and EDOMODE are written in the initialization following a
  14200. power-on reset, and should not be modified subsequently. When writing to bits RFSH and
  14201. RMODE, the same values should be written to the other bits so that they remain unchanged.
  14202. When using DRAM or synchronous DRAM, areas 2 and 3 should not be accessed until register
  14203. initialization is completed.
  14204.  
  14205. Bit: 31 30 29 28 27 26 25 24
  14206.  
  14207. Bit name: RASD MRSET TRC2 TRC1 TRC0 — — —
  14208.  
  14209. Initial value: 0 0 0 0 0 0 0 0
  14210.  
  14211. R/W: R/W R/W R/W R/W R/W R R R
  14212.  
  14213. Bit: 23 22 21 20 19 18 17 16
  14214.  
  14215. Bit name: TCAS — TPC2 TPC1 TPC0 — RCD1 RCD0
  14216.  
  14217. Initial value: 0 0 0 0 0 0 0 0
  14218.  
  14219. R/W: R/W R R/W R/W R/W R R/W R/W
  14220.  
  14221. Bit: 15 14 13 12 11 10 9 8
  14222.  
  14223. Bit name: TRWL2 TRWL1 TRWL0 TRAS2 TRAS1 TRAS0 BE SZ1
  14224.  
  14225. Initial value: 0 0 0 0 0 0 0 0
  14226.  
  14227. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14228.  
  14229. Bit: 7 6 5 4 3 2 1 0
  14230.  
  14231. Bit name: SZ0 AMXEXT AMX2 AMX1 AMX0 RFSH RMODE EDO
  14232. MODE
  14233.  
  14234. Initial value: 0 0 0 0 0 0 0 0
  14235.  
  14236. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14237.  
  14238. Rev. 2.0, 02/99, page 301 of 830
  14239.  
  14240. ----------------------- Page 316-----------------------
  14241.  
  14242. Bit 31—RAS Down (RASD): Sets RAS down mode. When RAS down mode is used, set BE to
  14243. 1. Do not set RAS down mode in slave mode or partial-sharing mode, or when areas 2 and 3 are
  14244. both designated as synchronous DRAM space.
  14245.  
  14246. Bit 31: RASD Description
  14247.  
  14248. 0 Normal mode (Initial value)
  14249.  
  14250. 1 RAS down mode
  14251.  
  14252. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  14253. and bits A3IW2–A3IW0 to 000.
  14254.  
  14255. Bit 30—Mode Register Set (MRSET): Set when a synchronous DRAM mode register setting is
  14256. used. See Power-On Sequence in section 13.3.5, Synchronous DRAM Interface.
  14257.  
  14258. Bit 30: MRSET Description
  14259.  
  14260. 0 All-bank precharge (Initial value)
  14261.  
  14262. 1 Mode register setting
  14263.  
  14264. Bits 26 to 24, 22, and 18—Reserved: These bits are always read as 0, and should only be
  14265. written with 0.
  14266.  
  14267. Bits 29 to 27—RAS Precharge Time at End of Refresh (TRC2–TRC0)
  14268. (Synchronous DRAM: auto- and self-refresh both enabled; DRAM: auto- and self-refresh both
  14269. enabled)
  14270.  
  14271. RAS Precharge Time
  14272. Bit 29: TRC2 Bit 28: TRC1 Bit 27: TRC0 Immediately after Refresh
  14273.  
  14274. 0 0 0 0 (Initial value)
  14275.  
  14276. 1 3
  14277.  
  14278. 1 0 6
  14279.  
  14280. 1 9
  14281.  
  14282. 1 0 0 12
  14283.  
  14284. 1 15
  14285.  
  14286. 1 0 18
  14287.  
  14288. 1 21
  14289.  
  14290. Rev. 2.0, 02/99, page 302 of 830
  14291.  
  14292. ----------------------- Page 317-----------------------
  14293.  
  14294. Bit 23—CAS Negation Period (TCAS): This bit is valid only when DRAM is connected.
  14295.  
  14296. Bit 23: TCAS CAS Negation Period
  14297.  
  14298. 0 1 (Initial value)
  14299.  
  14300. 1 2
  14301.  
  14302. Bits 21 to 19—RAS Precharge Period (TPC2–TPC0): When the DRAM interface is selected
  14303. for the connected memory, these bits specify the minimum number of cycles until 5$6 is
  14304. asserted again after being negated. When the synchronous DRAM interface is selected, these bits
  14305. specify the minimum number of cycles until the next bank active command is output after
  14306. precharging.
  14307.  
  14308. RAS Precharge Time
  14309.  
  14310. Bit 21: TPC2 Bit 20: TPC1 Bit 19: TPC0 DRAM Synchronous DRAM
  14311.  
  14312. 0 0 0 0 1* (Initial value)
  14313.  
  14314. 1 1 2
  14315.  
  14316. 1 0 2 3
  14317.  
  14318. 1 3 4*
  14319.  
  14320. 1 0 0 4 5*
  14321.  
  14322. 1 5 6*
  14323.  
  14324. 1 0 6 7*
  14325.  
  14326. 1 7 8*
  14327.  
  14328. Note: * Inhibited in RAS down mode.
  14329.  
  14330. Bits 17 and 16—RAS-CAS Delay (RCD1, RCD0): When the DRAM interface is selected for
  14331. the connected memory, these bits set the 5$6-&$6 assertion delay time. When the synchronous
  14332. DRAM interface is selected, these bits set the bank active-read/write command delay time.
  14333.  
  14334. Description
  14335.  
  14336. Bit 17: RCD1 Bit 16: RCD0 DRAM Synchronous DRAM
  14337.  
  14338. 0 0 2 cycles Reserved (Setting prohibited)
  14339.  
  14340. 1 3 cycles 2 cycles
  14341.  
  14342. 1 0 4 cycles 3 cycles
  14343.  
  14344. 1 5 cycles 4 cycles*
  14345.  
  14346. Note: * Inhibited in RAS down mode.
  14347.  
  14348. Rev. 2.0, 02/99, page 303 of 830
  14349.  
  14350. ----------------------- Page 318-----------------------
  14351.  
  14352. Bits 15 to 13—Write Precharge Delay (TRWL2–TRWL0): These bits set the synchronous
  14353. DRAM write precharge delay time. In auto-precharge mode, they specify the time until the next
  14354. bank active command is issued after a write cycle. After a write cycle, the next active command
  14355. is not issued for a period of TPC + TRWL. In RAS down mode, they specify the time until the
  14356. next precharge command is issued. After a write cycle, the next precharge command is not
  14357. issued for a period of TRWL. This setting is valid only when synchronous DRAM is connected.
  14358.  
  14359. Bit 15: TRWL2 Bit 14: TRWL1 Bit 13: TRWL0 Write Precharge ACT Delay Time
  14360.  
  14361. 0 0 0 1 (Initial value)
  14362.  
  14363. 1 2
  14364.  
  14365. 1 0 3*
  14366.  
  14367. 1 4*
  14368.  
  14369. 1 0 0 5*
  14370.  
  14371. 1 Reserved (Setting prohibited)
  14372.  
  14373. 1 0 Reserved (Setting prohibited)
  14374.  
  14375. 1 Reserved (Setting prohibited)
  14376.  
  14377. Note: * Inhibited in RAS down mode.
  14378.  
  14379. Bits 12 to 10—CAS-Before-RAS Refresh 5$6 Assertion Period (TRAS2–TRAS0): When the
  14380. 5$6
  14381. DRAM interface is selected for the connected memory, these bits set the 5$6 assertion period in
  14382. CAS-before-RAS refreshing. When the synchronous DRAM interface is selected, the bank
  14383. active command is not issued for a period of TRC + TRAS after an auto-refresh command is
  14384. issued.
  14385.  
  14386. Bit 12: TRAS2 Bit 11: TRAS1 Bit 10: TRAS0 5$6/DRAM Command
  14387. 5$6
  14388. Assertion Period Interval after
  14389. Synchronous
  14390. DRAM Refresh
  14391.  
  14392. 0 0 0 2 4 + TRC
  14393. (Initial value)
  14394.  
  14395. 1 3 5 + TRC
  14396.  
  14397. 1 0 4 6 + TRC
  14398.  
  14399. 1 5 7 + TRC
  14400.  
  14401. 1 0 0 6 8 + TRC
  14402.  
  14403. 1 7 9 + TRC
  14404.  
  14405. 1 0 8 10 + TRC
  14406.  
  14407. 1 9 11 + TRC
  14408.  
  14409. Rev. 2.0, 02/99, page 304 of 830
  14410.  
  14411. ----------------------- Page 319-----------------------
  14412.  
  14413. Bit 9—Burst Enable (BE): Specifies whether burst access is performed on DRAM. In
  14414. synchronous DRAM access, burst access is always performed regardless of the specification of
  14415. this bit. The DRAM transfer mode depends on EDOMODE.
  14416.  
  14417. BE EDOMODE 8/16/32/64-Bit Transfer 32-Byte Transfer
  14418.  
  14419. 0 0 Single Single
  14420.  
  14421. 1 Setting prohibited Setting prohibited
  14422.  
  14423. 1 0 Single/fast page* Fast page
  14424.  
  14425. 1 EDO EDO
  14426.  
  14427. Note: * In fast page mode, 32-bit or 64-bit transfer with a 16-bit bus, 64-bit transfer with a 32-bit
  14428. bus.
  14429.  
  14430. Bits 8 and 7—Memory Data Size (SZ1, SZ0): These bits specify the memory data size of
  14431. DRAM and synchronous DRAM. This setting has priority over the BCR2 register setting.
  14432.  
  14433. Description
  14434.  
  14435. Bit 8: SZ1 Bit 7: SZ0 DRAM SDRAM
  14436.  
  14437. 0 0 64 bits 64 bits
  14438.  
  14439. 1 Reserved (Setting prohibited) Reserved (Setting prohibited)
  14440.  
  14441. 1 0 16 bits Reserved (Setting prohibited)
  14442.  
  14443. 1 32 bits 32 bits
  14444.  
  14445. Rev. 2.0, 02/99, page 305 of 830
  14446.  
  14447. ----------------------- Page 320-----------------------
  14448.  
  14449. Bits 6 to 3—Address Multiplexing (AMXEXT, AMX2–AMX0): These bits specify address
  14450. multiplexing for DRAM and synchronous DRAM. The actual address shift value is different for
  14451. the DRAM interface and the synchronous DRAM interface.
  14452.  
  14453. • For DRAM Interface:
  14454.  
  14455. Bit 6: Bit 5: Bit 4: Bit 3: Description
  14456. AMXEXT AMX2 AMX1 AMX0
  14457.  
  14458. DRAM
  14459.  
  14460. 0* 0 0 0 8-bit column address product
  14461. (Initial value)
  14462.  
  14463. 1 9-bit column address product
  14464.  
  14465. 1 0 10-bit column address product
  14466.  
  14467. 1 11-bit column address product
  14468.  
  14469. 1 0 0 12-bit column address product
  14470.  
  14471. 1 Reserved (Setting prohibited)
  14472.  
  14473. 1 0 Reserved (Setting prohibited)
  14474.  
  14475. 1 Reserved (Setting prohibited)
  14476.  
  14477. Note: * When the DRAM interface is used, clear the AMXEXT bit to 0.
  14478.  
  14479. Rev. 2.0, 02/99, page 306 of 830
  14480.  
  14481. ----------------------- Page 321-----------------------
  14482.  
  14483. • For Synchronous DRAM Interface:
  14484.  
  14485. AMX AMXEXT SZ Synchronous DRAM BANK
  14486.  
  14487. 0 0 64 (16M: 512k × 16 bits × 2) × 4 a[22]*
  14488.  
  14489. 32 (16M: 512k × 16 bits × 2) × 2 a[21]*
  14490.  
  14491. 1 64 (16M: 512k × 16 bits × 2) × 4 a[21]*
  14492.  
  14493. 32 (16M: 512k × 16 bits × 2) × 2 a[20]*
  14494.  
  14495. 1 0 64 (16M: 1M × 8 bits × 2) × 8 a[23]*
  14496.  
  14497. 32 (16M: 1M × 8 bits × 2) × 4 a[22]*
  14498.  
  14499. 1 64 (16M: 1M × 8 bits × 2) × 8 a[22]*
  14500.  
  14501. 32 (16M: 1M × 8 bits × 2) × 4 a[21]*
  14502.  
  14503. 2 — 64 (64M: 1M × 16 bits × 4) × 4 a[24:23]*
  14504.  
  14505. 32 (64M: 1M × 16 bits × 4) × 2 a[23:22]*
  14506.  
  14507. 3 64 (64M: 2M × 8 bits × 4) × 8 a[25:24]*
  14508.  
  14509. 32 (64M: 2M × 8 bits × 4) × 4 a[24:23]*
  14510.  
  14511. 4 64 (64M: 512k × 32 bits × 4) × 2 a[23:22]*
  14512.  
  14513. 32 (64M: 512k × 32 bits × 4) × 1 a[22:21]*
  14514.  
  14515. 5 64 (64M: 1M × 32 bits × 2) × 2 a[23]*
  14516.  
  14517. 32 (64M: 1M × 32 bits × 2) × 1 a[22]*
  14518.  
  14519. 6 64 Reserved (Setting prohibited)
  14520.  
  14521. 32 Reserved (Setting prohibited)
  14522.  
  14523. 7 64 (16M: 256k × 32 bits × 2) × 2 a[21]*
  14524.  
  14525. 32 (16M: 256k × 32 bits × 2) × 1 a[20]*
  14526.  
  14527. Note: * a[*]: Physical address
  14528.  
  14529. Bit 2—Refresh Control (RFSH): Specifies refresh control. Selects whether refreshing is
  14530. performed for DRAM and synchronous DRAM. When the refresh function is not used, the
  14531. refresh request cycle generation timer can be used as an interval timer.
  14532.  
  14533. Bit 2: RFSH Description
  14534.  
  14535. 0 Refreshing is not performed (Initial value)
  14536.  
  14537. 1 Refreshing is performed
  14538.  
  14539. Rev. 2.0, 02/99, page 307 of 830
  14540.  
  14541. ----------------------- Page 322-----------------------
  14542.  
  14543. Bit 1—Refresh Mode (RMODE): Specifies whether normal refreshing or self-refreshing is
  14544. performed when the RFSH bit is set to 1. When the RFSH bit is 1 and this bit is cleared to 0,
  14545. CAS-before-RAS refreshing or auto-refreshing is performed for DRAM and synchronous
  14546. DRAM, using the cycle set by refresh-related registers RTCNT, RTCOR, and RTCSR. If a
  14547. refresh request is issued during an external bus cycle, the refresh cycle is executed when the bus
  14548. cycle ends. When the RFSH bit is 1 and this bit is set to 1, the self-refresh state is set for DRAM
  14549. and synchronous DRAM, after waiting for the end of any currently executing external bus cycle.
  14550. All refresh requests for memory in the self-refresh state are ignored.
  14551.  
  14552. Bit 1: RMODE Description
  14553.  
  14554. 0 CAS-before-RAS refreshing is performed (when RFSH = 1) (Initial value)
  14555.  
  14556. 1 Self-refreshing is performed (when RFSH = 1)
  14557.  
  14558. Bit 0—EDO Mode (EDOMODE): Used to specify the data sampling timing for data reads
  14559. when using EDO mode DRAM. The setting of this bit does not affect the operation timing of
  14560. memory other than DRAM. Set this bit to 1 only when DRAM is used.
  14561.  
  14562. 13.2.7 PCMCIA Control Register (PCR)
  14563.  
  14564. The PCMCIA control register (PCR) is a 16-bit readable/writable register that specifies the 2(
  14565. and :( signal assertion/negation timing for the PCMCIA interface connected to areas 5 and 6.
  14566. The 2( and :( signal assertion width is set by the wait control bits in the WCR2 register.
  14567.  
  14568. PCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  14569. standby mode.
  14570.  
  14571. Bit: 15 14 13 12 11 10 9 8
  14572.  
  14573. Bit name: A5PCW1 A5PCW0 A6PCW1 A6PCW0 A5TED2 A5TED1 A5TED0 A6TED2
  14574.  
  14575. Initial value: 0 0 0 0 0 0 0 0
  14576.  
  14577. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14578.  
  14579. Bit: 7 6 5 4 3 2 1 0
  14580.  
  14581. Bit name: A6TED1 A6TED0 A5TEH2 A5TEH1 A5TEH0 A6TEH2 A6TEH1 A6TEH0
  14582.  
  14583. Initial value: 0 0 0 0 0 0 0 0
  14584.  
  14585. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14586.  
  14587. Rev. 2.0, 02/99, page 308 of 830
  14588.  
  14589. ----------------------- Page 323-----------------------
  14590.  
  14591. Bits 15 and 14—PCMCIA Wait (A5PCW1, A5PCW0): These bits specify the number of waits
  14592. to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait cycle. The
  14593. setting of these bits is selected when the TC bit is cleared to 0 in the page table entry assistance
  14594. register (PTEA).
  14595.  
  14596. Bit 15: A5PCW1 Bit 14: A5PCW0 Waits Inserted
  14597.  
  14598. 0 0 0 (Initial value)
  14599.  
  14600. 1 15
  14601.  
  14602. 1 0 30
  14603.  
  14604. 1 50
  14605.  
  14606. Bits 13 and 12—PCMCIA Wait (A6PCW1, A6PCW0): These bits specify the number of waits
  14607. to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait cycle. The
  14608. setting of these bits is selected when the TC bit is set to 1 in the page table entry assistance
  14609. register (PTEA).
  14610.  
  14611. Bit 13: A6PCW1 Bit 12: A6PCW0 Waits Inserted
  14612.  
  14613. 0 0 0 (Initial value)
  14614.  
  14615. 1 15
  14616.  
  14617. 1 0 30
  14618.  
  14619. 1 50
  14620.  
  14621. 2( :(
  14622. Bits 11 to 9—Address- / Assertion Delay (A5TED2–A5TED0): These bits set the delay
  14623. 2( :(
  14624. time from address output to 2(/:( assertion on the connected PCMCIA interface. The setting
  14625. of these bits is selected when the TC bit is cleared to 0 in PTEA.
  14626.  
  14627. Bit 11: A5TED2 Bit 10: A5TED1 Bit 9: A5TED0 Waits Inserted
  14628.  
  14629. 0 0 0 0 (Initial value)
  14630.  
  14631. 1 1
  14632.  
  14633. 1 0 2
  14634.  
  14635. 1 3
  14636.  
  14637. 1 0 0 6
  14638.  
  14639. 1 9
  14640.  
  14641. 1 0 12
  14642.  
  14643. 1 15
  14644.  
  14645. Rev. 2.0, 02/99, page 309 of 830
  14646.  
  14647. ----------------------- Page 324-----------------------
  14648.  
  14649. 2( :(
  14650. Bits 8 to 6—Address- / Assertion Delay (A6TED2–A6TED0): These bits set the delay
  14651. 2( :(
  14652. time from address output to 2(/:( assertion on the connected PCMCIA interface. The setting
  14653. of these bits is selected when the TC bit is set to 1 in PTEA.
  14654.  
  14655. Bit 8: A6TED2 Bit 7: A6TED1 Bit 6: A6TED0 Waits Inserted
  14656.  
  14657. 0 0 0 0 (Initial value)
  14658.  
  14659. 1 1
  14660.  
  14661. 1 0 2
  14662.  
  14663. 1 3
  14664.  
  14665. 1 0 0 6
  14666.  
  14667. 1 9
  14668.  
  14669. 1 0 12
  14670.  
  14671. 1 15
  14672.  
  14673. 2( :(
  14674. Bits 5 to 3— / Negation-Address Delay (A5TEH2–A5TEH0): These bits set the address
  14675. 2( :(
  14676. hold delay time from 2(/:( negation in a write on the connected PCMCIA interface or in an
  14677. I/O card read. In the case of a memory card read, the address hold delay time from the data
  14678. sampling timing is set.The setting of these bits is selected when the TC bit is cleared to 0 in
  14679. PTEA.
  14680.  
  14681. Bit 5: A5TEH2 Bit 4: A5TEH1 Bit 3: A5TEH0 Waits Inserted
  14682.  
  14683. 0 0 0 0 (Initial value)
  14684.  
  14685. 1 1
  14686.  
  14687. 1 0 2
  14688.  
  14689. 1 3
  14690.  
  14691. 1 0 0 6
  14692.  
  14693. 1 9
  14694.  
  14695. 1 0 12
  14696.  
  14697. 1 15
  14698.  
  14699. Rev. 2.0, 02/99, page 310 of 830
  14700.  
  14701. ----------------------- Page 325-----------------------
  14702.  
  14703. 2( :(
  14704. Bits 2 to 0— / Negation-Address Delay (A6TEH2–A6TEH0): These bits set the address
  14705. 2( :(
  14706. hold delay time from 2(/:( negation in a write on the connected PCMCIA interface or in an
  14707. I/O card read. In the case of a memory card read, the address hold delay time from the data
  14708. sampling timing is set. The setting of these bits is selected when the TC bit is set to 1 in PTEA.
  14709.  
  14710. Bit 2: A6TEH2 Bit 1: A6TEH1 Bit 0: A6TEH0 Waits Inserted
  14711.  
  14712. 0 0 0 0 (Initial value)
  14713.  
  14714. 1 1
  14715.  
  14716. 1 0 2
  14717.  
  14718. 1 3
  14719.  
  14720. 1 0 0 6
  14721.  
  14722. 1 9
  14723.  
  14724. 1 0 12
  14725.  
  14726. 1 15
  14727.  
  14728. 13.2.8 Synchronous DRAM Mode Register (SDMR)
  14729.  
  14730. The synchronous DRAM mode register (SDMR) is a write-only virtual 16-bit register that is
  14731. written to via the synchronous DRAM address bus, and sets the mode of the area 2 and area 3
  14732. synchronous DRAM.
  14733.  
  14734. Settings for the SDMR register must be made before accessing synchronous DRAM.
  14735.  
  14736. Bit: 15 14 13 12 11 10 9 8
  14737.  
  14738. Bit name:
  14739.  
  14740. Initial value: — — — — — — — —
  14741.  
  14742. R/W: W W W W W W W W
  14743.  
  14744. Bit: 7 6 5 4 3 2 1 0
  14745.  
  14746. Bit name:
  14747.  
  14748. Initial value: — — — — — — — —
  14749.  
  14750. R/W: W W W W W W W W
  14751.  
  14752. Since the address bus, not the data bus, is used to write to the synchronous DRAM mode
  14753. register, if the value to be set is “X” and the SDMR register address is “Y”, value “X” is written
  14754. to the synchronous DRAM mode register by performing a write to address X + Y. When the
  14755. synchronous DRAM bus width is set to 32 bits, as A0 of the synchronous DRAM is connected to
  14756. A2 of the SH7750, and A1 of the synchronous DRAM is connected to A3 of the SH7750, the
  14757. value actually written to the synchronous DRAM is the value of “X” shifted 2 bits to the right.
  14758.  
  14759. Rev. 2.0, 02/99, page 311 of 830
  14760.  
  14761. ----------------------- Page 326-----------------------
  14762.  
  14763. For example, to write H'0230 to the area 2 SDMR register, arbitrary data is written to address
  14764. H'FF900000 (address “Y”) + H'08C0 (value “X”) (= H'FF9008C0). As a result, H'0230 is written
  14765. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  14766.  
  14767. Similarly, to write H'0230 to the area 3 SDMR register, arbitrary data is written to address
  14768. H'FF940000 (address “Y”) + H'08C0 (value “X”) (= H'FF9408C0). As a result, H'0230 is written
  14769. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  14770.  
  14771. The lower 16 bits of the address are set in the synchronous DRAM mode register.
  14772.  
  14773. For a 32-bit bus:
  14774.  
  14775. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  14776.  
  14777. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  14778. DE2 DE1 DE0
  14779.  
  14780. ←→
  14781. 10 bits set in case of 32-bit bus width
  14782.  
  14783. For a 64-bit bus:
  14784.  
  14785. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  14786.  
  14787. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  14788. DE2 DE1 DE0
  14789.  
  14790. ←→
  14791. 10 bits set in case of 64-bit bus width
  14792.  
  14793. LMODE: RAS-CAS latency
  14794. BL: Burst length
  14795. WT: Wrap type (0: Sequential)
  14796.  
  14797. BL LMODE
  14798. 000: Reserved 000: Reserved
  14799. 001: Reserved 001: 1
  14800. 010: 4 010: 2
  14801. 011: 8 011: 3
  14802. 100: Reserved 100: Reserved
  14803. 101: Reserved 101: Reserved
  14804. 110: Reserved 110: Reserved
  14805. 111: Reserved 111: Reserved
  14806.  
  14807. Rev. 2.0, 02/99, page 312 of 830
  14808.  
  14809. ----------------------- Page 327-----------------------
  14810.  
  14811. 13.2.9 Refresh Timer Control/Status Register (RTSCR)
  14812.  
  14813. The refresh timer control/status register (RTSCR) is a 16-bit readable/writable register that
  14814. specifies the refresh cycle and whether interrupts are to be generated.
  14815.  
  14816. RTSCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  14817. standby mode.
  14818.  
  14819. Bit: 15 14 13 12 11 10 9 8
  14820.  
  14821. Bit name: — — — — — — — —
  14822.  
  14823. Initial value: 0 0 0 0 0 0 0 0
  14824.  
  14825. R/W: — — — — — — — —
  14826.  
  14827. Bit: 7 6 5 4 3 2 1 0
  14828.  
  14829. Bit name: CMF CMIE CKS2 CKS1 CKS0 OVF OVIE LMTS
  14830.  
  14831. Initial value: 0 0 0 0 0 0 0 0
  14832.  
  14833. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14834.  
  14835. Bits 15 to 8—Reserved: These bits are always read as 0. For the write values, see section
  14836. 13.2.13, Notes on Accessing Refresh Control Registers.
  14837.  
  14838. Bit 7—Compare-Match Flag (CMF): Status flag that indicates a match between the refresh
  14839. timer counter (RTCNT) and refresh time constant register (RTCOR) values.
  14840.  
  14841. Bit 7: CMF Description
  14842.  
  14843. 0 RTCNT and RTCOR values do not match (Initial
  14844. value)
  14845.  
  14846. [Clearing condition]
  14847. When 0 is written to CMF
  14848.  
  14849. 1 RTCNT and RTCOR values match
  14850.  
  14851. [Setting condition]
  14852. When RTCNT = RTCOR*
  14853.  
  14854. Note: * If 1 is written, the original value is retained.
  14855.  
  14856. Rev. 2.0, 02/99, page 313 of 830
  14857.  
  14858. ----------------------- Page 328-----------------------
  14859.  
  14860. Bit 6—Compare-Match Interrupt Enable (CMIE): Controls generation or suppression of an
  14861. interrupt request when the CMF flag is set to 1 in RTCSR. Do not set this bit to 1 when CAS-
  14862. before-RAS refreshing or auto-refreshing is used.
  14863.  
  14864. Bit 6: CMIE Description
  14865.  
  14866. 0 Interrupt requests initiated by CMF are disabled (Initial value)
  14867.  
  14868. 1 Interrupt requests initiated by CMF are enabled
  14869.  
  14870. Bits 5 to 3—Clock Select Bits (CKS2–CKS0): These bits select the input clock for RTCNT.
  14871. The base clock is the external bus clock (CKIO). The RTCNT count clock is obtained by scaling
  14872. CKIO by the specified factor.
  14873.  
  14874. Bit 5: CKS2 Bit 4: CKS1 Bit 3: CKS0 Description
  14875.  
  14876. 0 0 0 Clock input disabled (Initial value)
  14877.  
  14878. 1 Bus clock (CKIO)/4
  14879.  
  14880. 1 0 CKIO/16
  14881.  
  14882. 1 CKIO/64
  14883.  
  14884. 1 0 0 CKIO/256
  14885.  
  14886. 1 CKIO/1024
  14887.  
  14888. 1 0 CKIO/2048
  14889.  
  14890. 1 CKIO/4096
  14891.  
  14892. Bit 2—Refresh Count Overflow Flag (OVF): Status flag that indicates that the number of
  14893. refresh requests indicated by the refresh count register (RFCR) has exceeded the number
  14894. specified by the LMTS bit in RTCSR.
  14895.  
  14896. Bit 2: OVF Description
  14897.  
  14898. 0 RFCR has not overflowed the count limit indicated by LMTS (Initial value)
  14899.  
  14900. [Clearing condition]
  14901. When 0 is written to OVF
  14902.  
  14903. 1 RFCR has overflowed the count limit indicated by LMTS
  14904.  
  14905. [Setting condition]
  14906. When RFCR overflows the count limit set by LMTS*
  14907.  
  14908. Note: * If 1 is written, the original value is retained.
  14909.  
  14910. Rev. 2.0, 02/99, page 314 of 830
  14911.  
  14912. ----------------------- Page 329-----------------------
  14913.  
  14914. Bit 1—Refresh Count Overflow Interrupt Enable (OVIE): Controls generation or suppression
  14915. of an interrupt request when the OVF flag is set to 1 in RTCSR.
  14916.  
  14917. Bit 1: OVIE Description
  14918.  
  14919. 0 Interrupt requests initiated by OVF are disabled (Initial value)
  14920.  
  14921. 1 Interrupt requests initiated by OVF are enabled
  14922.  
  14923. Bit 0—Refresh Count Overflow Limit Select (LMTS): Specifies the count limit to be
  14924. compared with the refresh count indicated by the refresh count register (RFCR). If the RFCR
  14925. register value exceeds the value specified by LMTS, the OVF flag is set.
  14926.  
  14927. Bit 0: LMTS Description
  14928.  
  14929. 0 Count limit is 1024 (Initial value)
  14930.  
  14931. 1 Count limit is 512
  14932.  
  14933. 13.2.10 Refresh Timer Counter (RTCNT)
  14934.  
  14935. The refresh timer counter (RTCNT) is an 8-bit readable/writable counter that is incremented by
  14936. the input clock (selected by bits CKS2–CKS0 in the RTCSR register). When the RTCNT
  14937. counter value matches the RTCOR register value, the CMF bit is set in the RTCSR register and
  14938. the RTCNT counter is cleared.
  14939.  
  14940. RTCNT is initialized to H'0000 by a power-on reset, but continues to count when a manual reset
  14941. is performed. In standby mode, RTCNT is not initialized, and retains its contents.
  14942.  
  14943. Bit: 15 14 13 12 11 10 9 8
  14944.  
  14945. Bit name: — — — — — — — —
  14946.  
  14947. Initial value: 0 0 0 0 0 0 0 0
  14948.  
  14949. R/W: — — — — — — — —
  14950.  
  14951. Bit: 7 6 5 4 3 2 1 0
  14952.  
  14953. Bit name:
  14954.  
  14955. Initial value: 0 0 0 0 0 0 0 0
  14956.  
  14957. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14958.  
  14959. Rev. 2.0, 02/99, page 315 of 830
  14960.  
  14961. ----------------------- Page 330-----------------------
  14962.  
  14963. 13.2.11 Refresh Time Constant Register (RTCOR)
  14964.  
  14965. The refresh time constant register (RTCOR) is a readable/writable register that specifies the
  14966. upper limit of the RTCNT counter. The RTCOR register and RTCNT counter values (lower 8
  14967. bits) are constantly compared, and when they match the CMF bit is set in the RTCSR register
  14968. and the RTCNT counter is cleared to 0. If the refresh bit (RFSH) has been set to 1 in the
  14969. memory control register (MCR) and CAS-before-RAS has been selected as the refresh mode, a
  14970. memory refresh cycle is generated when the CMF bit is set.
  14971.  
  14972. RTCOR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its
  14973. contents, in a manual reset and in standby mode.
  14974.  
  14975. Bit: 15 14 13 12 11 10 9 8
  14976.  
  14977. Bit name: — — — — — — — —
  14978.  
  14979. Initial value: 0 0 0 0 0 0 0 0
  14980.  
  14981. R/W: — — — — — — — —
  14982.  
  14983. Bit: 7 6 5 4 3 2 1 0
  14984.  
  14985. Bit name:
  14986.  
  14987. Initial value: 0 0 0 0 0 0 0 0
  14988.  
  14989. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14990.  
  14991. Rev. 2.0, 02/99, page 316 of 830
  14992.  
  14993. ----------------------- Page 331-----------------------
  14994.  
  14995. 13.2.12 Refresh Count Register (RFCR)
  14996.  
  14997. The refresh count register (RFCR) is a 10-bit readable/writable counter that counts the number
  14998. of refreshes by being incremented each time the RTCOR register and RTCNT counter values
  14999. match. If the RFCR register value exceeds the count limit specified by the LMTS bit in the
  15000. RTCSR register, the OVF flag is set in the RTCSR register and the RFCR register is cleared.
  15001.  
  15002. RFCR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its contents,
  15003. in a manual reset and in standby mode.
  15004.  
  15005. Bit: 15 14 13 12 11 10 9 8
  15006.  
  15007. Bit name: — — — — — —
  15008.  
  15009. Initial value: 0 0 0 0 0 0 0 0
  15010.  
  15011. R/W: — — — — — — R/W R/W
  15012.  
  15013. Bit: 7 6 5 4 3 2 1 0
  15014.  
  15015. Bit name:
  15016.  
  15017. Initial value: 0 0 0 0 0 0 0 0
  15018.  
  15019. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15020.  
  15021. Rev. 2.0, 02/99, page 317 of 830
  15022.  
  15023. ----------------------- Page 332-----------------------
  15024.  
  15025. 13.2.13 Notes on Accessing Refresh Control Registers
  15026.  
  15027. When the refresh timer control/status register (RTCSR), refresh timer counter (RTCNT), refresh
  15028. time constant register (RTCOR), and refresh count register (RFCR) are written to, a special code
  15029. is added to the data to prevent inadvertent rewriting in the event of program runaway, etc. The
  15030. following procedures should be used for read/write operations.
  15031.  
  15032. Writing to RTCSR, RTCNT, RTCOR, and RFCR: A word transfer instruction must always
  15033. be used when writing to RTCSR, RTCNT, RTCOR, or RFCR. A write cannot be performed with
  15034. a byte transfer instruction.
  15035.  
  15036. When writing to RTCSR, RTCNT, or RTCOR, set B'10100101 in the upper byte and the write
  15037. data in the lower byte, as shown in figure 13.4. When writing to RFCR, set B'101001 in the 6
  15038. bits starting from the MSB in the upper byte, and the write data in the remaining bits.
  15039.  
  15040. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15041. RTCSR,
  15042. RTCNT, 1 0 1 0 0 1 0 1 Write data
  15043. RTCOR
  15044.  
  15045. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15046.  
  15047. 1 0 1 0 0 1 Write data
  15048. RFCR
  15049.  
  15050. Figure 13.4 Writing to RTCSR, RTCNT, RTCOR, and RFCR
  15051.  
  15052. Reading RTCSR, RTCNT, RTCOR, and RFCR: A 16-bit access must always be used when
  15053. reading RTCSR, RTCNT, RTCOR, or RFCR. Undefined bits are read as 0.
  15054.  
  15055. Rev. 2.0, 02/99, page 318 of 830
  15056.  
  15057. ----------------------- Page 333-----------------------
  15058.  
  15059. 13.3 Operation
  15060.  
  15061. 13.3.1 Endian/Access Size and Data Alignment
  15062.  
  15063. The SH7750 supports both big-endian mode, in which the most significant byte (MSByte) is at
  15064. the 0 address end in a string of byte data, and little-endian mode, in which the least significant
  15065. byte (LSByte) is at the 0 address end. The mode is set by means of the MD5 external pin in a
  15066. power-on reset, big-endian mode being set if the MD5 pin is low, and little-endian mode if it is
  15067. high.
  15068.  
  15069. A data bus width of 8, 16, 32, or 64 bits can be selected for normal memory, 16, 32, or 64 bits
  15070. for DRAM, 32 or 64 bits for synchronous DRAM, and 8 or 16 bits for the PCMCIA interface.
  15071. Data alignment is carried out according to the data bus width and endian mode of each device.
  15072. Thus, four read operations are needed to read longword data from an 8-bit device. In the
  15073. SH7750, data alignment and data length conversion between the different interfaces is
  15074. performed automatically.
  15075.  
  15076. The relationship between the endian mode, device data length, and access unit, is shown in
  15077. tables 13.6 to 13.13.
  15078.  
  15079. Rev. 2.0, 02/99, page 319 of 830
  15080.  
  15081. ----------------------- Page 334-----------------------
  15082.  
  15083. Table 13.6 (1) 64-Bit External Device/Big-Endian Access and Data Alignment
  15084.  
  15085. Data Bus
  15086.  
  15087. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  15088.  
  15089. Byte, Adr=8n 1 Data — — — — — — —
  15090. 7–0
  15091.  
  15092. Byte, Adr=8n+1 1 — Data — — — — — —
  15093. 7–0
  15094.  
  15095. Byte, Adr=8n+2 1 — — Data — — — — —
  15096. 7–0
  15097.  
  15098. Byte, Adr=8n+3 1 — — — Data — — — —
  15099. 7–0
  15100.  
  15101. Byte, Adr=8n+4 1 — — — — Data — — —
  15102. 7–0
  15103.  
  15104. Byte, Adr=8n+5 1 — — — — — Data — —
  15105. 7–0
  15106.  
  15107. Byte, Adr=8n+6 1 — — — — — — Data —
  15108. 7–0
  15109.  
  15110. Byte, Adr=8n+7 1 — — — — — — — Data
  15111. 7–0
  15112.  
  15113. Word, Adr=8n 1 Data Data — — — — — —
  15114. 15–8 7–0
  15115.  
  15116. Word, Adr=8n+2 1 — — Data Data — — — —
  15117. 15–8 7–0
  15118.  
  15119. Word, Adr=8n+4 1 — — — — Data Data — —
  15120. 15–8 7–0
  15121.  
  15122. Word, Adr=8n+6 1 — — — — — — Data Data
  15123. 15–8 7–0
  15124.  
  15125. Longword, 1 Data Data Data Data — — — —
  15126. Adr=8n 31–24 23–16 15–8 7–0
  15127.  
  15128. Longword, 1 — — — — Data Data Data Data
  15129. Adr=8n+4 31–24 23–16 15–8 7–0
  15130.  
  15131. Quadword, 1 Data Data Data Data Data Data Data Data
  15132. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  15133.  
  15134. Rev. 2.0, 02/99, page 320 of 830
  15135.  
  15136. ----------------------- Page 335-----------------------
  15137.  
  15138. Table 13.6 (2) 64-Bit External Device/Big-Endian Access and Data Alignment
  15139.  
  15140. Strobe Signals
  15141.  
  15142. :(, :(, :(, :(, :(, :(, :(, :(,
  15143. :( :( :( :( :( :( :( :(
  15144. &$6, &$6, &$6, &$6, &$6, &$6, &$6, &$6,
  15145. &$6 &$6 &$6 &$6 &$6 &$6 &$6 &$6
  15146. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  15147.  
  15148. Byte, Adr=8n 1 Asserted
  15149.  
  15150. Byte, Adr=8n+1 1 Asserted
  15151.  
  15152. Byte, Adr=8n+2 1 Asserted
  15153.  
  15154. Byte, Adr=8n+3 1 Asserted
  15155.  
  15156. Byte, Adr=8n+4 1 Asserted
  15157.  
  15158. Byte, Adr=8n+5 1 Asserted
  15159.  
  15160. Byte, Adr=8n+6 1 Asserted
  15161.  
  15162. Byte, Adr=8n+7 1 Asserted
  15163.  
  15164. Word, Adr=8n 1 Asserted Asserted
  15165.  
  15166. Word, Adr=8n+2 1 Asserted Asserted
  15167.  
  15168. Word, Adr=8n+4 1 Asserted Asserted
  15169.  
  15170. Word, Adr=8n+6 1 Asserted Asserted
  15171.  
  15172. Longword, 1 Asserted Asserted Asserted Asserted
  15173. Adr=8n
  15174.  
  15175. Longword, 1 Asserted Asserted Asserted Asserted
  15176. Adr=8n+4
  15177.  
  15178. Quadword, 1 Asserted Asserted Asserted Asserted Asserted Asserted Asserted Asserted
  15179. Adr=8n
  15180.  
  15181. Rev. 2.0, 02/99, page 321 of 830
  15182.  
  15183. ----------------------- Page 336-----------------------
  15184.  
  15185. Table 13.7 32-Bit External Device/Big-Endian Access and Data Alignment
  15186.  
  15187. Data Bus Strobe Signals
  15188.  
  15189. :(, :(, :(, :(,
  15190. :( :( :( :(
  15191. &$6, &$6, &$6, &$6,
  15192. &$6 &$6 &$6 &$6
  15193. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15194.  
  15195. Byte, Adr=4n 1 Data — — — Asserted
  15196. 7–0
  15197.  
  15198. Byte, Adr=4n+1 1 — Data — — Asserted
  15199. 7–0
  15200.  
  15201. Byte, Adr=4n+2 1 — — Data — Asserted
  15202. 7–0
  15203.  
  15204. Byte, Adr=4n+3 1 — — — Data Asserted
  15205. 7–0
  15206.  
  15207. Word, Adr=4n 1 Data Data — — Asserted Asserted
  15208. 15–8 7–0
  15209.  
  15210. Word, Adr=4n+2 1 — — Data Data Asserted Asserted
  15211. 15–8 7–0
  15212.  
  15213. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15214. Adr=4n 31–24 23–16 15–8 7–0
  15215.  
  15216. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15217. 63–56 55–48 47–40 39–32
  15218.  
  15219. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  15220. 31–24 23–16 15–8 7–0
  15221.  
  15222. Rev. 2.0, 02/99, page 322 of 830
  15223.  
  15224. ----------------------- Page 337-----------------------
  15225.  
  15226. Table 13.8 16-Bit External Device/Big-Endian Access and Data Alignment
  15227.  
  15228. Data Bus Strobe Signals
  15229.  
  15230. :(, :(, :(, :(,
  15231. :( :( :( :(
  15232. &$6, &$6, &$6, &$6,
  15233. &$6 &$6 &$6 &$6
  15234. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15235.  
  15236. Byte, Adr=2n 1 — — Data — Asserted
  15237. 7–0
  15238.  
  15239. Byte, Adr=2n+1 1 — — — Data Asserted
  15240. 7–0
  15241.  
  15242. Word 1 — — Data Data Asserted Asserted
  15243. 15–8 7–0
  15244.  
  15245. Longword 1 — — Data Data Asserted Asserted
  15246. 31–24 23–16
  15247.  
  15248. 2 — — Data Data Asserted Asserted
  15249. 15–8 7–0
  15250.  
  15251. Quadword 1 — — Data Data Asserted Asserted
  15252. 63–56 55–48
  15253.  
  15254. 2 — — Data Data Asserted Asserted
  15255. 47–40 39–32
  15256.  
  15257. 3 — — Data Data Asserted Asserted
  15258. 31–24 23–16
  15259.  
  15260. 4 — — Data Data Asserted Asserted
  15261. 15–8 7–0
  15262.  
  15263. Rev. 2.0, 02/99, page 323 of 830
  15264.  
  15265. ----------------------- Page 338-----------------------
  15266.  
  15267. Table 13.9 8-Bit External Device/Big-Endian Access and Data Alignment
  15268.  
  15269. Data Bus Strobe Signals
  15270.  
  15271. :(, :(, :(, :(,
  15272. :( :( :( :(
  15273. &$6, &$6, &$6, &$6,
  15274. &$6 &$6 &$6 &$6
  15275. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15276.  
  15277. Byte 1 — — — Data Asserted
  15278. 7–0
  15279.  
  15280. Word 1 — — — Data Asserted
  15281. 15–8
  15282.  
  15283. 2 — — — Data Asserted
  15284. 7–0
  15285.  
  15286. Longword 1 — — — Data Asserted
  15287. 31–24
  15288.  
  15289. 2 — — — Data Asserted
  15290. 23–16
  15291.  
  15292. 3 — — — Data Asserted
  15293. 15–8
  15294.  
  15295. 4 — — — Data Asserted
  15296. 7–0
  15297.  
  15298. Quadword 1 — — — Data Asserted
  15299. 63–56
  15300.  
  15301. 2 — — — Data Asserted
  15302. 55–48
  15303.  
  15304. 3 — — — Data Asserted
  15305. 47–40
  15306.  
  15307. 4 — — — Data Asserted
  15308. 39–32
  15309.  
  15310. 5 — — — Data Asserted
  15311. 31–24
  15312.  
  15313. 6 — — — Data Asserted
  15314. 23–16
  15315.  
  15316. 7 — — — Data Asserted
  15317. 15–8
  15318.  
  15319. 8 — — — Data Asserted
  15320. 7–0
  15321.  
  15322. Rev. 2.0, 02/99, page 324 of 830
  15323.  
  15324. ----------------------- Page 339-----------------------
  15325.  
  15326. Table 13.10 (1) 64-Bit External Device/Little-Endian Access and Data Alignment
  15327.  
  15328. Data Bus
  15329.  
  15330. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  15331.  
  15332. Byte, Adr=8n 1 — — — — — — — Data
  15333. 7–0
  15334.  
  15335. Byte, Adr=8n+1 1 — — — — — — Data —
  15336. 7–0
  15337.  
  15338. Byte, Adr=8n+2 1 — — — — — Data — —
  15339. 7–0
  15340.  
  15341. Byte, Adr=8n+3 1 — — — — Data — — —
  15342. 7–0
  15343.  
  15344. Byte, Adr=8n+4 1 — — — Data — — — —
  15345. 7–0
  15346.  
  15347. Byte, Adr=8n+5 1 — — Data — — — — —
  15348. 7–0
  15349.  
  15350. Byte, Adr=8n+6 1 — Data — — — — — —
  15351. 7–0
  15352.  
  15353. Byte, Adr=8n+7 1 Data — — — — — — —
  15354. 7–0
  15355.  
  15356. Word, Adr=8n 1 — — — — — — Data Data
  15357. 15–8 7–0
  15358.  
  15359. Word, Adr=8n+2 1 — — Data Data — —
  15360. 15–8 7–0
  15361.  
  15362. Word, Adr=8n+4 1 — — Data Data — — — —
  15363. 15–8 7–0
  15364.  
  15365. Word, Adr=8n+6 1 Data Data — — — — — —
  15366. 15–8 7–0
  15367.  
  15368. Longword, 1 — — — — Data Data Data Data
  15369. Adr=8n 31–24 23–16 15–8 7–0
  15370.  
  15371. Longword, 1 Data Data Data Data — — — —
  15372. Adr=8n+4 31–24 23–16 15–8 7–0
  15373.  
  15374. Quadword, 1 Data Data Data Data Data Data Data Data
  15375. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  15376.  
  15377. Rev. 2.0, 02/99, page 325 of 830
  15378.  
  15379. ----------------------- Page 340-----------------------
  15380.  
  15381. Table 13.10 (2) 64-Bit External Device/Little-Endian Access and Data Alignment
  15382.  
  15383. Strobe Signals
  15384.  
  15385. :(, :(, :(, :(, :(, :(, :(, :(,
  15386. :( :( :( :( :( :( :( :(
  15387. &$6, &$6, &$6, &$6, &$6, &$6, &$6, &$6,
  15388. &$6 &$6 &$6 &$6 &$6 &$6 &$6 &$6
  15389. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  15390.  
  15391. Byte, Adr=8n 1 Asserted
  15392.  
  15393. Byte, Adr=8n+1 1 Asserted
  15394.  
  15395. Byte, Adr=8n+2 1 Asserted
  15396.  
  15397. Byte, Adr=8n+3 1 Asserted
  15398.  
  15399. Byte, Adr=8n+4 1 Asserted
  15400.  
  15401. Byte, Adr=8n+5 1 Asserted
  15402.  
  15403. Byte, Adr=8n+6 1 Asserted
  15404.  
  15405. Byte, Adr=8n+7 1 Asserted
  15406.  
  15407. Word, Adr=8n 1 Asserted Asserted
  15408.  
  15409. Word, Adr=8n+2 1 Asserted Asserted
  15410.  
  15411. Word, Adr=8n+4 1 Asserted Asserted
  15412.  
  15413. Word, Adr=8n+6 1 Asserted Asserted
  15414.  
  15415. Longword, 1 Asserted Asserted Asserted Asserted
  15416. Adr=8n
  15417.  
  15418. Longword, 1 Asserted Asserted Asserted Asserted
  15419. Adr=8n+4
  15420.  
  15421. Quadword, 1 Asserted Asserted Asserted Asserted Asserted Asserted Asserted Asserted
  15422. Adr=8n
  15423.  
  15424. Rev. 2.0, 02/99, page 326 of 830
  15425.  
  15426. ----------------------- Page 341-----------------------
  15427.  
  15428. Table 13.11 32-Bit External Device/Little-Endian Access and Data Alignment
  15429.  
  15430. Data Bus Strobe Signals
  15431.  
  15432. :(, :(, :(, :(,
  15433. :( :( :( :(
  15434. &$6, &$6, &$6, &$6,
  15435. &$6 &$6 &$6 &$6
  15436. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15437.  
  15438. Byte, Adr=4n 1 — — Data Asserted
  15439. 7–0
  15440.  
  15441. Byte, Adr=4n+1 1 — — Data — Asserted
  15442. 7–0
  15443.  
  15444. Byte, Adr=4n+2 1 — Data — — Asserted
  15445. 7–0
  15446.  
  15447. Byte, Adr=4n+3 1 Data — — — Asserted
  15448. 7–0
  15449.  
  15450. Word, Adr=4n 1 — — Data Data Asserted Asserted
  15451. 15–8 7–0
  15452.  
  15453. Word, Adr=4n+2 1 Data Data — — Asserted Asserted
  15454. 15–8 7–0
  15455.  
  15456. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15457. Adr=4n 31–24 23–16 15–8 7–0
  15458.  
  15459. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15460. 31–24 23–16 15–8 7–0
  15461.  
  15462. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  15463. 63–56 55–48 47–40 39–32
  15464.  
  15465. Rev. 2.0, 02/99, page 327 of 830
  15466.  
  15467. ----------------------- Page 342-----------------------
  15468.  
  15469. Table 13.12 16-Bit External Device/Little-Endian Access and Data Alignment
  15470.  
  15471. Data Bus Strobe Signals
  15472.  
  15473. :(, :(, :(, :(,
  15474. :( :( :( :(
  15475. &$6, &$6, &$6, &$6,
  15476. &$6 &$6 &$6 &$6
  15477. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15478.  
  15479. Byte, Adr=2n 1 — — — Data Asserted
  15480. 7–0
  15481.  
  15482. Byte, Adr=2n+1 1 — — Data — Asserted
  15483. 7–0
  15484.  
  15485. Word 1 — — Data Data Asserted Asserted
  15486. 15–8 7–0
  15487.  
  15488. Longword 1 — — Data Data Asserted Asserted
  15489. 15–8 7–0
  15490.  
  15491. 2 — — Data Data Asserted Asserted
  15492. 31–24 23–16
  15493.  
  15494. Quadword 1 — — Data Data Asserted Asserted
  15495. 15–8 7–0
  15496.  
  15497. 2 — — Data Data Asserted Asserted
  15498. 31–24 23–16
  15499.  
  15500. 3 — — Data Data Asserted Asserted
  15501. 47–40 39–32
  15502.  
  15503. 4 — — Data Data Asserted Asserted
  15504. 63–56 55–48
  15505.  
  15506. Rev. 2.0, 02/99, page 328 of 830
  15507.  
  15508. ----------------------- Page 343-----------------------
  15509.  
  15510. Table 13.13 8-Bit External Device/Little-Endian Access and Data Alignment
  15511.  
  15512. Data Bus Strobe Signals
  15513.  
  15514. :(, :(, :(, :(,
  15515. :( :( :( :(
  15516. &$6, &$6, &$6, &$6,
  15517. &$6 &$6 &$6 &$6
  15518. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15519.  
  15520. Byte 1 — — — Data Asserted
  15521. 7–0
  15522.  
  15523. Word 1 — — — Data Asserted
  15524. 7–0
  15525.  
  15526. 2 — — — Data Asserted
  15527. 15–8
  15528.  
  15529. Longword 1 — — — Data Asserted
  15530. 7–0
  15531.  
  15532. 2 — — — Data Asserted
  15533. 15–8
  15534.  
  15535. 3 — — — Data Asserted
  15536. 23–16
  15537.  
  15538. 4 — — — Data Asserted
  15539. 31–24
  15540.  
  15541. Quadword 1 — — — Data Asserted
  15542. 7–0
  15543.  
  15544. 2 — — — Data Asserted
  15545. 15–8
  15546.  
  15547. 3 — — — Data Asserted
  15548. 23–16
  15549.  
  15550. 4 — — — Data Asserted
  15551. 31–24
  15552.  
  15553. 5 — — — Data Asserted
  15554. 39–32
  15555.  
  15556. 6 — — — Data Asserted
  15557. 47–40
  15558.  
  15559. 7 — — — Data Asserted
  15560. 55–48
  15561.  
  15562. 8 — — — Data Asserted
  15563. 63–56
  15564.  
  15565. Rev. 2.0, 02/99, page 329 of 830
  15566.  
  15567. ----------------------- Page 344-----------------------
  15568.  
  15569. 13.3.2 Areas
  15570.  
  15571. Area 0: For area 0, physical address bits A28 to A26 are 000.
  15572.  
  15573. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function,
  15574. can be connected to this space.
  15575.  
  15576. A bus width of 8, 16, 32, or 64 bits can be selected in a power-on reset by means of external pins
  15577. MD3 and MD4. For details, see Memory Bus Width in section 13.1.5.
  15578.  
  15579. When area 0 space is accessed, the &6 signal is asserted. In addition, the 5' signal, which can
  15580. be used as 2(, and write control signals :( to :(, are asserted.
  15581.  
  15582. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A0W2 to
  15583. A0W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15584. by means of the external wait pin (5'<).
  15585.  
  15586. When the burst function is used, the number of burst cycle transfer states is determined in the
  15587. range 2 to 9 according to the number of waits.
  15588.  
  15589. Area 1: For area 1, physical address bits A28 to A26 are 001.
  15590.  
  15591. Only normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to
  15592. this space.
  15593.  
  15594. A bus width of 8, 16, 32, or 64 bits can be selected with bits A1SZ1 and A1SZ0 in the BCR2
  15595. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  15596. A1SZ1 and A1SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  15597. width of 16, 32, or 64 bits.
  15598.  
  15599. When area 1 space is accessed, the &6 signal is asserted. In addition, the 5' signal, which can
  15600. be used as 2(, and write control signals :( to :(, are asserted.
  15601.  
  15602. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A1W2 to
  15603. A1W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15604. by means of the external wait pin (5'<).
  15605.  
  15606. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15607. 1 and 0–3 cycles, respectively, by means of bit A1S0 and bits A1H1 and A1H0 in the WCR3
  15608. register.
  15609.  
  15610. Rev. 2.0, 02/99, page 330 of 830
  15611.  
  15612. ----------------------- Page 345-----------------------
  15613.  
  15614. Area 2: For area 2, physical address bits A28 to A26 are 010.
  15615.  
  15616. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM,
  15617. can be connected to this space.
  15618.  
  15619. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15620. A2SZ1 and A2SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  15621. should be selected with bits A2SZ1 and A2SZ0 in the BCR2 register. When synchronous DRAM
  15622. is connected, select 32 or 64 bits with the SZ bits in the MCR register. When DRAM is
  15623. connected to area 2, select a bus width of 16 or 32 bits with the SZ bits in MCR. For details, see
  15624. Memory Bus Width in section 13.1.5.
  15625.  
  15626. When area 2 space is accessed, the &6 signal is asserted.
  15627.  
  15628. When normal memory is connected, the 5' signal, which can be used as 2(, and write control
  15629. signals :( to :(, are asserted.
  15630.  
  15631. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A2W2 to
  15632. A2W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15633. by means of the external wait pin (5'<).
  15634.  
  15635. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15636. 1 and 0–3 cycles, respectively, by means of bit A2S0 and bits A2H1 and A2H0 in the WCR3
  15637. register.
  15638.  
  15639. When synchronous DRAM is connected, the 5$6 and &$6 signals, RD/:5 signal, and byte
  15640. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed. 5$6,
  15641. &$6, and data timing control, and address multiplexing control, can be set using the MCR
  15642. register.
  15643.  
  15644. When DRAM is connected, the 5$6 signal, &$6 to &$6 signals, and RD/:5 signal are
  15645. asserted, and address multiplexing is performed. 5$6, &$6, and data timing control, and
  15646. address multiplexing control, can be set using the MCR register.
  15647.  
  15648. Area 3: For area 3, physical address bits A28 to A26 are 011.
  15649.  
  15650. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM,
  15651. can be connected to this space.
  15652.  
  15653. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15654. A3SZ1 and A3SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  15655. should be selected with bits A3SZ1 and A3SZ0 in the BCR2 register. When DRAM is
  15656. connected, 16, 32, or 64 bits can be selected with the SZ bits in the MCR register. When
  15657. synchronous DRAM is connected, select 32 or 64 bits with the SZ bits in MCR. For details, see
  15658. Memory Bus Width in section 13.1.5.
  15659.  
  15660. Rev. 2.0, 02/99, page 331 of 830
  15661.  
  15662. ----------------------- Page 346-----------------------
  15663.  
  15664. When area 3 space is accessed, the &6 signal is asserted.
  15665.  
  15666. When normal memory is connected, the 5' signal, which can be used as 2(, and write control
  15667. signals :( to :(, are asserted.
  15668.  
  15669. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A3W2 to
  15670. A3W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15671. by means of the external wait pin (5'<).
  15672.  
  15673. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15674. 1 and 0–3 cycles, respectively, by means of bit A3S0 and bits A3H1 and A3H0 in the WCR3
  15675. register.
  15676.  
  15677. When synchronous DRAM is connected, the 5$6 and &$6 signals, RD/:5 signal, and byte
  15678. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed. When
  15679. DRAM is connected, the 5$6 signal, &$6 to &$6 signals, and RD/:5 signal are asserted,
  15680. and address multiplexing is performed. 5$6, &$6, and data timing control, and address
  15681. multiplexing control, can be set using the MCR register.
  15682.  
  15683. Area 4: For area 4, physical address bits A28 to A26 are 100.
  15684.  
  15685. Normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to this
  15686. space.
  15687.  
  15688. A bus width of 8, 16, 32, or 64 bits can be selected with bits A4SZ1 and A4SZ0 in the BCR2
  15689. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  15690. A4SZ1 and A4SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  15691. width of 16, 32, or 64 bits. For details, see Memory Bus Width in section 13.1.5.
  15692.  
  15693. When area 4 space is accessed, the &6 signal is asserted, and the 5' signal, which can be used
  15694. as 2(, and write control signals :( to :(, are also asserted.
  15695.  
  15696. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A4W2 to
  15697. A4W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15698. by means of the external wait pin (5'<).
  15699.  
  15700. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15701. 1 and 0–3 cycles, respectively, by means of bit A4S0 and bits A4H1 and A4H0 in the WCR3
  15702. register.
  15703.  
  15704. Rev. 2.0, 02/99, page 332 of 830
  15705.  
  15706. ----------------------- Page 347-----------------------
  15707.  
  15708. Area 5: For area 5, physical address bits A28 to A26 are 101.
  15709.  
  15710. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function,
  15711. and a PCMCIA interface, can be connected to this space.
  15712.  
  15713. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15714. A5SZ1 and A5SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  15715. 32 bits can be selected with bits A5SZ1 and A5SZ0 in BCR2. When MPX is connected, a bus
  15716. width of 32 or 64 bits should be selected with bits A5SZ1 and A5SZ0 in BCR2. When a
  15717. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A5SZ1 and
  15718. A5SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  15719.  
  15720. When area 5 space is accessed with normal memory connected, the &6 signal is asserted. In
  15721. addition, the 5' signal, which can be used as 2(, and write control signals :( to :(, are
  15722. asserted. When a PCMCIA interface is connected, the &($ and &($ signals, the 5' signal,
  15723. which can be used as 2(, and the :(, :(, :(, and :( signals, which can be used as
  15724. :(, ,&,25', ,&,2:5, and 5(*, respectively, are asserted.
  15725.  
  15726. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A5W2 to
  15727. A5W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15728. by means of the external wait pin (5'<).
  15729.  
  15730. When the burst function is used, the number of burst cycle transfer states is determined in the
  15731. range 2 to 9 according to the number of waits.
  15732.  
  15733. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15734. 1 and 0–3 cycles, respectively, by means of bit A5S0 and bits A5H1 and A5H0 in the WCR3
  15735. register.
  15736.  
  15737. When a PCMCIA interface is used, the address/&($/&($ setup and hold times with respect
  15738. to the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A5TED1 and
  15739. A5TED0, and bits A5TEH1 and A5TEH0, in the PCR register. In addition, the number of wait
  15740. cycles can be set in the range 0 to 50 with bits A5PCW1 and A5PCW0. The number of waits set
  15741. in PCR is added to the number of waits set in WCR2.
  15742.  
  15743. Rev. 2.0, 02/99, page 333 of 830
  15744.  
  15745. ----------------------- Page 348-----------------------
  15746.  
  15747. Area 6: For area 6, physical address bits A28 to A26 are 110.
  15748.  
  15749. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function,
  15750. and a PCMCIA interface, can be connected to this space.
  15751.  
  15752. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  15753. A6SZ1 and A6SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  15754. 32 bits can be selected with bits A6SZ1 and A6SZ0 in BCR2. When MPX is connected, a bus
  15755. width of 32 or 64 bits should be selected with bits A6SZ1 and A6SZ0 in BCR2. When a
  15756. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A6SZ1 and
  15757. A6SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  15758.  
  15759. When area 6 space is accessed with normal memory connected, the &6 signal is asserted. In
  15760. addition, the 5' signal, which can be used as 2(, and write control signals :( to :(, are
  15761. asserted. When a PCMCIA interface is connected, the &(% and &(% signals, the 5' signal,
  15762. which can be used as 2(, and the :(, :(, :(, and :( signals, which can be used as
  15763. :(, ,&,25', ,&,2:5, and 5(*, respectively, are asserted.
  15764.  
  15765. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A6W2 to
  15766. A6W0 in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle
  15767. by means of the external wait pin (5'<).
  15768.  
  15769. When the burst function is used, the number of burst cycle transfer states is determined in the
  15770. range 2 to 9 according to the number of waits.
  15771.  
  15772. The read/write strobe signal address and &6 setup and hold times can be set within a range of 0–
  15773. 1 and 0–3 cycles, respectively, by means of bit A6S0 and bits A6H1 and A6H0 in the WCR3
  15774. register.
  15775.  
  15776. When a PCMCIA interface is used, the address/&(%/&(% setup and hold times with respect
  15777. to the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A6TED1 and
  15778. A6TED0, and bits A6TEH1 and A6TEH0, in the PCR register. In addition, the number of wait
  15779. cycles can be set in the range 0 to 50 with bits A6PCW1 and A6PCW0. The number of waits set
  15780. in PCR is added to the number of waits set in WCR2.
  15781.  
  15782. Rev. 2.0, 02/99, page 334 of 830
  15783.  
  15784. ----------------------- Page 349-----------------------
  15785.  
  15786. 13.3.3 Basic Interface
  15787.  
  15788. Basic Timing: The basic interface of the SH7750 uses strobe signal output in consideration of
  15789. the fact that mainly SRAM will be directly connected. Figure 13.5 shows the basic timing of
  15790. normal space accesses. A no-wait normal access is completed in two cycles. The %6 signal is
  15791. asserted for one cycle to indicate the start of a bus cycle. The &6Q signal is asserted on the T1
  15792. rising edge, and negated on the next T2 clock rising edge. Therefore, there is no negation period
  15793. in case of access at minimum pitch.
  15794.  
  15795. There is no access size specification when reading. The correct access start address is output in
  15796. the least significant bit of the address, but since there is no access size specification, 32 bits are
  15797. always read in the case of a 32-bit device, and 16 bits in the case of a 16-bit device. When
  15798. writing, only the :( signal for the byte to be written is asserted. For details, see section 13.3.1,
  15799. Endian/Access Size and Data Alignment.
  15800.  
  15801. Read/write operations for cache fill or copy-back follow the set bus width and transfer a total of
  15802. 32 bytes consecutively. The first access is performed on the data for which there was an access
  15803. request, and the remaining accesses are performed on the data at the 32-byte boundary. The bus
  15804. is not released during this transfer.
  15805.  
  15806. Rev. 2.0, 02/99, page 335 of 830
  15807.  
  15808. ----------------------- Page 350-----------------------
  15809.  
  15810.  
  15811. T1 T2
  15812.  
  15813. CKIO
  15814.  
  15815. A25–A0
  15816.  
  15817. CSn
  15818.  
  15819. RD/WR
  15820.  
  15821. RD
  15822.  
  15823. D63–D0
  15824. (read)
  15825.  
  15826. WEn
  15827.  
  15828. D63–D0
  15829. (write)
  15830.  
  15831. BS
  15832.  
  15833. RDY
  15834.  
  15835. DACKn
  15836. (SA: IO ← memory)
  15837.  
  15838. DACKn
  15839. (SA: IO → memory)
  15840.  
  15841. DACKn
  15842. (DA)
  15843.  
  15844. SA: Single address DMA
  15845. DA: Dual address DMA
  15846.  
  15847.  
  15848. Figure 13.5 Basic Timing of Basic Interface
  15849.  
  15850. Rev. 2.0, 02/99, page 336 of 830
  15851.  
  15852. ----------------------- Page 351-----------------------
  15853.  
  15854. Figures 13.6, 13.7, 13.8, and 13.9 show examples of connection to 64-, 32-, 16-, and 8-bit data
  15855. width SRAM.
  15856.  
  15857. 128K × 8-bit
  15858. SH7750 SRAM
  15859.  
  15860. A19–A3 A16–A0
  15861. CSn CS
  15862. RD OE
  15863. D63–D56 I/O7–I/O0
  15864. WE7 WE
  15865.  
  15866. A16–A0
  15867. CS
  15868. OE
  15869. D55–D48 I/O7–I/O0
  15870. WE6 WE
  15871.  
  15872. A16–A0
  15873. CS
  15874. OE
  15875. D47–D40 I/O7–I/O0
  15876. WE5 WE
  15877.  
  15878. A16–A0
  15879. CS
  15880. OE
  15881. D39–D32 I/O7–I/O0
  15882. WE4 WE
  15883.  
  15884. A16–A0
  15885. CS
  15886. OE
  15887. D31–D24 I/O7–I/O0
  15888. WE3 WE
  15889.  
  15890. A16–A0
  15891. CS
  15892. OE
  15893. D23–D16 I/O7–I/O0
  15894. WE2 WE
  15895.  
  15896. A16–A0
  15897. CS
  15898. OE
  15899. D15–D8 I/O7–I/O0
  15900. WE1 WE
  15901.  
  15902. A16–A0
  15903. CS
  15904. OE
  15905. D7–D0 I/O7–I/O0
  15906. WE0 WE
  15907.  
  15908. Figure 13.6 Example of 64-Bit Data Width SRAM Connection
  15909.  
  15910. Rev. 2.0, 02/99, page 337 of 830
  15911.  
  15912. ----------------------- Page 352-----------------------
  15913.  
  15914. 128K × 8-bit
  15915. SH7750 SRAM
  15916.  
  15917. A18 A16
  15918.  
  15919. • •
  15920. • •
  15921. • •
  15922. • •
  15923. • •
  15924. • •
  15925. • •
  15926. • •
  15927. A2 A0
  15928. CSn CS
  15929. RD OE
  15930. D31 I/O7
  15931.  
  15932. • • • •
  15933. • • • •
  15934. • • •
  15935. • • • •
  15936.  
  15937. D24 I/O0
  15938. WE3 WE
  15939. D23
  15940.  
  15941.  
  15942. D16 A16
  15943.  
  15944. • •
  15945. WE2 • •
  15946. • •
  15947. D15 • •
  15948. A0
  15949. • • CS
  15950. D8 OE
  15951. WE1 I/O7
  15952.  
  15953. • •
  15954. D7 • •
  15955. • •
  15956.  
  15957. • • • •
  15958. • • I/O0
  15959. D0 WE
  15960. WE0
  15961.  
  15962. A16
  15963.  
  15964. A0
  15965. CS
  15966. OE
  15967. I/O7
  15968. • •
  15969. • •
  15970. • •
  15971.  
  15972. • •
  15973.  
  15974. I/O0
  15975. WE
  15976.  
  15977. A16
  15978.  
  15979. A0
  15980. CS
  15981. OE
  15982. I/O7
  15983.  
  15984. I/O0
  15985. WE
  15986.  
  15987. Figure 13.7 Example of 32-Bit Data Width SRAM Connection
  15988.  
  15989. Rev. 2.0, 02/99, page 338 of 830
  15990.  
  15991. ----------------------- Page 353-----------------------
  15992.  
  15993. 128K × 8-bit
  15994. SH7750 SRAM
  15995.  
  15996. A17 A16
  15997.  
  15998.  
  15999. • • •
  16000. • • •
  16001. • • •
  16002. • • •
  16003.  
  16004. A1 A0
  16005. CSn CS
  16006. RD OE
  16007. D15 I/O7
  16008.  
  16009.  
  16010. • •
  16011. • •
  16012. • •
  16013. • •
  16014.  
  16015. D8 I/O0
  16016. WE1 WE
  16017. D7
  16018.  
  16019. • •
  16020. • •
  16021. • •
  16022. • •
  16023.  
  16024. D0 A16
  16025.  
  16026.  
  16027. WE0 •
  16028.  
  16029. A0
  16030. CS
  16031. OE
  16032. I/O7
  16033.  
  16034.  
  16035.  
  16036. I/O0
  16037. WE
  16038.  
  16039. Figure 13.8 Example of 16-Bit Data Width SRAM Connection
  16040.  
  16041. Rev. 2.0, 02/99, page 339 of 830
  16042.  
  16043. ----------------------- Page 354-----------------------
  16044.  
  16045. 128K × 8-bit
  16046. SH7750 SRAM
  16047.  
  16048. A16 A16
  16049.  
  16050. • • • •
  16051. • • • •
  16052. • • • •
  16053.  
  16054. • • • •
  16055.  
  16056. A0 A0
  16057. CSn CS
  16058. RD OE
  16059. D7 I/O7
  16060.  
  16061. • • • •
  16062. • • • •
  16063. • •
  16064. • •
  16065. • • • •
  16066.  
  16067. D0 I/O0
  16068. WE0 WE
  16069.  
  16070. Figure 13.9 Example of 8-Bit Data Width SRAM Connection
  16071.  
  16072. Wait State Control: Wait state insertion on the basic interface can be controlled by the WCR2
  16073. settings. If the WCR2 wait specification bits corresponding to a particular area are not zero, a
  16074. software wait is inserted in accordance with that specification. For details, see section 13.2.4,
  16075. Wait Control Register 2 (WCR2).
  16076.  
  16077. The specified number of Tw cycles are inserted as wait cycles using the basic interface wait
  16078. timing shown in figure 13.10.
  16079.  
  16080. Rev. 2.0, 02/99, page 340 of 830
  16081.  
  16082. ----------------------- Page 355-----------------------
  16083.  
  16084. T1
  16085. Tw T2
  16086.  
  16087. CKIO
  16088.  
  16089. A25–A0
  16090.  
  16091. CSn
  16092.  
  16093. RD/WR
  16094.  
  16095. RD
  16096.  
  16097. D63–D0
  16098. (read)
  16099.  
  16100. WEn
  16101.  
  16102. D63–D0
  16103. (write)
  16104.  
  16105. BS
  16106.  
  16107. RDY
  16108.  
  16109. DACKn
  16110. (SA: IO ← memory)
  16111.  
  16112. DACKn
  16113. (SA: IO → memory)
  16114.  
  16115. DACKn
  16116. (DA)
  16117.  
  16118. Figure 13.10 Basic Interface Wait Timing (Software Wait Only)
  16119.  
  16120. Rev. 2.0, 02/99, page 341 of 830
  16121.  
  16122. ----------------------- Page 356-----------------------
  16123.  
  16124. When software wait insertion is specified by WCR2, the external wait input 5'< signal is also
  16125. sampled. 5'< signal sampling is shown in figure 13.11. A single-cycle wait is specified as a
  16126. software wait. Sampling is performed at the transition from the Tw state to the T2 state;
  16127. therefore, the 5'< signal has no effect if asserted in the T1 cycle or the first Tw cycle. The
  16128. 5'< signal is sampled on the rising edge of the clock.
  16129.  
  16130.  
  16131. T1 Tw Twe T2
  16132.  
  16133. CKIO
  16134.  
  16135. A25–A0
  16136.  
  16137. CSn
  16138.  
  16139. RD/WR
  16140.  
  16141. RD
  16142. (read)
  16143.  
  16144. D63–D0
  16145. (read)
  16146.  
  16147. WEn
  16148. (write)
  16149.  
  16150. D63–D0
  16151. (write)
  16152.  
  16153. BS
  16154.  
  16155. RDY
  16156.  
  16157. DACKn
  16158. (SA: IO ← memory)
  16159.  
  16160. DACKn
  16161. (SA: IO → memory)
  16162.  
  16163. DACKn
  16164. (DA)
  16165.  
  16166. Figure 13.11 Basic Interface Wait State Timing (Wait State Insertion by 5'< Signal)
  16167. 5'<
  16168.  
  16169. Rev. 2.0, 02/99, page 342 of 830
  16170.  
  16171. ----------------------- Page 357-----------------------
  16172.  
  16173. 13.3.4 DRAM Interface
  16174.  
  16175. Direct Connection of DRAM: When the memory type bits (DRAMTP2–0) in BCR1 are set to
  16176. 100, area 3 becomes DRAM space; when set to 101, area 2 and area 3 become DRAM space.
  16177. The DRAM interface function can then be used to connect DRAM directly to the SH7750.
  16178.  
  16179. 16, 32, or 64 bits can be selected as the interface data width for area 3 when bits DRAMTP2–0
  16180. are set to 100, and 16 or 32 bits can be used for both area 2 and area 3 when bits DRAMTP2–0
  16181. are set to 101.
  16182.  
  16183. 2-CAS 16-bit DRAMs can be connected, since &$6 is used to control byte access.
  16184.  
  16185. Signals used for connection when DRAM is connected to area 3 are 5$6, &$6 to &$6, and
  16186. RD/:5. &$6 to &$6 are not used when the data width is 16 bits. When DRAM is connected
  16187. to areas 2 and 3, the signals for area 2 DRAM connection are 5$6, &$6 to &$6, and
  16188. RD/:5, and those for area 3 DRAM connection are 5$6, &$6 to &$6, and RD/:5.
  16189.  
  16190. In addition to normal read and write access modes, fast page mode is supported for burst access.
  16191. For DRAM connected to areas 2 and 3, EDO mode, which enables the DRAM access time to be
  16192. increased, is supported.
  16193.  
  16194. Rev. 2.0, 02/99, page 343 of 830
  16195.  
  16196. ----------------------- Page 358-----------------------
  16197.  
  16198. 1M × 16-bit
  16199. SH7750 DRAM
  16200.  
  16201. A12–A3 A9–A0
  16202. RAS RAS
  16203. CS3 OE
  16204. RD/WR WE
  16205. D63–D48 I/O15–I/O0
  16206. WE7 UCAS
  16207. WE6 LCAS
  16208.  
  16209. A9–A0
  16210. RAS
  16211. OE
  16212. WE
  16213. D47–D32 I/O15–I/O0
  16214. WE5 UCAS
  16215. WE4 LCAS
  16216.  
  16217. A9–A0
  16218. RAS
  16219. OE
  16220. WE
  16221. D31–D16 I/O15–I/O0
  16222. WE3 UCAS
  16223. WE2 LCAS
  16224.  
  16225. A9–A0
  16226. RAS
  16227. OE
  16228. WE
  16229. D15–D0 I/O15–I/O0
  16230. WE1 UCAS
  16231. WE0 LCAS
  16232.  
  16233. Figure 13.12 Example of DRAM Connection (64-Bit Data Width, Area 3)
  16234.  
  16235. Rev. 2.0, 02/99, page 344 of 830
  16236.  
  16237. ----------------------- Page 359-----------------------
  16238.  
  16239. 256K × 16-bit
  16240. SH7750 DRAM
  16241.  
  16242. A10 A8
  16243.  
  16244.  
  16245. • • • •
  16246. • • • •
  16247. • •
  16248. • •
  16249. • • • •
  16250. A2 A0
  16251.  
  16252.  
  16253. RAS RAS
  16254. CS3 OE
  16255. RD/WR WE
  16256. D31 I/O15
  16257.  
  16258.  
  16259. • •
  16260. • •
  16261. • •
  16262. • •
  16263. • •
  16264. • •
  16265. • •
  16266. • •
  16267. D16 I/O0
  16268. CAS3 UCAS
  16269. CAS2 LCAS
  16270. D15
  16271.  
  16272. • •
  16273. • •
  16274. • •
  16275.  
  16276. • •
  16277. D0
  16278. A8
  16279.  
  16280. CAS1 • •
  16281. • •
  16282. • •
  16283.  
  16284. CAS0 • •
  16285. A0
  16286.  
  16287.  
  16288. RAS
  16289. OE
  16290. WE
  16291. I/O15
  16292.  
  16293. • •
  16294. • •
  16295. • •
  16296. • •
  16297. I/O0
  16298. UCAS
  16299. LCAS
  16300.  
  16301. Figure 13.13 Example of DRAM Connection (32-Bit Data Width, Area 3)
  16302.  
  16303. Rev. 2.0, 02/99, page 345 of 830
  16304.  
  16305. ----------------------- Page 360-----------------------
  16306.  
  16307. 256K × 16-bit
  16308. SH7750 DRAM
  16309.  
  16310. A9 A8
  16311.  
  16312. • • • •
  16313. • • • •
  16314. • • • •
  16315. • • • •
  16316. A1 A0
  16317. CS3
  16318. CS2
  16319. RAS RAS Area 3
  16320.  
  16321. RAS2 OE
  16322. RD/WR WE
  16323. D15 I/O15
  16324.  
  16325. • • • •
  16326. • • • •
  16327. • • • •
  16328. • • • •
  16329. D0 I/O0
  16330. CAS1 UCAS
  16331. CAS0 LCAS
  16332.  
  16333. CAS5
  16334. CAS4
  16335.  
  16336. A8
  16337.  
  16338. • •
  16339. • •
  16340. • •
  16341. • •
  16342. A0
  16343. RAS
  16344. OE
  16345. Area 2
  16346. WE
  16347. I/O15
  16348. • •
  16349. • •
  16350. • •
  16351.  
  16352. • •
  16353. I/O0
  16354. UCAS
  16355. LCAS
  16356.  
  16357. Figure 13.14 Example of DRAM Connection (16-Bit Data Width, Areas 2 and 3)
  16358.  
  16359. Rev. 2.0, 02/99, page 346 of 830
  16360.  
  16361. ----------------------- Page 361-----------------------
  16362.  
  16363. Address Multiplexing: When area 2 or area 3 is designated as DRAM space, address
  16364. multiplexing is always performed in accesses to DRAM. This enables DRAM, which requires
  16365. row and column address multiplexing, to be connected directly to the SH7750 without using an
  16366. external address multiplexer circuit. Any of the five multiplexing methods shown below can be
  16367. selected, by setting bits AMXEXT and AMX2–0 in MCR for area 2 or 3 DRAM. The
  16368. relationship between the AMXEXT and AMX2–0 bits and address multiplexing is shown in
  16369. table 13.14. The address output pins subject to address multiplexing are A17 to A1. The address
  16370. signals output by pins A25 to A18 are undefined.
  16371.  
  16372. Table 13.14 Relationship between AMXEXT and AMX2–0 Bits and Address Multiplexing
  16373.  
  16374. Setting Number External Address Pins
  16375. of Column
  16376. Address
  16377. Bits
  16378.  
  16379. AMXEXT AMX2 AMX1 AMX0 Output Timing A1–A13 A14 A15 A16 A17
  16380.  
  16381. 0 0 0 0 8 bits Column address A1–A13 A14 A15 A16 A17
  16382.  
  16383. Row address A9–A21 A22 A23 A24 A25
  16384.  
  16385. 1 9 bits Column address A1–A13 A14 A15 A16 A17
  16386.  
  16387. Row address A10–A22 A23 A24 A25 A17
  16388.  
  16389. 1 0 10 bits Column address A1–A13 A14 A15 A16 A17
  16390.  
  16391. Row address A11–A23 A24 A25 A16 A17
  16392.  
  16393. 1 11 bits Column address A1–A13 A14 A15 A16 A17
  16394.  
  16395. Row address A12–A24 A25 A15 A16 A17
  16396.  
  16397. 1 0 0 12 bits Column address A1–A13 A14 A15 A16 A17
  16398.  
  16399. Row address A13–A25 A14 A15 A16 A17
  16400.  
  16401. Other settings Reserved — — — — — —
  16402.  
  16403. Rev. 2.0, 02/99, page 347 of 830
  16404.  
  16405. ----------------------- Page 362-----------------------
  16406.  
  16407. Basic Timing: The basic timing for DRAM access is 4 cycles. This basic timing is shown in
  16408. figure 13.15. Tpc is the precharge cycle, Tr the 5$6 assert cycle, Tc1 the &$6 assert cycle, and
  16409. Tc2 the read data latch cycle.
  16410.  
  16411.  
  16412. Tr1 Tr2 Tc1 Tc2 Tpc
  16413.  
  16414. CKIO
  16415.  
  16416. A25–A0 Row Column
  16417.  
  16418. CSn
  16419.  
  16420. RD/WR
  16421.  
  16422. RAS
  16423.  
  16424. CAS
  16425.  
  16426. D63–D0
  16427. (read)
  16428.  
  16429. D63–D0
  16430. (write)
  16431.  
  16432. BS
  16433.  
  16434. DACKn
  16435. (SA: IO ← memory)
  16436.  
  16437. DACKn
  16438. (SA: IO → memory)
  16439.  
  16440. Figure 13.15 Basic DRAM Access Timing
  16441.  
  16442. Rev. 2.0, 02/99, page 348 of 830
  16443.  
  16444. ----------------------- Page 363-----------------------
  16445.  
  16446. Wait State Control: As the clock frequency increases, it becomes impossible to complete all
  16447. states in one cycle as in basic access. Therefore, provision is made for state extension by using
  16448. the setting bits in WCR2 and MCR. The timing with state extension using these settings is
  16449. shown in figure 13.16. Additional Tpc cycles (cycles used to secure the 5$6 precharge time)
  16450. can be inserted by means of the TPC bit in MCR, giving from 1 to 7 cycles. The number of
  16451. cycles from 5$6 assertion to &$6 assertion can be set to between 2 and 5 by inserting Trw
  16452. cycles by means of the RCD bit in MCR. Also, the number of cycles from &$6 assertion to the
  16453. end of the access can be varied between 1 and 16 according to the setting of A2W2 to A2W0 or
  16454. A3W2 to A3W0 in WCR2.
  16455.  
  16456.  
  16457. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  16458.  
  16459. CKIO
  16460.  
  16461. A25–A0 Row Column
  16462.  
  16463. CSn
  16464.  
  16465. RD/WR
  16466.  
  16467. RAS
  16468.  
  16469. CAS
  16470.  
  16471. D63–D0
  16472. (read)
  16473.  
  16474. D63–D0
  16475. (write)
  16476.  
  16477. BS
  16478.  
  16479. DACKn
  16480. (SA: IO ← memory)
  16481.  
  16482. DACKn
  16483. (SA: IO → memory)
  16484.  
  16485. Figure 13.16 DRAM Wait State Timing
  16486.  
  16487. Rev. 2.0, 02/99, page 349 of 830
  16488.  
  16489. ----------------------- Page 364-----------------------
  16490.  
  16491. Burst Access: In addition to the normal DRAM access mode in which a row address is output in
  16492. each data access, a fast page mode is also provided for the case where consecutive accesses are
  16493. made to the same row. This mode allows fast access to data by outputting the row address only
  16494. once, then changing only the column address for each subsequent access. Normal access or burst
  16495. access using fast page mode can be selected by means of the burst enable (BE) bit in MCR. The
  16496. timing for burst access using fast page mode is shown in figure 13.17.
  16497.  
  16498. In burst transfer, 4 (longword access) or 32 (cache fill or cache write-back) bytes of data are
  16499. burst-transferred in the case of a 16-bit bus size. With a 32-bit bus size, 32 bytes of data are
  16500. burst-transferred (cache fill or cache write-back). In a 32-byte burst transfer (cache fill), the first
  16501. access comprises a longword that includes the data requiring access. The remaining accesses are
  16502. performed on 32-byte boundary data that includes the relevant data. In burst transfer (cache
  16503. write-back), wraparound writing is performed for 32-byte boundary data.
  16504.  
  16505. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tpc
  16506.  
  16507. CKIO
  16508.  
  16509. A25–A0 r c1 c2 c3 c4
  16510.  
  16511. CSn
  16512.  
  16513. RD/WR
  16514.  
  16515. RAS
  16516.  
  16517. CAS
  16518.  
  16519. D63–D0
  16520. d1 d2 d3 d4
  16521. (read)
  16522.  
  16523. D63–D0
  16524. d1 d2 d3 d4
  16525. (write)
  16526.  
  16527. BS
  16528.  
  16529. DACKn
  16530. (SA: IO ← memory)
  16531.  
  16532. DACKn
  16533. (SA: IO → memory)
  16534.  
  16535. Figure 13.17 DRAM Burst Access Timing
  16536.  
  16537. Rev. 2.0, 02/99, page 350 of 830
  16538.  
  16539. ----------------------- Page 365-----------------------
  16540.  
  16541. EDO Mode: With DRAM, in addition to the mode in which data is output to the data bus only
  16542. while the &$6 signal is asserted in a data read cycle, an EDO (extended data out) mode is also
  16543. provided in which, once the &$6 signal is asserted while the 5$6 signal is asserted, even if the
  16544. &$6 signal is negated, data is output to the data bus until the &$6 signal is next asserted. In the
  16545. SH7750, the EDO mode bit (EDOMODE) in MCR enables either normal access/burst access
  16546. using fast page mode, or EDO mode normal access/burst access, to be selected for DRAM.
  16547. When EDO mode is set, BE must be set to 1 in MCR. EDO mode normal access is shown in
  16548. figure 13.18, and burst access in figure 13.19.
  16549.  
  16550. CAS Negation Period: The CAS negation period can be set to 1 or 2 by means of the TCAS bit
  16551. in the MCR register.
  16552.  
  16553. Tr1 Tr2 Tc1 Tc2 Tce Tpc
  16554.  
  16555. CKIO
  16556.  
  16557.  
  16558.  
  16559.  
  16560. A25–A0 Row Column
  16561.  
  16562.  
  16563.  
  16564.  
  16565. CSn
  16566.  
  16567.  
  16568.  
  16569. RD/WR
  16570.  
  16571.  
  16572.  
  16573.  
  16574. RAS
  16575.  
  16576.  
  16577.  
  16578.  
  16579. CASn
  16580.  
  16581. D63–D0
  16582.  
  16583. (read)
  16584.  
  16585.  
  16586.  
  16587.  
  16588.  
  16589. BS
  16590.  
  16591.  
  16592.  
  16593. DACKn
  16594. (SA: IO ← memory)
  16595.  
  16596. Figure 13.18 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  16597.  
  16598. Rev. 2.0, 02/99, page 351 of 830
  16599.  
  16600. ----------------------- Page 366-----------------------
  16601.  
  16602. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  16603.  
  16604. CKIO
  16605.  
  16606. A25–A0 r c1 c2 c3 c4
  16607.  
  16608. CSn
  16609.  
  16610. RD/WR
  16611.  
  16612. RAS
  16613.  
  16614. CAS
  16615.  
  16616. D63–D0
  16617. d1 d2 d3 d4
  16618. (read)
  16619.  
  16620. BS
  16621.  
  16622. DACKn
  16623. (SA: IO ← memory)
  16624.  
  16625. Figure 13.19 Burst Access Timing in DRAM EDO Mode
  16626.  
  16627. RAS Down Mode: The SH7750 has an address comparator for detecting row address matches in
  16628. burst mode. By using this address comparator, and also setting RAS down mode specification bit
  16629. RASD to 1, it is possible to select RAS down mode, in which 5$6 remains asserted after the
  16630. end of an access. When RAS down mode is used, if the refresh cycle is longer than the
  16631. maximum DRAM 5$6 assert time, the refresh cycle must be decreased to or below the
  16632. maximum value of t .
  16633. RAS
  16634.  
  16635. RAS down mode can only be used when DRAM is connected in area 3.
  16636.  
  16637. In RAS down mode, in the event of an access to an address with a different row address, an
  16638. access to a different area, a refresh request, or a bus request, 5$6 is negated and the necessary
  16639. operation is performed. When DRAM access is resumed after this, since this is the start of RAS
  16640. down mode, the operation starts with row address output. Timing charts are shown in figures
  16641. 13.20 (1), (2), (3), and (4).
  16642.  
  16643. Rev. 2.0, 02/99, page 352 of 830
  16644.  
  16645. ----------------------- Page 367-----------------------
  16646.  
  16647. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  16648.  
  16649. CKIO
  16650.  
  16651. A25–A0 r c1 c2 c3 c4
  16652.  
  16653. CSn
  16654.  
  16655. RD/WR
  16656.  
  16657. RAS
  16658.  
  16659. CAS
  16660.  
  16661. D63–D0
  16662. d1 d2 d3 d4
  16663. (read)
  16664.  
  16665. D63–D0
  16666. d1 d2 d3 d4
  16667. (write)
  16668.  
  16669. BS
  16670.  
  16671. DACKn
  16672. (SA: IO ← memory)
  16673.  
  16674. DACKn
  16675. (SA: IO → memory)
  16676.  
  16677. Figure 13.20 (1) DRAM Burst Bus Cycle, RAS Down Mode Start
  16678. (Fast Page Mode, RCD = 0, Anw = 0)
  16679.  
  16680. Rev. 2.0, 02/99, page 353 of 830
  16681.  
  16682. ----------------------- Page 368-----------------------
  16683.  
  16684. Tnop Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  16685.  
  16686. CKIO
  16687.  
  16688.  
  16689.  
  16690. A25–A0 c0 c1 c2 c3
  16691.  
  16692.  
  16693.  
  16694.  
  16695. CSn
  16696.  
  16697.  
  16698. RD/WR
  16699.  
  16700.  
  16701. End of RAS down mode
  16702. RAS
  16703.  
  16704.  
  16705.  
  16706. CASn
  16707.  
  16708. D63–D0
  16709.  
  16710. (read) d0 d1 d2 d3
  16711.  
  16712.  
  16713.  
  16714.  
  16715.  
  16716.  
  16717. D63–D0
  16718. d0 d1 d2 d3
  16719. (write)
  16720.  
  16721.  
  16722.  
  16723. BS
  16724.  
  16725.  
  16726. DACKn
  16727. (SA: IO ← memory)
  16728.  
  16729.  
  16730.  
  16731. DACKn
  16732. (SA: IO → memory)
  16733.  
  16734. Figure 13.20 (2) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  16735. (Fast Page Mode, RCD = 0, Anw = 0)
  16736.  
  16737. Rev. 2.0, 02/99, page 354 of 830
  16738.  
  16739. ----------------------- Page 369-----------------------
  16740.  
  16741. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  16742.  
  16743. CKIO
  16744.  
  16745. A25–A0 r c1 c2 c3 c4
  16746.  
  16747. CSn
  16748.  
  16749. RD/WR
  16750.  
  16751. RAS
  16752.  
  16753. CAS
  16754.  
  16755. D63–D0
  16756. d1 d2 d3 d4
  16757. (read)
  16758.  
  16759. BS
  16760.  
  16761. DACKn
  16762. (SA: IO ← memory)
  16763.  
  16764. Figure 13.20 (3) DRAM Burst Bus Cycle, RAS Down Mode Start
  16765. (EDO Mode, RCD = 0, Anw = 0)
  16766.  
  16767. Rev. 2.0, 02/99, page 355 of 830
  16768.  
  16769. ----------------------- Page 370-----------------------
  16770.  
  16771. Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  16772.  
  16773. CKIO
  16774.  
  16775. A25–A0 c1 c2 c3 c4
  16776.  
  16777. CSn
  16778.  
  16779. RD/WR
  16780.  
  16781. End of RAS down mode
  16782.  
  16783. RAS
  16784.  
  16785. CAS
  16786.  
  16787. D63–D0
  16788. d1 d2 d3 d4
  16789. (read)
  16790.  
  16791. BS
  16792.  
  16793. DACKn
  16794. (SA: IO ← memory)
  16795.  
  16796. Figure 13.20 (4) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  16797. (EDO Mode, RCD = 0, Anw = 0)
  16798.  
  16799. Refresh Timing: The bus state controller includes a function for controlling DRAM refreshing.
  16800. Distributed refreshing using a CAS-before-RAS cycle can be performed for DRAM by clearing
  16801. the RMODE bit to 0 and setting the RFSH bit to 1 in MCR. Self-refresh mode is also supported.
  16802.  
  16803. When CAS-before-RAS refresh cycles are executed, refreshing is performed at intervals
  16804. determined by the input clock selected by bits CKS2–CKS0 in RTCSR, and the value set in
  16805. RTCOR. The value of bits CKS2–CKS0 in RTCOR should be set so as to satisfy the
  16806. specification for the DRAM refresh interval. First make the settings for RTCOR, RTCNT, and
  16807. the RMODE and RFSH bits in MCR, then make the CKS2–CKS0 setting. When the clock is
  16808. selected by CKS2–CKS0, RTCNT starts counting up from the value at that time. The RTCNT
  16809. value is constantly compared with the RTCOR value, and if the two values are the same, a
  16810. refresh request is generated and the %$&. pin goes high. If the SH7750’s external bus can be
  16811. used, CAS-before-RAS refreshing is performed. At the same time, RTCNT is cleared to zero and
  16812. the count-up is restarted. Figure 13.21 shows the operation of CAS-before-RAS refreshing.
  16813.  
  16814. Rev. 2.0, 02/99, page 356 of 830
  16815.  
  16816. ----------------------- Page 371-----------------------
  16817.  
  16818. RTCOR value RTCNT cleared to 0 when
  16819. RTCNT = RTCOR
  16820. RTCNT
  16821.  
  16822. H'00000000 Time
  16823.  
  16824. RTCSR.CKS2–0 = 000 ≠ 000
  16825.  
  16826. Refresh
  16827. request
  16828.  
  16829. Refresh request cleared
  16830.  
  16831. by start of refresh cycle
  16832. External bus
  16833.  
  16834. CAS-before-RAS refresh cycle
  16835.  
  16836. Figure 13.21 CAS-Before-RAS Refresh Operation
  16837.  
  16838. Figure 13.22 shows the timing of the CAS-before-RAS refresh cycle.
  16839.  
  16840. The number of RAS assert cycles in the refresh cycle is specified by bits TRAS2–TRAS0 in
  16841. MCR. The specification of the RAS precharge time in the refresh cycle is determined by the
  16842. setting of bits TRC2–TRC0 in MCR.
  16843.  
  16844. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  16845.  
  16846. CKIO
  16847.  
  16848. A25–A0
  16849.  
  16850. CSn
  16851.  
  16852. RD/WR
  16853.  
  16854. RAS
  16855.  
  16856. CAS
  16857.  
  16858. D63–D0
  16859.  
  16860. BS
  16861.  
  16862. Figure 13.22 DRAM CAS-Before-RAS Refresh Cycle Timing (TRAS = 0, TRC = 1)
  16863.  
  16864. Rev. 2.0, 02/99, page 357 of 830
  16865.  
  16866. ----------------------- Page 372-----------------------
  16867.  
  16868. The self-refreshing supported by the SH7750 is shown in figure 13.23.
  16869.  
  16870. After the self-refresh is cleared, the refresh controller immediately generates a refresh request.
  16871. The RAS precharge time immediately after the end of the self-refreshing can be set by bits
  16872. TRC2–TRC0 in MCR.
  16873.  
  16874. DRAMs include low-power products (L versions) with a long refresh cycle time (for example,
  16875. the HM51W4160AL L version has a refresh cycle of 1024 cycles/128 ms compared with 1024
  16876. cycles/16 ms for the normal version). With these DRAMs, however, the same refresh cycle as
  16877. for the normal version is requested only in the case of refreshing immediately following self-
  16878. refreshing. To ensure efficient DRAM refreshing, therefore, processing is needed to generate an
  16879. overflow interrupt and restore the refresh cycle to the proper value, after the necessary CAS-
  16880. before-RAS refreshing has been performed following self-refreshing of an L-version DRAM,
  16881. using the OVF, OVIE, and LMTS bits in RTCSR and the refresh controller’s refresh count
  16882. register (RFCR). The necessary procedure is as follows.
  16883.  
  16884. 1. Normally, set the refresh counter count cycle to the optimum value for the L version (e.g.
  16885. 1024 cycles/128 ms).
  16886. 2. When a transition is made to self-refreshing:
  16887. a. Provide an interrupt handler to restore the refresh counter count value to the optimum
  16888. value for the L version (e.g. 1024 cycles/128 ms) when a refresh counter overflow
  16889. interrupt is generated.
  16890. b. Re-set the refresh counter count cycle to the requested short cycle (e.g. 1024 cycles/16
  16891. ms), set refresh controller overflow interruption, and clear the refresh controller’s refresh
  16892. count register (RFCR) to 0.
  16893. c. Set self-refresh mode.
  16894.  
  16895. By using this procedure, the refreshing immediately following a self-refresh will be performed in
  16896. a short cycle, and when adequate refreshing ends, an interrupt is generated and the setting can be
  16897. restored to the original refresh cycle.
  16898.  
  16899. CAS-before-RAS refreshing is performed in normal operation, in sleep mode, and in the case of
  16900. a manual reset.
  16901.  
  16902. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the
  16903. case of a manual reset.
  16904.  
  16905. When the bus has been released in response to a bus arbitration request, or when a transition is
  16906. made to standby mode, signals generally become high-impedance, but whether the 5$6 and
  16907. &$6 signals become high-impedance or continue to be output can be controlled by the HIZCNT
  16908. bit in BCR1. This enables the DRAM to be kept in the self-refreshing state.
  16909.  
  16910. As the DRAM &$6 signal is multiplexed with :(Q for normal memory (SRAM, etc.), access to
  16911. memory that uses the :(Q signals must be disabled during self-refreshing.
  16912.  
  16913. Rev. 2.0, 02/99, page 358 of 830
  16914.  
  16915. ----------------------- Page 373-----------------------
  16916.  
  16917. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  16918.  
  16919. CKIO
  16920.  
  16921. A25–A0
  16922.  
  16923. CSn
  16924.  
  16925. RD/WR
  16926.  
  16927. RAS
  16928.  
  16929. CAS
  16930.  
  16931. D63–D0
  16932.  
  16933. BS
  16934.  
  16935. Figure 13.23 DRAM Self-Refresh Cycle Timing
  16936.  
  16937. Power-On Sequence: Regarding use of DRAM after powering on, it is requested that a wait
  16938. time (at least 100 µs or 200 µs) during which no access can be performed be provided, followed
  16939. by at least the prescribed number (usually 8) of dummy CAS-before-RAS refresh cycles. As the
  16940. bus state controller does not perform any special operations for a power-on reset, the necessary
  16941. power-on sequence must be carried out by the initialization program executed after a power-on
  16942. reset.
  16943.  
  16944. Rev. 2.0, 02/99, page 359 of 830
  16945.  
  16946. ----------------------- Page 374-----------------------
  16947.  
  16948. 13.3.5 Synchronous DRAM Interface
  16949.  
  16950. Direct Connection of Synchronous DRAM: Since synchronous DRAM can be selected by the
  16951. &6 signal, it can be connected to physical space areas 2 and 3 using 5$6 and other control
  16952. signals in common. If the memory type bits (DRAMTP2–0) in BCR1 are set to 010, area 2 is
  16953. normal memory space and area 3 is synchronous DRAM space; if set to 011, areas 2 and 3 are
  16954. both synchronous DRAM space.
  16955.  
  16956. With the SH7750, burst read/burst write mode is supported as the synchronous DRAM operating
  16957. mode. The data bus width is 32 or 64 bits, and the SZ size bits in MCR must be set to 00 or 11.
  16958. The burst enable bit (BE) in MCR is ignored, a 32-byte burst transfer is performed in a cache
  16959. fill/copy-back cycle, and in a write-through area write or a non-cacheable area read/write, 32-
  16960. byte data is read even in a single read in order to access synchronous DRAM with a burst
  16961. read/write access. 32-byte data transfer is also performed in a single write, but DQMn is not
  16962. asserted when unnecessary data is transferred.
  16963.  
  16964. The control signals for direct connection of synchronous DRAM are 5$6, &$6, RD/:5, &6
  16965. or &6, DQM0 to DQM7, and CKE. All the signals other than &6 and &6 are common to all
  16966. areas, and signals other than CKE are valid and latched only when &6 or &6 is asserted.
  16967. Synchronous DRAM can therefore be connected in parallel to a number of areas. CKE is
  16968. negated (driven low) when the frequency is changed, when the clock is unstable after the clock
  16969. supply is stopped and restarted, or when self-refreshing is performed, and is always asserted
  16970. (high) at other times.
  16971.  
  16972. Commands for synchronous DRAM are specified by 5$6, &$6, RD/:5, and specific address
  16973. signals. The commands are NOP, auto-refresh (REF), self-refresh (SELF), precharge all banks
  16974. (PALL), precharge specified bank (PRE), row address strobe bank active (ACTV), read
  16975. (READ), read with precharge (READA), write (WRIT), write with precharge (WRITA), and
  16976. mode register setting (MRS).
  16977.  
  16978. Byte specification is performed by DQM0 to DQM7. A read/write is performed for the byte for
  16979. which the corresponding DQM signal is low. When the bus width is 64 bits, in big-endian mode
  16980. DQM7 specifies an access to address 8n, and DQM0 specifies an access to address 8n + 7. In
  16981. little-endian mode, DQM7 specifies an access to address 8n + 7, and DQM0 specifies an access
  16982. to address 8n.
  16983.  
  16984. Figures 13.24 and 13.25 show examples of the connection of 16M × 16-bit synchronous
  16985. DRAMs.
  16986.  
  16987. Rev. 2.0, 02/99, page 360 of 830
  16988.  
  16989. ----------------------- Page 375-----------------------
  16990.  
  16991. 512K × 16-bit × 2-bank
  16992. SH7750 synchronous DRAM
  16993.  
  16994. A12–A3 A9–A0
  16995. CKIO CLK
  16996. CKE CKE
  16997. CS3 CS
  16998. RAS RAS
  16999. RD CAS
  17000. RD/WR WE
  17001. D63–D48 I/O15–I/O0
  17002. DQM7 DQMU
  17003. DQM6 DQML
  17004.  
  17005. A9–A0
  17006. CLK
  17007. CKE
  17008. CS
  17009. RAS
  17010. CAS
  17011. WE
  17012. D47–D32 I/O15–I/O0
  17013. DQM5 DQMU
  17014. DQM4 DQML
  17015.  
  17016. A9–A0
  17017. CLK
  17018. CKE
  17019. CS
  17020. RAS
  17021. CAS
  17022. WE
  17023. D31–D16 I/O15–I/O0
  17024. DQM3 DQMU
  17025. DQM2 DQML
  17026.  
  17027. A9–A0
  17028. CLK
  17029. CKE
  17030. CS
  17031. RAS
  17032. CAS
  17033. WE
  17034. D15–D0 I/O15–I/O0
  17035. DQM1 DQMU
  17036. DQM0 DQML
  17037.  
  17038. Figure 13.24 Example of 64-Bit Data Width Synchronous DRAM Connection (Area 3)
  17039.  
  17040. Rev. 2.0, 02/99, page 361 of 830
  17041.  
  17042. ----------------------- Page 376-----------------------
  17043.  
  17044. 512K × 16-bit × 2-bank
  17045. SH7750 synchronous DRAM
  17046.  
  17047. A11–A2 A9–A0
  17048. CKIO CLK
  17049. CKE CKE
  17050. CS3 CS
  17051. RAS RAS
  17052. RD CAS
  17053. RD/WR WE
  17054. D31–D16 I/O15–I/O0
  17055. DQM3 DQMU
  17056. DQM2 DQML
  17057.  
  17058. A9–A0
  17059. CLK
  17060. CKE
  17061. CS
  17062. RAS
  17063. CAS
  17064. WE
  17065. D15–D0 I/O15–I/O0
  17066. DQM1 DQMU
  17067. DQM0 DQML
  17068.  
  17069. Figure 13.25 Example of 32-Bit Data Width Synchronous DRAM Connection (Area 3)
  17070.  
  17071. Address Multiplexing: Synchronous DRAM can be connected without external multiplexing
  17072. circuitry in accordance with the address multiplex specification bits AMXEXT and AMX2–
  17073. AMX0 in MCR. Table 13.15 shows the relationship between the address multiplex specification
  17074. bits and the bits output at the address pins. See Appendix F, Synchronous DRAM Address
  17075. Multiplexing Tables.
  17076.  
  17077. The address signals output at A25–A18, A1, and A0 are undefined.
  17078.  
  17079. When A0, the LSB of the synchronous DRAM address, is connected to the SH7750, with a 32-
  17080. bit bus width it makes a longword address specification. Connection should therefore be made in
  17081. this order: connect pin A0 of the synchronous DRAM to pin A2 of the SH7750, then connect pin
  17082. A1 to pin A3.
  17083.  
  17084. With a 64-bit bus width, the LSB makes a quadword address specification. Connection should
  17085. therefore be made in this order: connect pin A0 of the synchronous DRAM to pin A3 of the
  17086. SH7750, then connect pin A1 to pin A4.
  17087.  
  17088. Rev. 2.0, 02/99, page 362 of 830
  17089.  
  17090. ----------------------- Page 377-----------------------
  17091.  
  17092. Table 13.15 Example of Correspondence between SH7750 and Synchronous DRAM
  17093. Address Pins (64-Bit Bus Width, AMX2–AMX0 = 011, AMXEXT = 0)
  17094.  
  17095. SH7750 Address Pin Synchronous DRAM Address Pin
  17096.  
  17097. RAS Cycle CAS Cycle Function
  17098.  
  17099. A14 A22 A22 A11 BANK select bank address
  17100.  
  17101. A13 A21 H/L A10 Address precharge setting
  17102.  
  17103. A12 A20 0 A9
  17104.  
  17105. A11 A19 0 A8
  17106.  
  17107. A10 A18 A10 A7
  17108.  
  17109. A9 A17 A9 A6
  17110.  
  17111. A8 A16 A8 A5
  17112.  
  17113. A7 A15 A7 A4
  17114.  
  17115. A6 A14 A6 A3
  17116.  
  17117. A5 A13 A5 A2
  17118.  
  17119. A4 A12 A4 A1
  17120.  
  17121. A3 A11 A3 A0
  17122.  
  17123. A2 — A2 Not used
  17124.  
  17125. A1 — A1 Not used
  17126.  
  17127. A0 — A0 Not used
  17128.  
  17129. Burst Read: The timing chart for a burst read is shown in figure 13.26. In the following
  17130. example it is assumed that four 512K x 16-bit x 2-bank synchronous DRAMs are connected, and
  17131. a 64-bit data width is used. The burst length is 4. Following the Tr cycle in which ACTV
  17132. command output is performed, a READA command is issued in the Tc1 cycle, and the read data
  17133. is accepted on the rising edge of the external command clock (CKIO) from cycle Td1 to cycle
  17134. Td4. The Tpc cycle is used to wait for completion of auto-precharge based on the READA
  17135. command inside the synchronous DRAM; no new access command can be issued to the same
  17136. bank during this cycle. In the SH7750, the number of Tpc cycles is determined by the
  17137. specification of bits TPC2–TPC0 in MCR, and commands are not issued for the same
  17138. synchronous DRAM during this interval.
  17139.  
  17140. The example in figure 13.26 shows the basic cycle. To connect slower synchronous DRAM, the
  17141. cycle can be extended by setting WCR2 and MCR bits. The number of cycles from the ACTV
  17142. command output cycle, Tr, to the READA command output cycle, Tc1, can be specified by bits
  17143. RCD1 and RCD0 in MCR, with a value of 0 to 3 specifying 2 to 4 cycles, respectively. In the
  17144. case of 2 or more cycles, a Trw cycle, in which an NOP command is issued for the synchronous
  17145. DRAM, is inserted between the Tr cycle and the Tc cycle. The number of cycles from READA
  17146. command output cycle Tc1 to the first read data latch cycle, Td1, can be specified as 1 to 5
  17147. cycles independently for areas 2 and 3 by means of bits A2W2–A2W0 and A3W2–A3W0 in
  17148. Rev. 2.0, 02/99, page 363 of 830
  17149.  
  17150. ----------------------- Page 378-----------------------
  17151.  
  17152. WCR2. This number of cycles corresponds to the number of synchronous DRAM CAS latency
  17153. cycles.
  17154.  
  17155. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17156.  
  17157. CKIO
  17158.  
  17159.  
  17160.  
  17161. Bank Row
  17162.  
  17163. t
  17164.  
  17165. Precharge-sel Row H/L
  17166.  
  17167. t
  17168.  
  17169. Address Row c0
  17170.  
  17171.  
  17172.  
  17173.  
  17174. CSn
  17175.  
  17176.  
  17177.  
  17178. RD/WR
  17179.  
  17180.  
  17181.  
  17182. RAS
  17183.  
  17184.  
  17185.  
  17186. CASS
  17187.  
  17188.  
  17189.  
  17190. DQMn
  17191.  
  17192. D63–D0
  17193. (read) d0 d1 d2 d3
  17194.  
  17195.  
  17196.  
  17197.  
  17198.  
  17199. BS
  17200.  
  17201. CKE
  17202.  
  17203.  
  17204.  
  17205. DACKn
  17206. (SA: IO ← memory)
  17207.  
  17208. Figure 13.26 Basic Timing for Synchronous DRAM Burst Read
  17209.  
  17210. In a synchronous DRAM cycle, the %6 signal is asserted for one cycle at the start of the bus
  17211. cycle. The order of access is as follows: in a fill operation in the event of a cache miss, 64-bit
  17212. boundary data including the missed data is read first, then 32-byte boundary data including the
  17213. missed data is read in wraparound mode.
  17214.  
  17215. Rev. 2.0, 02/99, page 364 of 830
  17216.  
  17217. ----------------------- Page 379-----------------------
  17218.  
  17219. Single Read: With the SH7750, as synchronous DRAM is set to burst read/burst write mode,
  17220. read data output continues after the required data has been read. To prevent data collisions, after
  17221. the required data is read in Td1, empty read cycles Td2 to Td4 are performed, and the SH7750
  17222. waits for the end of the synchronous DRAM operation. The %6 signal is asserted only in Td1.
  17223.  
  17224. When the data width is 64 bits, there are 4 burst transfers in a read. In cache-through and other
  17225. DMA read cycles, of cycles Td1 to Td4, %6 is asserted and data latched only in the Td1 cycle.
  17226.  
  17227. Since such empty cycles increase the memory access time, and tend to reduce program
  17228. execution speed and DMA transfer speed, it is important both to avoid unnecessary cache-
  17229. through area accesses, and to use a data structure that will allow data to be placed at a 32-byte
  17230. boundary, and to be transferred in 32-byte units, when carrying out DMA transfer with
  17231. synchronous DRAM specified as the source.
  17232.  
  17233. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  17234.  
  17235. CKIO
  17236.  
  17237. Bank Row
  17238.  
  17239. Precharge-sel Row H/L
  17240.  
  17241. Address Row c1
  17242.  
  17243. CSn
  17244.  
  17245. RD/WR
  17246.  
  17247. RAS
  17248.  
  17249. CASS
  17250.  
  17251. DQMn
  17252.  
  17253. D63–D0
  17254. c1
  17255. (read)
  17256.  
  17257. BS
  17258.  
  17259. CKE
  17260.  
  17261. DACKn
  17262. (SA: IO ← memory)
  17263.  
  17264. Figure 13.27 Basic Timing for Synchronous DRAM Single Read
  17265.  
  17266. Rev. 2.0, 02/99, page 365 of 830
  17267.  
  17268. ----------------------- Page 380-----------------------
  17269.  
  17270. Burst Write: The timing chart for a burst write is shown in figure 13.28. In the SH7750, a burst
  17271. write occurs only in the event of cache copy-back or a 32-byte transfer by the DMAC. In a burst
  17272. write operation, following the Tr cycle in which ACTV command output is performed, a
  17273. WRITA command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle,
  17274. the write data is output at the same time as the write command. In the case of the write with
  17275. auto-precharge command, precharging of the relevant bank is performed in the synchronous
  17276. DRAM after completion of the write command, and therefore no command can be issued for the
  17277. same bank until precharging is completed. Consequently, in addition to the precharge wait cycle,
  17278. Tpc, used in a read access, cycle Trwl is also added as a wait interval until precharging is started
  17279. following the write command. Issuance of a new command for the same bank is postponed
  17280. during this interval. The number of Trwl cycles can be specified by bits TRWL2–TRWL0 in
  17281. MCR. 32-byte boundary data is written in wraparound mode.
  17282.  
  17283. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  17284.  
  17285. CKIO
  17286.  
  17287. Bank Row
  17288.  
  17289. Precharge-sel Row H/L
  17290.  
  17291. Address Row c1
  17292.  
  17293. CSn
  17294.  
  17295. RD/WR
  17296.  
  17297. RAS
  17298.  
  17299. CASS
  17300.  
  17301. DQMn
  17302.  
  17303. D63–D0
  17304. c1 c2 c3 c4
  17305. (read)
  17306.  
  17307. CKE
  17308.  
  17309. DACKn
  17310. (SA: IO → memory)
  17311.  
  17312. Figure 13.28 Basic Timing for Synchronous DRAM Burst Write
  17313.  
  17314. Rev. 2.0, 02/99, page 366 of 830
  17315.  
  17316. ----------------------- Page 381-----------------------
  17317.  
  17318. Single Write: The basic timing chart for write access is shown in figure 13.29. In a single write
  17319. operation, following the Tr cycle in which ACTV command output is performed, a WRITA
  17320. command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle, the write
  17321. data is output at the same time as the write command. In the case of a write with auto-precharge,
  17322. precharging of the relevant bank is performed in the synchronous DRAM after completion of the
  17323. write command, and therefore no command can be issued for the same bank until precharging is
  17324. completed. Consequently, in addition to the precharge wait cycle, Tpc, used in a read access,
  17325. cycle Trwl is also added as a wait interval until precharging is started following the write
  17326. command. Issuance of a new command for the same bank is postponed during this interval. The
  17327. number of Trwl cycles can be specified by bits TRWL2–TRWL0 in MCR.
  17328.  
  17329. As the SH7750 supports burst read/burst write operations for synchronous DRAM, a single write
  17330. requires the same number of cycles as a burst write.
  17331.  
  17332. Rev. 2.0, 02/99, page 367 of 830
  17333.  
  17334. ----------------------- Page 382-----------------------
  17335.  
  17336. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  17337.  
  17338. CKIO
  17339.  
  17340. Bank Row
  17341.  
  17342. Precharge-sel Row H/L
  17343.  
  17344. Address Row c1
  17345.  
  17346. CSn
  17347.  
  17348. RD/WR
  17349.  
  17350. RAS
  17351.  
  17352. CASS
  17353.  
  17354. DQMn
  17355.  
  17356. D63–D0
  17357. c1
  17358. (read)
  17359.  
  17360. BS
  17361.  
  17362. CKE
  17363.  
  17364. DACKn
  17365. (SA: IO → memory)
  17366.  
  17367. Figure 13.29 Basic Timing for Synchronous DRAM Single Write
  17368.  
  17369. Rev. 2.0, 02/99, page 368 of 830
  17370.  
  17371. ----------------------- Page 383-----------------------
  17372.  
  17373. RAS Down Mode: The synchronous DRAM bank function is used to support high-speed
  17374. accesses to the same row address. When the RASD bit in MCR is 1, read/write command
  17375. accesses are performed using commands without auto-precharge (READ, WRIT). In this case,
  17376. precharging is not performed when the access ends. When accessing the same row address in the
  17377. same bank, it is possible to issue the READ or WRIT command immediately, without issuing an
  17378. ACTV command, in the same way as in the DRAM RAS down state. As synchronous DRAM is
  17379. internally divided into two or four banks, it is possible to activate one row address in each bank.
  17380. If the next access is to a different row address, a PRE command is first issued to precharge the
  17381. relevant bank, then when precharging is completed, the access is performed by issuing an ACTV
  17382. command followed by a READ or WRIT command. If this is followed by an access to a
  17383. different row address, the access time will be longer because of the precharging performed after
  17384. the access request is issued.
  17385.  
  17386. In a write, when auto-precharge is performed, a command cannot be issued for a period of Trwl
  17387. + Tpc cycles after issuance of the WRIT command. When RAS down mode is used, READ or
  17388. WRIT commands can be issued successively if the row address is the same. The number of
  17389. cycles can thus be reduced by Trwl + Tpc cycles for each write. The number of cycles between
  17390. issuance of the precharge command and the row address strobe command is determined by bits
  17391. TPC2–TPC0 in MCR.
  17392.  
  17393. There is a limit on tRAS , the time for placing each bank in the active state. If there is no guarantee
  17394. that there will not be a cache hit and another row address will be accessed within the period in
  17395. which this value is maintained by program execution, it is necessary to set auto-refresh and set
  17396. the refresh cycle to no more than the maximum value of tRAS . In this way, it is possible to observe
  17397. the restrictions on the maximum active state time for each bank. If auto-refresh is not used,
  17398. measures must be taken in the program to ensure that the banks do not remain active for longer
  17399. than the prescribed time.
  17400.  
  17401. A burst read cycle without auto-precharge is shown in figure 13.30, a burst read cycle for the
  17402. same row address in figure 13.31, and a burst read cycle for different row addresses in figure
  17403. 13.32. Similarly, a burst write cycle without auto-precharge is shown in figure 13.33, a burst
  17404. write cycle for the same row address in figure 13.34, and a burst write cycle for different row
  17405. addresses in figure 13.35.
  17406.  
  17407. When synchronous DRAM is read, there is a 2-cycle latency for the DMQn signal that performs
  17408. the byte specification. As a result, when the READ command is issued in figure 13.30, if the Tc
  17409. cycle is executed immediately, the DMQn signal specification for Td1 cycle data output cannot
  17410. be carried out. Therefore, the CAS latency should not be set to 1.
  17411.  
  17412. When RAS down mode is set, if only accesses to the respective banks in area 3 are considered,
  17413. as long as accesses to the same row address continue, the operation starts with the cycle in figure
  17414. 13.30 or 13.33, followed by repetition of the cycle in figure 13.31 or 13.34. An access to a
  17415. different area during this time has no effect. If there is an access to a different row address in the
  17416. bank active state, after this is detected the bus cycle in figure 13.32 or 13.35 is executed instead
  17417.  
  17418. Rev. 2.0, 02/99, page 369 of 830
  17419.  
  17420. ----------------------- Page 384-----------------------
  17421.  
  17422. of that in figure 13.31 or 13.34. In RAS down mode, too, both banks become inactive after a
  17423. refresh cycle or after the bus is released as the result of bus arbitration.
  17424.  
  17425. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17426.  
  17427. CKIO
  17428.  
  17429. Bank Row
  17430.  
  17431. Precharge-sel Row H/L
  17432.  
  17433. Address Row c1
  17434.  
  17435. CSn
  17436.  
  17437. RD/WR
  17438.  
  17439. RAS
  17440.  
  17441. CASS
  17442.  
  17443. DQMn
  17444.  
  17445. D63–D0
  17446. c1 c2 c3 c4
  17447. (read)
  17448.  
  17449. BS
  17450.  
  17451. CKE
  17452.  
  17453. DACKn
  17454. (SA: IO ← memory)
  17455.  
  17456. Figure 13.30 Burst Read Timing
  17457.  
  17458. Rev. 2.0, 02/99, page 370 of 830
  17459.  
  17460. ----------------------- Page 385-----------------------
  17461.  
  17462. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17463.  
  17464. CKIO
  17465.  
  17466. Bank
  17467.  
  17468. Precharge-sel H/L
  17469.  
  17470. Address c1
  17471.  
  17472. CSn
  17473.  
  17474. RD/WR
  17475.  
  17476. RAS
  17477.  
  17478. CASS
  17479.  
  17480. DQMn
  17481.  
  17482. D63–D0
  17483. (read) c1 c2 c3 c4
  17484.  
  17485. BS
  17486.  
  17487. CKE
  17488.  
  17489. DACKn
  17490. (SA: IO ← memory)
  17491.  
  17492. Figure 13.31 Burst Read Timing (RAS Down, Same Row Address)
  17493.  
  17494. Rev. 2.0, 02/99, page 371 of 830
  17495.  
  17496. ----------------------- Page 386-----------------------
  17497.  
  17498. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17499.  
  17500. CKIO
  17501.  
  17502. Bank Row
  17503.  
  17504. Precharge-sel Row H/L
  17505.  
  17506. Address Row c1
  17507.  
  17508. CSn
  17509.  
  17510. RD/WR
  17511.  
  17512. RAS
  17513.  
  17514. CASS
  17515.  
  17516. DQMn
  17517.  
  17518. D63–D0
  17519. (read) c1 c2 c3 c4
  17520.  
  17521. BS
  17522.  
  17523. CKE
  17524.  
  17525. DACKn
  17526. (SA: IO ← memory)
  17527.  
  17528. Figure 13.32 Burst Read Timing (RAS Down, Different Row Addresses)
  17529.  
  17530. Rev. 2.0, 02/99, page 372 of 830
  17531.  
  17532. ----------------------- Page 387-----------------------
  17533.  
  17534. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  17535.  
  17536. CKIO
  17537.  
  17538. Bank Row
  17539.  
  17540. Precharge-sel Row H/L
  17541.  
  17542. Address Row c1
  17543.  
  17544. CSn
  17545.  
  17546. RD/WR
  17547.  
  17548. RAS
  17549.  
  17550. CASS
  17551.  
  17552. DQMn
  17553.  
  17554.  
  17555.  
  17556. D63–D0
  17557. c1 c2 c3 c4
  17558. (read)
  17559.  
  17560. BS
  17561.  
  17562. CKE
  17563.  
  17564. DACKn
  17565. (SA: IO → memory)
  17566.  
  17567. Figure 13.33 Burst Write Timing
  17568.  
  17569. Rev. 2.0, 02/99, page 373 of 830
  17570.  
  17571. ----------------------- Page 388-----------------------
  17572.  
  17573. Tncp*1 Tnop*2 Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  17574.  
  17575. CKIO
  17576.  
  17577. Bank Row
  17578.  
  17579. Precharge-sel H/L
  17580.  
  17581. Address c1
  17582.  
  17583. CSn
  17584.  
  17585. RD/WR
  17586.  
  17587. RAS
  17588.  
  17589. CASS
  17590.  
  17591. DQMn
  17592.  
  17593.  
  17594.  
  17595. D63–D0
  17596. c1 c2 c3 c4
  17597. (read)
  17598.  
  17599. BS
  17600.  
  17601. CKE
  17602.  
  17603. DACKn
  17604. (SA: IO → memory)
  17605.  
  17606. Notes: 1. Tncp: DACK output start cycle (inserted only in the case of DACK output)
  17607. 2. Tnop: Dummy cycle (always inserted)
  17608.  
  17609. Figure 13.34 Burst Write Timing (Same Row Address)
  17610.  
  17611. Rev. 2.0, 02/99, page 374 of 830
  17612.  
  17613. ----------------------- Page 389-----------------------
  17614.  
  17615. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4
  17616.  
  17617. CKIO
  17618.  
  17619. Bank Row
  17620.  
  17621. Precharge-sel Row H/L
  17622.  
  17623. Address Row c1
  17624.  
  17625. CSn
  17626.  
  17627. RD/WR
  17628.  
  17629. RAS
  17630.  
  17631. CASS
  17632.  
  17633. DQMn
  17634.  
  17635. D63–D0
  17636. c1 c2 c3 c4
  17637. (read)
  17638.  
  17639. BS
  17640.  
  17641. CKE
  17642.  
  17643. DACKn
  17644. (SA: IO → memory)
  17645.  
  17646. Figure 13.35 Burst Write Timing (Different Row Addresses)
  17647.  
  17648. Pipelined Access: When the RASD bit is set to 1 in MCR, pipelined access is performed
  17649. between an access by the CPU and an access by the DMAC, or in the case of consecutive
  17650. accesses by the DMAC, to provide faster access to synchronous DRAM. As synchronous DRAM
  17651. is internally divided into two or four banks, after a READ or WRIT command is issued for one
  17652. bank it is possible to issue a PRE, ACTV, or other command during the CAS latency cycle or
  17653. data latch cycle, or during the data write cycle, and so shorten the access cycle.
  17654.  
  17655. When a read access is followed by another read access to the same row address, after a READ
  17656. command has been issued, another READ command is issued before the end of the data latch
  17657. cycle, so that there is read data on the data bus continuously. When an access is made to another
  17658. row address and the bank is different, the PRE command or ACTV command can be issued
  17659. during the CAS latency cycle or data latch cycle. If there are consecutive access requests for
  17660. different row addresses in the same bank, the PRE command cannot be issued until the last-but-
  17661.  
  17662. Rev. 2.0, 02/99, page 375 of 830
  17663.  
  17664. ----------------------- Page 390-----------------------
  17665.  
  17666. one data latch cycle. If a read access is followed by a write access, it may be possible to issue a
  17667. PRE or ACT command, depending on the bank and row address, but since the write data is
  17668. output at the same time as the WRIT command, the PRE, ACTV, and WRIT commands are
  17669. issued in such a way that one or two empty cycles occur automatically on the data bus.
  17670. Similarly, with a read access following a write access, or a write access following a write access,
  17671. the PRE, ACTV, READ, or WRIT command is issued during the data write cycle for the
  17672. preceding access; however, in the case of different row addresses in the same bank, a PRE
  17673. command cannot be issued, and so in this case the PRE command is issued following the
  17674. number of Trwl cycles specified by the TRWL bits in MCR, after the end of the last data write
  17675. cycle.
  17676.  
  17677. Figure 13.36 shows a burst read cycle for a different bank and row address following a preceding
  17678. burst read cycle.
  17679.  
  17680. Pipelined access is enabled only for consecutive access to area 3, and will be discontinued in the
  17681. event of an access to another area. Pipelined access is also discontinued in the event of a refresh
  17682. cycle, or bus release due to bus arbitration. The cases in which pipelined access is available are
  17683. shown in table 13.16. In this table, “DMAC dual” indicates transfer in DMAC dual address
  17684. mode, and “DMAC single”, transfer in DMAC single address mode.
  17685.  
  17686. Table 13.16 Cycles in Which Pipelined Access Can Be Used
  17687.  
  17688. Preceding Access Following Access
  17689.  
  17690. CPU DMAC Dual DMAC Single
  17691.  
  17692. Read Write Read Write Read Write
  17693.  
  17694. CPU Read X X O X O O
  17695.  
  17696. Write X X O X O O
  17697.  
  17698. DMAC dual Read X X X X X X
  17699.  
  17700. Write O O O X O O
  17701.  
  17702. DMAC single Read O O X X O O
  17703.  
  17704. Write O O O X O O
  17705.  
  17706. O: Pipelined access possible
  17707. X: Pipelined access not possible
  17708.  
  17709. Rev. 2.0, 02/99, page 376 of 830
  17710.  
  17711. ----------------------- Page 391-----------------------
  17712.  
  17713. Tc1_A Tc1_B
  17714.  
  17715. CKIO
  17716.  
  17717. Bank
  17718.  
  17719. Precharge-sel H/L H/L
  17720.  
  17721. Address c_A c_B
  17722.  
  17723. CSn
  17724.  
  17725. RD/WR
  17726.  
  17727. RAS
  17728.  
  17729. CASS
  17730.  
  17731. DQMn
  17732.  
  17733. D63–D0
  17734. a1 a2 a3 a4 b1 b2
  17735. (read)
  17736.  
  17737. BS
  17738.  
  17739. CKE
  17740.  
  17741. Figure 13.36 Burst Read Cycle for Different Bank and Row Address Following Preceding
  17742. Burst Read Cycle
  17743.  
  17744. Refreshing: The bus state controller is provided with a function for controlling synchronous
  17745. DRAM refreshing. Auto-refreshing can be performed by clearing the RMODE bit to 0 and
  17746. setting the RFSH bit to 1 in MCR. If synchronous DRAM is not accessed for a long period, self-
  17747. refresh mode, in which the power consumption for data retention is low, can be activated by
  17748. setting both the RMODE bit and the RFSH bit to 1.
  17749.  
  17750. Rev. 2.0, 02/99, page 377 of 830
  17751.  
  17752. ----------------------- Page 392-----------------------
  17753.  
  17754. • Auto-Refreshing
  17755. Refreshing is performed at intervals determined by the input clock selected by bits CKS2–
  17756. CKS0 in RTCSR, and the value set in RTCOR. The value of bits CKS2–CKS0 in RTCOR
  17757. should be set so as to satisfy the refresh interval specification for the synchronous DRAM
  17758. used. First make the settings for RTCOR, RTCNT, and the RMODE and RFSH bits in MCR,
  17759. then make the CKS2–CKS0 setting last of all. When the clock is selected by CKS2–CKS0,
  17760. RTCNT starts counting up from the value at that time. The RTCNT value is constantly
  17761. compared with the RTCOR value, and if the two values are the same, a refresh request is
  17762. generated and an auto-refresh is performed. At the same time, RTCNT is cleared to zero and
  17763. the count-up is restarted. Figure 13.38 shows the auto-refresh cycle timing.
  17764. First, an REF command is issued in the TRr cycle. After the TRr cycle, new command output
  17765. cannot be performed for the duration of the number of cycles specified by bits TRAS2–
  17766. TRAS0 in MCR plus the number of cycles specified by bits TRC2–TRC0 in MCR. The
  17767. TRAS2–TRAS0 and TRC2–TRC0 bits must be set so as to satisfy the synchronous DRAM
  17768. refresh cycle time specification (active/active command delay time).
  17769. Auto-refreshing is performed in normal operation, in sleep mode, and in the case of a manual
  17770. reset.
  17771.  
  17772. RTCOR value RTCNT cleared to 0 when
  17773. RTCNT = RTCOR
  17774. RTCNT
  17775.  
  17776. H'00000000 Time
  17777.  
  17778. RTCSR.CKS2–0 = 000 ≠ 000
  17779.  
  17780. Refresh
  17781. request
  17782.  
  17783. Refresh request cleared
  17784.  
  17785. by start of refresh cycle
  17786. External bus
  17787.  
  17788. Auto-refresh cycle
  17789.  
  17790. Figure 13.37 Auto-Refresh Operation
  17791.  
  17792. Rev. 2.0, 02/99, page 378 of 830
  17793.  
  17794. ----------------------- Page 393-----------------------
  17795.  
  17796. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  17797.  
  17798. CKIO
  17799.  
  17800. CSn
  17801.  
  17802. RD/WR
  17803.  
  17804. RAS
  17805.  
  17806. CASS
  17807.  
  17808. DQMn
  17809.  
  17810. D63–D0
  17811.  
  17812. BS
  17813.  
  17814. CKE
  17815.  
  17816. Figure 13.38 Synchronous DRAM Auto-Refresh Timing
  17817.  
  17818. • Self-Refreshing
  17819. Self-refresh mode is a kind of standby mode in which the refresh timing and refresh
  17820. addresses are generated within the synchronous DRAM. Self-refreshing is activated by
  17821. setting both the RMODE bit and the RFSH bit to 1. The self-refresh state is maintained while
  17822. the CKE signal is low. Synchronous DRAM cannot be accessed while in the self-refresh
  17823. state. Self-refresh mode is cleared by clearing the RMODE bit to 0. After self-refresh mode
  17824. has been cleared, command issuance is disabled for the number of cycles specified by bits
  17825. TRC2–TRC0 in MCR. Self-refresh timing is shown in figure 13.39. Settings must be made
  17826. so that self-refresh clearing and data retention are performed correctly, and auto-refreshing is
  17827. performed at the correct intervals. When self-refreshing is activated from the state in which
  17828. auto-refreshing is set, or when exiting standby mode other than through a power-on reset,
  17829. auto-refreshing is restarted if RFSH is set to 1 and RMODE is cleared to 0 when self-refresh
  17830. mode is cleared. If the transition from clearing of self-refresh mode to the start of auto-
  17831. refreshing takes time, this time should be taken into consideration when setting the initial
  17832. value of RTCNT. Making the RTCNT value 1 less than the RTCOR value will enable
  17833. refreshing to be started immediately.
  17834. After self-refreshing has been set, the self-refresh state continues even if the chip standby
  17835. state is entered using the SH7750’s standby function, and is maintained even after recovery
  17836. from standby mode other than through a power-on reset.
  17837.  
  17838. Rev. 2.0, 02/99, page 379 of 830
  17839.  
  17840. ----------------------- Page 394-----------------------
  17841.  
  17842. In the case of a power-on reset, the bus state controller’s registers are initialized, and
  17843. therefore the self-refresh state is cleared.
  17844. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the
  17845. case of a manual reset.
  17846.  
  17847. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  17848.  
  17849. CKIO
  17850.  
  17851. CSn
  17852.  
  17853. RD/WR
  17854.  
  17855. RAS
  17856.  
  17857. CASS
  17858.  
  17859. DQMn
  17860.  
  17861. D63–D0
  17862.  
  17863. BS
  17864.  
  17865. CKE
  17866.  
  17867. Figure 13.39 Synchronous DRAM Self-Refresh Timing
  17868.  
  17869. • Relationship between Refresh Requests and Bus Cycle Requests
  17870. If a refresh request is generated during execution of a bus cycle, execution of the refresh is
  17871. deferred until the bus cycle is completed. If a refresh request occurs when the bus has been
  17872. released by the bus arbiter, refresh execution is deferred until the bus is acquired. If a match
  17873. between RTCNT and RTCOR occurs while a refresh is waiting to be executed, so that a new
  17874. refresh request is generated, the previous refresh request is eliminated. In order for refreshing
  17875. to be performed normally, care must be taken to ensure that no bus cycle or bus mastership
  17876. occurs that is longer than the refresh interval. When a refresh request is generated, the %$&.
  17877. pin is negated (driven high). Therefore, normal refreshing can be performed by having the
  17878. %$&. pin monitored by a bus master other than the SH7750 requesting the bus, or the bus
  17879. arbiter, and returning the bus to the SH7750.
  17880.  
  17881. Rev. 2.0, 02/99, page 380 of 830
  17882.  
  17883. ----------------------- Page 395-----------------------
  17884.  
  17885. Power-On Sequence: In order to use synchronous DRAM, mode setting must first be performed
  17886. after powering on. To perform synchronous DRAM initialization correctly, the bus state
  17887. controller registers must first be set, followed by a write to the synchronous DRAM mode
  17888. register. In synchronous DRAM mode register setting, the address signal value at that time is
  17889. latched by a combination of the 5$6, &$6, and RD/:5 signals. If the value to be set is X, the
  17890. bus state controller provides for value X to be written to the synchronous DRAM mode register
  17891. by performing a write to address H'FF900000 + X for area 2 synchronous DRAM, and to address
  17892. H'FF940000 + X for area 3 synchronous DRAM. In this operation the data is ignored, but the
  17893. mode write is performed as a byte-size access. To set burst read/write, CAS latency 1 to 3, wrap
  17894. type = sequential, and burst length 4 or 8, supported by the SH7750, arbitrary data is written by
  17895. byte-size access to the following addresses.
  17896.  
  17897. Bus Width CAS Latency Area 2 Area 3
  17898.  
  17899. 32 1 FF90004C FF94004C
  17900.  
  17901. 2 FF90008C FF94008C
  17902.  
  17903. 3 FF9000CC FF9400CC
  17904.  
  17905. 64 1 FF900090 FF940090
  17906.  
  17907. 2 FF900110 FF940110
  17908.  
  17909. 3 FF900190 FF940190
  17910.  
  17911. The value set in MCR.MRSET is used to select whether a precharge all banks command or a
  17912. mode register setting command is issued. The timing for the precharge all banks command is
  17913. shown in figure 13.40 (1), and the timing for the mode register setting command in figure 13.40
  17914. (2).
  17915.  
  17916. Before mode register, a 200 µs idle time (depending on the memory manufacturer) must be
  17917. guaranteed after the power required for the synchronous DRAM is turned on. If the reset signal
  17918. pulse width is greater than this idle time, there is no problem in making the precharge all banks
  17919. setting immediately.
  17920.  
  17921. First, a precharge all banks (PALL) command is issued in the TRp1 cycle by performing a write
  17922. to address H'FF900000 + X or H'FF940000 + X while MCR.MRSET = 0. Next, the number of
  17923. dummy auto-refresh cycles specified by the manufacturer (usually 8) or more must be executed.
  17924. This is achieved automatically while various kinds of initialization are being performed after
  17925. auto-refresh setting, but a way of carrying this out more dependably is to change the RTCOR
  17926. register value to set a short refresh request generation interval just while these dummy cycles are
  17927. being executed. With simple read or write access, the address counter in the synchronous DRAM
  17928. used for auto-refreshing is not initialized, and so the cycle must always be an auto-refresh cycle.
  17929. After auto-refreshing has been executed at least the prescribed number of times, a mode register
  17930. setting command is issued in the TMw1 cycle by setting MCR.MRSET to 1 and performing a
  17931. write to address H'FF900000 + X or H'FF940000 + X.
  17932.  
  17933. Rev. 2.0, 02/99, page 381 of 830
  17934.  
  17935. ----------------------- Page 396-----------------------
  17936.  
  17937. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  17938.  
  17939. CKIO
  17940.  
  17941. Bank
  17942.  
  17943. Precharge-sel
  17944.  
  17945. Address
  17946.  
  17947. CSn
  17948.  
  17949. RD/WR
  17950.  
  17951. RAS
  17952.  
  17953. CASS
  17954.  
  17955. D31–D0
  17956.  
  17957. CKE
  17958. (High)
  17959.  
  17960. Figure 13.40 (1) Synchronous DRAM Mode Write Timing
  17961.  
  17962. Rev. 2.0, 02/99, page 382 of 830
  17963.  
  17964. ----------------------- Page 397-----------------------
  17965.  
  17966. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  17967.  
  17968. CKIO
  17969.  
  17970. Bank
  17971.  
  17972. Precharge-sel
  17973.  
  17974. Address
  17975.  
  17976. CSn
  17977.  
  17978. RD/WR
  17979.  
  17980. RAS
  17981.  
  17982. CASS
  17983.  
  17984. D31–D0
  17985.  
  17986. CKE
  17987. (High)
  17988.  
  17989. Figure 13.40 (2) Synchronous DRAM Mode Write Timing
  17990.  
  17991. Rev. 2.0, 02/99, page 383 of 830
  17992.  
  17993. ----------------------- Page 398-----------------------
  17994.  
  17995. 13.3.6 Burst ROM Interface
  17996.  
  17997. Setting bits A0BST2–A0BST0, A5BST2–A5BST0, and A6BST2–A6BST0 in BCR1 to a non-
  17998. zero value allows burst ROM to be connected to areas 0, 5, and 6. The burst ROM interface
  17999. provides high-speed access to ROM that has a burst access function. The timing for burst access
  18000. to burst ROM is shown in figure 13.41. Two wait cycles are set. Basically, access is performed
  18001. in the same way as for normal space, but when the first cycle ends, only the address is changed
  18002. before the next access is executed. When 8-bit ROM is connected, the number of consecutive
  18003. accesses can be set as 4, 8, 16, or 32 with bits A0BST2–A0BST0, A5BST2–A5BST0, or
  18004. A6BST2–A6BST0. When 16-bit ROM is connected, 4, 8, or 16 can be set in the same way.
  18005. When 32-bit ROM is connected, 4 or 8 can be set.
  18006.  
  18007. 5'< pin sampling is always performed when one or more wait states are set.
  18008.  
  18009. The second and subsequent access cycles also comprise two cycles when a burst ROM setting is
  18010. made and the wait specification is 0. The timing in this case is shown in figure 13.42.
  18011.  
  18012. In a ROM write operation, a basic bus cycle (write) is performed.
  18013.  
  18014. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18015. according to the set bus width. The first access is performed on the data for which there was an
  18016. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18017. The bus is not released during this period.
  18018.  
  18019. Figure 13.43 shows the timing when a burst ROM setting is made, and setup/hold is specified in
  18020. WCR3.
  18021.  
  18022. Rev. 2.0, 02/99, page 384 of 830
  18023.  
  18024. ----------------------- Page 399-----------------------
  18025.  
  18026. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  18027.  
  18028. CKIO
  18029.  
  18030. A25–A5
  18031.  
  18032. A4–A0
  18033.  
  18034. CSn
  18035.  
  18036. RD/WR
  18037.  
  18038. RD
  18039.  
  18040. D63–D0
  18041. (read)
  18042.  
  18043. BS
  18044.  
  18045. RDY
  18046.  
  18047. DACKn
  18048. (SA: IO ← memory)
  18049.  
  18050. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18051.  
  18052. Figure 13.41 Burst ROM Basic Access Timing
  18053.  
  18054. Rev. 2.0, 02/99, page 385 of 830
  18055.  
  18056. ----------------------- Page 400-----------------------
  18057.  
  18058. T1 Tw Tw TB2 TB1 Tw TB2 TB1 Tw TB2 TB1 Tw T2
  18059.  
  18060. CKIO
  18061.  
  18062. A25–A5
  18063.  
  18064. A4–A0
  18065.  
  18066. CSn
  18067.  
  18068. RD/WR
  18069.  
  18070. RD
  18071.  
  18072. D63–D0
  18073. (read)
  18074.  
  18075. BS
  18076.  
  18077. RDY
  18078.  
  18079. DACKn
  18080. (SA: IO ← memory)
  18081.  
  18082. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18083.  
  18084. Figure 13.42 Burst ROM Wait Access Timing
  18085.  
  18086. Rev. 2.0, 02/99, page 386 of 830
  18087.  
  18088. ----------------------- Page 401-----------------------
  18089.  
  18090. TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  18091.  
  18092. CKIO
  18093.  
  18094. A25–A5
  18095.  
  18096. A4–A0
  18097.  
  18098. CSn
  18099.  
  18100. RD/WR
  18101.  
  18102. RD
  18103.  
  18104. D63–D0
  18105. (read)
  18106.  
  18107. BS
  18108.  
  18109. RDY
  18110.  
  18111. DACKn
  18112. (SA: IO ← memory)
  18113.  
  18114. Figure 13.43 Burst ROM Wait Access Timing
  18115.  
  18116. 13.3.7 PCMCIA Interface
  18117.  
  18118. In the SH7750, setting the A56PCM bit in BCR1 to 1 makes the bus interface for external space
  18119. areas 5 and 6 an IC memory card interface or I/O card interface as stipulated in JEIDA
  18120. specification version 4.2 (PCMCIA2.1).
  18121.  
  18122. Figure 13.44 shows an example of PCMCIA card connection to the SH7750. To enable active
  18123. insertion of the PCMCIA cards (i.e. insertion or removal while system power is being supplied),
  18124. a 3-state buffer must be connected between the SH7750’s bus interface and the PCMCIA cards.
  18125.  
  18126. As operation in big-endian mode is not explicitly stipulated in the JEIDA/PCMCIA
  18127. specifications, the SH7750 supports only a little-endian mode PCMCIA interface.
  18128.  
  18129. The PCMCIA interface can only be accessed when the MMU is used. PCMCIA memory space
  18130. can be set in MMU page units, and there is a choice of 8-bit common memory, 16-bit common
  18131. memory, 8-bit attribute memory, 16-bit attribute memory, 8-bit I/O space, 16-bit I/O space, or
  18132. dynamic bus sizing. The setting is made with bits SA2–SA0 in PTEA.
  18133.  
  18134. Rev. 2.0, 02/99, page 387 of 830
  18135.  
  18136. ----------------------- Page 402-----------------------
  18137.  
  18138. SA2 SA1 SA0 Description
  18139.  
  18140. 0 0 0 Reserved (Setting prohibited)
  18141.  
  18142. 1 Dynamic I/O bus sizing
  18143.  
  18144. 1 0 8-bit I/O space
  18145.  
  18146. 1 16-bit I/O space
  18147.  
  18148. 1 0 0 8-bit common memory
  18149.  
  18150. 1 16-bit common memory
  18151.  
  18152. 1 0 8-bit attribute memory
  18153.  
  18154. 1 16-bit attribute memory
  18155.  
  18156. Wait cycles in a bus access can be selected with the TC bit in PTEA. When TC is cleared to 0,
  18157. bits A5W2–A5W0 in wait control register 2 (WCR2) and bits A5PCW1–A5PCW0, A5TED2–
  18158. A5TED0, and A5TEH2–A5TEH0 in the PCMCIA control register (PCR) are selected. When TC
  18159. is set to 1, bits A6W2–A6W0 in WCR2 and bits A6PCW1–A6PCW0, A6TED2–A6TED0, and
  18160. A6TEH2–A6TEH0 in PCR are selected.
  18161.  
  18162. AnPCW1–AnPCW0 specify the number of wait states to be inserted in a low-speed bus cycle; a
  18163. value of 0, 15, 30, or 50 can be set, and this value is added to the number of wait states for
  18164. insertion specified by WCR2. AnTED2–AnTED0 can be set to a value from 0 to 15, enabling
  18165. the address, &6, &($, &(%, and 5(* setup times with respect to the 5' and :( signals to
  18166. be secured. AnTEH2–AnTEH0 can also be set to a value from 0 to 15, enabling the address, &6,
  18167. &($, &(%, and 5(* write data hold times with respect to the 5' and :( signals to be
  18168. secured.
  18169.  
  18170. Wait cycles between cycles are set with bits A5IW2–A5IW0 and A6IW2–A6IW0 in wait control
  18171. register 1 (WCR1). The inter-cycle write cycles selected depend only on the area accessed (area
  18172. 5 or 6): when area 5 is accessed, bits A5IW2–A5IW0 are selected, and when area 6 is accessed,
  18173. bits A6IW2–A6IW0 are selected.
  18174.  
  18175. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18176. according to the set bus width. The first access is performed on the data for which there was an
  18177. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18178. The bus is not released during this period.
  18179.  
  18180. Rev. 2.0, 02/99, page 388 of 830
  18181.  
  18182. ----------------------- Page 403-----------------------
  18183.  
  18184. A25–A0 A25–A0
  18185. D15–D0 G
  18186. RD/WR D7–D0
  18187. CE1B/(CS6)
  18188. D15–D0
  18189. CE1A/(CS5) G
  18190. DIR
  18191. CE2B
  18192. CE2A D15–D8 PC card
  18193. (memory I/O)
  18194.  
  18195. G
  18196. SH7750 DIR
  18197.  
  18198. CE1
  18199. CE2
  18200.  
  18201. RD OE
  18202. WE1 WE/PGM
  18203. ICIORD (IORD)
  18204. ICIOWR G (IOWR)
  18205.  
  18206. REG REG
  18207. WAIT
  18208. RDY
  18209.  
  18210. IOIS16 (IOIS16)
  18211. Card
  18212. detection CD1, CD2
  18213. circuit
  18214.  
  18215. Output
  18216. Port A25–A0
  18217. G
  18218. D7–D0
  18219.  
  18220. D15–D0
  18221. G
  18222. DIR
  18223.  
  18224. D15–D8 PC card
  18225.  
  18226. (memory I/O)
  18227.  
  18228. G
  18229. DIR
  18230.  
  18231. CE1
  18232. CE2
  18233. OE
  18234. WE/PGM
  18235. G REG
  18236.  
  18237. WAIT
  18238.  
  18239. Card
  18240. detection CD1, CD2
  18241. circuit
  18242.  
  18243.  
  18244. Figure 13.44 Example of PCMCIA Interface
  18245.  
  18246. Rev. 2.0, 02/99, page 389 of 830
  18247.  
  18248. ----------------------- Page 404-----------------------
  18249.  
  18250. Memory Card Interface Basic Timing: Figure 13.45 shows the basic timing for the PCMCIA
  18251. IC memory card interface, and figure 13.46 shows the PCMCIA memory bus wait timing.
  18252.  
  18253. Tpcm1 Tpcm2
  18254.  
  18255. CKIO
  18256.  
  18257. A25–A0
  18258.  
  18259. CExx
  18260. REG
  18261.  
  18262. RD/WR
  18263.  
  18264. RD
  18265. (read)
  18266.  
  18267. D15–D0
  18268. (read)
  18269.  
  18270. WE1
  18271. (write)
  18272.  
  18273. D15–D0
  18274. (read)
  18275.  
  18276. BS
  18277.  
  18278. Figure 13.45 Basic Timing for PCMCIA Memory Card Interface
  18279.  
  18280. Rev. 2.0, 02/99, page 390 of 830
  18281.  
  18282. ----------------------- Page 405-----------------------
  18283.  
  18284. Tpcm0 Tpcm0w Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  18285.  
  18286. CKIO
  18287.  
  18288. A25–A0
  18289.  
  18290.  
  18291.  
  18292. CExx
  18293. REG
  18294.  
  18295. RD/WR
  18296.  
  18297. RD
  18298. (read)
  18299.  
  18300. D15–D0
  18301. (read)
  18302.  
  18303. WE1
  18304. (write)
  18305.  
  18306. D15–D0
  18307. (write)
  18308.  
  18309. BS
  18310.  
  18311. RDY
  18312.  
  18313. Figure 13.46 Wait Timing for PCMCIA Memory Card Interface
  18314.  
  18315. Rev. 2.0, 02/99, page 391 of 830
  18316.  
  18317. ----------------------- Page 406-----------------------
  18318.  
  18319. Common memory
  18320. (64 MB)
  18321. Access Physical
  18322. by CS5 wait address space
  18323. controller Physical I/O
  18324. addresses
  18325.  
  18326. 1 kB IO 1
  18327. Virtual Access page
  18328. address space by CS6 wait IO 1
  18329. controller
  18330. Common
  18331. IO 2
  18332. memory 1
  18333.  
  18334. Card 1 Common
  18335. on CS5 memory 2
  18336. Attribute memory Attribute memory IO 2
  18337. I/O space 1 (64 MB) 1 kB Different virtual pages
  18338. I/O space 2 page mapped to the same
  18339. . physical page
  18340. .
  18341. . Example of I/O spaces with different cycle times
  18342.  
  18343. (less than 1 kB)
  18344.  
  18345. I/O space
  18346. (64 MB)
  18347.  
  18348. Card 2
  18349. on CS6
  18350. .
  18351. .
  18352. .
  18353.  
  18354. The page size can be 1 kB, 4 kB, 64 kB, or 1 MB.
  18355.  
  18356. Example of PCMCIA interface mapping
  18357.  
  18358. Figure 13.47 PCMCIA Space Allocation
  18359.  
  18360. I/O Card Interface Timing: Figures 13.48 and 13.49 show the timing for the PCMCIA I/O card
  18361. interface.
  18362.  
  18363. When an I/O card interface access is made to a PCMCIA card in little-endian mode, dynamic
  18364. sizing of the I/O bus width is possible using the ,2,6 pin. When a 16-bit bus width is set, if
  18365. the ,2,6 signal is high during a word-size I/O bus cycle, the I/O port is recognized as being 8
  18366. bits in width. In this case, a data access for only 8 bits is performed in the I/O bus cycle being
  18367. executed, followed automatically by a data access for the remaining 8 bits.
  18368.  
  18369. Figure 13.50 shows the basic timing for dynamic bus sizing.
  18370.  
  18371. Rev. 2.0, 02/99, page 392 of 830
  18372.  
  18373. ----------------------- Page 407-----------------------
  18374.  
  18375. Tpci1 Tpci2
  18376.  
  18377. CKIO
  18378.  
  18379. A25–A0
  18380.  
  18381. CExx
  18382. REG
  18383.  
  18384. RD/WR
  18385.  
  18386. ICIORD
  18387. (read)
  18388.  
  18389. D15–D0
  18390. (read)
  18391.  
  18392. ICIOWR
  18393. (write)
  18394.  
  18395. D15–D0
  18396. (write)
  18397.  
  18398. BS
  18399.  
  18400. Figure 13.48 Basic Timing for PCMCIA I/O Card Interface
  18401.  
  18402. Rev. 2.0, 02/99, page 393 of 830
  18403.  
  18404. ----------------------- Page 408-----------------------
  18405.  
  18406. Tpci0 Tpci0w Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  18407.  
  18408. CKIO
  18409.  
  18410. A25–A0
  18411.  
  18412. CExx
  18413. REG
  18414.  
  18415. RD/WR
  18416.  
  18417. ICIORD
  18418. (read)
  18419.  
  18420.  
  18421. D15–D0
  18422. (read)
  18423.  
  18424. ICIOWR
  18425. (write)
  18426.  
  18427. D15–D0
  18428. (write)
  18429.  
  18430. BS
  18431.  
  18432. RDY
  18433.  
  18434. IOIS16
  18435.  
  18436. Figure 13.49 Wait Timing for PCMCIA I/O Card Interface
  18437.  
  18438. Rev. 2.0, 02/99, page 394 of 830
  18439.  
  18440. ----------------------- Page 409-----------------------
  18441.  
  18442. Tpci0 Tpci Tpci1w Tpci2 Tpci2w Tpci0 Tpci Tpci1w Tpci2 Tpci2w
  18443.  
  18444. CKIO
  18445.  
  18446.  
  18447.  
  18448.  
  18449. A25–A1
  18450.  
  18451.  
  18452. A0
  18453.  
  18454.  
  18455.  
  18456. CExx
  18457. REG (WE7)
  18458.  
  18459.  
  18460.  
  18461.  
  18462. RD/WR
  18463.  
  18464.  
  18465.  
  18466. IORD (WE2)
  18467. (read)
  18468.  
  18469.  
  18470. D15–D0
  18471. (read)
  18472.  
  18473.  
  18474.  
  18475. IOWR (WE3)
  18476. (write)
  18477.  
  18478.  
  18479.  
  18480.  
  18481.  
  18482. D15–D0
  18483. (write)
  18484.  
  18485.  
  18486.  
  18487. BS
  18488.  
  18489.  
  18490.  
  18491.  
  18492. RDY
  18493.  
  18494. IOIS16
  18495.  
  18496.  
  18497.  
  18498.  
  18499.  
  18500.  
  18501. Figure 13.50 Dynamic Bus Sizing Timing for PCMCIA I/O Card Interface
  18502.  
  18503. Rev. 2.0, 02/99, page 395 of 830
  18504.  
  18505. ----------------------- Page 410-----------------------
  18506.  
  18507. 13.3.8 MPX Interface
  18508.  
  18509. If the MD6 pin is set to 0 in a power-on reset, the MPX interface for normal memory is selected
  18510. for area 0. The MPX interface is selected for areas 1 to 6 by means of the MPX bit in BCR1.
  18511. The MPX interface offers a multiplexed address/data type bus protocol, and permits easy
  18512. connection to an external memory controller chip that uses a single 32-bit multiplexed
  18513. address/data bus. The address is output to D25–D0, and the access size to D63–D61.
  18514.  
  18515. For details of access sizes and data alignment, see section 13.3.1, Endian/Access Size and Data
  18516. Alignment.
  18517.  
  18518. The address signals output at A25–A0 are undefined.
  18519.  
  18520. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18521. according to the set bus width. The first access is performed on the data for which there was an
  18522. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18523. The bus is not released during this period.
  18524.  
  18525. D63 D62 D61 Access Size
  18526.  
  18527. 0 0 0 Byte
  18528.  
  18529. 1 Word
  18530.  
  18531. 1 0 Longword
  18532.  
  18533. 1 Quadword
  18534.  
  18535. 1 X X 32-byte burst
  18536.  
  18537. X: Don’t care
  18538.  
  18539. SH7750 MPX device
  18540.  
  18541. CKIO CLK
  18542. CSn CS
  18543. BS BS
  18544. RD FRAME
  18545. RD/WR WE
  18546. D63–D0 I/O63–I/O0
  18547. RDY RDY
  18548.  
  18549. Figure 13.51 Example of 64-Bit Data Width MPX Connection
  18550.  
  18551. The MPX interface timing is shown below.
  18552.  
  18553. When the MPX interface is used for areas 1 to 6, a bus size of 32 or 64 bits should be specified
  18554. in BCR2.
  18555.  
  18556. Rev. 2.0, 02/99, page 396 of 830
  18557.  
  18558. ----------------------- Page 411-----------------------
  18559.  
  18560. For wait control, waits specified by WCR2 and wait insertion by means of the 5'< pin can be
  18561. used.
  18562.  
  18563. Tm1
  18564. Tmd1w Tmd1
  18565.  
  18566. CKIO
  18567.  
  18568. RD/FRAME
  18569.  
  18570. D63–D0 A D0
  18571.  
  18572. CSn
  18573.  
  18574. RD/WR
  18575.  
  18576. RDY
  18577.  
  18578. BS
  18579.  
  18580. DACKn
  18581. (DA)
  18582.  
  18583. Figure 13.52 MPX Interface Timing 1 (Single Read Cycle, No Wait)
  18584.  
  18585. Rev. 2.0, 02/99, page 397 of 830
  18586.  
  18587. ----------------------- Page 412-----------------------
  18588.  
  18589.  
  18590. Tm1 Tmd1w Tmd1w Tmd1
  18591.  
  18592. CKIO
  18593.  
  18594. RD/FRAME
  18595.  
  18596. D63–D0 A D0
  18597.  
  18598. CSn
  18599.  
  18600. RD/WR
  18601.  
  18602. RDY
  18603.  
  18604. BS
  18605.  
  18606. DACKn
  18607. (DA)
  18608.  
  18609. Figure 13.53 MPX Interface Timing 2 (Single Read, One Internal Wait Inserted)
  18610.  
  18611. Rev. 2.0, 02/99, page 398 of 830
  18612.  
  18613. ----------------------- Page 413-----------------------
  18614.  
  18615.  
  18616. Tm1 Tmd1
  18617.  
  18618. CKIO
  18619.  
  18620. RD/FRAME
  18621.  
  18622. D63–D0 A D0
  18623.  
  18624. CSn
  18625.  
  18626. RD/WR
  18627.  
  18628. RDY
  18629.  
  18630. BS
  18631.  
  18632. DACKn
  18633. (DA)
  18634.  
  18635. Figure 13.54 MPX Interface Timing 3 (Single Write Cycle, No Wait)
  18636.  
  18637. Rev. 2.0, 02/99, page 399 of 830
  18638.  
  18639. ----------------------- Page 414-----------------------
  18640.  
  18641.  
  18642. Tm1 Tmd1w Tmd1w Tmd1
  18643.  
  18644. CKIO
  18645.  
  18646. RD/FRAME
  18647.  
  18648. D63–D0 A D0
  18649.  
  18650. CSn
  18651.  
  18652. RD/WR
  18653.  
  18654. RDY
  18655.  
  18656. BS
  18657.  
  18658. DACKn
  18659. (DA)
  18660.  
  18661. Figure 13.55 MPX Interface Timing 4 (Single Write, One Internal Wait Inserted)
  18662.  
  18663. Rev. 2.0, 02/99, page 400 of 830
  18664.  
  18665. ----------------------- Page 415-----------------------
  18666.  
  18667. Tm1 Tmd3 Tmd4
  18668. Tmd1w Tmd1 Tmd2
  18669.  
  18670. CKIO
  18671.  
  18672. RD/FRAME
  18673.  
  18674. D63–D0 A D0 D1 D2 D3
  18675.  
  18676. CSn
  18677.  
  18678. RD/WR
  18679.  
  18680. RDY
  18681.  
  18682. BS
  18683.  
  18684. DACKn
  18685. (DA)
  18686.  
  18687. Figure 13.56 MPX Interface Timing 5 (Burst Read Cycle, No Wait)
  18688.  
  18689.  
  18690. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  18691.  
  18692. CKIO
  18693.  
  18694. RD/FRAME
  18695.  
  18696. D63–D0 A D0 D1 D2 D3
  18697.  
  18698. CSn
  18699.  
  18700. RD/WR
  18701.  
  18702. RDY
  18703.  
  18704. BS
  18705.  
  18706. DACKn
  18707. (DA)
  18708.  
  18709. Figure 13.57 MPX Interface Timing 6 (Burst Read Cycle, One Internal Wait Inserted)
  18710.  
  18711. Rev. 2.0, 02/99, page 401 of 830
  18712.  
  18713. ----------------------- Page 416-----------------------
  18714.  
  18715. Tm1 Tmd4
  18716. Tmd1 Tmd2 Tmd3
  18717.  
  18718. CKIO
  18719.  
  18720. RD/FRAME
  18721.  
  18722. D63–D0 A D0 D1 D2 D3
  18723.  
  18724. CSn
  18725.  
  18726. RD/WR
  18727.  
  18728. RDY
  18729.  
  18730. BS
  18731.  
  18732. DACKn
  18733. (DA)
  18734.  
  18735. Figure 13.58 MPX Interface Timing 7 (Burst Write Cycle, No Wait)
  18736.  
  18737.  
  18738. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  18739.  
  18740. CKIO
  18741.  
  18742. RD/FRAME
  18743.  
  18744. D63–D0 A D0 D1 D2 D3
  18745.  
  18746. CSn
  18747.  
  18748. RD/WR
  18749.  
  18750. RDY
  18751.  
  18752. BS
  18753.  
  18754. DACKn
  18755. (DA)
  18756.  
  18757. Figure 13.59 MPX Interface Timing 8 (Burst Write Cycle, One Internal Wait Inserted for
  18758. First Data Only)
  18759.  
  18760. Rev. 2.0, 02/99, page 402 of 830
  18761.  
  18762. ----------------------- Page 417-----------------------
  18763.  
  18764. 13.3.9 Byte Control SRAM
  18765.  
  18766. The byte control SRAM interface is a memory interface that outputs a byte select strobe (:(Q)
  18767. in both read and write bus cycles. It has 16 bit data pins, and can be directly connected to SRAM
  18768. which has an upper byte select strobe and lower byte select strobe function such as UB and LB.
  18769.  
  18770. Areas 1 and 4 can be designated as byte control SRAM. However, when these areas are set to
  18771. MPX mode, MPX mode has priority.
  18772.  
  18773. The byte control SRAM write timing is the same as for the normal SRAM interface.
  18774.  
  18775. In read operations, the :(Q pin timing is different. In a read access, only the :( signal for the
  18776. byte being read is asserted. Assertion is synchronized with the fall of the CKIO clock, as for the
  18777. :( signal, while negation is synchronized with the rise of the CKIO clock, using the same
  18778. timing as the 5' signal.
  18779.  
  18780. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18781. according to the set bus width. The first access is performed on the data for which there was an
  18782. access request, and the remaining accesses are performed on the data at the 32-byte boundary.
  18783. The bus is not released during this period.
  18784.  
  18785. Figure 13.60 shows an example of byte control SRAM connection to the SH7750, and figures
  18786. 13.61 to 13.63 show examples of byte control SRAM bus timing.
  18787.  
  18788. Rev. 2.0, 02/99, page 403 of 830
  18789.  
  18790. ----------------------- Page 418-----------------------
  18791.  
  18792. 64K × 16-bit
  18793. SH7750 SRAM
  18794.  
  18795. A18–A3 A15–A0
  18796. CSn CS
  18797. RD OE
  18798. RD/WR WE
  18799. D63–D48 I/O15–I/O0
  18800. WE7 UB
  18801. WE6 LB
  18802.  
  18803. A15–A0
  18804. CS
  18805. OE
  18806. WE
  18807. D47–D32 I/O15–I/O0
  18808. WE5 UB
  18809. WE4 LB
  18810.  
  18811. A15–A0
  18812. CS
  18813. OE
  18814. WE
  18815. D31–D16 I/O15–I/O0
  18816. WE3 UB
  18817. WE2 LB
  18818.  
  18819. A15–A0
  18820. CS
  18821. OE
  18822. WE
  18823. D15–D0 I/O15–I/O0
  18824. WE1 UB
  18825. WE0 LB
  18826.  
  18827. Figure 13.60 Example of 64-Bit Data Width Byte Control SRAM
  18828.  
  18829. Rev. 2.0, 02/99, page 404 of 830
  18830.  
  18831. ----------------------- Page 419-----------------------
  18832.  
  18833. T1 T2
  18834.  
  18835. CKIO
  18836.  
  18837.  
  18838.  
  18839.  
  18840. A25–A0
  18841.  
  18842.  
  18843.  
  18844.  
  18845. CSn
  18846.  
  18847.  
  18848.  
  18849. RD/WR
  18850.  
  18851.  
  18852.  
  18853. RD
  18854.  
  18855. D63–D0
  18856.  
  18857. (read)
  18858.  
  18859.  
  18860.  
  18861.  
  18862.  
  18863. WEn
  18864.  
  18865.  
  18866.  
  18867. BS
  18868.  
  18869. RDY
  18870.  
  18871.  
  18872.  
  18873. DACKn
  18874. (SA: IO ← memory)
  18875.  
  18876.  
  18877. DACKn
  18878. (DA)
  18879.  
  18880. Figure 13.61 Byte Control SRAM Basic Read Cycle (No Wait)
  18881.  
  18882. Rev. 2.0, 02/99, page 405 of 830
  18883.  
  18884. ----------------------- Page 420-----------------------
  18885.  
  18886. T1 Tw T2
  18887.  
  18888. CKIO
  18889.  
  18890. A25–A0
  18891.  
  18892. CSn
  18893.  
  18894. RD/WR
  18895.  
  18896. RD
  18897.  
  18898. D63–D0
  18899. (read)
  18900.  
  18901. WEn
  18902.  
  18903. BS
  18904.  
  18905. RDY
  18906.  
  18907. DACKn
  18908. (SA: IO ← memory)
  18909.  
  18910. DACKn
  18911. (DA)
  18912.  
  18913. Figure 13.62 Byte Control SRAM Basic Read Cycle (One Internal Wait Cycle)
  18914.  
  18915. Rev. 2.0, 02/99, page 406 of 830
  18916.  
  18917. ----------------------- Page 421-----------------------
  18918.  
  18919. T1 Tw Twe T2
  18920.  
  18921. CKIO
  18922.  
  18923. A25–A0
  18924.  
  18925. CSn
  18926.  
  18927. RD/WR
  18928.  
  18929. RD
  18930.  
  18931. D63–D0
  18932. (read)
  18933.  
  18934. WEn
  18935.  
  18936. BS
  18937.  
  18938. RDY
  18939.  
  18940. DACKn
  18941. (SA: IO ← memory)
  18942.  
  18943. DACKn
  18944. (DA)
  18945.  
  18946. Figure 13.63 Byte Control SRAM Basic Read Cycle (One Internal Wait + One External
  18947. Wait)
  18948.  
  18949. Rev. 2.0, 02/99, page 407 of 830
  18950.  
  18951. ----------------------- Page 422-----------------------
  18952.  
  18953. 13.3.10 Waits between Access Cycles
  18954.  
  18955. A problem associated with higher external memory bus operating frequencies is that data buffer
  18956. turn-off on completion of a read from a low-speed device may be too slow, causing a collision
  18957. with the data in the next access, and so resulting in lower reliability or incorrect operation. To
  18958. avoid this problem, a data collision prevention feature has been provided. This memorizes the
  18959. preceding access area and the kind of read/write, and if there is a possibility of a bus collision
  18960. when the next access is started, inserts a wait cycle before the access cycle to prevent a data
  18961. collision. Wait cycle insertion consists of inserting idle cycles between access cycles, as shown
  18962. in section 13.2.3, Wait Control Register (WCR1). When the SH7750 performs consecutive write
  18963. cycles, the data transfer direction is fixed (from the SH7750 to other memory) and there is no
  18964. problem. With read accesses to the same area, also, in principle data is output from the same
  18965. data buffer, and wait cycle insertion is not performed. If there is originally space between
  18966. accesses, according to the setting of bits AnIW2–AnIW0 (n = 0 to 6) in WCR1, the number of
  18967. idle cycles inserted is the specified number of idle cycles minus the number of empty cycles.
  18968.  
  18969. When bus arbitration is performed, the bus is released after waits are inserted between cycles.
  18970.  
  18971. In single address mode DMA transfer, when data transfer is performed from an I/O device to
  18972. memory the data on the bus is determined by the speed of the I/O device. With a low-speed I/O
  18973. device, an inter-cycle idle wait equivalent to the output buffer turn-off time must be inserted.
  18974. Even with high-speed memory, when DMA transfer is considered, it may be necessary to insert
  18975. an inter-cycle wait to adjust to the speed of a low-speed device, preventing the memory from
  18976. being used at full speed.
  18977.  
  18978. Bits DMAIW2–DMAIW0 in wait control register 1 (WCR1) allow an inter-cycle wait setting to
  18979. be made when transferring data from an I/O device to memory using single address mode DMA
  18980. transfer. From 0 to 15 waits can be inserted. The number of waits specified by DMAIW2–
  18981. DMAIW0 are inserted in single address DMA transfers to all areas.
  18982.  
  18983. In dual address mode DMA transfer, the normal inter-cycle wait specified by AnIW2–AnIW0 (n
  18984. = 0 to 6) is inserted.
  18985.  
  18986. Rev. 2.0, 02/99, page 408 of 830
  18987.  
  18988. ----------------------- Page 423-----------------------
  18989.  
  18990. T1 T2 Twait T1 T2 Twait T1 T2
  18991.  
  18992. CKIO
  18993.  
  18994. A25–A0
  18995.  
  18996. CSm
  18997.  
  18998. CSn
  18999.  
  19000. BS
  19001.  
  19002. RD/WR
  19003.  
  19004. RD
  19005.  
  19006. D63–D0
  19007.  
  19008. Area m space read Area n space read Area n space write
  19009.  
  19010. Area m inter-access wait specification Area n inter-access wait specification
  19011.  
  19012. Figure 13.64 Waits between Access Cycles
  19013.  
  19014. 13.3.11 Bus Arbitration
  19015.  
  19016. The SH7750 is provided with a bus arbitration function that grants the bus to an external device
  19017. when it makes a bus request. Also provided is a bus arbitration function to support the
  19018. connection of two processors. The purpose of this function is to enable a multiprocessor system
  19019. to be implemented with a minimum of hardware by connecting the processors in a bus
  19020. arbitration master and slave arrangement.
  19021.  
  19022. There are three bus arbitration modes: master mode, partial-sharing master mode, and slave
  19023. mode. In master mode the bus is held on a constant basis, and is released to another device in
  19024. response to a bus request. In slave mode the bus is not held on a constant basis; a bus request is
  19025. issued each time an external bus cycle occurs, and the bus is released again at the end of the
  19026. access. In partial-sharing master mode, only area 2 is shared with external devices; slave mode is
  19027. in effect for area 2, while for other spaces, bus arbitration is not performed and the bus is held
  19028. constantly. The area in the master mode chip to which area 2 in the partial-sharing master mode
  19029. chip is allocated is determined by an external circuit.
  19030.  
  19031. Rev. 2.0, 02/99, page 409 of 830
  19032.  
  19033. ----------------------- Page 424-----------------------
  19034.  
  19035. Master mode and slave mode can be specified by the external mode pins. Partial-sharing master
  19036. mode is entered from master mode by means of a software setting. See Appendix C, Mode Pin
  19037. Settings, for the external mode pin settings. In master mode and slave mode, the bus goes to the
  19038. high-impedance state when not being held, so that it is possible to directly connect the master
  19039. mode and slave mode chips. In partial-sharing master mode, the bus is constantly driven, and
  19040. therefore an external buffer is necessary for connection to the master bus. In master mode, it is
  19041. possible to connect an external device that issues bus requests instead of a slave mode chip. In
  19042. the following description, an external device that issues bus requests is also referred to as a
  19043. slave.
  19044.  
  19045. The SH7750 has two internal bus masters: the CPU and the DMAC. When synchronous DRAM
  19046. or DRAM is connected and refresh control is performed, refresh requests constitute a third bus
  19047. master. In addition to these are bus requests from external devices in master mode. If requests
  19048. occur simultaneously, priority is given, in high-to-low order, to a bus request from an external
  19049. device, a refresh request, the DMAC, and the CPU.
  19050.  
  19051. To prevent incorrect operation of connected devices when the bus is transferred between master
  19052. and slave, all bus control signals are negated before the bus is released. When mastership of the
  19053. bus is received, also, bus control signals begin driving the bus from the negated state. Since
  19054. signals are driven to the same value by the master and slave exchanging the bus, output buffer
  19055. collisions can be avoided. By turning off the output buffer on the side releasing the bus, and
  19056. turning on the output buffer on the side receiving the bus, simultaneously with respect to the bus
  19057. control signals, it is possible to eliminate the signal high-impedance period. It is not necessary to
  19058. provide the pull-up resistors usually inserted in these control signal lines to prevent incorrect
  19059. operation due to external noise in the high-impedance state.
  19060.  
  19061. Bus transfer is executed between bus cycles.
  19062.  
  19063. When the bus release request signal (%5(4) is asserted, the SH7750 releases the bus as soon as
  19064. the currently executing bus cycle ends, and outputs the bus use permission signal (%$&.).
  19065. However, bus release is not performed during a burst transfer for cache fill or write-back, or
  19066. between a read cycle and write cycle during execution of a TAS instruction. Also, bus
  19067. arbitration is not performed between bus cycles generated due to the fact that the data bus width
  19068. is smaller than the access size, such as when a longword access is made to 8-bit memory. When
  19069. %5(4 is negated, %$&. is negated and use of the bus is resumed. See Appendix E, Pin
  19070. Functions, for the pin states when the bus is released.
  19071.  
  19072. As the CPU in the SH7750 is connected to cache memory by a dedicated internal bus, reading
  19073. from cache memory can still be carried out when the bus is being used by another bus master
  19074. inside or outside the SH7750. When writing from the CPU, an external write cycle is generated
  19075. when write-through has been set for the cache in the SH7750, or when an access is made to a
  19076. cache-off area. There is consequently a delay until the bus is returned.
  19077.  
  19078. Rev. 2.0, 02/99, page 410 of 830
  19079.  
  19080. ----------------------- Page 425-----------------------
  19081.  
  19082. When the SH7750 wants to take back the bus in response to an internal memory refresh request,
  19083. it negates %$&.. On receiving the %$&. negation, the device that asserted the external bus
  19084. release request negates %5(4 to release the bus. The bus is thereby returned to the SH7750,
  19085. which then carries out the necessary processing.
  19086.  
  19087. CKIO
  19088.  
  19089. BREQ
  19090. BACK Asserted for at least 2 cyc
  19091.  
  19092. Negated within 2 cyc
  19093. HiZ
  19094. A25–A0
  19095.  
  19096. HiZ
  19097. CSn
  19098.  
  19099. RD/WR HiZ
  19100.  
  19101. HiZ
  19102. RD
  19103.  
  19104. HiZ
  19105. WEn
  19106.  
  19107. HiZ HiZ
  19108. D63–D0 (write)
  19109.  
  19110. HiZ
  19111. BS
  19112.  
  19113. Master mode device access
  19114.  
  19115. Must be asserted for
  19116. at least 2 cyc Must be negated within 2 cyc
  19117.  
  19118. BREQ/BSACK
  19119.  
  19120. BACK/BSREQ
  19121.  
  19122. HiZ HiZ
  19123. A25–A0
  19124.  
  19125. HiZ HiZ
  19126. CSn
  19127.  
  19128. HiZ HiZ
  19129. RD/WR
  19130.  
  19131. HiZ HiZ
  19132. RD
  19133.  
  19134. HiZ HiZ
  19135. WEn
  19136.  
  19137. HiZ HiZ
  19138. D63–D0 (write)
  19139.  
  19140. HiZ HiZ
  19141. BS
  19142.  
  19143. Slave mode device access
  19144.  
  19145. Master access Slave access Master access
  19146.  
  19147. Figure 13.65 Arbitration Sequence
  19148. Rev. 2.0, 02/99, page 411 of 830
  19149.  
  19150. ----------------------- Page 426-----------------------
  19151.  
  19152. 13.3.12 Master Mode
  19153.  
  19154. The master mode processor holds the bus itself unless it receives a bus request.
  19155.  
  19156. On receiving an assertion (low level) of the bus request signal (%5(4) from off-chip, the master
  19157. mode processor releases the bus and asserts (drives low) the bus use permission signal (%$&.)
  19158. as soon as the currently executing bus cycle ends. If a bus release request due to a refresh request
  19159. has not been issued, on receiving the %5(4 negation (high level) indicating that the slave has
  19160. released the bus, the processor negates (drives high) the %$&. signal and resumes use of the
  19161. bus.
  19162.  
  19163. If a bus request is issued due to a memory refresh request in the bus-released state, the processor
  19164. negates the bus use permission signal (%$&.), and on receiving the %5(4 negation indicating
  19165. that the slave has released the bus, resumes use of the bus.
  19166.  
  19167. When the bus is released, all bus interface related output signals and input/output signals go to
  19168. the high-impedance state, except for the synchronous DRAM interface CKE signal and bus
  19169. arbitration %$&. signal, and DACK0 and DACK1 which control DMA transfers.
  19170.  
  19171. With DRAM, the bus is released after precharging is completed. With synchronous DRAM, also,
  19172. a precharge command is issued for the active bank and the bus is released after precharging is
  19173. completed.
  19174.  
  19175. The actual bus release sequence is as follows.
  19176.  
  19177. First, the bus use permission signal is asserted in synchronization with the rising edge of the
  19178. clock. The address bus and data bus go to the high-impedance state in synchronization with the
  19179. next rising edge of the clock after this %$&. assertion. At the same time, the bus control signals
  19180. (%6, &6Q, 5$6, 5$6, :(Q, 5', RD/:5, 5', RD/:5, &($, and &(%) go to the high-
  19181. impedance state. These bus control signals are negated no later than one cycle before going to
  19182. high-impedance. Bus request signal sampling is performed on the rising edge of the clock.
  19183.  
  19184. The sequence for re-acquiring the bus from the slave is as follows.
  19185.  
  19186. As soon as %5(4 negation is detected on the rising edge of the clock, %$&. is negated and bus
  19187. control signal driving is started. Driving of the address bus and data bus starts at the next rising
  19188. edge of an in-phase clock. The bus control signals are asserted and the bus cycle is actually
  19189. started, at the earliest, at the clock rising edge at which the address and data signals are driven.
  19190.  
  19191. In order to reacquire the bus and start execution of a refresh operation or bus access, the %5(4
  19192. signal must be negated for at least two cycles.
  19193.  
  19194. If a refresh request is generated when %$&. has been asserted and the bus has been released,
  19195. the %$&. signal is negated even while the %5(4 signal is asserted to request the slave to
  19196. relinquish the bus. When the SH7750 is used in master mode, consecutive bus accesses may be
  19197.  
  19198. Rev. 2.0, 02/99, page 412 of 830
  19199.  
  19200. ----------------------- Page 427-----------------------
  19201.  
  19202. attempted to reduce the overhead due to arbitration in the case of a slave designed independently
  19203. by the user. When connecting a slave for which the total duration of consecutive accesses
  19204. exceeds the refresh cycle, the design should provide for the bus to be released as soon as
  19205. possible after negation of the %$&. signal is detected.
  19206.  
  19207. 13.3.13 Slave Mode
  19208.  
  19209. In slave mode, the bus is normally in the released state, and an external device cannot be
  19210. accessed unless the bus is acquired through execution of the bus arbitration sequence. In a reset,
  19211. also, the bus-released state is established and the bus arbitration sequence is started from the
  19212. reset vector fetch.
  19213.  
  19214. To acquire the bus, the slave device asserts (drives low) the %65(4 signal in synchronization
  19215. with the rising edge of the clock. The bus use permission %6$&. signal is sampled for assertion
  19216. (low level) in synchronization with the rising edge of the clock. When %6$&. assertion is
  19217. detected, the bus control signals and address bus are immediately driven at the negated level.
  19218. The bus cycle is started at the next rising edge of the clock. The last signal negated at the end of
  19219. the access cycle is synchronized with the rising edge of the clock. When the bus cycle ends, the
  19220. %65(4 signal is negated and the release of the bus is reported to the master. On the next rising
  19221. edge of the clock, the control signals are set to high-impedance.
  19222.  
  19223. In order for the slave mode processor to begin access, the %6$&. signal must be asserted for at
  19224. least two cycles.
  19225.  
  19226. For a slave access cycle in DRAM or synchronous DRAM, the bus is released on completion of
  19227. precharging, as in the case of the master.
  19228.  
  19229. Refresh control is left to the master mode device, and any refresh control settings made in slave
  19230. mode are ignored.
  19231.  
  19232. Do not use DRAM/synchronous DRAM RAS down mode in slave mode.
  19233.  
  19234. Synchronous DRAM mode register settings should be made by the master mode device. Do not
  19235. use the DMAC’s DDT mode in slave mode.
  19236.  
  19237. Rev. 2.0, 02/99, page 413 of 830
  19238.  
  19239. ----------------------- Page 428-----------------------
  19240.  
  19241. 13.3.14 Partial-Sharing Master Mode
  19242.  
  19243. In partial-sharing master mode, area 2 only is shared with other devices, and other areas can be
  19244. accessed at all times. Partial-sharing master mode can be set by setting master mode with the
  19245. external mode pins, and setting the PSHR bit to 1 in BCR1 in the initialization procedure in a
  19246. power-on reset. In a manual reset the bus state controller setting register values are retained, and
  19247. so need not be set again.
  19248.  
  19249. Partial-sharing master mode is designed for use in conjunction with a master mode chip. The
  19250. partial-sharing master can access a device on the master side via area 2, but the master cannot
  19251. access a device on the partial-sharing master side.
  19252.  
  19253. An address and control signal buffer and a data buffer must be located between the partial-
  19254. sharing master and the master, and controlled by a buffer control circuit.
  19255.  
  19256. The partial-sharing master mode processor uses the following procedure to access area 2. It
  19257. asserts the %65(4 signal on the rising edge of the clock, and issues a bus request to the master.
  19258. It samples %6$&. on each rising edge of the clock, and on receiving %6$&. assertion, starts
  19259. the access cycle on the next rising edge of the clock. At the end of the access, it negates %65(4
  19260. on the rising edge of the clock. Buffer control in an access to an area 2 device by the partial-
  19261. sharing master is carried out by referencing the &6 signal or %65(4 and %6$&. signals on
  19262. the partial-sharing master side. Permission to use the bus is reported by the %6$&. line
  19263. connected to the partial-sharing master, but the master may also negate the %6$&. signal even
  19264. while the bus is being used, if it needs the bus urgently in order to service a refresh, for example.
  19265. Consequently, the partial-sharing master has to monitor the %65(4 signal to see whether it can
  19266. continue to use the bus after detecting %6$&. assertion. In the case of the address buffer, after
  19267. the address buffer is turned on when %6$&. assertion is detected, the buffer is kept on until
  19268. %65(4 is negated, at which point it is turned off. If the turning-off of the buffer used is late,
  19269. resulting in a collision with the start of an access cycle on the master side, the %65(4 signal
  19270. output from the partial-sharing master must be routed through a delay circuit as part of the buffer
  19271. control circuit, and input to the master %5(4 signal.
  19272.  
  19273. In order for a partial-sharing master mode processor to begin area 2 access, the %6$&. signal
  19274. must be asserted for at least two cycles.
  19275.  
  19276. When the bus is released after area 2 has been accessed in partial-sharing master mode, if area 2
  19277. is synchronous DRAM, there is a wait of the period required for auto-precharge before bus
  19278. release is performed.
  19279.  
  19280. In partial-sharing master mode, refreshing is not performed for area 2 (refresh requests are
  19281. ignored).
  19282.  
  19283. Do not use DRAM/synchronous DRAM RAS down mode in partial-sharing master mode.
  19284.  
  19285. Rev. 2.0, 02/99, page 414 of 830
  19286.  
  19287. ----------------------- Page 429-----------------------
  19288.  
  19289. Area 2 synchronous DRAM mode register settings should be made by the master mode device.
  19290. Set partial-sharing master mode (by setting the PSHR bit to 1 in BCR1) after completion of the
  19291. area 3 synchronous DRAM mode register settings.
  19292.  
  19293. In partial-sharing master mode, DMA transfer should not be performed on area 2, and the
  19294. DMAC’s DDT mode should not be used.
  19295.  
  19296. 13.3.15 Cooperation between Master and Slave
  19297.  
  19298. To enable system resources to be controlled in a harmonious fashion by master and slave, their
  19299. respective roles must be clearly defined. Before DRAM or synchronous DRAM is used,
  19300. initialization operations must be carried out. Responsibility must also be assigned when a
  19301. standby operation is performed to implement the power-down state.
  19302.  
  19303. The design of the SH7750 provides for all control, including initialization, refreshing, and
  19304. standby control, to be carried out by the master mode device. In a dual-processor configuration
  19305. using direct master/slave connection, all processing except direct access to memory is handled
  19306. by the master. In a combination of master mode and partial-sharing master mode, the partial-
  19307. sharing master mode processor performs initialization, refreshing, and standby control for the
  19308. areas connected to it, with the exception of area 2, while the master performs initialization of the
  19309. memory connected to it.
  19310.  
  19311. If the SH7750 is specified as the master in a power-on reset, it will not accept bus requests from
  19312. the slave until the %5(4 enable bit (BCR1.BREQEN) is set to 1.
  19313.  
  19314. To ensure that the slave processor does not access memory requiring initialization before use,
  19315. such as DRAM and synchronous DRAM, until initialization is completed, write 1 to the %5(4
  19316. enable bit after initialization ends.
  19317.  
  19318. Before setting self-refresh mode in standby mode, etc., write 0 to the %5(4 enable bit to
  19319. invalidate the %5(4 signal from the slave. Write 1 to the %5(4 enable bit only after the master
  19320. has performed the necessary processing (refresh settings, etc.) for exiting self-refresh mode.
  19321.  
  19322. Rev. 2.0, 02/99, page 415 of 830
  19323.  
  19324. ----------------------- Page 430-----------------------
  19325.  
  19326. Rev. 2.0, 02/99, page 416 of 830
  19327.  
  19328. ----------------------- Page 431-----------------------
  19329.  
  19330. Section 14 Direct Memory Access Controller (DMAC)
  19331.  
  19332. 14.1 Overview
  19333.  
  19334. The SH7750 includes an on-chip four-channel direct memory access controller (DMAC). The
  19335. DMAC can be used in place of the CPU to perform high-speed data transfers among external
  19336. devices equipped with DACK (DMA transfer end notification), external memories, memory-
  19337. mapped external devices, and on-chip peripheral modules (except the DMAC, BSC, and UBC).
  19338. Using the DMAC reduces the burden on the CPU and increases the operating efficiency of the
  19339. chip.
  19340.  
  19341. 14.1.1 Features
  19342.  
  19343. The DMAC has the following features.
  19344.  
  19345. • Four channels
  19346. • Physical address space
  19347. • Choice of 8-bit, 16-bit, 32-bit, 64-bit, or 32-byte transfer data length
  19348. • Maximum of 16 M (16,777,216) transfers
  19349. • Choice of single or dual address mode
  19350.  Single address mode: Either the transfer source or the transfer destination (peripheral
  19351. device) is accessed by a DACK signal while the other is accessed by address. One data
  19352. transfer is completed in one bus cycle.
  19353.  Dual address mode: Both the transfer source and transfer destination are accessed by
  19354. address. Values set in DMAC internal registers indicate the accessed address for both the
  19355. transfer source and the transfer destination. Two bus cycles are required for one data
  19356. transfer.
  19357. • Channel functions: Transfer modes that can be set are different for each channel.
  19358.  Channel 0: Single or dual address mode. External requests are accepted.
  19359.  Channel 1: Single or dual address mode. External requests are accepted.
  19360.  Channel 2: Dual address mode only.
  19361.  Channel 3: Dual address mode only.
  19362. • Transfer requests: The following three DMAC transfer activation requests are supported.
  19363.  External request: From two '5(4 pins. Either low level detection or falling edge
  19364. detection can be specified. External requests can be accepted on channels 0 and 1 only.
  19365.  Requests from on-chip peripheral modules: Transfer requests from modules such as the
  19366. SCI and TMU. These can be accepted on all channels.
  19367.  Auto-request: The transfer request is generated automatically within the DMAC.
  19368.  
  19369. Rev. 2.0, 02/99, page 417 of 830
  19370.  
  19371. ----------------------- Page 432-----------------------
  19372.  
  19373. • Choice of bus mode: Cycle steal mode or burst mode
  19374. • Two types of DMAC channel priority ranking:
  19375.  Fixed priority mode: Channel priorities are permanently fixed.
  19376.  Round robin mode: Sets the lowest priority for the channel for which an execution
  19377. request was last accepted.
  19378. • An interrupt request can be sent to the CPU on completion of the specified number of
  19379. transfers.
  19380. • On-demand data transfer mode (DDT mode)
  19381. In this mode, interfacing between an external device and the DMAC is performed using the
  19382. '%5(4, %$9/, 75, 7'$&., and ID [1:0] pins. External requests can be accepted on all
  19383. four channels.
  19384. For channel 0, data transfer can be carried out with the transfer mode, number of transfers,
  19385. transfer address (single only), etc., specified by the external device.
  19386. For channels 1 to 3, when transfer is performed by means of an on-chip peripheral module
  19387. request or auto-request, the operation is the same as in the normal mode. On these channels,
  19388. data transfer can be initiated by an external request.
  19389.  Channel 0: Single address mode. External requests are accepted
  19390.  Channel 1: Single or dual address mode. External requests are accepted.
  19391.  Channel 2: Single or dual address mode. External requests are accepted.
  19392.  Channel 3: Single or dual address mode. External requests are accepted.
  19393. In DDT mode, data transfer is carried out using the '%5(4, %$9/, 75, 7'$&., and ID
  19394. [1:0] signals to perform handshaking between the external device and the DMAC.
  19395.  
  19396. Rev. 2.0, 02/99, page 418 of 830
  19397.  
  19398. ----------------------- Page 433-----------------------
  19399.  
  19400. 14.1.2 Block Diagram
  19401.  
  19402. Figure 14.1 shows a block diagram of the DMAC.
  19403.  
  19404. DMAC module
  19405.  
  19406. Count
  19407. control SARn
  19408.  
  19409. Register DARn
  19410. control
  19411.  
  19412. s DMATCRn
  19413. u s
  19414. b u Activation
  19415.  
  19416. On-chip l b
  19417. a l control
  19418. r a
  19419. peripheral e n CHCRn
  19420. h r
  19421. module p e
  19422. i t
  19423. r n
  19424. e I
  19425. P
  19426. DMAOR
  19427. Request
  19428. TMU
  19429. priority
  19430. SCI, SCIF
  19431. control
  19432.  
  19433. DACK0, DACK1
  19434. DRAK0, DRAK1
  19435.  
  19436. Bus
  19437. interface
  19438.  
  19439. s
  19440. p s
  19441. i e
  19442. h r
  19443. c- d SAR0, DAR0, DMATCR0,
  19444. n d
  19445. o a dreq0-3 CHCR0 only
  19446. / e
  19447. s l
  19448. s u
  19449. e d
  19450. r o
  19451. d
  19452. d m DDT module
  19453. a l
  19454.  
  19455. l a
  19456. DREQ0, DREQ1 a r
  19457. n e DTR command buffer
  19458. r h
  19459. e p
  19460. t i
  19461. x r
  19462. E e
  19463. BAVL p
  19464. 32B data CH0 CH1 CH2 CH3
  19465. buffer DBREQ
  19466. External bus
  19467. Bus state DDTMODE Request controller
  19468. ID[1:0]
  19469. controller BAVL
  19470. TDACK DDTD
  19471. 48 bits
  19472. DMAOR: DMAC operation register id[1:0] TR DBREQ
  19473. SARn: DMAC source address
  19474. tdack
  19475. register
  19476. DARn: DMAC destination address register
  19477. DMATCRn: DMAC transfer count register
  19478. CHCRn: DMAC channel control register
  19479. (n: 0 to 3)
  19480.  
  19481. Figure 14.1 Block Diagram of DMAC
  19482.  
  19483. Rev. 2.0, 02/99, page 419 of 830
  19484.  
  19485. ----------------------- Page 434-----------------------
  19486.  
  19487. 14.1.3 Pin Configuration
  19488.  
  19489. Tables 14.1 and 14.2 show the DMAC pins.
  19490.  
  19491. Table 14.1 DMAC Pins
  19492.  
  19493. Channel Pin Name Abbreviation I/O Function
  19494.  
  19495. 0 DMA transfer '5(4 Input DMA transfer request input from
  19496. request external device to channel 0
  19497.  
  19498. '5(4 acceptance DRAK0 Output Acceptance of request for DMA
  19499. confirmation transfer from channel 0 to external
  19500. device
  19501.  
  19502. Notification to external device of start
  19503. of execution
  19504.  
  19505. DMA transfer end DACK0 Output Strobe output to external device of
  19506. notification DMA transfer request from channel 0
  19507. to external device
  19508.  
  19509. 1 DMA transfer '5(4 Input DMA transfer request input from
  19510. request external device to channel 1
  19511.  
  19512. '5(4 acceptance DRAK1 Output Acceptance of request for DMA
  19513. confirmation transfer from channel 1 to external
  19514. device
  19515.  
  19516. Notification to external device of start
  19517. of execution
  19518.  
  19519. DMA transfer end DACK1 Output Strobe output to external device of
  19520. notification DMA transfer request from channel 1
  19521. to external device
  19522.  
  19523. Rev. 2.0, 02/99, page 420 of 830
  19524.  
  19525. ----------------------- Page 435-----------------------
  19526.  
  19527. Table 14.2 DMAC Pins in DDT Mode
  19528.  
  19529. Pin Name Abbreviation I/O Function
  19530.  
  19531. Data bus request '%5(4 Input Data bus release request from external
  19532. ('5(4) device for DTR format input
  19533.  
  19534. Data bus available %$9/ Output Data bus release notification
  19535. (DRAK0) Data bus can be used 2 cycles after
  19536.  
  19537. %$9/ is asserted
  19538.  
  19539. Transfer request signal 75 Input If asserted 2 cycles after %$9/
  19540. ('5(4) assertion, DTR format is sent
  19541.  
  19542. Only 75 asserted: DMA request
  19543.  
  19544. '%5(4 and 75 asserted
  19545. simultaneously: Direct request to
  19546. channel 2
  19547.  
  19548. DMAC strobe 7'$&. Output Reply strobe signal for external device
  19549. (DACK0) from DMAC
  19550.  
  19551. Channel number ID [1:0] Output Notification of channel number to
  19552. notification (DRAK1, DACK1) external device at same time as 7'$&.
  19553. output
  19554.  
  19555. (ID [1] = DRAK1, ID [0] = DACK1)
  19556.  
  19557. 14.1.4 Register Configuration
  19558.  
  19559. Table 14.3 summarizes the DMAC registers. The DMAC has a total of 17 registers: four
  19560. registers are allocated to each channel, and an additional control register is shared by all four
  19561. channels.
  19562.  
  19563. Table 14.3 DMAC Registers
  19564.  
  19565. Chan- Abbre- Read/ Area 7 Access
  19566. nel Name viation Write Initial Value P4 Address Address Size
  19567. 0 DMA source SAR0 R/W*2 Undefined H'FFA00000 H'1FA00000 32
  19568.  
  19569. address register 0
  19570. DMA destination DAR0 R/W*2 Undefined H'FFA00004 H'1FA00004 32
  19571.  
  19572. address register 0
  19573. DMA transfer DMATCR0 R/W*2 Undefined H'FFA00008 H'1FA00008 32
  19574.  
  19575. count register 0
  19576.  
  19577. 1, 2
  19578. DMA channel CHCR0 R/W* * H'00000000 H'FFA0000C H'1FA0000C 32
  19579. control register 0
  19580.  
  19581. Rev. 2.0, 02/99, page 421 of 830
  19582.  
  19583. ----------------------- Page 436-----------------------
  19584.  
  19585. Table 14.3 DMAC Registers
  19586.  
  19587. Chan- Abbre- Read/ Area 7 Access
  19588. nel Name viation Write Initial Value P4 Address Address Size
  19589.  
  19590. 1 DMA source SAR1 R/W Undefined H'FFA00010 H'1FA00010 32
  19591. address register 1
  19592.  
  19593. DMA destination DAR1 R/W Undefined H'FFA00014 H'1FA00014 32
  19594. address register 1
  19595.  
  19596. DMA transfer DMATCR1 R/W Undefined H'FFA00018 H'1FA00018 32
  19597. count register 1
  19598. DMA channel CHCR1 R/W*1 H'00000000 H'FFA0001C H'1FA0001C 32
  19599.  
  19600. control register 1
  19601.  
  19602. 2 DMA source SAR2 R/W Undefined H'FFA00020 H'1FA00020 32
  19603. address register 2
  19604.  
  19605. DMA destination DAR2 R/W Undefined H'FFA00024 H'1FA00024 32
  19606. address register 2
  19607.  
  19608. DMA transfer DMATCR2 R/W Undefined H'FFA00028 H'1FA00028 32
  19609. count register 2
  19610. DMA channel CHCR2 R/W*1 H'00000000 H'FFA0002C H'1FA0002C 32
  19611.  
  19612. control register 2
  19613.  
  19614. 3 DMA source SAR3 R/W Undefined H'FFA00030 H'1FA00030 32
  19615. address register 3
  19616.  
  19617. DMA destination DAR3 R/W Undefined H'FFA00034 H'1FA00034 32
  19618. address register 3
  19619.  
  19620. DMA transfer DMATCR3 R/W Undefined H'FFA00038 H'1FA00038 32
  19621. count register 3
  19622. DMA channel CHCR3 R/W*1 H'00000000 H'FFA0003C H'1FA0003C 32
  19623.  
  19624. control register 3
  19625. Com- DMA operation DMAOR R/W*1 H'00000000 H'FFA00040 H'1FA00040 32
  19626.  
  19627. mon register
  19628.  
  19629. Notes: Longword access should be used for all control registers. If a different access width is
  19630. used, reads will return all 0s and writes will not be possible.
  19631. 1. Bit 1 of CHCR0–CHCR3 and bits 2 and 1 of DMAOR can only be written with 0 after
  19632. being read as 1, to clear the flags.
  19633. 2. In DDT mode, writes from the CPU are masked. Writes from external devices using
  19634. the DTR format are possible.
  19635.  
  19636. Rev. 2.0, 02/99, page 422 of 830
  19637.  
  19638. ----------------------- Page 437-----------------------
  19639.  
  19640. 14.2 Register Descriptions
  19641.  
  19642. 14.2.1 DMA Source Address Registers 0–3 (SAR0–SAR3)
  19643.  
  19644. Bit: 31 30 29 28 27 26 25 24
  19645.  
  19646. Initial value: — — — — — — — —
  19647.  
  19648. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19649.  
  19650. Bit: 23 0
  19651.  
  19652. · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
  19653.  
  19654. Initial value: — · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · —
  19655.  
  19656. R/W: R/W · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · R/W
  19657.  
  19658. DMA source address registers 0–3 (SAR0–SAR3) are 32-bit readable/writable registers that
  19659. specify the source address of a DMA transfer. These registers have a counter feedback function,
  19660. and during a DMA transfer they indicate the next source address. In single address mode, the
  19661. SAR value is ignored when a device with DACK has been specified as the transfer source.
  19662.  
  19663. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit,
  19664. 64-bit, or 32-byte data transfer, respectively. If a different address is specified, an address error
  19665. will be detected and the DMAC will halt.
  19666.  
  19667. The initial value of these registers after a power-on or manual reset is undefined. They retain
  19668. their values in standby mode and deep sleep mode.
  19669.  
  19670. When transfer is performed from memory to an external device in DDT mode, DTR format
  19671. [31:0] is set in SAR0 [31:0].
  19672.  
  19673. Rev. 2.0, 02/99, page 423 of 830
  19674.  
  19675. ----------------------- Page 438-----------------------
  19676.  
  19677. 14.2.2 DMA Destination Address Registers 0–3 (DAR0–DAR3)
  19678.  
  19679. Bit: 31 30 29 28 27 26 25 24
  19680.  
  19681. Initial value: — — — — — — — —
  19682.  
  19683. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19684.  
  19685. Bit: 23 0
  19686.  
  19687. · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
  19688.  
  19689. Initial value: — · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · —
  19690.  
  19691. R/W: R/W · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · R/W
  19692.  
  19693. DMA destination address registers 0–3 (DAR0–DAR3) are 32-bit readable/writable registers that
  19694. specify the destination address of a DMA transfer. These registers have a counter feedback
  19695. function, and during a DMA transfer they indicate the next destination address. In single address
  19696. mode, the DAR value is ignored when a device with DACK has been specified as the transfer
  19697. destination.
  19698.  
  19699. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit,
  19700. 64-bit, or 32-byte data transfer, respectively. If a different address is specified, an address error
  19701. will be detected and the DMAC will halt.
  19702.  
  19703. The initial value of these registers after a power-on or manual reset is undefined. They retain
  19704. their values in standby mode and deep sleep mode.
  19705.  
  19706. When transfer is performed from an external device to memory in DDT mode, DTR format
  19707. [31:0] is set in DAR0 [31:0].
  19708.  
  19709. Note: When a 16-bit, 32-bit, 64-bit, or 32-byte boundary address is specified, take care with
  19710. the setting of bit 0, bits 1–0, bits 2–0, or bits 4–0, respectively. If an address
  19711. specification that ignores boundary considerations is made, the DMAC will detect an
  19712. address error and halt operation on all channels (DMAOR: address error flag AE = 1).
  19713. The DMAC will also detect an address error and halt if an area 7 address is specified in
  19714. an external data bus transfer, or if the address of a nonexistent on-chip peripheral module
  19715. is specified.
  19716.  
  19717. Rev. 2.0, 02/99, page 424 of 830
  19718.  
  19719. ----------------------- Page 439-----------------------
  19720.  
  19721. 14.2.3 DMA Transfer Count Registers 0–3 (DMATCR0–DMATCR3)
  19722.  
  19723. Bit: 31 30 29 28 27 26 25 24
  19724.  
  19725. Initial value: 0 0 0 0 0 0 0 0
  19726.  
  19727. R/W: R R R R R R R R
  19728.  
  19729. Bit: 23 22 21 20 19 18 17 16
  19730.  
  19731. Initial value: — — — — — — — —
  19732.  
  19733. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19734.  
  19735. Bit: 15 14 13 12 11 10 9 8
  19736.  
  19737. Initial value: — — — — — — — —
  19738.  
  19739. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19740.  
  19741. Bit: 7 6 5 4 3 2 1 0
  19742.  
  19743. Initial value: — — — — — — — —
  19744.  
  19745. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19746.  
  19747. DMA transfer count registers 0–3 (DMATCR0–DMATCR3) are 32-bit readable/writable
  19748. registers that specify the transfer count for the corresponding channel (byte count, word count,
  19749. longword count, quadword count, or 32-byte count). Specifying H'000001 gives a transfer count
  19750. of 1, while H'000000 gives the maximum setting, 16,777,216 (16M) transfers. During DMAC
  19751. operation, the remaining number of transfers is shown.
  19752.  
  19753. Bits 31–24 of these registers are reserved; they are always read as 0, and should only be written
  19754. with 0.
  19755.  
  19756. The initial value of these registers after a power-on or manual reset is undefined. They retain
  19757. their values in standby mode and deep sleep mode.
  19758.  
  19759. In DDT mode, DTR format [55:48] is set in DMATCR0 [7:0]
  19760.  
  19761. Rev. 2.0, 02/99, page 425 of 830
  19762.  
  19763. ----------------------- Page 440-----------------------
  19764.  
  19765. 14.2.4 DMA Channel Control Registers 0–3 (CHCR0–CHCR3)
  19766.  
  19767. Bit: 31 30 29 28 27 26 25 24
  19768.  
  19769. SSA2 SSA1 SSA0 STC DSA2 DSA1 DSA0 DTC
  19770.  
  19771. Initial value: 0 0 0 0 0 0 0 0
  19772.  
  19773. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19774.  
  19775. Bit: 23 22 21 20 19 18 17 16
  19776.  
  19777. — — — — DS RL AM AL
  19778.  
  19779. Initial value: 0 0 0 0 — — — —
  19780.  
  19781. R/W: R R R R R/W (R/W) R/W (R/W)
  19782.  
  19783. Bit: 15 14 13 12 11 10 9 8
  19784.  
  19785. DM1 DM0 SM1 SM0 RS3 RS2 RS1 RS0
  19786.  
  19787. Initial value: 0 0 0 0 0 0 0 0
  19788.  
  19789. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  19790.  
  19791. Bit: 7 6 5 4 3 2 1 0
  19792.  
  19793. TM TS2 TS1 TS0 — IE TE DE
  19794.  
  19795. Initial value: 0 0 0 0 0 0 0 0
  19796.  
  19797. R/W: R/W R/W R/W R/W R R/W R/(W) R/W
  19798.  
  19799. Note: The TE bit can only be written with 0 after being read as 1, to clear the flag.
  19800. The RL, AM, AL, and DS bits may be absent, depending on the channel.
  19801.  
  19802. DMA channel control registers 0–3 (CHCR0–CHCR3) are 32-bit readable/writable registers that
  19803. specify the operating mode, transfer method, etc., for each channel. Bits 31–28 and 27–24
  19804. indicate the source address and destination address, respectively; these settings are only valid
  19805. when the transfer involves the CS5 or CS6 space and the relevant space has been specified as a
  19806. PCMCIA interface space. In other cases, these bits should be cleared to 0. For details of the
  19807. PCMCIA interface, see section 13.3.7, PCMCIA Interface, in section 13, Bus State Controller
  19808. (BSC).
  19809.  
  19810. In DDT mode, CHCR0 is set according to the DTR format. (The following settings are fixed:
  19811. CHCR0 [31:24] = 0, [18:16] = 0, [2] = 0, [1] = 0, [0] = 1)
  19812.  
  19813. Bits 18 and 16 are not present in CHCR2 and CHCR3. In CHCR2 and CHCR3, these bits cannot
  19814. be modified (a write value of 0 should always be used) and are always read as 0.
  19815.  
  19816. These registers are initialized to H'00000000 by a power-on or manual reset. They retain their
  19817. values in standby mode and deep sleep mode.
  19818.  
  19819. Rev. 2.0, 02/99, page 426 of 830
  19820.  
  19821. ----------------------- Page 441-----------------------
  19822.  
  19823. Bits 31 to 29—Source Address Space Attribute Specification (SSA2–SSA0): These bits
  19824. specify the space attribute for PCMCIA access. These bits are only valid in the case of page
  19825. mapping to PCMCIA connected to areas 5 and 6.
  19826.  
  19827. Bit 31: SSA2 Bit 30: SSA1 Bit 29: SSA0 Description
  19828.  
  19829. 0 0 0 Reserved in PCMCIA access (Initial value)
  19830.  
  19831. 1 Dynamic bus sizing I/O space
  19832.  
  19833. 1 0 8-bit I/O space
  19834.  
  19835. 1 16-bit I/O space
  19836.  
  19837. 1 0 0 8-bit common memory space
  19838.  
  19839. 1 16-bit common memory space
  19840.  
  19841. 1 0 8-bit attribute memory space
  19842.  
  19843. 1 16-bit attribute memory space
  19844.  
  19845. Bit 28—Source Address Wait Control Select (STC): Specifies CS5 or CS6 space wait control
  19846. for PCMCIA access. This bit selects the wait control register in the BSC that performs area 5
  19847. and 6 wait cycle control.
  19848.  
  19849. Bit 28: STC Description
  19850.  
  19851. 0 C5 space wait cycle selection (Initial value)
  19852.  
  19853. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  19854. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  19855. PCMCIA control register (PCR), are selected
  19856.  
  19857. 1 C6 space wait cycle selection
  19858.  
  19859. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  19860. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  19861. PCMCIA control register (PCR), are selected
  19862.  
  19863. Note: For details, see section 13.3.7, PCMCIA Interface.
  19864.  
  19865. Rev. 2.0, 02/99, page 427 of 830
  19866.  
  19867. ----------------------- Page 442-----------------------
  19868.  
  19869. Bits 27 to 25—Destination Address Space Attribute Specification (DSA2–DSA0): These bits
  19870. specify the space attribute for PCMCIA access. These bits are only valid in the case of page
  19871. mapping to PCMCIA connected to areas 5 and 6.
  19872.  
  19873. Bit 27: DSA2 Bit 26: DSA1 Bit 25: DSA0 Description
  19874.  
  19875. 0 0 0 Reserved in PCMCIA access (Initial value)
  19876.  
  19877. 1 Dynamic bus sizing I/O space
  19878.  
  19879. 1 0 8-bit I/O space
  19880.  
  19881. 1 16-bit I/O space
  19882.  
  19883. 1 0 0 8-bit common memory space
  19884.  
  19885. 1 16-bit common memory space
  19886.  
  19887. 1 0 8-bit attribute memory space
  19888.  
  19889. 1 16-bit attribute memory space
  19890.  
  19891. Bit 24—Destination Address Wait Control Select (DTC): Specifies CS5 or CS6 space wait
  19892. cycle control for PCMCIA access. This bit selects the wait control register in the BSC that
  19893. performs area 5 and 6 wait cycle control.
  19894.  
  19895. Bit 24: DTC Description
  19896.  
  19897. 0 C5 space wait cycle selection (Initial value)
  19898.  
  19899. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  19900. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  19901. PCMCIA control register (PCR), are selected
  19902.  
  19903. 1 C6 space wait cycle selection
  19904.  
  19905. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  19906. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  19907. PCMCIA control register (PCR), are selected
  19908.  
  19909. Note: For details, see section 13.3.7, PCMCIA Interface.
  19910.  
  19911. Bits 23 to 20—Reserved: These bits are always read as 0, and should only be written with 0.
  19912.  
  19913. Bit 19—'5(4 Select (DS): Specifies either low level detection or falling edge detection as the
  19914. '5(4
  19915. sampling method for the '5(4 pin used in external request mode.
  19916.  
  19917. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  19918. CHCR0–CHCR3.
  19919.  
  19920. Bit 19: DS Description
  19921.  
  19922. 0 Low level detection (Initial value)
  19923.  
  19924. 1 Falling edge detection
  19925.  
  19926. Rev. 2.0, 02/99, page 428 of 830
  19927.  
  19928. ----------------------- Page 443-----------------------
  19929.  
  19930. Bit 18—Request Check Level (RL): Selects whether the DRAK signal (that notifies an external
  19931. device of the acceptance of '5(4) is an active-high or active-low output.
  19932.  
  19933. This bit is valid only in CHCR0 and CHCR1.
  19934.  
  19935. Bit 18: RL Description
  19936.  
  19937. 0 DRAK is an active-high output (Initial value)
  19938.  
  19939. 1 DRAK is an active-low output
  19940.  
  19941. Bit 17—Acknowledge Mode (AM): In dual address mode, selects whether DACK is output in
  19942. the data read cycle or write cycle. In single address mode, DACK is always output regardless of
  19943. the setting of this bit.
  19944.  
  19945. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  19946. CHCR1–CHCR3.
  19947.  
  19948. Bit 17: AM Description
  19949.  
  19950. 0 DACK is output in read cycle (Initial value)
  19951.  
  19952. 1 DACK is output in write cycle
  19953.  
  19954. Bit 16—Acknowledge Level (AL): Specifies the DACK (acknowledge) signal as active-high or
  19955. active-low.
  19956.  
  19957. This bit is valid only in CHCR0 and CHCR1.
  19958.  
  19959. Bit 16: AL Description
  19960.  
  19961. 0 Active-high output (Initial value)
  19962.  
  19963. 1 Active-low output
  19964.  
  19965. Rev. 2.0, 02/99, page 429 of 830
  19966.  
  19967. ----------------------- Page 444-----------------------
  19968.  
  19969. Bits 15 and 14—Destination Address Mode 1 and 0 (DM1, DM0): These bits specify
  19970. incrementing/decrementing of the DMA transfer destination address. The specification of these
  19971. bits is ignored when data is transferred from external memory to an external device in single
  19972. address mode. For channel 0, in DDT mode, the settings are fixed at DM1 = 0 and DM0 = 1.
  19973.  
  19974. Bit 15: DM1 Bit 14: DM0 Description
  19975.  
  19976. 0 0 Destination address fixed (Initial value)
  19977.  
  19978. 1 Destination address incremented (+1 in 8-bit transfer, +2 in 16-
  19979. bit transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in
  19980. 32-byte burst transfer)
  19981.  
  19982. 1 0 Destination address decremented (–1 in 8-bit transfer, –2 in
  19983. 16-bit transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in
  19984. 32-byte burst transfer)
  19985.  
  19986. 1 Setting prohibited
  19987.  
  19988. Bits 13 and 12—Source Address Mode 1 and 0 (SM1, SM0): These bits specify
  19989. incrementing/decrementing of the DMA transfer source address. The specification of these bits
  19990. is ignored when data is transferred from an external device to external memory in single address
  19991. mode. For channel 0, in DDT mode the settings are fixed at SM1 = 0 and SM0 = 1.
  19992.  
  19993. Bit 13: SM1 Bit 12: SM0 Description
  19994.  
  19995. 0 0 Source address fixed (Initial value)
  19996.  
  19997. 1 Source address incremented (+1 in 8-bit transfer, +2 in 16-bit
  19998. transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in 32-
  19999. byte burst transfer)
  20000.  
  20001. 1 0 Source address decremented (–1 in 8-bit transfer, –2 in 16-bit
  20002. transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in 32-
  20003. byte burst transfer)
  20004.  
  20005. 1 Setting prohibited
  20006.  
  20007. Rev. 2.0, 02/99, page 430 of 830
  20008.  
  20009. ----------------------- Page 445-----------------------
  20010.  
  20011. Bits 11 to 8—Resource Select 3 to 0 (RS3–RS0): These bits specify the transfer request source.
  20012.  
  20013. Bit 11: Bit 10: Bit 9: Bit 8:
  20014. RS3 RS2 RS1 RS0 Description
  20015. 0 0 0 0 External request, dual address mode*1 (external address
  20016.  
  20017. space → external address space) (Initial value)
  20018.  
  20019. 1 Setting prohibited
  20020.  
  20021. 1 0 External request, single address mode
  20022.  
  20023. 1, 3, 4
  20024. External address space → external device* * *
  20025.  
  20026. 1 External request, single address mode
  20027.  
  20028. 1, 3, 4
  20029. External device → external address space* * *
  20030.  
  20031. 1 0 0 Auto-request (external address space → external address
  20032. space)*2
  20033.  
  20034. 1 Auto-request (external address space → on-chip peripheral
  20035. module)*2
  20036.  
  20037. 1 0 Auto-request (on-chip peripheral module → external address
  20038. space)*2
  20039.  
  20040. 1 Setting prohibited
  20041.  
  20042. 1 0 0 0 SCI transmit-data-empty interrupt transfer request
  20043. (external address space → SCTDR1)*2
  20044.  
  20045. 1 SCI receive-data-full interrupt transfer request
  20046. (SCRDR1 → external address space)*2
  20047.  
  20048. 1 0 SCIF transmit-data-empty interrupt transfer request
  20049. (external address space → SCFTDR2)*2
  20050.  
  20051. 1 SCIF receive-data-full interrupt transfer request
  20052. (SCFRDR2 → external address space)*2
  20053.  
  20054. 1 0 0 TMU channel 2 (input capture interrupt, external address
  20055. space → external address space)*2
  20056.  
  20057. 1 TMU channel 2 (input capture interrupt)
  20058. (external address space → on-chip peripheral module)*2
  20059.  
  20060. 1 0 TMU channel 2 (input capture interrupt)
  20061. (on-chip peripheral module → external address space)*2
  20062.  
  20063. 1 Setting prohibited
  20064.  
  20065. Notes: 1. External request specifications are valid only for channels 0 and 1. Requests are not
  20066. accepted for channels 2 and 3 in normal DMA mode.
  20067. 2. Dual address mode
  20068. 3. In DDT mode, selection is possible with the DTR format [60] (R/W bit) specification for
  20069. channel 0 only.
  20070. 4. In DDT mode, an external request specification should be made for channels 1, 2, and
  20071. 3. Only DTR format setting is possible for channel 0.
  20072.  
  20073. Rev. 2.0, 02/99, page 431 of 830
  20074.  
  20075. ----------------------- Page 446-----------------------
  20076.  
  20077. Bit 7—Transmit Mode (TM): Specifies the bus mode for transfer.
  20078.  
  20079. Bit 7: TM Description
  20080.  
  20081. 0 Cycle steal mode (Initial value)
  20082.  
  20083. 1 Burst mode
  20084.  
  20085. Setting possible with DTR format [57:55] (MD bits)
  20086.  
  20087. Bits 6 to 4—Transmit Size 2 to 0 (TS2–TS0): These bits specify the transfer data size.
  20088.  
  20089. Bit 6: TS2 Bit 5: TS1 Bit 4: TS0 Description
  20090.  
  20091. 0 0 0 Quadword size (64-bit) specification(Initial value)
  20092.  
  20093. 1 Byte size (8-bit) specification
  20094.  
  20095. 1 0 Word size (16-bit) specification
  20096.  
  20097. 1 Longword size (32-bit) specification
  20098.  
  20099. 1 0 0 32-byte block transfer specification
  20100.  
  20101. Setting possible with DTR format [63:61] (SZ bits)
  20102.  
  20103. Bit 3—Reserved: This bit is always read as 0, and should only be written with 0.
  20104.  
  20105. Bit 2—Interrupt Enable (IE): When this bit is set to 1, an interrupt request (DMTE) is
  20106. generated after the number of data transfers specified in DMATCR (when TE = 1).
  20107.  
  20108. Bit 2: IE Description
  20109.  
  20110. 0 Interrupt request not generated after number of transfers specified in
  20111. DMATCR (Initial value) (CHCR0 only fixed in DDT mode)
  20112.  
  20113. 1 Interrupt request generated after number of transfers specified in DMATCR
  20114.  
  20115. Rev. 2.0, 02/99, page 432 of 830
  20116.  
  20117. ----------------------- Page 447-----------------------
  20118.  
  20119. Bit 1—Transfer End (TE): This bit is set to 1 after the number of transfers specified in
  20120. DMATCR. If the IE bit is set to 1 at this time, an interrupt request (DMTE) is generated.
  20121.  
  20122. If data transfer ends before TE is set to 1 (for example, due to an NMI interrupt, address error, or
  20123. clearing of the DE bit or the DME bit in DMAOR), the TE bit is not set to 1. When this bit is 1,
  20124. the transfer enabled state is not entered even if the DE bit is set to 1.
  20125.  
  20126. Bit 1: TE Description
  20127.  
  20128. 0 Number of transfers specified in DMATCR not completed (Initial value)
  20129.  
  20130. [Clearing conditions]
  20131.  
  20132. • When 0 is written to TE after reading TE = 1
  20133.  
  20134. •• In a power-on or manual reset, and in standby mode
  20135.  
  20136. 1 Number of transfers specified in DMATCR completed
  20137.  
  20138. Bit 0—DMAC Enable (DE): Enables operation of the corresponding channel.
  20139.  
  20140. Bit 0: DE Description
  20141.  
  20142. 0 Operation of corresponding channel is disabled (Initial value)
  20143.  
  20144. 1 Operation of corresponding channel is enabled
  20145.  
  20146. When auto-request is specified (with RS3–RS0), transfer is begun when this bit is set to 1. In the
  20147. case of an external request or on-chip peripheral module request, transfer is begun when a
  20148. transfer request is issued after this bit is set to 1. Transfer can be suspended midway by clearing
  20149. this bit to 0.
  20150.  
  20151. Even if the DE bit has been set, transfer is not enabled when TE is 1, when DME in DMAOR is
  20152. 0, or when the NMIF or AE bit in DMAOR is 1.
  20153.  
  20154. For channel 0, in DDT mode this bit is set to 1 when a DTR format is received. DE remains set
  20155. to 1 even if TE is set to 1. When the mode is switched from DDT mode to normal DMA mode
  20156. (DDT bit = 0 in DMAOR), the DE bit must be cleared to 0.
  20157.  
  20158. Rev. 2.0, 02/99, page 433 of 830
  20159.  
  20160. ----------------------- Page 448-----------------------
  20161.  
  20162. 14.2.5 DMA Operation Register (DMAOR)
  20163.  
  20164. Bit: 31 30 29 28 27 26 25 24
  20165.  
  20166. — — — — — — — —
  20167.  
  20168. Initial value: 0 0 0 0 0 0 0 0
  20169.  
  20170. R/W: R R R R R R R R
  20171.  
  20172. Bit: 23 22 21 20 19 18 17 16
  20173.  
  20174. — — — — — — — —
  20175.  
  20176. Initial value: 0 0 0 0 0 0 0 0
  20177.  
  20178. R/W: R R R R R R R R
  20179.  
  20180. Bit: 15 14 13 12 11 10 9 8
  20181.  
  20182. DDT — — — — — PR1 PR0
  20183.  
  20184. Initial value: 0 0 0 0 0 0 0 0
  20185.  
  20186. R/W: R/W R R R R R R/W R/W
  20187.  
  20188. Bit: 7 6 5 4 3 2 1 0
  20189.  
  20190. — — — — — AE NMIF DME
  20191.  
  20192. Initial value: 0 0 0 0 0 0 0 0
  20193.  
  20194. R/W: R R R R R R/(W) R/(W) R/W
  20195.  
  20196. Note: The AE and NMIF bits can only be written with 0 after being read as 1, to clear the flags.
  20197.  
  20198. DMAOR is a 32-bit readable/writable register that specifies the DMAC transfer mode.
  20199.  
  20200. DMAOR is initialized to H'00000000 by a power-on or manual reset. They retain their values in
  20201. standby mode and deep sleep mode.
  20202.  
  20203. Bits 31 to 16—Reserved: These bits are always read as 0, and should only be written with 0.
  20204.  
  20205. Bit 15—On-Demand Data Transfer (DDT): Specifies on-demand data transfer mode. When
  20206. the DDT bit is set to 1, CPU writes to SAR0, DAR0, DMATCR0, and CHCR0 are masked.
  20207.  
  20208. Bit 15: DDT Description
  20209.  
  20210. 0 Normal DMA mode (Initial value)
  20211.  
  20212. 1 On-demand data transfer mode
  20213.  
  20214. Note: %$9/ (DRAK0) is an active-high output in normal DMA mode. When the DDT bit is set to
  20215. 1, the %$9/ pin function is enabled and this pin becomes an active-low output.
  20216.  
  20217. Rev. 2.0, 02/99, page 434 of 830
  20218.  
  20219. ----------------------- Page 449-----------------------
  20220.  
  20221. Bits 14 to 10—Reserved: These bits are always read as 0, and should only be written with 0.
  20222.  
  20223. Bits 9 and 8—Priority Mode 1 and 0 (PR1, PR0): These bits determine the order of priority
  20224. for channel execution when transfer requests are made for a number of channels simultaneously.
  20225.  
  20226. Bit 9: PR1 Bit 8: PR0 Description
  20227.  
  20228. 0 0 CH0 > CH1 > CH2 > CH3 (Initial value)
  20229.  
  20230. 1 CH0 > CH2 > CH3 > CH1
  20231.  
  20232. 1 0 CH2 > CH0 > CH1 > CH3
  20233.  
  20234. 1 Round robin mode
  20235.  
  20236. Bits 7 to 3—Reserved: These bits are always read as 0, and should only be written with 0.
  20237.  
  20238. Bit 2—Address Error Flag (AE): Indicates that an address error has occurred during DMA
  20239. transfer. If this bit is set during data transfer, transfers on all channels are suspended, and an
  20240. interrupt request (DMAE) is generated. The CPU cannot write 1 to AE. This bit can only be
  20241. cleared by writing 0 after reading 1.
  20242.  
  20243. Bit 2: AE Description
  20244.  
  20245. 0 No address error, DMA transfer enabled (Initial value)
  20246.  
  20247. [Clearing condition]
  20248. When 0 is written to AE after reading AE = 1
  20249.  
  20250. 1 Address error, DMA transfer disabled
  20251.  
  20252. [Setting condition]
  20253. When an address error is caused by the DMAC
  20254.  
  20255. Bit 1—NMI Flag (NMIF): Indicates that NMI has been input. This bit is set regardless of
  20256. whether or not the DMAC is operating. If this bit is set during data transfer, transfers on all
  20257. channels are suspended. The CPU cannot write 1 to NMIF. This bit can only be cleared by
  20258. writing 0 after reading 1.
  20259.  
  20260. Bit 1: NMIF Description
  20261.  
  20262. 0 No NMI input, DMA transfer enabled (Initial value)
  20263.  
  20264. [Clearing condition]
  20265. When 0 is written to NMIF after reading NMIF = 1
  20266.  
  20267. 1 NMI input, DMA transfer disabled
  20268.  
  20269. [Setting condition]
  20270. When an NMI interrupt is generated
  20271.  
  20272. Rev. 2.0, 02/99, page 435 of 830
  20273.  
  20274. ----------------------- Page 450-----------------------
  20275.  
  20276. Bit 0—DMAC Master Enable (DME): Enables activation of the entire DMAC. When the
  20277. DME bit and the DE bit of the CHCR register for the corresponding channel are set to 1, that
  20278. channel is enabled for transfer. If this bit is cleared during data transfer, transfers on all channels
  20279. are suspended.
  20280.  
  20281. Even if the DME bit has been set, transfer is not enabled when TE is 1 or DE is 0 in CHCR, or
  20282. when the NMI or AE bit in DMAOR is 1.
  20283.  
  20284. Bit 0: DME Description
  20285.  
  20286. 0 Operation disabled on all channels (Initial value)
  20287.  
  20288. 1 Operation enabled on all channels
  20289.  
  20290. 14.3 Operation
  20291.  
  20292. When a DMA transfer request is issued, the DMAC starts the transfer according to the
  20293. predetermined channel priority order. It ends the transfer when the transfer end conditions are
  20294. satisfied. Transfers can be requested in three modes: auto-request, external request, and on-chip
  20295. peripheral module request. There are two modes for DMA transfer: single address mode and
  20296. dual address mode. Either burst mode or cycle steal mode can be selected as the bus mode.
  20297.  
  20298. 14.3.1 DMA Transfer Procedure
  20299.  
  20300. After the desired transfer conditions have been set in the DMA source address register (SAR),
  20301. DMA destination address register (DAR), DMA transfer count register (DMATCR), DMA
  20302. channel control register (CHCR), and DMA operation register (DMAOR), the DMAC transfers
  20303. data according to the following procedure:
  20304.  
  20305. 1. The DMAC checks to see if transfer is enabled (DE = 1, DME = 1, TE = 0, NMIF = 0, AE =
  20306. 0).
  20307. 2. When a transfer request is issued and transfer has been enabled, the DMAC transfers one
  20308. transfer unit of data (determined by the setting of TS2–TS0). In auto-request mode, the
  20309. transfer begins automatically when the DE bit and DME bit are set to 1. The DMATCR
  20310. value is decremented by 1 for each transfer. The actual transfer flow depends on the address
  20311. mode and bus mode.
  20312. 3. When the specified number of transfers have been completed (when the DMATCR value
  20313. reaches 0), the transfer ends normally. If the IE bit in CHCR is set to 1 at this time, a DMTE
  20314. interrupt request is sent to the CPU.
  20315. 4. If a DMAC address error or NMI interrupt occurs, the transfer is suspended. Transfer is also
  20316. suspended when the DE bit in CHCR or the DME bit in DMAOR is cleared to 0. In the event
  20317. of an address error, a DMAE interrupt request is forcibly sent to the CPU.
  20318.  
  20319. Rev. 2.0, 02/99, page 436 of 830
  20320.  
  20321. ----------------------- Page 451-----------------------
  20322.  
  20323. Figure 14.2 shows a flowchart of this procedure.
  20324.  
  20325. Start
  20326.  
  20327. Initial settings
  20328. (SAR, DAR, DMATCR,
  20329. CHCR, DMAOR)
  20330.  
  20331. No
  20332. DE, DME = 1?
  20333.  
  20334. Yes
  20335. Illegal address check *4
  20336. (reflected in AE bit)
  20337.  
  20338. No
  20339. NMIF, AE, TE = 0?
  20340.  
  20341. Yes
  20342. *2
  20343.  
  20344. Transfer No
  20345. request issued?
  20346. *1 Bus mode,
  20347. *3
  20348. Yes transfer request mode,
  20349. DREQ detection
  20350. method
  20351. Transfer (1 transfer unit)
  20352. DMATCR - 1 → DMATCR
  20353. Update SAR, DAR
  20354.  
  20355. No No NMIF or No
  20356. DMATCR = 0? AE = 1 or DE = 0 or
  20357.  
  20358. DME = 0?
  20359. Yes
  20360. Yes
  20361. DMTE interrupt request
  20362. Transfer suspended
  20363. (when IE = 1)
  20364.  
  20365. NMIF or
  20366. No
  20367. AE = 1 or DE = 0 or
  20368. DME = 0?
  20369.  
  20370. Yes
  20371.  
  20372. End of transfer Normal end
  20373.  
  20374. Notes: 1. In auto-request mode, transfer begins when the NMIF, AE, and TE bits are all 0, and the DE
  20375. and DME bits are set to 1.
  20376. 2. DREQ level detection (external request) in burst mode, or cycle steal mode.
  20377. 3. DREQ edge detection (external request) in burst mode, or auto-request mode in burst mode.
  20378. 4. An illegal address is detected by comparing bits TS2–TS0 in CHCRn with SARn and DARn.
  20379.  
  20380. Figure 14.2 DMAC Transfer Flowchart
  20381.  
  20382. Rev. 2.0, 02/99, page 437 of 830
  20383.  
  20384. ----------------------- Page 452-----------------------
  20385.  
  20386. 14.3.2 DMA Transfer Requests
  20387.  
  20388. DMA transfer requests are basically generated at either the data transfer source or destination,
  20389. but they can also be issued by external devices or on-chip peripheral modules that are neither the
  20390. source nor the destination.
  20391.  
  20392. Transfers can be requested in three modes: auto-request, external request, and on-chip peripheral
  20393. module request. The transfer request mode is selected by means of bits RS3–RS0 in DMA
  20394. channel control registers 0–3 (CHCR0–CHCR3).
  20395.  
  20396. Auto Request Mode: When there is no transfer request signal from an external source, as in a
  20397. memory-to-memory transfer or a transfer between memory and an on-chip peripheral module
  20398. unable to request a transfer, the auto-request mode allows the DMAC to automatically generate
  20399. a transfer request signal internally. When the DE bit in CHCR0–CHCR3 and the DME bit in the
  20400. DMA operation register (DMAOR) are set to 1, the transfer begins (so long as the TE bit in
  20401. CHCR0–CHCR3 and the NMIF and AE bits in DMAOR are all 0).
  20402.  
  20403. External Request Mode: In this mode a transfer is performed in response to a transfer request
  20404. signal ('5(4) from an external device. One of the modes shown in table 14.4 should be chosen
  20405. according to the application system. If DMA transfer is enabled (DE = 1, DME = 1, TE = 0,
  20406. NMIF = 0, AE = 0), transfer starts when '5(4 is input. The DS bit in CHCR0/CHCR1 is used
  20407. to select either falling edge detection or low level detection for the '5(4 signal (level detection
  20408. when DS = 0, edge detection when DS = 1).
  20409.  
  20410. The source of the transfer request does not have to be the data transfer source or destination.
  20411.  
  20412. Table 14.4 Selecting External Request Mode with RS Bits
  20413.  
  20414. RS3 RS2 RS1 RS0 Address Mode Transfer Source Transfer Destination
  20415.  
  20416. 0 0 0 0 Dual address External memory External memory
  20417. mode or memory-mapped or memory-mapped
  20418. external device external device
  20419.  
  20420. 1 0 Single address External memory External device
  20421. mode or memory-mapped with DACK
  20422. external device
  20423.  
  20424. 1 Single address External device with External memory
  20425. mode DACK or memory-mapped
  20426. external device
  20427.  
  20428. Rev. 2.0, 02/99, page 438 of 830
  20429.  
  20430. ----------------------- Page 453-----------------------
  20431.  
  20432. On-Chip Peripheral Module Request Mode: In this mode a transfer is performed in response
  20433. to a transfer request signal (interrupt request signal) from an on-chip peripheral module. As
  20434. shown in table 14.5, there are seven transfer request signals: input capture interrupts from the
  20435. timer unit (TMU), and receive-data-full interrupts (RXI) and transmit-data-empty interrupts
  20436. (TXI) from the two serial communication interfaces (SCI, SCIF). If DMA transfer is enabled
  20437. (DE = 1, DME = 1, TE = 0, NMIF = 0, AE = 0), transfer starts when a transfer request signal is
  20438. input.
  20439.  
  20440. The source of the transfer request does not have to be the data transfer source or destination.
  20441. However, when the transfer request is set to RXI (transfer request by SCI/SCIF receive-data-full
  20442. interrupt), the transfer source must be the SCI/SCIF’s receive data register
  20443. (SCRDR1/SCFRDR2). When the transfer request is set to TXI (transfer request by SCI/SCIF
  20444. transmit-data-empty interrupt), the transfer destination must be the SCI/SCIF’s transmit data
  20445. register (SCTDR1/SCFTDR2).
  20446.  
  20447. Rev. 2.0, 02/99, page 439 of 830
  20448.  
  20449. ----------------------- Page 454-----------------------
  20450.  
  20451. Table 14.5 Selecting On-Chip Peripheral Module Request Mode with RS Bits
  20452.  
  20453. DMAC Transfer DMAC Transfer Transfer Transfer
  20454. RS3 RS2 RS1 RS0 Request Source Request Signal Source Destination Bus Mode
  20455.  
  20456. 1 0 0 0 SCI transmitter SCTDR1 (SCI External* SCTDR1 Cycle steal
  20457. transmit-data- mode
  20458. empty transfer
  20459. request)
  20460.  
  20461. 1 SCI receiver SCRDR1 (SCI SCRDR1 External* Cycle steal
  20462. receive-data-full mode
  20463. transfer request)
  20464.  
  20465. 1 0 SCIF transmitter SCFTDR2 (SCIF External* SCFTDR2 Cycle steal
  20466. transmit-data- mode
  20467. empty transfer
  20468. request)
  20469.  
  20470. 1 SCIF receiver SCFRDR2 (SCIF SCFRDR2 External* Cycle steal
  20471. receive-data-full mode
  20472. transfer request)
  20473.  
  20474. 1 0 0 TMU channel 2 Input capture External* External* Burst/cycle
  20475. occurrence steal mode
  20476.  
  20477. 1 TMU channel 2 Input capture External* On-chip Burst/cycle
  20478. occurrence peripheral steal mode
  20479.  
  20480. 1 0 TMU channel 2 Input capture On-chip External* Burst/cycle
  20481. occurrence peripheral steal mode
  20482.  
  20483. TMU: Timer unit
  20484. SCI: Serial communication interface
  20485. SCIF: Serial communication interface with FIFO
  20486. Note: * External memory or memory-mapped external device
  20487. Note: SCI/SCIF burst transfer setting is prohibited.
  20488.  
  20489. To output a transfer request from an on-chip peripheral module, set the DMA transfer request
  20490. enable bit for that module and output a transfer request signal.
  20491.  
  20492. For details, see sections 12, Timer Unit (TMU), 15, Serial Communication Interface (SCI), and
  20493. 16, Serial Communication Interface with FIFO (SCIF).
  20494.  
  20495. When a DMA transfer corresponding to a transfer request signal from an on-chip peripheral
  20496. module shown in table 14.5 is carried out, the signal is discontinued automatically. This occurs
  20497. every transfer in cycle steal mode, and in the last transfer in burst mode.
  20498.  
  20499. Rev. 2.0, 02/99, page 440 of 830
  20500.  
  20501. ----------------------- Page 455-----------------------
  20502.  
  20503. 14.3.3 Channel Priorities
  20504.  
  20505. If the DMAC receives simultaneous transfer requests on two or more channels, it selects a
  20506. channel according to a predetermined priority system, either in a fixed mode or round robin
  20507. mode. The mode is selected with priority bits PR1 and PR0 in the DMA operation register
  20508. (DMAOR).
  20509.  
  20510. Fixed Mode: In this mode, the relative channel priorities remain fixed. The following priority
  20511. orders are available in fixed mode:
  20512.  
  20513. • CH0 > CH1 > CH2 > CH3
  20514. • CH0 > CH2 > CH3 > CH1
  20515. • CH2 > CH0 > CH1 > CH3
  20516.  
  20517. The priority order is selected with bits PR1 and PR0 in DMAOR.
  20518.  
  20519. Round Robin Mode: In round robin mode, each time the transfer of one transfer unit (byte,
  20520. word, longword, quadword, or 32 bytes) ends on a given channel, that channel is assigned the
  20521. lowest priority level. This is illustrated in figure 14.3. The order of priority in round robin mode
  20522. immediately after a reset is CH0 > CH1 > CH2 > CH3.
  20523.  
  20524. Note: In round robin mode, if no transfer request is accepted for any channel during DMA
  20525. transfer, the priority order becomes CH0 > CH1 > CH2 > CH3.
  20526.  
  20527. Rev. 2.0, 02/99, page 441 of 830
  20528.  
  20529. ----------------------- Page 456-----------------------
  20530.  
  20531. Transfer on channel 0
  20532.  
  20533. Initial priority order CH0 > CH1 > CH2 > CH3 Channel 0 is given the lowest
  20534. priority.
  20535.  
  20536. Priority order after transfer CH1 > CH2 > CH3 > CH0
  20537.  
  20538. Transfer on channel 1
  20539.  
  20540. Initial priority order CH0 > CH1 > CH2 > CH3 When channel 1 is given the
  20541. lowest priority, the priority of
  20542. channel 0, which was higher
  20543. than channel 1, is also
  20544. Priority order after transfer CH2 > CH3 > CH0 > CH1 shifted simultaneously.
  20545.  
  20546. Transfer on channel 2
  20547. When channel 2 is given the
  20548. Initial priority order CH0 > CH1 > CH2 > CH3 lowest priority, the priorities of
  20549.  
  20550. channels 0 and 1, which were
  20551. higher than channel 2, are
  20552. also shifted simultaneously. If
  20553. there is a transfer request for
  20554. channel 1 only immediately
  20555. Priority order after transfer CH3 > CH0 > CH1 > CH2
  20556. afterward, channel 1 is given
  20557. the lowest priority and the
  20558. priorities of channels 3 and 0
  20559. are simultaneously shifted
  20560. down.
  20561. Priority after transfer due to
  20562. issuance of a transfer request CH2 > CH3 > CH0 > CH1
  20563. for channel 1 only.
  20564.  
  20565. Transfer on channel 3
  20566.  
  20567. Initial priority order CH0 > CH1 > CH2 > CH3 No change in priority order
  20568.  
  20569. Priority order after transfer CH0 > CH1 > CH2 > CH3
  20570.  
  20571. Figure 14.3 Round Robin Mode
  20572.  
  20573. Figure 14.4 shows the changes in priority levels when transfer requests are issued simultaneously
  20574. for channels 0 and 3, and channel 1 receives a transfer request during a transfer on channel 0.
  20575. The operation of the DMAC in this case is as follows.
  20576.  
  20577. Rev. 2.0, 02/99, page 442 of 830
  20578.  
  20579. ----------------------- Page 457-----------------------
  20580.  
  20581. 1. Transfer requests are issued simultaneously for channels 0 and 3.
  20582. 2. Since channel 0 has a higher priority level than channel 3, the channel 0 transfer is executed
  20583. first (channel 3 is on transfer standby).
  20584. 3. A transfer request is issued for channel 1 during the channel 0 transfer (channels 1 and 3 are
  20585. on transfer standby).
  20586. 4. At the end of the channel 0 transfer, channel 0 shifts to the lowest priority level.
  20587. 5. At this point, channel 1 has a higher priority level than channel 3, so the channel 1 transfer is
  20588. started (channel 3 is on transfer standby).
  20589. 6. At the end of the channel 1 transfer, channel 1 shifts to the lowest priority level.
  20590. 7. The channel 3 transfer is started.
  20591. 8. At the end of the channel 3 transfer, the channel 3 and channel 2 priority levels are lowered,
  20592. giving channel 3 the lowest priority.
  20593.  
  20594. Transfer request Channel DMAC operation Channel priority
  20595. waiting order
  20596. 1. Issued for channels 0
  20597. and 3
  20598. 2. Start of channel 0 0 > 1 > 2 > 3
  20599. transfer
  20600. 3. Issued for channel 1 3
  20601.  
  20602. Change of
  20603. priority order
  20604. 4. End of channel 0 1 > 2 > 3 > 0
  20605. 1, 3
  20606. transfer
  20607.  
  20608. 5. Start of channel 1
  20609. transfer
  20610.  
  20611. Change of
  20612. priority order
  20613. 3 6. End of channel 1 2 > 3 > 0 > 1
  20614. transfer
  20615.  
  20616. 7. Start of channel 3
  20617. transfer
  20618.  
  20619. None
  20620.  
  20621. Change of
  20622. priority order
  20623. 8. End of channel 3 0 > 1 > 2 > 3
  20624. transfer
  20625.  
  20626. Figure 14.4 Example of Changes in Priority Order in Round Robin Mode
  20627.  
  20628. Rev. 2.0, 02/99, page 443 of 830
  20629.  
  20630. ----------------------- Page 458-----------------------
  20631.  
  20632. 14.3.4 Types of DMA Transfer
  20633.  
  20634. The DMAC supports the transfers shown in table 14.6. It can operate in single address mode, in
  20635. which either the transfer source or the transfer destination is accessed using the acknowledge
  20636. signal, or in dual address mode, in which both the transfer source and transfer destination
  20637. addresses are output. The actual transfer operation timing depends on the bus mode, which can
  20638. be either burst mode or cycle steal mode.
  20639.  
  20640. Table 14.6 Supported DMA Transfers
  20641.  
  20642. Transfer Destination
  20643.  
  20644. External Device External Memory-Mapped On-Chip
  20645. Transfer Source with DACK Memory External Device Peripheral Module
  20646.  
  20647. External device Not available Single address Single address Not available
  20648. with DACK mode mode
  20649.  
  20650. External memory Single address Dual address Dual address Dual address mode
  20651. mode mode mode
  20652.  
  20653. Memory-mapped Single address Dual address Dual address Dual address mode
  20654. external device mode mode mode
  20655.  
  20656. On-chip peripheral Not available Dual address Dual address Not available
  20657. module mode mode
  20658.  
  20659. Rev. 2.0, 02/99, page 444 of 830
  20660.  
  20661. ----------------------- Page 459-----------------------
  20662.  
  20663. Address Modes
  20664.  
  20665. Single Address Mode: In single address mode, both the transfer source and the transfer
  20666. destination are external; one is accessed by the DACK signal and the other by an address. In this
  20667. mode, the DMAC performs a DMA transfer in one bus cycle by simultaneously outputting the
  20668. external device strobe signal (DACK) to either the transfer source or transfer destination external
  20669. device to access it, while outputting an address to the other side of the transfer. Figure 14.5
  20670. shows an example of a transfer between external memory and an external device with DACK in
  20671. which the external device outputs data to the data bus and that data is written to external
  20672. memory in the same bus cycle.
  20673.  
  20674. External External
  20675. address data bus
  20676. bus
  20677. SH7750
  20678. External
  20679. DMAC memory
  20680.  
  20681. External device
  20682. with DACK
  20683.  
  20684. DACK
  20685.  
  20686. DREQ
  20687.  
  20688. : Data flow
  20689.  
  20690. Figure 14.5 Data Flow in Single Address Mode
  20691.  
  20692. Two types of transfer are possible in single address mode: (1) transfer between an external
  20693. device with DACK and a memory-mapped external device, and (2) transfer between an external
  20694. device with DACK and external memory. Only the external request signal ('5(4) is used in
  20695. both these cases.
  20696.  
  20697. Figure 14.6 shows the transfer timing for single address mode.
  20698.  
  20699. The access timing depends on the type of external memory. For details, see the descriptions of
  20700. the memory interfaces in section 13, Bus State Controller (BSC).
  20701.  
  20702. Rev. 2.0, 02/99, page 445 of 830
  20703.  
  20704. ----------------------- Page 460-----------------------
  20705.  
  20706. CKIO
  20707.  
  20708. A28–A0 Address output to external memory
  20709. space
  20710.  
  20711. CSn
  20712.  
  20713. D63–D0 Data output from external device
  20714. with DACK
  20715.  
  20716. DACK DACK signal to external
  20717. device with DACK
  20718.  
  20719. WE WE signal to external memory space
  20720.  
  20721. (a) From external device with DACK to external memory space
  20722.  
  20723. CKIO
  20724.  
  20725. A28–A0 Address output to external memory
  20726. space
  20727.  
  20728. CSn
  20729.  
  20730. D63–D0 Data output from external memory
  20731. space
  20732.  
  20733. RD RD signal to external memory space
  20734.  
  20735. DACK DACK signal to external
  20736. device with DACK
  20737.  
  20738. (b) From external memory space to external device with DACK
  20739.  
  20740. Figure 14.6 DMA Transfer Timing in Single Address Mode
  20741.  
  20742. Rev. 2.0, 02/99, page 446 of 830
  20743.  
  20744. ----------------------- Page 461-----------------------
  20745.  
  20746. Dual Address Mode: Dual address mode is used to access both the transfer source and the
  20747. transfer destination by address. The transfer source and destination can be accessed by either on-
  20748. chip peripheral module or external address.
  20749.  
  20750. In dual address mode, data is read from the transfer source in the data read cycle, and written to
  20751. the transfer destination in the data write cycle, so that the transfer is executed in two bus cycles.
  20752. The transfer data is temporarily stored in the data buffer in the bus state controller (BSC).
  20753.  
  20754. In a transfer between external memories such as that shown in figure 14.7, data is read from
  20755. external memory into the BSC’s data buffer in the read cycle, then written to the other external
  20756. memory in the write cycle. Figure 14.8 shows the timing for this operation.
  20757.  
  20758. SAR Memory
  20759. DMAC s
  20760. u
  20761. b s
  20762. DAR s u
  20763. b
  20764. s Transfer source
  20765. e a
  20766. t
  20767. r a module
  20768. d
  20769. d D
  20770. A
  20771.  
  20772. Transfer destination
  20773. BSC Data buffer
  20774. module
  20775.  
  20776. Taking the SAR value as the address, data is read from the transfer source module
  20777. and stored temporarily in the data buffer in the bus state controller (BSC).
  20778.  
  20779. 1st bus cycle
  20780.  
  20781. SAR Memory
  20782. DMAC
  20783. s
  20784. u
  20785. DAR b s
  20786. u
  20787. s b Transfer source
  20788. s
  20789. e a
  20790. r t module
  20791. d a
  20792. d D
  20793. A
  20794. Transfer destination
  20795. BSC Data buffer
  20796. module
  20797.  
  20798. Taking the DAR value as the address, the data stored in the BSC’s data buffer is
  20799. written to the transfer destination module.
  20800.  
  20801. 2nd bus cycle
  20802.  
  20803. Figure 14.7 Operation in Dual Address Mode
  20804.  
  20805. Rev. 2.0, 02/99, page 447 of 830
  20806.  
  20807. ----------------------- Page 462-----------------------
  20808.  
  20809. CKIO
  20810.  
  20811. A28–A0 Transfer source Transfer destination
  20812. address address
  20813.  
  20814. CSn
  20815.  
  20816. D63–D0
  20817.  
  20818. RD
  20819.  
  20820. WE
  20821.  
  20822. DACK
  20823.  
  20824. Data read cycle Data write cycle
  20825. (1st cycle) (2nd cycle)
  20826.  
  20827. Transfer from external memory space to external memory space
  20828.  
  20829.  
  20830. Figure 14.8 Example of Transfer Timing in Dual Address Mode
  20831.  
  20832. Bus Modes
  20833.  
  20834. There are two bus modes, cycle steal mode and burst mode, selected with the TM bit in
  20835. CHCR0–CHCR3.
  20836.  
  20837. Cycle Steal Mode: In cycle steal mode, the DMAC releases the bus to the CPU at the end of
  20838. each transfer-unit (8-bit, 16-bit, 32-bit, 64-bit, or 32-byte) transfer. When the next transfer
  20839. request is issued, the DMAC reacquires the bus from the CPU and carries out another transfer-
  20840. unit transfer. At the end of this transfer, the bus is again given to the CPU. This is repeated until
  20841. the transfer end condition is satisfied.
  20842.  
  20843. Cycle steal mode can be used with all categories of transfer request source, transfer source, and
  20844. transfer destination.
  20845.  
  20846. Figure 14.9 shows an example of DMA transfer timing in cycle steal mode. The transfer
  20847. conditions in this example are dual address mode and '5(4 level detection.
  20848.  
  20849. Rev. 2.0, 02/99, page 448 of 830
  20850.  
  20851. ----------------------- Page 463-----------------------
  20852.  
  20853. DREQ
  20854.  
  20855. Bus returned to CPU
  20856.  
  20857. Bus cycle CPU CPU CPU DMAC DMAC CPU DMAC DMAC CPU CPU
  20858.  
  20859. Read, write Read, write
  20860.  
  20861. Figure 14.9 Example of DMA Transfer in Cycle Steal Mode
  20862.  
  20863. Burst Mode: In burst mode, once the DMAC has acquired the bus it holds the bus and transfers
  20864. data continuously until the transfer end condition is satisfied. With '5(4 low level detection in
  20865. external request mode, however, when '5(4 is driven high the bus passes to another bus master
  20866. after the end of the DMAC transfer request that has already been accepted, even if the transfer
  20867. end condition has not been satisfied.
  20868.  
  20869. Figure 14.10 shows an example of DMA transfer timing in burst mode. The transfer conditions
  20870. in this example are single address mode and '5(4 level detection.
  20871.  
  20872. DREQ
  20873.  
  20874. Bus cycle CPU CPU CPU DMAC DMAC DMAC DMAC DMAC DMAC CPU
  20875.  
  20876. Figure 14.10 Example of DMA Transfer in Burst Mode
  20877.  
  20878. Note: Burst mode can be set regardless of the data size. A 32-byte block transfer burst mode
  20879. setting can also be made.
  20880.  
  20881. Rev. 2.0, 02/99, page 449 of 830
  20882.  
  20883. ----------------------- Page 464-----------------------
  20884.  
  20885. Relationship between DMA Transfer Type, Request Mode, and Bus Mode
  20886.  
  20887. Table 14.7 shows the relationship between the type of DMA transfer, the request mode, and the
  20888. bus mode.
  20889.  
  20890. Table 14.7 Relationship between DMA Transfer Type, Request Mode, and Bus Mode
  20891.  
  20892. Address Request Bus Transfer Size Usable
  20893. Mode Type of Transfer Mode Mode (Bits) Channels
  20894. Single External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  20895.  
  20896. and external memory B
  20897. External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  20898.  
  20899. and memory-mapped B
  20900. external device
  20901.  
  20902. 1 5, 6
  20903. Dual External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  20904. external memory B
  20905.  
  20906. 1 5, 6
  20907. External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  20908. memory-mapped external B
  20909. device
  20910.  
  20911. 1 5, 6
  20912. Memory-mapped external Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  20913. device and memory-mapped B
  20914. external device
  20915.  
  20916. 2 3 4 5, 6
  20917. External memory and Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  20918. on-chip peripheral module
  20919.  
  20920. 2 3 4 5, 6
  20921. Memory-mapped external Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  20922. device and on-chip
  20923. peripheral module
  20924.  
  20925. 32B: 32-byte burst transfer
  20926. B: Burst
  20927. C: Cycle steal
  20928. Notes: 1. External request, auto-request, or on-chip peripheral module request (TMU input
  20929. capture interrupt request) possible. In the case of an on-chip peripheral module
  20930. request, it is not possible to specify external memory data transfer with the SCI (SCIF)
  20931. as the transfer request source.
  20932. 2. External request, auto-request, or on-chip peripheral module request possible. If the
  20933. transfer request source is the SCI (SCIF), either the transfer source must be SCRDR1
  20934. (SCFRDR2) or the transfer destination must be SCTDR1 (SCFTDR2).
  20935. 3. When the transfer request source is the SCI (SCIF), only cycle steal mode can be
  20936. used.
  20937. 4. Access size permitted for the on-chip peripheral module register that is the transfer
  20938. source or transfer destination.
  20939. 5. When the transfer request is an external request, only channels 0 and 1 can be used.
  20940. 6. In DDT mode, transfer requests can be accepted for all channels from external
  20941. devices capable of DTR format output.
  20942.  
  20943. Rev. 2.0, 02/99, page 450 of 830
  20944.  
  20945. ----------------------- Page 465-----------------------
  20946.  
  20947. Bus Mode and Channel Priority Order
  20948.  
  20949. When, for example, channel 1 is transferring data in burst mode, and a transfer request is issued
  20950. to channel 0, which has a higher priority, the channel 0 transfer is started immediately.
  20951.  
  20952. If fixed mode has been set for the priority levels (CH0 > CH1), transfer on channel 1 is
  20953. continued after transfer on channel 0 is completely finished, whether cycle steal mode or burst
  20954. mode is set for channel 0.
  20955.  
  20956. If round robin mode has been set for the priority levels, transfer on channel 1 is restarted after
  20957. one transfer unit of data is transferred on channel 0, whether cycle steal mode or burst mode is
  20958. set for channel 0. Channel execution alternates in the order: channel 1 → channel 0 → channel 1
  20959. → channel 0.
  20960.  
  20961. An example of round robin mode operation is shown in figure 14.11.
  20962.  
  20963. Since channel 1 is in burst mode (in the case of edge sensing) regardless of whether fixed mode
  20964. or round robin mode is set for the priority order, the bus is not released to the CPU until channel
  20965. 1 transfer ends.
  20966.  
  20967. CPU DMAC CH1 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH1 CPU
  20968.  
  20969. CH0 CH1 CH0
  20970.  
  20971. CPU DMAC channel 1 DMAC channel 0 and DMAC channel 1 CPU
  20972. burst mode channel 1 round robin burst mode
  20973. mode
  20974.  
  20975. Priority system: Round robin mode
  20976. Channel 0: Cycle steal mode
  20977. Channel 1: Burst mode (edge-sensing)
  20978.  
  20979. Figure 14.11 Bus Handling with Two DMAC Channels Operating
  20980.  
  20981. Note: When channel 1 is in level-sensing burst mode with the settings shown in figure 14.11,
  20982. the bus is passed to the CPU during a break in requests.
  20983.  
  20984. Rev. 2.0, 02/99, page 451 of 830
  20985.  
  20986. ----------------------- Page 466-----------------------
  20987.  
  20988. 14.3.5 Number of Bus Cycle States and '5(4 Pin Sampling Timing
  20989. '5(4
  20990.  
  20991. Number of States in Bus Cycle: The number of states in the bus cycle when the DMAC is the
  20992. bus master is controlled by the bus state controller (BSC) just as it is when the CPU is the bus
  20993. master. See section 13, Bus State Controller (BSC), for details.
  20994.  
  20995. '5(4 Pin Sampling Timing: In external request mode, the '5(4 pin is sampled at the rising
  20996. '5(4
  20997. edge of CKIO clock pulses. When '5(4 input is detected, a DMAC bus cycle is generated and
  20998. DMA transfer executed after four CKIO cycles at the earliest.
  20999.  
  21000. The second and subsequent '5(4 sampling operations are performed one cycle after the start of
  21001. the first DMAC transfer bus cycle (in the case of single address mode).
  21002.  
  21003. DRAK is output for one cycle only, once each time '5(4 is detected, regardless of the transfer
  21004. mode or '5(4 detection method. In the case of burst mode edge detection, '5(4 is sampled in
  21005. the first cycle only, and so DRAK is output in the first cycle only .
  21006.  
  21007. Operation: Figures 14.12 to 14.23 show the timing in each mode.
  21008.  
  21009. 1. Cycle Steal Mode
  21010. In cycle steal mode, The '5(4 sampling timing differs for dual address mode and single
  21011. address mode, and for level detection and edge detection of '5(4.
  21012. For example, in figure 14.12 (cycle steal mode, dual address mode, level detection), DMAC
  21013. transfer begins, at the earliest, four CKIO cycles after the first sampling operation. The
  21014. second sampling operation is performed one cycle after the start of the first DMAC transfer
  21015. write cycle. If '5(4 is not detected at this time, sampling is executed in every subsequent
  21016. cycle.
  21017. In figure 14.13 (cycle steal mode, dual address mode, edge detection), DMAC transfer
  21018. begins, at the earliest, five CKIO cycles after the first sampling operation. The second
  21019. sampling operation begins from the cycle in which the first DMAC transfer read cycle ends.
  21020. If '5(4 is not detected at this time, sampling is executed in every subsequent cycle.
  21021. In figure 14.16 (cycle steal mode, dual address mode, level detection), with SDRAM: row hit
  21022. read/write transfer using a 64-bit bus width and a 32-byte block as the data size, DMAC
  21023. transfer begins, at the earliest, four CKIO cycles after the first sampling operation. The
  21024. second sampling operation is performed in the cycle in which the first DMAC transfer write
  21025. cycle is begun.
  21026. For details of the timing for various kinds of memory access, see section 13, Bus State
  21027. Controller (BSC).
  21028. Figure 14.19 shows the case of cycle steal mode, single address mode, and level detection. In
  21029. this case, too, transfer is started, at the earliest, four CKIO cycles after the first '5(4
  21030. sampling operation. The second sampling operation is performed one cycle after the start of
  21031. the first DMAC transfer bus cycle.
  21032.  
  21033. Rev. 2.0, 02/99, page 452 of 830
  21034.  
  21035. ----------------------- Page 467-----------------------
  21036.  
  21037. Figure 14.20 shows the case of cycle steal mode, single address mode, and edge detection. In
  21038. this case, transfer is started, at the earliest, five CKIO cycles after the first '5(4 sampling
  21039. operation. The second sampling begins one cycle after the first assertion of DRAK.
  21040. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21041.  
  21042. 2. Burst Mode, Dual Address Mode, Level Detection
  21043. '5(4 sampling timing in burst mode using dual address mode and level detection is
  21044. virtually the same as for cycle steal mode.
  21045. For example, in figure 14.14, DMAC transfer begins, at the earliest, four CKIO cycles after
  21046. the first sampling operation. The second sampling operation is performed one cycle after the
  21047. start of the first DMAC transfer write cycle.
  21048. In the case of dual address mode transfer initiated by an external request, the DACK signal
  21049. can be output in either the read cycle or the write cycle of the DMAC transfer according to
  21050. the specification of the AM bit in CHCR.
  21051.  
  21052. 3. Burst Mode, Single Address Mode, Level Detection
  21053. '5(4 sampling timing in burst mode using single address mode and level detection is
  21054. shown in figure 14.21.
  21055. In the example shown in figure 14.21, DMAC transfer begins, at the earliest, four CKIO
  21056. cycles after the first sampling operation, and the second sampling operation begins one cycle
  21057. after the start of the first DMAC transfer bus cycle.
  21058. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21059. In figure 14.23, with a 32-byte data size, 64-bit bus width, and SDRAM: row hit write,
  21060. DMAC transfer begins, at the earliest, six CKIO cycles after the first sampling operation.
  21061. The second sampling operation begins one cycle after DACK is asserted for the first DMAC
  21062. transfer.
  21063.  
  21064. 4. Burst Mode, Dual Address Mode, Edge Detection
  21065. In burst mode using dual address mode and edge detection, '5(4 sampling is performed in
  21066. the first cycle only.
  21067. For example, in the case shown in figure 14.15, DMAC transfer begins, at the earliest, five
  21068. CKIO cycles after the first sampling operation. DMAC transfer then continues until the end
  21069. of the number of data transfers set in DMATCR. '5(4 is not sampled during this time, and
  21070. therefore DRAK is output in the first cycle only.
  21071. In the case of dual address mode transfer initiated by an external request, the DACK signal
  21072. can be output in either the read cycle or the write cycle of the DMAC transfer according to
  21073. the specification of the AM bit in CHCR.
  21074.  
  21075. Rev. 2.0, 02/99, page 453 of 830
  21076.  
  21077. ----------------------- Page 468-----------------------
  21078.  
  21079. 5. Burst Mode, Single Address Mode, Edge Detection
  21080. In burst mode using single address mode and edge detection, '5(4 sampling is performed
  21081. only in the first cycle.
  21082. For example, in the case shown in figure 14.22, DMAC transfer begins, at the earliest, five
  21083. cycles after the first sampling operation. DMAC transfer then continues until the end of the
  21084. number of data transfers set in DMATCR. '5(4 is not sampled during this time, and
  21085. therefore DRAK is output in the first cycle only.
  21086. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21087.  
  21088. Rev. 2.0, 02/99, page 454 of 830
  21089.  
  21090. ----------------------- Page 469-----------------------
  21091.  
  21092. E
  21093. x
  21094. CKIO
  21095. t
  21096. e Bus locked Bus locked
  21097. r
  21098. n
  21099. a
  21100. l
  21101. Source address Destination address Source address Destination address
  21102.  
  21103. B A[25:0]
  21104. u
  21105. s F
  21106. i
  21107. →→ g
  21108. u
  21109. E r
  21110. e
  21111. x
  21112. t 1 Read Write Read Write
  21113. e 4
  21114. D[63:0]
  21115. r .
  21116. n 1
  21117. a 2
  21118.  
  21119. l
  21120.  
  21121. B D DREQ0
  21122. u u
  21123. s (level
  21124. / a
  21125. ' l
  21126. '
  21127. detection) 1st 2nd
  21128.  
  21129. 5 A
  21130. 5 acceptance acceptance
  21131. ( d
  21132. (
  21133. 4 d
  21134. 4 r
  21135. ( e
  21136. L s
  21137. DREQ1
  21138. s
  21139. e
  21140. v M
  21141. e
  21142. l o
  21143. D d
  21144. e
  21145. e
  21146. DRAK0
  21147. /
  21148. t C
  21149. e
  21150. R c y
  21151. t c
  21152. e i l
  21153. v o e
  21154. . n S
  21155. 2 ) t
  21156. ,
  21157. . e Bus cycle
  21158. 0 D
  21159. CPU DMAC CPU DMAC CPU
  21160. , a
  21161. 0 A l
  21162. 2 C M
  21163. /
  21164. 9 K o
  21165. 9 d
  21166. , ( e
  21167. p R
  21168. a e
  21169. DACK0
  21170. g a
  21171. e d
  21172.  
  21173. 4 C
  21174. 5 y
  21175. 5 c
  21176. o l
  21177. e
  21178. f )
  21179. 8 : DREQ sampling and determination of channel priority
  21180. 3
  21181. 0
  21182.  
  21183. ----------------------- Page 470-----------------------
  21184.  
  21185. R
  21186. e
  21187. v
  21188. . E
  21189. 2
  21190. CKIO
  21191. . x
  21192. 0 t
  21193. , e Bus locked Bus locked
  21194. r
  21195. 0 n
  21196. 2 a
  21197. / Destination address
  21198. l
  21199. Source address Destination address Source address Source address
  21200. 9
  21201. ,9 B A[25:0]
  21202. u
  21203. p s F
  21204. a i
  21205. g →→ g
  21206. e u
  21207. 4 E r
  21208. e
  21209. 5 x
  21210. 6 t 1 D[63:0] Read Write Read Write Read
  21211. e 4
  21212. o r .
  21213. f n 1
  21214. 8 a 3
  21215. 3 l
  21216. 0 B D DREQ0
  21217. u u
  21218. s
  21219. (edge
  21220. / a
  21221. ' l
  21222. '
  21223. detection)
  21224.  
  21225. 1st 2nd 3rd 4th
  21226. 5 A
  21227. 5 acceptance acceptance acceptance accep-
  21228. ( d
  21229. ( d tance
  21230. 4
  21231. 4 r
  21232. ( e
  21233. s
  21234. DREQ1
  21235. E s
  21236. d M
  21237. g
  21238. e o
  21239. D d
  21240. e
  21241. e / DRAK0
  21242. t C
  21243. e
  21244. c y
  21245. t c
  21246. i
  21247. o l
  21248. e
  21249. n
  21250. ) S
  21251. , t
  21252. e Bus cycle
  21253. D
  21254. CPU DMAC CPU DMAC CPU DMAC
  21255. a
  21256. A l
  21257. C M
  21258. K o
  21259. d
  21260. ( e
  21261. R
  21262. e
  21263. DACK0
  21264. a
  21265. d
  21266.  
  21267. C
  21268. y
  21269. c
  21270. l
  21271. e
  21272. )
  21273. : DREQ sampling and determination of channel priority
  21274.  
  21275. ----------------------- Page 471-----------------------
  21276.  
  21277. E
  21278. x CKIO
  21279. t
  21280. e
  21281. r
  21282. Bus locked Bus locked
  21283. n
  21284. a
  21285. l
  21286.  
  21287. Source address Destination address Source address Destination address
  21288. B
  21289. u
  21290. A[25:0]
  21291. s
  21292.  
  21293. →→ F
  21294. i
  21295. E g
  21296. x u
  21297. t r
  21298. e
  21299. D[63:0]
  21300. e
  21301. Read Write Read Write
  21302. r
  21303. n 1
  21304. a 4
  21305. .
  21306. l 1
  21307. B 4
  21308. DREQ0
  21309. u
  21310. s D (level
  21311. /
  21312. '
  21313. ' u detection) 1st 2nd
  21314. 5 a
  21315. 5 l acceptance acceptance
  21316. (
  21317. (
  21318. 4 A
  21319. 4 d
  21320. ( d
  21321. L r DREQ1
  21322. e e
  21323. v s
  21324. e s
  21325. l M
  21326. D
  21327. e o
  21328. d
  21329. DRAK0
  21330. t
  21331. e e
  21332. R c /
  21333. e t B
  21334. i
  21335. v o u
  21336. . n r
  21337. 2 ) s
  21338. , t
  21339. .
  21340. 0 D M
  21341. Bus cycle CPU DMAC-1 DMAC-2 CPU
  21342. ,
  21343. 0 A o
  21344. 2 C d
  21345. / K e
  21346. 9
  21347. 9
  21348. , (
  21349. p R
  21350. a e DACK0
  21351. g a
  21352. e d
  21353.  
  21354. 4 C
  21355. 5 y
  21356. 7 c
  21357. o l
  21358. e
  21359. f )
  21360. 8 : DREQ sampling and determination of channel priority
  21361. 3
  21362. 0
  21363.  
  21364. ----------------------- Page 472-----------------------
  21365.  
  21366. R
  21367. e
  21368. v
  21369. . E
  21370. 2. x CKIO
  21371. 0 t
  21372. , e Bus locked Bus locked
  21373. r
  21374. 0 n
  21375. 2 a
  21376. /
  21377. 9 l
  21378. Source address Destination address Source address Destination address
  21379.  
  21380. ,9 B A[25:0]
  21381. u
  21382. p s
  21383. a
  21384. g →→ F
  21385. e i
  21386. 4 E g
  21387. 5 x u
  21388. 8 t r D[63:0]
  21389. e e
  21390. Read Write Read Write
  21391.  
  21392. o r 1
  21393. f n 4
  21394. 8 a .
  21395. 3 l 1
  21396. 0 B 5 DREQ0
  21397. u
  21398. s D
  21399. (edge
  21400. /
  21401. '
  21402. ' u detection) 1st
  21403. 5 a
  21404. 5
  21405. acceptance TE bit: transfer end
  21406. l
  21407. (
  21408. ( A
  21409. 4
  21410. 4 d
  21411. ( d
  21412. E r DREQ1
  21413. d e
  21414. g s
  21415. s
  21416. e
  21417. D M
  21418. e o DRAK0
  21419. t d
  21420. e e
  21421. c /
  21422. t B
  21423. i
  21424. o u
  21425. n r
  21426. ) s
  21427. , t
  21428. D M Bus cycle CPU DMAC-1 DMAC-2 CPU
  21429. A o
  21430. C d
  21431. K e
  21432.  
  21433. (
  21434. R
  21435. e DACK0
  21436. a
  21437. d
  21438.  
  21439. C
  21440. y
  21441. c
  21442. l
  21443. e
  21444. ) : DREQ sampling and determination of channel priority
  21445.  
  21446. ----------------------- Page 473-----------------------
  21447.  
  21448. E
  21449. ( x
  21450. B t CKIO
  21451. e
  21452. u r
  21453. s n
  21454. a
  21455. W
  21456. Destination
  21457. l Source address Source address
  21458.  
  21459. B
  21460. address
  21461. i
  21462. d u
  21463. t A[25:0]
  21464. h s F
  21465. : →→ i
  21466. 6 g
  21467. 4 E u
  21468. B x r
  21469. i t e
  21470. t e 1 Read Read Read Read Write Write Write Write Read Read
  21471. r
  21472. D[63:0]
  21473. s 4
  21474. , n .
  21475. S a 1
  21476. D l 6
  21477. R B
  21478. A u D DREQ0
  21479. s u
  21480. M /
  21481. (level
  21482. '
  21483. ' a
  21484. l detection)
  21485. : 5
  21486. R 5 A 1st 2nd
  21487. (
  21488. (
  21489. d
  21490. acceptance acceptance
  21491. o 4
  21492. w 4 d
  21493. ( r
  21494. H L e
  21495. s
  21496. DREQ1
  21497. i e s
  21498. t v
  21499. R e M
  21500. l
  21501.  
  21502. e D o
  21503. a d
  21504. d e e
  21505. t DRAK0
  21506. / e /
  21507. W c C
  21508. R r t y
  21509. i
  21510. e i o c
  21511. t n l
  21512. v. e ) e
  21513. ) / S
  21514. ,
  21515. 2 3 t
  21516. 0. D 2 e Bus cycle CPU DMAC-1 DMAC-2
  21517. , A B- a
  21518. l
  21519. 0 C y M
  21520. 2 K t
  21521. / e o
  21522. 9
  21523. 9 ( B d
  21524. , R l e
  21525. p e o
  21526. a a c
  21527. DACK0
  21528. g d k
  21529. e C T
  21530. 4 y r
  21531. 5 c a
  21532. 9 l n
  21533. e s
  21534. o ) f
  21535. f e
  21536. 8 r : DREQ sampling and determination of channel priority
  21537. 3
  21538. 0
  21539.  
  21540. ----------------------- Page 474-----------------------
  21541.  
  21542. R
  21543. e
  21544. v
  21545. .
  21546.  
  21547. 2
  21548. .
  21549. 0
  21550. ,
  21551.  
  21552. CKIO
  21553. 0
  21554. 2
  21555. /
  21556. 9
  21557. 9
  21558. ,
  21559. Source address Source address Source address
  21560. p F
  21561. On-chip
  21562. a i peripheral
  21563. g O g
  21564. e u
  21565. address bus
  21566. n r
  21567. 4 - e
  21568. 6 C 1
  21569. 0 h
  21570. On-chip
  21571. 4
  21572. o i .
  21573. peripheral Read Read Read
  21574. f p 1
  21575. 7
  21576. data bus
  21577. 8 S
  21578. 3 C
  21579. 0 I D
  21580. u
  21581. Destination address Destination address Destination address
  21582. (
  21583. L a A[31:0]
  21584. e l
  21585. v A
  21586. e d
  21587. l
  21588. D d
  21589. r
  21590. e e
  21591. t s D[63:0]
  21592. e
  21593. Write Write Write
  21594. s
  21595. c
  21596. t M
  21597. i
  21598. o o
  21599. n d
  21600. )
  21601. e
  21602. →→ /
  21603. C
  21604. E y Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU
  21605. c
  21606. x l
  21607. t e
  21608. e
  21609. r S
  21610. n t
  21611. e
  21612. a a
  21613. l
  21614. l
  21615. B M
  21616. u
  21617. s o
  21618. d
  21619. e
  21620.  
  21621. ----------------------- Page 475-----------------------
  21622.  
  21623. CKIO
  21624.  
  21625. Source address Source address Source address
  21626. F
  21627. i A[31:0]
  21628. E g
  21629. u
  21630. x r
  21631. t
  21632. e e
  21633. r 1
  21634. n 4
  21635. a
  21636. D[63:0] Read Read Read
  21637. .
  21638. l 1
  21639. B 8
  21640. u
  21641. s D Destination address Destination address Destination address
  21642. →→ u On-chip
  21643. a
  21644. l peripheral
  21645. O A address bus
  21646. n- d
  21647. C d
  21648. r
  21649. h
  21650. On-chip
  21651. e
  21652. i s peripheral
  21653. p
  21654. Write Write Write
  21655. s
  21656.  
  21657. data bus
  21658. S M
  21659. C o T1 T2 T1 T2 T1 T2
  21660. I
  21661. d
  21662. ( e
  21663. L /
  21664. e C
  21665. R v y Bus cycle CPU DMAC CPU DMAC CPU DMAC
  21666. e c
  21667. e l l
  21668. v. D e
  21669. e S
  21670. 2 t t
  21671. . e e
  21672. ,0 c a
  21673. t l
  21674. 0 i M
  21675. 2 o
  21676. / n
  21677. 9 ) o
  21678. 9 d
  21679. , e
  21680. p
  21681. a
  21682. g
  21683. e
  21684.  
  21685. 4
  21686. 6
  21687. 1
  21688.  
  21689. o
  21690. f
  21691.  
  21692. 8
  21693. 3
  21694. 0
  21695.  
  21696. ----------------------- Page 476-----------------------
  21697.  
  21698. R
  21699. e
  21700. v
  21701. .
  21702.  
  21703. 2
  21704. CKIO
  21705. .
  21706. 0
  21707. ,
  21708.  
  21709. 0
  21710. 2
  21711. / Source address Source address Source address Source address
  21712. 9
  21713. 9 A[25:0]
  21714. , E F
  21715. p x i
  21716. a t g
  21717. g e u
  21718. e r r
  21719. n e
  21720. 4 a
  21721. 6 l 1
  21722. 2 4
  21723. D[63:0] Read Read Read Read
  21724. B .
  21725. o u 1
  21726. f s 9
  21727. 8
  21728. 3 →→ S
  21729. 0 i DREQ0
  21730. E n
  21731. g
  21732. (level
  21733. x
  21734. t l
  21735. e
  21736. detection)
  21737. e
  21738. 1st 2nd 3rd 4th
  21739.  
  21740. r A acceptance acceptance acceptance acceptance
  21741. n
  21742. a d
  21743. l d
  21744. B r
  21745. e DREQ1
  21746. u s
  21747. s s
  21748. /
  21749. ' M
  21750. '
  21751. 5
  21752. 5 o
  21753. ( d
  21754. (
  21755. 4 e
  21756. 4
  21757. DRAK0
  21758. /
  21759. ( C
  21760. L y
  21761. e c
  21762. v l
  21763. e
  21764. e
  21765. l S
  21766. D t Bus cycle
  21767. e
  21768. CPU DMAC CPU DMAC CPU DMAC CPU DMAC CPU
  21769. e a
  21770. t l
  21771. e
  21772. c M
  21773. t
  21774. i o
  21775. o d
  21776. n e
  21777. ) DACK0
  21778.  
  21779. : DREQ sampling and determination of channel priority
  21780.  
  21781. ----------------------- Page 477-----------------------
  21782.  
  21783. CKIO
  21784.  
  21785. Source address Source address Source address
  21786. A[25:0]
  21787. E F
  21788. x i
  21789. t g
  21790. e u
  21791. r r
  21792. n e
  21793. a 1
  21794. l
  21795. 4 D[63:0] Read Read Read
  21796. B .
  21797. u 2
  21798. s 0
  21799.  
  21800. →→ S
  21801. i
  21802. E n
  21803. DREQ0
  21804. x g (edge
  21805. l
  21806. t e
  21807. e
  21808. detection) 1st 2nd 3rd
  21809.  
  21810. r A acceptance acceptance acceptance
  21811. n
  21812. a d
  21813. l d
  21814. B r
  21815. e
  21816. u s
  21817. DREQ1
  21818. s s
  21819. /
  21820. ' M
  21821. '
  21822. 5
  21823. 5 o
  21824. ( d
  21825. (
  21826. 4 e
  21827. 4
  21828. DRAK0
  21829. /
  21830. ( C
  21831. R E y
  21832. e d c
  21833. v g l
  21834. . e
  21835. e
  21836. 2 S
  21837. 0. D t
  21838. e
  21839. Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU
  21840. , e a
  21841. t
  21842. 0 e l
  21843. 2 c M
  21844. / t
  21845. 9 i o
  21846. 9 o d
  21847. , n e
  21848. p )
  21849. a DACK0
  21850. g
  21851. e
  21852.  
  21853. 4
  21854. 6
  21855. 3
  21856.  
  21857. o
  21858. f
  21859.  
  21860. 8 : DREQ sampling and determination of channel priority
  21861. 3
  21862. 0
  21863.  
  21864. ----------------------- Page 478-----------------------
  21865.  
  21866. R
  21867. e
  21868. v
  21869. .
  21870.  
  21871. 2
  21872. .
  21873. 0 CKIO
  21874. ,
  21875.  
  21876. 0
  21877. 2
  21878. /
  21879. 9
  21880. 9
  21881. Source address Source address Source address Source address
  21882. , E
  21883. p
  21884. A[25:0]
  21885. x
  21886. a t
  21887. g e F
  21888. e r i
  21889. n g
  21890. 4 a u
  21891. 6 l r
  21892. 4 B e D[63:0] Read Read Read Read
  21893. o u 1
  21894. f s 4
  21895. 8 .
  21896. 3 →→ 2
  21897. 1
  21898. 0
  21899. E DREQ0
  21900. x S
  21901. i (level
  21902. t n
  21903. e
  21904. g
  21905. detection) 1st 2nd 3rd 4th
  21906. r
  21907. n l acceptance acceptance acceptance acceptance
  21908. e
  21909. a
  21910. l A
  21911. B d
  21912. u d DREQ1
  21913. s r
  21914. / e
  21915. '
  21916. ' s
  21917. 5 s
  21918. 5
  21919. ( M
  21920. (
  21921. 4
  21922. 4 o DRAK0
  21923. ( d
  21924. L e
  21925. /
  21926. e B
  21927. v u
  21928. e r
  21929. l
  21930. s Bus cycle
  21931. D t
  21932. CPU DMAC-1 DMAC-2 DMAC-3 CPU DMAC-4
  21933.  
  21934. e M
  21935. t
  21936. e o
  21937. c d
  21938. t
  21939. i e
  21940. o
  21941. n
  21942. ) DACK0
  21943.  
  21944. : DREQ sampling and determination of channel priority
  21945.  
  21946. ----------------------- Page 479-----------------------
  21947.  
  21948. CKIO
  21949.  
  21950. Source address Source address Source address Source address
  21951. A[25:0]
  21952. E
  21953. x
  21954. t F
  21955. e
  21956. r i
  21957. n g
  21958. a u
  21959. l r
  21960. e
  21961. D[63:0] Read Read Read Read
  21962. B 1
  21963. u 4
  21964. s .
  21965. →→ 2
  21966. 2
  21967.  
  21968.  
  21969. DREQ0
  21970.  
  21971. E S (edge
  21972. x i
  21973. t n
  21974. detection)
  21975. e
  21976. 1st
  21977. r g
  21978. l acceptance
  21979. n e
  21980. a A
  21981. l
  21982.  
  21983. B d TE bit: transfer end
  21984. u d
  21985. s r
  21986. / e
  21987. '
  21988. ' s
  21989. s
  21990. 5
  21991. 5
  21992. ( M
  21993. (
  21994. 4 o
  21995. 4
  21996. DRAK0
  21997. d
  21998. R ( e
  21999. E /
  22000. e d B
  22001. v. g u
  22002. e r
  22003. 2 s
  22004. 0. D t Bus cycle CPU DMAC-1 DMAC-2 DMAC-3 DMAC-4 CPU
  22005. , e M
  22006. t
  22007. 0 e o
  22008. 2 c
  22009. / t d
  22010. 9 i e
  22011. 9 o
  22012. , n
  22013. p )
  22014. a
  22015. DACK0
  22016. g
  22017. e
  22018.  
  22019. 4
  22020. 6
  22021. 5
  22022.  
  22023. o
  22024. f
  22025.  
  22026. 8 : DREQ sampling and determination of channel priority
  22027. 3
  22028. 0
  22029.  
  22030. ----------------------- Page 480-----------------------
  22031.  
  22032. R
  22033. e
  22034. v E
  22035. . x
  22036. 2 t
  22037. . e
  22038. 0 r
  22039. CKIO
  22040. , n
  22041. 0 a
  22042. 2 l
  22043. / B
  22044. Destination Destination Destination
  22045. 9
  22046. 9 u
  22047. address address address
  22048. , s
  22049. p A[25:0]
  22050. a →→ F
  22051. g (
  22052. e B E i
  22053. g
  22054. 4 u x u
  22055. t
  22056. 6 s e r
  22057. 6 W r e
  22058. n
  22059. D[63:0] Write Write Write Write Write Write Write Write Write Write Write Write
  22060. o 1
  22061. f i a 4
  22062. d l .
  22063. 8 t 2
  22064. 3 h B 3
  22065. 0 : u
  22066. 6 s
  22067. DREQ0
  22068. 4 / S
  22069. '
  22070. ' i (level
  22071. B 5 n
  22072. i 5 g detection) 1st 2nd 3rd
  22073. (
  22074. t ( l acceptance acceptance acceptance
  22075. s 4 e
  22076. , 4
  22077. S ( A
  22078. D L d
  22079. e d
  22080. R
  22081. DREQ1
  22082. v r
  22083. A e e
  22084. l s
  22085. M D s
  22086. : e M
  22087. R t o
  22088. e
  22089. DRAK0
  22090. o c d
  22091. w t e
  22092. i
  22093. o /
  22094. H n B DMAC-1 DMAC-2 DMAC-3
  22095. i ) u
  22096. t / r
  22097. 3 s
  22098. W
  22099. Bus cycle CPU CPU
  22100. 2 t
  22101. r B- M
  22102. i
  22103. t y o Asserted 2 cycles before Asserted 2 cycles before Asserted 2 cycles before
  22104. e t d
  22105. ) e
  22106. e
  22107. start of bus cycle start of bus cycle start of bus cycle
  22108.  
  22109. B
  22110. l
  22111. o
  22112. c
  22113. DACK0
  22114. k
  22115.  
  22116. T
  22117. r
  22118. a
  22119. n
  22120. s
  22121. f : DREQ sampling and determination of channel priority
  22122. e
  22123. r
  22124.  
  22125. ----------------------- Page 481-----------------------
  22126.  
  22127. 14.3.6 Ending DMA Transfer
  22128.  
  22129. The conditions for ending DMA transfer are different for ending on individual channels and for
  22130. ending on all channels together. Except for the case where transfer ends when the value in the
  22131. DMA transfer count register (DMATCR) reaches 0, the following conditions apply to ending
  22132. transfer.
  22133.  
  22134. 1. Cycle Steal Mode (External Request, On-Chip Peripheral Module Request, Auto-Request)
  22135. When a transfer end condition is satisfied, acceptance of DMAC transfer requests is
  22136. suspended. The DMAC completes transfer for the transfer requests accepted up to the point
  22137. at which the transfer end condition was satisfied, then stops.
  22138. In cycle steal mode, the operation is the same for both edge and level transfer request
  22139. detection.
  22140. 2. Burst Mode, Edge Detection (External Request, On-Chip Peripheral Module Request, Auto-
  22141. Request)
  22142. The delay between the point at which a transfer end condition is satisfied and the point at
  22143. which the DMAC actually stops is the same as in cycle steal mode. In burst mode with edge
  22144. detection, only the first transfer request activates the DMAC, but the timing of stop request
  22145. (DE = 0 in CHCR, DME = 0 in DMAOR) sampling is the same as the transfer request
  22146. sampling timing shown in 4 and 5 under Operation in section 14.3.5. Therefore, a transfer
  22147. request is regarded as having been issued until a stop request is detected, and the
  22148. corresponding processing is executed before the DMAC stops.
  22149. 3. Burst Mode, Level Detection (External Request)
  22150. The delay between the point at which a transfer end condition is satisfied and the point at
  22151. which the DMAC actually stops is the same as in cycle steal mode. As in the case of burst
  22152. mode with edge detection, the timing of stop request (DE = 0 in CHCR, DME = 0 in
  22153. DMAOR) sampling is the same as the transfer request sampling timing shown in 2 and 3
  22154. under Operation in section 14.3.5. Therefore, a transfer request is regarded as having been
  22155. issued until a stop request is detected, and the corresponding processing is executed before
  22156. the DMAC stops.
  22157. 4. Transfer Suspension Bus Timing
  22158. Transfer suspension is executed on completion of processing for one transfer unit. In dual
  22159. address mode transfer, write cycle processing is executed even if a transfer end condition is
  22160. satisfied during the read cycle, and the transfers covered in 1, 2, and 3 above are also
  22161. executed before operation is suspended.
  22162.  
  22163. Rev. 2.0, 02/99, page 467 of 830
  22164.  
  22165. ----------------------- Page 482-----------------------
  22166.  
  22167. Conditions for Ending Transfer on Individual Channels: Transfer ends on the corresponding
  22168. channel when either of the following conditions is satisfied:
  22169.  
  22170. • The value in the DMA transfer count register (DMATCR) reaches 0.
  22171. • The DE bit in the DMA channel control register (CHCR) is cleared to 0.
  22172.  
  22173. 1. End of transfer when DMATCR = 0
  22174. When the DMATCR value reaches 0, DMA transfer ends on the corresponding channel and
  22175. the transfer end flag (TE) in CHCR is set. If the interrupt enable bit (IE) is set at this time, an
  22176. interrupt (DMTE) request is sent to the CPU.
  22177. Transfer ending when DMATCR = 0 does not follow the procedures described in 1, 2, 3, and
  22178. 4 in section 14.3.6.
  22179. 2. End of transfer when DE = 0 in CHCR
  22180. When the DMA enable bit (DE) in CHCR is cleared, DMA transfer is suspended on the
  22181. corresponding channel. The TE bit is not set in this case. Transfer ending in this case follows
  22182. the procedures described in 1, 2, 3, and 4 in section 14.3.6.
  22183.  
  22184. Conditions for Ending Transfer Simultaneously on All Channels: Transfer ends on all
  22185. channels simultaneously when either of the following conditions is satisfied:
  22186.  
  22187. • The address error bit (AE) or NMI flag (NMIF) in the DMA operation register (DMAOR) is
  22188. set.
  22189. • The DMA master enable bit (DME) in DMAOR is cleared to 0.
  22190.  
  22191. 1. End of transfer when AE = 1 in DMAOR
  22192. If the AE bit in DMAOR is set to 1 due to an address error, DMA transfer is suspended on all
  22193. channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is
  22194. passed to the CPU. Therefore, when AE is set to 1, the values in the DMA source address
  22195. register (SAR), DMA destination address register (DAR), and DMA transfer count register
  22196. (DMATCR) indicate the addresses for the DMA transfer to be performed next and the
  22197. remaining number of transfers. The TE bit is not set in this case. Before resuming transfer, it
  22198. is necessary to make a new setting for the channel that caused the address error, then write 0
  22199. to the AE bit after first reading 1 from it. Acceptance of external requests is suspended while
  22200. AE is set to 1, so a DMA transfer request must be reissued when resuming transfer.
  22201. Acceptance of internal requests is also suspended, so when resuming transfer, the DMA
  22202. transfer request enable bit for the relevant on-chip peripheral module must be cleared to 0
  22203. before the new setting is made.
  22204.  
  22205. Rev. 2.0, 02/99, page 468 of 830
  22206.  
  22207. ----------------------- Page 483-----------------------
  22208.  
  22209. 2. End of transfer when NMIF = 1 in DMAOR
  22210. If the NMIF bit in DMAOR is set to 1 due to an NMI interrupt, DMA transfer is suspended
  22211. on all channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the
  22212. bus is passed to the CPU. Therefore, when NMIF is set to 1, the values in the DMA source
  22213. address register (SAR), DMA destination address register (DAR), and DMA transfer count
  22214. register (DMATCR) indicate the addresses for the DMA transfer to be performed next and
  22215. the remaining number of transfers. The TE bit is not set in this case. Before resuming
  22216. transfer after NMI interrupt handling is completed, 0 must be written to the NMIF bit after
  22217. first reading 1 from it. As in the case of AE being set to 1, acceptance of external requests is
  22218. suspended while NMIF is set to 1, so a DMA transfer request must be reissued when
  22219. resuming transfer. Acceptance of internal requests is also suspended, so when resuming
  22220. transfer, the DMA transfer request enable bit for the relevant on-chip peripheral module must
  22221. be cleared to 0 before the new setting is made.
  22222. 3. End of transfer when DME = 0 in DMAOR
  22223. If the DME bit in DMAOR is cleared to 0, DMA transfer is suspended on all channels in
  22224. accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is passed to the
  22225. CPU. The TE bit is not set in this case. When DME is cleared to 0, the values in the DMA
  22226. source address register (SAR), DMA destination address register (DAR), and DMA transfer
  22227. count register (DMATCR) indicate the addresses for the DMA transfer to be performed next
  22228. and the remaining number of transfers. When resuming transfer, DME must be set to 1.
  22229. Operation will then be resumed from the next transfer.
  22230.  
  22231. Rev. 2.0, 02/99, page 469 of 830
  22232.  
  22233. ----------------------- Page 484-----------------------
  22234.  
  22235. 14.4 Examples of Use
  22236.  
  22237. 14.4.1 Examples of Transfer between External Memory and an External Device with
  22238. DACK
  22239.  
  22240. Examples of transfer of data in external memory to an external device with DACK using DMAC
  22241. channel 1 are considered here.
  22242.  
  22243. Table 14.8 shows the transfer conditions and the corresponding register settings.
  22244.  
  22245. Table 14.8 Conditions for Transfer between External Memory and an External Device
  22246. with DACK, and Corresponding Register Settings
  22247.  
  22248. Transfer Conditions Register Set Value
  22249.  
  22250. Transfer source: external memory SAR1 H'0C000000
  22251.  
  22252. Transfer source: external device with DACK DAR1 (Accessed by DACK)
  22253.  
  22254. Number of transfers: 32 DMATCR1 H'00000020
  22255.  
  22256. Transfer source address: decremented CHCR1 H'000022A5
  22257.  
  22258. Transfer destination address: (setting invalid)
  22259.  
  22260. Transfer request source: external pin ('5(4)
  22261. edge detection
  22262.  
  22263. Bus mode: burst
  22264.  
  22265. Transfer unit: word
  22266.  
  22267. No interrupt request at end of transfer
  22268.  
  22269. Channel priority order: 2 > 0 > 1 > 3 DMAOR H'00000201
  22270.  
  22271. Rev. 2.0, 02/99, page 470 of 830
  22272.  
  22273. ----------------------- Page 485-----------------------
  22274.  
  22275. 14.5 On-Demand Data Transfer Mode
  22276.  
  22277. 14.5.1 Operation
  22278.  
  22279. Setting the DDT bit to 1 in DMAOR causes a transition to on-demand data transfer mode (DDT
  22280. mode). In DDT mode, it is possible to specify direct single address mode transfer to channel 0
  22281. via the data bus and DDT module, and simultaneously issue a transfer request, using the
  22282. '%5(4, %$9/, 75, 7'$&., and ID [1:0] signals between an external device and the DMAC.
  22283. Figure 14.24 shows a block diagram of the DMAC, DDT, BU, and an external device (with
  22284. '%5(4, %$9/, 75, 7'$&., and ID [1:0] pins).
  22285.  
  22286. DMAC DDT
  22287. SAR0 Memory
  22288.  
  22289. DAR0
  22290. Data
  22291. DMATCR0 buffer
  22292.  
  22293. CHCR0
  22294. s
  22295. s u
  22296. Request u b
  22297. DREQ0–3 controller b a
  22298. ddtmode s t
  22299. s a
  22300. e D
  22301. r
  22302. d
  22303. bavl TR d External
  22304. ddtmode tdack id[1:0] A device (with
  22305.  
  22306. DTR DBREQ, BAVL,
  22307. BAVL TR, TDACK,
  22308. BSC
  22309. DBREQ
  22310. and ID [1:0])
  22311.  
  22312. Data buffer
  22313. TDACK FIFO or
  22314. ID[1:0] memory
  22315.  
  22316. Figure 14.24 On-Demand Transfer Mode Block Diagram
  22317.  
  22318. For channels 1 to 3, after making the settings for normal DMA transfer using the CPU, a transfer
  22319. request can be issued from an external device using the '%5(4, %$9/, 75, 7'$&., and ID
  22320. [1:0] signals (handshake protocol using the data bus). A transfer request can also be issued
  22321. simply by asserting 75, without using the external bus (handshake protocol without use of the
  22322. data bus). For channel 2, after making the DMA transfer settings in the normal way, a transfer
  22323. request can be issued directly from an external device (with '%5(4, %$9/, 75, 7'$&., and
  22324. ID [1:0] pins) by asserting '%5(4 and 75 simultaneously .
  22325.  
  22326. In DDT mode, there is a choice of five modes for performing DMA transfer.
  22327.  
  22328. Rev. 2.0, 02/99, page 471 of 830
  22329.  
  22330. ----------------------- Page 486-----------------------
  22331.  
  22332. 1. Normal data transfer mode (channel 0)
  22333. %$9/ (the data bus available signal) is asserted in response to '%5(4 (the data bus request
  22334. signal) from an external device. Two CKIO-synchronous cycles after %$9/ is asserted, the
  22335. external data bus drives the data transfer setting command (DTR command) in
  22336. synchronization with 75 (the transfer request signal). The initial settings are then made in
  22337. the DMAC channel 0 control register, and the DMA transfer is processed.
  22338. 2. Normal data transfer mode (except channel 0)
  22339. In this mode, the data transfer settings are made in the DMAC from the CPU, and DMA
  22340. transfer requests only are performed from the external device.
  22341. As in 1 above, '%5(4 is asserted from the external device and the external bus is secured,
  22342. then the DTR command is driven.
  22343. The transfer request channel can be specified by means of the two ID bits in the DTR
  22344. command.
  22345. 3. Handshake protocol using the data bus (valid for channel 0 only)
  22346. This mode is only valid for channel 0.
  22347. After the initial settings have been made in the DMAC channel 0 control register, the DDT
  22348. module asserts a data transfer request for the DMAC by setting the DTR command ID = 00
  22349. and MD = 00, and driving the DTR command.
  22350. 4. Handshake protocol without use of the data bus
  22351. The DDT module includes a function for recording the previously asserted request channel.
  22352. By using this function, it is possible to assert a transfer request for the channel for which a
  22353. request was asserted immediately before, by asserting 75 only from an external device after
  22354. a transfer request has once been made to the channel for which an initial setting has been
  22355. made in the DMAC control register (DTR command and data transfer setting by the CPU in
  22356. the DMAC).
  22357. 5. Direct data transfer mode (valid for channel 2 only)
  22358. A data transfer request can be asserted for channel 2 by asserting '5(4 and 75
  22359. simultaneously from an external device after the initial settings have been made in the
  22360. DMAC channel 2 control register.
  22361.  
  22362. Note: For details of the DTR format setting procedure, see Appendix G, SH7750 On-Demand
  22363. Data Transfer Mode.
  22364.  
  22365. Rev. 2.0, 02/99, page 472 of 830
  22366.  
  22367. ----------------------- Page 487-----------------------
  22368.  
  22369. 14.5.2 Notes on Use of DDT Module
  22370.  
  22371. 1. The handshake protocol without use of the data bus is always used, except in the case where
  22372. 75 is asserted two cycles after %$9/ is asserted (and excluding requests to channel 2 by
  22373. means of simultaneous assertion of '%5(4 and 75).
  22374. 2. If a request to channel 2 is asserted by simultaneous assertion of '%5(4 and 75 during
  22375. execution with the handshake protocol without use of the data bus, it is accepted if there is
  22376. space in the channel 2 request queue.
  22377. 3. With the handshake protocol without use of the data bus, a DMA transfer request can be
  22378. asserted again for the channel for which transfer was requested immediately before by
  22379. asserting 75 only.
  22380. 4. When channel 0 is operated using the handshake protocol without use of the data bus, MD ≠
  22381. 00 should always be transferred as initialization data*. Operation is not guaranteed if the
  22382. handshake protocol is executed without transferring initialization data.
  22383. Note: * Initialization data: MD ≠ 00, ID = 00, SZ, R/W, COUNT, ADDRESS.
  22384.  
  22385. 5. If only 75 is asserted when operating other than with the handshake protocol without use of
  22386. the data bus, this is ignored by the DDT module (which does not operate).
  22387. 6. Operation is not guaranteed if the handshake protocol using the data bus is executed for
  22388. channel 0 without transferring initialization data. (A request only is asserted for the DMAC.)
  22389. 7. The DDT module is provided with four request queues for each of channels 1 to 3. If a
  22390. request from an external device is asserted when these request queues are full, it will be
  22391. ignored. (Channel 0 has a request flag; requests asserted while this flag is set are ignored.)
  22392. 8. The DDT module uses the following procedure to process ID, MD, and SZ:
  22393. When ID = 00
  22394. a. MD = 00: ID, MD select (handshake with data bus)
  22395. b. MD ≠ 00, SZ = 111: DMAC (CHCR0 DE bit) setting (transfer end request)
  22396. c. MD ≠ 00: ADDRESS, COUNT, MD, RW, SZ, ID select (data transfer to DMAC)
  22397. When ID ≠ 00
  22398. a. Request to channels 1–3 (items other than ID ignored)
  22399. 9. A data transfer end request (ID = 00, MD ≠ 00, SZ = 111) is not accepted when the channel 0
  22400. request flag in the DDT module is set (is not accepted during the bus cycle). Therefore, if the
  22401. DTR command initialization data settings are ID = 00 and MD = 01 (edge sensing and burst
  22402. transfer), transfer cannot be halted midway. (Set MD to a value other than 01.)
  22403. 10. The handshake protocol using the data bus applies only to channel 0 (MD = 00).
  22404. 11. Except when DTR.ID = 00, data other than DTR.ID is ignored.
  22405. 12. A channel 0 DMA transfer halt request can be implemented by settings of DTR.ID = 00,
  22406. DTR.MD ≠ 00, and DTR.SZ = 111. Values set in DMAC control registers, etc., are retained.
  22407. DMAC register reads are possible, but an execution restart from an external device is not
  22408. possible.
  22409.  
  22410. Rev. 2.0, 02/99, page 473 of 830
  22411.  
  22412. ----------------------- Page 488-----------------------
  22413.  
  22414. 13. If a request is asserted for a channel other than channel 0 during execution with the
  22415. handshake protocol using the data bus, and settings of DTR.ID = 00 and DTR.MD = 00 are
  22416. sent by an external device with the handshake protocol using the data bus after DMA transfer
  22417. has been executed on that channel, a request to channel 0 is asserted. (Initialization data need
  22418. not be set when continuing in this way.)
  22419. 14.'%5(4 is already used as a bus arbitration signal, but when a request to channel 2 is
  22420. asserted by means of simultaneous assertion of '%5(4 and 75, '%5(4 is not interpreted
  22421. as a bus arbitration signal (i.e., %$9/ is not asserted by this signal).
  22422. 15. It takes one cycle for '%5(4 to be accepted by the DDT module after being asserted by an
  22423. external device, but if %$9/ is asserted from the BSC at this time, %$9/ is not asserted
  22424. since the '%5(4 assertion by the external device is not reported to the BSC.
  22425. 16. When settings of ID = 00, MD = 10, and SZ = 110 are transferred to the DDT module, the
  22426. DDT channel 0 request flag and channel 1 to 3 request queues are cleared. (If a transfer
  22427. request to a particular channel is followed by another request to the same channel while the
  22428. TE bit in CHCR remains set to 1, request queue clearance is necessary since the DMAC is
  22429. halted.)
  22430. 17. When 75 only is asserted in the handshake protocol using the data bus while the channel 0
  22431. TE flag is set after the end of the last DMA transfer, the TE flag must be cleared.
  22432. If a transfer request is sent by asserting 75 only for channel 0 when the channel 0 TE flag is
  22433. set, the DMAC will freeze. In this case, the flag can be cleared as described in 16 above.
  22434. 18. After '%5(4 is asserted, do not assert '%5(4 again until %$9/ is asserted, as this will
  22435. result in a discrepancy between the number of '%5(4 and %$9/ assertions.
  22436. 19. Check that DMA transfer is not in progress before modifying the DDT bit in DMAOR. If
  22437. DMAOR.DDT is cleared to 0 during DMA transfer in DDT mode, the DMAC will freeze. In
  22438. this case, the flag can be cleared as described in 16 above.
  22439.  
  22440. Rev. 2.0, 02/99, page 474 of 830
  22441.  
  22442. ----------------------- Page 489-----------------------
  22443.  
  22444. 14.6 Usage Notes
  22445.  
  22446. 1. When modifying SAR0–SAR3, DAR0–DAR3, DMATCR0–DMATCR3, and CHCR0–
  22447. CHCR3, first clear the DE bit for the relevant channel to 0.
  22448. 2. The NMIF bit in DMAOR is set when an NMI interrupt is input even if the DMAC is not
  22449. operating.
  22450. Confirmation method when DMA transfer is not executed correctly:
  22451. Read the NMIF, AE, and DME bits in DMAOR, the DE and TE bits in CHCR0–CHCR3, and
  22452. DMATCR0–DMATCR3. If NMIF was set before the transfer, the DMATCR transfer count
  22453. will remain at the set value. If NMIF was set during the transfer, when the DE bit is 1 and the
  22454. TE bit is 0 in CHCR0–CHCR3, the DMATCR value will indicate the remaining number of
  22455. transfers.
  22456. Also, the next addresses to be accessed can be found by reading SAR0–SAR3 and DAR0–
  22457. DAR3. If the AE bit has been set, an address error has occurred. Check the set values in
  22458. CHCR, SAR, and DAR.
  22459. 3. Check that DMA transfer is not in progress before making a transition to the module standby
  22460. state, standby mode, or deep sleep mode.
  22461. Either check that TE = 1 in CHCR0–CHCR3, or clear DME to 0 in DMAOR to terminate
  22462. DMA transfer. When DME is cleared to 0 in DMAOR, transfer halts at the end of the
  22463. currently executing DMA bus cycle. Note, therefore, that transfer may not end immediately,
  22464. depending on the transfer data size. DMA operation is not guaranteed if the module standby
  22465. state, standby mode, or deep sleep mode is entered without confirming that DMA transfer
  22466. has ended.
  22467. 4. Do not specify a DMAC, CCN, BIST, BSC, or UBC control register as the DMAC transfer
  22468. source or destination.
  22469. 5. When activating the DMAC, make the SAR, DAR, and DMATCR register settings for the
  22470. relevant channel before setting DE to 1 in CHCR, or make the register settings with DE
  22471. cleared to 0 in CHCR, then set DE to 1. It does not matter whether setting of the DME bit to
  22472. 1 in DMAOR is carried out first or last. To operate the relevant channel, DME and DE must
  22473. both be set to 1. The DMAC may not operate normally if the SAR, DAR, and DMATCR
  22474. settings are not made (with the exception of the unused register in single address mode).
  22475. 6. After the DMATCR count reaches 0 and DMA transfer ends normally, always write 0 to
  22476. DMATCR even when executing the maximum number of transfers on the same channel.
  22477. 7. When falling edge detection is used for external requests, keep the external request pin high
  22478. when making DMAC settings.
  22479. 8. When using the DMAC in single address mode, set an external address as the address. All
  22480. channels will halt due to an address error if an on-chip peripheral module address is set.
  22481.  
  22482. Rev. 2.0, 02/99, page 475 of 830
  22483.  
  22484. ----------------------- Page 490-----------------------
  22485.  
  22486. Rev. 2.0, 02/99, page 476 of 830
  22487.  
  22488. ----------------------- Page 491-----------------------
  22489.  
  22490. Section 15 Serial Communication Interface (SCI)
  22491.  
  22492. 15.1 Overview
  22493.  
  22494. The SH7750 is equipped with a single-channel serial communication interface (SCI) and a
  22495. single-channel serial communication interface with built-in FIFO registers (SCI with FIFO:
  22496. SCIF).
  22497.  
  22498. The SCI can handle both asynchronous and synchronous serial communication. A function is
  22499. also provided for serial communication between processors (multiprocessor communication
  22500. function).
  22501.  
  22502. The SCI supports a smart card interface conforming to ISO/IEC 7816-3 (Identification Card) as a
  22503. serial communication interface function for IC card interface use. For details, see section 17,
  22504. Smart Card Interface.
  22505.  
  22506. The SCIF is a dedicated asynchronous communication serial interface with built-in 16-stage
  22507. FIFO registers for both transmission and reception. For details, see section 16, Serial
  22508. Communication Interface with FIFO.
  22509.  
  22510. 15.1.1 Features
  22511.  
  22512. SCI features are listed below.
  22513.  
  22514. • Choice of synchronous or asynchronous serial communication mode
  22515.  Asynchronous mode
  22516. Serial data communication is executed using an asynchronous system in which
  22517. synchronization is achieved character by character. Serial data communication can be
  22518. carried out with standard asynchronous communication chips such as a Universal
  22519. Asynchronous Receiver/Transmitter (UART) or Asynchronous Communication Interface
  22520. Adapter (ACIA). A multiprocessor communication function is also provided that enables
  22521. serial data communication with a number of processors.
  22522. There is a choice of 12 serial data transfer formats.
  22523. Data length: 7 or 8 bits
  22524. Stop bit length: 1 or 2 bits
  22525. Parity: Even/odd/none
  22526. Multiprocessor bit: 1 or 0
  22527. Receive error detection: Parity, overrun, and framing errors
  22528. Break detection: A break can be detected by reading the RxD pin level directly
  22529. from the serial port register (SCSPTR1) when a framing error
  22530. occurs.
  22531.  
  22532. Rev. 2.0, 02/99, page 477 of 830
  22533.  
  22534. ----------------------- Page 492-----------------------
  22535.  
  22536.  Synchronous mode
  22537. Serial data communication is synchronized with a clock. Serial data communication can
  22538. be carried out with other chips that have a synchronous communication function.
  22539. There is a single serial data transfer format.
  22540. Data length: 8 bits
  22541. Receive error detection: Overrun errors
  22542. • Full-duplex communication capability
  22543. The transmitter and receiver are mutually independent, enabling transmission and reception
  22544. to be executed simultaneously. Double-buffering is used in both the transmitter and the
  22545. receiver, enabling continuous transmission and continuous reception of serial data.
  22546. • On-chip baud rate generator allows any bit rate to be selected.
  22547. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  22548. SCK pin
  22549. • Four interrupt sources
  22550. There are four interrupt sources—transmit-data-empty, transmit-end, receive-data-full, and
  22551. receive-error—that can issue requests independently. The transmit-data-empty interrupt and
  22552. receive-data-full interrupt can activate the DMA controller (DMAC) to execute a data
  22553. transfer.
  22554. • When not in use, the SCI can be stopped by halting its clock supply to reduce power
  22555. consumption.
  22556.  
  22557. Rev. 2.0, 02/99, page 478 of 830
  22558.  
  22559. ----------------------- Page 493-----------------------
  22560.  
  22561. 15.1.2 Block Diagram
  22562.  
  22563. Figure 15.1 shows a block diagram of the SCI.
  22564.  
  22565. e
  22566. c Internal
  22567. a
  22568. Module data bus f data bus
  22569. r
  22570. e
  22571. t
  22572. n
  22573. i
  22574.  
  22575. s
  22576. u
  22577. B
  22578.  
  22579. SCRDR1 SCTDR1 SCSSR1 SCBRR1
  22580. SCSCR1
  22581. SCSMR1
  22582. RxD SCRSR1 SCTSR1
  22583. SCSPTR1 Baud rate Pφ/4
  22584. generator
  22585. Transmission/
  22586. Pφ/16
  22587. reception
  22588. control
  22589. TxD Pφ/64
  22590. Parity generation Clock
  22591.  
  22592. Parity check
  22593. External clock
  22594. SCK
  22595. TEI
  22596. TXI
  22597. RXI
  22598. ERI
  22599.  
  22600. SCI
  22601.  
  22602. SCRSR1: Receive shift register
  22603. SCRDR1: Receive data register
  22604. SCTSR1: Transmit shift register
  22605. SCTDR1: Transmit data register
  22606. SCSMR1: Serial mode register
  22607. SCSCR1: Serial control register
  22608. SCSSR1: Serial status register
  22609. SCBRR1: Bit rate register
  22610. SCSPTR1: Serial port register
  22611.  
  22612. Figure 15.1 Block Diagram of SCI
  22613.  
  22614. Rev. 2.0, 02/99, page 479 of 830
  22615.  
  22616. ----------------------- Page 494-----------------------
  22617.  
  22618. 15.1.3 Pin Configuration
  22619.  
  22620. Table 15.1 shows the SCI pin configuration.
  22621.  
  22622. Table 15.1 SCI Pins
  22623.  
  22624. Pin Name Abbreviation I/O Function
  22625.  
  22626. Serial clock pin MD0/SCK I/O Clock input/output
  22627.  
  22628. Receive data pin RxD Input Receive data input
  22629.  
  22630. Transmit data pin MD7/TxD Output Transmit data output
  22631.  
  22632. Note: The serial clock pin and transmit data pin function as mode input pins MD0 and MD7
  22633. after a power-on reset. They are made to function as serial pins by performing SCI
  22634. operation settings with the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/$ bit in
  22635. SCSMR1. Break state transmission and detection, can be set in the SCI’s SCSPTR1
  22636. register.
  22637.  
  22638. 15.1.4 Register Configuration
  22639.  
  22640. The SCI has the internal registers shown in table 15.2. These registers are used to specify
  22641. asynchronous mode or synchronous mode, the data format, and the bit rate, and to perform
  22642. transmitter/receiver control.
  22643.  
  22644. With the exception of the serial port register, the SCI registers are initialized in standby mode
  22645. and in the module standby state as well as after a power-on reset or manual reset. When
  22646. recovering from standby mode or the module standby state, the registers must be set again.
  22647.  
  22648. Table 15.2 SCI Registers
  22649.  
  22650. Initial Area 7 Access
  22651. Name Abbreviation R/W Value P4 Address Address Size
  22652.  
  22653. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  22654.  
  22655. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  22656.  
  22657. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  22658.  
  22659. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  22660. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  22661.  
  22662. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  22663. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  22664.  
  22665. Notes: 1. Only 0 can be written, to clear flags.
  22666. 2. The value of bits 2 and 0 is undefined.
  22667.  
  22668. Rev. 2.0, 02/99, page 480 of 830
  22669.  
  22670. ----------------------- Page 495-----------------------
  22671.  
  22672. 15.2 Register Descriptions
  22673.  
  22674. 15.2.1 Receive Shift Register (SCRSR1)
  22675.  
  22676. Bit: 7 6 5 4 3 2 1 0
  22677.  
  22678. R/W: — — — — — — — —
  22679.  
  22680. SCRSR1 is the register used to receive serial data.
  22681.  
  22682. The SCI sets serial data input from the RxD pin in SCRSR1 in the order received, starting with
  22683. the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it is
  22684. transferred to SCRDR1 automatically.
  22685.  
  22686. SCRSR1 cannot be directly read or written to by the CPU.
  22687.  
  22688. 15.2.2 Receive Data Register (SCRDR1)
  22689.  
  22690. Bit: 7 6 5 4 3 2 1 0
  22691.  
  22692. Initial value: 0 0 0 0 0 0 0 0
  22693.  
  22694. R/W: R R R R R R R R
  22695.  
  22696. SCRDR1 is the register that stores received serial data.
  22697.  
  22698. When the SCI has received one byte of serial data, it transfers the received data from SCRSR1 to
  22699. SCRDR1 where it is stored, and completes the receive operation. SCRSR1 is then enabled for
  22700. reception.
  22701.  
  22702. Since SCRSR1 and SCRDR1 function as a double buffer in this way, it is possible to receive data
  22703. continuously.
  22704.  
  22705. SCRDR1 is a read-only register, and cannot be written to by the CPU.
  22706.  
  22707. SCRDR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  22708. module standby state.
  22709.  
  22710. Rev. 2.0, 02/99, page 481 of 830
  22711.  
  22712. ----------------------- Page 496-----------------------
  22713.  
  22714. 15.2.3 Transmit Shift Register (SCTSR1)
  22715.  
  22716. Bit: 7 6 5 4 3 2 1 0
  22717.  
  22718. R/W: — — — — — — — —
  22719.  
  22720. SCTSR1 is the register used to transmit serial data.
  22721.  
  22722. To perform serial data transmission, the SCI first transfers transmit data from SCTDR1 to
  22723. SCTSR1, then sends the data to the TxD pin starting with the LSB (bit 0).
  22724.  
  22725. When transmission of one byte is completed, the next transmit data is transferred from SCTDR1
  22726. to SCTSR1, and transmission started, automatically. However, data transfer from SCTDR1 to
  22727. SCTSR1 is not performed if the TDRE flag in the serial status register (SCSSR1) is set to 1.
  22728.  
  22729. SCTSR1 cannot be directly read or written to by the CPU.
  22730.  
  22731. 15.2.4 Transmit Data Register (SCTDR1)
  22732.  
  22733. Bit: 7 6 5 4 3 2 1 0
  22734.  
  22735. Initial value: 1 1 1 1 1 1 1 1
  22736.  
  22737. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  22738.  
  22739. SCTDR1 is an 8-bit register that stores data for serial transmission.
  22740.  
  22741. When the SCI detects that SCTSR1 is empty, it transfers the transmit data written in SCTDR1 to
  22742. SCTSR1 and starts serial transmission. Continuous serial transmission can be carried out by
  22743. writing the next transmit data to SCTDR1 during serial transmission of the data in SCTSR1.
  22744.  
  22745. SCTDR1 can be read or written to by the CPU at all times.
  22746.  
  22747. SCTDR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  22748. module standby state.
  22749.  
  22750. Rev. 2.0, 02/99, page 482 of 830
  22751.  
  22752. ----------------------- Page 497-----------------------
  22753.  
  22754. 15.2.5 Serial Mode Register (SCSMR1)
  22755.  
  22756. Bit: 7 6 5 4 3 2 1 0
  22757.  
  22758. C/$ CHR PE O/( STOP MP CKS1 CKS0
  22759.  
  22760. Initial value: 0 0 0 0 0 0 0 0
  22761.  
  22762. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  22763.  
  22764. SCSMR1 is an 8-bit register used to set the SCI’s serial transfer format and select the baud rate
  22765. generator clock source.
  22766.  
  22767. SCSMR1 can be read or written to by the CPU at all times.
  22768.  
  22769. SCSMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  22770. module standby state.
  22771.  
  22772. Bit 7—Communication Mode (C/$): Selects asynchronous mode or synchronous mode as the
  22773. $
  22774. SCI operating mode.
  22775.  
  22776. Bit 7: C/$ Description
  22777. $
  22778.  
  22779. 0 Asynchronous mode (Initial value)
  22780.  
  22781. 1 Synchronous mode
  22782.  
  22783. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the data length in asynchronous mode.
  22784. In synchronous mode, a fixed data length of 8 bits is used regardless of the CHR setting,
  22785.  
  22786. Bit 6: CHR Description
  22787.  
  22788. 0 8-bit data (Initial value)
  22789.  
  22790. 1 7-bit data*
  22791.  
  22792. Note: * When 7-bit data is selected, the MSB (bit 7) of SCTDR1 is not transmitted.
  22793.  
  22794. Bit 5—Parity Enable (PE): In asynchronous mode, selects whether or not parity bit addition is
  22795. performed in transmission, and parity bit checking in reception. In synchronous mode, parity bit
  22796. addition and checking is not performed, regardless of the PE bit setting.
  22797.  
  22798. Bit 5: PE Description
  22799.  
  22800. 0 Parity bit addition and checking disabled (Initial value)
  22801.  
  22802. 1 Parity bit addition and checking enabled*
  22803.  
  22804. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/( bit is added to
  22805. transmit data before transmission. In reception, the parity bit is checked for the parity
  22806. (even or odd) specified by the O/( bit.
  22807.  
  22808. Rev. 2.0, 02/99, page 483 of 830
  22809.  
  22810. ----------------------- Page 498-----------------------
  22811.  
  22812. Bit 4—Parity Mode (O/(): Selects either even or odd parity for use in parity addition and
  22813. (
  22814. checking. The O/( bit setting is only valid when the PE bit is set to 1, enabling parity bit addition
  22815. and checking, in asynchronous mode. The O/( bit setting is invalid in synchronous mode, and
  22816. when parity addition and checking is disabled in asynchronous mode.
  22817.  
  22818. Bit 4: O/( Description
  22819. (
  22820. 0 Even parity*1 (Initial value)
  22821.  
  22822. 2
  22823. 1 Odd parity*
  22824.  
  22825. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the
  22826. total number of 1-bits in the transmit character plus the parity bit is even. In reception,
  22827. a check is performed to see if the total number of 1-bits in the receive character plus
  22828. the parity bit is even.
  22829. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  22830. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  22831. check is performed to see if the total number of 1-bits in the receive character plus the
  22832. parity bit is odd.
  22833.  
  22834. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length in asynchronous mode.
  22835. The STOP bit setting is only valid in asynchronous mode. If synchronous mode is set, the STOP
  22836. bit setting is invalid since stop bits are not added.
  22837.  
  22838. Bit 3: STOP Description
  22839. 0 1 stop bit*1 (Initial value)
  22840.  
  22841. 2
  22842. 1 2 stop bits*
  22843.  
  22844. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  22845. before it is sent.
  22846. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  22847. before it is sent.
  22848.  
  22849. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  22850. 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
  22851. character.
  22852.  
  22853. Rev. 2.0, 02/99, page 484 of 830
  22854.  
  22855. ----------------------- Page 499-----------------------
  22856.  
  22857. Bit 2—Multiprocessor Mode (MP): Selects a multiprocessor format. When a multiprocessor
  22858. format is selected, the PE bit and O/( bit parity settings are invalid. The MP bit setting is only
  22859. valid in asynchronous mode; it is invalid in synchronous mode.
  22860.  
  22861. For details of the multiprocessor communication function, see section 15.3.3, Multiprocessor
  22862. Communication Function.
  22863.  
  22864. Bit 2: MP Description
  22865.  
  22866. 0 Multiprocessor function disabled (Initial value)
  22867.  
  22868. 1 Multiprocessor format selected
  22869.  
  22870. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source for the
  22871. on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and Pφ/64,
  22872. according to the setting of bits CKS1 and CKS0.
  22873.  
  22874. For the relation between the clock source, the bit rate register setting, and the baud rate, see
  22875. section 15.2.9, Bit Rate Register (SCBRR1).
  22876.  
  22877. Bit 1: CKS1 Bit 0: CKS0 Description
  22878.  
  22879. 0 0 Pφ clock (Initial value)
  22880.  
  22881. 1 Pφ/4 clock
  22882.  
  22883. 1 0 Pφ/16 clock
  22884.  
  22885. 1 Pφ/64 clock
  22886.  
  22887. Note: Pφ: Peripheral clock
  22888.  
  22889. Rev. 2.0, 02/99, page 485 of 830
  22890.  
  22891. ----------------------- Page 500-----------------------
  22892.  
  22893. 15.2.6 Serial Control Register (SCSCR1)
  22894.  
  22895. Bit: 7 6 5 4 3 2 1 0
  22896.  
  22897. TIE RIE TE RE MPIE TEIE CKE1 CKE0
  22898.  
  22899. Initial value: 0 0 0 0 0 0 0 0
  22900.  
  22901. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  22902.  
  22903. The SCSCR1 register performs enabling or disabling of SCI transfer operations, serial clock
  22904. output in asynchronous mode, and interrupt requests, and selection of the serial clock source.
  22905.  
  22906. SCSCR1 can be read or written to by the CPU at all times.
  22907.  
  22908. SCSCR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  22909. module standby state.
  22910.  
  22911. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-data-empty interrupt
  22912. (TXI) request generation when serial transmit data is transferred from SCTDR1 to SCTSR1 and
  22913. the TDRE flag in SCSSR1 is set to 1.
  22914.  
  22915. Bit 7: TIE Description
  22916.  
  22917. 0 Transmit-data-empty interrupt (TXI) request disabled* (Initial value)
  22918.  
  22919. 1 Transmit-data-empty interrupt (TXI) request enabled
  22920.  
  22921. Note: * TXI interrupt requests can be cleared by reading 1 from the TDRE flag, then clearing it to
  22922. 0, or by clearing the TIE bit to 0.
  22923.  
  22924. Bit 6—Receive Interrupt Enable (RIE): Enables or disables receive-data-full interrupt (RXI)
  22925. request and receive-error interrupt (ERI) request generation when serial receive data is
  22926. transferred from SCRSR1 to SCRDR1 and the RDRF flag in SCSSR1 is set to 1.
  22927.  
  22928. Bit 6: RIE Description
  22929.  
  22930. 0 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  22931. request disabled* (Initial value)
  22932.  
  22933. 1 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  22934. request enabled
  22935.  
  22936. Note: * RXI and ERI interrupt requests can be cleared by reading 1 from the RDRF flag, or the
  22937. FER, PER, or ORER flag, then clearing the flag to 0, or by clearing the RIE bit to 0.
  22938.  
  22939. Rev. 2.0, 02/99, page 486 of 830
  22940.  
  22941. ----------------------- Page 501-----------------------
  22942.  
  22943. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the SCI.
  22944.  
  22945. Bit 5: TE Description
  22946. 0 Transmission disabled*1 (Initial value)
  22947.  
  22948. 2
  22949. 1 Transmission enabled*
  22950. Notes: 1. The TDRE flag in SCSSR1 is fixed at 1.
  22951. 2. In this state, serial transmission is started when transmit data is written to SCTDR1
  22952. and the TDRE flag in SCSSR1 is cleared to 0.
  22953. SCSMR1 setting must be performed to decide the transmit format before setting the
  22954. TE bit to 1.
  22955.  
  22956. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCI.
  22957.  
  22958. Bit 4: RE Description
  22959. 0 Reception disabled*1 (Initial value)
  22960.  
  22961. 2
  22962. 1 Reception enabled*
  22963. Notes: 1. Clearing the RE bit to 0 does not affect the RDRF, FER, PER, and ORER flags, which
  22964. retain their states.
  22965. 2. Serial reception is started in this state when a start bit is detected in asynchronous
  22966. mode or serial clock input is detected in synchronous mode.
  22967. SCSMR1 setting must be performed to decide the receive format before setting the
  22968. RE bit to 1.
  22969.  
  22970. Bit 3—Multiprocessor Interrupt Enable (MPIE): Enables or disables multiprocessor
  22971. interrupts. The MPIE bit setting is only valid in asynchronous mode when the MP bit in
  22972. SCSMR1 is set to 1.
  22973.  
  22974. The MPIE bit setting is invalid in synchronous mode or when the MP bit is cleared to 0.
  22975.  
  22976. Bit 3: MPIE Description
  22977. 0 Multiprocessor interrupts disabled (normal reception performed) (Initial value)
  22978. [Clearing conditions]
  22979. • When the MPIE bit is cleared to 0
  22980. • When data with MPB = 1 is received
  22981.  
  22982. 1 Multiprocessor interrupts enabled*
  22983. Receive interrupt (RXI) requests, receive-error interrupt (ERI) requests, and setting of the
  22984. RDRF, FER, and ORER flags in SCSSR1 are disabled until data with the multiprocessor
  22985. bit set to 1 is received.
  22986.  
  22987. Note: * Receive data transfer from SCRSR1 to SCRDR1, receive error detection, and setting of
  22988. the RDRF, FER, and ORER flags in SCSSR1, is not performed. When receive data
  22989. including MPB = 1 is received, the MPB bit in SCSSR1 is set to 1, the MPIE bit is cleared
  22990. to 0 automatically, and generation of RXI and ERI interrupts (when the TIE and RIE bits in
  22991. SCSCR1 are set to 1) and FER and ORER flag setting is enabled.
  22992.  
  22993. Rev. 2.0, 02/99, page 487 of 830
  22994.  
  22995. ----------------------- Page 502-----------------------
  22996.  
  22997. Bit 2—Transmit-End interrupt Enable (TEIE): Enables or disables transmit-end interrupt
  22998. (TEI) request generation when there is no valid transmit data in SCTDR1 at the time for MSB
  22999. data transmission.
  23000.  
  23001. Bit 2: TEIE Description
  23002.  
  23003. 0 Transmit-end interrupt (TEI) request disabled* (Initial value)
  23004.  
  23005. 1 Transmit-end interrupt (TEI) request enabled*
  23006.  
  23007. Note: * TEI interrupt requests can be cleared by reading 1 from the TDRE flag in SCSSR1, then
  23008. clearing it to 0 and clearing the TEND flag to 0, or by clearing the TEIE bit to 0.
  23009.  
  23010. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits are used to select the SCI
  23011. clock source and enable or disable clock output from the SCK pin. The combination of the CKE1
  23012. and CKE0 bits determines whether the SCK pin functions as the serial clock output pin or the
  23013. serial clock input pin.
  23014.  
  23015. The setting of the CKE0 bit, however, is only valid for internal clock operation (CKE1 = 0) in
  23016. asynchronous mode. The CKE0 bit setting is invalid in synchronous mode and in the case of
  23017. external clock operation (CKE1 = 1). The CKE1 and CKE0 bits must be set before determining
  23018. the SCI’s operating mode with SCSMR1.
  23019.  
  23020. For details of clock source selection, see table 15.9 in section 15.3, Operation.
  23021.  
  23022. Bit 1: CKE1 Bit 0: CKE0 Description
  23023. 0 0 Asynchronous mode Internal clock/SCK pin functions as
  23024. input pin (input signal ignored)*1
  23025.  
  23026. Synchronous mode Internal clock/SCK pin functions as
  23027. serial clock output*1
  23028.  
  23029. 1 Asynchronous mode Internal clock/SCK pin functions as
  23030. clock output*2
  23031.  
  23032. Synchronous mode Internal clock/SCK pin functions as
  23033. serial clock output
  23034. 1 0 Asynchronous mode External clock/SCK pin functions as
  23035. clock input*3
  23036.  
  23037. Synchronous mode External clock/SCK pin functions as
  23038. serial clock input
  23039. 1 Asynchronous mode External clock/SCK pin functions as
  23040. clock input*3
  23041.  
  23042. Synchronous mode External clock/SCK pin functions as
  23043. serial clock input
  23044. Notes: 1. Initial value
  23045. 2. Outputs a clock of the same frequency as the bit rate.
  23046. 3. Inputs a clock with a frequency 16 times the bit rate.
  23047.  
  23048. Rev. 2.0, 02/99, page 488 of 830
  23049.  
  23050. ----------------------- Page 503-----------------------
  23051.  
  23052. 15.2.7 Serial Status Register (SCSSR1)
  23053.  
  23054. Bit: 7 6 5 4 3 2 1 0
  23055.  
  23056. TDRE RDRF ORER FER PER TEND MPB MPBT
  23057.  
  23058. Initial value: 1 0 0 0 0 1 0 0
  23059.  
  23060. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  23061.  
  23062. Note: * Only 0 can be written, to clear the flag.
  23063.  
  23064. SCSSR1 is an 8-bit register containing status flags that indicate the operating status of the SCI,
  23065. and multiprocessor bits.
  23066.  
  23067. SCSSR1 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  23068. TDRE, RDRF, ORER, PER, and FER. Also note that in order to clear these flags they must be
  23069. read as 1 beforehand. The TEND flag and MPB flag are read-only flags and cannot be modified.
  23070.  
  23071. SCSSR1 is initialized to H'84 by a power-on reset or manual reset, in standby mode, and in the
  23072. module standby state.
  23073.  
  23074. Bit 7—Transmit Data Register Empty (TDRE): Indicates that data has been transferred from
  23075. SCTDR1 to SCTSR1 and the next serial transmit data can be written to SCTDR1.
  23076.  
  23077. Bit 7: TDRE Description
  23078.  
  23079. 0 Valid transmit data has been written to SCTDR1
  23080.  
  23081. [Clearing conditions]
  23082.  
  23083. • When 0 is written to TDRE after reading TDRE = 1
  23084.  
  23085. • When data is written to SCTDR1 by the DMAC
  23086.  
  23087. 1 There is no valid transmit data in SCTDR1 (Initial value)
  23088.  
  23089. [Setting conditions]
  23090.  
  23091. • Power-on reset, manual reset, standby mode, or module standby
  23092.  
  23093. • When the TE bit in SCSCR1 is 0
  23094.  
  23095. • When data is transferred from SCTDR1 to SCTSR1 and data can be
  23096. written to SCTDR1
  23097.  
  23098. Rev. 2.0, 02/99, page 489 of 830
  23099.  
  23100. ----------------------- Page 504-----------------------
  23101.  
  23102. Bit 6—Receive Data Register Full (RDRF): Indicates that the received data has been stored in
  23103. SCRDR1.
  23104.  
  23105. Bit 6: RDRF Description
  23106.  
  23107. 0 There is no valid receive data in SCRDR1 (Initial value)
  23108.  
  23109. [Clearing conditions]
  23110.  
  23111. • Power-on reset, manual reset, standby mode, or module standby
  23112.  
  23113. • When 0 is written to RDRF after reading RDRF = 1
  23114.  
  23115. • When data in SCRDR1 is read by the DMAC
  23116.  
  23117. 1 There is valid receive data in SCRDR1
  23118.  
  23119. [Setting condition]
  23120.  
  23121. When serial reception ends normally and receive data is transferred from
  23122. SCRSR1 to SCRDR1
  23123.  
  23124. Note: SCRDR1 and the RDRF flag are not affected and retain their previous values when an
  23125. error is detected during reception or when the RE bit in SCSCR1 is cleared to 0.
  23126. If reception of the next data is completed while the RDRF flag is still set to 1, an overrun
  23127. error will occur and the receive data will be lost.
  23128.  
  23129. Bit 5—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  23130. causing abnormal termination.
  23131.  
  23132. Bit 5: ORER Description
  23133. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23134.  
  23135. [Clearing conditions]
  23136.  
  23137. • Power-on reset, manual reset, standby mode, or module standby
  23138.  
  23139. • When 0 is written to ORER after reading ORER = 1
  23140.  
  23141. 2
  23142. 1 An overrun error occurred during reception*
  23143.  
  23144. [Setting condition]
  23145.  
  23146. When the next serial reception is completed while RDRF = 1
  23147.  
  23148. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in
  23149. SCSCR1 is cleared to 0.
  23150. 2. The receive data prior to the overrun error is retained in SCRDR1, and the data
  23151. received subsequently is lost. Serial reception cannot be continued while the ORER
  23152. flag is set to 1. In synchronous mode, serial transmission cannot be continued either.
  23153.  
  23154. Rev. 2.0, 02/99, page 490 of 830
  23155.  
  23156. ----------------------- Page 505-----------------------
  23157.  
  23158. Bit 4—Framing Error (FER): Indicates that a framing error occurred during reception in
  23159. asynchronous mode, causing abnormal termination.
  23160.  
  23161. Bit 4: FER Description
  23162. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23163.  
  23164. [Clearing conditions]
  23165.  
  23166. • Power-on reset, manual reset, standby mode, or module standby
  23167.  
  23168. • When 0 is written to FER after reading FER = 1
  23169.  
  23170. 1 A framing error occurred during reception
  23171.  
  23172. [Setting condition]
  23173.  
  23174. When the SCI checks whether the stop bit at the end of the receive data is
  23175. 2
  23176. 1 when reception ends, and the stop bit is 0*
  23177.  
  23178. Notes: 1. The FER flag is not affected and retains its previous state when the RE bit in SCSCR1
  23179. is cleared to 0.
  23180. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop
  23181. bit is not checked. If a framing error occurs, the receive data is transferred to SCRDR1
  23182. but the RDRF flag is not set. Serial reception cannot be continued while the FER flag
  23183. is set to 1.
  23184.  
  23185. Bit 3—Parity Error (PER): Indicates that a parity error occurred during reception with parity
  23186. addition in asynchronous mode, causing abnormal termination.
  23187.  
  23188. Bit 3: PER Description
  23189. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23190.  
  23191. [Clearing conditions]
  23192.  
  23193. • Power-on reset, manual reset, standby mode, or module standby
  23194.  
  23195. •• When 0 is written to PER after reading PER = 1
  23196.  
  23197. 2
  23198. 1 A parity error occurred during reception*
  23199.  
  23200. [Setting condition]
  23201.  
  23202. When, in reception, the number of 1-bits in the receive data plus the parity
  23203. bit does not match the parity setting (even or odd) specified by the O/( bit
  23204. in SCSMR1
  23205.  
  23206. Notes: 1. The PER flag is not affected and retains its previous state when the RE bit in SCSCR1
  23207. is cleared to 0.
  23208. 2. If a parity error occurs, the receive data is transferred to SCRDR1 but the RDRF flag
  23209. is not set. Serial reception cannot be continued while the PER flag is set to 1.
  23210.  
  23211. Rev. 2.0, 02/99, page 491 of 830
  23212.  
  23213. ----------------------- Page 506-----------------------
  23214.  
  23215. Bit 2—Transmit End (TEND): Indicates that there is no valid data in SCTDR1 when the last
  23216. bit of the transmit character is sent, and transmission has been ended.
  23217.  
  23218. The TEND flag is read-only and cannot be modified.
  23219.  
  23220. Bit 2: TEND Description
  23221.  
  23222. 0 Transmission is in progress
  23223.  
  23224. [Clearing conditions]
  23225.  
  23226. • When 0 is written to TDRE after reading TDRE = 1
  23227.  
  23228. • When data is written to SCTDR1 by the DMAC
  23229.  
  23230. 1 Transmission has been ended (Initial value)
  23231.  
  23232. [Setting conditions]
  23233.  
  23234. • Power-on reset, manual reset, standby mode, or module standby
  23235.  
  23236. • When the TE bit in SCSCR1 is 0
  23237.  
  23238. • When TDRE = 1 on transmission of the last bit of a 1-byte serial
  23239. transmit character
  23240.  
  23241. Bit 1—Multiprocessor Bit (MPB): When reception is performed using a multiprocessor format
  23242. in asynchronous mode, MPB stores the multiprocessor bit in the receive data.
  23243.  
  23244. The MPB flag is read-only and cannot be modified.
  23245.  
  23246. Bit 1: MPB Description
  23247.  
  23248. 0 Data with a 0 multiprocessor bit has been received* (Initial value)
  23249.  
  23250. 1 Data with a 1 multiprocessor bit has been received
  23251.  
  23252. Note: * Retains its previous state when the RE bit in SCSCR1 is cleared to 0 while using a
  23253. multiprocessor format.
  23254.  
  23255. Rev. 2.0, 02/99, page 492 of 830
  23256.  
  23257. ----------------------- Page 507-----------------------
  23258.  
  23259. Bit 0—Multiprocessor Bit Transfer (MPBT): When transmission is performed using a
  23260. multiprocessor format in asynchronous mode, MPBT stores the multiprocessor bit to be added to
  23261. the transmit data.
  23262.  
  23263. The MPBT bit setting is invalid in synchronous mode, when a multiprocessor format is not used,
  23264. and when the operation is not transmission.
  23265.  
  23266. Unlike transmit data, the MPBT bit is not double-buffered, so it is necessary to check whether
  23267. transmission has been completed before changing its value.
  23268.  
  23269. Bit 0: MPBT Description
  23270.  
  23271. 0 Data with a 0 multiprocessor bit is transmitted (Initial value)
  23272.  
  23273. 1 Data with a 1 multiprocessor bit is transmitted
  23274.  
  23275. 15.2.8 Serial Port Register (SCSPTR1)
  23276.  
  23277. Bit: 7 6 5 4 3 2 1 0
  23278.  
  23279. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  23280.  
  23281. Initial value: 0 0 0 0 0 — 0 —
  23282.  
  23283. R/W: R/W — — — R/W R/W R/W R/W
  23284.  
  23285. SCSPTR1 is an 8-bit readable/writable register that controls input/output and data for the port
  23286. pins multiplexed with the serial communication interface (SCI) pins. Input data can be read from
  23287. the RxD pin, output data written to the TxD pin, and breaks in serial transmission/reception
  23288. controlled, by means of bits 1 and 0. SCK pin data reading and output data writing can be
  23289. performed by means of bits 3 and 2. Bit 7 controls enabling and disabling of the RXI interrupt.
  23290.  
  23291. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2 and
  23292. 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is undefined.
  23293. SCSPTR1 is not initialized in the module standby state or standby mode.
  23294.  
  23295. Bit 7—Error Interrupt Only (EIO): When the EIO bit is 1, an RXI interrupt request is not sent
  23296. to the CPU even if the RIE bit is set to 1. When the DMAC is used, this setting means that only
  23297. ERI interrupts are handled by the CPU. The DMAC transfers read data to memory or another
  23298. peripheral module. This bit specifies enabling or disabling of the RXI interrupt.
  23299.  
  23300. Bit 7: EIO Description
  23301.  
  23302. 0 The RIE bit enables/disables RXI and ERI interrupts
  23303.  
  23304. When the RIE bit is 1, RXI and ERI interrupts are sent to INTC(Initial value)
  23305.  
  23306. 1 When the RIE bit is 1, only ERI interrupts are sent to INTC
  23307.  
  23308. Rev. 2.0, 02/99, page 493 of 830
  23309.  
  23310. ----------------------- Page 508-----------------------
  23311.  
  23312. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  23313.  
  23314. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin input/output. When
  23315. the SCK pin is actually set as a port output pin and outputs the value set by the SPB1DT bit, the
  23316. C/$ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be cleared to 0.
  23317.  
  23318. Bit 3: SPB1IO Description
  23319.  
  23320. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  23321.  
  23322. 1 SPB1DT bit value is output to the SCK pin
  23323.  
  23324. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin input/output
  23325. data. Input or output is specified by the SPB1IO bit (see the description of bit 3, SPB1IO, for
  23326. details). When output is specified, the value of the SPB1DT bit is output to the SCK pin. The
  23327. SCK pin value is read from the SPB1DT bit regardless of the value of the SPB1IO bit. The initial
  23328. value of this bit after a power-on or manual reset is undefined.
  23329.  
  23330. Bit 2: SPB1DT Description
  23331.  
  23332. 0 Input/output data is low-level
  23333.  
  23334. 1 Input/output data is high-level
  23335.  
  23336. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output condition.
  23337. When the TxD pin is actually set as a port output pin and outputs the value set by the SPB0DT
  23338. bit, the TE bit in SCSCR1 should be cleared to 0.
  23339.  
  23340. Bit 1: SPB0IO Description
  23341.  
  23342. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  23343.  
  23344. 1 SPB0DT bit value is output to the TxD pin
  23345.  
  23346. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data and
  23347. TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  23348. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the value
  23349. of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the SPB0DT bit
  23350. regardless of the value of the SPB0IO bit. The initial value of this bit after a power-on or manual
  23351. reset is undefined.
  23352.  
  23353. Bit 0: SPB0DT Description
  23354.  
  23355. 0 Input/output data is low-level
  23356.  
  23357. 1 Input/output data is high-level
  23358.  
  23359. SCI I/O port block diagrams are shown in figures 15.2 to 15.4.
  23360.  
  23361. Rev. 2.0, 02/99, page 494 of 830
  23362.  
  23363. ----------------------- Page 509-----------------------
  23364.  
  23365. Reset
  23366.  
  23367. R
  23368. Q D
  23369. SPB1IO
  23370. C
  23371.  
  23372. Internal data bus
  23373. SPTRW
  23374.  
  23375. Reset
  23376. MD0/SCK
  23377. R
  23378. Q D
  23379.  
  23380. SPB1DT
  23381. C SCI
  23382.  
  23383. SPTRW Clock output enable signal
  23384.  
  23385. Mode setting Serial clock output signal *
  23386. register
  23387. Serial clock input signal
  23388.  
  23389. Clock input enable signal
  23390.  
  23391. SPTRR
  23392.  
  23393. SPTRW: Write to SPTR
  23394. SPTRR: Read SPTR
  23395.  
  23396. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  23397. the CKE0 and CKE1 bits in SCSCR1 and the C/A bit in SCSMR1.
  23398.  
  23399.  
  23400. Figure 15.2 MD0/SCK Pin
  23401.  
  23402. Rev. 2.0, 02/99, page 495 of 830
  23403.  
  23404. ----------------------- Page 510-----------------------
  23405.  
  23406. Reset
  23407.  
  23408. R
  23409. Q D
  23410. SPB0IO
  23411. C Internal data bus
  23412.  
  23413. SPTRW
  23414.  
  23415. Reset
  23416. MD7/TxD
  23417. R
  23418. Q D
  23419. SPB0DT
  23420. C SCI
  23421.  
  23422. SPTRW Transmit enable signal
  23423.  
  23424. Mode setting register
  23425.  
  23426. Serial transmit data
  23427.  
  23428. SPTRW: Write to SPTR
  23429.  
  23430. Figure 15.3 MD7/TxD Pin
  23431.  
  23432. SCI
  23433. RxD
  23434.  
  23435. Serial receive data
  23436.  
  23437. Internal data bus
  23438.  
  23439. SPTRR
  23440.  
  23441. SPTRR: Read SPTR
  23442.  
  23443. Figure 15.4 RxD Pin
  23444.  
  23445. Rev. 2.0, 02/99, page 496 of 830
  23446.  
  23447. ----------------------- Page 511-----------------------
  23448.  
  23449. 15.2.9 Bit Rate Register (SCBRR1)
  23450.  
  23451. Bit: 7 6 5 4 3 2 1 0
  23452.  
  23453. Initial value: 1 1 1 1 1 1 1 1
  23454.  
  23455. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23456.  
  23457. SCBRR1 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  23458. generator operating clock selected by bits CKS1 and CKS0 in SCSMR1.
  23459.  
  23460. SCBRR1 can be read or written to by the CPU at all times.
  23461.  
  23462. SCBRR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  23463. module standby state.
  23464.  
  23465. The SCBRR1 setting is found from the following equations.
  23466.  
  23467. Asynchronous mode:
  23468.  
  23469.  
  23470. P
  23471. φ 6
  23472. N = × 10 – 1
  23473. 64 × 22n–1 × B
  23474.  
  23475. Synchronous mode:
  23476.  
  23477.  
  23478. P
  23479. φ 6
  23480. N = × 10 – 1
  23481. 8 × 22n–1 × B
  23482.  
  23483. Where B: Bit rate (bits/s)
  23484. N: SCBRR1 setting for baud rate generator (0 ≤ N ≤ 255)
  23485. Pφ: Peripheral module operating frequency (MHz)
  23486. n: Baud rate generator input clock (n = 0 to 3)
  23487. (See the table below for the relation between n and the clock.)
  23488.  
  23489. SCSMR1 Setting
  23490. n Clock CKS1 CKS0
  23491. 0 Pφ 0 0
  23492.  
  23493. 1 Pφ/4 0 1
  23494.  
  23495. 2 Pφ/16 1 0
  23496.  
  23497. 3 Pφ/64 1 1
  23498.  
  23499. Rev. 2.0, 02/99, page 497 of 830
  23500.  
  23501. ----------------------- Page 512-----------------------
  23502.  
  23503. The bit rate error in asynchronous mode is found from the following equation:
  23504.  
  23505. P × 106
  23506. φ
  23507. Error (%) = 2n–1 – 1 × 100
  23508. (N + 1) × B × 64 × 2
  23509.  
  23510. Table 15.3 shows sample SCBRR1 settings in asynchronous mode, and table 15.4 shows sample
  23511. SCBRR1 settings in synchronous mode.
  23512.  
  23513. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  23514.  
  23515. Pφφ (MHz)
  23516. 2 2.097152 2.4576 3
  23517. Bit Rate Error Error Error Error
  23518. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23519.  
  23520. 110 1 141 0.03 1 148 –0.04 1 174 –0.26 1 212 0.03
  23521. 150 1 103 0.16 1 108 0.21 1 127 0.00 1 155 0.16
  23522.  
  23523. 300 0 207 0.16 0 217 0.21 0 255 0.00 1 77 0.16
  23524. 600 0 103 0.16 0 108 0.21 0 127 0.00 0 155 0.16
  23525.  
  23526. 1200 0 51 0.16 0 54 –0.70 0 63 0.00 0 77 0.16
  23527. 2400 0 25 0.16 0 26 1.14 0 31 0.00 0 38 0.16
  23528. 4800 0 12 0.16 0 13 –2.48 0 15 0.00 0 19 –2.34
  23529. 9600 0 6 –6.99 0 6 –2.48 0 7 0.00 0 9 –2.34
  23530.  
  23531. 19200 0 2 8.51 0 2 13.78 0 3 0.00 0 4 –2.34
  23532. 31250 0 1 0.00 0 1 4.86 0 1 22.88 0 2 0.00
  23533. 38400 0 1 – 0 1 – 0 1 0.00
  23534. 18.62 14.67
  23535.  
  23536. Rev. 2.0, 02/99, page 498 of 830
  23537.  
  23538. ----------------------- Page 513-----------------------
  23539.  
  23540. Pφφ (MHz)
  23541.  
  23542. 3.6864 4 4.9152 5
  23543.  
  23544. Bit Rate Error Error Error Error
  23545. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23546.  
  23547. 110 2 64 0.70 2 70 0.03 2 86 0.31 2 88 –0.25
  23548.  
  23549. 150 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  23550.  
  23551. 300 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  23552.  
  23553. 600 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  23554.  
  23555. 1200 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  23556.  
  23557. 2400 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  23558.  
  23559. 4800 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  23560.  
  23561. 9600 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  23562.  
  23563. 19200 0 5 0.00 0 6 –6.99 0 7 0.00 0 7 1.73
  23564.  
  23565. 31250 — — — 0 3 0.00 0 4 –1.70 0 4 0.00
  23566.  
  23567. 38400 0 2 0.00 0 2 8.51 0 3 0.00 0 3 1.73
  23568.  
  23569. Legend
  23570. Blank: No setting is available.
  23571. —: A setting is available but error occurs.
  23572.  
  23573. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode (cont)
  23574.  
  23575. Pφφ (MHz)
  23576.  
  23577. 6 6.144 7.37288 8
  23578.  
  23579. Bit Rate Error Error Error Error
  23580. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23581.  
  23582. 110 2 106 –0.44 2 108 0.08 2 130 –0.07 2 141 0.03
  23583.  
  23584. 150 2 77 0.16 2 79 0.00 2 95 0.00 2 103 0.16
  23585.  
  23586. 300 1 155 0.16 1 159 0.00 1 191 0.00 1 207 0.16
  23587.  
  23588. 600 1 77 0.16 1 79 0.00 1 95 0.00 1 103 0.16
  23589.  
  23590. 1200 0 155 0.16 0 159 0.00 0 191 0.00 0 207 0.16
  23591.  
  23592. 2400 0 77 0.16 0 79 0.00 0 95 0.00 0 103 0.16
  23593.  
  23594. 4800 0 38 0.16 0 39 0.00 0 47 0.00 0 51 0.16
  23595.  
  23596. 9600 0 19 –2.34 0 19 0.00 0 23 0.00 0 25 0.16
  23597.  
  23598. 19200 0 9 –2.34 0 9 0.00 0 11 0.00 0 12 0.16
  23599.  
  23600. 31250 0 5 0.00 0 5 2.40 0 6 5.33 0 7 0.00
  23601.  
  23602. 38400 0 4 –2.34 0 4 0.00 0 5 0.00 0 6 –6.99
  23603.  
  23604. Rev. 2.0, 02/99, page 499 of 830
  23605.  
  23606. ----------------------- Page 514-----------------------
  23607.  
  23608. Pφφ (MHz)
  23609.  
  23610. 9.8304 10 12 12.288
  23611.  
  23612. Bit Rate Error Error Error Error
  23613. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23614.  
  23615. 110 2 174 –0.26 2 177 –0.25 2 212 0.03 2 217 0.08
  23616.  
  23617. 150 2 127 0.00 2 129 0.16 2 155 0.16 2 159 0.00
  23618.  
  23619. 300 1 255 0.00 2 64 0.16 2 77 0.16 2 79 0.00
  23620.  
  23621. 600 1 127 0.00 1 129 0.16 1 155 0.16 1 159 0.00
  23622.  
  23623. 1200 0 255 0.00 1 64 0.16 1 77 0.16 1 79 0.00
  23624.  
  23625. 2400 0 127 0.00 0 129 0.16 0 155 0.16 0 159 0.00
  23626.  
  23627. 4800 0 63 0.00 0 64 0.16 0 77 0.16 0 79 0.00
  23628.  
  23629. 9600 0 31 0.00 0 32 –1.36 0 38 0.16 0 39 0.00
  23630.  
  23631. 19200 0 15 0.00 0 15 1.73 0 19 0.16 0 19 0.00
  23632.  
  23633. 31250 0 9 –1.70 0 9 0.00 0 11 0.00 0 11 2.40
  23634.  
  23635. 38400 0 7 0.00 0 7 1.73 0 9 –2.34 0 9 0.00
  23636.  
  23637. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode (cont)
  23638.  
  23639. Pφφ (MHz)
  23640.  
  23641. 14.7456 16 19.6608 20
  23642.  
  23643. Bit Rate Error Error Error Error
  23644. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23645.  
  23646. 110 3 64 0.70 3 70 0.03 3 86 0.31 3 88 –0.25
  23647.  
  23648. 150 2 191 0.00 2 207 0.16 2 255 0.00 3 64 0.16
  23649.  
  23650. 300 2 95 0.00 2 103 0.16 2 127 0.00 2 129 0.16
  23651.  
  23652. 600 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  23653.  
  23654. 1200 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  23655.  
  23656. 2400 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  23657.  
  23658. 4800 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  23659.  
  23660. 9600 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  23661.  
  23662. 19200 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  23663.  
  23664. 31250 0 14 –1.70 0 15 0.00 0 19 –1.70 0 19 0.00
  23665.  
  23666. 38400 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  23667.  
  23668. Rev. 2.0, 02/99, page 500 of 830
  23669.  
  23670. ----------------------- Page 515-----------------------
  23671.  
  23672. Pφφ (MHz)
  23673. 24 24.576 28.7 30
  23674. Bit Rate Error Error Error Error
  23675. (bits/s) n N (%) n N (%) n N (%) n N (%)
  23676.  
  23677. 110 3 106 –0.44 3 108 0.08 3 126 0.31 3 132 0.13
  23678. 150 3 77 0.16 3 79 0.00 3 92 0.46 3 97 –0.35
  23679. 300 2 155 0.16 2 159 0.00 2 186 –0.08 2 194 0.16
  23680. 600 2 77 0.16 2 79 0.00 2 92 0.46 2 97 –0.35
  23681. 1200 1 155 0.16 1 159 0.00 1 186 –0.08 1 194 0.16
  23682.  
  23683. 2400 1 77 0.16 1 79 0.00 1 92 0.46 1 97 –0.35
  23684. 4800 0 155 0.16 0 159 0.00 0 186 –0.08 0 194 –1.36
  23685.  
  23686. 9600 0 77 0.16 0 79 0.00 0 92 0.46 0 97 –0.35
  23687. 19200 0 38 0.16 0 39 0.00 0 46 –0.61 0 48 –0.35
  23688. 31250 0 23 0.00 0 24 –1.70 0 28 –1.03 0 29 0.00
  23689. 38400 0 19 –2.34 0 19 0.00 0 22 1.55 0 23 1.73
  23690.  
  23691. Table 15.4 Examples of Bit Rates and SCBRR1 Settings in Synchronous Mode
  23692.  
  23693. Pφφ (MHz)
  23694. 4 8 16 28.7 30
  23695. Bit Rate (bits/s) n N n N n N n N n N
  23696.  
  23697. 10 — — — — — — — — — —
  23698.  
  23699. 250 2 249 3 124 3 249 — — — —
  23700. 500 2 124 2 249 3 124 3 223 3 233
  23701. 1k 1 249 2 124 2 249 3 111 3 116
  23702. 2.5k 1 99 1 199 2 99 2 178 2 187
  23703. 5k 0 199 1 99 1 199 2 89 2 93
  23704.  
  23705. 10k 0 99 0 199 1 99 1 178 1 187
  23706. 25k 0 39 0 79 0 159 1 71 1 74
  23707. 50k 0 19 0 39 0 79 0 143 0 149
  23708. 100k 0 9 0 19 0 39 0 71 0 74
  23709.  
  23710. 250k 0 3 0 7 0 15 — — 0 29
  23711. 500k 0 1 0 3 0 7 — — 0 14
  23712. 1M 0 0* 0 1 0 3 — — — —
  23713. 2M 0 0* 0 1 — — — —
  23714. Note: As far as possible, the setting should be made so that the error is within 1%.
  23715. Legend
  23716. Blank: No setting is available.
  23717. —: A setting is available but error occurs.
  23718. * Continuous transmission/reception is not possible.
  23719.  
  23720. Rev. 2.0, 02/99, page 501 of 830
  23721.  
  23722. ----------------------- Page 516-----------------------
  23723.  
  23724. Table 15.5 shows the maximum bit rate for various frequencies in asynchronous mode. Tables
  23725. 15.6 and 15.7 show the maximum bit rates with external clock input.
  23726.  
  23727. Table 15.5 Maximum Bit Rate for Various Frequencies with Baud Rate Generator
  23728. (Asynchronous Mode)
  23729.  
  23730. Settings
  23731.  
  23732. Pφφ (MHz) Maximum Bit Rate (bits/s) n N
  23733.  
  23734. 2 62500 0 0
  23735.  
  23736. 2.097152 65536 0 0
  23737.  
  23738. 2.4576 76800 0 0
  23739.  
  23740. 3 93750 0 0
  23741.  
  23742. 3.6864 115200 0 0
  23743.  
  23744. 4 125000 0 0
  23745.  
  23746. 4.9152 153600 0 0
  23747.  
  23748. 8 250000 0 0
  23749.  
  23750. 9.8304 307200 0 0
  23751.  
  23752. 12 375000 0 0
  23753.  
  23754. 14.7456 460800 0 0
  23755.  
  23756. 16 500000 0 0
  23757.  
  23758. 19.6608 614400 0 0
  23759.  
  23760. 20 625000 0 0
  23761.  
  23762. 24 750000 0 0
  23763.  
  23764. 24.576 768000 0 0
  23765.  
  23766. 28.7 896875 0 0
  23767.  
  23768. 30 937500 0 0
  23769.  
  23770. Rev. 2.0, 02/99, page 502 of 830
  23771.  
  23772. ----------------------- Page 517-----------------------
  23773.  
  23774. Table 15.6 Maximum Bit Rate with External Clock Input (Asynchronous Mode)
  23775.  
  23776. Pφφ (MHz) External Input Clock (MHz) Maximum Bit Rate (bits/s)
  23777.  
  23778. 2 0.5000 31250
  23779.  
  23780. 2.097152 0.5243 32768
  23781.  
  23782. 2.4576 0.6144 38400
  23783.  
  23784. 3 0.7500 46875
  23785.  
  23786. 3.6864 0.9216 57600
  23787.  
  23788. 4 1.0000 62500
  23789.  
  23790. 4.9152 1.2288 76800
  23791.  
  23792. 8 2.0000 125000
  23793.  
  23794. 9.8304 2.4576 153600
  23795.  
  23796. 12 3.0000 187500
  23797.  
  23798. 14.7456 3.6864 230400
  23799.  
  23800. 16 4.0000 250000
  23801.  
  23802. 19.6608 4.9152 307200
  23803.  
  23804. 20 5.0000 312500
  23805.  
  23806. 24 6.0000 375000
  23807.  
  23808. 24.576 6.1440 384000
  23809.  
  23810. 28.7 7.1750 448436
  23811.  
  23812. 30 7.5000 468750
  23813.  
  23814. Table 15.7 Maximum Bit Rate with External Clock Input (Synchronous Mode)
  23815.  
  23816. Pφφ (MHz) External Input Clock (MHz) Maximum Bit Rate (bits/s)
  23817.  
  23818. 8 1.3333 1333333.3
  23819.  
  23820. 16 2.6667 2666666.7
  23821.  
  23822. 24 4.0000 4000000.0
  23823.  
  23824. 28.7 4.7833 4783333.3
  23825.  
  23826. 30 5.0000 5000000.0
  23827.  
  23828. Rev. 2.0, 02/99, page 503 of 830
  23829.  
  23830. ----------------------- Page 518-----------------------
  23831.  
  23832. 15.3 Operation
  23833.  
  23834. 15.3.1 Overview
  23835.  
  23836. The SCI can carry out serial communication in two modes: asynchronous mode in which
  23837. synchronization is achieved character by character, and synchronous mode in which
  23838. synchronization is achieved with clock pulses.
  23839.  
  23840. Selection of asynchronous or synchronous mode and the transmission format is made using
  23841. SCSMR1 as shown in table 15.8. The SCI clock source is determined by a combination of the
  23842. C/$ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1, as shown in table 15.9.
  23843.  
  23844. • Asynchronous mode
  23845.  Data length: Choice of 7 or 8 bits
  23846.  Choice of parity addition, multiprocessor bit addition, and addition of 1 or 2 stop bits (the
  23847. combination of these parameters determines the transfer format and character length)
  23848.  Detection of framing, parity, and overrun errors, and breaks, during reception
  23849.  Choice of internal or external clock as SCI clock source
  23850. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  23851. clock with the same frequency as the bit rate can be output.
  23852. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  23853. input (the on-chip baud rate generator is not used).
  23854.  
  23855. • Synchronous mode
  23856.  Transfer format: Fixed 8-bit data
  23857.  Detection of overrun errors during reception
  23858.  Choice of internal or external clock as SCI clock source
  23859. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  23860. serial clock is output off-chip.
  23861. When external clock is selected: The on-chip baud rate generator is not used, and the SCI
  23862. operates on the input serial clock.
  23863.  
  23864. Rev. 2.0, 02/99, page 504 of 830
  23865.  
  23866. ----------------------- Page 519-----------------------
  23867.  
  23868. Table 15.8 SCSMR1 Settings for Serial Transfer Format Selection
  23869.  
  23870. SCSMR1 Settings SCI Transfer Format
  23871.  
  23872. Multi-
  23873. Bit 7: Bit 6: Bit 2: Bit 5: Bit 3: Data processor Parity Stop Bit
  23874. C/$ CHR MP PE STOP Mode Length Bit Bit Length
  23875. $
  23876.  
  23877. 0 0 0 0 0 Asynchronous 8-bit data No No 1 bit
  23878. mode
  23879.  
  23880. 1 2 bits
  23881.  
  23882. 1 0 Yes 1 bit
  23883.  
  23884. 1 2 bits
  23885.  
  23886. 1 0 0 7-bit data No 1 bit
  23887.  
  23888. 1 2 bits
  23889.  
  23890. 1 0 Yes 1 bit
  23891.  
  23892. 1 2 bits
  23893.  
  23894. 0 1 * 0 Asynchronous 8-bit data Yes No 1 bit
  23895. mode
  23896. (multiprocessor
  23897. format)
  23898.  
  23899. 1 2 bits
  23900.  
  23901. 1 0 7-bit data 1 bit
  23902.  
  23903. 1 2 bits
  23904.  
  23905. 1 * * * * Synchronous 8-bit data No None
  23906. mode
  23907.  
  23908. Note: An asterisk in the table means “Don’t care.”
  23909.  
  23910. Rev. 2.0, 02/99, page 505 of 830
  23911.  
  23912. ----------------------- Page 520-----------------------
  23913.  
  23914. Table 15.9 SCSMR1 and SCSCR1 Settings for SCI Clock Source Selection
  23915.  
  23916. SCSMR1 SCSCR1 Setting SCI Transmit/Receive Clock
  23917.  
  23918. Bit 7: Bit 1: Bit 0: Clock
  23919. C/$ CKE1 CKE0 Mode Source SCK Pin Function
  23920. $
  23921.  
  23922. 0 0 0 Asynchronous Internal SCI does not use SCK pin
  23923. mode
  23924.  
  23925. 1 Outputs clock with same
  23926. frequency as bit rate
  23927.  
  23928. 1 0 External Inputs clock with frequency
  23929. of 16 times the bit rate
  23930.  
  23931. 1
  23932.  
  23933. 1 0 0 Synchronous Internal Outputs serial clock
  23934. mode
  23935.  
  23936. 1
  23937.  
  23938. 1 0 External Inputs serial clock
  23939.  
  23940. 1
  23941.  
  23942. Rev. 2.0, 02/99, page 506 of 830
  23943.  
  23944. ----------------------- Page 521-----------------------
  23945.  
  23946. 15.3.2 Operation in Asynchronous Mode
  23947.  
  23948. In asynchronous mode, characters are sent or received, each preceded by a start bit indicating the
  23949. start of communication and followed by one or two stop bits indicating the end of
  23950. communication. Serial communication is thus carried out with synchronization established on a
  23951. character-by-character basis.
  23952.  
  23953. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  23954. communication. Both the transmitter and the receiver also have a double-buffered structure, so
  23955. that data can be read or written during transmission or reception, enabling continuous data
  23956. transfer.
  23957.  
  23958. Figure 15.5 shows the general format for asynchronous serial communication.
  23959.  
  23960. In asynchronous serial communication, the transmission line is usually held in the mark state
  23961. (high level). The SCI monitors the transmission line, and when it goes to the space state (low
  23962. level), recognizes a start bit and starts serial communication.
  23963.  
  23964. One serial communication character consists of a start bit (low level), followed by data (in LSB-
  23965. first order), a parity bit (high or low level), and finally one or two stop bits (high level).
  23966.  
  23967. In asynchronous mode, the SCI performs synchronization at the falling edge of the start bit in
  23968. reception. The SCI samples the data on the eighth pulse of a clock with a frequency of 16 times
  23969. the length of one bit, so that the transfer data is latched at the center of each bit.
  23970.  
  23971. Idle state (mark state)
  23972.  
  23973. 1 (LSB) (MSB) 1
  23974.  
  23975. Serial 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  23976. data
  23977.  
  23978. Start Parity Stop
  23979. bit bit bit(s)
  23980. Transmit/receive data
  23981.  
  23982. 1 bit 7 or 8 bits 1 bit, 1 or
  23983. or none 2 bits
  23984.  
  23985. One unit of transfer data (character or frame)
  23986.  
  23987. Figure 15.5 Data Format in Asynchronous Communication (Example with 8-Bit Data,
  23988. Parity, Two Stop Bits)
  23989.  
  23990. Data Transfer Format
  23991.  
  23992. Table 15.10 shows the data transfer formats that can be used in asynchronous mode. Any of 12
  23993. transfer formats can be selected according to the SCSMR1 setting.
  23994.  
  23995. Rev. 2.0, 02/99, page 507 of 830
  23996.  
  23997. ----------------------- Page 522-----------------------
  23998.  
  23999. Table 15.10 Serial Transfer Formats (Asynchronous Mode)
  24000.  
  24001. SCSMR1 Settings Serial Transfer Format and Frame Length
  24002.  
  24003. CHR PE MP STOP 1 2 3 4 5 6 7 8 9 10 11 12
  24004.  
  24005. 0 0 0 0 S 8-bit data STOP
  24006.  
  24007. 0 0 0 1 S 8-bit data STOP STOP
  24008.  
  24009. 0 1 0 0 S 8-bit data P STOP
  24010.  
  24011. 0 1 0 1 S 8-bit data P STOP STOP
  24012.  
  24013. 1 0 0 0 S 7-bit data STOP
  24014.  
  24015. 1 0 0 1 S 7-bit data STOP STOP
  24016.  
  24017. 1 1 0 0 S 7-bit data P STOP
  24018.  
  24019. 1 1 0 1 S 7-bit data P STOP STOP
  24020.  
  24021. 0 * 1 0 S 8-bit data MPB STOP
  24022.  
  24023. 0 * 1 1 S 8-bit data MPB STOP STOP
  24024.  
  24025. 1 * 1 0 S 7-bit data MPB STOP
  24026.  
  24027. 1 * 1 1 S 7-bit data MPB STOP STOP
  24028.  
  24029. S: Start bit
  24030. STOP: Stop bit
  24031. P: Parity bit
  24032. MPB: Multiprocessor bit
  24033. Note: An asterisk in the table means “Don’t care.”
  24034.  
  24035. Rev. 2.0, 02/99, page 508 of 830
  24036.  
  24037. ----------------------- Page 523-----------------------
  24038.  
  24039. Clock
  24040.  
  24041. Either an internal clock generated by the on-chip baud rate generator or an external clock input
  24042. at the SCK pin can be selected as the SCI’s serial clock, according to the setting of the C/$ bit in
  24043. SCSMR1 and the CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection, see
  24044. table 15.9.
  24045.  
  24046. When an external clock is input at the SCK pin, the clock frequency should be 16 times the bit
  24047. rate used.
  24048.  
  24049. When the SCI is operated on an internal clock, the clock can be output from the SCK pin. The
  24050. frequency of the clock output in this case is equal to the bit rate, and the phase is such that the
  24051. rising edge of the clock is at the center of each transmit data bit, as shown in figure 15.6.
  24052.  
  24053. 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  24054.  
  24055. One frame
  24056.  
  24057. Figure 15.6 Relation between Output Clock and Transfer Data Phase
  24058. (Asynchronous Mode)
  24059.  
  24060. Data Transfer Operations
  24061.  
  24062. SCI Initialization (Asynchronous Mode): Before transmitting and receiving data, it is necessary
  24063. to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  24064.  
  24065. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared
  24066. to 0 before making the change using the following procedure. When the TE bit is cleared to 0,
  24067. the TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  24068. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  24069.  
  24070. When an external clock is used the clock should not be stopped during operation, including
  24071. initialization, since operation will be unreliable in this case.
  24072.  
  24073. Figure 15.7 shows a sample SCI initialization flowchart.
  24074.  
  24075. Rev. 2.0, 02/99, page 509 of 830
  24076.  
  24077. ----------------------- Page 524-----------------------
  24078.  
  24079. 1. Set the clock selection in SCSCR1.
  24080. Initialization
  24081. Be sure to clear bits RIE, TIE, TEIE,
  24082. and MPIE, and bits TE and RE, to 0.
  24083. Clear TE and RE bits
  24084. in SCSCR1 to 0 When clock output is selected in
  24085. asynchronous mode, it is output
  24086. immediately after SCSCR1 settings
  24087. Set CKE1 and CKE0 bits are made.
  24088. in SCSCR1 (leaving TE and 2. Set the data transfer format in
  24089. RE bits cleared to 0) SCSMR1.
  24090.  
  24091. 3. Write a value corresponding to the
  24092. Set data transfer format bit rate into SCBRR1. (Not
  24093. in SCSMR1 necessary if an external clock is
  24094.  
  24095. used.)
  24096.  
  24097. Set value in SCBRR1 4. Wait at least one bit interval, then set
  24098. the TE bit or RE bit in SCSCR1 to 1.
  24099. Wait Also set the RIE, TIE, TEIE, and
  24100. MPIE bits.
  24101.  
  24102. No Setting the TE and RE bits enables
  24103. 1-bit interval elapsed?
  24104. the TxD and RxD pins to be used.
  24105. When transmitting, the SCI will go to
  24106. Yes the mark state; when receiving, it will
  24107. go to the idle state, waiting for a start
  24108. Set TE and RE bits in SCSCR1
  24109. bit.
  24110. to 1, and set RIE, TIE, TEIE,
  24111. and MPIE bits
  24112.  
  24113. End
  24114.  
  24115. Figure 15.7 Sample SCI Initialization Flowchart
  24116.  
  24117. Rev. 2.0, 02/99, page 510 of 830
  24118.  
  24119. ----------------------- Page 525-----------------------
  24120.  
  24121. Serial Data Transmission (Asynchronous Mode): Figure 15.8 shows a sample flowchart for
  24122. serial transmission.
  24123.  
  24124. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  24125.  
  24126. Start of transmission 1. SCI status check and transmit data
  24127. write: Read SCSSR1 and check that
  24128. the TDRE flag is set to 1, then write
  24129. transmit data to SCTDR1 and clear
  24130. Read TDRE flag in SCSSR1
  24131. the TDRE flag to 0.
  24132.  
  24133. 2. Serial transmission continuation
  24134. No
  24135. TDRE = 1? procedure: To continue serial
  24136. transmission, read 1 from the TDRE
  24137. Yes flag to confirm that writing is possible,
  24138. then write data to SCTDR1, and then
  24139. Write transmit data to SCTDR1 clear the TDRE flag to 0. (Checking
  24140. and clear TDRE flag and clearing of the TDRE flag is
  24141. in SCSSR1 to 0 automatic when the direct memory
  24142. access controller (DMAC) is activated
  24143. by a transmit-data-empty interrupt
  24144. No (TXI) request, and data is written to
  24145. All data transmitted?
  24146. SCTDR1.)
  24147.  
  24148. Yes 3. Break output at the end of serial
  24149. transmission: To output a break in
  24150. serial transmission, clear the SPB0DT
  24151. Read TEND flag in SCSSR1 bit to 0 and set the SPB0IO bit to 1 in
  24152. SCSPTR, then clear the TE bit in
  24153. SCSCR1 to 0.
  24154. No
  24155. TEND = 1?
  24156.  
  24157.  
  24158. Yes
  24159.  
  24160. No
  24161. Break output?
  24162.  
  24163. Yes
  24164.  
  24165. Clear SPB0DT to 0 and
  24166. set SPB0IO to 1
  24167.  
  24168. Clear TE bit in SCSCR1 to 0
  24169.  
  24170. End of transmission
  24171.  
  24172. Figure 15.8 Sample Serial Transmission Flowchart
  24173.  
  24174. Rev. 2.0, 02/99, page 511 of 830
  24175.  
  24176. ----------------------- Page 526-----------------------
  24177.  
  24178. In serial transmission, the SCI operates as described below.
  24179.  
  24180. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  24181. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  24182. SCTSR1.
  24183. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24184. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI) is
  24185. generated.
  24186. The serial transmit data is sent from the TxD pin in the following order.
  24187. a. Start bit: One 0-bit is output.
  24188. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  24189. c. Parity bit or multiprocessor bit: One parity bit (even or odd parity), or one multiprocessor
  24190. bit is output. (A format in which neither a parity bit nor a multiprocessor bit is output can
  24191. also be selected.)
  24192. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  24193. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  24194. sent.
  24195. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is
  24196. cleared to 0, data is transferred from SCTDR1 to SCTSR1, the stop bit is sent, and then serial
  24197. transmission of the next frame is started.
  24198. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and
  24199. then the line goes to the mark state in which 1 is output continuously. If the TEIE bit in
  24200. SCSCR1 is set to 1 at this time, a TEI interrupt request is generated.
  24201.  
  24202. Figure 15.9 shows an example of the operation for transmission in asynchronous mode.
  24203.  
  24204. Rev. 2.0, 02/99, page 512 of 830
  24205.  
  24206. ----------------------- Page 527-----------------------
  24207.  
  24208. Start Data Parity Stop Start Data Parity Stop
  24209. 1 bit bit bit bit bit bit 1
  24210.  
  24211. Serial Idle state
  24212. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  24213. data (mark state)
  24214.  
  24215. TDRE
  24216.  
  24217. TEND
  24218.  
  24219. TXI interrupt TXI interrupt
  24220. request request
  24221. Data written to SCTDR1 TEI interrupt
  24222. and TDRE flag cleared to request
  24223. 0 by TXI interrupt handler
  24224.  
  24225. One frame
  24226.  
  24227. Figure 15.9 Example of Transmit Operation in Asynchronous Mode
  24228. (Example with 8-Bit Data, Parity, One Stop Bit)
  24229.  
  24230. Rev. 2.0, 02/99, page 513 of 830
  24231.  
  24232. ----------------------- Page 528-----------------------
  24233.  
  24234. Serial Data Reception (Asynchronous Mode): Figure 15.10 shows a sample flowchart for serial
  24235. reception.
  24236.  
  24237. Use the following procedure for serial data reception after enabling the SCI for reception.
  24238.  
  24239. Start of reception 1. Receive error handling and
  24240. break detection: If a receive
  24241. error occurs, read the ORER,
  24242. PER, and FER flags in
  24243. Read ORER, PER, and FER flags SCSSR1 to identify the error.
  24244. in SCSSR1 After performing the
  24245. appropriate error handling,
  24246. ensure that the ORER, PER,
  24247. PER or FER Yes
  24248. and FER flags are all cleared to
  24249. or ORER = 1?
  24250. 0. Reception cannot be
  24251. No Error handling resumed if any of these flags
  24252. are set to 1. In the case of a
  24253. framing error, a break can be
  24254. Read RDRF flag in SCSSR1
  24255. detected by reading the value
  24256. of the RxD pin.
  24257.  
  24258. No 2. SCI status check and receive
  24259. RDRF = 1?
  24260. data read : Read SCSSR1 and
  24261. check that RDRF = 1, then read
  24262. Yes
  24263. the receive data in SCRDR1
  24264. and clear the RDRF flag to 0.
  24265. Read receive data in SCRDR1,
  24266. and clear RDRF flag 3. Serial reception continuation
  24267. in SCSSR1 to 0 procedure: To continue serial
  24268. reception, complete zero-
  24269. clearing of the RDRF flag
  24270. No All data received? before the stop bit for the
  24271. current frame is received. (The
  24272. RDRF flag is cleared
  24273. Yes automatically when the direct
  24274.  
  24275. memory access controller
  24276. Clear RE bit in SCSCR1 to 0
  24277. (DMAC) is activated by an RXI
  24278. interrupt and the SCRDR1
  24279.  
  24280. value is read.)
  24281. End of reception
  24282.  
  24283. Figure 15.10 Sample Serial Reception Flowchart (1)
  24284.  
  24285. Rev. 2.0, 02/99, page 514 of 830
  24286.  
  24287. ----------------------- Page 529-----------------------
  24288.  
  24289. Error handling
  24290.  
  24291. No
  24292. ORER = 1?
  24293.  
  24294. Yes
  24295.  
  24296. Overrun error handling
  24297.  
  24298. No
  24299. FER = 1?
  24300.  
  24301. Yes
  24302.  
  24303. Yes
  24304. Break?
  24305.  
  24306. No
  24307.  
  24308. Framing error handling Clear RE bit in SCSCR1 to 0
  24309.  
  24310. No
  24311. PER = 1?
  24312.  
  24313. Yes
  24314.  
  24315. Parity error handling
  24316.  
  24317. Clear ORER, PER, and FER flags
  24318. in SCSSR1 to 0
  24319.  
  24320. End
  24321.  
  24322.  
  24323. Figure 15.10 Sample Serial Reception Flowchart (2)
  24324.  
  24325. Rev. 2.0, 02/99, page 515 of 830
  24326.  
  24327. ----------------------- Page 530-----------------------
  24328.  
  24329. In serial reception, the SCI operates as described below.
  24330.  
  24331. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  24332. synchronization and starts reception.
  24333. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  24334. 3. The parity bit and stop bit are received.
  24335. After receiving these bits, the SCI carries out the following checks.
  24336. a. Parity check: The SCI checks whether the number of 1-bits in the receive data agrees with
  24337. the parity (even or odd) set in the O/E bit in SCSMR1.
  24338. b. Stop bit check: The SCI checks whether the stop bit is 1. If there are two stop bits, only
  24339. the first is checked.
  24340. c. Status check: The SCI checks whether the RDRF flag is 0, indicating that the receive data
  24341. can be transferred from SCRSR1 to SCRDR1.
  24342. If all the above checks are passed, the RDRF flag is set to 1, and the receive data is stored in
  24343. SCRDR1.
  24344. If a receive error is detected in the error check, the operation is as shown in table 15.11.
  24345. Note: No further receive operations can be performed when a receive error has occurred. Also
  24346. note that the RDRF flag is not set to 1 in reception, and so the error flags must be cleared
  24347. to 0.
  24348.  
  24349. 4. If the EIO bit in SCSPTR1 is cleared to 0 and the RIE bit in SCSCR1 is set to 1 when the
  24350. RDRF flag changes to 1, a receive-data-full interrupt (RXI) request is generated.
  24351. If the RIE bit in SCSCR1 is set to 1 when the ORER, PER, or FER flag changes to 1, a
  24352. receive-error interrupt (ERI) request is generated. A receive-data-full request is always output
  24353. to the DMAC when the RDRF flag changes to 1.
  24354.  
  24355. Table 15.11 Receive Error Conditions
  24356.  
  24357. Receive Error Abbreviation Condition Data Transfer
  24358.  
  24359. Overrun error ORER Reception of next data is Receive data is not transferred
  24360. completed while RDRF flag from SCRSR1 to SCRDR1
  24361. in SCSSR1 is set to 1
  24362.  
  24363. Framing error FER Stop bit is 0 Receive data is transferred
  24364. from SCRSR1 to SCRDR1
  24365.  
  24366. Parity error PER Received data parity differs Receive data is transferred
  24367. from that (even or odd) set from SCRSR1 to SCRDR1
  24368. in SCSMR1
  24369.  
  24370. Figure 15.11 shows an example of the operation for reception in asynchronous mode.
  24371.  
  24372. Rev. 2.0, 02/99, page 516 of 830
  24373.  
  24374. ----------------------- Page 531-----------------------
  24375.  
  24376. Start Data Parity Stop Start Data Parity Stop
  24377. 1 bit bit bit bit bit bit
  24378.  
  24379. Serial
  24380. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  24381. data
  24382.  
  24383. RDRF
  24384.  
  24385. FER
  24386.  
  24387. RXI interrupt
  24388. request SCRDR1 data read and ERI interrupt request
  24389. RDRF flag cleared to 0 generated by framing
  24390. One frame by RXI interrupt handler error
  24391.  
  24392. Figure 15.11 Example of SCI Receive Operation
  24393. (Example with 8-Bit Data, Parity, One Stop Bit)
  24394.  
  24395. 15.3.3 Multiprocessor Communication Function
  24396.  
  24397. The multiprocessor communication function performs serial communication using a
  24398. multiprocessor format, in which a multiprocessor bit is added to the transfer data, in
  24399. asynchronous mode. Use of this function enables data transfer to be performed among a number
  24400. of processors sharing a serial transmission line.
  24401.  
  24402. When multiprocessor communication is carried out, each receiving station is addressed by a
  24403. unique ID code.
  24404.  
  24405. The serial communication cycle consists of two cycles: an ID transmission cycle which specifies
  24406. the receiving station , and a data transmission cycle. The multiprocessor bit is used to
  24407. differentiate between the ID transmission cycle and the data transmission cycle.
  24408.  
  24409. The transmitting station first sends the ID of the receiving station with which it wants to perform
  24410. serial communication as data with a 1 multiprocessor bit added. It then sends transmit data as
  24411. data with a 0 multiprocessor bit added.
  24412.  
  24413. The receiving station skips the data until data with a 1 multiprocessor bit is sent.
  24414.  
  24415. When data with a 1 multiprocessor bit is received, the receiving station compares that data with
  24416. its own ID. The station whose ID matches then receives the data sent next. Stations whose ID
  24417. does not match continue to skip the data until data with a 1 multiprocessor bit is again received.
  24418. In this way, data communication is carried out among a number of processors.
  24419.  
  24420. Figure 15.12 shows an example of inter-processor communication using a multiprocessor format.
  24421.  
  24422. Rev. 2.0, 02/99, page 517 of 830
  24423.  
  24424. ----------------------- Page 532-----------------------
  24425.  
  24426. Transmitting
  24427. station
  24428.  
  24429. Serial transmission line
  24430.  
  24431. Receiving Receiving Receiving Receiving
  24432. station A station B station C station D
  24433.  
  24434. (ID = 01) (ID = 02) (ID = 03) (ID = 04)
  24435.  
  24436. Serial
  24437. H'01 H'AA
  24438. data
  24439. (MPB = 1) (MPB = 0)
  24440.  
  24441. ID transmission cycle: Data transmission cycle:
  24442. Receiving station Data transmission to
  24443. specification receiving station specified
  24444. by ID
  24445.  
  24446. MPB: Multiprocessor bit
  24447.  
  24448. Figure 15.12 Example of Inter-Processor Communication Using Multiprocessor Format
  24449. (Transmission of Data H'AA to Receiving Station A)
  24450.  
  24451. Data Transfer Formats
  24452.  
  24453. There are four data transfer formats. When the multiprocessor format is specified, the parity bit
  24454. specification is invalid. For details, see table 15.10.
  24455.  
  24456. Clock
  24457.  
  24458. See the description under Clock in section 15.3.2.
  24459.  
  24460. Data Transfer Operations
  24461.  
  24462. Multiprocessor Serial Data Transmission: Figure 15.13 shows a sample flowchart for
  24463. multiprocessor serial data transmission.
  24464.  
  24465. Use the following procedure for multiprocessor serial data transmission after enabling the SCI for
  24466. transmission.
  24467.  
  24468. Rev. 2.0, 02/99, page 518 of 830
  24469.  
  24470. ----------------------- Page 533-----------------------
  24471.  
  24472. Start of transmission
  24473. 1. SCI status check and ID data write:
  24474. Read SCSSR1 and check that the
  24475. Read TEND flag in SCSSR1 TEND flag is set to 1, then set the
  24476. MPBT bit in SCSSR1 to 1 and write
  24477. ID data to SCTDR1. Finally, clear the
  24478. No
  24479. TEND = 1? TDRE flag to 0.
  24480.  
  24481. 2. Preparation for data transfer: Read
  24482. Yes SCSSR1 and check that the TEND
  24483. flag is set to 1, then set the MPBT bit
  24484. Set MPBT bit in SCSSR1 to 1 and
  24485. in SCSSR1 to 1.
  24486. write ID data to SCTDR1
  24487. 3. Serial data transmission: Write the
  24488. first transmit data to SCTDR1, then
  24489. Clear TDRE flag to 0
  24490. clear the TDRE flag to 0.
  24491.  
  24492. To continue data transmission, be
  24493. Read TEND flag in SCSSR1 sure to read 1 from the TDRE flag to
  24494. confirm that writing is possible, then
  24495. write data to SCTDR1, and then clear
  24496. No the TDRE flag to 0. (Checking and
  24497. TEND = 1?
  24498. clearing of the TDRE flag is
  24499. automatic when the direct memory
  24500. Yes
  24501. access controller (DMAC) is
  24502. Clear MPBT bit in SCSSR1 to 0 activated by a transmit-data-empty
  24503. interrupt (TXI) request, and data is
  24504. written to SCTDR1.)
  24505.  
  24506. Write data to SCTDR1
  24507.  
  24508. Clear TDRE flag to 0
  24509.  
  24510. Read TDRE flag in SCSSR1
  24511.  
  24512. No
  24513. TDRE = 1?
  24514.  
  24515. Yes
  24516.  
  24517. No
  24518. All data transmitted?
  24519.  
  24520. Yes
  24521.  
  24522. End of transmission
  24523.  
  24524. Figure 15.13 Sample Multiprocessor Serial Transmission Flowchart
  24525.  
  24526. Rev. 2.0, 02/99, page 519 of 830
  24527.  
  24528. ----------------------- Page 534-----------------------
  24529.  
  24530. In serial transmission, the SCI operates as described below.
  24531.  
  24532. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  24533. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  24534. SCTSR1.
  24535. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24536. transmission.
  24537. The serial transmit data is sent from the TxD pin in the following order.
  24538. a. Start bit: One 0-bit is output.
  24539. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  24540. c. Multiprocessor bit: One multiprocessor bit (MPBT value) is output.
  24541. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  24542. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  24543. sent.
  24544. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is set
  24545. to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and then the line goes to the
  24546. mark state in which 1 is output. If the TEIE bit in SCSCR1 is set to 1 at this time, a transmit-
  24547. end interrupt (TEI) request is generated.
  24548. 4. The SCI monitors the TDRE flag. When TDRE is cleared to 0, the SCI recognizes that data
  24549. has been written to SCTDR1, and transfers the data from SCTDR1 to SCTSR1.
  24550. 5. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24551. transmitting. If the transmit-data-empty interrupt enable bit (TIE bit) in SCSCR1 is set to 1 at
  24552. this time, a transmit-data-empty interrupt (TXI) request is generated.
  24553. The order of transmission is the same as in step 2.
  24554.  
  24555. Figure 15.14 shows an example of SCI operation for transmission using a multiprocessor format.
  24556.  
  24557. Rev. 2.0, 02/99, page 520 of 830
  24558.  
  24559. ----------------------- Page 535-----------------------
  24560.  
  24561. Multi- Multi- Multi-
  24562. Start Data proces- Stop Start Data proces- Stop Start Data proces- Stop
  24563. 1 bit sor bit bit bit sor bit bit bit sor bit bit 1
  24564.  
  24565. Serial Idle state
  24566. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 0 D0 D1 D7 0
  24567. data (mark state)
  24568.  
  24569. TDRE
  24570.  
  24571. TEND
  24572.  
  24573. One frame Data written to SCTDR1 TXI interrupt
  24574. and TDRE flag cleared request TEI interrupt
  24575. to 0 by TXI interrupt request
  24576. handler
  24577.  
  24578. MPBT bit cleared to 0, data
  24579. written to SCTDR1, and
  24580. TDRE flag cleared to 0 by
  24581. TEI interrupt handler
  24582.  
  24583. Figure 15.14 Example of SCI Transmit Operation (Example with 8-Bit Data,
  24584. Multiprocessor Bit, One Stop Bit)
  24585.  
  24586. Multiprocessor Serial Data Reception: Figure 15.15 shows a sample flowchart for
  24587. multiprocessor serial reception.
  24588.  
  24589. Use the following procedure for multiprocessor serial data reception after enabling the SCI for
  24590. reception.
  24591.  
  24592. Rev. 2.0, 02/99, page 521 of 830
  24593.  
  24594. ----------------------- Page 536-----------------------
  24595.  
  24596. Start of reception 1. ID reception cycle: Set the MPIE
  24597. bit in SCSCR1 to 1.
  24598.  
  24599. Set MPIE bit in SCSCR1 to 1 2. SCI status check, ID reception
  24600. and comparison: Read SCSSR1
  24601. and check that the RDRF flag is
  24602. Read ORER and FER flags set to 1, then read the receive
  24603. in SCSSR1 data in SCRDR1 and compare it
  24604. with this station’s ID.
  24605. Yes
  24606. FER = 1? or ORER = 1? If the data is not this station’s ID,
  24607. set the MPIE bit to 1 again, and
  24608. No clear the RDRF flag to 0. If the
  24609.  
  24610. Read RDRF flag in SCSSR1 data is this station’s ID, clear the
  24611. RDRF flag to 0.
  24612.  
  24613. No 3. SCI status check and data
  24614. RDRF = 1?
  24615. reception: Read SCSSR1 and
  24616. Yes check that the RDRF flag is set to
  24617. Read receive data in SCRDR1 1, then read the data in SCRDR1.
  24618.  
  24619. 4. Receive error handling and break
  24620. No detection: If a receive error
  24621. This station’s ID?
  24622. occurs, read the ORER and FER
  24623. Yes flags in SCSSR1 to identify the
  24624.  
  24625. error. After performing the
  24626. Read ORER and FER flags
  24627. appropriate error handling,
  24628. in SCSSR1
  24629. ensure that the ORER and FER
  24630. flags are all cleared to 0.
  24631. Yes
  24632. FER = 1? or ORER = 1? Reception cannot be resumed if
  24633. either of these flags is set to 1. In
  24634. No the case of a framing error, a
  24635. Read RDRF flag in SCSSR1 break can be detected by reading
  24636. the RxD pin value.
  24637. No
  24638. RDRF = 1?
  24639.  
  24640. Yes
  24641. Read receive data in SCRDR1
  24642.  
  24643. No
  24644. All data received?
  24645.  
  24646. Yes Error handling
  24647.  
  24648. End of reception
  24649.  
  24650. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (1)
  24651.  
  24652. Rev. 2.0, 02/99, page 522 of 830
  24653.  
  24654. ----------------------- Page 537-----------------------
  24655.  
  24656. Error handling
  24657.  
  24658. No
  24659. ORER = 1?
  24660.  
  24661. Yes
  24662.  
  24663. Overrun error handling
  24664.  
  24665. No
  24666. FER = 1?
  24667.  
  24668. Yes
  24669.  
  24670. Yes
  24671. Break?
  24672.  
  24673. No
  24674.  
  24675. Framing error handling Clear RE bit in SCSCR1 to 0
  24676.  
  24677. Clear ORER and FER flags
  24678. in SCSSR1 to 0
  24679.  
  24680. End
  24681.  
  24682. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (2)
  24683.  
  24684. Rev. 2.0, 02/99, page 523 of 830
  24685.  
  24686. ----------------------- Page 538-----------------------
  24687.  
  24688. Figure 15.16 shows an example of SCI operation for multiprocessor format reception.
  24689.  
  24690. Start Stop Start Data Stop
  24691. 1 bit Data (ID1) MPB bit bit (Data1) MPB bit 1
  24692.  
  24693. Serial 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 Idle state
  24694. data (mark state)
  24695.  
  24696. MPIE
  24697.  
  24698. RDRF
  24699.  
  24700. SCRDR1
  24701. ID1
  24702. value
  24703.  
  24704. RXI interrupt request SCRDR1 data read As data is not this RXI interrupt request
  24705. (multiprocessor and RDRF flag station’s ID, MPIE is not generated, and
  24706. interrupt) cleared to 0 by RXI bit is set to 1 again SCRDR1 retains its
  24707. MPIE = 0 interrupt handler state
  24708.  
  24709. (a) Data does not match station’s ID
  24710.  
  24711. Start Stop Start Data Stop
  24712. 1 bit Data (ID2) MPB bit bit (Data2) MPB bit 1
  24713.  
  24714. Serial Idle state
  24715. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1
  24716. data (mark state)
  24717.  
  24718. MPIE
  24719.  
  24720. RDRF
  24721.  
  24722. SCRDR1
  24723. value ID1 ID2 Data2
  24724.  
  24725. RXI interrupt request SCRDR1 data read As data matches this MPIE bit set
  24726. (multiprocessor interrupt) and RDRF flag station’s ID, reception to 1 again
  24727. MPIE = 0 cleared to 0 by RXI continues and data is
  24728. interrupt handler received by RXI
  24729. interrupt handler
  24730.  
  24731. (b) Data matches station’s ID
  24732.  
  24733. Figure 15.16 Example of SCI Receive Operation (Example with 8-Bit Data, Multiprocessor
  24734. Bit, One Stop Bit)
  24735.  
  24736. Rev. 2.0, 02/99, page 524 of 830
  24737.  
  24738. ----------------------- Page 539-----------------------
  24739.  
  24740. In multiprocessor mode serial reception, the SCI operates as described below.
  24741.  
  24742. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  24743. synchronization and starts reception.
  24744. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  24745. 3. If the MPIE bit is 1, MPIE is cleared to 0 when a 1 is received in the multiprocessor bit
  24746. position. If the multiprocessor bit is 0, the MPIE bit is not changed. The value of the
  24747. multiprocessor bit is transferred to the MPB bit in SCSSR1.
  24748. 4. If the MPIE bit is 0, RDRF is checked at the stop bit position, and if RDRF is 1 the overrun
  24749. error bit is set. If the stop bit is not 0, the framing error bit is set. If RDRF is 0, the value in
  24750. SCRSR1 is transferred to SCRDR1, and if the stop bit is 0, RDRF is set to 1.
  24751. If MPIE remains set to 1, the SCI ignores the received data.
  24752.  
  24753. 15.3.4 Operation in Synchronous Mode
  24754.  
  24755. In synchronous mode, data is transmitted or received in synchronization with clock pulses,
  24756. making it suitable for high-speed serial communication.
  24757.  
  24758. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  24759. communication. Both the transmitter and the receiver also have a double-buffered structure, so
  24760. that data can be read or written during transmission or reception, enabling continuous data
  24761. transfer.
  24762.  
  24763. Figure 15.17 shows the general format for synchronous serial communication.
  24764.  
  24765. One unit of transfer data (character or frame)
  24766.  
  24767. * *
  24768.  
  24769. Serial clock
  24770.  
  24771. LSB MSB
  24772.  
  24773. Serial data Don’t care Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Don’t care
  24774.  
  24775. Note: * High except in continuous transfer
  24776.  
  24777.  
  24778. Figure 15.17 Data Format in Synchronous Communication
  24779.  
  24780. Rev. 2.0, 02/99, page 525 of 830
  24781.  
  24782. ----------------------- Page 540-----------------------
  24783.  
  24784. In synchronous serial communication, data on the transmission line is output from one falling
  24785. edge of the serial clock to the next. Data confirmation is guaranteed at the rising edge of the
  24786. serial clock.
  24787.  
  24788. In serial communication, one character consists of data output starting with the LSB and ending
  24789. with the MSB. After the MSB is output, the transmission line holds the MSB state.
  24790.  
  24791. In synchronous mode, the SCI receives data in synchronization with the falling edge of the serial
  24792. clock.
  24793.  
  24794. Data Transfer Format
  24795.  
  24796. A fixed 8-bit data format is used. No parity or multiprocessor bits are added.
  24797.  
  24798. Clock
  24799.  
  24800. Either an internal clock generated by the on-chip baud rate generator or an external serial clock
  24801. input at the SCK pin can be selected, according to the setting of the C/$ bit in SCSMR1 and the
  24802. CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection, see table 15.9.
  24803.  
  24804. When the SCI is operated on an internal clock, the serial clock is output from the SCK pin.
  24805.  
  24806. Eight serial clock pulses are output in the transfer of one character, and when no transfer is
  24807. performed the clock is fixed high. In reception only, if an on-chip clock source is selected, clock
  24808. pulses are output while RE = 1. When the last data is received, RE should be cleared to 0 before
  24809. the end of bit 7.
  24810.  
  24811. Data Transfer Operations
  24812.  
  24813. SCI Initialization (Synchronous Mode): Before transmitting and receiving data, it is necessary
  24814. to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  24815.  
  24816. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared
  24817. to 0 before making the change using the following procedure. When the TE bit is cleared to 0,
  24818. the TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  24819. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  24820.  
  24821. Figure 15.18 shows a sample SCI initialization flowchart.
  24822.  
  24823. Rev. 2.0, 02/99, page 526 of 830
  24824.  
  24825. ----------------------- Page 541-----------------------
  24826.  
  24827. 1. Set the clock selection in SCSCR1.
  24828. Initialization
  24829. Be sure to clear bits RIE, TIE, TEIE,
  24830. and MPIE, TE and RE, to 0.
  24831.  
  24832. Clear TE and RE bits 2. Set the data transfer format in
  24833. in SCSCR1 to 0 SCSMR1.
  24834.  
  24835. 3. Write a value corresponding to the bit
  24836. Set RIE, TIE, TEIE, MPIE, CKE1 rate into SCBRR1. (Not necessary if
  24837. and CKE0 bits in SCSCR1 an external clock is used.)
  24838. (leaving TE and RE bits 4. Wait at least one bit interval, then set
  24839. cleared to 0) the TE bit or RE bit in SCSCR1 to 1.
  24840.  
  24841. Also set the RIE, TIE, TEIE, and MPIE
  24842. Set data transfer format
  24843. bits. Setting the TE and RE bits
  24844. in SCSMR1
  24845. enables the TxD and RxD pins to be
  24846. used.
  24847.  
  24848. Set value in SCBRR1
  24849.  
  24850.  
  24851. Wait
  24852.  
  24853. No
  24854. 1-bit interval elapsed?
  24855.  
  24856. Yes
  24857.  
  24858. Set TE and RE bits in SCSCR1
  24859. to 1, and set RIE, TIE, TEIE,
  24860. and MPIE bits
  24861.  
  24862. End
  24863.  
  24864. Figure 15.18 Sample SCI Initialization Flowchart
  24865.  
  24866. Rev. 2.0, 02/99, page 527 of 830
  24867.  
  24868. ----------------------- Page 542-----------------------
  24869.  
  24870. Serial Data Transmission (Synchronous Mode): Figure 15.19 shows a sample flowchart for
  24871. serial transmission.
  24872.  
  24873. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  24874.  
  24875. 1. SCI status check and transmit
  24876. Start of transmission
  24877. data write: Read SCSSR1 and
  24878. check that the TDRE flag is set to
  24879. 1, then write transmit data to
  24880. Read TDRE flag in SCSSR1
  24881. SCTDR1 and clear the TDRE flag
  24882. to 0.
  24883.  
  24884. No 2. To continue serial transmission,
  24885. TDRE = 1?
  24886. be sure to read 1 from the TDRE
  24887. flag to confirm that writing is
  24888. Yes possible, then write data to
  24889. SCTDR1, and then clear the
  24890. Write transmit data to SCTDR1 TDRE flag to 0. (Checking and
  24891. and clear TDRE flag clearing of the TDRE flag is
  24892. in SCSSR1 to 0 automatic when the direct
  24893. memory access controller
  24894. (DMAC) is activated by a
  24895. All data transmitted? No transmit-data-empty interrupt
  24896.  
  24897. (TXI) request, and data is written
  24898. to SCTDR1.)
  24899. Yes
  24900.  
  24901.  
  24902. Read TEND flag in SCSSR1
  24903.  
  24904. No
  24905. TEND = 1?
  24906.  
  24907. Yes
  24908.  
  24909. Clear TE bit in SCSCR1 to 0
  24910.  
  24911. End
  24912.  
  24913. Figure 15.19 Sample Serial Transmission Flowchart
  24914.  
  24915. Rev. 2.0, 02/99, page 528 of 830
  24916.  
  24917. ----------------------- Page 543-----------------------
  24918.  
  24919. In serial transmission, the SCI operates as described below.
  24920.  
  24921. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  24922. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  24923. SCTSR1.
  24924. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  24925. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI)
  24926. request is generated.
  24927. When clock output mode has been set, the SCI outputs 8 serial clock pulses. When use of an
  24928. external clock has been specified, data is output synchronized with the input clock.
  24929. The serial transmit data is sent from the TxD pin starting with the LSB (bit 0) and ending
  24930. with the MSB (bit 7).
  24931. 3. The SCI checks the TDRE flag at the timing for sending the MSB (bit 7).
  24932. If the TDRE flag is cleared to 0, data is transferred from SCTDR1 to SCTSR1, and serial
  24933. transmission of the next frame is started.
  24934. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the MSB (bit 7) is sent,
  24935. and the TxD pin maintains its state.
  24936. If the TEIE bit in SCSCR1 is set to 1 at this time, a transmit-end interrupt (TEI) request is
  24937. generated.
  24938. 4. After completion of serial transmission, the SCK pin is fixed high.
  24939.  
  24940. Figure 15.20 shows an example of SCI operation in transmission.
  24941.  
  24942. Rev. 2.0, 02/99, page 529 of 830
  24943.  
  24944. ----------------------- Page 544-----------------------
  24945.  
  24946. Transfer
  24947. direction
  24948.  
  24949. Serial clock
  24950.  
  24951. LSB MSB
  24952.  
  24953. Serial data Bit 0 Bit 1 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  24954.  
  24955. TDRE
  24956.  
  24957. TEND
  24958.  
  24959. Data written to SCTDR1 TXI interrupt TEI interrupt
  24960. and TDRE flag cleared to request request
  24961. TXI interrupt 0 in TXI interrupt handler
  24962.  
  24963. request One frame
  24964.  
  24965. Figure 15.20 Example of SCI Transmit Operation
  24966.  
  24967. Serial Data Reception (Synchronous Mode): Figure 15.21 shows a sample flowchart for serial
  24968. reception.
  24969.  
  24970. Use the following procedure for serial data reception after enabling the SCI for reception.
  24971.  
  24972. When changing the operating mode from asynchronous to synchronous, be sure to check that the
  24973. ORER, PER, and FER flags are all cleared to 0. The RDRF flag will not be set if the FER or PER
  24974. flag is set to 1, and neither transmit nor receive operations will be possible.
  24975.  
  24976. Rev. 2.0, 02/99, page 530 of 830
  24977.  
  24978. ----------------------- Page 545-----------------------
  24979.  
  24980. Start of reception 1. Receive error handling: If a
  24981. receive error occurs, read the
  24982. ORER flag in SCSSR1 , and
  24983. after performing the appropriate
  24984. Read ORER flag in SCSSR1
  24985. error handling, clear the ORER
  24986. flag to 0. Transfer cannot be
  24987. resumed if the ORER flag is set
  24988. Yes
  24989. ORER = 1? to 1.
  24990.  
  24991. 2. SCI status check and receive
  24992. No Error handling data read: Read SCSSR1 and
  24993. check that the RDRF flag is set
  24994. to 1, then read the receive data
  24995. Read RDRF flag in SCSSR1
  24996. in SCRDR1 and clear the RDRF
  24997. flag to 0. Transition of the RDRF
  24998. No flag from 0 to 1 can also be
  24999. RDRF = 1?
  25000. identified by an RXI interrupt.
  25001.  
  25002. Yes 3. Serial reception continuation
  25003. procedure: To continue serial
  25004. Read receive data in SCRDR1, reception, finish reading the
  25005. and clear RDRF flag RDRF flag, reading SCRDR1,
  25006. in SCSSR1 to 0 and clearing the RDRF flag to 0,
  25007. before the MSB (bit 7) of the
  25008. No current frame is received. (The
  25009. All data received? RDRF flag is cleared
  25010. automatically when the direct
  25011. Yes memory access controller
  25012. (DMAC) is activated by a
  25013. Clear RE bit in SCSCR1 to 0 receive-data-full interrupt (RXI)
  25014.  
  25015. request and the SCRDR1 value
  25016. End of reception is read.)
  25017.  
  25018. Figure 15.21 Sample Serial Reception Flowchart (1)
  25019.  
  25020. Rev. 2.0, 02/99, page 531 of 830
  25021.  
  25022. ----------------------- Page 546-----------------------
  25023.  
  25024. Error handling
  25025.  
  25026. No
  25027. ORER = 1?
  25028.  
  25029. Yes
  25030.  
  25031. Overrun error handling
  25032.  
  25033. Clear ORER flag in SCSSR1 to 0
  25034.  
  25035. End
  25036.  
  25037. Figure 15.21 Sample Serial Reception Flowchart (2)
  25038.  
  25039. In serial reception, the SCI operates as described below.
  25040.  
  25041. 1. The SCI performs internal initialization in synchronization with serial clock input or output.
  25042. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25043. After reception, the SCI checks whether the RDRF flag is 0, indicating that the receive data
  25044. can be transferred from SCRSR1 to SCRDR1.
  25045. If this check is passed, the RDRF flag is set to 1, and the receive data is stored in SCRDR1. If
  25046. a receive error is detected in the error check, the operation is as shown in table 15.11.
  25047. Neither transmit nor receive operations can be performed subsequently when a receive error
  25048. has been found in the error check.
  25049. Also, as the RDRF flag is not set to 1 when receiving, the flag must be cleared to 0.
  25050. 3. If the RIE bit in SCRSR1 is set to 1 when the RDRF flag changes to 1, a receive-data-full
  25051. interrupt (RXI) request is generated. If the RIE bit in SCRSR1 is set to 1 when the ORER flag
  25052. changes to 1, a receive-error interrupt (ERI) request is generated.
  25053.  
  25054. Figure 15.22 shows an example of SCI operation in reception.
  25055.  
  25056. Rev. 2.0, 02/99, page 532 of 830
  25057.  
  25058. ----------------------- Page 547-----------------------
  25059.  
  25060. Transfer
  25061. direction
  25062.  
  25063. Serial clock
  25064.  
  25065. Serial data Bit 7 Bit 0 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  25066.  
  25067. RDRF
  25068.  
  25069. ORER
  25070.  
  25071. RXI interrupt Data read from RXI interrupt ERI interrupt
  25072. request SCRDR1 and RDRF request request due to
  25073. flag cleared to 0 in RXI overrun error
  25074. interrupt handler
  25075.  
  25076. One frame
  25077.  
  25078. Figure 15.22 Example of SCI Receive Operation
  25079.  
  25080. Simultaneous Serial Data Transmission and Reception (Synchronous Mode): Figure 15.23
  25081. shows a sample flowchart for simultaneous serial transmit and receive operations.
  25082.  
  25083. Use the following procedure for simultaneous serial data transmit and receive operations after
  25084. enabling the SCI for transmission and reception.
  25085.  
  25086. Rev. 2.0, 02/99, page 533 of 830
  25087.  
  25088. ----------------------- Page 548-----------------------
  25089.  
  25090. 1. SCI status check and transmit data
  25091. Start of transmission/reception
  25092. write:
  25093. Read SCSSR1 and check that the
  25094. TDRE flag is set to 1, then write
  25095. transmit data to SCTDR1 and clear
  25096. Read TDRE flag in SCSSR1
  25097. the TDRE flag to 0. Transition of the
  25098. TDRE flag from 0 to 1 can also be
  25099. No identified by a TXI interrupt.
  25100. TDRE = 1?
  25101. 2. Receive error handling:
  25102. Yes If a receive error occurs, read the
  25103. ORER flag in SCSSR1 , and after
  25104. Write transmit data performing the appropriate error
  25105. to SCTDR1 and clear TDRE flag handling, clear the ORER flag to 0.
  25106. in SCSSR1 to 0 Transmission/reception cannot be
  25107. resumed if the ORER flag is set to 1.
  25108.  
  25109. 3. SCI status check and receive data
  25110. read:
  25111. Read ORER flag in SCSSR1 Read SCSSR1 and check that the
  25112.  
  25113. RDRF flag is set to 1, then read the
  25114. Yes receive data in SCRDR1 and clear the
  25115. ORER = 1? RDRF flag to 0. Transition of the
  25116. RDRF flag from 0 to 1 can also be
  25117. No Error handling identified by an RXI interrupt.
  25118.  
  25119. 4. Serial transmission/reception
  25120. Read RDRF flag in SCSSR1 continuation procedure:
  25121. To continue serial transmission/
  25122. No reception, finish reading the RDRF
  25123. RDRF = 1? flag, reading SCRDR1, and clearing
  25124. the RDRF flag to 0, before the MSB
  25125. Yes (bit 7) of the current frame is received.
  25126. Also, before the MSB (bit 7) of the
  25127. Read receive data in SCRDR1, current frame is transmitted, read 1
  25128. and clear RDRF flag from the TDRE flag to confirm that
  25129. in SCSSR1 to 0 writing is possible, then write data to
  25130. SCTDR1 and clear the TDRE flag to
  25131. 0.
  25132. No
  25133. All data transferred? (Checking and clearing of the TDRE
  25134. flag is automatic when the DMAC is
  25135. Yes activated by a transmit-data-empty
  25136. interrupt (TXI) request, and data is
  25137. Clear TE and RE bits written to SCTDR1. Similarly, the
  25138. in SCRSR1 to 0 RDRF flag is cleared automatically
  25139. when the DMAC is activated by a
  25140. receive-data-full interrupt (RXI)
  25141. End of transmission/reception request and the SCRDR1 value is
  25142. read.)
  25143.  
  25144. Note: When switching from transmit or receive operation to simultaneous transmit and receive
  25145. operations, first clear the TE bit and RE bit to 0, then set both these bits to 1.
  25146.  
  25147. Figure 15.23 Sample Flowchart for Serial Data Transmission and Reception
  25148.  
  25149. Rev. 2.0, 02/99, page 534 of 830
  25150.  
  25151. ----------------------- Page 549-----------------------
  25152.  
  25153. 15.4 SCI Interrupt Sources and DMAC
  25154.  
  25155. The SCI has four interrupt sources: the transmit-end interrupt (TEI) request, receive-error
  25156. interrupt (ERI) request, receive-data-full interrupt (RXI) request, and transmit-data-empty
  25157. interrupt (TXI) request.
  25158.  
  25159. Table 15.12 shows the interrupt sources and their relative priorities. Individual interrupt sources
  25160. can be enabled or disabled with the TIE, RIE, and TEIE bits in SCRSR1, and the EIO bit in
  25161. SCSPTR1. Each kind of interrupt request is sent to the interrupt controller independently.
  25162.  
  25163. When the TDRE flag in the serial status register (SCSSR1) is set to 1, a TDR-empty request is
  25164. generated separately from the interrupt request. A TDR-empty request can activate the direct
  25165. memory access controller (DMAC) to perform data transfer. The TDRE flag is cleared to 0
  25166. automatically when a write to the transmit data register (SCTDR1) is performed by the DMAC.
  25167.  
  25168. When the RDRF flag in SCSSR1 is set to 1, an RDR-full request is generated separately from the
  25169. interrupt request. An RDR-full request can activate the DMAC to perform data transfer.
  25170.  
  25171. The RDRF flag is cleared to 0 automatically when a receive data register (SCRDR1) read is
  25172. performed by the DMAC.
  25173.  
  25174. When the ORER, FER, or PER flag in SCSSR1 is set to 1, an ERI interrupt request is generated.
  25175. The DMAC cannot be activated by an ERI interrupt request. When receive data processing is to
  25176. be carried out by the DMAC and receive error handling is to be performed by means of an
  25177. interrupt to the CPU, set the RIE bit to 1 and also set the EIO bit in SCSPTR1 to 1 so that an
  25178. interrupt error occurs only for a receive error. If the EIO bit is cleared to 0, interrupts to the CPU
  25179. will be generated even during normal data reception.
  25180.  
  25181. When the TEND flag in SCSSR1 is set to 1, a TEI interrupt request is generated. The DMAC
  25182. cannot be activated by a TEI interrupt request.
  25183.  
  25184. A TXI interrupt indicates that transmit data can be written, and a TEI interrupt indicates that the
  25185. transmit operation has ended.
  25186.  
  25187. Table 15.12 SCI Interrupt Sources
  25188.  
  25189. Interrupt DMAC Priority on
  25190. Source Description Activation Reset Release
  25191.  
  25192. ERI Receive error (ORER, FER, or PER) Not possible High
  25193.  
  25194. RXI Receive data register full (RDRF) Possible ↑
  25195.  
  25196. TXI Transmit data register empty (TDRE) Possible ↓
  25197.  
  25198. TEI Transmit end (TEND) Not possible Low
  25199.  
  25200. See section 5, Exceptions, for the priority order and relation to non-SCI interrupts.
  25201.  
  25202. Rev. 2.0, 02/99, page 535 of 830
  25203.  
  25204. ----------------------- Page 550-----------------------
  25205.  
  25206. 15.5 Usage Notes
  25207.  
  25208. The following points should be noted when using the SCI.
  25209.  
  25210. SCTDR1 Writing and the TDRE Flag: The TDRE flag in SCSSR1 is a status flag that
  25211. indicates that transmit data has been transferred from SCTDR1 to SCTSR1. When the SCI
  25212. transfers data from SCTDR1 to SCTSR1, the TDRE flag is set to 1.
  25213.  
  25214. Data can be written to SCTDR1 regardless of the state of the TDRE flag. However, if new data is
  25215. written to SCTDR1 when the TDRE flag is cleared to 0, the data stored in SCTDR1 will be lost
  25216. since it has not yet been transferred to SCTSR1. It is therefore essential to check that the TDRE
  25217. flag is set to 1 before writing transmit data to SCTDR1.
  25218.  
  25219. Simultaneous Multiple Receive Errors: If a number of receive errors occur at the same time,
  25220. the state of the status flags in SCSSR1 is as shown in table 15.13. If there is an overrun error,
  25221. data is not transferred from SCRSR1 to SCRDR1, and the receive data is lost.
  25222.  
  25223. Table 15.13 SCSSR1 Status Flags and Transfer of Receive Data
  25224.  
  25225. SCSSR1 Status Flags Receive Data
  25226. Transfer
  25227. SCRSR1 →→ SCRDR1
  25228.  
  25229. Receive Errors RDRF ORER FER PER
  25230.  
  25231. Overrun error 1 1 0 0 X
  25232.  
  25233. Framing error 0 0 1 0 O
  25234.  
  25235. Parity error 0 0 0 1 O
  25236.  
  25237. Overrun error + framing error 1 1 1 0 X
  25238.  
  25239. Overrun error + parity error 1 1 0 1 X
  25240.  
  25241. Framing error + parity error 0 0 1 1 O
  25242.  
  25243. Overrun error + framing error + 1 1 1 1 X
  25244. parity error
  25245.  
  25246. O: Receive data is transferred from SCRSR1 to SCRDR1.
  25247. X: Receive data is not transferred from SCRSR1 to SCRDR1.
  25248.  
  25249. Break Detection and Processing: Break signals can be detected by reading the RxD pin directly
  25250. when a framing error (FER) is detected. In the break state the input from the RxD pin consists of
  25251. all 0s, so the FER flag is set and the parity error flag (PER) may also be set. Note that the SCI
  25252. receiver continues to operate in the break state, so if the FER flag is cleared to 0 it will be set to 1
  25253. again.
  25254.  
  25255. Rev. 2.0, 02/99, page 536 of 830
  25256.  
  25257. ----------------------- Page 551-----------------------
  25258.  
  25259. Sending a Break Signal: The input/output condition and level of the TxD pin are determined by
  25260. bits SPB0IO and SPB0DT in the serial port register (SCSPTR1). This feature can be used to send
  25261. a break signal.
  25262.  
  25263. After the serial transmitter is initialized, the TxD pin function is not selected and the value of the
  25264. SPB0DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  25265. enabled). The SPB0IO and SPB0DT bits should therefore be set to 1 (designating output and
  25266. high level) beforehand.
  25267.  
  25268. To send a break signal during serial transmission, clear the SPB0DT bit to 0 (designating low
  25269. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  25270. transmitter is initialized regardless of its current state, and the TxD pin becomes an output port
  25271. outputting the value 0.
  25272.  
  25273. Receive Error Flags and Transmit Operations (Synchronous Mode Only): Transmission
  25274. cannot be started when a receive error flag (ORER, PER, or FER) is set to 1, even if the TDRE
  25275. flag is set to 1. Be sure to clear the receive error flags to 0 before starting transmission.
  25276.  
  25277. Note also that the receive error flags are not cleared to 0 by clearing the RE bit to 0.
  25278.  
  25279. Receive Data Sampling Timing and Receive Margin in Asynchronous Mode: The SCI
  25280. operates on a base clock with a frequency of 16 times the bit rate. In reception, the SCI
  25281. synchronizes internally with the fall of the start bit, which it samples on the base clock. Receive
  25282. data is latched at the rising edge of the eighth base clock pulse. The timing is shown in figure
  25283. 15.24.
  25284.  
  25285. Rev. 2.0, 02/99, page 537 of 830
  25286.  
  25287. ----------------------- Page 552-----------------------
  25288.  
  25289. 16 clocks
  25290.  
  25291. 8 clocks
  25292.  
  25293. 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
  25294.  
  25295. Base clock
  25296.  
  25297. –7.5 clocks +7.5 clocks
  25298.  
  25299. Receive data Start bit D0 D1
  25300. (RxD)
  25301.  
  25302. Synchronization
  25303. sampling timing
  25304.  
  25305. Data sampling
  25306. timing
  25307.  
  25308. Figure 15.24 Receive Data Sampling Timing in Asynchronous Mode
  25309.  
  25310. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  25311.  
  25312. M = (0.5 – 1 ) – (L – 0.5) F – | D – 0.5 | (1 + F) × 100% ................ (1)
  25313. 2N N
  25314.  
  25315. M: Receive margin (%)
  25316. N: Ratio of clock frequency to bit rate (N = 16)
  25317. D: Clock duty cycle (D = 0 to 1.0)
  25318. L: Frame length (L = 9 to 12)
  25319. F: Absolute deviation of clock frequency
  25320.  
  25321. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation (2).
  25322.  
  25323. When D = 0.5 and F = 0:
  25324.  
  25325. M = (0.5 – 1/(2 × 16)) × 100% = 46.875% ........................................ (2)
  25326.  
  25327. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  25328.  
  25329. Rev. 2.0, 02/99, page 538 of 830
  25330.  
  25331. ----------------------- Page 553-----------------------
  25332.  
  25333. When Using the DMAC: When an external clock source is used as the serial clock, the transmit
  25334. clock should not be input until at least 5 peripheral operating clock cycles after SCTDR1 is
  25335. updated by the DMAC. Incorrect operation may result if the transmit clock is input within 4
  25336. cycles after SCTDR1 is updated. (See figure 15.25)
  25337.  
  25338. SCK
  25339. t
  25340.  
  25341. TDRE
  25342.  
  25343. TxD D0 D1 D2 D3 D4 D5 D6 D7
  25344.  
  25345. Note: When operating on an external clock, set t > 4.
  25346.  
  25347. Figure 15.25 Example of Synchronous Transmission by DMAC
  25348.  
  25349. When SCRDR1 is read by the DMAC, be sure to set the SCI receive-data-full interrupt (RXI) as
  25350. the activation source with bits RS3 to RS0 in CHCR.
  25351.  
  25352. When Using Synchronous External Clock Mode:
  25353. • Do not set TE or RE to 1 until at least 4 peripheral operating clock cycles after external clock
  25354. SCK has changed from 0 to 1.
  25355. • Only set both TE and RE to 1 when external clock SCK is 1.
  25356. • In reception, note that if RE is cleared to 0 from 2.5 to 3.5 peripheral operating clock cycles
  25357. after the rising edge of the RxD D7 bit SCK input, RDRF will be set to 1 but copying to
  25358. SCRDR1 will not be possible.
  25359.  
  25360. When Using Synchronous Internal Clock Mode: In reception, note that if RE is cleared to zero
  25361. 1.5 peripheral operating clock cycles after the rising edge of the RxD D7 bit SCK output, RDRF
  25362. will be set to 1 but copying to SCRDR1 will not be possible.
  25363.  
  25364. Rev. 2.0, 02/99, page 539 of 830
  25365.  
  25366. ----------------------- Page 554-----------------------
  25367.  
  25368. Rev. 2.0, 02/99, page 540 of 830
  25369.  
  25370. ----------------------- Page 555-----------------------
  25371.  
  25372. Section 16 Serial Communication Interface with FIFO
  25373. (SCIF)
  25374.  
  25375. 16.1 Overview
  25376.  
  25377. The SH7750 is equipped with a single-channel serial communication interface with built-in
  25378. FIFO buffers (Serial Communication Interface with FIFO: SCIF). The SCIF can perform
  25379. asynchronous serial communication.
  25380.  
  25381. Sixteen-stage FIFO registers are provided for both transmission and reception, enabling fast,
  25382. efficient, and continuous communication.
  25383.  
  25384. 16.1.1 Features
  25385.  
  25386. SCIF features are listed below.
  25387.  
  25388. • Asynchronous serial communication
  25389. Serial data communication is executed using an asynchronous system in which
  25390. synchronization is achieved character by character. Serial data communication can be carried
  25391. out with standard asynchronous communication chips such as a Universal Asynchronous
  25392. Receiver/Transmitter (UART) or Asynchronous Communication Interface Adapter (ACIA).
  25393. There is a choice of 8 serial data transfer formats.
  25394.  Data length: 7 or 8 bits
  25395.  Stop bit length: 1 or 2 bits
  25396.  Parity: Even/odd/none
  25397.  Receive error detection: Parity, framing, and overrun errors
  25398.  Break detection: If the receive data following that in which a framing error occurred is
  25399. also at the space “0” level, and there is a frame error, a break is detected. When a framing
  25400. error occurs, a break can also be detected by reading the RxD2 pin level directly from the
  25401. serial port register (SCSPTR2).
  25402. • Full-duplex communication capability
  25403. The transmitter and receiver are independent units, enabling transmission and reception to be
  25404. performed simultaneously.
  25405. The transmitter and receiver both have a 16-stage FIFO buffer structure, enabling fast and
  25406. continuous serial data transmission and reception.
  25407. • On-chip baud rate generator allows any bit rate to be selected.
  25408. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  25409. SCK2 pin
  25410.  
  25411. Rev. 2.0, 02/99, page 541 of 830
  25412.  
  25413. ----------------------- Page 556-----------------------
  25414.  
  25415. • Four interrupt sources
  25416. There are four interrupt sources—transmit-FIFO-data-empty, break, receive-FIFO-data-full,
  25417. and receive-error—that can issue requests independently.
  25418. • The DMA controller (DMAC) can be activated to execute a data transfer by issuing a DMA
  25419. transfer request in the event of a transmit-FIFO-data-empty or receive-FIFO-data-full
  25420. interrupt.
  25421. • When not in use, the SCIF can be stopped by halting its clock supply to reduce power
  25422. consumption.
  25423. • Modem control functions (576 and &76) are provided.
  25424. • The amount of data in the transmit/receive FIFO registers, and the number of receive errors
  25425. in the receive data in the receive FIFO register, can be ascertained.
  25426. • A timeout error (DR) can be detected during reception.
  25427.  
  25428. Rev. 2.0, 02/99, page 542 of 830
  25429.  
  25430. ----------------------- Page 557-----------------------
  25431.  
  25432. 16.1.2 Block Diagram
  25433.  
  25434. Figure 16.1 shows a block diagram of the SCIF.
  25435.  
  25436. e
  25437. c Internal
  25438. a
  25439. Module data bus f data bus
  25440. r
  25441. e
  25442. t
  25443. n
  25444. i
  25445.  
  25446. s
  25447. u
  25448. B
  25449.  
  25450. SCFRDR2 SCFTDR2 SCSMR2 SCBRR2
  25451. (16-stage) (16-stage) SCLSR2
  25452.  
  25453. SCFDR2
  25454. SCFCR2
  25455. RxD2 SCRSR2 SCTSR2
  25456. SCFSR2 Baud rate Pφ/4
  25457. SCSCR2 generator
  25458.  
  25459. SCSPTR2 Pφ/16
  25460.  
  25461. Transmission/
  25462. reception Pφ/64
  25463. control
  25464. TxD2
  25465. Parity generation Clock
  25466.  
  25467. Parity check
  25468.  
  25469. External clock
  25470. SCK2
  25471. TXI
  25472. CTS2 RXI
  25473. ERI
  25474. RTS2 BRI
  25475.  
  25476. SCIF
  25477.  
  25478. SCRSR2: Receive shift register SCFSR2: Serial status register
  25479. SCFRDR2: Receive FIFO data register SCBRR2: Bit rate register
  25480. SCTSR2: Transmit shift register SCSPTR2: Serial port register
  25481. SCFTDR2: Transmit FIFO data register SCFCR2: FIFO control register
  25482. SCSMR2: Serial mode register SCFDR2: FIFO data count register
  25483. SCSCR2: Serial control register SCLSR2: Line status register
  25484.  
  25485. Figure 16.1 Block Diagram of SCIF
  25486.  
  25487. Rev. 2.0, 02/99, page 543 of 830
  25488.  
  25489. ----------------------- Page 558-----------------------
  25490.  
  25491. 16.1.3 Pin Configuration
  25492.  
  25493. Table 16.1 shows the SCIF pin configuration.
  25494.  
  25495. Table 16.1 SCIF Pins
  25496.  
  25497. Pin Name Abbreviation I/O Function
  25498.  
  25499. Serial clock pin MRESET/SCK2 Input Clock input
  25500.  
  25501. Receive data pin MD2/RxD2 Input Receive data input
  25502.  
  25503. Transmit data pin MD1/TxD2 Output Transmit data output
  25504.  
  25505. Modem control pin &76 I/O Transmission enabled
  25506.  
  25507. Modem control pin MD8/576 I/O Transmission request
  25508.  
  25509. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset
  25510. is executed. The MD1/TxD2, MD2/RxD2, and MD8/576 pins function as the MD1, MD2,
  25511. and MD8 mode input pins after a power-on reset. These pins are made to function as
  25512. serial pins by performing SCIF operation settings with the TE and RE bits in SCSCR2 and
  25513. the MCE bit in SCFCR2. Break state transmission and detection can be set in the SCIF’s
  25514. SCSPTR2 register.
  25515.  
  25516. Rev. 2.0, 02/99, page 544 of 830
  25517.  
  25518. ----------------------- Page 559-----------------------
  25519.  
  25520. 16.1.4 Register Configuration
  25521.  
  25522. The SCIF has the internal registers shown in table 16.2. These registers are used to specify the
  25523. data format and bit rate, and to perform transmitter/receiver control.
  25524.  
  25525. Table 16.2 SCIF Registers
  25526.  
  25527. Abbrevia- Initial P4 Area 7 Access
  25528. Name tion R/W Value Address Address Size
  25529.  
  25530. Serial mode register SCSMR2 R/W H'0000 H'FFE80000 H'IFE80000 16
  25531.  
  25532. Bit rate register SCBRR2 R/W H'FF H'FFE80004 H'IFE80004 8
  25533.  
  25534. Serial control register SCSCR2 R/W H'0000 H'FFE80008 H'IFE80008 16
  25535.  
  25536. Transmit FIFO data register SCFTDR2 W Undefined H'FFE8000C H'IFE8000C 8
  25537. Serial status register SCFSR2 R/(W)*1 H'0060 H'FFE80010 H'IFE80010 16
  25538.  
  25539. Receive FIFO data register SCFRDR2 R Undefined H'FFE80014 H'IFE80014 8
  25540.  
  25541. FIFO control register SCFCR2 R/W H'0000 H'FFE80018 H'IFE80018 16
  25542.  
  25543. FIFO data count register SCFDR2 R H'0000 H'FFE8001C H'IFE8001C 16
  25544. Serial port register SCSPTR2 R/W H'0000*2 H'FFE80020 H'IFE80020 16
  25545.  
  25546. Line status register SCLSR2 R/(W)*3 H'0000 H'FFE80024 H'IFE80024 16
  25547.  
  25548. Notes: 1. Only 0 can be written, to clear flags. Bits 15 to 8, 3, and 2 are read-only, and cannot
  25549. be modified.
  25550. 2. The value of bits 6, 4, and 0 is undefined.
  25551. 3. Only 0 can be written, to clear flags. Bits 15 to 1 are read-only, and cannot be
  25552. modified.
  25553.  
  25554. Rev. 2.0, 02/99, page 545 of 830
  25555.  
  25556. ----------------------- Page 560-----------------------
  25557.  
  25558. 16.2 Register Descriptions
  25559.  
  25560. 16.2.1 Receive Shift Register (SCRSR2)
  25561.  
  25562. Bit: 7 6 5 4 3 2 1 0
  25563.  
  25564. R/W: — — — — — — — —
  25565.  
  25566. SCRSR2 is the register used to receive serial data.
  25567.  
  25568. The SCIF sets serial data input from the RxD2 pin in SCRSR2 in the order received, starting
  25569. with the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it
  25570. is transferred to the receive FIFO register, SCFRDR2, automatically.
  25571.  
  25572. SCRSR2 cannot be directly read or written to by the CPU.
  25573.  
  25574. 16.2.2 Receive FIFO Data Register (SCFRDR2)
  25575.  
  25576. Bit: 7 6 5 4 3 2 1 0
  25577.  
  25578. R/W: R R R R R R R R
  25579.  
  25580. SCFRDR2 is a 16-stage FIFO register that stores received serial data.
  25581.  
  25582. When the SCIF has received one byte of serial data, it transfers the received data from SCRSR2
  25583. to SCFRDR2 where it is stored, and completes the receive operation. SCRSR2 is then enabled
  25584. for reception, and consecutive receive operations can be performed until the receive FIFO
  25585. register is full (16 data bytes).
  25586.  
  25587. SCFRDR2 is a read-only register, and cannot be written to by the CPU.
  25588.  
  25589. If a read is performed when there is no receive data in the receive FIFO register, an undefined
  25590. value will be returned. When the receive FIFO register is full of receive data, subsequent serial
  25591. data is lost.
  25592.  
  25593. The contents of SCFRDR2 are undefined after a power-on reset or manual reset.
  25594.  
  25595. Rev. 2.0, 02/99, page 546 of 830
  25596.  
  25597. ----------------------- Page 561-----------------------
  25598.  
  25599. 16.2.3 Transmit Shift Register (SCTSR2)
  25600.  
  25601. Bit: 7 6 5 4 3 2 1 0
  25602.  
  25603. R/W: — — — — — — — —
  25604.  
  25605. SCTSR2 is the register used to transmit serial data.
  25606.  
  25607. To perform serial data transmission, the SCIF first transfers transmit data from SCFTDR2 to
  25608. SCTSR2, then sends the data to the TxD2 pin starting with the LSB (bit 0).
  25609.  
  25610. When transmission of one byte is completed, the next transmit data is transferred from
  25611. SCFTDR2 to SCTSR2, and transmission started, automatically.
  25612.  
  25613. SCTSR2 cannot be directly read or written to by the CPU.
  25614.  
  25615. 16.2.4 Transmit FIFO Data Register (SCFTDR2)
  25616.  
  25617. Bit: 7 6 5 4 3 2 1 0
  25618.  
  25619. R/W: W W W W W W W W
  25620.  
  25621. SCFTDR2 is a 16-stage FIFO register that stores data for serial transmission.
  25622.  
  25623. If SCTSR2 is empty when transmit data has been written to SCFTDR2, the SCIF transfers the
  25624. transmit data written in SCFTDR2 to SCTSR2 and starts serial transmission.
  25625.  
  25626. SCFTDR2 is a write-only register, and cannot be read by the CPU.
  25627.  
  25628. The next data cannot be written when SCFTDR2 is filled with 16 bytes of transmit data. Data
  25629. written in this case is ignored.
  25630.  
  25631. The contents of SCFTDR2 are undefined after a power-on reset or manual reset.
  25632.  
  25633. Rev. 2.0, 02/99, page 547 of 830
  25634.  
  25635. ----------------------- Page 562-----------------------
  25636.  
  25637. 16.2.5 Serial Mode Register (SCSMR2)
  25638.  
  25639. Bit: 15 14 13 12 11 10 9 8
  25640.  
  25641. — — — — — — — —
  25642.  
  25643. Initial value: 0 0 0 0 0 0 0 0
  25644.  
  25645. R/W: R R R R R R R R
  25646.  
  25647. Bit: 7 6 5 4 3 2 1 0
  25648.  
  25649. — CHR PE O/( STOP — CKS1 CKS0
  25650.  
  25651. Initial value: 0 0 0 0 0 0 0 0
  25652.  
  25653. R/W: R R/W R/W R/W R/W R R/W R/W
  25654.  
  25655. SCSMR2 is a 16-bit register used to set the SCIF’s serial transfer format and select the baud rate
  25656. generator clock source.
  25657.  
  25658. SCSMR2 can be read or written to by the CPU at all times.
  25659.  
  25660. SCSMR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  25661. standby mode or in the module standby state.
  25662.  
  25663. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  25664.  
  25665. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the asynchronous mode data length.
  25666.  
  25667. Bit 6: CHR Description
  25668.  
  25669. 0 8-bit data (Initial value)
  25670.  
  25671. 1 7-bit data*
  25672.  
  25673. Note: * When 7-bit data is selected, the MSB (bit 7) of SCFTDR2 is not transmitted.
  25674.  
  25675. Bit 5—Parity Enable (PE): Selects whether or not parity bit addition is performed in
  25676. transmission, and parity bit checking in reception.
  25677.  
  25678. Bit 5: PE Description
  25679.  
  25680. 0 Parity bit addition and checking disabled (Initial value)
  25681.  
  25682. 1 Parity bit addition and checking enabled*
  25683.  
  25684. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/( bit is added to
  25685. transmit data before transmission. In reception, the parity bit is checked for the parity
  25686. (even or odd) specified by the O/( bit.
  25687.  
  25688. Rev. 2.0, 02/99, page 548 of 830
  25689.  
  25690. ----------------------- Page 563-----------------------
  25691.  
  25692. Bit 4—Parity Mode (O/(): Selects either even or odd parity for use in parity addition and
  25693. (
  25694. checking. The O/( bit setting is only valid when the PE bit is set to 1, enabling parity bit
  25695. addition and checking. The O/( bit setting is invalid when parity addition and checking is
  25696. disabled.
  25697.  
  25698. Bit 4: O/( Description
  25699. (
  25700. 0 Even parity*1 (Initial value)
  25701.  
  25702. 2
  25703. 1 Odd parity*
  25704.  
  25705. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the
  25706. total number of 1-bits in the transmit character plus the parity bit is even. In reception,
  25707. a check is performed to see if the total number of 1-bits in the receive character plus
  25708. the parity bit is even.
  25709. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  25710. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  25711. check is performed to see if the total number of 1-bits in the receive character plus the
  25712. parity bit is odd.
  25713.  
  25714. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length.
  25715.  
  25716. Bit 3: STOP Description
  25717. 0 1 stop bit*1 (Initial value)
  25718.  
  25719. 2
  25720. 1 2 stop bits*
  25721.  
  25722. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  25723. before it is sent.
  25724. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  25725. before it is sent.
  25726.  
  25727. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  25728. 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
  25729. character.
  25730.  
  25731. Bit 2—Reserved: This bit is always read as 0, and should only be written with 0.
  25732.  
  25733. Rev. 2.0, 02/99, page 549 of 830
  25734.  
  25735. ----------------------- Page 564-----------------------
  25736.  
  25737. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source for the
  25738. on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and Pφ/64,
  25739. according to the setting of bits CKS1 and CKS0.
  25740.  
  25741. For the relation between the clock source, the bit rate register setting, and the baud rate, see
  25742. section 16.2.8, Bit Rate Register (SCBRR2).
  25743.  
  25744. Bit 1: CKS1 Bit 0: CKS0 Description
  25745.  
  25746. 0 0 Pφ clock (Initial value)
  25747.  
  25748. 1 Pφ/4 clock
  25749.  
  25750. 1 0 Pφ/16 clock
  25751.  
  25752. 1 Pφ/64 clock
  25753.  
  25754. Note: Pφ: Peripheral clock
  25755.  
  25756. 16.2.6 Serial Control Register (SCSCR2)
  25757.  
  25758. Bit: 15 14 13 12 11 10 9 8
  25759.  
  25760. — — — — — — — —
  25761.  
  25762. Initial value: 0 0 0 0 0 0 0 0
  25763.  
  25764. R/W: R R R R R R R R
  25765.  
  25766. Bit: 7 6 5 4 3 2 1 0
  25767.  
  25768. TIE RIE TE RE REIE — CKE1 —
  25769.  
  25770. Initial value: 0 0 0 0 0 0 0 0
  25771.  
  25772. R/W: R/W R/W R/W R/W R/W R R/W R
  25773.  
  25774. The SCSCR2 register performs enabling or disabling of SCIF transfer operations, and interrupt
  25775. requests, and selection of the serial clock source.
  25776.  
  25777. SCSCR2 can be read or written to by the CPU at all times.
  25778.  
  25779. SCSCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  25780. standby mode or in the module standby state.
  25781.  
  25782. Bits 15 to 8, 2, and 0—Reserved: These bits are always read as 0, and should only be written
  25783. with 0.
  25784.  
  25785. Rev. 2.0, 02/99, page 550 of 830
  25786.  
  25787. ----------------------- Page 565-----------------------
  25788.  
  25789. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-FIFO-data-empty
  25790. interrupt (TXI) request generation when serial transmit data is transferred from SCFTDR2 to
  25791. SCTSR2, the number of data bytes in the transmit FIFO register falls to or below the transmit
  25792. trigger set number, and the TDFE flag in the serial status register (SCFSR2) is set to 1.
  25793.  
  25794. Bit 7: TIE Description
  25795.  
  25796. 0 Transmit-FIFO-data-empty interrupt (TXI) request disabled* (Initial value)
  25797.  
  25798. 1 Transmit-FIFO-data-empty interrupt (TXI) request enabled
  25799.  
  25800. Note: * TXI interrupt requests can be cleared by writing transmit data exceeding the transmit
  25801. trigger set number to SCFTDR2, reading 1 from the TDFE flag, then clearing it to 0, or by
  25802. clearing the TIE bit to 0.
  25803.  
  25804. Bit 6—Receive Interrupt Enable (RIE): Enables or disables generation of a receive-data-full
  25805. interrupt (RXI) request when the RDF flag or DR flag in SCFSR2 is set to 1, a receive-error
  25806. interrupt (ERI) request when the ER flag in SCFSR2 is set to 1, and a break interrupt (BRI)
  25807. request when the BRK flag in SCFSR2 or the ORER flag in SCLSR2 is set to 1.
  25808.  
  25809. Bit 6: RIE Description
  25810.  
  25811. 0 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  25812. request, and break interrupt (BRI) request disabled* (Initial value)
  25813.  
  25814. 1 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  25815. request, and break interrupt (BRI) request enabled
  25816.  
  25817. Note: * An RXI interrupt request can be cleared by reading 1 from the RDF or DR flag, then
  25818. clearing the flag to 0, or by clearing the RIE bit to 0. ERI and BRI interrupt requests can be
  25819. cleared by reading 1 from the ER, BRK, or ORER flag, then clearing the flag to 0, or by
  25820. clearing the RIE and REIE bits to 0.
  25821.  
  25822. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the SCIF.
  25823.  
  25824. Bit 5: TE Description
  25825.  
  25826. 0 Transmission disabled (Initial value)
  25827.  
  25828. 1 Transmission enabled*
  25829.  
  25830. Note: * Serial transmission is started when transmit data is written to SCFTDR2 in this state.
  25831. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be
  25832. made, the transmission format decided, and the transmit FIFO reset, before the TE bit is
  25833. set to 1.
  25834.  
  25835. Rev. 2.0, 02/99, page 551 of 830
  25836.  
  25837. ----------------------- Page 566-----------------------
  25838.  
  25839. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCIF.
  25840.  
  25841. Bit 4: RE Description
  25842. 0 Reception disabled*1 (Initial value)
  25843.  
  25844. 2
  25845. 1 Reception enabled*
  25846.  
  25847. Notes: 1. Clearing the RE bit to 0 does not affect the DR, ER, BRK, RDF, FER, PER, and ORER
  25848. flags, which retain their states.
  25849. 2. Serial transmission is started when a start bit is detected in this state.
  25850. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be
  25851. made, the reception format decided, and the receive FIFO reset, before the RE bit is
  25852. set to 1.
  25853.  
  25854. Bit 3—Receive Error Interrupt Enable (REIE): Enables or disables generation of receive-
  25855. error interrupt (ERI) and break interrupt (BRI) requests. The REIE bit setting is valid only when
  25856. the RIE bit is 0.
  25857.  
  25858. Bit 3: REIE Description
  25859.  
  25860. 0 Receive-error interrupt (ERI) and break interrupt (BRI) requests disabled*
  25861. (Initial value)
  25862.  
  25863. 1 Receive-error interrupt (ERI) and break interrupt (BRI) requests enabled
  25864.  
  25865. Note: * Receive-error interrupt (ERI) and break interrupt (BRI) requests can be cleared by reading
  25866. 1 from the ER, BRK, or ORER flag, then clearing the flag to 0, or by clearing the RIE and
  25867. REIE bits to 0. When REIE is set to 1, ERI and BRI interrupt requests will be generated
  25868. even if RIE is cleared to 0. In DMAC transfer, this setting is made if the interrupt controller
  25869. is to be notified of ERI and BRI interrupt requests.
  25870.  
  25871. Bit 1—Clock Enable 1 (CKE1): Selects the SCIF clock source. The CKE1 bit must be set
  25872. before determining the SCIF’s operating mode with SCSMR2.
  25873.  
  25874. Bit 1: CKE1 Description
  25875. 0 Internal clock/SCK2 pin functions as input pin (input signal ignored)*1
  25876.  
  25877. 2
  25878. 1 External clock/SCK2 pin functions as clock input*
  25879.  
  25880. Notes: 1. Initial value
  25881. 2. Inputs a clock with a frequency 16 times the bit rate.
  25882.  
  25883. Rev. 2.0, 02/99, page 552 of 830
  25884.  
  25885. ----------------------- Page 567-----------------------
  25886.  
  25887. 16.2.7 Serial Status Register (SCFSR2)
  25888.  
  25889. Bit: 15 14 13 12 11 10 9 8
  25890.  
  25891. PER3 PER2 PER1 PER0 FER3 FER2 FER1 FER0
  25892.  
  25893. Initial value: 0 0 0 0 0 0 0 0
  25894.  
  25895. R/W: R R R R R R R R
  25896.  
  25897. Bit: 7 6 5 4 3 2 1 0
  25898.  
  25899. ER TEND TDFE BRK FER PER RDF DR
  25900.  
  25901. Initial value: 0 1 1 0 0 0 0 0
  25902.  
  25903. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R R R/(W)* R/(W)*
  25904.  
  25905. Note: * Only 0 can be written, to clear the flag.
  25906.  
  25907. SCFSR2 is a 16-bit register. The lower 8 bits consist of status flags that indicate the operating
  25908. status of the SCIF, and the upper 8 bits indicate the number of receive errors in the data in the
  25909. receive FIFO register.
  25910.  
  25911. SCFSR2 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  25912. ER, TEND, TDFE, BRK, RDF, and DR. Also note that in order to clear these flags they must be
  25913. read as 1 beforehand. The FER flag and PER flag are read-only flags and cannot be modified.
  25914.  
  25915. SCFSR2 is initialized to H'0060 by a power-on reset or manual reset. It is not initialized in
  25916. standby mode or in the module standby state.
  25917.  
  25918. Bits 15 to 12—Number of Parity Errors (PER3–PER0): These bits indicate the number of
  25919. data bytes in which a parity error occurred in the receive data stored in SCFRDR2.
  25920.  
  25921. After the ER bit in SCFSR2 is set, the value indicated by bits 15 to 12 is the number of data
  25922. bytes in which a parity error occurred.
  25923.  
  25924. If all 16 bytes of receive data in SCFRDR2 have parity errors, the value indicated by bits PER3
  25925. to PER0 will be 0.
  25926.  
  25927. Bits 11 to 8—Number of Framing Errors (FER3–FER0): These bits indicate the number of
  25928. data bytes in which a framing error occurred in the receive data stored in SCFRDR2.
  25929.  
  25930. After the ER bit in SCFSR2 is set, the value indicated by bits 11 to 8 is the number of data bytes
  25931. in which a framing error occurred.
  25932.  
  25933. If all 16 bytes of receive data in SCFRDR2 have framing errors, the value indicated by bits
  25934. FER3 to FER0 will be 0.
  25935.  
  25936. Rev. 2.0, 02/99, page 553 of 830
  25937.  
  25938. ----------------------- Page 568-----------------------
  25939.  
  25940. Bit 7—Receive Error (ER): Indicates that a framing error or parity error occurred during
  25941. reception.*1
  25942.  
  25943. Bit 7: ER Description
  25944.  
  25945. 0 No framing error or parity error occurred during reception (Initial value)
  25946.  
  25947. [Clearing conditions]
  25948.  
  25949. • Power-on reset or manual reset
  25950.  
  25951. • When 0 is written to ER after reading ER = 1
  25952.  
  25953. 1 A framing error or parity error occurred during reception
  25954.  
  25955. [Setting conditions]
  25956.  
  25957. • When the SCIF checks whether the stop bit at the end of the receive
  25958. data is 1 when reception ends, and the stop bit is 0*2
  25959.  
  25960. • When, in reception, the number of 1-bits in the receive data plus the
  25961. parity bit does not match the parity setting (even or odd) specified by
  25962. the O/( bit in SCSMR2
  25963.  
  25964. Notes: 1. The ER flag is not affected and retains its previous state when the RE bit in SCSCR2
  25965. is cleared to 0. When a receive error occurs, the receive data is still transferred to
  25966. SCFRDR2, and reception continues.
  25967. The FER and PER bits in SCFSR2 can be used to determine whether there is a
  25968. receive error in the data read from SCFRDR2.
  25969. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop
  25970. bit is not checked.
  25971.  
  25972. Rev. 2.0, 02/99, page 554 of 830
  25973.  
  25974. ----------------------- Page 569-----------------------
  25975.  
  25976. Bit 6—Transmit End (TEND): Indicates that there is no valid data in SCFTDR2 when the last
  25977. bit of the transmit character is sent, and transmission has been ended.
  25978.  
  25979. Bit 6: TEND Description
  25980.  
  25981. 0 Transmission is in progress
  25982.  
  25983. [Clearing conditions]
  25984.  
  25985. • When transmit data is written to SCFTDR2, and 0 is written to TEND
  25986. after reading TEND = 1
  25987.  
  25988. • When data is written to SCFTDR2 by the DMAC
  25989.  
  25990. 1 Transmission has been ended (Initial value)
  25991.  
  25992. [Setting conditions]
  25993.  
  25994. • Power-on reset or manual reset
  25995.  
  25996. • When the TE bit in SCSCR2 is 0
  25997.  
  25998. • When there is no transmit data in SCFTDR2 on transmission of the last
  25999. bit of a 1-byte serial transmit character
  26000.  
  26001. Rev. 2.0, 02/99, page 555 of 830
  26002.  
  26003. ----------------------- Page 570-----------------------
  26004.  
  26005. Bit 5—Transmit FIFO Data Empty (TDFE): Indicates that data has been transferred from
  26006. SCFTDR2 to SCTSR2, the number of data bytes in SCFTDR2 has fallen to or below the
  26007. transmit trigger data number set by bits TTRG1 and TTRG0 in the FIFO control register
  26008. (SCFCR2), and new transmit data can be written to SCFTDR2.
  26009.  
  26010. Bit 5: TDFE Description
  26011.  
  26012. 0 A number of transmit data bytes exceeding the transmit trigger set number
  26013. have been written to SCFTDR2
  26014.  
  26015. [Clearing conditions]
  26016.  
  26017. • When transmit data exceeding the transmit trigger set number is written
  26018. to SCFTDR2, and 0 is written to TDFE after reading TDFE = 1
  26019.  
  26020. • When transmit data exceeding the transmit trigger set number is written
  26021. to SCFTDR2 by the DMAC
  26022.  
  26023. 1 The number of transmit data bytes in SCFTDR2 does not exceed the
  26024. transmit trigger set number (Initial value)
  26025.  
  26026. [Setting conditions]
  26027.  
  26028. • Power-on reset or manual reset
  26029.  
  26030. • When the number of SCFTDR2 transmit data bytes falls to or below the
  26031. transmit trigger set number as the result of a transmit operation*
  26032.  
  26033. Note: * As SCFTDR2 is a 16-byte FIFO register, the maximum number of bytes that can be
  26034. written when TDFE = 1 is 16 - (transmit trigger set number). Data written in excess of this
  26035. will be ignored.
  26036. The number of data bytes in SCFTDR2 is indicated by the upper bits of SCFDR2.
  26037.  
  26038. Bit 4—Break Detect (BRK): Indicates that a receive data break signal has been detected.
  26039.  
  26040. Bit 4: BRK Description
  26041.  
  26042. 0 A break signal has not been received (Initial value)
  26043.  
  26044. [Clearing conditions]
  26045.  
  26046. • Power-on reset or manual reset
  26047.  
  26048. • When 0 is written to BRK after reading BRK = 1
  26049.  
  26050. 1 A break signal has been received*
  26051.  
  26052. [Setting condition]
  26053.  
  26054. When data with a framing error is received, followed by the space “0” level
  26055. (low level ) for at least one frame length
  26056.  
  26057. Note: * When a break is detected, the receive data (H'00) following detection is not transferred to
  26058. SCFRDR2. When the break ends and the receive signal returns to mark “1”, receive data
  26059. transfer is resumed.
  26060.  
  26061. Rev. 2.0, 02/99, page 556 of 830
  26062.  
  26063. ----------------------- Page 571-----------------------
  26064.  
  26065. Bit 3—Framing Error (FER): Indicates a framing error in the data read from SCFRDR2.
  26066.  
  26067. Bit 3: FER Description
  26068.  
  26069. 0 There is no framing error in the receive data read from SCFRDR2
  26070. (Initial value)
  26071.  
  26072. [Clearing conditions]
  26073.  
  26074. • Power-on reset or manual reset
  26075.  
  26076. • When there is no framing error in SCFRDR2 read data
  26077.  
  26078. 1 There is a framing error in the receive data read from SCFRDR2
  26079.  
  26080. [Setting condition]
  26081.  
  26082. When there is a framing error in SCFRDR2 read data
  26083.  
  26084. Bit 2—Parity Error (PER): Indicates a parity error in the data read from SCFRDR2.
  26085.  
  26086. Bit 2: PER Description
  26087.  
  26088. 0 There is no parity error in the receive data read from SCFRDR2
  26089. (Initial value)
  26090.  
  26091. [Clearing conditions]
  26092.  
  26093. • Power-on reset or manual reset
  26094.  
  26095. • When there is no parity error in SCFRDR2 read data
  26096.  
  26097. 1 There is a parity error in the receive data read from SCFRDR2
  26098.  
  26099. [Setting condition]
  26100.  
  26101. When there is a parity error in SCFRDR2 read data
  26102.  
  26103. Rev. 2.0, 02/99, page 557 of 830
  26104.  
  26105. ----------------------- Page 572-----------------------
  26106.  
  26107. Bit 1—Receive FIFO Data Full (RDF): Indicates that the received data has been transferred
  26108. from SCRSR2 to SCFRDR2, and the number of receive data bytes in SCFRDR2 is equal to or
  26109. greater than the receive trigger number set by bits RTRG1 and RTRG0 in the FIFO control
  26110. register (SCFCR2).
  26111.  
  26112. Bit 1: RDF Description
  26113.  
  26114. 0 The number of receive data bytes in SCFRDR2 is less than the receive
  26115. trigger set number (Initial value)
  26116.  
  26117. [Clearing conditions]
  26118.  
  26119. • Power-on reset or manual reset
  26120.  
  26121. • When SCFRDR2 is read until the number of receive data bytes in
  26122. SCFRDR2 falls below the receive trigger set number, and 0 is written to
  26123. RDF after reading RDF = 1
  26124.  
  26125. • When SCFRDR2 is read by the DMAC until the number of receive data
  26126. bytes in SCFRDR2 falls below the receive trigger set number
  26127.  
  26128. 1 The number of receive data bytes in SCFRDR2 is equal to or greater than
  26129. the receive trigger set number
  26130.  
  26131. [Setting condition]
  26132.  
  26133. When SCFRDR2 contains at least the receive trigger set number of receive
  26134. data bytes*
  26135.  
  26136. Note: * SCFRDR2 is a 16-byte FIFO register. When RDF = 1, at least the receive trigger set
  26137. number of data bytes can be read. If all the data in SCFRDR2 is read and another read is
  26138. performed, the data value will be undefined. The number of receive data bytes in
  26139. SCFRDR2 is indicated by the lower bits of SCFDR2.
  26140.  
  26141. Rev. 2.0, 02/99, page 558 of 830
  26142.  
  26143. ----------------------- Page 573-----------------------
  26144.  
  26145. Bit 0—Receive Data Ready (DR): Indicates that there are fewer than the receive trigger set
  26146. number of data bytes in SCFRDR2, and no further data has arrived for at least 15 etu after the
  26147. stop bit of the last data received.
  26148.  
  26149. Bit 0: DR Description
  26150.  
  26151. 0 Reception is in progress or has ended normally and there is no receive
  26152. data left in SCFRDR2 (Initial value)
  26153.  
  26154. [Clearing conditions]
  26155.  
  26156. • Power-on reset or manual reset
  26157.  
  26158. • When all the receive data in SCFRDR2 has been read, and 0 is written
  26159. to DR after reading DR = 1
  26160.  
  26161. • When all the receive data in SCFRDR2 has been read by the DMAC
  26162.  
  26163. 1 No further receive data has arrived
  26164.  
  26165. [Setting condition]
  26166.  
  26167. When SCFRDR2 contains fewer than the receive trigger set number of
  26168. receive data bytes, and no further data has arrived for at least 15 etu after
  26169. the stop bit of the last data received*
  26170.  
  26171. Note: * Equivalent to 1.5 frames with an 8-bit, 1-stop-bit format.
  26172. etu: Elementary time unit (time for transfer of 1 bit)
  26173.  
  26174. Rev. 2.0, 02/99, page 559 of 830
  26175.  
  26176. ----------------------- Page 574-----------------------
  26177.  
  26178. 16.2.8 Bit Rate Register (SCBRR2)
  26179.  
  26180. Bit: 7 6 5 4 3 2 1 0
  26181.  
  26182. Initial value: 1 1 1 1 1 1 1 1
  26183.  
  26184. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  26185.  
  26186. SCBRR2 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  26187. generator operating clock selected by bits CKS1 and CKS0 in SCSMR2.
  26188.  
  26189. SCBRR2 can be read or written to by the CPU at all times.
  26190.  
  26191. SCBRR2 is initialized to H'FF by a power-on reset or manual reset. It is not initialized in
  26192. standby mode or in the module standby state.
  26193.  
  26194. The SCBRR2 setting is found from the following equation.
  26195.  
  26196. Asynchronous mode:
  26197.  
  26198.  
  26199. P
  26200. φ 6
  26201. N = × 10 – 1
  26202. 64 × 22n–1 × B
  26203.  
  26204. Where B: Bit rate (bits/s)
  26205. N: SCBRR2 setting for baud rate generator (0 ≤ N ≤ 255)
  26206. Pφ: Peripheral module operating frequency (MHz)
  26207. n: Baud rate generator input clock (n = 0 to 3)
  26208. (See the table below for the relation between n and the clock.)
  26209.  
  26210. SCSMR2 Setting
  26211.  
  26212. n Clock CKS1 CKS0
  26213.  
  26214. 0 Pφ 0 0
  26215.  
  26216. 1 Pφ/4 0 1
  26217.  
  26218. 2 Pφ/16 1 0
  26219.  
  26220. 3 Pφ/64 1 1
  26221.  
  26222. The bit rate error in asynchronous mode is found from the following equation:
  26223.  
  26224. P × 106
  26225. φ
  26226. Error (%) = 2n–1 – 1 × 100
  26227. (N + 1) × B × 64 × 2
  26228.  
  26229. Rev. 2.0, 02/99, page 560 of 830
  26230.  
  26231. ----------------------- Page 575-----------------------
  26232.  
  26233. 16.2.9 FIFO Control Register (SCFCR2)
  26234.  
  26235. Bit: 15 14 13 12 11 10 9 8
  26236.  
  26237. — — — — — — — —
  26238.  
  26239. Initial value: 0 0 0 0 0 0 0 0
  26240.  
  26241. R/W: R R R R R R R R
  26242.  
  26243. Bit: 7 6 5 4 3 2 1 0
  26244.  
  26245. RTRG1 RTRG0 TTRG1 TTRG0 MCE TFRST RFRST LOOP
  26246.  
  26247. Initial value: 0 0 0 0 0 0 0 0
  26248.  
  26249. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  26250.  
  26251. SCFCR2 performs data count resetting and trigger data number setting for the transmit and
  26252. receive FIFO registers, and also contains a loopback test enable bit.
  26253.  
  26254. SCFCR2 can be read or written to by the CPU at all times.
  26255.  
  26256. SCFCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  26257. standby mode or in the module standby state.
  26258.  
  26259. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  26260.  
  26261. Bits 7 and 6—Receive FIFO Data Number Trigger (RTRG1, RTRG0): These bits are used to
  26262. set the number of receive data bytes that sets the receive data full (RDF) flag in the serial status
  26263. register (SCFSR2).
  26264.  
  26265. The RDF flag is set when the number of receive data bytes in SCFRDR2 is equal to or greater
  26266. than the trigger set number shown in the following table.
  26267.  
  26268. Bit 7: RTRG1 Bit 6: RTRG0 Receive Trigger Number
  26269.  
  26270. 0 0 1*
  26271.  
  26272. 1 4
  26273.  
  26274. 1 0 8
  26275.  
  26276. 1 14
  26277.  
  26278. Note: * Initial value
  26279.  
  26280. Rev. 2.0, 02/99, page 561 of 830
  26281.  
  26282. ----------------------- Page 576-----------------------
  26283.  
  26284. Bits 5 and 4—Transmit FIFO Data Number Trigger (TTRG1, TTRG0): These bits are used
  26285. to set the number of remaining transmit data bytes that sets the transmit FIFO data register
  26286. empty (TDFE) flag in the serial status register (SCFSR2). The TDFE flag is set when the number
  26287. of transmit data bytes in SCFTDR2 is equal to or less than the trigger set number shown in the
  26288. following table.
  26289.  
  26290. Bit 5: TTRG1 Bit 4: TTRG0 Transmit Trigger Number
  26291.  
  26292. 0 0 8 (8) *
  26293.  
  26294. 1 4 (12)
  26295.  
  26296. 1 0 2 (14)
  26297.  
  26298. 1 1 (15)
  26299.  
  26300. Note: * Initial value. Figures in parentheses are the number of empty bytes in SCFTDR2 when the
  26301. flag is set.
  26302.  
  26303. Bit 3—Modem Control Enable (MCE): Enables the &76 and 576 modem control signals.
  26304.  
  26305. Bit 3: MCE Description
  26306.  
  26307. 0 Modem signals disabled* (Initial value)
  26308.  
  26309. 1 Modem signals enabled
  26310.  
  26311. Note: * &76 is fixed at active-0 regardless of the input value, and 576 output is also fixed at 0.
  26312.  
  26313. Bit 2—Transmit FIFO Data Register Reset (TFRST): Invalidates the transmit data in the
  26314. transmit FIFO data register and resets it to the empty state.
  26315.  
  26316. Bit 2: TFRST Description
  26317.  
  26318. 0 Reset operation disabled* (Initial value)
  26319.  
  26320. 1 Reset operation enabled
  26321.  
  26322. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  26323.  
  26324. Bit 1—Receive FIFO Data Register Reset (RFRST): Invalidates the receive data in the
  26325. receive FIFO data register and resets it to the empty state.
  26326.  
  26327. Bit 1: RFRST Description
  26328.  
  26329. 0 Reset operation disabled* (Initial value)
  26330.  
  26331. 1 Reset operation enabled
  26332.  
  26333. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  26334.  
  26335. Rev. 2.0, 02/99, page 562 of 830
  26336.  
  26337. ----------------------- Page 577-----------------------
  26338.  
  26339. Bit 0—Loopback Test (LOOP): Internally connects the transmit output pin (TxD2) and receive
  26340. input pin (RxD2), and the 576 pin and &76 pin, enabling loopback testing.
  26341.  
  26342. Bit 0: LOOP Description
  26343.  
  26344. 0 Loopback test disabled (Initial value)
  26345.  
  26346. 1 Loopback test enabled
  26347.  
  26348. 16.2.10 FIFO Data Count Register (SCFDR2)
  26349.  
  26350. SCFDR2 is a 16-bit register that indicates the number of data bytes stored in SCFTDR2 and
  26351. SCFRDR2.
  26352.  
  26353. The upper 8 bits show the number of transmit data bytes in SCFTDR2, and the lower 8 bits show
  26354. the number of receive data bytes in SCFRDR2.
  26355.  
  26356. SCFDR2 can be read by the CPU at all times.
  26357.  
  26358. Bit: 15 14 13 12 11 10 9 8
  26359.  
  26360. — — — T4 T3 T2 T1 T0
  26361.  
  26362. Initial value: 0 0 0 0 0 0 0 0
  26363.  
  26364. R/W: R R R R R R R R
  26365.  
  26366. These bits show the number of untransmitted data bytes in SCFTDR2. A value of H'00 indicates
  26367. that there is no transmit data, and a value of H'10 indicates that SCFTDR2 is full of transmit
  26368. data.
  26369.  
  26370. Bit: 7 6 5 4 3 2 1 0
  26371.  
  26372. — — — R4 R3 R2 R1 R0
  26373.  
  26374. Initial value: 0 0 0 0 0 0 0 0
  26375.  
  26376. R/W: R R R R R R R R
  26377.  
  26378. These bits show the number of receive data bytes in SCFRDR2. A value of H'00 indicates that
  26379. there is no receive data, and a value of H'10 indicates that SCFRDR2 is full of receive data.
  26380.  
  26381. Rev. 2.0, 02/99, page 563 of 830
  26382.  
  26383. ----------------------- Page 578-----------------------
  26384.  
  26385. 16.2.11 Serial Port Register (SCSPTR2)
  26386.  
  26387. Bit: 15 14 13 12 11 10 9 8
  26388.  
  26389. — — — — — — — —
  26390.  
  26391. Initial value: 0 0 0 0 0 0 0 0
  26392.  
  26393. R/W: R R R R R R R R
  26394.  
  26395. Bit: 7 6 5 4 3 2 1 0
  26396.  
  26397. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  26398.  
  26399. Initial value: 0 — 0 — 0 0 0 —
  26400.  
  26401. R/W: R/W R/W R/W R/W R R R/W R/W
  26402.  
  26403. SCSPTR2 is a 16-bit readable/writable register that controls input/output and data for the port
  26404. pins multiplexed with the serial communication interface (SCIF) pins. Input data can be read
  26405. from the RxD2 pin, output data written to the TxD2 pin, and breaks in serial
  26406. transmission/reception controlled, by means of bits 1 and 0. Data can be read from, and output
  26407. data written to, the &76 pin by means of bits 5 and 4. Data can be read from, and output data
  26408. written to, the 576 pin by means of bits 6 and 7.
  26409.  
  26410. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6, 4,
  26411. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0 is
  26412. undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  26413.  
  26414. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  26415.  
  26416. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies the serial port 576 pin input/output
  26417. condition. When the 576 pin is actually set as a port output pin and outputs the value set by the
  26418. RTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  26419.  
  26420. Bit 7: RTSIO Description
  26421.  
  26422. 0 RTSDT bit value is not output to 576 pin (Initial value)
  26423.  
  26424. 1 RTSDT bit value is output to 576 pin
  26425.  
  26426. Rev. 2.0, 02/99, page 564 of 830
  26427.  
  26428. ----------------------- Page 579-----------------------
  26429.  
  26430. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port 576 pin input/output
  26431. data. Input or output is specified by the RTSIO bit (see the description of bit 7, RTSIO, for
  26432. details). In output mode, the RTSDT bit value is output to the 576 pin. The 576 pin value is
  26433. read from the RTSDT bit regardless of the value of the RTSIO bit. The initial value of this bit
  26434. after a power-on reset or manual reset is undefined.
  26435.  
  26436. Bit 6: RTSDT Description
  26437.  
  26438. 0 Input/output data is low-level
  26439.  
  26440. 1 Input/output data is high-level
  26441.  
  26442. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies the serial port &76 pin input/output
  26443. condition. When the &76 pin is actually set as a port output pin and outputs the value set by the
  26444. CTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  26445.  
  26446. Bit 5: CTSIO Description
  26447.  
  26448. 0 CTSDT bit value is not output to &76 pin (Initial value)
  26449.  
  26450. 1 CTSDT bit value is output to &76 pin
  26451.  
  26452. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port &76 pin input/output
  26453. data. Input or output is specified by the CTSIO bit (see the description of bit 5, CTSIO, for
  26454. details). In output mode, the CTSDT bit value is output to the &76 pin. The &76 pin value is
  26455. read from the CTSDT bit regardless of the value of the CTSIO bit. The initial value of this bit
  26456. after a power-on reset or manual reset is undefined.
  26457.  
  26458. Bit 4: CTSDT Description
  26459.  
  26460. 0 Input/output data is low-level
  26461.  
  26462. 1 Input/output data is high-level
  26463.  
  26464. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  26465.  
  26466. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output condition.
  26467. When the TxD2 pin is actually set as a port output pin and outputs the value set by the SPB2DT
  26468. bit, the TE bit in SCSCR2 should be cleared to 0.
  26469.  
  26470. Bit 1: SPB2IO Description
  26471.  
  26472. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  26473.  
  26474. 1 SPB2DT bit value is output to the TxD2 pin
  26475.  
  26476. Rev. 2.0, 02/99, page 565 of 830
  26477.  
  26478. ----------------------- Page 580-----------------------
  26479.  
  26480. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data and
  26481. TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  26482. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the
  26483. value of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the
  26484. SPB2DT bit regardless of the value of the SPB2IO bit. The initial value of this bit after a power-
  26485. on reset or manual reset is undefined.
  26486.  
  26487. Bit 0: SPB2DT Description
  26488.  
  26489. 0 Input/output data is low-level
  26490.  
  26491. 1 Input/output data is high-level
  26492.  
  26493. SCIF I/O port block diagrams are shown in figures 16.2 to 16.5.
  26494.  
  26495. Reset
  26496.  
  26497. R D7
  26498. Q D
  26499. RTSIO
  26500. C Internal data bus
  26501.  
  26502. SPTRW
  26503.  
  26504. Reset
  26505. MD8/RTS2
  26506. R D6
  26507. Q D
  26508. RTSDT
  26509. C SCIF
  26510.  
  26511. Modem control
  26512. SPTRW
  26513. enable signal*
  26514.  
  26515. Mode setting RTS2 signal
  26516. register
  26517.  
  26518. SPTRR
  26519.  
  26520. SPTRW: Write to SPTR
  26521. SPTRR: Read SPTR
  26522.  
  26523. Note: * The RTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  26524.  
  26525. Figure 16.2 MD8/576 Pin
  26526. 576
  26527.  
  26528. Rev. 2.0, 02/99, page 566 of 830
  26529.  
  26530. ----------------------- Page 581-----------------------
  26531.  
  26532. Reset
  26533. R D5
  26534.  
  26535. Q D
  26536. CTSIO
  26537. C Internal data bus
  26538.  
  26539. SPTRW
  26540.  
  26541. Reset
  26542. CTS2
  26543. R
  26544. D4
  26545. Q D
  26546. CTSDT
  26547. C SCIF
  26548.  
  26549. SPTRW
  26550.  
  26551. CTS2 signal
  26552.  
  26553. Modem control enable signal*
  26554.  
  26555. SPTRR
  26556.  
  26557. SPTRW: Write to SPTR
  26558. SPTRR: Read SPTR
  26559.  
  26560. Note: * The CTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  26561.  
  26562.  
  26563. Figure 16.3 &76 Pin
  26564. &76
  26565.  
  26566. Rev. 2.0, 02/99, page 567 of 830
  26567.  
  26568. ----------------------- Page 582-----------------------
  26569.  
  26570. Reset
  26571.  
  26572. R
  26573. D1
  26574. Q D
  26575. SPB2IO
  26576. C Internal data bus
  26577.  
  26578. SPTRW
  26579.  
  26580. Reset
  26581. MD1/TxD2
  26582. R D0
  26583. Q D
  26584. SPB2DT
  26585. C SCIF
  26586.  
  26587. Transmit enable
  26588. SPTRW
  26589. signal
  26590.  
  26591. Mode setting
  26592. register Serial transmit data
  26593.  
  26594. SPTRW: Write to SPTR
  26595.  
  26596. Figure 16.4 MD1/TxD2 Pin
  26597.  
  26598. SCIF
  26599. MD2/RxD2
  26600.  
  26601. Serial receive
  26602. Mode setting data
  26603. register
  26604.  
  26605. D0
  26606.  
  26607. Internal data bus
  26608.  
  26609.  
  26610. SPTRR
  26611.  
  26612. SPTRR: Read SPTR
  26613.  
  26614. Figure 16.5 MD2/RxD2 Pin
  26615.  
  26616. Rev. 2.0, 02/99, page 568 of 830
  26617.  
  26618. ----------------------- Page 583-----------------------
  26619.  
  26620. 16.2.12 Line Status Register (SCLSR2)
  26621.  
  26622. Bit: 15 14 13 12 11 10 9 8
  26623.  
  26624. — — — — — — — —
  26625.  
  26626. Initial value: 0 0 0 0 0 0 0 0
  26627.  
  26628. R/W: R R R R R R R R
  26629.  
  26630. Bit: 7 6 5 4 3 2 1 0
  26631.  
  26632. — — — — — — — ORER
  26633.  
  26634. Initial value: 0 0 0 0 0 0 0 0
  26635.  
  26636. R/W: R R R R R R R (R/W)*
  26637.  
  26638. Note: * Only 0 can be written, to clear the flag.
  26639.  
  26640. Bits 15 to 1—Reserved: These bits are always read as 0, and should only be written with 0.
  26641.  
  26642. Bit 0—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  26643. causing abnormal termination.
  26644.  
  26645. Bit 0: ORER Description
  26646. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  26647.  
  26648. [Clearing conditions]
  26649.  
  26650. • Power-on reset or manual reset
  26651.  
  26652. • When 0 is written to ORER after reading ORER = 1
  26653.  
  26654. 2
  26655. 1 An overrun error occurred during reception*
  26656.  
  26657. [Setting condition]
  26658.  
  26659. When the next serial reception is completed while the receive FIFO is full
  26660.  
  26661. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in
  26662. SCSCR2 is cleared to 0.
  26663. 2. The receive data prior to the overrun error is retained in SCFRDR2, and the data
  26664. received subsequently is lost. Serial reception cannot be continued while the ORER
  26665. flag is set to 1.
  26666.  
  26667. Rev. 2.0, 02/99, page 569 of 830
  26668.  
  26669. ----------------------- Page 584-----------------------
  26670.  
  26671. 16.3 Operation
  26672.  
  26673. 16.3.1 Overview
  26674.  
  26675. The SCIF can carry out serial communication in asynchronous mode, in which synchronization
  26676. is achieved character by character. See section 15.3.2, Operation in Asynchronous Mode, for
  26677. details.
  26678.  
  26679. Sixteen-stage FIFO buffers are provided for both transmission and reception, reducing the CPU
  26680. overhead and enabling fast, continuous communication to be performed. 576 and &76 signals
  26681. are also provided as modem control signals.
  26682.  
  26683. Rev. 2.0, 02/99, page 570 of 830
  26684.  
  26685. ----------------------- Page 585-----------------------
  26686.  
  26687. The transmission format is selected using the serial mode register (SCSMR2), as shown in table
  26688. 16.3. The SCIF clock source is determined by the CKE1 bit in the serial control register
  26689. (SCSCR2), as shown in table 16.4.
  26690.  
  26691. • Data length: Choice of 7 or 8 bits
  26692. • Choice of parity addition and addition of 1 or 2 stop bits (the combination of these
  26693. parameters determines the transfer format and character length)
  26694. • Detection of framing errors, parity errors, receive-FIFO-data-full state, overrun errors,
  26695. receive-data-ready state, and breaks, during reception
  26696. • Indication of the number of data bytes stored in the transmit and receive FIFO registers
  26697. • Choice of internal or external clock as SCIF clock source
  26698. When internal clock is selected: The SCIF operates on the baud rate generator clock.
  26699. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  26700. input (the on-chip baud rate generator is not used).
  26701.  
  26702. Table 16.3 SCSMR2 Settings for Serial Transfer Format Selection
  26703.  
  26704. SCSMR2 Settings SCIF Transfer Format
  26705.  
  26706. Bit 6: Bit 5: Bit 3: Data Multiprocessor Parity Stop Bit
  26707. CHR PE STOP Mode Length Bit Bit Length
  26708.  
  26709. 0 0 0 Asynchronous mode 8-bit data No No 1 bit
  26710.  
  26711. 1 2 bits
  26712.  
  26713. 1 0 Yes 1 bit
  26714.  
  26715. 1 2 bits
  26716.  
  26717. 1 0 0 7-bit data No 1 bit
  26718.  
  26719. 1 2 bits
  26720.  
  26721. 1 0 Yes 1 bit
  26722.  
  26723. 1 2 bits
  26724.  
  26725. Table 16.4 SCSCR2 Settings for SCIF Clock Source Selection
  26726.  
  26727. SCSCR2 Setting SCIF Transmit/Receive Clock
  26728.  
  26729. Bit 1: CKE1 Mode Clock Source SCK2 Pin Function
  26730.  
  26731. 0 Asynchronous mode Internal SCIF does not use SCK2 pin
  26732.  
  26733. 1 External Inputs clock with frequency of 16
  26734. times the bit rate
  26735.  
  26736. Rev. 2.0, 02/99, page 571 of 830
  26737.  
  26738. ----------------------- Page 586-----------------------
  26739.  
  26740. 16.3.2 Serial Operation
  26741.  
  26742. Data Transfer Format
  26743.  
  26744. Table 16.5 shows the data transfer formats that can be used. Any of 8 transfer formats can be
  26745. selected according to the SCSMR2 settings.
  26746.  
  26747. Table 16.5 Serial Transfer Formats
  26748.  
  26749. SCSMR2
  26750. Settings Serial Transfer Format and Frame Length
  26751.  
  26752. CHR PE STOP 1 2 3 4 5 6 7 8 9 10 11 12
  26753.  
  26754. 0 0 0 S 8-bit data STOP
  26755.  
  26756. 0 0 1 S 8-bit data STOP STOP
  26757.  
  26758. 0 1 0 S 8-bit data P STOP
  26759.  
  26760. 0 1 1 S 8-bit data P STOP STOP
  26761.  
  26762. 1 0 0 S 7-bit data STOP
  26763.  
  26764. 1 0 1 S 7-bit data STOP STOP
  26765.  
  26766. 1 1 0 S 7-bit data P STOP
  26767.  
  26768. 1 1 1 S 7-bit data P STOP STOP
  26769.  
  26770. S: Start bit
  26771. STOP: Stop bit
  26772. P: Parity bit
  26773.  
  26774. Rev. 2.0, 02/99, page 572 of 830
  26775.  
  26776. ----------------------- Page 587-----------------------
  26777.  
  26778. Clock
  26779.  
  26780. Either an internal clock generated by the on-chip baud rate generator or an external clock input
  26781. at the SCK2 pin can be selected as the SCIF’s serial clock, according to the setting of the CKE1
  26782. bit in SCSCR2. For details of SCIF clock source selection, see table 16.4.
  26783.  
  26784. When an external clock is input at the SCK2 pin, the clock frequency should be 16 times the bit
  26785. rate used.
  26786.  
  26787. Data Transfer Operations
  26788.  
  26789. SCIF Initialization: Before transmitting and receiving data, it is necessary to clear the TE and
  26790. RE bits in SCSCR2 to 0, then initialize the SCIF as described below.
  26791.  
  26792. When the transfer format, etc., is changed, the TE and RE bits must be cleared to 0 before
  26793. making the change using the following procedure. When the TE bit is cleared to 0, SCTSR2 is
  26794. initialized. Note that clearing the TE and RE bits to 0 does not change the contents of SCFSR2,
  26795. SCFTDR2, or SCFRDR2. The TE bit should be cleared to 0 after all transmit data has been sent
  26796. and the TEND flag in SCFSR2 has been set. TEND can also be cleared to 0 during transmission,
  26797. but the data being transmitted will go to the mark state after the clearance. Before setting TE
  26798. again to start transmission, the TFRST bit in SCFCR2 should first be set to 1 to reset SCFTDR2.
  26799.  
  26800. When an external clock is used the clock should not be stopped during operation, including
  26801. initialization, since operation will be unreliable in this case.
  26802.  
  26803. Figure 16.6 shows a sample SCIF initialization flowchart.
  26804.  
  26805. Rev. 2.0, 02/99, page 573 of 830
  26806.  
  26807. ----------------------- Page 588-----------------------
  26808.  
  26809. Initialization 1. Set the clock selection in SCSCR2.
  26810.  
  26811. Be sure to clear bits RIE and TIE,
  26812. and bits TE and RE, to 0.
  26813. Clear TE and RE bits
  26814. 2. Set the data transfer format in
  26815. in SCSCR2 to 0
  26816. SCSMR2.
  26817.  
  26818. 3. Write a value corresponding to the
  26819. Set TFRST and RFRST bits
  26820. bit rate into SCBRR2. (Not
  26821. in SCFCR2 to 1
  26822. necessary if an external clock is
  26823. used.)
  26824. Set CKE1 bit in SCSCR2 4. Wait at least one bit interval, then
  26825. (leaving TE and RE bits set the TE bit or RE bit in SCSCR2
  26826. cleared to 0) to 1. Also set the RIE, REIE, and
  26827.  
  26828. TIE bits.
  26829.  
  26830. Set data transfer format Setting the TE and RE bits enables
  26831. in SCSMR2 the TxD2 and RxD2 pins to be
  26832. used. When transmitting, the SCIF
  26833. will go to the mark state; when
  26834. Set value in SCBRR2 receiving, it will go to the idle state,
  26835.  
  26836. Wait waiting for a start bit.
  26837.  
  26838. No
  26839. 1-bit interval elapsed?
  26840.  
  26841. Yes
  26842.  
  26843. Set RTRG1–0, TTRG1–0,
  26844. and MCE bits in SCFCR2
  26845. Clear TFRST and RFRST bits to 0
  26846.  
  26847. Set TE and RE bits
  26848. in SCSCR2 to 1,
  26849. and set RIE, TIE, and REIE bits
  26850.  
  26851. End
  26852.  
  26853. Figure 16.6 Sample SCIF Initialization Flowchart
  26854.  
  26855. Rev. 2.0, 02/99, page 574 of 830
  26856.  
  26857. ----------------------- Page 589-----------------------
  26858.  
  26859. Serial Data Transmission: Figure 16.7 shows a sample flowchart for serial transmission.
  26860.  
  26861. Use the following procedure for serial data transmission after enabling the SCIF for
  26862. transmission.
  26863.  
  26864.  
  26865. Start of transmission 1. SCIF status check and transmit data
  26866. write:
  26867.  
  26868. Read SCFSR2 and check that the
  26869. Read TDFE flag in SCFSR2 TDFE flag is set to 1, then write
  26870. transmit data to SCFTDR2, read 1
  26871. No from the TDFE and TEND flags, then
  26872. TDFE = 1? clear these flags to 0.
  26873.  
  26874. The number of transmit data bytes
  26875. Yes
  26876. that can be written is 16 - (transmit
  26877. Write transmit data (16 - transmit trigger set number).
  26878.  
  26879. trigger set number) to SCFTDR2, 2. Serial transmission continuation
  26880. read 1 from TDFE flag and TEND procedure:
  26881. flag in SCFSR2, then clear to 0
  26882. To continue serial transmission, read
  26883. 1 from the TDFE flag to confirm that
  26884. All data transmitted? No writing is possible, then write data to
  26885.  
  26886. SCFTDR2, and then clear the TDFE
  26887. Yes flag to 0.
  26888.  
  26889. 3. Break output at the end of serial
  26890. Read TEND flag in SCFSR2 transmission:
  26891.  
  26892. To output a break in serial
  26893. No transmission, clear the SPB2DT bit to
  26894. TEND = 1? 0 and set the SPB2IO bit to 1 in
  26895. SCSPTR2, then clear the TE bit in
  26896. Yes SCSCR2 to 0.
  26897.  
  26898. No In steps 1 and 2, it is possible to
  26899. Break output? ascertain the number of data bytes
  26900.  
  26901. that can be written from the number
  26902. Yes of transmit data bytes in SCFTDR2
  26903.  
  26904. Clear SPB2DT to 0 and indicated by the upper 8 bits of
  26905. SCFDR2.
  26906. set SPB2IO to 1
  26907.  
  26908. Clear TE bit in SCSCR2 to 0
  26909.  
  26910. End of transmission
  26911.  
  26912. Figure 16.7 Sample Serial Transmission Flowchart
  26913.  
  26914. Rev. 2.0, 02/99, page 575 of 830
  26915.  
  26916. ----------------------- Page 590-----------------------
  26917.  
  26918. In serial transmission, the SCIF operates as described below.
  26919.  
  26920. 1. When data is written into SCFTDR2, the SCIF transfers the data from SCFTDR2 to SCTSR2
  26921. and starts transmitting. Confirm that the TDFE flag in the serial status register (SCFSR2) is
  26922. set to 1 before writing transmit data to SCFTDR2. The number of data bytes that can be
  26923. written is at least (16 - transmit trigger setting).
  26924. 2. When data is transferred from SCFTDR2 to SCTSR2 and transmission is started, consecutive
  26925. transmit operations are performed until there is no transmit data left in SCFTDR2. When the
  26926. number of transmit data bytes in SCFTDR2 falls to or below the transmit trigger number set
  26927. in the FIFO control register (SCFCR2), the TDFE flag is set. If the TIE bit in SCSCR2 is set
  26928. to 1 at this time, a transmit-FIFO-data-empty interrupt (TXI) request is generated.
  26929. The serial transmit data is sent from the TxD2 pin in the following order.
  26930. a. Start bit: One 0-bit is output.
  26931. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  26932. c. Parity bit: One parity bit (even or odd parity) is output. (A format in which a parity bit is
  26933. not output can also be selected.)
  26934. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  26935. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  26936. sent.
  26937. 3. The SCIF checks the SCFTDR2 transmit data at the timing for sending the stop bit. If data is
  26938. present, the data is transferred from SCFTDR2 to SCTSR2, the stop bit is sent, and then
  26939. serial transmission of the next frame is started.
  26940. If there is no transmit data, the TEND flag in SCFSR2 is set to 1, the stop bit is sent, and
  26941. then the line goes to the mark state in which 1 is output.
  26942.  
  26943. Figure 16.8 shows an example of the operation for transmission in asynchronous mode.
  26944.  
  26945. Rev. 2.0, 02/99, page 576 of 830
  26946.  
  26947. ----------------------- Page 591-----------------------
  26948.  
  26949. Start Data Parity Stop Start Data Parity Stop
  26950. 1 bit bit bit bit bit bit 1
  26951.  
  26952. Serial Idle state
  26953. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  26954. data (mark state)
  26955.  
  26956. TDFE
  26957.  
  26958. TEND
  26959.  
  26960. TXI interrupt TXI interrupt
  26961. request request
  26962. Data written to SCFTDR2
  26963. and TDFE flag read as 1
  26964. then cleared to 0 by TXI
  26965. interrupt handler
  26966.  
  26967. One frame
  26968.  
  26969. Figure 16.8 Example of Transmit Operation
  26970. (Example with 8-Bit Data, Parity, One Stop Bit)
  26971.  
  26972. 4. When modem control is enabled, transmission can be stopped and restarted in accordance
  26973. with the &76 input value. When &76 is set to 1, if transmission is in progress, the line
  26974. goes to the mark state after transmission of one frame. When &76 is set to 0, the next
  26975. transmit data is output starting from the start bit.
  26976. Figure 16.9 shows an example of the operation when modem control is used.
  26977.  
  26978. Start ParityStop Start
  26979. bit bit bit bit
  26980.  
  26981. Serial data
  26982. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1
  26983. TxD2
  26984.  
  26985. CTS2
  26986.  
  26987. Drive high before stop bit
  26988.  
  26989. Figure 16.9 Example of Operation Using Modem Control (&76)
  26990. &76
  26991.  
  26992. Rev. 2.0, 02/99, page 577 of 830
  26993.  
  26994. ----------------------- Page 592-----------------------
  26995.  
  26996. Serial Data Reception: Figure 16.10 shows a sample flowchart for serial reception.
  26997.  
  26998. Use the following procedure for serial data reception after enabling the SCIF for reception.
  26999.  
  27000. Start of reception 1. Receive error handling and
  27001. break detection: Read the DR,
  27002. ER, and BRK flags in
  27003. Read ER, DR, BRK flags in SCFSR2, and the ORER flag
  27004. SCFSR2 and ORER in SCLSR2, to identify any
  27005. flag in SCLSR2 error, perform the appropriate
  27006. error handling, then clear the
  27007. DR, ER, BRK, and ORER
  27008. flags to 0. In the case of a
  27009. ER or DR or BRK or ORER Yes framing error, a break can also
  27010.  
  27011. = 1? be detected by reading the
  27012. value of the RxD2 pin.
  27013. No Error handling
  27014. 2. SCIF status check and receive
  27015. data read : Read SCFSR2 and
  27016. Read RDF flag in SCFSR2 check that RDF = 1, then read
  27017. the receive data in SCFRDR2,
  27018. read 1 from the RDF flag, and
  27019. No
  27020. RDF = 1? then clear the RDF flag to 0.
  27021. The transition of the RDF flag
  27022. Yes from 0 to 1 can also be
  27023. identified by an RXI interrupt.
  27024. Read receive data in
  27025. 3. Serial reception continuation
  27026. SCFRDR2, and clear RDF
  27027. procedure: To continue serial
  27028. flag in SCFSR2 to 0
  27029. reception, read at least the
  27030. receive trigger set number of
  27031. No receive data bytes from
  27032. All data received?
  27033. SCFRDR2, read 1 from the
  27034. RDF flag, then clear the RDF
  27035. Yes
  27036. flag to 0. The number of
  27037. Clear RE bit in SCSCR2 to 0 receive data bytes in
  27038. SCFRDR2 can be ascertained
  27039. by reading the lower bits of
  27040. End of reception SCFDR2.
  27041.  
  27042. Figure 16.10 Sample Serial Reception Flowchart (1)
  27043.  
  27044. Rev. 2.0, 02/99, page 578 of 830
  27045.  
  27046. ----------------------- Page 593-----------------------
  27047.  
  27048. 1. Whether a framing error or parity error
  27049. Error handling
  27050. has occurred in the receive data read
  27051. from SCFRDR2 can be ascertained
  27052. No from the FER and PER bits in
  27053. ORER = 1? SCFSR2.
  27054.  
  27055. Yes 2. When a break signal is received,
  27056. receive data is not transferred to
  27057. Overrun error handling SCFRDR2 while the BRK flag is set.
  27058. However, note that the last data in
  27059. SCFRDR2 is H'00 (the break data in
  27060. which a framing error occurred is
  27061. No
  27062. ER = 1? stored).
  27063.  
  27064.  
  27065. Yes
  27066.  
  27067. Receive error handling
  27068.  
  27069. No
  27070. BRK = 1?
  27071.  
  27072. Yes
  27073.  
  27074. Break handling
  27075.  
  27076. No
  27077. DR = 1?
  27078.  
  27079. Yes
  27080.  
  27081. Read receive data in SCFRDR2
  27082.  
  27083. Clear DR, ER, BRK flags
  27084. in SCFSR2,
  27085. and ORER flag in SCLSR2, to 0
  27086.  
  27087. End
  27088.  
  27089. Figure 16.10 Sample Serial Reception Flowchart (2)
  27090.  
  27091. Rev. 2.0, 02/99, page 579 of 830
  27092.  
  27093. ----------------------- Page 594-----------------------
  27094.  
  27095. In serial reception, the SCIF operates as described below.
  27096.  
  27097. 1. The SCIF monitors the transmission line, and if a 0 start bit is detected, performs internal
  27098. synchronization and starts reception.
  27099. 2. The received data is stored in SCRSR2 in LSB-to-MSB order.
  27100. 3. The parity bit and stop bit are received.
  27101. After receiving these bits, the SCIF carries out the following checks.
  27102. a. Stop bit check: The SCIF checks whether the stop bit is 1. If there are two stop bits, only
  27103. the first is checked.
  27104. b. The SCIF checks whether receive data can be transferred from the receive shift register
  27105. (SCRSR2) to SCFRDR2.
  27106. c. Overrun error check: The SCIF checks that the ORER flag is 0, indicating that no overrun
  27107. error has occurred.
  27108. d. Break check: The SCIF checks that the BRK flag is 0, indicating that the break state is
  27109. not set.
  27110. If all the above checks are passed, the receive data is stored in SCFRDR2.
  27111.  
  27112. Note: Reception continues when parity error, framing error occurs.
  27113.  
  27114. 4. If the RIE bit in SCSCR2 is set to 1 when the RDF or DR flag changes to 1, a receive-FIFO-
  27115. data-full interrupt (RXI) request is generated.
  27116. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the ER flag changes to 1, a receive-
  27117. error interrupt (ERI) request is generated.
  27118. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the BRK or ORER flag changes to 1, a
  27119. break reception interrupt (BRI) request is generated.
  27120.  
  27121. Figure 16.11 shows an example of the operation for reception.
  27122.  
  27123. Rev. 2.0, 02/99, page 580 of 830
  27124.  
  27125. ----------------------- Page 595-----------------------
  27126.  
  27127. Start Data Parity Stop Start Data Parity Stop
  27128. 1 bit bit bit bit bit bit
  27129.  
  27130. Serial
  27131. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  27132. data
  27133.  
  27134. RDF
  27135.  
  27136. FER
  27137.  
  27138. RXI interrupt
  27139. request Data read and RDF flag ERI interrupt request
  27140.  
  27141. One frame read as 1 then cleared to generated by receive
  27142. 0 by RXI interrupt handler error
  27143.  
  27144. Figure 16.11 Example of SCIF Receive Operation
  27145. (Example with 8-Bit Data, Parity, One Stop Bit)
  27146.  
  27147. 5. When modem control is enabled, the 576 signal is output when SCFRDR2 is empty. When
  27148. 576 is 0, reception is possible. When 576 is 1, this indicates that SCFRDR2 contains 15
  27149. or more bytes of data, and there is no free space, reception is not possible.
  27150. Figure 16.12 shows an example of the operation when modem control is used.
  27151.  
  27152. Start Parity Stop Start
  27153. bit bit bit bit
  27154. Serial data
  27155. 0 D0 D1 D2 D7 0/1 1 0
  27156. RxD2
  27157.  
  27158. RTS2
  27159.  
  27160. Figure 16.12 Example of Operation Using Modem Control (576)
  27161. 576
  27162.  
  27163. Rev. 2.0, 02/99, page 581 of 830
  27164.  
  27165. ----------------------- Page 596-----------------------
  27166.  
  27167. 16.4 SCIF Interrupt Sources and the DMAC
  27168.  
  27169. The SCIF has four interrupt sources: transmit-FIFO-data-empty interrupt (TXI) request, receive-
  27170. error interrupt (ERI) request, receive-FIFO-data-full interrupt (RXI) request, and break interrupt
  27171. (BRI) request.
  27172.  
  27173. Table 16.6 shows the interrupt sources and their order of priority. The interrupt sources are
  27174. enabled or disabled by means of the TIE, RIE, and REIE bits in SCSCR2. A separate interrupt
  27175. request is sent to the interrupt controller for each of these interrupt sources.
  27176.  
  27177. When transmission/reception is carried out using the DMAC, output of interrupt requests to the
  27178. interrupt controller can be inhibited by clearing the RIE bit in SCSCR2 to 0. By setting the REIE
  27179. bit to 1 while the RIE bit is cleared to 0, it is possible to output ERI and BRI interrupt requests,
  27180. but not RXI interrupt requests.
  27181.  
  27182. When the TDFE flag in the serial status register (SCFSR2) is set to 1, a transmit-FIFO-data-
  27183. empty request is generated separately from the interrupt request. A transmit-FIFO-data-empty
  27184. request can activate the DMAC to perform data transfer.
  27185.  
  27186. When the RDF flag or DR flag in SCFSR2 is set to 1, a receive-FIFO-data-full request is
  27187. generated separately from the interrupt request. A receive-FIFO-data-full request can activate
  27188. the DMAC to perform data transfer.
  27189.  
  27190. When using the DMAC for transmission/reception, set and enable the DMAC before making the
  27191. SCIF settings. See section 14, Direct Memory Access Controller (DMAC), for details of the
  27192. DMAC setting procedure.
  27193.  
  27194. When the BRK flag in SCFSR2 or the ORER flag in the line status register (SCLSR2) is set to 1,
  27195. a BRI interrupt request is generated.
  27196.  
  27197. The TXI interrupt indicates that transmit data can be written, and the RXI interrupt indicates that
  27198. there is receive data in SCFRDR2.
  27199.  
  27200. Table 16.6 SCIF Interrupt Sources
  27201.  
  27202. Interrupt DMAC Priority on
  27203. Source Description Activation Reset Release
  27204.  
  27205. ERI Interrupt initiated by receive error flag (ER) Not possible High
  27206.  
  27207. RXI Interrupt initiated by receive FIFO data full flag Possible ↑
  27208. (RDF) or receive data ready flag (DR)
  27209.  
  27210. BRI Interrupt initiated by break flag (BRK) or overrun Not possible
  27211. error flag (ORER) ↓
  27212.  
  27213. TXI Interrupt initiated by transmit FIFO data empty Possible Low
  27214. flag (TDFE)
  27215.  
  27216. Rev. 2.0, 02/99, page 582 of 830
  27217.  
  27218. ----------------------- Page 597-----------------------
  27219.  
  27220. See section 5, Exceptions, for priorities and the relationship with non-SCIF interrupts.
  27221.  
  27222. 16.5 Usage Notes
  27223.  
  27224. Note the following when using the SCIF.
  27225.  
  27226. SCFTDR2 Writing and the TDFE Flag: The TDFE flag in the serial status register (SCFSR2)
  27227. is set when the number of transmit data bytes written in the transmit FIFO data register
  27228. (SCFTDR2) has fallen to or below the transmit trigger number set by bits TTRG1 and TTRG0 in
  27229. the FIFO control register (SCFCR2). After TDFE is set, transmit data up to the number of empty
  27230. bytes in SCFTDR2 can be written, allowing efficient continuous transmission.
  27231.  
  27232. However, if the number of data bytes written in SCFTDR2 is equal to or less than the transmit
  27233. trigger number, the TDFE flag will be set to 1 again after being read as 1 and cleared to 0. TDFE
  27234. clearing should therefore be carried out when SCFTDR2 contains more than the transmit trigger
  27235. number of transmit data bytes.
  27236.  
  27237. The number of transmit data bytes in SCFTDR2 can be found from the upper 8 bits of the FIFO
  27238. data count register (SCFDR2).
  27239.  
  27240. SCFRDR2 Reading and the RDF Flag: The RDF flag in the serial status register (SCFSR2) is
  27241. set when the number of receive data bytes in the receive FIFO data register (SCFRDR2) has
  27242. become equal to or greater than the receive trigger number set by bits RTRG1 and RTRG0 in the
  27243. FIFO control register (SCFCR2). After RDF is set, receive data equivalent to the trigger number
  27244. can be read from SCFRDR2, allowing efficient continuous reception.
  27245.  
  27246. However, if the number of data bytes in SCFRDR2 is equal to or greater than the trigger
  27247. number, the RDF flag will be set to 1 again if it is cleared to 0. RDF should therefore be cleared
  27248. to 0 after being read as 1 after all the receive data has been read.
  27249.  
  27250. The number of receive data bytes in SCFRDR2 can be found from the lower 8 bits of the FIFO
  27251. data count register (SCFDR2).
  27252.  
  27253. Break Detection and Processing: Break signals can be detected by reading the RxD2 pin
  27254. directly when a framing error (FER) is detected. In the break state the input from the RxD2 pin
  27255. consists of all 0s, so the FER flag is set and the parity error flag (PER) may also be set.
  27256.  
  27257. Although the SCIF stops transferring receive data to SCFRDR2 after receiving a break, the
  27258. receive operation continues.
  27259.  
  27260. Sending a Break Signal: The input/output condition and level of the TxD2 pin are determined
  27261. by bits SPB2IO and SPB2DT in the serial port register (SCSPTR2). This feature can be used to
  27262. send a break signal.
  27263.  
  27264. Rev. 2.0, 02/99, page 583 of 830
  27265.  
  27266. ----------------------- Page 598-----------------------
  27267.  
  27268. After the serial transmitter is initialized, the TxD2 pin function is not selected and the value of
  27269. the SPB2DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  27270. enabled). The SPB2IO and SPB2DT bits should therefore be set to 1 (designating output and
  27271. high level) beforehand.
  27272.  
  27273. To send a break signal during serial transmission, clear the SPB2DT bit to 0 (designating low
  27274. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  27275. transmitter is initialized, regardless of its current state, and 0 is output from the TxD2 pin.
  27276.  
  27277. Receive Data Sampling Timing and Receive Margin: The SCIF operates on a base clock with
  27278. a frequency of 16 times the bit rate. In reception, the SCIF synchronizes internally with the fall
  27279. of the start bit, which it samples on the base clock. Receive data is latched at the rising edge of
  27280. the eighth base clock pulse. The timing is shown in figure 16.13.
  27281.  
  27282. 16 clocks
  27283.  
  27284. 8 clocks
  27285.  
  27286. 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
  27287.  
  27288. Base clock
  27289.  
  27290. –7.5 clocks +7.5 clocks
  27291.  
  27292. Receive data Start bit D0 D1
  27293. (RxD2)
  27294.  
  27295. Synchronization
  27296. sampling timing
  27297.  
  27298. Data sampling
  27299. timing
  27300.  
  27301. Figure 16.13 Receive Data Sampling Timing in Asynchronous Mode
  27302.  
  27303. Rev. 2.0, 02/99, page 584 of 830
  27304.  
  27305. ----------------------- Page 599-----------------------
  27306.  
  27307. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  27308.  
  27309. M = (0.5 – 1 ) – (L – 0.5) F – | D – 0.5 | (1 + F) × 100% ..................... (1)
  27310. 2N N
  27311.  
  27312. M: Receive margin (%)
  27313. N: Ratio of clock frequency to bit rate (N = 16)
  27314. D: Clock duty cycle (D = 0 to 1.0)
  27315. L: Frame length (L = 9 to 12)
  27316. F: Absolute deviation of clock frequency
  27317.  
  27318. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation
  27319. (2).
  27320.  
  27321. When D = 0.5 and F = 0:
  27322.  
  27323. M = (0.5 – 1 / (2 × 16) ) × 100% = 46.875% ........................................... (2)
  27324.  
  27325. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  27326.  
  27327. SCK2/MRESET: As the manual reset pin is multiplexed with the SCK2 pin, a manual reset
  27328. must not be executed while the SCIF is operating in external clock mode.
  27329.  
  27330. When Using the DMAC: When using the DMAC for transmission/reception, inhibit output of
  27331. RXI and TXI interrupt requests to the interrupt controller. If interrupt request output is enabled,
  27332. interrupt requests to the interrupt controller will be cleared by the DMAC without regard to the
  27333. interrupt handler.
  27334.  
  27335. Serial Ports: Note that, when the SCIF pin value is read using a serial port, the value read will
  27336. be the value two peripheral clock cycles earlier.
  27337.  
  27338. Overrun error flag: SCIF overrun error flag is not set in the case that overrun error and flaming
  27339. error occurred simultaneously in receiving data, that means 17th byte data which overrun was
  27340. accompanying with flaming error. In such case, only SCFSR2. ER flag which shows occurrence
  27341. of flaming error is set. RxFIFO stores data received before the overrun and does not store (i. e.
  27342. lose) overrun data. SCIF has no bit which corresponds to SCFSR2. FER for the lost data.
  27343.  
  27344. In addition to the overrun error handling software routine, exception handler should check co-
  27345. occurrence of overrun error when a flaming error is occurred and when a co-occurrence is found,
  27346. it should handle also overrun error (When (i) a overrun error solely occurred without
  27347. accompanying with other receive error and (ii) when a parity error is accompanied with overrun
  27348. error, usual overrun error handling can be used. Overrun error handling should rather be done
  27349. primarily).
  27350.  
  27351. Rev. 2.0, 02/99, page 585 of 830
  27352.  
  27353. ----------------------- Page 600-----------------------
  27354.  
  27355. Flow chart:
  27356. Framing error occurrence
  27357. When flaming error (SCFSR. ER=1) is occurred, bit7 to
  27358.  
  27359. bit0 should be read out from SCFDR2. If bit7 to bit0
  27360. Bits 7 to 0 No
  27361. in SCFDR2 = H'10? equals H'10, contents of the RxFIFO should be read.
  27362.  
  27363. When the data received last is not accompanied with
  27364. Yes
  27365. flaming error (SCFSR2. FER=0) both overrun error
  27366. Normal error handling
  27367. handling and flaming error handling shoud be
  27368.  
  27369. PER or FER bit Yes conducted.
  27370. in SCFSR2 set to 1?
  27371.  
  27372.  
  27373. No
  27374. Error handling
  27375.  
  27376. Read receive FIFO
  27377.  
  27378. No
  27379. Last data?
  27380.  
  27381. Yes
  27382.  
  27383. Overrun error handling
  27384. +
  27385. framing error handling
  27386.  
  27387. Figure 16.14 Overrun Error Flag
  27388.  
  27389. Rev. 2.0, 02/99, page 586 of 830
  27390.  
  27391. ----------------------- Page 601-----------------------
  27392.  
  27393. Section 17 Smart Card Interface
  27394.  
  27395. 17.1 Overview
  27396.  
  27397. An IC card (smart card) interface conforming to ISO/IEC 7816-3 (Identification Card) is
  27398. supported as a serial communication interface (SCI) extension function.
  27399.  
  27400. Switching between the normal serial communication interface and the smart card interface is
  27401. carried out by means of a register setting.
  27402.  
  27403. 17.1.1 Features
  27404.  
  27405. Features of the smart card interface are listed below.
  27406.  
  27407. • Asynchronous mode
  27408.  Data length: 8 bits
  27409.  Parity bit generation and checking
  27410.  Transmission of error signal (parity error) in receive mode
  27411.  Error signal detection and automatic data retransmission in transmit mode
  27412.  Direct convention and inverse convention both supported
  27413. • On-chip baud rate generator allows any bit rate to be selected
  27414. • Three interrupt sources
  27415. There are three interrupt sources—transmit-data-empty, receive-data-full, and
  27416. transmit/receive error—that can issue requests independently.
  27417. The transmit-data-empty interrupt and receive-data-full interrupt can activate the DMA
  27418. controller (DMAC) to execute data transfer.
  27419.  
  27420. Rev. 2.0, 02/99, page 587 of 830
  27421.  
  27422. ----------------------- Page 602-----------------------
  27423.  
  27424. 17.1.2 Block Diagram
  27425.  
  27426. Figure 17.1 shows a block diagram of the smart card interface.
  27427.  
  27428. e
  27429. c Internal
  27430. a
  27431. Module data bus f data bus
  27432. r
  27433. e
  27434. t
  27435. n
  27436. i
  27437.  
  27438. s
  27439. u
  27440. B
  27441.  
  27442. SCRDR1 SCTDR1 SCSCMR1 SCBRR1
  27443. SCSSR1
  27444. SCSCR1
  27445. RxD SCRSR1 SCTSR1
  27446. Baud rate
  27447. SCSMR1 Pφ/4
  27448. generator
  27449. SCSPTR1
  27450. Transmission/ Pφ/16
  27451. reception
  27452. control Pφ/64
  27453. TxD
  27454. Parity generation Clock
  27455.  
  27456. Parity check
  27457.  
  27458. External clock
  27459. SCK
  27460.  
  27461. TXI
  27462. RXI
  27463. ERI
  27464.  
  27465. SCI
  27466.  
  27467. SCSCMR1: Smart card mode register
  27468. SCRSR1: Receive shift register
  27469. SCRDR1: Receive data register
  27470. SCTSR1: Transmit shift register
  27471. SCTDR1: Transmit data register
  27472. SCSMR1: Serial mode register
  27473. SCSCR1: Serial control register
  27474. SCSSR1: Serial status register
  27475. SCBRR1: Bit rate register
  27476. SCSPTR1: Serial port register
  27477.  
  27478. Figure 17.1 Block Diagram of Smart Card Interface
  27479.  
  27480. Rev. 2.0, 02/99, page 588 of 830
  27481.  
  27482. ----------------------- Page 603-----------------------
  27483.  
  27484. 17.1.3 Pin Configuration
  27485.  
  27486. Table 17.1 shows the smart card interface pin configuration.
  27487.  
  27488. Table 17.1 Smart Card Interface Pins
  27489.  
  27490. Pin Name Abbreviation I/O Function
  27491.  
  27492. Serial clock pin MD0/SCK I/O Clock input/output
  27493.  
  27494. Receive data pin RxD Input Receive data input
  27495.  
  27496. Transmit data pin MD7/TxD Output Transmit data output
  27497.  
  27498. 17.1.4 Register Configuration
  27499.  
  27500. The smart card interface has the internal registers shown in table 17.2. Details of the SCBRR1,
  27501. SCTDR1, SCRDR1, and SCSPTR1 registers are the same as for the normal SCI function: see the
  27502. register descriptions in section 15, Serial Communication Interface.
  27503.  
  27504. With the exception of the serial port register, the smart card interface registers are initialized in
  27505. standby mode and in the module standby state as well as by a power-on reset or manual reset.
  27506. When recovering from standby mode or the module standby state, the registers must be set
  27507. again.
  27508.  
  27509. Table 17.2 Smart Card Interface Registers
  27510.  
  27511. Initial Area 7 Access
  27512. Name Abbreviation R/W Value P4 Address Address Size
  27513.  
  27514. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  27515.  
  27516. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  27517.  
  27518. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  27519.  
  27520. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  27521. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  27522.  
  27523. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  27524.  
  27525. Smart card mode SCSCMR1 R/W H'00 H'FFE00018 H'1FE00018 8
  27526. register
  27527. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  27528.  
  27529. Notes: 1. Only 0 can be written, to clear flags.
  27530. 2. The value of bits 2 and 0 is undefined.
  27531.  
  27532. Rev. 2.0, 02/99, page 589 of 830
  27533.  
  27534. ----------------------- Page 604-----------------------
  27535.  
  27536. 17.2 Register Descriptions
  27537.  
  27538. Only registers that have been added, and bit functions that have been modified, for the smart
  27539. card interface are described here.
  27540.  
  27541. 17.2.1 Smart Card Mode Register (SCSCMR1)
  27542.  
  27543. SCSCMR1 is an 8-bit readable/writable register that selects the smart card interface function.
  27544. SCSCMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in
  27545. the module standby state.
  27546.  
  27547. Bit: 7 6 5 4 3 2 1 0
  27548.  
  27549. — — — — SDIR SINV — SMIF
  27550.  
  27551. Initial value: — — — — 0 0 — 0
  27552.  
  27553. R/W: — — — — R/W R/W — R/W
  27554.  
  27555. Bits 7 to 4 and 1—Reserved: These bits are always read as 0, and should only be written with
  27556. 0.
  27557.  
  27558. Bit 3—Smart Card Data Transfer Direction (SDIR): Selects the serial/parallel conversion
  27559. format.
  27560.  
  27561. Bit 3: SDIR Description
  27562.  
  27563. 0 SCTDR1 contents are transmitted LSB-first (Initial value)
  27564.  
  27565. Receive data is stored in SCRDR1 LSB-first
  27566.  
  27567. 1 SCTDR1 contents are transmitted MSB-first
  27568.  
  27569. Receive data is stored in SCRDR1 MSB-first
  27570.  
  27571. Bit 2—Smart Card Data Invert (SINV): Specifies inversion of the data logic level. This
  27572. function is used together with the bit 3 function for communication with an inverse convention
  27573. card. The SINV bit does not affect the logic level of the parity bit. For parity-related setting
  27574. procedures, see section 17.3.4, Register Settings.
  27575.  
  27576. Bit 2: SINV Description
  27577.  
  27578. 0 SCTDR1 contents are transmitted as they are (Initial value)
  27579.  
  27580. Receive data is stored in SCRDR1 as it is
  27581.  
  27582. 1 SCTDR1 contents are inverted before being transmitted
  27583.  
  27584. Receive data is stored in SCRDR1 in inverted form
  27585.  
  27586. Rev. 2.0, 02/99, page 590 of 830
  27587.  
  27588. ----------------------- Page 605-----------------------
  27589.  
  27590. Bit 0—Smart Card Interface Mode Select (SMIF): Enables or disables the smart card
  27591. interface function.
  27592.  
  27593. Bit 0: SMIF Description
  27594.  
  27595. 0 Smart card interface function is disabled (Initial value)
  27596.  
  27597. 1 Smart card interface function is enabled
  27598.  
  27599. 17.2.2 Serial Mode Register (SCSMR1)
  27600.  
  27601. Bit 7 of SCSMR1 has a different function in smart card interface mode.
  27602.  
  27603. Bit: 7 6 5 4 3 2 1 0
  27604.  
  27605. GM(C/$) CHR PE O/( STOP MP CKS1 CKS0
  27606.  
  27607. Initial value: 0 0 0 0 0 0 0 0
  27608.  
  27609. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27610.  
  27611. Bit 7—GSM Mode (GM): Sets the smart card interface function to GSM mode.
  27612.  
  27613. With the normal smart card interface, this bit is cleared to 0. Setting this bit to 1 selects GSM
  27614. mode, an additional mode for controlling the timing for setting the TEND flag that indicates
  27615. completion of transmission, and the type of clock output used. The details of the additional clock
  27616. output control mode are specified by the CKE1 and CKE0 bits in the serial control register
  27617. (SCSCR1). In GSM mode, the pulse width is guaranteed when SCK start/stop specifications are
  27618. made by CKE1 and CKE0.
  27619.  
  27620. Bit 7: GM Description
  27621.  
  27622. 0 Normal smart card interface mode operation (Initial value)
  27623.  
  27624. • The TEND flag is set 12.5 etu after the beginning of the start bit
  27625.  
  27626. • Clock output on/off control only
  27627.  
  27628. 1 GSM mode smart card interface mode operation
  27629.  
  27630. • The TEND flag is set 11.0 etu after the beginning of the start bit
  27631.  
  27632. • Clock output on/off and fixed-high/fixed-low control (set in SCSCR1)
  27633.  
  27634. Note: etu: Elementary time unit (time for transfer of 1 bit)
  27635.  
  27636. Bits 6 to 0: Operate in the same way as for the normal SCI. See section 15, Serial
  27637. Communication Interface, for details. With the smart card interface, the following settings
  27638. should be used: CHR = 0, PE = 1, STOP = 1, MP = 0.
  27639.  
  27640. Rev. 2.0, 02/99, page 591 of 830
  27641.  
  27642. ----------------------- Page 606-----------------------
  27643.  
  27644. 17.2.3 Serial Control Register (SCSCR1)
  27645.  
  27646. Bits 1 and 0 of SCSCR1 have a different function in smart card interface mode.
  27647.  
  27648. Bit: 7 6 5 4 3 2 1 0
  27649.  
  27650. TIE RIE TE RE — — CKE1 CKE0
  27651.  
  27652. Initial value: 0 0 0 0 0 0 0 0
  27653.  
  27654. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27655.  
  27656. Bits 7 to 4: Operate in the same way as for the normal SCI. See section 15, Serial
  27657. Communication Interface, for details.
  27658.  
  27659. Bits 3 and 2: Not used with the smart card interface.
  27660.  
  27661. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits specify the function of the
  27662. SCK pin. In smart card interface mode, an internal clock is always used as the clock source. In
  27663. smart card interface mode, it is possible to specify a fixed high level or fixed low level for the
  27664. clock output, in addition to the usual switching between enabling and disabling of the clock
  27665. output.
  27666.  
  27667. GM CKE1 CKE0 SCK Pin Function
  27668.  
  27669. 0 0 0 Port I/O pin
  27670.  
  27671. 1 Clock output as SCK output pin
  27672.  
  27673. 1 0 Invalid setting: must not be used
  27674.  
  27675. 1 Invalid setting: must not be used
  27676.  
  27677. 1 0 0 Output pin with output fixed low
  27678.  
  27679. 1 Clock output as output pin
  27680.  
  27681. 1 0 Output pin with output fixed high
  27682.  
  27683. 1 Clock output as output pin
  27684.  
  27685. Rev. 2.0, 02/99, page 592 of 830
  27686.  
  27687. ----------------------- Page 607-----------------------
  27688.  
  27689. 17.2.4 Serial Status Register (SCSSR1)
  27690.  
  27691. Bit 4 of SCSSR1 has a different function in smart card interface mode. Coupled with this, the
  27692. setting conditions for bit 2 (TEND) are also different.
  27693.  
  27694. Bit: 7 6 5 4 3 2 1 0
  27695.  
  27696. TDRE RDRF ORER FER/ PER TEND — —
  27697. ERS
  27698.  
  27699. Initial value: 1 0 0 0 0 1 0 0
  27700.  
  27701. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  27702.  
  27703. Note: * Only 0 can be written, to clear the flag.
  27704.  
  27705. Bits 7 to 5: Operate in the same way as for the normal SCI. See section 15, Serial
  27706. Communication Interface, for details.
  27707.  
  27708. Bit 4—Error Signal Status (ERS): In smart card interface mode, bit 4 indicates the status of
  27709. the error signal sent back from the receiving side during transmission. Framing errors are not
  27710. detected in smart card interface mode.
  27711.  
  27712. Bit 4: ERS Description
  27713.  
  27714. 0 Normal reception, no error signal (Initial value)
  27715.  
  27716. [Clearing conditions]
  27717.  
  27718. • Power-on reset, manual reset, standby mode, or module standby
  27719.  
  27720. • When 0 is written to ERS after reading ERS = 1
  27721.  
  27722. 1 An error signal has been sent from the receiving side indicating detection of
  27723. a parity error
  27724.  
  27725. [Setting condition]
  27726.  
  27727. • When the low level of the error signal is detected
  27728.  
  27729. Note: Clearing the TE bit in SCSCR1 to 0 does not affect the ERS flag, which retains its previous
  27730. state.
  27731.  
  27732. Bit 3—Parity Error (PER): Operates in the same way as for the normal SCI. See section 15,
  27733. Serial Communication Interface, for details.
  27734.  
  27735. Rev. 2.0, 02/99, page 593 of 830
  27736.  
  27737. ----------------------- Page 608-----------------------
  27738.  
  27739. Bit 2—Transmit End (TEND): The setting conditions for the TEND flag are as follows.
  27740.  
  27741. Bit 2: TEND Description
  27742.  
  27743. 0 Transmission in progress
  27744.  
  27745. [Clearing condition]
  27746.  
  27747. •• When 0 is written to TDRE after reading TDRE = 1
  27748.  
  27749. 1 Transmission has been ended (Initial value)
  27750.  
  27751. [Setting conditions]
  27752.  
  27753. • Power-on reset, manual reset, standby mode, or module standby
  27754.  
  27755. • When the TE bit in SCSCR1 is 0 and the FER/ERS bit is also 0
  27756.  
  27757. • When the GM bit in SCSMR1 is 0, and TDRE = 1 and FER/ERS = 0
  27758. (normal transmission) 2.5 etu after transmission of a 1-byte serial
  27759. character
  27760.  
  27761. • When the GM bit in SCSMR1 is 1, and TDRE = 1 and FER/ERS = 0
  27762. (normal transmission) 1.0 etu after transmission of a 1-byte serial
  27763. character
  27764.  
  27765. etu: Elementary Time Unit
  27766.  
  27767. Bits 1 and 0: Not used with the smart card interface.
  27768.  
  27769. Rev. 2.0, 02/99, page 594 of 830
  27770.  
  27771. ----------------------- Page 609-----------------------
  27772.  
  27773. 17.3 Operation
  27774.  
  27775. 17.3.1 Overview
  27776.  
  27777. The main functions of the smart card interface are as follows.
  27778.  
  27779. • One frame consists of 8-bit data plus a parity bit.
  27780. • In transmission, a guard time of at least 2 etu (elementary time unit: the time for transfer of
  27781. one bit) is left between the end of the parity bit and the start of the next frame.
  27782. • If a parity error is detected during reception, a low error signal level is output for a 1-etu
  27783. period 10.5 etu after the start bit.
  27784. • If an error signal is detected during transmission, the same data is transmitted automatically
  27785. after the elapse of 2 etu or longer.
  27786. • Only asynchronous communication is supported; there is no synchronous communication
  27787. function.
  27788.  
  27789. Rev. 2.0, 02/99, page 595 of 830
  27790.  
  27791. ----------------------- Page 610-----------------------
  27792.  
  27793. 17.3.2 Pin Connections
  27794.  
  27795. Figure 17.2 shows a schematic diagram of smart card interface related pin connections.
  27796.  
  27797. In communication with an IC card, since both transmission and reception are carried out on a
  27798. single data transmission line, the TxD pin and RxD pin should be connected outside the chip.
  27799. The data transmission line should be pulled up on the VCC power supply side with a resistor.
  27800. The TxD pin is multiplexed with MD7, so caution is required in a reset.
  27801.  
  27802. When the clock generated on the smart card interface is used by an IC card, the SCK pin output
  27803. is input to the CLK pin of the IC card. No connection is needed if the IC card uses an internal
  27804. clock.
  27805.  
  27806. Chip port output is used as the reset signal.
  27807.  
  27808. Other pins must normally be connected to the power supply or ground.
  27809.  
  27810. Note: If an IC card is not connected, and both TE and RE are set to 1, closed
  27811. transmission/reception is possible, enabling self-diagnosis to be carried out.
  27812.  
  27813. VCC
  27814.  
  27815.  
  27816. TxD
  27817. IO
  27818. Data line
  27819. RxD
  27820.  
  27821. SCK Clock line
  27822. CLK
  27823.  
  27824. SH7750 Px (port) Reset line RST
  27825.  
  27826. Connected equipment IC card
  27827.  
  27828. Figure 17.2 Schematic Diagram of Smart Card Interface Pin Connections
  27829.  
  27830. Rev. 2.0, 02/99, page 596 of 830
  27831.  
  27832. ----------------------- Page 611-----------------------
  27833.  
  27834. 17.3.3 Data Format
  27835.  
  27836. Figure 17.3 shows the smart card interface data format. In reception in this mode, a parity check
  27837. is carried out on each frame, and if an error is detected an error signal is sent back to the
  27838. transmitting side to request retransmission of the data. If an error signal is detected during
  27839. transmission, the same data is retransmitted.
  27840.  
  27841. When there is no parity error
  27842.  
  27843. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  27844.  
  27845. Transmitting station output
  27846.  
  27847. When a parity error occurs
  27848.  
  27849. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp DE
  27850.  
  27851. Transmitting station output
  27852.  
  27853. Receiving
  27854. station
  27855. Ds: Start bit output
  27856. D0–D7: Data bits
  27857. Dp: Parity bit
  27858. DE: Error signal
  27859.  
  27860.  
  27861. Figure 17.3 Smart Card Interface Data Format
  27862.  
  27863. Rev. 2.0, 02/99, page 597 of 830
  27864.  
  27865. ----------------------- Page 612-----------------------
  27866.  
  27867. The operation sequence is as follows.
  27868.  
  27869. 1. When the data line is not in use it is in the high-impedance state, and is fixed high with a
  27870. pull-up resistor.
  27871. 2. The transmitting station starts transmission of one frame of data. The data frame starts with a
  27872. start bit (Ds, low-level), followed by 8 data bits (D0 to D7) and a parity bit (Dp).
  27873. 3. With the smart card interface, the data line then returns to the high-impedance state. The data
  27874. line is pulled high with a pull-up resistor.
  27875. 4. The receiving station carries out a parity check.
  27876. If there is no parity error and the data is received normally, the receiving station waits for
  27877. reception of the next data.
  27878. If a parity error occurs, however, the receiving station outputs an error signal (DE, low-level)
  27879. to request retransmission of the data. After outputting the error signal for the prescribed
  27880. length of time, the receiving station places the signal line in the high-impedance state again.
  27881. The signal line is pulled high again by a pull-up resistor.
  27882. 5. If the transmitting station does not receive an error signal, it proceeds to transmit the next
  27883. data frame.
  27884. If it receives an error signal, however, it returns to step 2 and retransmits the erroneous data.
  27885.  
  27886. 17.3.4 Register Settings
  27887.  
  27888. Table 17.3 shows a bit map of the registers used by the smart card interface. Bits indicated as 0
  27889. or 1 must be set to the value shown. The setting of other bits is described below.
  27890.  
  27891. Table 17.3 Smart Card Interface Register Settings
  27892.  
  27893. Bit
  27894.  
  27895. Register Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
  27896.  
  27897. SCSMR1 GM 0 1 O/( 1 0 CKS1 CKS0
  27898.  
  27899. SCBRR1 BRR7 BRR6 BRR5 BRR4 BRR3 BRR2 BRR1 BRR0
  27900.  
  27901. SCSCR1 TIE RIE TE RE 0 0 CKE1 CKE0
  27902.  
  27903. SCTDR1 TDR7 TDR6 TDR5 TDR4 TDR3 TDR2 TDR1 TDR0
  27904.  
  27905. SCSSR1 TDRE RDRF ORER FER/ERS PER TEND 0 0
  27906.  
  27907. SCRDR1 RDR7 RDR6 RDR5 RDR4 RDR3 RDR2 RDR1 RDR0
  27908.  
  27909. SCSCMR1 — — — — SDIR SINV — SMIF
  27910.  
  27911. SCSPTR1 EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  27912.  
  27913. Note: A dash indicates an unused bit.
  27914.  
  27915. Rev. 2.0, 02/99, page 598 of 830
  27916.  
  27917. ----------------------- Page 613-----------------------
  27918.  
  27919. Serial Mode Register (SCSMR1) Settings: The GM bit is used to select the timing of TEND
  27920. flag setting, and, together with the CKE1 and CKE0 bits in the serial control register (SCSCR1),
  27921. to select the clock output state.
  27922.  
  27923. The O/( bit is cleared to 0 if the IC card is of the direct convention type, and set to 1 if of the
  27924. inverse convention type.
  27925.  
  27926. Bits CKS1 and CKS0 select the clock source of the on-chip baud rate generator. See section
  27927. 17.3.5, Clock.
  27928.  
  27929. I/O data Ds Da Db Dc Dd De Df Dg Dh Dp DE
  27930.  
  27931. Guard
  27932. time
  27933.  
  27934. 12.5 etu
  27935. TXI
  27936. GM = 0
  27937. (TEND interrupt)
  27938.  
  27939. 11.0 etu
  27940. GM = 1
  27941.  
  27942. Figure 17.4 TEND Generation Timing
  27943.  
  27944. Bit Rate Register (SCBRR1) Setting: SCBRR1 is used to set the bit rate. See section 17.3.5,
  27945. Clock, for the method of calculating the value to be set.
  27946.  
  27947. Serial Control Register (SCSCR1) Settings: The function of the TIE, RIE, TE, and RE bits is
  27948. the same as for the normal SCI. See section 15, Serial Communication Interface, for details.
  27949.  
  27950. The CKE1 and CKE0 bits specify the clock output state. See section 17.3.5, Clock, for details.
  27951.  
  27952. Smart Card Mode Register (SCSCMR1) Settings: The SDIR bit and SINV bit are both
  27953. cleared to 0 if the IC card is of the direct convention type, and both set to 1 if of the inverse
  27954. convention type.
  27955.  
  27956. The SMIF bit is set to 1 when the smart card interface is used.
  27957.  
  27958. Figure 17.5 shows examples of register settings and the waveform of the start character for the
  27959. two types of IC card (direct convention and inverse convention).
  27960.  
  27961. With the direct convention type, the logic 1 level corresponds to state Z and the logic 0 level to
  27962. state A, and transfer is performed in LSB-first order. The start character data in this case is
  27963. H'3B. The parity bit is 1 since even parity is stipulated for the smart card.
  27964.  
  27965. Rev. 2.0, 02/99, page 599 of 830
  27966.  
  27967. ----------------------- Page 614-----------------------
  27968.  
  27969. With the inverse convention type, the logic 1 level corresponds to state A and the logic 0 level to
  27970. state Z, and transfer is performed in MSB-first order. The start character data in this case is
  27971. H'3F. The parity bit is 0, corresponding to state Z, since even parity is stipulated for the smart
  27972. card.
  27973.  
  27974. Inversion specified by the SINV bit applies only to the data bits, D7 to D0. For parity bit
  27975. inversion, the O/( bit in SCSMR1 is set to odd parity mode. (This applies to both transmission
  27976. and reception).
  27977.  
  27978. (Z) A Z Z A Z Z Z A A Z (Z) State
  27979.  
  27980. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  27981.  
  27982. (a) Direct convention (SDIR = SINV = O/E = 0)
  27983.  
  27984. (Z) A Z Z A A A A A A Z (Z) State
  27985.  
  27986. Ds D7 D6 D5 D4 D3 D2 D1 D0 Dp
  27987.  
  27988. (b) Inverse convention (SDIR = SINV = O/E = 1)
  27989.  
  27990. Figure 17.5 Sample Start Character Waveforms
  27991.  
  27992. Rev. 2.0, 02/99, page 600 of 830
  27993.  
  27994. ----------------------- Page 615-----------------------
  27995.  
  27996. 17.3.5 Clock
  27997.  
  27998. Only an internal clock generated by the on-chip baud rate generator can be used as the
  27999. transmit/receive clock for the smart card interface. The bit rate is set with the bit rate register
  28000. (SCBRR1) and the CKS1 and CKS0 bits in the serial mode register (SCSMR1). The equation for
  28001. calculating the bit rate is shown below. Table 17.5 shows some sample bit rates.
  28002.  
  28003. If clock output is selected with CKE0 set to 1, a clock with a frequency of 372 times the bit rate
  28004. is output from the SCK pin.
  28005.  
  28006.  
  28007. P
  28008. B = φ × 106
  28009. 1488 × 22n–1 × (N + 1)
  28010.  
  28011. Where: N = Value set in SCBRR1 (0 ≤ N ≤ 255)
  28012. B = Bit rate (bits/s)
  28013. Pφ = Peripheral module operating frequency (MHz)
  28014. n = 0 to 3 (See table 17.4)
  28015.  
  28016. Table 17.4 Values of n and Corresponding CKS1 and CKS0 Settings
  28017.  
  28018. n CKS1 CKS0
  28019.  
  28020. 0 0 0
  28021.  
  28022. 1 0 1
  28023.  
  28024. 2 1 0
  28025.  
  28026. 3 1 1
  28027.  
  28028. Table 17.5 Examples of Bit Rate B (bits/s) for Various SCBRR1 Settings (When n = 0)
  28029.  
  28030. Pφφ (MHz)
  28031.  
  28032. N 7.1424 10.00 10.7136 14.2848 25.0 33.0 50.0
  28033.  
  28034. 0 9600.0 13440.9 14400.0 19200.0 33602.2 44354.8 67204.3
  28035.  
  28036. 1 4800.0 6720.4 7200.0 9600.0 16801.1 22177.4 33602.2
  28037.  
  28038. 2 3200.0 4480.3 4800.0 6400.0 11200.7 14784.9 22401.4
  28039.  
  28040. Note: Bit rates are rounded to one decimal place.
  28041.  
  28042. Rev. 2.0, 02/99, page 601 of 830
  28043.  
  28044. ----------------------- Page 616-----------------------
  28045.  
  28046. The method of calculating the value to be set in the bit rate register (SCBRR1) from the
  28047. peripheral module operating frequency and bit rate is shown below. Here, N is an integer in the
  28048. range 0 ≤ N ≤ 255, and the smaller error is specified.
  28049.  
  28050.  
  28051. P
  28052. φ 6
  28053. N = × 10 – 1
  28054. 1488 × 22n–1 × B
  28055.  
  28056. Table 17.6 Examples of SCBRR1 Settings for Bit Rate B (bits/s) (When n = 0)
  28057.  
  28058. Pφφ (MHz)
  28059.  
  28060. 7.1424 10.00 10.7136 14.2848 25.00 33.00 50.00
  28061.  
  28062. Bits/s N Error N Error N Error N Error N Error N Error N Error
  28063.  
  28064. 9600 0 0.00 1 30.00 1 25.00 1 8.99 3 14.27 4 8.22 6 0.01
  28065.  
  28066. Table 17.7 Maximum Bit Rate at Various Frequencies (Smart Card Interface Mode)
  28067.  
  28068. Pφφ (MHz) Maximum Bit Rate (bits/s) N n
  28069.  
  28070. 7.1424 19200 0 0
  28071.  
  28072. 10.00 26882 0 0
  28073.  
  28074. 10.7136 28800 0 0
  28075.  
  28076. 16.00 43010 0 0
  28077.  
  28078. 20.00 53763 0 0
  28079.  
  28080. 25.0 67204 0 0
  28081.  
  28082. 30.0 80645 0 0
  28083.  
  28084. 33.0 88710 0 0
  28085.  
  28086. 50.0 67204 0 0
  28087.  
  28088. The bit rate error is given by the following equation:
  28089.  
  28090. φ
  28091. P
  28092. Error (%) = 1488 × 22n–1 × B × (N + 1) × 106 – 1 × 100
  28093.  
  28094. Table 17.8 shows the relationship between the smart card interface transmit/receive clock
  28095. register settings and the output state.
  28096.  
  28097. Rev. 2.0, 02/99, page 602 of 830
  28098.  
  28099. ----------------------- Page 617-----------------------
  28100.  
  28101. Table 17.8 Register Settings and SCK Pin State
  28102.  
  28103. Register Values SCK Pin
  28104.  
  28105. Setting SMIF GM CKE1 CKE0 Output State
  28106. 1*1 1 0 0 0 Port Determined by setting of SPB1IO
  28107.  
  28108. and SPB1DT bits in SCSPTR1
  28109.  
  28110. 1 0 0 1 SCK (serial clock) output state
  28111. 2*2 1 1 0 0 Low output Low-level output state
  28112.  
  28113. 1 1 0 1 SCK (serial clock) output state
  28114. 3*2 1 1 1 0 High output High-level output state
  28115.  
  28116. 1 1 1 1 SCK (serial clock) output state
  28117.  
  28118. Notes: 1. The SCK output state changes as soon as the CKE0 bit setting is changed.
  28119. Clear the CKE1 bit to 0.
  28120. 2. Stopping and starting the clock by changing the CKE0 bit setting does not affect the
  28121. clock duty cycle.
  28122.  
  28123. Width is Width is
  28124. Port value
  28125. undefined undefined Port value
  28126.  
  28127. SCK
  28128.  
  28129. (a) When GM = 0
  28130.  
  28131. CKE1 value Specified Specified
  28132. width width CKE1 value
  28133.  
  28134. SCK
  28135.  
  28136. (b) When GM = 1
  28137.  
  28138. Figure 17.6 Difference in Clock Output According to GM Bit Setting
  28139.  
  28140. Rev. 2.0, 02/99, page 603 of 830
  28141.  
  28142. ----------------------- Page 618-----------------------
  28143.  
  28144. 17.3.6 Data Transfer Operations
  28145.  
  28146. Initialization: Before transmitting and receiving data, the smart card interface must be
  28147. initialized as described below. Initialization is also necessary when switching from transmit
  28148. mode to receive mode, or vice versa. Figure 17.7 shows a sample initialization processing
  28149. flowchart.
  28150.  
  28151. 1. Clear the TE and RE bits in the serial control register (SCSCR1) to 0.
  28152. 2. Clear error flags FER/ERS, PER, and ORER in the serial status register (SCSSR1) to 0.
  28153. 3. Set the GM bit, parity bit (O/(), and baud rate generator select bits (CKS1 and CKS0) in the
  28154. serial mode register (SCSMR1). Clear the CHR and MP bits to 0, and set the STOP and PE
  28155. bits to 1.
  28156. 4. Set the SMIF, SDIR, and SINV bits in the smart card mode register (SCSCMR1).
  28157. When the SMIF bit is set to 1, the TxD pin and RxD pin both go to the high-impedance state.
  28158. 5. Set the value corresponding to the bit rate in the bit rate register (SCBRR1).
  28159. 6. Set the clock source select bits (CKE1 and CKE0) in SCSCR1. Clear the TIE, RIE, TE, RE,
  28160. MPIE, and TEIE bits to 0.
  28161. If the CKE0 bit is set to 1, the clock is output from the SCK pin.
  28162. 7. Wait at least one bit interval, then set the TIE, RIE, TE, and RE bits in SCSCR1. Do not set
  28163. the TE bit and RE bit at the same time, except for self-diagnosis.
  28164.  
  28165. Rev. 2.0, 02/99, page 604 of 830
  28166.  
  28167. ----------------------- Page 619-----------------------
  28168.  
  28169. Initialization
  28170.  
  28171. Clear TE and RE bits
  28172. 1
  28173. in SCSCR1 to 0
  28174.  
  28175. Clear FER/ERS, PER, and
  28176. 2
  28177. ORER flags in SCSCR1 to 0
  28178.  
  28179. In SCSMR1, set parity in O/E bit,
  28180. clock in CKS1 and CKS0 bits, 3
  28181. and set GM
  28182.  
  28183. Set SMIF, SDIR, and SINV bits
  28184. 4
  28185. in SCSCMR1
  28186.  
  28187. Set value in SCBRR1 5
  28188.  
  28189. In SCSCR1, set clock in CKE1
  28190. and CKE0 bits, and clear TIE, 6
  28191. RIE, TE, RE, MPIE, and
  28192. TEIE bits to 0.
  28193.  
  28194. Wait
  28195.  
  28196. No
  28197. 1-bit interval elapsed?
  28198.  
  28199. Yes
  28200.  
  28201. Set TIE, RIE, TE, and RE bits
  28202. 7
  28203. in SCSCR1
  28204.  
  28205. End
  28206.  
  28207. Figure 17.7 Sample Initialization Flowchart
  28208.  
  28209. Rev. 2.0, 02/99, page 605 of 830
  28210.  
  28211. ----------------------- Page 620-----------------------
  28212.  
  28213. Serial Data Transmission: As data transmission in smart card mode involves error signal
  28214. sampling and retransmission processing, the processing procedure is different from that for the
  28215. normal SCI. Figure 17.8 shows a sample transmission processing flowchart.
  28216.  
  28217. 1. Perform smart card interface mode initialization as described in Initialization above.
  28218. 2. Check that the FER/ERS error flag in SCSSR1 is cleared to 0.
  28219. 3. Repeat steps 2 and 3 until it can be confirmed that the TEND flag in SCSSR1 is set to 1.
  28220. 4. Write the transmit data to SCTDR1, clear the TDRE flag to 0, and perform the transmit
  28221. operation. The TEND flag is cleared to 0.
  28222. 5. To continue transmitting data, go back to step 2.
  28223. 6. To end transmission, clear the TE bit to 0.
  28224.  
  28225. With the above processing, interrupt handling is possible.
  28226.  
  28227. If transmission ends and the TEND flag is set to 1 while the TIE bit is set to 1 and interrupt
  28228. requests are enabled, a transmit-data-empty interrupt (TXI) request will be generated. If an error
  28229. occurs in transmission and the ERS flag is set to 1 while the RIE bit is set to 1 and interrupt
  28230. requests are enabled, a transmit/receive-error interrupt (ERI) request will be generated. See
  28231. Interrupt Operation below for details.
  28232.  
  28233. Rev. 2.0, 02/99, page 606 of 830
  28234.  
  28235. ----------------------- Page 621-----------------------
  28236.  
  28237. Start
  28238.  
  28239. Initialization 1
  28240.  
  28241. Start of transmission
  28242.  
  28243. 2
  28244. No
  28245. FER/ERS = 0?
  28246.  
  28247. Yes
  28248. Error handling
  28249.  
  28250. No
  28251. TEND = 1? 3
  28252.  
  28253. Yes
  28254.  
  28255. Write transmit data to SCTDR1,
  28256. and clear TDRE flag 4
  28257. in SCSSR1 to 0
  28258.  
  28259. No
  28260. All data transmitted? 5
  28261.  
  28262. Yes
  28263.  
  28264. No
  28265. FER/ERS = 0?
  28266.  
  28267. Yes
  28268. Error handling
  28269.  
  28270. No
  28271. TEND = 1?
  28272.  
  28273. Yes
  28274.  
  28275. Clear TE bit in SCSCR1 to 0 6
  28276.  
  28277. End of transmission
  28278.  
  28279. Figure 17.8 Sample Transmission Processing Flowchart
  28280.  
  28281. Rev. 2.0, 02/99, page 607 of 830
  28282.  
  28283. ----------------------- Page 622-----------------------
  28284.  
  28285. Serial Data Reception: Data reception in smart card mode uses the same processing procedure
  28286. as for the normal SCI. Figure 17.9 shows a sample reception processing flowchart.
  28287.  
  28288. 1. Perform smart card interface mode initialization as described in Initialization above.
  28289. 2. Check that the ORER flag and PER flag in SCSSR1 are cleared to 0. If either is set, perform
  28290. the appropriate receive error handling, then clear both the ORER and the PER flag to 0.
  28291. 3. Repeat steps 2 and 3 until it can be confirmed that the RDRF flag is set to 1.
  28292. 4. Read the receive data from SCRDR1.
  28293. 5. To continue receiving data, clear the RDRF flag to 0 and go back to step 2.
  28294. 6. To end reception, clear the RE bit to 0.
  28295.  
  28296. With the above processing, interrupt handling is possible.
  28297.  
  28298. If reception ends and the RDRF flag is set to 1 while the RIE bit is set to 1 and interrupt requests
  28299. are enabled, a receive-data-full interrupt (RXI) request will be generated. If an error occurs in
  28300. reception and either the ORER flag or the PER flag is set to 1, a transmit/receive-error interrupt
  28301. (ERI) request will be generated.
  28302.  
  28303. See Interrupt Operation below for details.
  28304.  
  28305. If a parity error occurs during reception and the PER flag is set to 1, the received data is still
  28306. transferred to SCRDR1, and therefore this data can be read.
  28307.  
  28308. Rev. 2.0, 02/99, page 608 of 830
  28309.  
  28310. ----------------------- Page 623-----------------------
  28311.  
  28312. Start
  28313.  
  28314. Initialization 1
  28315.  
  28316. Start of reception
  28317.  
  28318. 2
  28319. No
  28320. ORER = 0 and PER = 0?
  28321.  
  28322. Yes
  28323. Error handling
  28324.  
  28325. No
  28326. RDRF = 1? 3
  28327.  
  28328. Yes
  28329.  
  28330. Read receive data from
  28331. SCRDR1 and clear RDRF flag 4
  28332. in SCSSR1 to 0
  28333.  
  28334. No All data received? 5
  28335.  
  28336. Yes
  28337.  
  28338. Clear RE bit in SCSCR1 to 0 6
  28339.  
  28340. End of reception
  28341.  
  28342. Figure 17.9 Sample Reception Processing Flowchart
  28343.  
  28344. Mode Switching Operation: When switching from receive mode to transmit mode, first
  28345. confirm that the receive operation has been completed, then start from initialization, clearing RE
  28346. to 0 and setting TE to 1. The RDRF flag or the PER and ORER flags can be used to check that
  28347. the receive operation has been completed.
  28348.  
  28349. When switching from transmit mode to receive mode, first confirm that the transmit operation
  28350. has been completed, then start from initialization, clearing TE to 0 and setting RE to 1. The
  28351. TEND flag can be used to check that the transmit operation has been completed.
  28352.  
  28353. Rev. 2.0, 02/99, page 609 of 830
  28354.  
  28355. ----------------------- Page 624-----------------------
  28356.  
  28357. Interrupt Operation: There are three interrupt sources in smart card interface mode, generating
  28358. transmit-data-empty interrupt (TXI) requests, transmit/receive-error interrupt (ERI) requests, and
  28359. receive-data-full interrupt (RXI) requests. The transmit-end interrupt (TEI) request cannot be
  28360. used in this mode.
  28361.  
  28362. When the TEND flag in SCSSR1 is set to 1, a TXI interrupt request is generated.
  28363.  
  28364. When the RDRF flag in SCSSR1 is set to 1, an RXI interrupt request is generated.
  28365.  
  28366. When any of flags ORER, PER, and FER/ERS in SCSSR1 is set to 1, an ERI interrupt request is
  28367. generated. The relationship between the operating states and interrupt sources is shown in table
  28368. 17.9.
  28369.  
  28370. Table 17.9 Smart Card Mode Operating States and Interrupt Sources
  28371.  
  28372. Operating State Flag Mask Bit Interrupt Source
  28373.  
  28374. Transmit mode Normal operation TEND TIE TXI
  28375.  
  28376. Error FER/ERS RIE ERI
  28377.  
  28378. Receive mode Normal operation RDRF RIE RXI
  28379.  
  28380. Error PER, ORER RIE ERI
  28381.  
  28382. Data Transfer Operation by DMAC: In smart card mode, as with the normal SCI, transfer can
  28383. be carried out using the DMAC. In a transmit operation, when the TEND flag in SCSSR1 is set
  28384. to 1, a TXI interrupt is requested. If the TXI request is designated beforehand as a DMAC
  28385. activation source, the DMAC will be activated by the TXI request, and transfer of the transmit
  28386. data will be carried out. The TEND flag is automatically cleared to 0 when data transfer is
  28387. performed by the DMAC. In the event of an error, the SCI retransmits the same data
  28388. automatically. The TEND flag remains cleared to 0 during this time, and the DMAC is not
  28389. activated. Thus, the number of bytes specified by the SCI and DMAC are transmitted
  28390. automatically, including retransmission following an error. However, the ERS flag is not cleared
  28391. automatically when an error occurs, and therefore the RIE bit should be set to 1 beforehand so
  28392. that an ERI request will be generated in the event of an error, and the ERS flag will be cleared.
  28393.  
  28394. In a receive operation, an RXI interrupt request is generated when the RDRF flag in SCSSR1 is
  28395. set to 1. If the RXI request is designated beforehand as a DMAC activation source, the DMAC
  28396. will be activated by the RXI request, and transfer of the receive data will be carried out.. The
  28397. RDRF flag is cleared to 0 automatically when data transfer is performed by the DMAC. If an
  28398. error occurs, an error flag is set but the RDRF flag is not. The DMAC is not activated, but
  28399. instead, an ERI interrupt request is sent to the CPU. The error flag must therefore be cleared.
  28400.  
  28401. When performing data transfer using the DMAC, it is essential to set and enable the DMAC
  28402. before carrying out SCI settings. For details of the DMAC setting procedures, see section 14,
  28403. Direct Memory Access Controller (DMAC).
  28404.  
  28405. Rev. 2.0, 02/99, page 610 of 830
  28406.  
  28407. ----------------------- Page 625-----------------------
  28408.  
  28409. 17.4 Usage Notes
  28410.  
  28411. The following points should be noted when using the SCI as a smart card interface.
  28412.  
  28413. (1) Receive Data Sampling Timing and Receive Margin
  28414.  
  28415. In asynchronous mode, the SCI operates on a base clock with a frequency of 372 times the
  28416. transfer rate. In reception, the SCI synchronizes internally with the fall of the start bit, which it
  28417. samples on the base clock. Receive data is latched at the rising edge of the 186th base clock
  28418. pulse. The timing is shown in figure 17.10.
  28419.  
  28420. 372 clocks
  28421.  
  28422. 186 clocks
  28423.  
  28424. 0 185 371 0 185 371 0
  28425. Base clock
  28426.  
  28427. Start
  28428. Receive data
  28429. bit D0 D1
  28430. (RxD)
  28431.  
  28432. Synchronization
  28433. sampling timing
  28434.  
  28435. Data sampling
  28436. timing
  28437.  
  28438. Figure 17.10 Receive Data Sampling Timing in Smart Card Mode
  28439.  
  28440. The receive margin in smart card mode can therefore be expressed as shown in the following
  28441. equation.
  28442.  
  28443. 1 | D – 0.5 |
  28444. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100%
  28445. 2N N
  28446.  
  28447. M: Receive margin (%)
  28448. N: Ratio of clock frequency to bit rate (N = 372)
  28449. D: Clock duty cycle (D = 0 to 1.0)
  28450. L: Frame length (L =10)
  28451. F: Absolute deviation of clock frequency
  28452.  
  28453. Rev. 2.0, 02/99, page 611 of 830
  28454.  
  28455. ----------------------- Page 626-----------------------
  28456.  
  28457. From the above equation, if F = 0 and D = 0.5, the receive margin is 49.866%, as given by the
  28458. following equation.
  28459.  
  28460. When D = 0.5 and F = 0:
  28461.  
  28462. M = (0.5 – 1/2 × 372) × 100% = 49.866%
  28463.  
  28464. (2) Retransfer Operations
  28465.  
  28466. Retransfer operations are performed by the SCI in receive mode and transmit mode as described
  28467. below.
  28468.  
  28469. Retransfer Operation when SCI is in Receive Mode: Figure 17.11 illustrates the retransfer
  28470. operation when the SCI is in receive mode.
  28471.  
  28472. 1. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is
  28473. automatically set to 1. If the RIE bit in SCSCR1 is enabled at this time, an ERI interrupt
  28474. request is generated. The PER bit in SCSSR1 should be cleared to 0 before the next parity bit
  28475. is sampled.
  28476. 2. The RDRF bit in SCSSR1 is not set for a frame in which an error has occurred.
  28477. 3. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is not set
  28478. to 1.
  28479. 4. If no error is found when the received parity bit is checked, the receive operation is judged to
  28480. have been completed normally, and the RDRF bit in SCSSR1 is automatically set to 1. If the
  28481. RIE bit in SCSCR1 is enabled at this time, an RXI interrupt request is generated.
  28482. 5. When a normal frame is received, the pin retains the high-impedance state at the timing for
  28483. error signal transmission.
  28484.  
  28485. nth transfer frame Retransferred frame Transfer frame n+1
  28486.  
  28487. (DE)
  28488. 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
  28489. 5
  28490.  
  28491. RDRF
  28492.  
  28493. 2 4
  28494. PER
  28495.  
  28496. 1 3
  28497.  
  28498. Figure 17.11 Retransfer Operation in SCI Receive Mode
  28499.  
  28500. Rev. 2.0, 02/99, page 612 of 830
  28501.  
  28502. ----------------------- Page 627-----------------------
  28503.  
  28504. Retransfer Operation when SCI is in Transmit Mode: Figure 17.12 illustrates the retransfer
  28505. operation when the SCI is in transmit mode.
  28506.  
  28507. 1. If an error signal is sent back from the receiving side after transmission of one frame is
  28508. completed, the FER/ERS bit in SCSSR1 is set to 1. If the RIE bit in SCSCR1 is enabled at
  28509. this time, an ERI interrupt request is generated. The FER/ERS bit in SCSSR1 should be
  28510. cleared to 0 before the next parity bit is sampled.
  28511. 2. The TEND bit in SCSSR1 is not set for a frame for which an error signal indicating an error
  28512. is received.
  28513. 3. If an error signal is not sent back from the receiving side, the FER/ERS bit in SCSSR1 is not
  28514. set.
  28515. 4. If an error signal is not sent back from the receiving side, transmission of one frame,
  28516. including a retransfer, is judged to have been completed, and the TEND bit in SCSSR1 is set
  28517. to 1. If the TIE bit in SCSCR1 is enabled at this time, a TXI interrupt request is generated.
  28518.  
  28519. Figure 17.12 Retransfer Operation in SCI Transmit Mode
  28520.  
  28521. Rev. 2.0, 02/99, page 613 of 830
  28522.  
  28523. ----------------------- Page 628-----------------------
  28524.  
  28525. (3) Standby Mode and Clock
  28526.  
  28527. When switching between smart card interface mode and standby mode, the following procedures
  28528. should be used to maintain the clock duty cycle.
  28529.  
  28530. Switching from Smart Card Interface Mode to Standby Mode:
  28531. 1. Set the SBP1IO and SBP1DT bits in SCSPTR1 to the values for the fixed output state in
  28532. standby mode.
  28533. 2. Write 0 to the TE and RE bits in the serial control register (SCSCR1) to stop transmit/receive
  28534. operations. At the same time, set the CKE1 bit to the value for the fixed output state in
  28535. standby mode.
  28536. 3. Write 0 to the CKE0 bit in SCSCR1 to stop the clock.
  28537. 4. Wait for one serial clock cycle. During this period, the duty cycle is preserved and clock
  28538. output is fixed at the specified level.
  28539. 5. Write H'00 to the serial mode register (SCSMR1) and smart card mode register (SCSMR1).
  28540. 6. Make the transition to the standby state.
  28541.  
  28542. Returning from Standby Mode to Smart Card Interface Mode:
  28543. 7. Clear the standby state.
  28544. 8. Set the CKE1 bit in SCSCR1 to the value for the fixed output state at the start of standby (the
  28545. current SCK pin state).
  28546. 9. Set smart card interface mode and output the clock. Clock signal generation is started with
  28547. the normal duty cycle.
  28548.  
  28549. Normal operation Standby mode Normal operation
  28550.  
  28551. 1 2 3 4 5 6 7 8 9
  28552.  
  28553. Figure 17.13 Procedure for Stopping and Restarting the Clock
  28554.  
  28555. Rev. 2.0, 02/99, page 614 of 830
  28556.  
  28557. ----------------------- Page 629-----------------------
  28558.  
  28559. (4) Power-On and Clock
  28560.  
  28561. The following procedure should be used to secure the clock duty cycle after powering on.
  28562.  
  28563. 1. The initial state is port input and high impedance. Use pull-up or pull-down resistors to fix
  28564. the potential.
  28565. 2. Fix at the output specified by the CKE1 bit in the serial control register (SCSCR1).
  28566. 3. Set the serial mode register (SCSMR1) and smart card mode register (SCSCMR1), and
  28567. switch to smart card mode operation.
  28568. 4. Set the CKE0 bit in SCSCR1 to 1 to start clock output.
  28569.  
  28570. Rev. 2.0, 02/99, page 615 of 830
  28571.  
  28572. ----------------------- Page 630-----------------------
  28573.  
  28574. Rev. 2.0, 02/99, page 616 of 830
  28575.  
  28576. ----------------------- Page 631-----------------------
  28577.  
  28578. Section 18 I/O Ports
  28579.  
  28580. 18.1 Overview
  28581.  
  28582. The SH7750 has a 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port.
  28583.  
  28584. 18.1.1 Features
  28585.  
  28586. The features of the general-purpose I/O port are as follows:
  28587.  
  28588. • 20-bit I/O port with input/output direction independently specifiable for each bit
  28589. • Pull-up can be specified independently for each bit.
  28590. • Interrupt input is possible for 16 of the 20 I/O port bits.
  28591. • Use or non-use of the I/O port can be selected with the PORTEN bit in bus control register 2
  28592. (BCR2).
  28593.  
  28594. The features of the SCI I/O port are as follows:
  28595.  
  28596. • Data can be output when the I/O port is designated for output and SCI enabling has not been
  28597. set. This allows break function transmission.
  28598. • The RxD pin value can be read at all times, allowing break state detection.
  28599. • SCK pin control is possible when the I/O port is designated for output and SCI enabling has
  28600. not been set.
  28601. • The SCK pin value can be read at all times.
  28602.  
  28603. The features of the SCIF I/O port are as follows:
  28604.  
  28605. • Data can be output when the I/O port is designated for output and SCIF enabling has not
  28606. been set. This allows break function transmission.
  28607. • The RxD2 pin value can be read at all times, allowing break state detection.
  28608. • &76 and 576 pin control is possible when the I/O port is designated for output and SCIF
  28609. enabling has not been set.
  28610. • The &76 and 576 pin values can be read at all times.
  28611.  
  28612. Rev. 2.0, 02/99, page 617 of 830
  28613.  
  28614. ----------------------- Page 632-----------------------
  28615.  
  28616. 18.1.2 Block Diagrams
  28617.  
  28618. Figure 18.1 shows a block diagram of the 16-bit general-purpose I/O port.
  28619.  
  28620. PBnPUP
  28621. PORTEN Pull-up resistor
  28622.  
  28623. Internal bus
  28624. 0 Port 15 (input/
  28625. Dn output data X output)/D47
  28626. P to
  28627. D Q 1 M Port 0 (input/
  28628.  
  28629. PDTRW C output)/D32
  28630.  
  28631. BCK
  28632.  
  28633. 0
  28634. DnDIR
  28635. X
  28636. P
  28637. 1 M
  28638. PBnIO
  28639.  
  28640. 0 Data input strobe
  28641. X
  28642. P
  28643. 1
  28644. M C
  28645. Q
  28646. D
  28647.  
  28648. Interrupt PTIRENn BCK
  28649. controller Dn input data
  28650.  
  28651. PORTEN 0: Port not available 1: Port available
  28652. PBnPuP 0: Pull-up 1: Pull-up off
  28653. DnDIR 0: Input 1: Output
  28654. PBnIO 0: Input 1: Output
  28655. PTIRENn 0: Interrupt input disabled 1: Interrupt input enabled
  28656.  
  28657. Figure 18.1 16-Bit Port
  28658.  
  28659. Rev. 2.0, 02/99, page 618 of 830
  28660.  
  28661. ----------------------- Page 633-----------------------
  28662.  
  28663. Figure 18.2 shows a block diagram of the 4-bit general-purpose I/O port.
  28664.  
  28665. PBnPUP
  28666. Pull-up resistor
  28667. PORTEN
  28668.  
  28669. Internal bus
  28670. 0 Port 19 (input/
  28671. Dn output data X output)/D51
  28672. P to
  28673. D Q 1 M Port 16 (input/
  28674.  
  28675. PDTRW C output)/D48
  28676.  
  28677. BCK
  28678.  
  28679. 0
  28680. DnDIR
  28681. X
  28682. P
  28683. 1 M
  28684. PBnIO
  28685.  
  28686. 0 Data input strobe
  28687.  
  28688. X
  28689. P
  28690. M 1 C
  28691. Q D
  28692.  
  28693. BCK
  28694. Dn input data
  28695.  
  28696. PORTEN 0: Port not available 1: Port available
  28697. PBnPuP 0: Pull-up 1: Pull-up off
  28698. DnDIR 0: Input 1: Output
  28699. PBnIO 0: Input 1: Output
  28700.  
  28701. Figure 18.2 4-Bit Port
  28702.  
  28703. Rev. 2.0, 02/99, page 619 of 830
  28704.  
  28705. ----------------------- Page 634-----------------------
  28706.  
  28707. SCI I/O port block diagrams are shown in figures 18.3 to 18.5.
  28708.  
  28709. Reset
  28710.  
  28711. R
  28712. Q D
  28713. SPB1IO
  28714. C
  28715.  
  28716. Internal data bus
  28717. SPTRW
  28718.  
  28719. Reset
  28720.  
  28721. MD0/SCK
  28722. R
  28723. Q D
  28724.  
  28725. SPB1DT
  28726. C SCI
  28727.  
  28728. SPTRW Clock output enable signal
  28729.  
  28730. Mode setting Serial clock output signal *
  28731. register
  28732. Serial clock input signal
  28733.  
  28734. Clock input enable signal
  28735.  
  28736. SPTRR
  28737.  
  28738. SPTRW: Write to SPTR
  28739. SPTRR: Read SPTR
  28740.  
  28741. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  28742. the CKE0 and CKE1 bits in SCSCR1 and the C/A bit in SCSMR1.
  28743.  
  28744. Figure 18.3 MD0/SCK Pin
  28745.  
  28746. Rev. 2.0, 02/99, page 620 of 830
  28747.  
  28748. ----------------------- Page 635-----------------------
  28749.  
  28750. Reset
  28751.  
  28752. R
  28753. Q D
  28754. SPB0IO
  28755. C Internal data bus
  28756.  
  28757. SPTRW
  28758.  
  28759. Reset
  28760. MD7/TxD
  28761. R
  28762. Q D
  28763. SPB0DT
  28764. C SCI
  28765.  
  28766. SPTRW Transmit enable signal
  28767.  
  28768. Mode setting register
  28769.  
  28770. Serial transmit data
  28771.  
  28772. SPTRW: Write to SPTR
  28773.  
  28774. Figure 18.4 MD7/TxD Pin
  28775.  
  28776. SCI
  28777. RxD
  28778.  
  28779. Serial receive data
  28780.  
  28781. Internal data bus
  28782.  
  28783. SPTRR
  28784.  
  28785. SPTRR: Read SPTR
  28786.  
  28787. Figure 18.5 RxD Pin
  28788.  
  28789. Rev. 2.0, 02/99, page 621 of 830
  28790.  
  28791. ----------------------- Page 636-----------------------
  28792.  
  28793. SCIF I/O port block diagrams are shown in figures 18.6 to 18.9.
  28794.  
  28795. Reset
  28796.  
  28797. R
  28798. Q D
  28799. SPB2IO
  28800. C Internal data bus
  28801.  
  28802. SPTRW
  28803.  
  28804. Reset
  28805. MD1/TxD2
  28806. R
  28807. Q D
  28808. SPB2DT
  28809. C SCIF
  28810.  
  28811. Transmit enable
  28812. SPTRW
  28813. signal
  28814.  
  28815. Mode setting
  28816. register Serial transmit data
  28817.  
  28818. SPTRW: Write to SPTR
  28819.  
  28820. Figure 18.6 MD1/TxD2 Pin
  28821.  
  28822. SCIF
  28823. MD2/RxD2
  28824.  
  28825. Serial receive
  28826. Mode setting data
  28827. register
  28828.  
  28829. Internal data bus
  28830.  
  28831.  
  28832. SPTRR
  28833.  
  28834. SPTRR: Read SPTR
  28835.  
  28836. Figure 18.7 MD2/RxD2 Pin
  28837.  
  28838. Rev. 2.0, 02/99, page 622 of 830
  28839.  
  28840. ----------------------- Page 637-----------------------
  28841.  
  28842. Reset
  28843. R
  28844.  
  28845. Q D
  28846. CTSIO
  28847. C Internal data bus
  28848.  
  28849. SPTRW
  28850.  
  28851. Reset
  28852. CTS2
  28853. R
  28854.  
  28855. Q D
  28856. CTSDT
  28857. C SCIF
  28858.  
  28859. SPTRW
  28860.  
  28861. CTS2 signal
  28862.  
  28863. Modem control enable
  28864. signal*
  28865.  
  28866. SPTRR
  28867.  
  28868. SPTRW: Write to SPTR
  28869. SPTRR: Read SPTR
  28870.  
  28871. Note: * MCE bit in SCFCR2: signal that designates modem control as the CTS2 pin function.
  28872.  
  28873. Figure 18.8 &76 Pin
  28874. &76
  28875.  
  28876. Reset
  28877.  
  28878. R
  28879. Q D
  28880. RTSIO
  28881. C Internal data bus
  28882.  
  28883. SPTRW
  28884.  
  28885. Reset
  28886. MD8/RTS2
  28887. R
  28888. Q D
  28889. RTSDT
  28890. C SCIF
  28891.  
  28892. Modem control
  28893. SPTRW
  28894. enable signal*
  28895.  
  28896. Mode setting
  28897. register RTS2 signal
  28898.  
  28899. SPTRR
  28900.  
  28901. SPTRW: Write to SPTR
  28902. SPTRR: Read SPTR
  28903.  
  28904. Note: * MCE bit in SCFCR2: signal that designates modem control as the RTS2 pin function.
  28905.  
  28906. Figure 18.9 MD8/576 Pin
  28907. 576
  28908.  
  28909. Rev. 2.0, 02/99, page 623 of 830
  28910.  
  28911. ----------------------- Page 638-----------------------
  28912.  
  28913. 18.1.3 Pin Configuration
  28914.  
  28915. Table 18.1 shows the 20-bit general-purpose I/O port pin configuration.
  28916.  
  28917. Table 18.1 20-Bit General-Purpose I/O Port Pins
  28918.  
  28919. Pin Name Signal I/O Function
  28920.  
  28921. Port 19 pin PORT19 I/O I/O port
  28922.  
  28923. Port 18 pin PORT18 I/O I/O port
  28924.  
  28925. Port 17 pin PORT17 I/O I/O port
  28926.  
  28927. Port 16 pin PORT16 I/O I/O port
  28928.  
  28929. Port 15 pin PORT15 I/O* I/O port / GPIO interrupt
  28930.  
  28931. Port 14 pin PORT14 I/O* I/O port / GPIO interrupt
  28932.  
  28933. Port 13 pin PORT13 I/O* I/O port / GPIO interrupt
  28934.  
  28935. Port 12 pin PORT12 I/O* I/O port / GPIO interrupt
  28936.  
  28937. Port 11 pin PORT11 I/O* I/O port / GPIO interrupt
  28938.  
  28939. Port 10 pin PORT10 I/O* I/O port / GPIO interrupt
  28940.  
  28941. Port 9 pin PORT9 I/O* I/O port / GPIO interrupt
  28942.  
  28943. Port 8 pin PORT8 I/O* I/O port / GPIO interrupt
  28944.  
  28945. Port 7 pin PORT7 I/O* I/O port / GPIO interrupt
  28946.  
  28947. Port 6 pin PORT6 I/O* I/O port / GPIO interrupt
  28948.  
  28949. Port 5 pin PORT5 I/O* I/O port / GPIO interrupt
  28950.  
  28951. Port 4 pin PORT4 I/O* I/O port / GPIO interrupt
  28952.  
  28953. Port 3 pin PORT3 I/O* I/O port / GPIO interrupt
  28954.  
  28955. Port 2 pin PORT2 I/O* I/O port / GPIO interrupt
  28956.  
  28957. Port 1 pin PORT1 I/O* I/O port / GPIO interrupt
  28958.  
  28959. Port 0 pin PORT0 I/O* I/O port / GPIO interrupt
  28960.  
  28961. Note: * When port pins are used as GPIO interrupts, they must be set to input mode. The input
  28962. setting can be made in the PCTRA register.
  28963.  
  28964. Rev. 2.0, 02/99, page 624 of 830
  28965.  
  28966. ----------------------- Page 639-----------------------
  28967.  
  28968. Table 18.2 shows the SCI I/O port pin configuration.
  28969.  
  28970. Table 18.2 SCI I/O Port Pins
  28971.  
  28972. Pin Name Abbreviation I/O Function
  28973.  
  28974. Serial clock pin MD0/SCK I/O Clock input/output
  28975.  
  28976. Receive data pin RxD Input Receive data input
  28977.  
  28978. Transmit data pin MD7/TxD Output Transmit data output
  28979.  
  28980. Note: Pins MD0/SCK and MD7/TxD function as mode input pins MD0 and MD7 after a power-on
  28981. reset. They are made to function as serial pins by performing SCI operation settings with
  28982. the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/$ bit in SCSMR1. Break state
  28983. transmission and detection can be performed by means of a setting in the SCI’s SCSPTR1
  28984. register.
  28985.  
  28986. Table 18.3 shows the SCIF I/O port pin configuration.
  28987.  
  28988. Table 18.3 SCIF I/O Port Pins
  28989.  
  28990. Pin Name Abbreviation I/O Function
  28991.  
  28992. Serial clock pin MRESET/SCK2 Input Clock input
  28993.  
  28994. Receive data pin MD2/RxD2 Input Receive data input
  28995.  
  28996. Transmit data pin MD1/TxD2 Output Transmit data output
  28997.  
  28998. Modem control pin &76 I/O Transmission enabled
  28999.  
  29000. Modem control pin MD8/576 I/O Transmission request
  29001.  
  29002. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset
  29003. is executed. The MD1/TxD2, MD2/RxD2, and MD8/576 pins function as the MD1, MD2,
  29004. and MD8 mode input pins after a power-on reset. These pins are made to function as
  29005. serial pins by performing SCIF operation settings with the TE and RE bits in SCSCR2 and
  29006. the MCE bit in SCFCR2. Break state transmission and detection can be set in the SCIF’s
  29007. SCSPTR2 register.
  29008.  
  29009. Rev. 2.0, 02/99, page 625 of 830
  29010.  
  29011. ----------------------- Page 640-----------------------
  29012.  
  29013. 18.1.4 Register Configuration
  29014.  
  29015. The 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port have seven registers, as
  29016. shown in table 18.4.
  29017.  
  29018. Table 18.4 I/O Port Registers
  29019.  
  29020. Area 7 Access
  29021. Name Abbreviation R/W Initial Value* P4 Address Address Size
  29022.  
  29023. Port control register A PCTRA R/W H'00000000 H'FF80002C H'1F80002C 32
  29024.  
  29025. Port data register A PDTRA R/W Undefined H'FF800030 H'1F800030 16
  29026.  
  29027. Port control register B PCTRB R/W H'00000000 H'FF800040 H'1F800040 32
  29028.  
  29029. Port data register B PDTRB R/W Undefined H'FF800044 H'1F800044 16
  29030.  
  29031. GPIO interrupt control GPIOIC R/W H'00000000 H'FF800048 H'1F800048 16
  29032. register
  29033.  
  29034. Serial port register SCSPTR1 R/W Undefined H'FFE0001C H'1FE0001C 8
  29035.  
  29036. Serial port register SCSPTR2 R/W Undefined H'FFE80020 H'1FE80020 16
  29037.  
  29038. Note: * Initialized by a power-on reset.
  29039.  
  29040. Rev. 2.0, 02/99, page 626 of 830
  29041.  
  29042. ----------------------- Page 641-----------------------
  29043.  
  29044. 18.2 Register Descriptions
  29045.  
  29046. 18.2.1 Port Control Register A (PCTRA)
  29047.  
  29048. Port control register A (PCTRA) is a 32-bit readable/writable register that controls the
  29049. input/output direction and pull-up for each bit in the 16-bit port (port 15 pin to port 0 pin). As
  29050. the initial value of port data register A (PDTRA) is undefined, all the bits in the 16-bit port
  29051. should be set to output with PCTRA after writing a value to the PDTRA register.
  29052.  
  29053. PCTRA is initialized to H'00000000 by a power-on reset. It is not initialized by a manual reset
  29054. or in standby mode, and retains its contents.
  29055.  
  29056. Bit: 31 30 29 28 27 26 25 24
  29057.  
  29058. PB15PUP PB15IO PB14PUP PB14IO PB13PUP PB13IO PB12PUP PB12IO
  29059.  
  29060. Initial value: 0 0 0 0 0 0 0 0
  29061.  
  29062. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29063.  
  29064. Bit: 23 22 21 20 19 18 17 16
  29065.  
  29066. PB11PUP PB11IO PB10PUP PB10IO PB9PUP PB9IO PB8PUP PB8IO
  29067.  
  29068. Initial value: 0 0 0 0 0 0 0 0
  29069.  
  29070. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29071.  
  29072. Bit: 15 14 13 12 11 10 9 8
  29073.  
  29074. PB7PUP PB7IO PB6PUP PB6IO PB5PUP PB5IO PB4PUP PB4IO
  29075.  
  29076. Initial value: 0 0 0 0 0 0 0 0
  29077.  
  29078. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29079.  
  29080. Bit: 7 6 5 4 3 2 1 0
  29081.  
  29082. PB3PUP PB3IO PB2PUP PB2IO PB1PUP PB1IO PB0PUP PB0IO
  29083.  
  29084. Initial value: 0 0 0 0 0 0 0 0
  29085.  
  29086. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29087.  
  29088. Rev. 2.0, 02/99, page 627 of 830
  29089.  
  29090. ----------------------- Page 642-----------------------
  29091.  
  29092. Bit 2n + 1 (n = 0–15)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the 16-
  29093. bit port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a port
  29094. pin set to output by bit PBnIO.
  29095.  
  29096. Bit 2n + 1: PBnPUP Description
  29097.  
  29098. 0 Bit m (m = 0–15) of 16-bit port is pulled up (Initial value)
  29099.  
  29100. 1 Bit m (m = 0–15) of 16-bit port is not pulled up
  29101.  
  29102. Bit 2n (n = 0–15)—Port I/O Control (PBnIO): Specifies whether each bit in the 16-bit port is
  29103. an input or an output.
  29104.  
  29105. Bit 2n: PBnIO Description
  29106.  
  29107. 0 Bit m (m = 0–15) of 16-bit port is an input (Initial value)
  29108.  
  29109. 1 Bit m (m = 0–15) of 16-bit port is an output
  29110.  
  29111. 18.2.2 Port Data Register A (PDTRA)
  29112.  
  29113. Port data register A (PDTRA) is a 16-bit readable/writable register used as a data latch for each
  29114. bit in the 16-bit port. When a bit is set as an output, the value written to the PDTRA register is
  29115. output from the external pin. When a value is read from the PDTRA register while a bit is set as
  29116. an input, the external pin value sampled on the external bus clock is read. When a bit is set as an
  29117. output, the value written to the PDTRA register is read.
  29118.  
  29119. PDTR is not initialized by a power-on or manual reset, or in standby mode, and retains its
  29120. contents.
  29121.  
  29122. Bit: 15 14 13 12 11 10 9 8
  29123.  
  29124. PB15DT PB14DT PB13DT PB12DT PB11DT PB10DT PB9DT PB8DT
  29125.  
  29126. Initial value: — — — — — — — —
  29127.  
  29128. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29129.  
  29130. Bit: 7 6 5 4 3 2 1 0
  29131.  
  29132. PB7DT PB6DT PB5DT PB4DT PB3DT PB2DT PB1DT PB0DT
  29133.  
  29134. Initial value: — — — — — — — —
  29135.  
  29136. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29137.  
  29138. Rev. 2.0, 02/99, page 628 of 830
  29139.  
  29140. ----------------------- Page 643-----------------------
  29141.  
  29142. 18.2.3 Port Control Register B (PCTRB)
  29143.  
  29144. Port control register B (PCTRB) is a 32-bit readable/writable register that controls the
  29145. input/output direction and pull-up for each bit in the 4-bit port (port 19 pin to port 16 pin). As
  29146. the initial value of port data register B (PDTRB) is undefined, each bit in the 4-bit port should be
  29147. set to output with PCTRB after writing a value to the PDTRB register.
  29148.  
  29149. PCTRB is initialized to H'00000000 by a power-on reset. It is not initialized by a manual reset
  29150. or in standby mode, and retains its contents.
  29151.  
  29152. Bit: 31 30 29 28 27 26 25 24
  29153.  
  29154. — — — — — — — —
  29155.  
  29156. Initial value: 0 0 0 0 0 0 0 0
  29157.  
  29158. R/W: R R R R R R R R
  29159.  
  29160. Bit: 23 22 21 20 19 18 17 16
  29161.  
  29162. — — — — — — — —
  29163.  
  29164. Initial value: 0 0 0 0 0 0 0 0
  29165.  
  29166. R/W: R R R R R R R R
  29167.  
  29168. Bit: 15 14 13 12 11 10 9 8
  29169.  
  29170. — — — — — — — —
  29171.  
  29172. Initial value: 0 0 0 0 0 0 0 0
  29173.  
  29174. R/W: R R R R R R R R
  29175.  
  29176. Bit: 7 6 5 4 3 2 1 0
  29177.  
  29178. PB19PUP PB19IO PB18PUP PB18IO PB17PUP PB17IO PB16PUP PB16IO
  29179.  
  29180. Initial value: 0 0 0 0 0 0 0 0
  29181.  
  29182. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29183.  
  29184. Bit 2n + 1 (n = 0–3)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the 4-bit
  29185. port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a port pin
  29186. set to output by bit PBnIO.
  29187.  
  29188. Bit 2n + 1: PBnPUP Description
  29189.  
  29190. 0 Bit m (m = 16–19) of 4-bit port is pulled up (Initial value)
  29191.  
  29192. 1 Bit m (m = 16–19) of 4-bit port is not pulled up
  29193.  
  29194. Rev. 2.0, 02/99, page 629 of 830
  29195.  
  29196. ----------------------- Page 644-----------------------
  29197.  
  29198. Bit 2n (n = 0–3)—Port I/O Control (PBnIO): Specifies whether each bit in the 4-bit port is an
  29199. input or an output.
  29200.  
  29201. Bit 2n: PBnIO Description
  29202.  
  29203. 0 Bit m (m = 16–19) of 4-bit port is an input (Initial value)
  29204.  
  29205. 1 Bit m (m = 16–19) of 4-bit port is an output
  29206.  
  29207. 18.2.4 Port Data Register B (PDTRB)
  29208.  
  29209. Port data register B (PDTRB) is a 16-bit readable/writable register used as a data latch for each
  29210. bit in the 4-bit port. When a bit is set as an output, the value written to the PDTRB register is
  29211. output from the external pin. When a value is read from the PDTRB register while a bit is set as
  29212. an input, the external pin value sampled on the external bus clock is read. When a bit is set as an
  29213. output, the value written to the PDTRB register is read.
  29214.  
  29215. PDTRB is not initialized by a power-on or manual reset, or in standby mode, and retains its
  29216. contents.
  29217.  
  29218. Bit: 15 14 13 12 11 10 9 8
  29219.  
  29220. — — — — — — — —
  29221.  
  29222. Initial value: 0 0 0 0 0 0 0 0
  29223.  
  29224. R/W: R R R R R R R R
  29225.  
  29226. Bit: 7 6 5 4 3 2 1 0
  29227.  
  29228. — — — — PB19DT PB18DT PB17DT PB16DT
  29229.  
  29230. Initial value: 0 0 0 0 — — — —
  29231.  
  29232. R/W: R R R R R/W R/W R/W R/W
  29233.  
  29234. Rev. 2.0, 02/99, page 630 of 830
  29235.  
  29236. ----------------------- Page 645-----------------------
  29237.  
  29238. 18.2.5 GPIO Interrupt Control Register (GPIOIC)
  29239.  
  29240. The GPIO interrupt control register (GPIOIC) is a 16-bit readable/writable register that performs
  29241. 16-bit interrupt input control.
  29242.  
  29243. GPIOIC is initialized to H'0000 by a power-on reset. It is not initialized by a manual reset or in
  29244. standby mode, and retains its contents.
  29245.  
  29246. GPIO interrupts are active-low level interrupts. Bit-by-bit masking is possible, and the OR of all
  29247. the bits set as GPIO interrupts is used for interrupt detection. Which bits interrupts are input to
  29248. can be identified by reading the PDTRA register.
  29249.  
  29250. Bit: 15 14 13 12 11 10 9 8
  29251.  
  29252. PTIREN15 PTIREN14 PTIREN13 PTIREN12 PTIREN11 PTIREN10 PTIREN9 PTIREN8
  29253.  
  29254. Initial value: 0 0 0 0 0 0 0 0
  29255.  
  29256. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29257.  
  29258. Bit: 7 6 5 4 3 2 1 0
  29259.  
  29260. PTIREN7 PTIREN6 PTIREN5 PTIREN4 PTIREN3 PTIREN2 PTIREN1 PTIREN0
  29261.  
  29262. Initial value: 0 0 0 0 0 0 0 0
  29263.  
  29264. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29265.  
  29266. Bit n (n = 0–15)—Port Interrupt Enable (PTIRENn): Specifies whether interrupt input is
  29267. performed for each bit.
  29268.  
  29269. Bit n: PTIRENn Description
  29270.  
  29271. 0 Port m (m = 0–15) of 16-bit port is used as a normal I/O port (Initial
  29272. value)
  29273.  
  29274. 1 Port m (m = 0–15) of 16-bit port is used as a GPIO interrupt*
  29275.  
  29276. Note: * When using an interrupt, set the corresponding port to input in the PCTRA register before
  29277. making the PTIRENn setting.
  29278.  
  29279. Rev. 2.0, 02/99, page 631 of 830
  29280.  
  29281. ----------------------- Page 646-----------------------
  29282.  
  29283. 18.2.6 Serial Port Register (SCSPTR1)
  29284.  
  29285. Bit: 7 6 5 4 3 2 1 0
  29286.  
  29287. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  29288.  
  29289. Initial value: 0 0 0 0 0 — 0 —
  29290.  
  29291. R/W: R/W — — — R/W R/W R/W R/W
  29292.  
  29293. The serial port register (SCSPTR1) is an 8-bit readable/writable register that controls
  29294. input/output and data for the port pins multiplexed with the serial communication interface (SCI)
  29295. pins. Input data can be read from the RxD pin, output data written to the TxD pin, and breaks in
  29296. serial transmission/reception controlled, by means of bits 1 and 0. SCK pin data reading and
  29297. output data writing can be performed by means of bits 3 and 2. Bit 7 controls enabling and
  29298. disabling of the RXI interrupt.
  29299.  
  29300. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2 and
  29301. 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is undefined.
  29302. SCSPTR1 is not initialized in the module standby state or standby mode.
  29303.  
  29304. Bit 7—Error Interrupt Only (EIO): See section 15.2.8, Serial Port Register (SCSPTR1).
  29305.  
  29306. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  29307.  
  29308. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin input/output. When
  29309. the SCK pin is actually set as a port output pin and outputs the value set by the SPB1DT bit, the
  29310. C/$ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be cleared to 0.
  29311.  
  29312. Bit 3: SPB1IO Description
  29313.  
  29314. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  29315.  
  29316. 1 SPB1DT bit value is output to the SCK pin
  29317.  
  29318. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin input/output
  29319. data. Input or output is specified by the SPB1IO bit (see the description of bit 3, SPB1IO, for
  29320. details). When output is specified, the value of the SPB1DT bit is output to the SCK pin. The
  29321. SCK pin value is read from the SPB1DT bit regardless of the value of the SPB1IO bit. The
  29322. initial value of this bit after a power-on reset or manual reset is undefined.
  29323.  
  29324. Bit 2: SPB1DT Description
  29325.  
  29326. 0 Input/output data is low-level
  29327.  
  29328. 1 Input/output data is high-level
  29329.  
  29330. Rev. 2.0, 02/99, page 632 of 830
  29331.  
  29332. ----------------------- Page 647-----------------------
  29333.  
  29334. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output condition.
  29335. When the TxD pin is actually set as a port output pin and outputs the value set by the SPB0DT
  29336. bit, the TE bit in SCSCR1 should be cleared to 0.
  29337.  
  29338. Bit 1: SPB0IO Description
  29339.  
  29340. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  29341.  
  29342. 1 SPB0DT bit value is output to the TxD pin
  29343.  
  29344. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data and
  29345. TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  29346. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the
  29347. value of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the SPB0DT
  29348. bit regardless of the value of the SPB0IO bit. The initial value of this bit after a power-on reset
  29349. or manual reset is undefined.
  29350.  
  29351. Bit 0: SPB0DT Description
  29352.  
  29353. 0 Input/output data is low-level
  29354.  
  29355. 1 Input/output data is high-level
  29356.  
  29357. 18.2.7 Serial Port Register (SCSPTR2)
  29358.  
  29359. Bit: 15 14 13 12 11 10 9 8
  29360.  
  29361. — — — — — — — —
  29362.  
  29363. Initial value: 0 0 0 0 0 0 0 0
  29364.  
  29365. R/W: R R R R R R R R
  29366.  
  29367. Bit: 7 6 5 4 3 2 1 0
  29368.  
  29369. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  29370.  
  29371. Initial value: 0 — 0 — 0 0 0 —
  29372.  
  29373. R/W: R/W R/W R/W R/W R R R/W R/W
  29374.  
  29375. The serial port register (SCSPTR2) is a 16-bit readable/writable register that controls
  29376. input/output and data for the port pins multiplexed with the serial communication interface
  29377. (SCIF) pins. Input data can be read from the RxD2 pin, output data written to the TxD2 pin, and
  29378. breaks in serial transmission/reception controlled, by means of bits 1 and 0. &76 pin data
  29379. reading and output data writing can be performed by means of bits 5 and 4, and 576 pin data
  29380. reading and output data writing by means of bits 7 and 6.
  29381.  
  29382. Rev. 2.0, 02/99, page 633 of 830
  29383.  
  29384. ----------------------- Page 648-----------------------
  29385.  
  29386. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6, 4,
  29387. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0 is
  29388. undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  29389.  
  29390. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  29391.  
  29392. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies serial port 576 pin input/output. When
  29393. the 576 pin is actually set as a port output pin and outputs the value set by the RTSDT bit, the
  29394. MCE bit in SCFCR2 should be cleared to 0.
  29395.  
  29396. Bit 7: RTSIO Description
  29397.  
  29398. 0 RTSDT bit value is not output to the 576 pin (Initial value)
  29399.  
  29400. 1 RTSDT bit value is output to the 576 pin
  29401.  
  29402. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port 576 pin input/output
  29403. data. Input or output is specified by the RTSIO pin (see the description of bit 7, RTSIO, for
  29404. details). When the 576 pin is designated as an output, the value of the RTSDT bit is output to
  29405. the 576 pin. The 576 pin value is read from the RTSDT bit regardless of the value of the
  29406. RTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  29407.  
  29408. Bit 6: RTSDT Description
  29409.  
  29410. 0 Input/output data is low-level
  29411.  
  29412. 1 Input/output data is high-level
  29413.  
  29414. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies serial port &76 pin input/output. When
  29415. the &76 pin is actually set as a port output pin and outputs the value set by the CTSDT bit, the
  29416. MCE bit in SCFCR2 should be cleared to 0.
  29417.  
  29418. Bit 5: CTSIO Description
  29419.  
  29420. 0 CTSDT bit value is not output to the &76 pin (Initial value)
  29421.  
  29422. 1 CTSDT bit value is output to the &76 pin
  29423.  
  29424. Rev. 2.0, 02/99, page 634 of 830
  29425.  
  29426. ----------------------- Page 649-----------------------
  29427.  
  29428. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port &76 pin input/output
  29429. data. Input or output is specified by the CTSIO pin (see the description of bit 5, CTSIO, for
  29430. details). When the &76 pin is designated as an output, the value of the CTSDT bit is output to
  29431. the &76 pin. The &76 pin value is read from the CTSDT bit regardless of the value of the
  29432. CTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  29433.  
  29434. Bit 4: CTSDT Description
  29435.  
  29436. 0 Input/output data is low-level
  29437.  
  29438. 1 Input/output data is high-level
  29439.  
  29440. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  29441.  
  29442. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output condition.
  29443. When the TxD2 pin is actually set as a port output pin and outputs the value set by the SPB2DT
  29444. bit, the TE bit in SCSCR2 should be cleared to 0.
  29445.  
  29446. Bit 1: SPB2IO Description
  29447.  
  29448. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  29449.  
  29450. 1 SPB2DT bit value is output to the TxD2 pin
  29451.  
  29452. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data and
  29453. TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  29454. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the
  29455. value of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the
  29456. SPB2DT bit regardless of the value of the SPB2IO bit. The initial value of this bit after a power-
  29457. on reset or manual reset is undefined.
  29458.  
  29459. Bit 0: SPB2DT Description
  29460.  
  29461. 0 Input/output data is low-level
  29462.  
  29463. 1 Input/output data is high-level
  29464.  
  29465. Rev. 2.0, 02/99, page 635 of 830
  29466.  
  29467. ----------------------- Page 650-----------------------
  29468.  
  29469. Rev. 2.0, 02/99, page 636 of 830
  29470.  
  29471. ----------------------- Page 651-----------------------
  29472.  
  29473. Section 19 Interrupt Controller (INTC)
  29474.  
  29475. 19.1 Overview
  29476.  
  29477. The interrupt controller (INTC) ascertains the priority of interrupt sources and controls interrupt
  29478. requests to the CPU. The INTC registers set the order of priority of each interrupt, allowing the
  29479. user to handle interrupt requests according to user-set priority.
  29480.  
  29481. 19.1.1 Features
  29482.  
  29483. The INTC has the following features.
  29484.  
  29485. • Fifteen interrupt priority levels can be set
  29486. By setting the three interrupt priority registers, the priorities of on-chip peripheral module
  29487. interrupts can be selected from 15 levels for different request sources.
  29488. • NMI noise canceler function
  29489. The NMI input level bit indicates the NMI pin state. The pin state can be checked by reading
  29490. this bit in the interrupt exception handler, enabling it to be used as a noise canceler.
  29491. • NMI request masking when SR.BL bit is set
  29492. It is possible to select whether or not NMI requests are to be masked when the SR.BL bit is
  29493. set.
  29494.  
  29495. Rev. 2.0, 02/99, page 637 of 830
  29496.  
  29497. ----------------------- Page 652-----------------------
  29498.  
  29499. 19.1.2 Block Diagram
  29500.  
  29501. Figure 19.1 shows a block diagram of the INTC.
  29502.  
  29503. NMI
  29504. Input control
  29505. IRL3–
  29506. IRL0
  29507. 4 4
  29508.  
  29509. TMU (Interrupt request)
  29510. Com- Interrupt
  29511. RTC (Interrupt request) Priority
  29512. identifier parator request
  29513. SCI (Interrupt request)
  29514.  
  29515. SCIF (Interrupt request) SR
  29516.  
  29517. WDT (Interrupt request) I3 I2 I1 I0
  29518.  
  29519. REF (Interrupt request) CPU
  29520.  
  29521. DMAC (Interrupt request)
  29522.  
  29523. Hitachi- (Interrupt request)
  29524. UDI
  29525. GPIO (Interrupt request)
  29526.  
  29527. IPR
  29528. ICR
  29529.  
  29530. IPRA–IPRC
  29531.  
  29532. s
  29533. u
  29534. b
  29535.  
  29536. l
  29537. a
  29538. Bus interface n
  29539. r
  29540. e
  29541. t
  29542. n
  29543. I
  29544.  
  29545. INTC
  29546.  
  29547. TMU: Timer unit
  29548. RTC: Realtime clock unit
  29549. SCI: Serial communication interface
  29550. SCIF: Serial communication interface with FIFO
  29551. WDT: Watchdog timer
  29552. REF: Memory refresh controller section of the bus state controller
  29553. DMAC:Direct memory access controller
  29554. Hitachi-UDI: Hitachi-UDI unit
  29555. GPIO: I/O port
  29556. ICR: Interrupt control register
  29557. IPRA–IPRC: Interrupt priority registers A–C
  29558. SR: Status register
  29559.  
  29560.  
  29561. Figure 19.1 Block Diagram of INTC
  29562.  
  29563. Rev. 2.0, 02/99, page 638 of 830
  29564.  
  29565. ----------------------- Page 653-----------------------
  29566.  
  29567. 19.1.3 Pin Configuration
  29568.  
  29569. Table 19.1 shows the INTC pin configuration.
  29570.  
  29571. Table 191 INTC Pins
  29572.  
  29573. Pin Name Abbreviation I/O Function
  29574.  
  29575. Nonmaskable interrupt NMI Input Input of nonmaskable interrupt request
  29576. input pin signal
  29577.  
  29578. Interrupt input pins ,5/–,5/ Input Input of interrupt request signals
  29579. (maskable by I3–I0 in SR)
  29580.  
  29581. 19.1.4 Register Configuration
  29582.  
  29583. The INTC has the registers shown in table 19.2.
  29584.  
  29585. Table 19.2 INTC Registers
  29586.  
  29587. Initial Area 7 Access
  29588. Name Abbreviation R/W Value*1 P4 Address Address Size
  29589.  
  29590. 2
  29591. Interrupt control ICR R/W * H'FFD00000 H'1FD00000 16
  29592. register
  29593.  
  29594. Interrupt priority IPRA R/W H'0000 H'FFD00004 H'1FD00004 16
  29595. register A
  29596.  
  29597. Interrupt priority IPRB R/W H'0000 H'FFD00008 H'1FD00008 16
  29598. register B
  29599.  
  29600. Interrupt priority IPRC R/W H'0000 H'FFD0000C H'1FD0000C 16
  29601. register C
  29602.  
  29603. Notes: 1. Initialized by a power-on reset or manual reset.
  29604. 2. H'8000 when the NMI pin is high, H'0000 when the NMI pin is low.
  29605.  
  29606. Rev. 2.0, 02/99, page 639 of 830
  29607.  
  29608. ----------------------- Page 654-----------------------
  29609.  
  29610. 19.2 Interrupt Sources
  29611.  
  29612. There are three types of interrupt sources: NMI, RL, and on-chip peripheral modules. Each
  29613. interrupt has a priority level (16–0), with level 16 as the highest and level 1 as the lowest. When
  29614. level 0 is set, the interrupt is masked and interrupt requests are ignored.
  29615.  
  29616. 19.2.1 NMI Interrupt
  29617.  
  29618. The NMI interrupt has the highest priority level of 16. It is always accepted unless the BL bit in
  29619. the status register in the CPU is set to 1. In sleep or standby mode, the interrupt is accepted even
  29620. if the BL bit is set to 1.
  29621.  
  29622. A setting can also be made to have the NMI interrupt accepted even if the BL bit is set to 1.
  29623.  
  29624. Input from the NMI pin is edge-detected. The NMI edge select bit (NMIE) in the interrupt
  29625. control register (ICR) is used to select either rising or falling edge. When the NMIE bit in the
  29626. ICR register is modified, the NMI interrupt is not detected for a maximum of 6 bus clock cycles
  29627. after the modification.
  29628.  
  29629. NMI interrupt exception handling does not affect the interrupt mask level bits (I3–I0) in the
  29630. status register (SR).
  29631.  
  29632. Rev. 2.0, 02/99, page 640 of 830
  29633.  
  29634. ----------------------- Page 655-----------------------
  29635.  
  29636. 19.2.2 IRL Interrupts
  29637.  
  29638. IRL interrupts are input by level at pins ,5/–,5/. The priority level is the level indicated by
  29639. pins ,5/–,5/. An ,5/–,5/ value of 0 (0000) indicates the highest-level interrupt request
  29640. (interrupt priority level 15). A value of 15 (1111) indicates no interrupt request (interrupt priority
  29641. level 0).
  29642.  
  29643. SH7750
  29644.  
  29645. Interrupt Priority 4 IRL3 to IRL0
  29646. requests encoder
  29647. IRL3 to IRL0
  29648.  
  29649. Figure 19.2 Example of IRL Interrupt Connection
  29650.  
  29651. Rev. 2.0, 02/99, page 641 of 830
  29652.  
  29653. ----------------------- Page 656-----------------------
  29654.  
  29655. Table 19.3 ,5/–,5/ Pins and Interrupt Levels
  29656. ,5/ ,5/
  29657.  
  29658. ,5/ ,5/ ,5/ ,5/ Interrupt Priority Level Interrupt Request
  29659. ,5/ ,5/ ,5/ ,5/
  29660.  
  29661. 0 0 0 0 15 Level 15 interrupt request
  29662.  
  29663. 1 14 Level 14 interrupt request
  29664.  
  29665. 1 0 13 Level 13 interrupt request
  29666.  
  29667. 1 12 Level 12 interrupt request
  29668.  
  29669. 1 0 0 11 Level 11 interrupt request
  29670.  
  29671. 1 10 Level 10 interrupt request
  29672.  
  29673. 1 0 9 Level 9 interrupt request
  29674.  
  29675. 1 8 Level 8 interrupt request
  29676.  
  29677. 1 0 0 0 7 Level 7 interrupt request
  29678.  
  29679. 1 6 Level 6 interrupt request
  29680.  
  29681. 1 0 5 Level 5 interrupt request
  29682.  
  29683. 1 4 Level 4 interrupt request
  29684.  
  29685. 1 0 0 3 Level 3 interrupt request
  29686.  
  29687. 1 2 Level 2 interrupt request
  29688.  
  29689. 1 0 1 Level 1 interrupt request
  29690.  
  29691. 1 0 No interrupt request
  29692.  
  29693. A noise-cancellation feature is built in, and the IRL interrupt is not detected unless the levels
  29694. sampled at every bus clock cycle remain unchanged for three consecutive cycles, so that no
  29695. transient level on the IRL pin change is detected. In standby mode, as the bus clock is stopped,
  29696. noise cancellation is performed using the 32.768 kHz clock for the RTC instead. When the RTC
  29697. is not used, therefore, interruption by means of IRL interrupts cannot be performed in standby
  29698. mode.
  29699.  
  29700. The priority level of the IRL interrupt must not be lowered unless the interrupt is accepted and
  29701. the interrupt handling starts. However, the priority level can be changed to a higher one.
  29702.  
  29703. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by IRL interrupt
  29704. handling.
  29705.  
  29706. Pins ,5/–,5/ can be used for four independent interrupt requests by setting the IRLM bit to 1
  29707. in the ICR register.
  29708.  
  29709. Rev. 2.0, 02/99, page 642 of 830
  29710.  
  29711. ----------------------- Page 657-----------------------
  29712.  
  29713. Table 19.4 ,5/–,5/ Pins and Interrupt Levels (When IRLM = 1)
  29714. ,5/ ,5/
  29715.  
  29716. ,5/ ,5/ ,5/ ,5/ Interrupt Priority Level Interrupt Request
  29717. ,5/ ,5/ ,5/ ,5/
  29718.  
  29719. 1/0 1/0 1/0 0 13 IRL0
  29720.  
  29721. 1/0 1/0 0 1 10 IRL1
  29722.  
  29723. 1/0 0 1 1 7 IRL2
  29724.  
  29725. 0 1 1 1 4 IRL3
  29726.  
  29727. 19.2.3 On-Chip Peripheral Module Interrupts
  29728.  
  29729. On-chip peripheral module interrupts are generated by the following nine modules:
  29730.  
  29731. • Hitachi-UDI unit (Hitachi-UDI)
  29732. • Direct memory access controller (DMAC)
  29733. • Timer unit (TMU)
  29734. • Realtime clock (RTC)
  29735. • Serial communication interface (SCI)
  29736. • Serial communication interface with FIFO (SCIF)
  29737. • Bus state controller (BSC)
  29738. • Watchdog timer (WDT)
  29739. • I/O port (GPIO)
  29740.  
  29741. Not every interrupt source is assigned a different interrupt vector, bus sources are reflected in the
  29742. interrupt event register (INTEVT), so it is easy to identify sources by using the INTEVT register
  29743. value as a branch offset in the exception handling routine.
  29744.  
  29745. A priority level from 15 to 0 can be set for each module by means of interrupt priority registers
  29746. A to C (IPRA–IPRC).
  29747.  
  29748. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by on-chip peripheral
  29749. module interrupt handling.
  29750.  
  29751. On-chip peripheral module interrupt source flag and interrupt enable flag updating should only
  29752. be carried out when the BL bit in the status register (SR) is set to 1. To prevent acceptance of an
  29753. erroneous interrupt from an interrupt source that should have been updated, first read the on-chip
  29754. peripheral register containing the relevant flag, then clear the BL bit to 0. This will secure the
  29755. necessary timing internally. When updating a number of flags, there is no problem if only the
  29756. register containing the last flag updated is read.
  29757.  
  29758. Rev. 2.0, 02/99, page 643 of 830
  29759.  
  29760. ----------------------- Page 658-----------------------
  29761.  
  29762. If flag updating is performed while the BL bit is cleared to 0, the program may jump to the
  29763. interrupt handling routine when the INTEVT register value is 0. In this case, interrupt handling
  29764. is initiated due to the timing relationship between the flag update and interrupt request
  29765. recognition within the chip. Processing can be continued without any problem by executing an
  29766. RTE instruction.
  29767.  
  29768. 19.2.4 Interrupt Exception Handling and Priority
  29769.  
  29770. Table 19.5 lists the codes for the interrupt event register (INTEVT), and the order of interrupt
  29771. priority. Each interrupt source is assigned a unique INTEVT code. The start address of the
  29772. interrupt handler is common to each interrupt source. This is why, for instance, the value of
  29773. INTEVT is used as an offset at the start of the interrupt handler and branched to in order to
  29774. identify the interrupt source.
  29775.  
  29776. The order of priority of the on-chip peripheral modules is specified as desired by setting priority
  29777. levels from 0 to 15 in interrupt priority registers A to C (IPRA–IPRC). The order of priority of
  29778. the on-chip peripheral modules is set to 0 by a reset.
  29779.  
  29780. When the priorities for multiple interrupt sources are set to the same level and such interrupts
  29781. are generated simultaneously, they are handled according to the default priority order shown in
  29782. table 19.5.
  29783.  
  29784. Updating of interrupt priority registers A to C should only be carried out when the BL bit in the
  29785. status register (SR) is set to 1. To prevent erroneous interrupt acceptance, first read one of the
  29786. interrupt priority registers, then clear the BL bit to 0. This will secure the necessary timing
  29787. internally.
  29788.  
  29789. Rev. 2.0, 02/99, page 644 of 830
  29790.  
  29791. ----------------------- Page 659-----------------------
  29792.  
  29793. Table 19.5 Interrupt Exception Handling Sources and Priority Order
  29794.  
  29795. INTEVT Interrupt Priority IPR (Bit Priority within Default
  29796. Interrupt Source Code (Initial Value) Numbers) IPR Setting Unit Priority
  29797.  
  29798. NMI H'1C0 16 — — High
  29799.  
  29800. IRL ,5/–,5/ = 0 H'200 15 — —
  29801.  
  29802. ,5/–,5/ = 1 H'220 14 — —
  29803.  
  29804. ,5/–,5/ = 2 H'240 13 — —
  29805.  
  29806. ,5/–,5/ = 3 H'260 12 — —
  29807.  
  29808. ,5/–,5/ = 4 H'280 11 — —
  29809.  
  29810. ,5/–,5/ = 5 H'2A0 10 — —
  29811.  
  29812. ,5/–,5/ = 6 H'2C0 9 — —
  29813.  
  29814. ,5/–,5/ = 7 H'2E0 8 — —
  29815.  
  29816. ,5/–,5/ = 8 H'300 7 — —
  29817.  
  29818. ,5/–,5/ = 9 H'320 6 — —
  29819.  
  29820. ,5/–,5/ = A H'340 5 — —
  29821.  
  29822. ,5/–,5/ = B H'360 4 — —
  29823.  
  29824. ,5/–,5/ = C H'380 3 — —
  29825.  
  29826. ,5/–,5/ = D H'3A0 2 — —
  29827.  
  29828. ,5/–,5/ = E H'3C0 1 — —
  29829.  
  29830. IRL0 H'240 13 — —
  29831.  
  29832. IRL1 H'2A0 10 — —
  29833.  
  29834. IRL2 H'300 7 — —
  29835.  
  29836. IRL3 H'360 4 — —
  29837.  
  29838. Hitachi- Hitachi-UDI H'600 15–0 (0) IPRC (3–0) —
  29839. UDI
  29840.  
  29841. GPIO GPIOI H'620 15–0 (0) IPRC (15–12) —
  29842.  
  29843. DMAC DMTE0 H'640 15–0 (0) IPRC (11–8) High
  29844.  
  29845. DMTE1 H'660
  29846.  
  29847. DMTE2 H'680
  29848.  
  29849. DMTE3 H'6A0
  29850.  
  29851. DMAE H'6C0 Low
  29852.  
  29853. TMU0 TUNI0 H'400 15–0 (0) IPRA (15–12) —
  29854.  
  29855. TMU1 TUNI1 H'420 15–0 (0) IPRA (11–8) —
  29856.  
  29857. TMU2 TUNI2 H'440 15–0 (0) IPRA (7–4) High
  29858.  
  29859. TICPI2 H'460 Low Low
  29860.  
  29861. Rev. 2.0, 02/99, page 645 of 830
  29862.  
  29863. ----------------------- Page 660-----------------------
  29864.  
  29865. Table 19.5 Interrupt Exception Handling Sources and Priority Order (cont)
  29866.  
  29867. INTEVT Interrupt Priority IPR (Bit Priority within Default
  29868. Interrupt Source Code (Initial Value) Numbers) IPR Setting Unit Priority
  29869.  
  29870. RTC ATI H'480 15–0 (0) IPRA (3–0) High High
  29871. Low
  29872.  
  29873. PRI H'4A0
  29874.  
  29875. CUI H'4C0
  29876.  
  29877. SCI1 ERI H'4E0 15–0 (0) IPRB (7–4) High
  29878.  
  29879. RXI H'500
  29880.  
  29881. TXI H'520
  29882.  
  29883. TEI H'540 Low
  29884.  
  29885. SCIF ERI H'700 15–0 (0) IPRC (7–4) High
  29886.  
  29887. RXI H'720
  29888.  
  29889. BRI H'740
  29890.  
  29891. TXI H'760 Low
  29892.  
  29893. WDT ITI H'560 15–0 (0) IPRB (15–12) —
  29894.  
  29895. REF RCMI H'580 15–0 (0) IPRB (11–8) High
  29896.  
  29897. ROVI H'5A0 Low Low
  29898.  
  29899. Note: TUNI0–TUNI2: Underflow interrupts
  29900. TICPI2: Input capture interrupt
  29901. ATI: Alarm interrupt
  29902. PRI: Periodic interrupt
  29903. CUI: Carry-up interrupt
  29904. ERI: Receive-error interrupt
  29905. RXI: Receive-data-full interrupt
  29906. TXI: Transmit-data-empty interrupt
  29907. TEI: Transmit-end interrupt
  29908. BRI: Break interrupt request
  29909. ITI: Interval timer interrupt
  29910. RCMI: Compare-match interrupt
  29911. ROVI: Refresh counter overflow interrupt
  29912. Hitachi-UDI: Hitachi-UDI interrupt
  29913. GPIOI: I/O port interrupt
  29914. DMTE0–DMTE3: DMAC transfer end interrupts
  29915. DMAE: DMAC address error interrupt
  29916.  
  29917. Rev. 2.0, 02/99, page 646 of 830
  29918.  
  29919. ----------------------- Page 661-----------------------
  29920.  
  29921. 19.3 Register Descriptions
  29922.  
  29923. 19.3.1 Interrupt Priority Registers A to C (IPRA–IPRC)
  29924.  
  29925. Interrupt priority registers A to C (IPRA–IPRC) are 16-bit readable/writable registers that set
  29926. priority levels from 0 to 15 for on-chip peripheral module interrupts. These registers are
  29927. initialized to H'0000 by a reset. They are not initialized in standby mode.
  29928.  
  29929. Bit: 15 14 13 12 11 10 9 8
  29930.  
  29931. Bit name:
  29932.  
  29933. Initial value: 0 0 0 0 0 0 0 0
  29934.  
  29935. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29936.  
  29937. Bit: 7 6 5 4 3 2 1 0
  29938.  
  29939. Bit name:
  29940.  
  29941. Initial value: 0 0 0 0 0 0 0 0
  29942.  
  29943. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  29944.  
  29945. Table 19.6 shows the relationship between the interrupt request sources and the IPRA–IPRC
  29946. register bits.
  29947.  
  29948. Table 19.6 Interrupt Request Sources and IPRA–IPRC Registers
  29949.  
  29950. Bits
  29951.  
  29952. Register 15–12 11–8 7–4 3–0
  29953.  
  29954. Interrupt priority register A TMU0 TMU1 TMU2 RTC
  29955. Interrupt priority register B WDT REF*1 SCI1 Reserved*2
  29956.  
  29957. Interrupt priority register C GPIO DMAC SCIF Hitachi-UDI
  29958.  
  29959. Notes: 1. REF is the memory refresh unit in the bus state controller (BSC). See section 13, Bus
  29960. State Controller (BSC), for details.
  29961. 2. Reserved bits: These bits are always read as 0 and should always be written with 0.
  29962.  
  29963. As shown in table 19.6, four on-chip peripheral modules are assigned to each register. Interrupt
  29964. priority levels are established by setting a value from H'F (1111) to H'0 (0000) in each of the
  29965. four-bit groups: 15–12, 11–8, 7–4, and 3–0. Setting H'F designates priority level 15 (the highest
  29966. level), and setting H'0 designates priority level 0 (requests are masked).
  29967.  
  29968. Rev. 2.0, 02/99, page 647 of 830
  29969.  
  29970. ----------------------- Page 662-----------------------
  29971.  
  29972. 19.3.2 Interrupt Control Register (ICR)
  29973.  
  29974. The interrupt control register (ICR) is a 16-bit register that sets the input signal detection mode
  29975. for external interrupt input pin NMI and indicates the input signal level at the NMI pin. This
  29976. register is initialized by a power-on reset or manual reset. It is not initialized in standby mode.
  29977.  
  29978. Bit: 15 14 13 12 11 10 9 8
  29979.  
  29980. Bit name: NMIL MAI — — — — NMIB NMIE
  29981.  
  29982. Initial value: 0/1* 0 0 0 0 0 0 0
  29983.  
  29984. R/W: R R/W — — — — R/W R/W
  29985.  
  29986. Bit: 7 6 5 4 3 2 1 0
  29987.  
  29988. Bit name: IRLM — — — — — — —
  29989.  
  29990. Initial value: 0 0 0 0 0 0 0 0
  29991.  
  29992. R/W: R/W — — — — — — —
  29993.  
  29994. Note: * 1 when NMI pin input is high, 0 when low.
  29995.  
  29996. Bit 15—NMI Input Level (NMIL): Sets the level of the signal input at the NMI pin. This bit
  29997. can be read to determine the NMI pin level. It cannot be modified.
  29998.  
  29999. Bit 15: NMIL Description
  30000.  
  30001. 0 NMI pin input level is low
  30002.  
  30003. 1 NMI pin input level is high
  30004.  
  30005. Bit 14—NMI Interrupt Mask (MAI): Specifies whether or not all interrupts are to be masked
  30006. while the NMI pin input level is low, irrespective of the CPU’s SR.BL bit.
  30007.  
  30008. Bit 14: MAI Description
  30009.  
  30010. 0 Interrupts enabled even while NMI pin is low (Initial value)
  30011.  
  30012. 1 Interrupts disabled while NMI pin is low*
  30013.  
  30014. Note: * NMI interrupts are accepted in normal operation and in sleep mode.
  30015. In standby mode, all interrupts are masked, and standby is not cleared, while the NMI pin
  30016. is low.
  30017.  
  30018. Rev. 2.0, 02/99, page 648 of 830
  30019.  
  30020. ----------------------- Page 663-----------------------
  30021.  
  30022. Bit 9—NMI Block Mode (NMIB): Specifies whether an NMI request is to be held pending or
  30023. detected immediately while the SR.BL bit is set to 1.
  30024.  
  30025. Bit 9: NMIB Description
  30026.  
  30027. 0 NMI interrupt requests held pending while SR.BL bit is set to 1
  30028. (Initial value)
  30029.  
  30030. 1 NMI interrupt requests detected while SR.BL bit is set to 1
  30031.  
  30032. Notes: 1. If interrupt requests are enabled while SR.BL = 1, the previous exception information
  30033. will be lost, and so must be saved beforehand.
  30034. 2. This bit is cleared automatically by NMI acceptance.
  30035.  
  30036. Bit 8—NMI Edge Select (NMIE): Specifies whether the falling or rising edge of the interrupt
  30037. request signal to the NMI pin is detected.
  30038.  
  30039. Bit 8: NMIE Description
  30040.  
  30041. 0 Interrupt request detected on falling edge of NMI input (Initial value)
  30042.  
  30043. 1 Interrupt request detected on rising edge of NMI input
  30044.  
  30045. Bit 7—IRL Pin Mode (IRLM): Specifies whether pins ,5/–,5/ are to be used as level-
  30046. encoded interrupt requests or as four independent interrupt requests.
  30047.  
  30048. Bit 7: IRLM Description
  30049.  
  30050. 0 ,5/ pins used as level-encoded interrupt requests (Initial value)
  30051.  
  30052. 1 ,5/ pins used as four independent interrupt requests
  30053.  
  30054. Bits 13 to 10 and 6 to 0—Reserved: These bits are always read as 0, and should only be written
  30055. with 0.
  30056.  
  30057. Rev. 2.0, 02/99, page 649 of 830
  30058.  
  30059. ----------------------- Page 664-----------------------
  30060.  
  30061. 19.4 INTC Operation
  30062.  
  30063. 19.4.1 Interrupt Operation Sequence
  30064.  
  30065. The sequence of operations when an interrupt is generated is described below. Figure 19.3 shows
  30066. a flowchart of the operations.
  30067.  
  30068. 1. The interrupt request sources send interrupt request signals to the interrupt controller.
  30069. 2. The interrupt controller selects the highest-priority interrupt from the interrupt requests sent,
  30070. according to the priority levels set in interrupt priority registers A to C (IPRA–IPRC).
  30071. Lower-priority interrupts are held pending. If two of these interrupts have the same priority
  30072. level, or if multiple interrupts occur within a single module, the interrupt with the highest
  30073. priority according to table 19.5, Interrupt Exception Handling Sources and Priority Order, is
  30074. selected.
  30075. 3. The priority level of the interrupt selected by the interrupt controller is compared with the
  30076. interrupt mask bits (I3–I0) in the status register (SR) of the CPU. If the request priority level
  30077. is higher that the level in bits I3–I0, the interrupt controller accepts the interrupt and sends an
  30078. interrupt request signal to the CPU.
  30079. 4. The CPU accepts an interrupt at a break between instructions.
  30080. 5. The interrupt source code is set in the interrupt event register (INTEVT).
  30081. 6. The status register (SR) and program counter (PC) are saved to SSR and SPC, respectively.
  30082. 7. The block bit (BL), mode bit (MD), and register bank bit (RB) in SR are set to 1.
  30083. 8. The CPU jumps to the start address of the interrupt handler (the sum of the value set in the
  30084. vector base register (VBR) and H'00000600).
  30085.  
  30086. The interrupt handler may branch with the INTEVT register value as its offset in order to
  30087. identify the interrupt source. This enables it to branch to the handling routine for the particular
  30088. interrupt source.
  30089.  
  30090. Notes: 1. The interrupt mask bits (I3–I0) in the status register (SR) are not changed by
  30091. acceptance of an interrupt in the SH7750.
  30092. 2. The interrupt source flag should be cleared in the interrupt handler. To ensure that an
  30093. interrupt request that should have been cleared is not inadvertently accepted again,
  30094. read the interrupt source flag after it has been cleared, then wait for the interval
  30095. shown in table 19.7 (Time for priority decision and SR mask bit comparison) before
  30096. clearing the BL bit or executing an RTE instruction.
  30097.  
  30098. Rev. 2.0, 02/99, page 650 of 830
  30099.  
  30100. ----------------------- Page 665-----------------------
  30101.  
  30102. Program
  30103. execution state
  30104.  
  30105. Interrupt No
  30106. generated?
  30107.  
  30108. Yes
  30109.  
  30110. (BL bit
  30111. in SR = 0) or No
  30112. (sleep or standby
  30113. mode)?
  30114. NMIB in No
  30115.  
  30116. ICR = 1 and
  30117. Yes
  30118. NMI?
  30119. No
  30120. NMI? Yes
  30121.  
  30122. Yes
  30123.  
  30124. Level 15 No
  30125.  
  30126. interrupt?
  30127.  
  30128. Yes
  30129. Level 14 No
  30130. I3–I0* = interrupt?
  30131. Yes
  30132. level 14 or
  30133. lower? Yes
  30134. Level 1 No
  30135. No I3–I0 = interrupt?
  30136. Yes
  30137. Set interrupt source level 13 or Yes
  30138. in INTEVT lower?
  30139.  
  30140. No
  30141. Yes I3–I0 =
  30142. Save SR to SSR; level 0?
  30143. save PC to SPC
  30144. No
  30145.  
  30146. Set BL, MD, RB bits
  30147. in SR to 1
  30148.  
  30149. Branch to exception
  30150. handler
  30151.  
  30152. Note: * I3–I0: Interrupt mask bits in status register (SR)
  30153.  
  30154. Figure 19.3 Interrupt Operation Flowchart
  30155.  
  30156. Rev. 2.0, 02/99, page 651 of 830
  30157.  
  30158. ----------------------- Page 666-----------------------
  30159.  
  30160. 19.4.2 Multiple Interrupts
  30161.  
  30162. When handling multiple interrupts, interrupt handling should include the following procedures:
  30163.  
  30164. 1. Branch to a specific interrupt handler corresponding to a code set in the INTEVT register.
  30165. The code in INTEVT can be used as a branch-offset for branching to the specific handler.
  30166. 2. Clear the interrupt source in the corresponding interrupt handler.
  30167. 3. Save SPC and SSR to the stack.
  30168. 4. Clear the BL bit in SR, and set the accepted interrupt level in the interrupt mask bits in SR.
  30169. 5. Handle the interrupt.
  30170. 6. Set the BL bit in SR to 1.
  30171. 7. Restore SSR and SPC from memory.
  30172. 8. Execute the RTE instruction.
  30173.  
  30174. When these procedures are followed in order, an interrupt of higher priority than the one being
  30175. handled can be accepted after clearing BL in step 4. This enables the interrupt response time to
  30176. be shortened for urgent processing.
  30177.  
  30178. 19.4.3 Interrupt Masking with MAI Bit
  30179.  
  30180. By setting the MAI bit to 1 in the ICR register, it is possible to mask interrupts while the NMI
  30181. pin is low, irrespective of the BL and IMASK bits in the SR register.
  30182.  
  30183. • In normal operation and sleep mode
  30184. All interrupts are masked while the NMI pin is low. However, an NMI interrupt only is
  30185. generated by a transition at the NMI pin.
  30186. • In standby mode
  30187. All interrupts are masked while the NMI pin is low, and an NMI interrupt is not generated by
  30188. a transition at the NMI pin. Therefore, standby cannot be cleared by an NMI interrupt while
  30189. the MAI bit is set to 1.
  30190.  
  30191. Rev. 2.0, 02/99, page 652 of 830
  30192.  
  30193. ----------------------- Page 667-----------------------
  30194.  
  30195. 19.5 Interrupt Response Time
  30196.  
  30197. The time from generation of an interrupt request until interrupt exception handling is performed
  30198. and fetching of the first instruction of the exception handler is started (the interrupt response
  30199. time) is shown in table 19.7.
  30200.  
  30201. Table 19.7 Interrupt Response Time
  30202.  
  30203. Number of States
  30204.  
  30205. Peripheral
  30206. Item NMI RL Modules Notes
  30207.  
  30208. Time for priority decision and 1Icyc + 4Bcyc 1Icyc + 7Bcyc 1Icyc + 2Bcyc
  30209. SR mask bit comparison
  30210.  
  30211. Wait time until end of S – 1 (≥ 0) × S – 1 (≥ 0) × S – 1 (≥ 0) ×
  30212. sequence being executed by Icyc Icyc Icyc
  30213. CPU
  30214.  
  30215. Time from interrupt exception 4 × Icyc 4 × Icyc 4 × Icyc
  30216. handling (save of SR and PC)
  30217. until fetch of first instruction of
  30218. exception handler is started
  30219.  
  30220. Response Total 5Icyc + 4Bcyc 5Icyc + 7Bcyc 5Icyc + 2Bcyc
  30221. time + (S – 1)Icyc + (S – 1)Icyc + (S – 1)Icyc
  30222.  
  30223. Minimum 13Icyc 19Icyc 9Icyc When Icyc:
  30224. case Bcyc = 2:1
  30225.  
  30226. Maximum 36 + S Icyc 60 + S Icyc 20 + S Icyc When Icyc:
  30227. case Bcyc = 8:1
  30228.  
  30229. Icyc: One cycle of internal clock supplied to CPU, etc.
  30230. Bcyc: One CKIO cycle
  30231. S: Latency of instruction
  30232.  
  30233. Rev. 2.0, 02/99, page 653 of 830
  30234.  
  30235. ----------------------- Page 668-----------------------
  30236.  
  30237. Rev. 2.0, 02/99, page 654 of 830
  30238.  
  30239. ----------------------- Page 669-----------------------
  30240.  
  30241. Section 20 User Break Controller (UBC)
  30242.  
  30243. 20.1 Overview
  30244.  
  30245. The user break controller (UBC) provides functions that simplify program debugging. When
  30246. break conditions are set in the UBC, a user break interrupt is generated according to the contents
  30247. of the bus cycle generated by the CPU. This function makes it easy to design an effective self-
  30248. monitoring debugger, enabling programs to be debugged with the chip alone, without using an
  30249. in-circuit emulator.
  30250.  
  30251. 20.1.1 Features
  30252.  
  30253. The UBC has the following features.
  30254.  
  30255. • Two break channels (A and B)
  30256. User break interrupts can be generated on independent conditions for channels A and B, or
  30257. on sequential conditions (sequential break setting: channel A → channel B).
  30258. • The following can be set as break compare conditions:
  30259.  Address (selection of 32-bit virtual address and ASID for comparison):
  30260. Address: All bits compared/lower 10 bits masked/lower 12 bits masked/lower 16 bits
  30261. masked/lower 20 bits masked/all bits masked
  30262. ASID: All bits compared/all bits masked
  30263.  Data (channel B only, 32-bit mask capability)
  30264.  Bus cycle: Instruction access/operand access
  30265.  Read/write
  30266.  Operand size: Byte/word/longword/quadword
  30267. • An instruction access cycle break can be effected before or after the instruction is executed.
  30268.  
  30269. Rev. 2.0, 02/99, page 655 of 830
  30270.  
  30271. ----------------------- Page 670-----------------------
  30272.  
  30273. 20.1.2 Block Diagram
  30274.  
  30275. Figure 20.1 shows a block diagram of the UBC.
  30276.  
  30277. Access Address Data
  30278. control bus bus
  30279.  
  30280. Channel A
  30281.  
  30282. Access BBRA
  30283. comparator
  30284.  
  30285. BARA
  30286.  
  30287. Address
  30288. comparator BASRA
  30289.  
  30290. BAMRA
  30291.  
  30292. Channel B
  30293.  
  30294. Access
  30295. BBRB
  30296. comparator
  30297.  
  30298. BARB
  30299.  
  30300. Address
  30301. comparator BASRB
  30302.  
  30303. BAMRB
  30304.  
  30305. Data BDRB
  30306.  
  30307. comparator
  30308.  
  30309. BDMRB
  30310.  
  30311. BBRA: Break bus cycle register A
  30312. BARA: Break address register A
  30313. BASRA: Break ASID register A
  30314. BAMRA: Break address mask register A
  30315. BBRB: Break bus cycle register B
  30316. BARB: Break address register B Control BRCR
  30317. BASRB: Break ASID register B
  30318. BAMRB: Break address mask register B
  30319.  
  30320. BDRB: Break data register B
  30321. User break trap request
  30322. BDMRB: Break data mask register B
  30323. BRCR: Break control register
  30324.  
  30325.  
  30326. Figure 20.1 Block Diagram of User Break Controller
  30327.  
  30328. Rev. 2.0, 02/99, page 656 of 830
  30329.  
  30330. ----------------------- Page 671-----------------------
  30331.  
  30332. Table 20.1 shows the UBC registers.
  30333.  
  30334. Table 20.1 UBC Registers
  30335.  
  30336. Area 7 Access
  30337. Name Abbreviation R/W Initial Value P4 Address Address Size
  30338.  
  30339. Break address BARA R/W Undefined H'FF200000 H'1F200000 32
  30340. register A
  30341.  
  30342. Break address BAMRA R/W Undefined H'FF200004 H'1F200004 8
  30343. mask
  30344. register A
  30345.  
  30346. Break bus BBRA R/W H'0000 H'FF200008 H'1F200008 16
  30347. cycle register A
  30348.  
  30349. Break ASID BASRA R/W Undefined H'FF000014 H'1F000014 8
  30350. register A
  30351.  
  30352. Break address BARB R/W Undefined H'FF20000C H'1F20000C 32
  30353. register B
  30354.  
  30355. Break address BAMRB R/W Undefined H'FF200010 H'1F200010 8
  30356. mask
  30357. register B
  30358.  
  30359. Break bus BBRB R/W H'0000 H'FF200014 H'1F200014 16
  30360. cycle register B
  30361.  
  30362. Break ASID BASRB R/W Undefined H'FF000018 H'1F000018 8
  30363. register B
  30364.  
  30365. Break data BDRB R/W Undefined H'FF200018 H'1F200018 32
  30366. register B
  30367.  
  30368. Break data BDMRB R/W Undefined H'FF20001C H'1F20001C 32
  30369. mask register B
  30370.  
  30371. Break control BRCR R/W H'0000* H'FF200020 H'1F200020 16
  30372. register
  30373.  
  30374. Note: * Some bits are not initialized. See section 20.2.12, Break Control Register (BRCR), for
  30375. details.
  30376.  
  30377. Rev. 2.0, 02/99, page 657 of 830
  30378.  
  30379. ----------------------- Page 672-----------------------
  30380.  
  30381. 20.2 Register Descriptions
  30382.  
  30383. 20.2.1 Access to UBC Control Registers
  30384.  
  30385. The access size must be the same as the control register size. If the sizes are different, a write
  30386. will not be effected in a UBC register write operation, and a read operation will return an
  30387. undefined value. UBC control register contents cannot be transferred to a floating-point register
  30388. using a floating-point memory load instruction.
  30389.  
  30390. When a UBC control register is updated, use either of the following methods to make the
  30391. updated value valid:
  30392.  
  30393. 1. Execute an RTE instruction after the memory store instruction that updated the register. The
  30394. updated value will be valid from the RTE instruction jump destination onward.
  30395. 2. Execute instructions requiring 5 states for execution after the memory store instruction that
  30396. updated the register. As the SH7750 executes two instructions in parallel and a minimum of
  30397. 0.5 state is required for execution of one instruction, 11 instructions must be inserted. The
  30398. updated value will be valid from the 6th state onward.
  30399.  
  30400. Rev. 2.0, 02/99, page 658 of 830
  30401.  
  30402. ----------------------- Page 673-----------------------
  30403.  
  30404. 20.2.2 Break Address Register A (BARA)
  30405.  
  30406. Bit: 31 30 29 28 27 26 25 24
  30407.  
  30408. BAA31 BAA30 BAA29 BAA28 BAA27 BAA26 BAA25 BAA24
  30409.  
  30410. Initial value: * * * * * * * *
  30411.  
  30412. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30413.  
  30414. Bit: 23 22 21 20 19 18 17 16
  30415.  
  30416. BAA23 BAA22 BAA21 BAA20 BAA19 BAA18 BAA17 BAA16
  30417.  
  30418. Initial value: * * * * * * * *
  30419.  
  30420. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30421.  
  30422. Bit: 15 14 13 12 11 10 9 8
  30423.  
  30424. BAA15 BAA14 BAA13 BAA12 BAA11 BAA10 BAA9 BAA8
  30425.  
  30426. Initial value: * * * * * * * *
  30427.  
  30428. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30429.  
  30430. Bit: 7 6 5 4 3 2 1 0
  30431.  
  30432. BAA7 BAA6 BAA5 BAA4 BAA3 BAA2 BAA1 BAA0
  30433.  
  30434. Initial value: * * * * * * * *
  30435.  
  30436. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30437.  
  30438. Note: *: Undefined
  30439.  
  30440. Break address register A (BARA) is a 32-bit readable/writable register that specifies the virtual
  30441. address used in the channel A break conditions. BARA is not initialized by a power-on reset or
  30442. manual reset.
  30443.  
  30444. Bits 31 to 0—Break Address A31 to A0 (BAA31–BAA0): These bits hold the virtual address
  30445. (bits 31–0) used in the channel A break conditions.
  30446.  
  30447. Rev. 2.0, 02/99, page 659 of 830
  30448.  
  30449. ----------------------- Page 674-----------------------
  30450.  
  30451. 20.2.3 Break ASID Register A (BASRA)
  30452.  
  30453. Bit: 7 6 5 4 3 2 1 0
  30454.  
  30455. BASA7 BASA6 BASA5 BASA4 BASA3 BASA2 BASA1 BASA0
  30456.  
  30457. Initial value: * * * * * * * *
  30458.  
  30459. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30460.  
  30461. Note: *: Undefined
  30462.  
  30463. Break ASID register A (BASRA) is an 8-bit readable/writable register that specifies the ASID
  30464. used in the channel A break conditions. BASRA is not initialized by a power-on reset or manual
  30465. reset.
  30466.  
  30467. Bits 7 to 0—Break ASID A7 to A0 (BASA7–BASA0): These bits hold the ASID (bits 7–0)
  30468. used in the channel A break conditions.
  30469.  
  30470. 20.2.4 Break Address Mask Register A (BAMRA)
  30471.  
  30472. Bit: 7 6 5 4 3 2 1 0
  30473.  
  30474. — — — — BAMA2 BASMA BAMA1 BAMA0
  30475.  
  30476. Initial value: 0 0 0 0 * * * *
  30477.  
  30478. R/W: R R R R R/W R/W R/W R/W
  30479.  
  30480. Note: *: Undefined
  30481.  
  30482. Break address mask register A (BAMRA) is an 8-bit readable/writable register that specifies
  30483. which bits are to be masked in the break ASID set in BASRA and the break address set in
  30484. BARA. BAMRA is not initialized by a power-on reset or manual reset.
  30485.  
  30486. Bits 7 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  30487.  
  30488. Bit 2—Break ASID Mask A (BASMA): Specifies whether all bits of the channel A break ASID
  30489. (BASA7–BASA0) are to be masked.
  30490.  
  30491. Bit 2: BASMA Description
  30492.  
  30493. 0 All BASRA bits are included in break conditions
  30494.  
  30495. 1 No BASRA bits are included in break conditions
  30496.  
  30497. Rev. 2.0, 02/99, page 660 of 830
  30498.  
  30499. ----------------------- Page 675-----------------------
  30500.  
  30501. Bits 3, 1, and 0—Break Address Mask A2 to A0 (BAMA2–BAMA0): These bits specify
  30502. which bits of the channel A break address (BAA31–BAA0) set in BARA are to be masked.
  30503.  
  30504. Bit 3: BAMA2 Bit 1: BAMA1 Bit 0: BAMA0 Description
  30505.  
  30506. 0 0 0 All BARA bits are included in break conditions
  30507.  
  30508. 1 Lower 10 bits of BARA are masked, and not
  30509. included in break conditions
  30510.  
  30511. 1 0 Lower 12 bits of BARA are masked, and not
  30512. included in break conditions
  30513.  
  30514. 1 All BARA bits are masked, and not included
  30515. in break conditions
  30516.  
  30517. 1 0 0 Lower 16 bits of BARA are masked, and not
  30518. included in break conditions
  30519.  
  30520. 1 Lower 20 bits of BARA are masked, and not
  30521. included in break conditions
  30522.  
  30523. 1 * Reserved (cannot be set)
  30524.  
  30525. Note: *: Don’t care
  30526.  
  30527. 20.2.5 Break Bus Cycle Register A (BBRA)
  30528.  
  30529. Bit: 15 14 13 12 11 10 9 8
  30530.  
  30531. — — — — — — — —
  30532.  
  30533. Initial value: 0 0 0 0 0 0 0 0
  30534.  
  30535. R/W: R R R R R R R R
  30536.  
  30537. Bit: 7 6 5 4 3 2 1 0
  30538.  
  30539. — SZA2 IDA1 IDA0 RWA1 RWA0 SZA1 SZA0
  30540.  
  30541. Initial value: 0 0 0 0 0 0 0 0
  30542.  
  30543. R/W: R R/W R/W R/W R/W R/W R/W R/W
  30544.  
  30545. Break bus cycle register A (BBRA) is a 16-bit readable/writable register that sets three
  30546. conditions—(1) instruction access/operand access, (2) read/write, and (3) operand size—from
  30547. among the channel A break conditions.
  30548.  
  30549. BBRA is initialized to H'0000 by a power-on reset. It retains its value in standby mode.
  30550.  
  30551. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  30552.  
  30553. Rev. 2.0, 02/99, page 661 of 830
  30554.  
  30555. ----------------------- Page 676-----------------------
  30556.  
  30557. Bits 5 and 4—Instruction Access/Operand Access Select A (IDA1, IDA0): These bits specify
  30558. whether an instruction access cycle or an operand access cycle is used as the bus cycle in the
  30559. channel A break conditions.
  30560.  
  30561. Bit 5: IDA1 Bit 4: IDA0 Description
  30562.  
  30563. 0 0 Condition comparison is not performed (Initial value)
  30564.  
  30565. 1 Instruction access cycle is used as break condition
  30566.  
  30567. 1 0 Operand access cycle is used as break condition
  30568.  
  30569. 1 Instruction access cycle or operand access cycle is used as
  30570. break condition
  30571.  
  30572. Bits 3 and 2—Read/Write Select A (RWA1, RWA0): These bits specify whether a read cycle
  30573. or write cycle is used as the bus cycle in the channel A break conditions.
  30574.  
  30575. Bit 3: RWA1 Bit 2: RWA0 Description
  30576.  
  30577. 0 0 Condition comparison is not performed (Initial value)
  30578.  
  30579. 1 Read cycle is used as break condition
  30580.  
  30581. 1 0 Write cycle is used as break condition
  30582.  
  30583. 1 Read cycle or write cycle is used as break condition
  30584.  
  30585. Bits 6, 1, and 0—Operand Size Select A (SZA2–SZA0): These bits select the operand size of
  30586. the bus cycle used as a channel A break condition.
  30587.  
  30588. Bit 6: SZA2 Bit 1: SZA1 Bit 0: SZA0 Description
  30589.  
  30590. 0 0 0 Operand size is not included in break conditions
  30591. (Initial value)
  30592.  
  30593. 1 Byte access is used as break condition
  30594.  
  30595. 1 0 Word access is used as break condition
  30596.  
  30597. 1 Longword access is used as break condition
  30598.  
  30599. 1 0 0 Quadword access is used as break condition
  30600.  
  30601. 1 Reserved (cannot be set)
  30602.  
  30603. 1 * Reserved (cannot be set)
  30604.  
  30605. Note: *: Don’t care
  30606.  
  30607. Rev. 2.0, 02/99, page 662 of 830
  30608.  
  30609. ----------------------- Page 677-----------------------
  30610.  
  30611. 20.2.6 Break Address Register B (BARB)
  30612.  
  30613. BARB is the channel B break address register. The bit configuration is the same as for BARA.
  30614.  
  30615. 20.2.7 Break ASID Register B (BASRB)
  30616.  
  30617. BASRB is the channel B break ASID register. The bit configuration is the same as for BASRA.
  30618.  
  30619. 20.2.8 Break Address Mask Register B (BAMRB)
  30620.  
  30621. BAMRB is the channel B break address mask register. The bit configuration is the same as for
  30622. BAMRA.
  30623.  
  30624. 20.2.9 Break Data Register B (BDRB)
  30625.  
  30626. Bit: 31 30 29 28 27 26 25 24
  30627.  
  30628. BDB31 BDB30 BDB29 BDB28 BDB27 BDB26 BDB25 BDB24
  30629.  
  30630. Initial value: * * * * * * * *
  30631.  
  30632. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30633.  
  30634. Bit: 23 22 21 20 19 18 17 16
  30635.  
  30636. BDB23 BDB22 BDB21 BDB20 BDB19 BDB18 BDB17 BDB16
  30637.  
  30638. Initial value: * * * * * * * *
  30639.  
  30640. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30641.  
  30642. Bit: 15 14 13 12 11 10 9 8
  30643.  
  30644. BDB15 BDB14 BDB13 BDB12 BDB11 BDB10 BDB9 BDB8
  30645.  
  30646. Initial value: * * * * * * * *
  30647.  
  30648. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30649.  
  30650. Bit: 7 6 5 4 3 2 1 0
  30651.  
  30652. BDB7 BDB6 BDB5 BDB4 BDB3 BDB2 BDB1 BDB0
  30653.  
  30654. Initial value: * * * * * * * *
  30655.  
  30656. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30657.  
  30658. Note: *: Undefined
  30659.  
  30660. Break data register B (BDRB) is a 32-bit readable/writable register that specifies the data (bits
  30661. 31–0) to be used in the channel B break conditions. BDRB is not initialized by a power-on reset
  30662. or manual reset.
  30663.  
  30664. Rev. 2.0, 02/99, page 663 of 830
  30665.  
  30666. ----------------------- Page 678-----------------------
  30667.  
  30668. Bits 31 to 0—Break Data B31 to B0 (BDB31–BDB0): These bits hold the data (bits 31–0) to
  30669. be used in the channel B break conditions.
  30670.  
  30671. 20.2.10 Break Data Mask Register B (BDMRB)
  30672.  
  30673. Bit: 31 30 29 28 27 26 25 24
  30674.  
  30675. BDMB31 BDMB30 BDMB29 BDMB28 BDMB27 BDMB26 BDMB25 BDMB24
  30676.  
  30677. Initial value: * * * * * * * *
  30678.  
  30679. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30680.  
  30681. Bit: 23 22 21 20 19 18 17 16
  30682.  
  30683. BDMB23 BDMB22 BDMB21 BDMB20 BDMB19 BDMB18 BDMB17 BDMB16
  30684.  
  30685. Initial value: * * * * * * * *
  30686.  
  30687. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30688.  
  30689. Bit: 15 14 13 12 11 10 9 8
  30690.  
  30691. BDMB15 BDMB14 BDMB13 BDMB12 BDMB11 BDMB10 BDMB9 BDMB8
  30692.  
  30693. Initial value: * * * * * * * *
  30694.  
  30695. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30696.  
  30697. Bit: 7 6 5 4 3 2 1 0
  30698.  
  30699. BDMB7 BDMB6 BDMB5 BDMB4 BDMB3 BDMB2 BDMB1 BDMB0
  30700.  
  30701. Initial value: * * * * * * * *
  30702.  
  30703. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30704.  
  30705. Note: *: Undefined
  30706.  
  30707. Break data mask register B (BDMRB) is a 32-bit readable/writable register that specifies which
  30708. bits of the break data set in BDRB are to be masked. BDMRB is not initialized by a power-on
  30709. reset or manual reset.
  30710.  
  30711. Rev. 2.0, 02/99, page 664 of 830
  30712.  
  30713. ----------------------- Page 679-----------------------
  30714.  
  30715. Bits 31 to 0—Break Data Mask B31 to B0 (BDMB31–BDMB0): These bits specify whether
  30716. the corresponding bit of the channel B break data (BDB31–BDB0) set in BDRB is to be masked.
  30717.  
  30718. Bit 31–0: BDMBn Description
  30719.  
  30720. 0 Channel B break data bit BDBn is included in break conditions
  30721.  
  30722. 1 Channel B break data bit BDBn is masked, and not included in break
  30723. conditions
  30724.  
  30725. n = 31 to 0
  30726. Note: When the data bus value is included in the break conditions, the operand size should be
  30727. specified. When byte size is specified, set the same data in bits 15–8 and 7–0 of BDRB
  30728. and BDMRB.
  30729.  
  30730. 20.2.11 Break Bus Cycle Register B (BBRB)
  30731.  
  30732. BBRB is the channel B bus break register. The bit configuration is the same as for BBRA.
  30733.  
  30734. 20.2.12 Break Control Register (BRCR)
  30735.  
  30736. Bit: 15 14 13 12 11 10 9 8
  30737.  
  30738. CMFA CMFB — — — PCBA — —
  30739.  
  30740. Initial value: 0 0 0 0 0 * 0 0
  30741.  
  30742. R/W: R/W R/W R R R R/W R R
  30743.  
  30744. Bit: 7 6 5 4 3 2 1 0
  30745.  
  30746. DBEB PCBB — — SEQ — — UBDE
  30747.  
  30748. Initial value: * * 0 0 * 0 0 0
  30749.  
  30750. R/W: R/W R/W R R R/W R R R/W
  30751.  
  30752. Note: *: Undefined
  30753.  
  30754. The break control register (BRCR) is a 16-bit readable/writable register that specifies (1)
  30755. whether channels A and B are to be used as two independent channels or in a sequential
  30756. condition, (2) whether the break is to be effected before or after instruction execution, (3)
  30757. whether the BDRB register is to be included in the channel B break conditions, and (4) whether
  30758. the user break debug function is to be used. BRCR also contains condition match flags. The
  30759. CMFA, CMFB, and UBDE bits in BRCR are initialized to 0 by a power-on reset, but retain their
  30760. value in standby mode. The value of the PCBA, DBEB, PCBB, and SEQ bits is undefined after a
  30761. power-on reset or manual reset, so these bits should be initialized by software as necessary.
  30762.  
  30763. Rev. 2.0, 02/99, page 665 of 830
  30764.  
  30765. ----------------------- Page 680-----------------------
  30766.  
  30767. Bit 15—Condition Match Flag A (CMFA): Set to 1 when a break condition set for channel A
  30768. is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once being set,
  30769. it should be cleared with a write.)
  30770.  
  30771. Bit 15: CMFA Description
  30772.  
  30773. 0 Channel A break condition is not matched (Initial value)
  30774.  
  30775. 1 Channel A break condition match has occurred
  30776.  
  30777. Bit 14—Condition Match Flag B (CMFB): Set to 1 when a break condition set for channel B
  30778. is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once being set,
  30779. it should be cleared with a write.)
  30780.  
  30781. Bit 14: CMFB Description
  30782.  
  30783. 0 Channel B break condition is not matched (Initial value)
  30784.  
  30785. 1 Channel B break condition match has occurred
  30786.  
  30787. Bits 13 to 11—Reserved: These bits are always read as 0, and should only be written with 0.
  30788.  
  30789. Bit 10—Instruction Access Break Select A (PCBA): Specifies whether a channel A instruction
  30790. access cycle break is to be effected before or after the instruction is executed. This bit is not
  30791. initialized by a power-on reset or manual reset.
  30792.  
  30793. Bit 10: PCBA Description
  30794.  
  30795. 0 Channel A PC break is effected before instruction execution
  30796.  
  30797. 1 Channel A PC break is effected after instruction execution
  30798.  
  30799. Bits 9 and 8—Reserved: These bits are always read as 0, and should only be written with 0.
  30800.  
  30801. Bit 7—Data Break Enable B (DBEB): Specifies whether the data bus condition is to be
  30802. included in the channel B break conditions. This bit is not initialized by a power-on reset or
  30803. manual reset.
  30804.  
  30805. Bit 7: DBEB Description
  30806.  
  30807. 0 Data bus condition is not included in channel B conditions
  30808.  
  30809. 1 Data bus condition is included in channel B conditions
  30810.  
  30811. Note: When the data bus is included in the break conditions, bits IDB1–0 in break bus cycle
  30812. register B (BBRB) should be set to 10 or 11.
  30813.  
  30814. Rev. 2.0, 02/99, page 666 of 830
  30815.  
  30816. ----------------------- Page 681-----------------------
  30817.  
  30818. Bit 6—PC Break Select B (PCBB): Specifies whether a channel B instruction access cycle
  30819. break is to be effected before or after the instruction is executed. This bit is not initialized by a
  30820. power-on reset or manual reset.
  30821.  
  30822. Bit 6: PCBB Description
  30823.  
  30824. 0 Channel B PC break is effected before instruction execution
  30825.  
  30826. 1 Channel B PC break is effected after instruction execution
  30827.  
  30828. Bits 5 and 4—Reserved: These bits are always read as 0, and should only be written with 0.
  30829.  
  30830. Bit 3—Sequence Condition Select (SEQ): Specifies whether the conditions for channels A and
  30831. B are to be independent or sequential. This bit is not initialized by a power-on reset or manual
  30832. reset.
  30833.  
  30834. Bit 3: SEQ Description
  30835.  
  30836. 0 Channel A and B comparisons are performed as independent conditions
  30837.  
  30838. 1 Channel A and B comparisons are performed as sequential conditions
  30839. (channel A → channel B)
  30840.  
  30841. Bits 2 and 1—Reserved: These bits are always read as 0, and should only be written with 0.
  30842.  
  30843. Bit 0—User Break Debug Enable (UBDE): Specifies whether the user break debug function
  30844. (see section 20.4, User Break Debug Support Function) is to be used.
  30845.  
  30846. Bit 0: UBDE Description
  30847.  
  30848. 0 User break debug function is not used (Initial value)
  30849.  
  30850. 1 User break debug function is used
  30851.  
  30852. Rev. 2.0, 02/99, page 667 of 830
  30853.  
  30854. ----------------------- Page 682-----------------------
  30855.  
  30856. 20.3 Operation
  30857.  
  30858. 20.3.1 Explanation of Terms Relating to Accesses
  30859.  
  30860. An instruction access is an access that obtains an instruction. An operand access is any memory
  30861. access for the purpose of instruction execution. For example, the access to address PC+disp×2+4
  30862. in the instruction MOV.W @(disp,PC), Rn (an access very close to the program counter) is an
  30863. operand access. The fetching of an instruction from the branch destination when a branch
  30864. instruction is executed is also an instruction access. As the term “data” is used to distinguish
  30865. data from an address, the term “operand access” is used in this section.
  30866.  
  30867. In the SH7750, all operand accesses are treated as either read accesses or write accesses. The
  30868. following instructions require special attention:
  30869.  
  30870. • PREF, OCBP, and OCBWB instructions: Treated as read accesses.
  30871. • MOVCA and OCBI instructions: Treated as write accesses.
  30872. • TAS instruction: Treated as one read access and one write access.
  30873.  
  30874. The operand accesses for the PREF, OCBP, OCBWB, and OCBI instructions are accesses with
  30875. no access data.
  30876.  
  30877. The SH7750 handles all operand accesses as having a data size. The data size can be byte, word,
  30878. longword, or quadword. The operand data size for the PREF, OCBP, OCBWB, MOVCA, and
  30879. OCBI instructions is treated as longword.
  30880.  
  30881. Rev. 2.0, 02/99, page 668 of 830
  30882.  
  30883. ----------------------- Page 683-----------------------
  30884.  
  30885. 20.3.2 Explanation of Terms Relating to Instruction Intervals
  30886.  
  30887. In this section, “1 (2, 3, ...) instruction(s) after...”, as a measure of the distance between two
  30888. instructions, is defined as follows. A branch is counted as an interval of two instructions.
  30889.  
  30890. • Example of sequence of instructions with no branch:
  30891. 100 Instruction A (0 instructions after instruction A)
  30892. 102 Instruction B (1 instruction after instruction A)
  30893. 104 Instruction C (2 instructions after instruction A)
  30894. 106 Instruction D (3 instructions after instruction A)
  30895.  
  30896. • Example of sequence of instructions with a branch (however, the example of a sequence of
  30897. instructions with no branch should be applied when the branch destination of a delayed
  30898. branch instruction is the instruction itself + 4):
  30899. 100 Instruction A: BT/S L200 (0 instructions after instruction A)
  30900. 102 Instruction B (1 instruction after instruction A, 0 instructions after instruction
  30901. B)
  30902. L200 200 Instruction C (3 instructions after instruction A, 2 instructions after instruction
  30903. B)
  30904. 202 Instruction D (4 instructions after instruction A, 3 instructions after instruction
  30905. B)
  30906.  
  30907. 20.3.3 User Break Operation Sequence
  30908.  
  30909. The sequence of operations from setting of break conditions to user break exception handling is
  30910. described below.
  30911.  
  30912. 1. Specify pre- or post-execution breaking in the case of an instruction access, inclusion or
  30913. exclusion of the data bus value in the break conditions in the case of an operand access, and
  30914. use of independent or sequential channel A and B break conditions, in the break control
  30915. register (BRCR). Set the break addresses in the break address registers for each channel
  30916. (BARA, BARB), the ASIDs corresponding to the break space in the break ASID registers
  30917. (BASRA, BASRB), and the address and ASID masking methods in the break address mask
  30918. registers (BAMRA, BAMRB). If the data bus value is to be included in the break conditions,
  30919. also set the break data in the break data register (BDRB) and the data mask in the break data
  30920. mask register (BDMRB).
  30921.  
  30922. 2. Set the break bus conditions in the break bus cycle registers (BBRA, BBRB). If even one of
  30923. the BBRA/BBRB instruction access/operand access select (ID bit) and read/write select
  30924. groups (RW bit) is set to 00, a user break interrupt will not be generated on the
  30925. corresponding channel. Make the BBRA and BBRB settings after all other break-related
  30926. register settings have been completed. If breaks are enabled with BBRA/BBRB while the
  30927.  
  30928. Rev. 2.0, 02/99, page 669 of 830
  30929.  
  30930. ----------------------- Page 684-----------------------
  30931.  
  30932. break address, data, or mask register, or the break control register is in the initial state after a
  30933. reset, a break may be generated inadvertently.
  30934.  
  30935. 3. The operation when a break condition is satisfied depends on the BL bit (in the CPU’s SR
  30936. register). When the BL bit is 0, exception handling is started and the condition match flag
  30937. (CMFA/CMFB) for the respective channel is set for the matched condition. When the BL bit
  30938. is 1, the condition match flag (CMFA/CMFB) for the respective channel is set for the
  30939. matched condition but exception handling is not started.
  30940. The condition match flags (CMFA, CMFB) are set by a branch condition match, but are not
  30941. reset. Therefore, a memory store instruction should be used on the BRCR register to clear the
  30942. flags to 0. See section 20.3.6, Condition Match Flag Setting, for the exact setting conditions
  30943. for the condition match flags.
  30944.  
  30945. 4. When sequential condition mode has been selected, and the channel B condition is matched
  30946. after the channel A condition has been matched, a break is effected at the instruction at
  30947. which the channel B condition was matched. See section 20.3.8, Contiguous A and B
  30948. Settings for Sequential Conditions, for the operation when the channel A condition match
  30949. and channel B condition match occur close together. With sequential conditions, only the
  30950. channel B condition match flag is set. When sequential condition mode has been selected, if
  30951. it is wished to clear the channel A match when the channel A condition has been matched
  30952. but the channel B condition has not yet been matched, this can be done by writing 0 to the
  30953. SEQ bit in the BRCR register.
  30954.  
  30955. 20.3.4 Instruction Access Cycle Break
  30956.  
  30957. 1. When an instruction access/read/word setting is made in the break bus cycle register
  30958. (BBRA/BBRB), an instruction access cycle can be used as a break condition. In this case,
  30959. breaking before or after execution of the relevant instruction can be selected with the
  30960. PCBA/PCBB bit in the break control register (BRCR). When an instruction access cycle is
  30961. used as a break condition, clear the LSB of the break address registers (BARA, BARB) to 0.
  30962. A break will not be generated if this bit is set to 1.
  30963.  
  30964. 2. When a pre-execution break is specified, the break is effected when it is confirmed that the
  30965. instruction is to be fetched and executed. Therefore, an overrun-fetched instruction (an
  30966. instruction that is fetched but not executed when a branch or exception occurs) cannot be
  30967. used in a break. However, if a TLB miss or TLB protection violation exception occurs at the
  30968. time of the fetch of an instruction subject to a break, the break exception handling is carried
  30969. out first. The instruction TLB exception handling is performed when the instruction is re-
  30970. executed (see section 5.4, Exception Types and Priorities). Also, since a delayed branch
  30971. instruction and the delay slot instruction are executed as a single instruction, if a pre-
  30972. execution break is specified for a delay slot instruction, the break will be effected before
  30973. execution of the delayed branch instruction. However, a pre-execution break cannot be
  30974. specified for the delay slot instruction for an RTE instruction.
  30975.  
  30976. Rev. 2.0, 02/99, page 670 of 830
  30977.  
  30978. ----------------------- Page 685-----------------------
  30979.  
  30980. 3. With a pre-execution break, the instruction set as a break condition is executed, then a break
  30981. interrupt is generated before the next instruction is executed. When a post-execution break is
  30982. set for a delayed branch instruction, the delay slot is executed and the break is effected
  30983. before execution of the instruction at the branch destination (when the branch is made) or the
  30984. instruction two instructions ahead of the branch instruction (when the branch is not made).
  30985.  
  30986. 4. When an instruction access cycle is set for channel B, break data register B (BDRB) is
  30987. ignored in judging whether there is an instruction access match. Therefore, a break condition
  30988. specified by the DBEB bit in BRCR is not executed.
  30989.  
  30990. 20.3.5 Operand Access Cycle Break
  30991.  
  30992. 1. In the case of an operand access cycle break, the bits included in address bus comparison
  30993. vary as shown below according to the data size specification in the break bus cycle register
  30994. (BBRA/BBRB).
  30995.  
  30996. Data Size Address Bits Compared
  30997.  
  30998. Quadword (100) Address bits A31–A3
  30999.  
  31000. Longword (011) Address bits A31–A2
  31001.  
  31002. Word (010) Address bits A31–A1
  31003.  
  31004. Byte (001) Address bits A31–A0
  31005.  
  31006. Not included in condition (000) In quadword access, address bits A31–A3
  31007.  
  31008. In longword access, address bits A31–A2
  31009.  
  31010. In word access, address bits A31–A1
  31011.  
  31012. In byte access, address bits A31–A0
  31013.  
  31014. 2. When data value is included in break conditions in channel B
  31015. When a data value is included in the break conditions, set the DBEB bit in the break control
  31016. register (BRCR) to 1. In this case, break data register B (BDRB) and break data mask
  31017. register B (BDMRB) settings are necessary in addition to the address condition. A user break
  31018. interrupt is generated when all three conditions—address, ASID, and data—are matched.
  31019. When a quadword access occurs, the 64-bit access data is divided into an upper 32 bits and
  31020. lower 32 bits, and interpreted as two 32-bit data units. A break is generated if either of the
  31021. 32-bit data units satisfies the data match condition.
  31022. Set the IDB1–0 bits in break bus cycle register B (BBRB) to 10 or 11. When byte data is
  31023. specified, the same data should be set in the two bytes comprising bits 15–8 and bits 7–0 in
  31024. break data register B (BDRB) and break data mask register B (BDMRB). When word or byte
  31025. is set, bits 31–16 of BDRB and BDMRB are ignored.
  31026.  
  31027. 3. When the DBEB bit in the break control register (BRCR) is set to 1, a break is not generated
  31028. by an operand access with no access data (an operand access in a PREF, OCBP, OCBWB, or
  31029. OCBI instruction).
  31030.  
  31031. Rev. 2.0, 02/99, page 671 of 830
  31032.  
  31033. ----------------------- Page 686-----------------------
  31034.  
  31035. 20.3.6 Condition Match Flag Setting
  31036.  
  31037. 1. Instruction access with post-execution condition, or operand access
  31038. The flag is set when execution of the instruction that causes the break is completed. As an
  31039. exception to this, however, in the case of an instruction with more than one operand access
  31040. the flag may be set on detection of the match condition alone, without waiting for execution
  31041. of the instruction to be completed.
  31042. Example 1:
  31043. 100 BT L200 (branch performed)
  31044. 102 Instruction (operand access break on channel A) → flag not set
  31045. Example 2:
  31046. 110 FADD (FPU exception)
  31047. 112 Instruction (operand access break on channel A) → flag not set
  31048.  
  31049. 2. Instruction access with pre-execution condition
  31050. The flag is set when the break match condition is detected.
  31051. Example 1:
  31052. 110 Instruction (pre-execution break on channel A) → flag set
  31053. 112 Instruction (pre-execution break on channel B) → flag not set
  31054. Example 2:
  31055. 110 Instruction (pre-execution break on channel B, instruction access TLB miss) → flag set
  31056.  
  31057. 20.3.7 Program Counter (PC) Value Saved
  31058.  
  31059. 1. When instruction access (pre-execution) is set as a break condition, the program counter (PC)
  31060. value saved to SPC in user break interrupt handling is the address of the instruction at which
  31061. the break condition match occurred. In this case, a user break interrupt is generated and the
  31062. fetched instruction is not executed.
  31063. 2. When instruction access (post-execution) is set as a break condition, the program counter
  31064. (PC) value saved to SPC in user break interrupt handling is the address of the instruction to
  31065. be executed after the instruction at which the break condition match occurred. In this case,
  31066. the fetched instruction is executed, and a user break interrupt is generated before execution
  31067. of the next instruction.
  31068. 3. When an instruction access (post-execution) break condition is set for a delayed branch
  31069. instruction, the delay slot instruction is executed and a user break is effected before
  31070. execution of the instruction at the branch destination (when the branch is made) or the
  31071. instruction two instructions ahead of the branch instruction (when the branch is not made). In
  31072. this case, the PC value saved to SPC is the address of the branch destination (when the
  31073. branch is made) or the instruction following the delay slot instruction (when the branch is not
  31074. made).
  31075.  
  31076. Rev. 2.0, 02/99, page 672 of 830
  31077.  
  31078. ----------------------- Page 687-----------------------
  31079.  
  31080. 4. When operand access (address only) is set as a break condition, the address of the instruction
  31081. to be executed after the instruction at which the condition match occurred is saved to SPC.
  31082. 5. When operand access (address + data) is set as a break condition, execution of the instruction
  31083. at which the condition match occurred is completed. A user break interrupt is generated
  31084. before execution of instructions from one instruction later to four instructions later. It is not
  31085. possible to specify at which instruction, from one later to four later, the interrupt will be
  31086. generated. The start address of the instruction after the instruction for which execution is
  31087. completed at the point at which user break interrupt handling is started is saved to SPC. If an
  31088. instruction between one instruction later and four instructions later causes another exception,
  31089. control is performed as follows. Designating the exception caused by the break as exception
  31090. 1, and the exception caused by an instruction between one instruction later and four
  31091. instructions later as exception 2, the fact that memory updating and register updating that
  31092. essentially cannot be performed by exception 2 cannot be performed is guaranteed
  31093. irrespective of the existence of exception 1. The program counter value saved is the address
  31094. of the first instruction for which execution is suppressed. Whether exception 1 or exception 2
  31095. is used for the exception jump destination and the value written to the exception register
  31096. (EXPEVT/INTEVT) is not guaranteed. However, if exception 2 is from a source not
  31097. synchronized with an instruction (external interrupt or peripheral module interrupt),
  31098. exception 1 is used for the exception jump destination and the value written to the exception
  31099. register (EXPEVT/INTEVT).
  31100.  
  31101. 20.3.8 Contiguous A and B Settings for Sequential Conditions
  31102.  
  31103. When channel A match and channel B match timings are close together, a sequential break may
  31104. not be guaranteed. Rules relating to the guaranteed range are given below.
  31105.  
  31106. 1. Instruction access matches on both channel A and channel B
  31107.  
  31108. Instruction B is 0 instructions after Equivalent to setting the same address. Do not use
  31109. instruction A this setting.
  31110.  
  31111. Instruction B is 1 instruction after Sequential operation is not guaranteed.
  31112. instruction A
  31113.  
  31114. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  31115. after instruction A
  31116.  
  31117. 2. Instruction access match on channel A, operand access match on channel B
  31118.  
  31119. Instruction B is 0 or 1 instruction after Sequential operation is not guaranteed.
  31120. instruction A
  31121.  
  31122. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  31123. after instruction A
  31124.  
  31125. Rev. 2.0, 02/99, page 673 of 830
  31126.  
  31127. ----------------------- Page 688-----------------------
  31128.  
  31129. 3. Operand access match on channel A, instruction access match on channel B
  31130.  
  31131. Instruction B is 0 to 3 instructions after Sequential operation is not guaranteed.
  31132. instruction A
  31133.  
  31134. Instruction B is 4 or more instructions Sequential operation is guaranteed.
  31135. after instruction A
  31136.  
  31137. 4. Operand access matches on both channel A and channel B
  31138. Do not make a setting such that a single operand access will match the break conditions of
  31139. both channel A and channel B. There are no other restrictions. For example, sequential
  31140. operation is guaranteed even if two accesses within a single instruction match channel A and
  31141. channel B conditions in turn.
  31142.  
  31143. 20.3.9 Usage Notes
  31144.  
  31145. 1. Do not execute a post-execution instruction access break for the SLEEP instruction.
  31146. 2. Do not make an operand access break setting between 1 and 3 instructions before a SLEEP
  31147. instruction.
  31148. 3. The value of the BL bit referenced in a user break exception depends on the break setting, as
  31149. follows.
  31150. a. Pre-execution instruction access break: The BL bit value before the executed instruction
  31151. is referenced.
  31152. b. Post-execution instruction access break: The OR of the BL bit values before and after the
  31153. executed instruction is referenced.
  31154. c. Operand access break (address/data): The BL bit value after the executed instruction is
  31155. referenced.
  31156. d. In the case of an instruction that modifies the BL bit
  31157.  
  31158. SL.BL Pre- Post- Pre- Post- Operand Access
  31159. Execution Execution Execution Execution (Address/Data)
  31160. Instruction Instruction Instruction Instruction
  31161. Access Access Access Access
  31162.  
  31163. 0 → 0 A A A A A
  31164.  
  31165. 1 → 0 M M M M A
  31166.  
  31167. 0 → 1 A M A M M
  31168.  
  31169. 1 → 1 M M M M M
  31170.  
  31171. A: Accepted
  31172. M: Masked
  31173.  
  31174. Rev. 2.0, 02/99, page 674 of 830
  31175.  
  31176. ----------------------- Page 689-----------------------
  31177.  
  31178. e. In the case of an RTE delay slot
  31179. The BL bit value before execution of a delay slot instruction is the same as the BL bit
  31180. value before execution of an RTE instruction. The BL bit value after execution of a delay
  31181. slot instruction is the same as the first BL bit value for the first instruction executed on
  31182. returning by means of an RTE instruction (the same as the value of the BL bit in SSR
  31183. before execution of the RTE instruction).
  31184. f. If an interrupt or exception is accepted with the BL bit cleared to 0, the value of the BL
  31185. bit before execution of the first instruction of the exception handling routine is 1.
  31186.  
  31187. 4. If channels A and B both match independently at virtually the same time, and, as a result, the
  31188. SPC value is the same for both user break interrupts, only one user break interrupt is
  31189. generated, but both the CMFA bit and the CMFB bit are set. For example:
  31190. 110 Instruction (post-execution instruction break on channel A) → SPC = 112, CMFA = 1
  31191. 112 Instruction (pre-execution instruction break on channel B) → SPC = 112, CMFB = 1
  31192.  
  31193. 5. The PCBA or PCBB bit in BRCR is invalid for an instruction access break setting.
  31194.  
  31195. 6. When the SEQ bit in BRCR is 1, the internal sequential break state is initialized by a channel
  31196. B condition match. For example: A → A → B (user break generated) → B (no break
  31197. generated)
  31198.  
  31199. 7. In the event of contention between a re-execution type exception and a post-execution break
  31200. in a multistep instruction, the re-execution type exception is generated. In this case, the CMF
  31201. bit may or may not be set to 1 when the break condition occurs.
  31202.  
  31203. 8. A post-execution break is classified as a completion type exception. Consequently, in the
  31204. event of contention between a completion type exception and a post-execution break, the
  31205. post-execution break is suppressed in accordance with the priorities of the two events. For
  31206. example, in the case of contention between a TRAPA instruction and a post-execution break,
  31207. the user break is suppressed. However, in this case, the CMF bit is set by the occurrence of
  31208. the break condition.
  31209.  
  31210. 20.4 User Break Debug Support Function
  31211.  
  31212. The user break debug support function enables the processing used in the event of a user break
  31213. exception to be changed. When a user break exception occurs, if the UBDE bit is set to 1 in the
  31214. BRCR register, the DBR register value will be used as the branch destination address instead of
  31215. [VBR + offset]. The value of R15 is saved in the SGR register regardless of the value of the
  31216. UBDE bit in the BRCR register or the kind of exception event. A flowchart of the user break
  31217. debug support function is shown in figure 20.2.
  31218.  
  31219. Rev. 2.0, 02/99, page 675 of 830
  31220.  
  31221. ----------------------- Page 690-----------------------
  31222.  
  31223. Exception/interrupt
  31224. generation
  31225.  
  31226. Hardware operation
  31227. SPC ← PC
  31228. SSR ← SR
  31229. SR.BL ← B'1
  31230.  
  31231. SR.MD ← B'1
  31232.  
  31233. SR.RB ← B'1
  31234.  
  31235. Exception Exception/ Trap
  31236. interrupt/trap?
  31237.  
  31238. Interrupt
  31239.  
  31240. EXPEVT ← exception code INTEVT ← interrupt code TRA ← TRAPA (imm)
  31241.  
  31242. SGR ← R15
  31243.  
  31244. No Yes
  31245. Reset exception?
  31246.  
  31247. Yes (BRCR.UBDE == 1) && No
  31248. (user break exception)?
  31249.  
  31250. PC ← DBR PC ← VBR + vector offset PC ← H'A0000000
  31251.  
  31252. Debug program Exception handler
  31253.  
  31254. R15 ← SGR
  31255. (STC instruction)
  31256.  
  31257. Execute RTE instruction
  31258. PC ← SPC
  31259. SR ← SSR
  31260.  
  31261. End of exception
  31262. operations
  31263.  
  31264. Figure 20.2 User Break Debug Support Function Flowchart
  31265.  
  31266. Rev. 2.0, 02/99, page 676 of 830
  31267.  
  31268. ----------------------- Page 691-----------------------
  31269.  
  31270. 20.5 Examples of Use
  31271.  
  31272. Instruction Access Cycle Break Condition Settings
  31273.  
  31274. • Register settings: BASRA = H'80 / BARA = H'00000404 / BAMRA = H'00 /
  31275. BBRA = H'0014 / BASRB = H'70 / BARB = H'00008010 / BAMRB = H'01 /
  31276. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0400
  31277.  
  31278. Conditions set: Independent channel A/channel B mode
  31279.  Channel A: ASID: H'80 / address: H'00000404 / address mask: H'00
  31280. Bus cycle: instruction access (post-instruction-execution), read (operand size not included
  31281. in conditions)
  31282.  Channel B: ASID: H'70 / address: H'00008010 / address mask: H'01
  31283. Data: H'00000000 / data mask: H'00000000
  31284. Bus cycle: instruction access (pre-instruction-execution), read (operand size not included
  31285. in conditions)
  31286.  
  31287. A user break is generated after execution of the instruction at address H'00000404 with
  31288. ASID = H'80, or before execution of an instruction at addresses H'00008000–H'000083FE
  31289. with ASID = H'70.
  31290.  
  31291. • Register settings: BASRA = H'80 / BARA = H'00037226 / BAMRA = H'00 /
  31292. BBRA = H'0016 / BASRB = H'70 / BARB = H'0003722E / BAMRB = H'00 /
  31293. BBRB = H'0016 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0008
  31294.  
  31295. Conditions set: Channel A → channel B sequential mode
  31296.  Channel A: ASID: H'80 / address: H'00037226 / address mask: H'00
  31297. Bus cycle: instruction access (pre-instruction-execution), read, word
  31298.  Channel B: ASID: H'70 / address: H'0003722E / address mask: H'00
  31299. Data: H'00000000 / data mask: H'00000000
  31300. Bus cycle: instruction access (pre-instruction-execution), read, word
  31301.  
  31302. The instruction at address H'00037266 with ASID = H'80 is executed, then a user break is
  31303. generated before execution of the instruction at address H'0003722E with ASID = H'70.
  31304.  
  31305. Rev. 2.0, 02/99, page 677 of 830
  31306.  
  31307. ----------------------- Page 692-----------------------
  31308.  
  31309. • Register settings: BASRA = H'80 / BARA = H'00027128 / BAMRA = H'00 /
  31310. BBRA = H'001A / BASRB = H'70 / BARB = H'00031415 / BAMRB = H'00 /
  31311. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0000
  31312.  
  31313. Conditions set: Independent channel A/channel B mode
  31314.  Channel A: ASID: H'80 / address: H'00027128 / address mask: H'00
  31315. Bus cycle: CPU, instruction access (pre-instruction-execution), write, word
  31316.  Channel B: ASID: H'70 / address: H'00031415 / address mask: H'00
  31317. Data: H'00000000 / data mask: H'00000000
  31318. Bus cycle: CPU, instruction access (pre-instruction-execution), read (operand size not
  31319. included in conditions)
  31320.  
  31321. A user break interrupt is not generated on channel A since the instruction access is not a
  31322. write cycle.
  31323. A user break interrupt is not generated on channel B since instruction access is performed on
  31324. an even address.
  31325.  
  31326. Operand Access Cycle Break Condition Settings
  31327.  
  31328. • Register settings: BASRA = H'80 / BARA = H'00123456 / BAMRA = H'00 /
  31329. BBRA = H'0024 / BASRB = H'70/ BARB = H'000ABCDE / BAMRB = H'02 /
  31330. BBRB = H'002A / BDRB = H'0000A512 / BDMRB = H'00000000 / BRCR = H'0080
  31331.  
  31332. Conditions set: Independent channel A/channel B mode
  31333.  Channel A: ASID: H'80 / address: H'00123456 / address mask: H'00
  31334. Bus cycle: operand access, read (operand size not included in conditions)
  31335.  Channel B: ASID: H'70 / address: H'000ABCDE / address mask: H'02
  31336. Data: H'0000A512 / data mask: H'00000000
  31337. Bus cycle: operand access, write, word
  31338. Data break enabled
  31339.  
  31340. On channel A, a user break interrupt is generated in the event of a longword read at address
  31341. H'00123454, a word read at address H'00123456, or a byte read at address H'00123456, with
  31342. ASID = H'80.
  31343. On channel B, a user break interrupt is generated when H'A512 is written by word access to
  31344. any address from H'000AB000 to H'000ABFFE with ASID = H'70.
  31345.  
  31346. Rev. 2.0, 02/99, page 678 of 830
  31347.  
  31348. ----------------------- Page 693-----------------------
  31349.  
  31350. Section 21 Hitachi User Debug Interface (Hitachi-UDI)
  31351.  
  31352. 21.1 Overview
  31353.  
  31354. 21.1.1 Features
  31355.  
  31356. The Hitachi user debug interface (Hitachi-UDI) is a serial input/output interface conforming to
  31357. JTAG, IEEE 1149.1, and IEEE Standard Test Access Port and Boundary-Scan Architecture. The
  31358. SH7750’s Hitachi-UDI does not support boundary-scan, but is used for emulator connection. The
  31359. functions of this interface should not be used when using an emulator. Refer to the emulator
  31360. manual for the method of connecting the emulator. The Hitachi-UDI uses six pins (TCK, TMS,
  31361. TD, TDO, 7567, and $6(%5./BRKACK). The pin functions and serial transfer protocol
  31362. conform to the JTAG specifications.
  31363.  
  31364. Rev. 2.0, 02/99, page 679 of 830
  31365.  
  31366. ----------------------- Page 694-----------------------
  31367.  
  31368. 21.1.2 Block Diagram
  31369.  
  31370. Figure 21.1 shows a block diagram of the Hitachi-UDI. The TAP (test access port) controller and
  31371. control registers are reset independently of the chip reset pin by driving the 7567 pin low or
  31372. setting TMS to 1 and applying TCK for at least five clock cycles. The other circuits are reset and
  31373. initialized in an ordinary reset. The Hitachi-UDI circuit has four internal registers: SDBPR,
  31374. SDIR, SDDRH, and SDDRL (these last two together designated SDDR). The SDBPR register
  31375. supports the JTAG bypass mode, SDIR is the command register, and SDDR is the data register.
  31376. SDIR can be accessed directly from the TDI and TDO pins.
  31377.  
  31378. Interrupt/reset
  31379. Break etc.
  31380. ASEBRK/BRKACK
  31381. control
  31382.  
  31383. TCK
  31384.  
  31385. TAP
  31386. TMS Decoder
  31387. controller
  31388.  
  31389. TRST
  31390.  
  31391. TDI
  31392. s
  31393. u
  31394. SDIR b
  31395. e
  31396. r l
  31397. e u
  31398. t d
  31399. s
  31400. i o
  31401. g m
  31402. SDBPR e l
  31403. r
  31404. t a
  31405. f r
  31406. i SDDRH e
  31407. h
  31408. S h
  31409. p
  31410. i
  31411. SDDRL r
  31412. e
  31413. P
  31414. TDO MUX
  31415.  
  31416. Figure 21.1 Block Diagram of Hitachi-UDI Circuit
  31417.  
  31418. Rev. 2.0, 02/99, page 680 of 830
  31419.  
  31420. ----------------------- Page 695-----------------------
  31421.  
  31422. 21.1.3 Pin Configuration
  31423.  
  31424. Table 21.1 shows the Hitachi-UDI pin configuration.
  31425.  
  31426. Table 21.1 Hitachi-UDI Pins
  31427.  
  31428. Pin Name Abbreviation I/O Function When Not Used
  31429. Clock pin TCK Input Same as the JTAG serial clock input Open*1
  31430.  
  31431. pin. Data is transferred from data
  31432. input pin TDI to the Hitachi-UDI
  31433. circuit, and data is read from data
  31434. output pin TDO, in synchronization
  31435. with this signal.
  31436. Mode pin TMS Input The mode select input pin. Changing Open*1
  31437.  
  31438. this signal in synchronization with
  31439. TCK determines the meaning of the
  31440. data input from TDI. The protocol
  31441. conforms to the JTAG (IEEE Std
  31442. 1149.1) specification.
  31443. Reset pin 7567 Input The input pin that resets the Hitachi- 2
  31444. Fix at ground*
  31445. UDI. This signal is received
  31446. asynchronously with respect to TCK,
  31447. and effects a reset of the JTAG
  31448. interface circuit when low. 7567
  31449. must be driven low for a certain
  31450. period when powering on, regardless
  31451. of whether or not JTAG is used. This
  31452. differs from the IEEE specification.
  31453. Data input TDI Input The data input pin. Data is sent to Open*1
  31454.  
  31455. pin the Hitachi-UDI circuit by changing
  31456. this signal in synchronization with
  31457. TCK.
  31458.  
  31459. Data output TDO Output The data output pin. Data is sent to Open
  31460. pin the Hitachi-UDI circuit by reading this
  31461. signal in synchronization with TCK.
  31462. Emulator pin $6(%5./ Input/ Dedicated emulator pin Open*1
  31463.  
  31464. BRKACK output
  31465.  
  31466. Notes: 1. Pulled up inside the chip. When designing a board that allows use of an emulator, or
  31467. when using interrupts and resets via the Hitachi-UDI, there is no problem in
  31468. connecting a pullup resistance externally.
  31469. 2. When designing a board that enables the use of an emulator, or when using interrupts
  31470. and resets via the Hitachi-UDI, drive 7567 low for a period overlapping 5(6(7 at
  31471. power-on, and also provide for control by 7567 alone.
  31472.  
  31473. Rev. 2.0, 02/99, page 681 of 830
  31474.  
  31475. ----------------------- Page 696-----------------------
  31476.  
  31477. The maximum frequency of TCK (TMS, TDI, TDO) is 20 MHz. Make the TCK or SH7750 CPG
  31478. setting so that the TCK frequency is lower than that of the SH7750’s on-chip peripheral module
  31479. clock.
  31480.  
  31481. 21.1.4 Register Configuration
  31482.  
  31483. Table 21.2 shows the Hitachi-UDI registers. Except for SDBPR, these registers are mapped in
  31484. the control register space and can be referenced by the CPU.
  31485.  
  31486. Table 21.2 Hitachi-UDI Registers
  31487.  
  31488. Hitachi-UDI
  31489. CPU Side Side
  31490.  
  31491. Abbre- P4 Area 7 Access Access Initial
  31492. Name viation R/W Address Address Size R/W Size Value*
  31493.  
  31494. Instruction SDIR R H'FFF00000 H'1FF00000 16 R/W 16 H'FFFF
  31495. register
  31496.  
  31497. Data register H SDDR/ R/W H'FFF00008 H'1FF00008 32/16 — 32 Undefined
  31498. SDDRH
  31499.  
  31500. Data register L SDDRL R/W H'FFF0000A H'1FF0000A 16 — — Undefined
  31501.  
  31502. Bypass register SDBPR — — — — R/W 1 Undefined
  31503.  
  31504. Note: * Initialized when the 7567 pin goes low or when the TAP is in the Test-Logic-Reset state.
  31505.  
  31506. Rev. 2.0, 02/99, page 682 of 830
  31507.  
  31508. ----------------------- Page 697-----------------------
  31509.  
  31510. 21.2 Register Descriptions
  31511.  
  31512. 21.2.1 Instruction Register (SDIR)
  31513.  
  31514. The instruction register (SDIR) is a 16-bit register that can only be read by the CPU. In the
  31515. initial state, bypass mode is set. The value (command) is set from the serial input pin (TDI).
  31516. SDIR is initialized by the 7567 pin or in the TAP Test-Logic-Reset state. When this register is
  31517. written to from the Hitachi-UDI, writing is possible regardless of the CPU mode. However, if a
  31518. read is performed by the CPU while writing is in progress, it may not be possible to read the
  31519. correct value. In this case, SDIR should be read twice, and then read again if the read values do
  31520. not match. Operation is undefined if a reserved command is set in this register.
  31521.  
  31522. Bit: 15 14 13 12 11 10 9 8
  31523.  
  31524. TI3 TI2 TI1 TI0 — — — —
  31525.  
  31526. Initial value: 1 1 1 1 1 1 1 1
  31527.  
  31528. R/W: R R R R R R R R
  31529.  
  31530. Bit: 7 6 5 4 3 2 1 0
  31531.  
  31532. — — — — — — — —
  31533.  
  31534. Initial value: 1 1 1 1 1 1 1 1
  31535.  
  31536. R/W: R R R R R R R R
  31537.  
  31538. Bits 15 to 12—Test Instruction Bits (TI3–TI0)
  31539.  
  31540. Bit 15: TI3 Bit 14: TI2 Bit 13: TI1 Bit 12: TI0 Description
  31541.  
  31542. 0 0 — — Reserved
  31543.  
  31544. 1 0 — Reserved
  31545.  
  31546. 1 0 Hitachi-UDI reset negate
  31547.  
  31548. 1 Hitachi-UDI reset assert
  31549.  
  31550. 1 0 0 — Reserved
  31551.  
  31552. 1 — Hitachi-UDI interrupt
  31553.  
  31554. 1 0 — Reserved
  31555.  
  31556. 1 0 Reserved
  31557.  
  31558. 1 Bypass mode (Initial value)
  31559.  
  31560. Bits 11 to 0—Reserved: These bits are always read as 1, and should only be written with 1.
  31561.  
  31562. Rev. 2.0, 02/99, page 683 of 830
  31563.  
  31564. ----------------------- Page 698-----------------------
  31565.  
  31566. 21.2.2 Data Register (SDDR)
  31567.  
  31568. The data register (SDDR) is a 32-bit register, comprising the two 16-bit registers SDDRH and
  31569. SDDRL, that can be read and written to by the CPU. The value in this register is not initialized
  31570. by a 7567 or CPU reset.
  31571.  
  31572. Bit: 31 30 29 28 27 26 25 24
  31573.  
  31574. Initial value: * * * * * * * *
  31575.  
  31576. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31577.  
  31578. Bit: 23 22 21 20 19 18 17 16
  31579.  
  31580. Initial value: * * * * * * * *
  31581.  
  31582. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31583.  
  31584. Bit: 15 14 13 12 11 10 9 8
  31585.  
  31586. Initial value: * * * * * * * *
  31587.  
  31588. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31589.  
  31590. Bit: 7 6 5 4 3 2 1 0
  31591.  
  31592. Initial value: * * * * * * * *
  31593.  
  31594. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31595.  
  31596. Note: *: Undefined
  31597.  
  31598. Bits 31 to 0—DR Data: These bits store the SDDR value.
  31599.  
  31600. 21.2.3 Bypass Register (SDBPR)
  31601.  
  31602. The bypass register (SDBPR) is a one-bit register that cannot be accessed by the CPU. When
  31603. bypass mode is set in SDIR, SDBPR is connected between the TDI pin and TDO pin of the
  31604. Hitachi-UDI.
  31605.  
  31606. Rev. 2.0, 02/99, page 684 of 830
  31607.  
  31608. ----------------------- Page 699-----------------------
  31609.  
  31610. 21.3 Operation
  31611.  
  31612. 21.3.1 TAP Control
  31613.  
  31614. Figure 21.2 shows the internal states of the TAP control circuit. These conform to the state
  31615. transitions specified by JTAG.
  31616.  
  31617. • The transition condition is the TMS value at the rising edge of TCK.
  31618. • The TDI value is sampled at the rising edge of TCK, and shifted at the falling edge.
  31619. • The TDO value changes at the falling edge of TCK. When not in the Shift-DR or Shift-IR
  31620. state, TDO is in the high-impedance state.
  31621. • In a transition to 7567 = 0, a transition is made to the Test-Logic-Reset state
  31622. asynchronously with respect to TCK.
  31623.  
  31624. 1 Test-Logic-Reset
  31625.  
  31626. 0
  31627.  
  31628. 1 1 1
  31629. 0 Run-Test/Idle Select-DR-Scan Select-IR-Scan
  31630.  
  31631. 0 0
  31632.  
  31633. 1 1
  31634. Capture-DR Capture-IR
  31635.  
  31636. 0 0
  31637.  
  31638. Shift-DR 0 Shift-IR 0
  31639.  
  31640. 1 1
  31641.  
  31642. 1 1
  31643. Exit1-DR Exit1-IR
  31644.  
  31645. 0 0
  31646.  
  31647. Pause-DR 0 Pause-IR 0
  31648.  
  31649. 1 1
  31650.  
  31651. 0 0
  31652. Exit2-DR Exit2-IR
  31653.  
  31654. 1 1
  31655.  
  31656. Update-DR Update-IR
  31657.  
  31658. 1 0 1 0
  31659.  
  31660. Figure 21.2 TAP Control State Transition Diagram
  31661.  
  31662. Rev. 2.0, 02/99, page 685 of 830
  31663.  
  31664. ----------------------- Page 700-----------------------
  31665.  
  31666. 21.3.2 Hitachi-UDI Reset
  31667.  
  31668. A power-on reset is effected by an SDIR command. A reset is effected by sending a Hitachi-UDI
  31669. reset assert command, and then sending a Hitachi-UDI reset negate command, from the Hitachi-
  31670. UDI pin (see figure 21.3). The interval required between the Hitachi-UDI reset assert command
  31671. and the Hitachi-UDI reset negate command is the same as the length of time the reset pin is held
  31672. low in order to effect a power-on reset.
  31673.  
  31674. Hitachi-UDI Hitachi-UDI
  31675. Hitachi-UDI pin reset assert reset negate
  31676.  
  31677. Chip internal reset
  31678.  
  31679. CPU state Normal Reset Reset processing
  31680.  
  31681. Figure 21.3 Hitachi-UDI Reset
  31682.  
  31683. 21.3.3 Hitachi-UDI Interrupt
  31684.  
  31685. The Hitachi-UDI interrupt function generates an interrupt by setting a command value in SDIR
  31686. from the Hitachi-UDI. The Hitachi-UDI interrupt is of general exception/interrupt operation
  31687. type, with a branch to an address based on VBR and return effected by means of an RTE
  31688. instruction. The exception code stored in control register INTEVT in this case is H'600. The
  31689. priority of the Hitachi-UDI interrupt can be controlled with bits 3 to 0 of control register IPRC.
  31690.  
  31691. The Hitachi-UDI interrupt request signal is asserted for about eight SH7750 on-chip peripheral
  31692. clock cycles after the command is set. The number of assertion cycles is determined by the ratio
  31693. of TCK to the on-chip peripheral clock frequency. As the assertion period is limited, the CPU
  31694. may sometimes miss a request. The Hitachi-UDI interrupt command automatically changes to
  31695. the bypass command immediately after being set.
  31696.  
  31697. 21.3.4 Bypass
  31698.  
  31699. The Hitachi-UDI pins can be set to the bypass mode specified by JTAG by setting a command in
  31700. SDIR from the Hitachi-UDI.
  31701.  
  31702. Rev. 2.0, 02/99, page 686 of 830
  31703.  
  31704. ----------------------- Page 701-----------------------
  31705.  
  31706. 21.4 Usage Notes
  31707.  
  31708. 1. SDIR Command
  31709. Once an SDIR command has been set, it remains unchanged until initialization by asserting
  31710. 7567 or placing the TAP in the Test-Logic-Reset state, or until another command (other
  31711. than a Hitachi-UDI interrupt command) is written from the Hitachi-UDI.
  31712. 2. SDIR Commands in Sleep Mode
  31713. Sleep mode is cleared by a Hitachi-UDI interrupt or Hitachi-UDI reset, and these exception
  31714. requests are accepted in this mode. In standby mode, neither a Hitachi-UDI interrupt nor a
  31715. Hitachi-UDI reset is accepted..
  31716. 3. The Hitachi-UDI is used for emulator connection. Therefore, Hitachi-UDI functions cannot
  31717. be used when an emulator is used.
  31718. 4. The SH7750’s Hitachi-UDI pins must not be connected to a boundary-scan signal loop on the
  31719. board.
  31720.  
  31721. Rev. 2.0, 02/99, page 687 of 830
  31722.  
  31723. ----------------------- Page 702-----------------------
  31724.  
  31725. Rev. 2.0, 02/99, page 688 of 830
  31726.  
  31727. ----------------------- Page 703-----------------------
  31728.  
  31729. Section 22 Pin Description
  31730.  
  31731. 22.1 Pin Arrangement
  31732.  
  31733.  
  31734. K
  31735.  
  31736. ) ) ) C )
  31737. V V V A T V
  31738. 3 3. 3. K E 3
  31739. 3. 3 3 R 6 S 3.
  31740. ( (
  31741. B ( 1 2 B 1 2 B A E 2 (
  31742. N G G L L / S 1 0 S 2 2 D R S C C
  31743. E P P L L K I S S 1 0 A E E X M T T T 2
  31744. L 2 C P P R O U U / R L 2
  31745. C I R C C T R R
  31746. A O L - - - - B / T T K K / / / / 2 / K - - A L
  31747. 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
  31748. 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
  31749. 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
  31750.  
  31751. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  31752. NMI
  31753. A
  31754. RDY IRL3
  31755. RESET IRL2
  31756.  
  31757. B
  31758. CS0 IRL1
  31759. CS1
  31760. IRL0
  31761. C 1 2
  31762. CS6 L L MD1/TXD2
  31763. L L
  31764. P P
  31765. BS - - MD0/SCK
  31766. D S S
  31767. D47 S S D63
  31768. V V
  31769.  
  31770.  
  31771.  
  31772. D32
  31773. E T 2 D48
  31774. D46 S D62
  31775.  
  31776. S
  31777. T
  31778. CS4 R 1 0 C
  31779.  
  31780. T
  31781. D33 F CS5 A A D49
  31782. Reserved
  31783. D61
  31784. D45
  31785.  
  31786. RD2
  31787.  
  31788. MD2/RXD2
  31789. D34
  31790. D50
  31791. G
  31792. D44 D60
  31793.  
  31794. RD/WR2
  31795.  
  31796.  
  31797.  
  31798. D35 D51
  31799.  
  31800.  
  31801. H
  31802. D43 D59
  31803.  
  31804.  
  31805.  
  31806.  
  31807. D36 D52
  31808. J
  31809. D42 D58
  31810.  
  31811.  
  31812.  
  31813.  
  31814.  
  31815. BGA256
  31816.  
  31817. D37 D53
  31818. K
  31819.  
  31820. (Top view)
  31821.  
  31822. D41
  31823. D57
  31824. L
  31825.  
  31826.  
  31827.  
  31828. D38 D54
  31829.  
  31830.  
  31831. D40 D56
  31832.  
  31833. M
  31834.  
  31835.  
  31836. D39 D55
  31837.  
  31838. D15 D31
  31839.  
  31840. N
  31841.  
  31842.  
  31843.  
  31844.  
  31845.  
  31846. D0 D16
  31847.  
  31848. D14 D30
  31849.  
  31850. P 1 0
  31851. K K
  31852.  
  31853.  
  31854. D1 A A D17
  31855. R R DREQ1
  31856.  
  31857.  
  31858. D13 D29
  31859.  
  31860. R BACK/BSREQ D D
  31861. DREQ0
  31862.  
  31863.  
  31864. D2 BREQ/BSACK D18
  31865. RXD
  31866. D12 D28
  31867.  
  31868. T
  31869.  
  31870.  
  31871. D3 D19
  31872.  
  31873.  
  31874.  
  31875. D11 D27
  31876.  
  31877. U
  31878.  
  31879.  
  31880. D4 D20
  31881.  
  31882. D10 D26
  31883.  
  31884. V
  31885.  
  31886.  
  31887.  
  31888.  
  31889. D5 D21
  31890.  
  31891. D9 D25
  31892. W
  31893.  
  31894.  
  31895. D6
  31896. Y
  31897.  
  31898.  
  31899. 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
  31900. 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
  31901. A A A A A A A A K I W W D D D
  31902. C Q Q Q Q K C C R A / O O Q R
  31903. D D D D C R D I I D /
  31904. C 7
  31905. / / / / R C C /
  31906. F I
  31907. 5 4 1 0 / / I 6 M
  31908. S S S S S 2 / S VDDQ (IO, 3.3 V)
  31909. 3 Q
  31910. A A A A S M M A D
  31911. C C C C A Q C /
  31912. / / / / C Q / 7 VSSQ (IO, 0 V)
  31913. 5 4 1 0 / D D 6 S
  31914. /
  31915. E E E E / E
  31916.  
  31917. D 2 3 A
  31918. W W W W R S S W C
  31919. A A / VDD (internal, 1.8 V)
  31920. 7
  31921. C C E
  31922. /
  31923. 2 /
  31924. E 3 W VSS (internal, 0 V)
  31925. E
  31926. W W
  31927. NC
  31928.  
  31929. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  31930. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  31931. and RTC are used.
  31932.  
  31933. Figure 22.1 Pin Arrangement (256-Pin BGA)
  31934.  
  31935. Rev. 2.0, 02/99, page 689 of 830
  31936.  
  31937. ----------------------- Page 704-----------------------
  31938.  
  31939.  
  31940. K
  31941.  
  31942. ) ) ) C )
  31943. V V V A T V
  31944. 3 3. 3. K E 3
  31945. 3. 3 3 R 6 S 3.
  31946. ( ( ( B 1 2 B A E 2 D (
  31947. G G 1 1 2 2 / S 1 0 S 2 2 R S E C
  31948. P L L L L K I S S A E E D T V T C 2
  31949. P L L L L R O 1 0 M X R T
  31950. L C C P P P P I U U R C C / T R R R L 2
  31951. A L - - - - - - T B / T T K K / / / 2 / / K 2 E - - A L
  31952. 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
  31953. 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
  31954. 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
  31955.  
  31956.  
  31957. 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
  31958. 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
  31959. 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
  31960. RDY 1 156 NMI
  31961. RESET 2 155 IRL3
  31962. CS0 3 154 IRL2
  31963. CS1 4 153 IRL1
  31964. CS4 5 152 IRL0
  31965. CS5 6 151 MD2/RXD2
  31966. CS6 7 150 MD1/TXD2
  31967. BS 8 149 MD0/SCK
  31968. 9 148
  31969.  
  31970.  
  31971.  
  31972.  
  31973. 10 147
  31974.  
  31975.  
  31976.  
  31977.  
  31978. D47 11 146 D63
  31979. D32 12 145 D48
  31980. 13 144
  31981.  
  31982. 14 143
  31983.  
  31984. D46 15 142 D62
  31985. D33 16 141 D49
  31986. D45 17 140 D61
  31987. D34 18 139 D50
  31988. D44 19 138 D60
  31989. D35 20 137 D51
  31990. 21 136
  31991. QFP208
  31992. 22 135
  31993.  
  31994.  
  31995.  
  31996. D43 23 134 D59
  31997. D36 24 Top view 133 D52
  31998. D42 25 132 D58
  31999. D37 26 131 D53
  32000. D41 27 130 D57
  32001. D38 28 129 D54
  32002. D40 29 128 D56
  32003. D39 30 127 D55
  32004. 31 126
  32005.  
  32006.  
  32007.  
  32008.  
  32009. 32 125
  32010.  
  32011.  
  32012.  
  32013.  
  32014. D15 33 124 D31
  32015. D0 34 123 D16
  32016. D14 35 122 D30
  32017. D1 36 121 D17
  32018. D13 37 120 D29
  32019. D2 38 119 D18
  32020. 39 118
  32021. 40 VDD (internal, 1.8 V) 117
  32022.  
  32023. D12 41 116 D28
  32024. D3 42 VSS (internal, 0 V) 115 D19
  32025. 43 114
  32026.  
  32027. 44 113
  32028.  
  32029. VDDQ (IO, 3.3 V)
  32030. D11 45 112 D27
  32031. D4 46 111 D20
  32032. D10 47 VSSQ (IO, 0 V) 110 D26
  32033. D5 48 109 D21
  32034. D9 49 108 D25
  32035. D6 50 107 DREQ1
  32036. BACK/BSREQ 51 106 DREQ0
  32037. BREQ/BSACK 52 105 RXD
  32038. 0 1 2 3 4
  32039. 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
  32040. 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
  32041.  
  32042.  
  32043.  
  32044. 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
  32045. 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
  32046. 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
  32047. D D D D C R R R D I I D /
  32048. 7
  32049. / / / / D D F R O O /
  32050. I
  32051. 5 4 1 0 / / I 6 M
  32052. S S S S S 2 / S
  32053. 3 Q
  32054. A A A A S M M A D
  32055. C C C C A Q C /
  32056. / / / / C Q / 7
  32057. 5 4 1 0 / D D 6 S
  32058. /
  32059. E E E E D 2 / E A
  32060. 3
  32061. W W W W R S S W C
  32062. A A /
  32063. 7
  32064. C C E
  32065. /
  32066. 2 /
  32067. 3 W
  32068. E E
  32069. W W
  32070.  
  32071. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  32072. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  32073. and RTC are used.
  32074.  
  32075. Figure 22.2 Pin Arrangement (208-Pin QFP)
  32076.  
  32077. Rev. 2.0, 02/99, page 690 of 830
  32078.  
  32079. ----------------------- Page 705-----------------------
  32080.  
  32081. 22.2 Pin Functions
  32082.  
  32083. 22.2.1 Pin Functions (256-Pin BGA)
  32084.  
  32085. Table 22.1 Pin Functions
  32086.  
  32087. No. Pin Pin Name I/O Function Reset Memory Interface
  32088. No.
  32089.  
  32090. SRAM DRAM SDRAM PCMCIA MPX
  32091.  
  32092. 1 B2 5'< I Bus ready 5'< 5'< 5'<
  32093.  
  32094. 2 B1 5(6(7 I Reset 5(6(7
  32095.  
  32096. 3 C2 &6 O Chip select 0 &6 &6
  32097.  
  32098. 4 C1 &6 O Chip select 1 &6 &6
  32099.  
  32100. 5 D4 &6 O Chip select 4 &6 &6
  32101.  
  32102. 6 D3 &6 O Chip select 5 &6 &($ &6
  32103.  
  32104. 7 D2 &6 O Chip select 6 &6 &(% &6
  32105.  
  32106. 8 D1 %6 O Bust start (%6) (%6) (%6) (%6) (%6)
  32107.  
  32108. 9 E4 VSSQ Power IO GND (0 V)
  32109.  
  32110. 10 E3 O / /
  32111. 5' = 5' &$66 2( &$6 2( )5$0(
  32112. )5$0(
  32113.  
  32114. 11 F3 VDDQ Power IO VDD (3.3 V)
  32115.  
  32116. 12 F4 VSSQ Power IO GND (0 V)
  32117.  
  32118. 13 E2 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32119.  
  32120. 14 E1 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32121.  
  32122. 15 G3 VDD Power Internal VDD
  32123. (1.8 V)
  32124.  
  32125. 16 G4 VSS Power Internal GND
  32126. (0 V)
  32127.  
  32128. 17 F2 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32129.  
  32130. 18 F1 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32131.  
  32132. 19 H3 VDDQ Power IO VDD (3.3 V)
  32133.  
  32134. 20 H4 VSSQ Power IO GND (0 V)
  32135.  
  32136. 21 G2 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32137.  
  32138. 22 G1 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32139.  
  32140. 23 H2 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32141.  
  32142. 24 H1 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32143.  
  32144. 25 J3 VDDQ Power IO VDD (3.3 V)
  32145.  
  32146. 26 J4 VSSQ Power IO GND (0 V)
  32147.  
  32148. 27 J2 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32149.  
  32150. 28 J1 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32151.  
  32152. Rev. 2.0, 02/99, page 691 of 830
  32153.  
  32154. ----------------------- Page 706-----------------------
  32155.  
  32156. Table 22.1 Pin Functions (cont)
  32157.  
  32158. No. Pin Pin Name I/O Function Reset Memory Interface
  32159. No.
  32160.  
  32161. SRAM DRAM SDRAM PCMCIA MPX
  32162.  
  32163. 29 K2 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32164.  
  32165. 30 K1 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32166.  
  32167. 31 K3 VDDQ Power IO VDD (3.3 V)
  32168.  
  32169. 32 K4 VSSQ Power IO GND (0 V)
  32170.  
  32171. 33 L1 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32172.  
  32173. 34 L2 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32174.  
  32175. 35 M1 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32176.  
  32177. 36 M2 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32178.  
  32179. 37 L3 VDDQ Power IO VDD (3.3 V)
  32180.  
  32181. 38 L4 VSSQ Power IO GND (0 V)
  32182.  
  32183. 39 N1 D15 I/O Data A15
  32184.  
  32185. 40 N2 D0 I/O Data A0
  32186.  
  32187. 41 P1 D14 I/O Data A14
  32188.  
  32189. 42 P2 D1 I/O Data A1
  32190.  
  32191. 43 M3 VDDQ Power IO VDD (3.3 V)
  32192.  
  32193. 44 M4 VSSQ Power IO GND (0 V)
  32194.  
  32195. 45 R1 D13 I/O Data A13
  32196.  
  32197. 46 R2 D2 I/O Data A2
  32198.  
  32199. 47 P3 VDD Power Internal VDD
  32200. (1.8 V)
  32201.  
  32202. 48 P4 VSS Power Internal GND
  32203. (0 V)
  32204.  
  32205. 49 T1 D12 I/O Data A12
  32206.  
  32207. 50 T2 D3 I/O Data A3
  32208.  
  32209. 51 R3 VDDQ Power IO VDD (3.3 V)
  32210.  
  32211. 52 R4 VSSQ Power IO GND (0 V)
  32212.  
  32213. 53 U1 D11 I/O Data A11
  32214.  
  32215. 54 U2 D4 I/O Data A4
  32216.  
  32217. 55 V1 D10 I/O Data A10
  32218.  
  32219. 56 V2 D5 I/O Data A5
  32220.  
  32221. 57 T3 VDDQ Power IO VDD (3.3 V)
  32222.  
  32223. 58 T4 VSSQ Power IO GND (0 V)
  32224.  
  32225. 59 W1 D9 I/O Data A9
  32226.  
  32227. 60 Y1 D6 I/O Data A6
  32228.  
  32229. Rev. 2.0, 02/99, page 692 of 830
  32230.  
  32231. ----------------------- Page 707-----------------------
  32232.  
  32233. Table 22.1 Pin Functions (cont)
  32234.  
  32235. No. Pin Pin Name I/O Function Reset Memory Interface
  32236. No.
  32237.  
  32238. SRAM DRAM SDRAM PCMCIA MPX
  32239.  
  32240. 61 U3 %$&./ O Bus
  32241. %65(4 acknowledge/
  32242. bus request
  32243.  
  32244. 62 V3 %5(4/ I Bus request/bus
  32245. %6$&. acknowledge
  32246.  
  32247. 63 W2 D8 I/O Data A8
  32248.  
  32249. 64 Y2 D7 I/O Data A7
  32250.  
  32251. 65 W3 CKE O Clock output CKE
  32252. enable
  32253.  
  32254. 66 V5 VDDQ Power IO VDD (3.3 V)
  32255.  
  32256. 67 U5 VSSQ Power IO GND (0 V)
  32257.  
  32258. 68 Y3 / / O D47–D40 select DQM5
  32259. :( &$6 :( &$6
  32260. DQM5 signal
  32261.  
  32262. 69 W4 / / O D39–D32 select DQM4
  32263. :( &$6 :( &$6
  32264. DQM4 signal
  32265.  
  32266. 70 Y4 / / O D15–D8 select DQM1
  32267. :( &$6 :( &$6 :(
  32268. DQM1 signal
  32269.  
  32270. 71 W5 / / O D7–D0 select DQM0
  32271. :( &$6 :( &$6
  32272. DQM0 signal
  32273.  
  32274. 72 Y5 A17 O Address
  32275.  
  32276. 73 V6 VDDQ Power IO VDD (3.3 V)
  32277.  
  32278. 74 U6 VSSQ Power IO GND (0 V)
  32279.  
  32280. 75 W6 A16 O Address
  32281.  
  32282. 76 Y6 A15 O Address
  32283.  
  32284. 77 V7 VDD Power Internal VDD
  32285. (1.8 V)
  32286.  
  32287. 78 U7 VSS Power Internal GND
  32288. (0 V)
  32289.  
  32290. 79 W7 A14 O Address
  32291.  
  32292. 80 Y7 A13 O Address
  32293.  
  32294. 81 V8 VDDQ Power IO VDD (3.3 V)
  32295.  
  32296. 82 U8 VSSQ Power IO GND (0 V)
  32297.  
  32298. 83 V4 NC
  32299.  
  32300. 84 W8 A12 O Address
  32301.  
  32302. 85 Y8 A11 O Address
  32303.  
  32304. 86 W9 A10 O Address
  32305.  
  32306. Rev. 2.0, 02/99, page 693 of 830
  32307.  
  32308. ----------------------- Page 708-----------------------
  32309.  
  32310. Table 22.1 Pin Functions (cont)
  32311.  
  32312. No. Pin Pin Name I/O Function Reset Memory Interface
  32313. No.
  32314.  
  32315. SRAM DRAM SDRAM PCMCIA MPX
  32316.  
  32317. 87 V9 VDDQ Power IO VDD (3.3 V)
  32318.  
  32319. 88 U9 VSSQ Power IO GND (0 V)
  32320.  
  32321. 89 Y9 A9 O Address
  32322.  
  32323. 90 W10 A8 O Address
  32324.  
  32325. 91 Y10 A7 O Address
  32326.  
  32327. 92 Y11 CKIO O Clock output CKIO
  32328.  
  32329. 93 V10 VDDQ Power IO VDD (3.3 V)
  32330.  
  32331. 94 U10 VSSQ Power IO GND (0 V)
  32332.  
  32333. 95 W11 CKIO2 O = CKIO* CKIO
  32334.  
  32335. 96 Y12 A6 O Address
  32336.  
  32337. 97 W12 A5 O Address
  32338.  
  32339. 98 Y13 A4 O Address
  32340.  
  32341. 99 V11 VDDQ Power IO VDD (3.3 V)
  32342.  
  32343. 100 U11 VSSQ Power IO GND (0 V)
  32344.  
  32345. 101 W13 A3 O Address
  32346.  
  32347. 102 Y14 A2 O Address
  32348.  
  32349. 103 V12 DRAK1 O DMAC1 request
  32350. acknowledge
  32351.  
  32352. 104 U13 DRAK0 O DMAC0 request
  32353. acknowledge
  32354.  
  32355. 105 V13 VDDQ Power IO VDD (3.3 V)
  32356.  
  32357. 106 U12 VSSQ Power IO GND (0 V)
  32358.  
  32359. 107 W14 &6 O Chip select 3 &6 (&6) &6 &6
  32360.  
  32361. 108 Y15 &6 O Chip select 2 &6 (&6) &6 &6
  32362.  
  32363. 109 V14 VDD Power Internal VDD
  32364. (1.8 V)
  32365.  
  32366. 110 U14 VSS Power Internal GND
  32367. (0 V)
  32368.  
  32369. 111 W15 5$6 O 5$6 5$6 5$6
  32370.  
  32371. 112 Y16 / / O Read/ /
  32372. 5' &$66 &$6 2( &$6 2( )5$0(
  32373. )5$0( )5$0(
  32374.  
  32375. 113 V15 VDDQ Power IO VDD (3.3 V)
  32376.  
  32377. 114 U15 VSSQ Power IO GND (0 V)
  32378.  
  32379. Note: * CKIO2 is not connected to PLL2.
  32380.  
  32381. Rev. 2.0, 02/99, page 694 of 830
  32382.  
  32383. ----------------------- Page 709-----------------------
  32384.  
  32385. Table 22.1 Pin Functions (cont)
  32386.  
  32387. No. Pin Pin Name I/O Function Reset Memory Interface
  32388. No.
  32389.  
  32390. SRAM DRAM SDRAM PCMCIA MPX
  32391.  
  32392. 115 W16 RD/:5 O Read/write RD/:5 RD/:5 RD/:5
  32393.  
  32394. 116 Y17 / / O D23–D16 select DQM2
  32395. :( &$6 :( &$6 ,&,25'
  32396. DQM2/ signal
  32397. ,&,25'
  32398.  
  32399. 117 W17 / / O D31–D24 select DQM3
  32400. :( &$6 :( &$6 ,&,2:5
  32401. DQM3/ signal
  32402. ,&,2:5
  32403.  
  32404. 118 Y18 / / O D55–D48 select :( &$6 DQM6
  32405. :( &$6
  32406. DQM6 signal
  32407.  
  32408. 119 V16 VDDQ Power IO VDD (3.3 V)
  32409.  
  32410. 120 U16 VSSQ Power IO GND (0 V)
  32411.  
  32412. 121 W18 / / O D63–D56 select DQM7
  32413. :( &$6 :( &$6 5(*
  32414. DQM7/5(* signal
  32415.  
  32416. 122 Y19 D23 I/O Data A23
  32417.  
  32418. 123 W19 D24 I/O Data A24
  32419.  
  32420. 124 Y20 D22 I/O Data A22
  32421.  
  32422. 125 V17 RXD I SCI data input
  32423.  
  32424. 126 U17 '5(4 I Request from
  32425. DMAC0
  32426.  
  32427. 127 U18 '5(4 I Request from
  32428. DMAC1
  32429.  
  32430. 128 W20 D25 I/O Data A25
  32431.  
  32432. 129 T18 VDDQ Power IO VDD (3.3 V)
  32433.  
  32434. 130 T17 VSSQ Power IO GND (0 V)
  32435.  
  32436. 131 V19 D21 I/O Data A21
  32437.  
  32438. 132 V20 D26 I/O Data
  32439.  
  32440. 133 U19 D20 I/O Data A20
  32441.  
  32442. 134 U20 D27 I/O Data
  32443.  
  32444. 135 R18 VDDQ Power IO VDD (3.3 V)
  32445.  
  32446. 136 R17 VSSQ Power IO GND (0 V)
  32447.  
  32448. 137 T19 D19 I/O Data A19
  32449.  
  32450. 138 T20 D28 I/O Data
  32451.  
  32452. 139 P18 VDD Power Internal VDD
  32453. (1.8 V)
  32454.  
  32455. 140 P17 VSS Power Internal GND
  32456. (0 V)
  32457.  
  32458. 141 R19 D18 I/O Data A18
  32459.  
  32460. Rev. 2.0, 02/99, page 695 of 830
  32461.  
  32462. ----------------------- Page 710-----------------------
  32463.  
  32464. Table 22.1 Pin Functions (cont)
  32465.  
  32466. No. Pin Pin Name I/O Function Reset Memory Interface
  32467. No.
  32468.  
  32469. SRAM DRAM SDRAM PCMCIA MPX
  32470.  
  32471. 142 R20 D29 I/O Data
  32472.  
  32473. 143 N18 VDDQ Power IO VDD (3.3 V)
  32474.  
  32475. 144 N17 VSSQ Power IO GND (0 V)
  32476.  
  32477. 145 P19 D17 I/O Data A17
  32478.  
  32479. 146 P20 D30 I/O Data
  32480.  
  32481. 147 N19 D16 I/O Data A16
  32482.  
  32483. 148 N20 D31 I/O Data
  32484.  
  32485. 149 M18 VDDQ Power IO VDD (3.3 V)
  32486.  
  32487. 150 M17 VSSQ Power IO GND (0 V)
  32488.  
  32489. 151 M19 D55 I/O Data
  32490.  
  32491. 152 M20 D56 I/O Data
  32492.  
  32493. 153 L19 D54 I/O Data
  32494.  
  32495. 154 L20 D57 I/O Data
  32496.  
  32497. 155 L18 VDDQ Power IO VDD (3.3 V)
  32498.  
  32499. 156 L17 VSSQ Power IO GND (0 V)
  32500.  
  32501. 157 K20 D53 I/O Data
  32502.  
  32503. 158 K19 D58 I/O Data
  32504.  
  32505. 159 J20 D52 I/O Data
  32506.  
  32507. 160 J19 D59 I/O Data
  32508.  
  32509. 161 K18 VDDQ Power IO VDD (3.3 V)
  32510.  
  32511. 162 K17 VSSQ Power IO GND (0 V)
  32512.  
  32513. 163 H20 D51 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32514.  
  32515. 164 H19 D60 I/O Data
  32516.  
  32517. 165 G20 D50 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32518.  
  32519. 166 G19 D61 I/O Data ACCSIZE0
  32520.  
  32521. 167 J18 VDDQ Power IO VDD (3.3 V)
  32522.  
  32523. 168 J17 VSSQ Power IO GND (0 V)
  32524.  
  32525. 169 F20 D49 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32526.  
  32527. 170 F19 D62 I/O Data ACCSIZE1
  32528.  
  32529. 171 G18 VDD Power Internal VDD
  32530. (1.8 V)
  32531.  
  32532. 172 G17 VSS Power Internal GND
  32533. (0 V)
  32534.  
  32535. 173 E20 D48 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32536.  
  32537. Rev. 2.0, 02/99, page 696 of 830
  32538.  
  32539. ----------------------- Page 711-----------------------
  32540.  
  32541. Table 22.1 Pin Functions (cont)
  32542.  
  32543. No. Pin Pin Name I/O Function Reset Memory Interface
  32544. No.
  32545.  
  32546. SRAM DRAM SDRAM PCMCIA MPX
  32547.  
  32548. 174 E19 D63 I/O Data ACCSIZE2
  32549.  
  32550. 175 F18 VDDQ Power IO VDD (3.3 V)
  32551.  
  32552. 176 F17 VSSQ Power IO GND (0 V)
  32553.  
  32554. 177 E17 VSSQ Power IO GND (0 V)
  32555.  
  32556. 178 E18 RD/:5 O = RD/:5 RD/:5 RD/:5 RD/:5
  32557.  
  32558. 179 D20 MD0/SCK I/O Mode/SCI MD0 SCK SCK SCK SCK SCK
  32559. clock
  32560.  
  32561. 180 D19 MD1/TXD2 I/O Mode SCIF dataMD1 TXD2 TXD2 TXD2 TXD2 TXD2
  32562. output
  32563.  
  32564. 181 D18 MD2/RXD2 I Mode/SCIF dataMD2 RXD2 RXD2 RXD2 RXD2 RXD2
  32565. input
  32566.  
  32567. 182 C20 ,5/ I Interrupt 0
  32568.  
  32569. 183 C19 ,5/ I Interrupt 1
  32570.  
  32571. 184 B20 ,5/ I Interrupt 2
  32572.  
  32573. 185 C18 ,5/ I Interrupt 3
  32574.  
  32575. 186 A20 NMI I Nonmaskable
  32576. interrupt
  32577.  
  32578. 187 B19 XTAL2 O RTC crystal
  32579. resonator pin
  32580.  
  32581. 188 A19 EXTAL2 I RTC crystal
  32582. resonator pin
  32583.  
  32584. 189 B18 VSS-RTC Power RTC GND
  32585. (0 V)
  32586.  
  32587. 190 A18 VDD-RTC Power RTC VDD
  32588. (3.3 V)
  32589.  
  32590. 191 D17 Reserved I Pull up to
  32591. 3.3. V
  32592.  
  32593. 192 C17 VSS Power Internal GND
  32594. (0 V)
  32595.  
  32596. 193 B17 VDDQ Power IO VDD (3.3 V)
  32597.  
  32598. 194 C16 &76 I/O SCIF data
  32599. control (CTS)
  32600.  
  32601. 195 A17 TCLK I/O RTC/TMU
  32602. clock
  32603.  
  32604. 196 B16 MD8/576 I/O Mode/SCIF dataMD8 576 576 576 576 576
  32605. control (RTS)
  32606.  
  32607. 197 C15 VDDQ Power IO VDD (3.3 V)
  32608.  
  32609. Rev. 2.0, 02/99, page 697 of 830
  32610.  
  32611. ----------------------- Page 712-----------------------
  32612.  
  32613. Table 22.1 Pin Functions (cont)
  32614.  
  32615. No. Pin Pin Name I/O Function Reset Memory Interface
  32616. No.
  32617.  
  32618. SRAM DRAM SDRAM PCMCIA MPX
  32619.  
  32620. 198 D15 VSSQ Power IO GND (0 V)
  32621.  
  32622. 199 B15 MD7/TXD I/O Mode/SCI MD7 TXD TXD TXD TXD TXD
  32623. data output
  32624.  
  32625. 200 A16 SCK2/ I SCIF clock/ 05(6(7 SCK2 SCK2 SCK2 SCK2 SCK2
  32626. 05(6(7 manual reset
  32627.  
  32628. 201 C14 VDD Power Internal VDD
  32629. (1.8 V)
  32630.  
  32631. 202 D14 VSS Power Internal GND
  32632. (0 V)
  32633.  
  32634. 203 A15 A18 O Address
  32635.  
  32636. 204 B14 A19 O Address
  32637.  
  32638. 205 C13 VDDQ Power IO VDD (3.3 V)
  32639.  
  32640. 206 D13 VSSQ Power IO GND (0 V)
  32641.  
  32642. 207 A14 A20 O Address
  32643.  
  32644. 208 B13 A21 O Address
  32645.  
  32646. 209 A13 A22 O Address
  32647.  
  32648. 210 B12 A23 O Address
  32649.  
  32650. 211 C12 VDDQ Power IO VDD (3.3 V)
  32651.  
  32652. 212 D12 VSSQ Power IO GND (0 V)
  32653.  
  32654. 213 A12 A24 O Address
  32655.  
  32656. 214 B11 A25 O Address
  32657.  
  32658. 215 A11 MD3/&($ I/O Mode/ MD3 &($
  32659. PCMCIA-CE
  32660.  
  32661. 216 A10 MD4/&(% I/O Mode/ MD4 &(%
  32662. PCMCIA-CE
  32663.  
  32664. 217 C11 VDDQ Power IO VDD (3.3 V)
  32665.  
  32666. 218 D11 VSSQ Power IO GND (0 V)
  32667.  
  32668. 219 B10 MD5/5$6 I/O Mode/5$6 MD5 5$6
  32669. (DRAM)
  32670.  
  32671. 220 A9 DACK0 O DMAC0 bus
  32672. acknowledge
  32673.  
  32674. 221 B9 DACK1 O DMAC1 bus
  32675. acknowledge
  32676.  
  32677. 222 C8 A0 O Address
  32678.  
  32679. 223 C10 VDDQ Power IO VDD (3.3 V)
  32680.  
  32681. 224 D10 VSSQ Power IO GND (0 V)
  32682.  
  32683. Rev. 2.0, 02/99, page 698 of 830
  32684.  
  32685. ----------------------- Page 713-----------------------
  32686.  
  32687. Table 22.1 Pin Functions (cont)
  32688.  
  32689. No. Pin Pin Name I/O Function Reset Memory Interface
  32690. No.
  32691.  
  32692. SRAM DRAM SDRAM PCMCIA MPX
  32693.  
  32694. 225 D8 A1 O Address
  32695.  
  32696. 226 A8 STATUS0 O Status
  32697.  
  32698. 227 B8 STATUS1 O Status
  32699.  
  32700. 228 A7 MD6/ I Mode/,2,6 MD6 ,2,6
  32701. ,2,6 (PCMCIA)
  32702.  
  32703. 229 C9 VDDQ Power IO VDD (3.3 V)
  32704.  
  32705. 230 D9 VSSQ Power IO GND (0 V)
  32706.  
  32707. 231 B7 $6(%5./ I/O Pin break/
  32708. BRKACK acknowledge
  32709. (Hitachi-UDI)
  32710.  
  32711. 232 A6 TDO O Data out
  32712. (Hitachi-UDI)
  32713.  
  32714. 233 C7 VDD Power Internal VDD
  32715. (1.8 V)
  32716.  
  32717. 234 D7 VSS Power Internal GND
  32718. (0 V)
  32719.  
  32720. 235 B6 TMS I Mode
  32721. (Hitachi-UDI)
  32722.  
  32723. 236 A5 TCK I Clock
  32724. (Hitachi-UDI)
  32725.  
  32726. 237 B5 TDI I Data in (Hitachi-
  32727. UDI)
  32728.  
  32729. 238 C4 7567 I Reset
  32730. (Hitachi-UDI)
  32731.  
  32732. 239 C3 &.,2(1% I CKIO2, 5' ,
  32733. RD/:5 enable
  32734.  
  32735. 240 C6 NC
  32736.  
  32737. 241 A4 VDD-PLL2 Power PLL2 VDD
  32738. (3.3V)
  32739.  
  32740. 242 D6 VSS-PLL2 Power PLL2 GND (0V)
  32741.  
  32742. 243 B4 VDD-PLL1 Power PLL1 VDD
  32743. (3.3V)
  32744.  
  32745. 244 D5 VSS-PLL1 Power PLL1 GND (0V)
  32746.  
  32747. 245 A3 VDD-CPG Power CPG VDD
  32748. (3.3V)
  32749.  
  32750. 246 B3 VSS-CPG Power CPG GND (0V)
  32751.  
  32752. 247 A2 XTAL O Crystal
  32753. resonator
  32754.  
  32755. Rev. 2.0, 02/99, page 699 of 830
  32756.  
  32757. ----------------------- Page 714-----------------------
  32758.  
  32759. Table 22.1 Pin Functions (cont)
  32760.  
  32761. Memory Interface
  32762.  
  32763. Pin
  32764. No. No. Pin Name I/O Function Reset SRAM DRAM SDRAM PCMCIA MPX
  32765.  
  32766. 248 A1 EXTAL I External input
  32767. clock/crystal
  32768. resonator
  32769.  
  32770. 249 C5 NC
  32771.  
  32772. 250 D16 NC
  32773.  
  32774. 251 H17 NC
  32775.  
  32776. 252 H18 NC
  32777.  
  32778. 253 N3 NC
  32779.  
  32780. 254 N4 NC
  32781.  
  32782. 255 U4 NC
  32783.  
  32784. 256 V18 NC
  32785.  
  32786. I: Input
  32787. O: Output
  32788. I/O: Input/output
  32789. Power: Power supply
  32790.  
  32791. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  32792. system power supply, and power must be supplied continuously. Even if only the RTC
  32793. is operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD,
  32794. and VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  32795. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  32796. the on-chip PLL circuits are used.
  32797. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the
  32798. on-chip crystal resonator is used.
  32799. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the
  32800. on-chip RTC is used.
  32801. 5. VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are connected inside the
  32802. package.
  32803.  
  32804. Rev. 2.0, 02/99, page 700 of 830
  32805.  
  32806. ----------------------- Page 715-----------------------
  32807.  
  32808. 22.2.2 Pin Functions (208-Pin QFP)
  32809.  
  32810. Table 22.2 Pin Functions
  32811.  
  32812. Pin Pin Name I/O Function Reset Memory Interface
  32813. No.
  32814.  
  32815. SRAM DRAM SDRAM PCMCIA MPX
  32816.  
  32817. 1 5'< I Bus ready 5'< 5'< 5'<
  32818.  
  32819. 2 5(6(7 I Reset 5(6(7
  32820.  
  32821. 3 &6 O Chip select 0 &6 &6
  32822.  
  32823. 4 &6 O Chip select 1 &6 &6
  32824.  
  32825. 5 &6 O Chip select 4 &6 &6
  32826.  
  32827. 6 &6 O Chip select 5 &6 &($ &6
  32828.  
  32829. 7 &6 O Chip select 6 &6 &(% &6
  32830.  
  32831. 8 %6 O Bust start (%6) (%6) (%6) (%6) (%6)
  32832.  
  32833. 9 VDDQ Power IO VDD (3.3 V)
  32834.  
  32835. 10 VSSQ Power IO GND (0 V)
  32836.  
  32837. 11 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32838.  
  32839. 12 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32840.  
  32841. 13 VDD Power Internal VDD
  32842. (1.8 V)
  32843.  
  32844. 14 VSS Power Internal GND
  32845. (0 V)
  32846.  
  32847. 15 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32848.  
  32849. 16 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32850.  
  32851. 17 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32852.  
  32853. 18 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32854.  
  32855. 19 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32856.  
  32857. 20 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32858.  
  32859. 21 VDDQ Power IO VDD (3.3 V)
  32860.  
  32861. 22 VSSQ Power IO GND (0 V)
  32862.  
  32863. 23 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32864.  
  32865. 24 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32866.  
  32867. 25 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32868.  
  32869. 26 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32870.  
  32871. 27 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32872.  
  32873. 28 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32874.  
  32875. 29 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32876.  
  32877. 30 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  32878.  
  32879. Rev. 2.0, 02/99, page 701 of 830
  32880.  
  32881. ----------------------- Page 716-----------------------
  32882.  
  32883. Table 22.2 Pin Functions (cont)
  32884.  
  32885. Pin Pin Name I/O Function Reset Memory Interface
  32886. No.
  32887.  
  32888. SRAM DRAM SDRAM PCMCIA MPX
  32889.  
  32890. 31 VDDQ Power IO VDD (3.3 V)
  32891.  
  32892. 32 VSSQ Power IO GND (0 V)
  32893.  
  32894. 33 D15 I/O Data A15
  32895.  
  32896. 34 D0 I/O Data A0
  32897.  
  32898. 35 D14 I/O Data A14
  32899.  
  32900. 36 D1 I/O Data A1
  32901.  
  32902. 37 D13 I/O Data A13
  32903.  
  32904. 38 D2 I/O Data A2
  32905.  
  32906. 39 VDD Power Internal VDD
  32907. (1.8 V)
  32908.  
  32909. 40 VSS Power Internal GND
  32910. (0 V)
  32911.  
  32912. 41 D12 I/O Data A12
  32913.  
  32914. 42 D3 I/O Data A3
  32915.  
  32916. 43 VDDQ Power IO VDD (3.3 V)
  32917.  
  32918. 44 VSSQ Power IO GND (0 V)
  32919.  
  32920. 45 D11 I/O Data A11
  32921.  
  32922. 46 D4 I/O Data A4
  32923.  
  32924. 47 D10 I/O Data A10
  32925.  
  32926. 48 D5 I/O Data A5
  32927.  
  32928. 49 D9 I/O Data A9
  32929.  
  32930. 50 D6 I/O Data A6
  32931.  
  32932. 51 %$&./ O Bus
  32933. %65(4 acknowledge/
  32934. bus request
  32935.  
  32936. 52 %5(4/ I Bus request/bus
  32937. %6$&. acknowledge
  32938.  
  32939. 53 D8 I/O Data A8
  32940.  
  32941. 54 D7 I/O Data A7
  32942.  
  32943. 55 CKE O Clock output CKE
  32944. enable
  32945.  
  32946. 56 VDDQ Power IO VDD (3.3 V)
  32947.  
  32948. 57 VSSQ Power IO GND (0 V)
  32949.  
  32950. 58 / / O D47–D40 select DQM5
  32951. :( &$6 :( &$6
  32952. DQM5 signal
  32953.  
  32954. Rev. 2.0, 02/99, page 702 of 830
  32955.  
  32956. ----------------------- Page 717-----------------------
  32957.  
  32958. Table 22.2 Pin Functions (cont)
  32959.  
  32960. Pin Pin Name I/O Function Reset Memory Interface
  32961. No.
  32962.  
  32963. SRAM DRAM SDRAM PCMCIA MPX
  32964.  
  32965. 59 / / O D39–D32 select :( &$6 DQM4
  32966. :( &$6
  32967. DQM4 signal
  32968.  
  32969. 60 / / O D15–D8 select :( &$6 DQM1 :(
  32970. :( &$6
  32971. DQM1 signal
  32972.  
  32973. 61 / / O D7–D0 select :( &$6 DQM0
  32974. :( &$6
  32975. DQM0 signal
  32976.  
  32977. 62 A17 O Address
  32978.  
  32979. 63 A16 O Address
  32980.  
  32981. 64 A15 O Address
  32982.  
  32983. 65 VDD Power Internal VDD
  32984. (1.8 V)
  32985.  
  32986. 66 VSS Power Internal GND
  32987. (0 V)
  32988.  
  32989. 67 A14 O Address
  32990.  
  32991. 68 A13 O Address
  32992.  
  32993. 69 VDDQ Power IO VDD (3.3 V)
  32994.  
  32995. 70 VSSQ Power IO GND (0 V)
  32996.  
  32997. 71 A12 O Address
  32998.  
  32999. 72 A11 O Address
  33000.  
  33001. 73 A10 O Address
  33002.  
  33003. 74 A9 O Address
  33004.  
  33005. 75 A8 O Address
  33006.  
  33007. 76 A7 O Address
  33008.  
  33009. 77 CKIO O Clock output CKIO
  33010.  
  33011. 78 VDDQ Power IO VDD (3.3 V)
  33012.  
  33013. 79 VSSQ Power IO GND (0 V)
  33014.  
  33015. 80 A6 O Address
  33016.  
  33017. 81 A5 O Address
  33018.  
  33019. 82 A4 O Address
  33020.  
  33021. 83 A3 O Address
  33022.  
  33023. 84 A2 O Address
  33024.  
  33025. 85 DRAK1 O DMAC1 request
  33026. acknowledge
  33027.  
  33028. 86 DRAK0 O DMAC0 request
  33029. acknowledge
  33030.  
  33031. 87 VDDQ Power IO VDD (3.3 V)
  33032.  
  33033. Rev. 2.0, 02/99, page 703 of 830
  33034.  
  33035. ----------------------- Page 718-----------------------
  33036.  
  33037. Table 22.2 Pin Functions (cont)
  33038.  
  33039. Pin Pin Name I/O Function Reset Memory Interface
  33040. No.
  33041.  
  33042. SRAM DRAM SDRAM PCMCIA MPX
  33043.  
  33044. 88 VSSQ Power IO GND (0 V)
  33045.  
  33046. 89 &6 O Chip select 3 &6 (&6) &6 &6
  33047.  
  33048. 90 &6 O Chip select 2 &6 (&6) &6 &6
  33049.  
  33050. 91 VDD Power Internal VDD
  33051. (1.8 V)
  33052.  
  33053. 92 VSS Power Internal GND
  33054. (0 V)
  33055.  
  33056. 93 5$6 O 5$6 5$6 5$6
  33057.  
  33058. 94 / / O Read/ /
  33059. 5' &$66 &$6 2( &$6 2( )5$0(
  33060. )5$0( )5$0(
  33061.  
  33062. 95 RD/:5 O Read/write RD/:5 RD/:5 RD/:5
  33063.  
  33064. 96 / / O D23–D16 select DQM2
  33065. :( &$6 :( &$6 ,&,25'
  33066. DQM2/ signal
  33067. ,&,25'
  33068.  
  33069. 97 / / O D31–D24 select DQM3
  33070. :( &$6 :( &$6 ,&,2:5
  33071. DQM3/ signal
  33072. ,&,2:5
  33073.  
  33074. 98 / / O D55–D48 select :( &$6 DQM6
  33075. :( &$6
  33076. DQM6 signal
  33077.  
  33078. 99 VDDQ Power IO VDD (3.3 V)
  33079.  
  33080. 100 VSSQ Power IO GND (0 V)
  33081.  
  33082. 101 / / O D63–D56 select DQM7
  33083. :( &$6 :( &$6 5(*
  33084. DQM7/5(* signal
  33085.  
  33086. 102 D23 I/O Data A23
  33087.  
  33088. 103 D24 I/O Data A24
  33089.  
  33090. 104 D22 I/O Data A22
  33091.  
  33092. 105 RXD I SCI data input
  33093.  
  33094. 106 '5(4 I Request from
  33095. DMAC0
  33096.  
  33097. 107 '5(4 I Request from
  33098. DMAC1
  33099.  
  33100. 108 D25 I/O Data A25
  33101.  
  33102. 109 D21 I/O Data A21
  33103.  
  33104. 110 D26 I/O Data
  33105.  
  33106. 111 D20 I/O Data A20
  33107.  
  33108. 112 D27 I/O Data
  33109.  
  33110. 113 VDDQ Power IO VDD (3.3 V)
  33111.  
  33112. Rev. 2.0, 02/99, page 704 of 830
  33113.  
  33114. ----------------------- Page 719-----------------------
  33115.  
  33116. Table 22.2 Pin Functions (cont)
  33117.  
  33118. Pin Pin Name I/O Function Reset Memory Interface
  33119. No.
  33120.  
  33121. SRAM DRAM SDRAM PCMCIA MPX
  33122.  
  33123. 114 VSSQ Power IO GND (0 V)
  33124.  
  33125. 115 D19 I/O Data A19
  33126.  
  33127. 116 D28 I/O Data
  33128.  
  33129. 117 VDD Power Internal VDD
  33130. (1.8 V)
  33131.  
  33132. 118 VSS Power Internal GND
  33133. (0 V)
  33134.  
  33135. 119 D18 I/O Data A18
  33136.  
  33137. 120 D29 I/O Data
  33138.  
  33139. 121 D17 I/O Data A17
  33140.  
  33141. 122 D30 I/O Data
  33142.  
  33143. 123 D16 I/O Data A16
  33144.  
  33145. 124 D31 I/O Data
  33146.  
  33147. 125 VDDQ Power IO VDD (3.3 V)
  33148.  
  33149. 126 VSSQ Power IO GND (0 V)
  33150.  
  33151. 127 D55 I/O Data
  33152.  
  33153. 128 D56 I/O Data
  33154.  
  33155. 129 D54 I/O Data
  33156.  
  33157. 130 D57 I/O Data
  33158.  
  33159. 131 D53 I/O Data
  33160.  
  33161. 132 D58 I/O Data
  33162.  
  33163. 133 D52 I/O Data
  33164.  
  33165. 134 D59 I/O Data
  33166.  
  33167. 135 VDDQ Power IO VDD (3.3 V)
  33168.  
  33169. 136 VSSQ Power IO GND (0 V)
  33170.  
  33171. 137 D51 I/O Data
  33172.  
  33173. 138 D60 I/O Data
  33174.  
  33175. 139 D50 I/O Data
  33176.  
  33177. 140 D61 I/O Data ACCSIZE0
  33178.  
  33179. 141 D49 I/O Data
  33180.  
  33181. 142 D62 I/O Data ACCSIZE1
  33182.  
  33183. 143 VDD Power Internal VDD
  33184. (1.8 V)
  33185.  
  33186. 144 VSS Power Internal GND
  33187. (0 V)
  33188.  
  33189. Rev. 2.0, 02/99, page 705 of 830
  33190.  
  33191. ----------------------- Page 720-----------------------
  33192.  
  33193. Table 22.2 Pin Functions (cont)
  33194.  
  33195. Pin Pin Name I/O Function Reset Memory Interface
  33196. No.
  33197.  
  33198. SRAM DRAM SDRAM PCMCIA MPX
  33199.  
  33200. 145 D48 I/O Data
  33201.  
  33202. 146 D63 I/O Data ACCSIZE2
  33203.  
  33204. 147 VDDQ Power IO VDD (3.3 V)
  33205.  
  33206. 148 VSSQ Power IO GND (0 V)
  33207.  
  33208. 149 MD0/SCK I/O Mode/SCI clock MD0 SCK SCK SCK SCK SCK
  33209.  
  33210. 150 MD1/TXD2 I/O Mode SCIF data MD1 TXD2 TXD2 TXD2 TXD2 TXD2
  33211. output
  33212.  
  33213. 151 MD2/RXD2 I Mode/SCIF data MD2 RXD2 RXD2 RXD2 RXD2 RXD2
  33214. input
  33215.  
  33216. 152 ,5/ I Interrupt 0
  33217.  
  33218. 153 ,5/ I Interrupt 1
  33219.  
  33220. 154 ,5/ I Interrupt 2
  33221.  
  33222. 155 ,5/ I Interrupt 3
  33223.  
  33224. 156 NMI I Nonmaskable
  33225. interrupt
  33226.  
  33227. 157 XTAL2 O RTC crystal
  33228. resonator pin
  33229.  
  33230. 158 EXTAL2 I RTC crystal
  33231. resonator pin
  33232.  
  33233. 159 VSS-RTC Power RTC GND
  33234. (0 V)
  33235.  
  33236. 160 VDD-RTC Power RTC VDD
  33237. (3.3 V)
  33238.  
  33239. 161 Reserved I Pull up to
  33240. 3.3. V
  33241.  
  33242. 162 VSS Power Internal GND
  33243. (0 V)
  33244.  
  33245. 163 VDDQ Power IO VDD (3.3 V)
  33246.  
  33247. 164 &76 I/O SCIF data control
  33248. (CTS)
  33249.  
  33250. 165 TCLK I/O RTC/TMU
  33251. clock
  33252.  
  33253. 166 MD8/576 I/O Mode/SCIF data MD8 576 576 576 576 576
  33254. control (RTS)
  33255.  
  33256. 167 MD7/TXD I/O Mode/SCI data MD7 TXD TXD TXD TXD TXD
  33257. output
  33258.  
  33259. 168 SCK2/ I SCIF clock/ 05(6(7 SCK2 SCK2 SCK2 SCK2 SCK2
  33260. 05(6(7 manual reset
  33261.  
  33262. Rev. 2.0, 02/99, page 706 of 830
  33263.  
  33264. ----------------------- Page 721-----------------------
  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. 169 VDD Power Internal VDD
  33274. (1.8 V)
  33275.  
  33276. 170 VSS Power Internal GND
  33277. (0 V)
  33278.  
  33279. 171 A18 O Address
  33280.  
  33281. 172 A19 O Address
  33282.  
  33283. 173 A20 O Address
  33284.  
  33285. 174 A21 O Address
  33286.  
  33287. 175 A22 O Address
  33288.  
  33289. 176 A23 O Address
  33290.  
  33291. 177 VDDQ Power IO VDD (3.3 V)
  33292.  
  33293. 178 VSSQ Power IO GND (0 V)
  33294.  
  33295. 179 A24 O Address
  33296.  
  33297. 180 A25 O Address
  33298.  
  33299. 181 MD3/&($ I/O Mode/ MD3 &($
  33300. PCMCIA-CE
  33301.  
  33302. 182 MD4/&(% I/O Mode/ MD4 &(%
  33303. PCMCIA-CE
  33304.  
  33305. 183 MD5/5$6 I/O Mode/5$6 MD5 5$6
  33306. (DRAM)
  33307.  
  33308. 184 DACK0 O DMAC0 bus
  33309. acknowledge
  33310.  
  33311. 185 DACK1 O DMAC1 bus
  33312. acknowledge
  33313.  
  33314. 186 A0 O Address
  33315.  
  33316. 187 VDDQ Power IO VDD (3.3 V)
  33317.  
  33318. 188 VSSQ Power IO GND (0 V)
  33319.  
  33320. 189 A1 O Address
  33321.  
  33322. 190 STATUS0 O Status
  33323.  
  33324. 191 STATUS1 O Status
  33325.  
  33326. 192 MD6/ I Mode/,2,6 MD6 ,2,6
  33327. ,2,6 (PCMCIA)
  33328.  
  33329. 193 $6(%5./ I/O Pin break/
  33330. BRKACK acknowledge
  33331. (Hitachi-UDI)
  33332.  
  33333. 194 TDO O Data out
  33334. (Hitachi-UDI)
  33335.  
  33336. Rev. 2.0, 02/99, page 707 of 830
  33337.  
  33338. ----------------------- Page 722-----------------------
  33339.  
  33340. Table 22.2 Pin Functions (cont)
  33341.  
  33342. Pin Pin Name I/O Function Reset Memory Interface
  33343. No.
  33344.  
  33345. SRAM DRAM SDRAM PCMCIA MPX
  33346.  
  33347. 195 VDD Power Internal VDD
  33348. (1.8 V)
  33349.  
  33350. 196 VSS Power Internal GND
  33351. (0 V)
  33352.  
  33353. 197 TMS I Mode
  33354. (Hitachi-UDI)
  33355.  
  33356. 198 TCK I Clock
  33357. (Hitachi-UDI)
  33358.  
  33359. 199 TDI I Data in
  33360. (Hitachi-UDI)
  33361.  
  33362. 200 7567 I Reset
  33363. (Hitachi-UDI)
  33364.  
  33365. 201 VDD-PLL2 Power PLL2 VDD (3.3V)
  33366.  
  33367. 202 VSS-PLL2 Power PLL2 GND (0V)
  33368.  
  33369. 203 VDD-PLL1 Power PLL1 VDD (3.3V)
  33370.  
  33371. 204 VSS-PLL1 Power PLL1 GND (0V)
  33372.  
  33373. 205 VDD-CPG Power CPG VDD (3.3V)
  33374.  
  33375. 206 VSS-CPG Power CPG GND (0V)
  33376.  
  33377. 207 XTAL O Crystal resonator
  33378.  
  33379. 208 EXTAL I External input
  33380. clock/crystal
  33381. resonator
  33382.  
  33383. I: Input
  33384. O: Output
  33385. I/O: Input/output
  33386. Power: Power supply
  33387.  
  33388. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  33389. system power supply, and power must be supplied continuously. Even if only the RTC
  33390. is operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD,
  33391. and VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  33392. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  33393. the on-chip PLL circuits are used.
  33394. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the
  33395. on-chip crystal resonator is used.
  33396. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the
  33397. on-chip RTC is used.
  33398. 5. With the QFP package, VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are not
  33399. connected inside the package.
  33400. 6. The 5' , RD/:5 , CKIO2, and &.,2(1% pins are not provided on the QFP
  33401. package.
  33402. 7. With the QFP package, the maximum external bus operating frequency is 83 MHz.
  33403.  
  33404. Rev. 2.0, 02/99, page 708 of 830
  33405.  
  33406. ----------------------- Page 723-----------------------
  33407.  
  33408. Section 23 Electrical Characteristics
  33409.  
  33410. 23.1 Absolute Maximum Ratings
  33411.  
  33412. Table 23.1 Absolute Maximum Ratings
  33413.  
  33414. Item Symbol Value Unit
  33415.  
  33416. I/O, PLL, RTC power supply voltage V –0.3 to 4.2 V
  33417. DDQ
  33418.  
  33419. VDD-PLL1/2 ,
  33420. ,
  33421. V
  33422. DD-RTC
  33423.  
  33424. V
  33425. DD-CPG
  33426.  
  33427. Internal power supply voltage V –0.3 to 2.5 V
  33428. DD
  33429.  
  33430. Input voltage V –0.3 to V + 0.3 V
  33431. in DDQ
  33432.  
  33433. Operating temperature Topr –20 to 75 °C
  33434.  
  33435. Storage temperature Tstg –55 to 125 °C
  33436.  
  33437. Note: Permanent damage to the chip may result if the maximum ratings are exceeded.
  33438. VDD (1.8 V) should be input after input of VDDQ , VDD-PLL1/2 , VDD-RTC , and VDD-CPG (3.3 V).
  33439.  
  33440. Rev. 2.0, 02/99, page 709 of 830
  33441.  
  33442. ----------------------- Page 724-----------------------
  33443.  
  33444. 23.2 DC Characteristics
  33445.  
  33446. Table 23.2 DC Characteristics
  33447.  
  33448. (Ta = –20 to +75°C)
  33449.  
  33450. Item Symbol Min Typ Max Unit Test Conditions
  33451.  
  33452. Power supply VDDQ 3.0 3.3 3.6 V Normal mode, sleep
  33453. voltage VDD-PLL1/2 mode, standby mode
  33454. V
  33455. DD-CPG
  33456.  
  33457. V
  33458. DD-RTC
  33459.  
  33460. VDD 1.6 1.8 2.0 Normal mode, sleep
  33461. mode, standby mode
  33462.  
  33463. Current Normal IDD — 840 — mA VDDQ, VDD-PLL1/2, VDD-RTC,
  33464. dissipation operation VDD-CPG = 3.3 V
  33465. V = 1.8 V
  33466. DD
  33467. *1 f = 200 MHz
  33468. *2 f = 100 MHz
  33469. *3 f = 50 MHz
  33470.  
  33471. — 420 —
  33472.  
  33473. — 210 —
  33474. Sleep mode — 150*1 —
  33475.  
  33476. — 80*2 —
  33477.  
  33478. — 40*3 —
  33479.  
  33480. Standby mode — TBD — A Ta = 25 C (RTC on)
  33481. µ °
  33482. — TBD — Ta > 50°C (RTC on)
  33483. — TBD — Ta = 25°C (RTC off)
  33484. — TBD — Ta > 50°C (RTC off)
  33485. Current Normal IDDQ — 160*1 — mA VDDQ, VDD-PLL1/2, VDD-RTC,
  33486.  
  33487. dissipation operation VDD-CPG = 3.3 V
  33488. V = 1.8 V
  33489. DD
  33490. *1 f = 200 MHz,
  33491.  
  33492. t = 100 MHz
  33493. cyc
  33494. *2 f = 100 MHz,
  33495.  
  33496. t = 50 MHz
  33497. cyc
  33498. *3 f = 50 MHz,
  33499.  
  33500. t = 25 MHz
  33501. cyc
  33502.  
  33503. — 80*2 —
  33504.  
  33505. — 40*3 —
  33506.  
  33507. Sleep mode — 40*1 —
  33508.  
  33509. — 20*2 —
  33510.  
  33511. — 10*3 —
  33512.  
  33513. Standby mode — TBD — A Ta = 25 C (RTC on)
  33514. µ °
  33515. — TBD — Ta > 50°C (RTC on)
  33516.  
  33517. — TBD — Ta = 25°C (RTC off)
  33518. — TBD — Ta > 50°C (RTC off)
  33519.  
  33520. Rev. 2.0, 02/99, page 710 of 830
  33521.  
  33522. ----------------------- Page 725-----------------------
  33523.  
  33524. Table 23.2 DC Characteristics (cont)
  33525.  
  33526. (Ta = –20 to +75°C)
  33527.  
  33528. Item Symbol Min Typ Max Unit Test Conditions
  33529.  
  33530. Input voltage 5(6(7, VIH VDDQ × — VDDQ + V
  33531. NMI, 7567 , 0.9 0.3
  33532. $6(%5./
  33533. BRKACK
  33534.  
  33535. Other input 2.0 — VDDQ +
  33536. pins 0.3
  33537.  
  33538. 5(6(7, VIL –0.3 — VDDQ ×
  33539. NMI, 7567 , 0.1
  33540. $6(%5./
  33541. BRKACK
  33542.  
  33543. Other input –0.3 — VDDQ ×
  33544. pins 0.2
  33545.  
  33546. Output All output VOH 2.4 — — V
  33547. voltage pins
  33548.  
  33549. V — — 0.55
  33550. OL
  33551.  
  33552. Pull-up Port pins Rpull 20 60 180 kΩ
  33553. resistance
  33554.  
  33555. Pin All pins CL — — 10 pF
  33556. capacitance
  33557.  
  33558. Notes: 1. Connect VDD-PLL1/2 , VDD-RTC , and VDD-CPG to VDDQ , and VSS-CPG , VSS-PLL1/2 , and VSSQ-RTC to GND,
  33559. regardless of whether or not the PLL circuits and RTC are used.
  33560. 2. The current dissipation values are for V min = V – 0.5 V and V max = 0.5 V with
  33561. IH DDQ IL
  33562.  
  33563. all output pins unloaded.
  33564. 3. To reduce the leakage current in standby mode, the RTC must be turned on.
  33565. 4. IDDQ is the sum of the VDDQ , VDD-PLL1/2 , VDD-RTC , and VDD-CPG 3.3 V system currents.
  33566.  
  33567. Rev. 2.0, 02/99, page 711 of 830
  33568.  
  33569. ----------------------- Page 726-----------------------
  33570.  
  33571. Table 23.3 Permissible Output Currents
  33572.  
  33573. (Ta = –20 to +75°C)
  33574.  
  33575. Item Symbol Min Typ Max Unit
  33576.  
  33577. Permissible output low current IOL — — 2 mA
  33578. (per pin)
  33579.  
  33580. Permissible output low current ΣIOL — — 120
  33581. (total)
  33582.  
  33583. Permissible output high current –IOH — — 2
  33584. (per pin)
  33585.  
  33586. Permissible output high current Σ(–IOH) — — 40
  33587. (total)
  33588.  
  33589. Note: To protect chip reliability, do not exceed the output current values in table 23.3.
  33590.  
  33591. 23.3 AC Characteristics
  33592.  
  33593. In principle, SH7750 input should be synchronous. Unless specified otherwise, ensure that the
  33594. setup time and hold times for each input signal are observed.
  33595.  
  33596. Table 23.4 Clock Timing
  33597.  
  33598. Item Symbol Min Typ Max Unit Notes
  33599.  
  33600. Operating CPU, FPU, cache, TLB f 1 — 200 MHz
  33601. frequency
  33602.  
  33603. External bus 1 — 100
  33604.  
  33605. Peripheral modules 1 — 50
  33606.  
  33607. Rev. 2.0, 02/99, page 712 of 830
  33608.  
  33609. ----------------------- Page 727-----------------------
  33610.  
  33611. 23.3.1 Clock and Control Signal Timing
  33612.  
  33613. Table 23.5 Clock and Control Signal Timing
  33614.  
  33615. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF)
  33616. DDQ DD a L
  33617.  
  33618. Item Symbol Min Max Unit Figure
  33619.  
  33620. EXTAL PLL1, 2 1/2 divider fEX 16 66.7 MHz
  33621. clock input operating operating
  33622. frequency
  33623.  
  33624. 1/2 divider not f 8 33.3
  33625. EX
  33626.  
  33627. operating
  33628.  
  33629. PLL1, 2 1/2 divider fEX 2 66.7
  33630. not operating
  33631. operating
  33632.  
  33633. 1/2 divider not f 1 33.3
  33634. EX
  33635.  
  33636. operating
  33637.  
  33638. EXTAL clock input cycle time tEXcyc 15 1000 ns 23.1
  33639.  
  33640. EXTAL clock input low-level pulse width tEXL 3.5 ns 23.1
  33641.  
  33642. EXTAL clock input high-level pulse width tEXH 3.5 ns 23.1
  33643.  
  33644. EXTAL clock output rise time tEXr 4 ns 23.1
  33645.  
  33646. EXTAL clock input fall time tEXf 4 ns 23.1
  33647.  
  33648. CKIO clock PLL2 operating fOP 25 100 MHz
  33649. output
  33650.  
  33651. PLL2 not operating fOP 1 100 MHz
  33652.  
  33653. CKIO clock output cycle time tcyc 10 1000 ns 23.2
  33654.  
  33655. CKIO clock output low-level pulse width tCKOL 1 — ns 23.2
  33656.  
  33657. CKIO clock output high-level pulse width tCKOH 1 — ns 23.2
  33658.  
  33659. CKIO clock output rise time tCKOr — 4 ns 23.2
  33660.  
  33661. CKIO clock output fall time tCKOf — 4 ns 23.2
  33662.  
  33663. Rev. 2.0, 02/99, page 713 of 830
  33664.  
  33665. ----------------------- Page 728-----------------------
  33666.  
  33667. Table 23.5 Clock and Control Signal Timing (cont)
  33668.  
  33669. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF)
  33670. DDQ DD a L
  33671.  
  33672. Item Symbol Min Max Unit Figure
  33673.  
  33674. Power-on oscillation settling time tOSC1 10 — ms 23.3, 23.5
  33675.  
  33676. Power-on oscillation settling time/mode tOSCMD 10 — ms 23.3, 23.5
  33677. settling
  33678.  
  33679. SCK2 reset setup time tSCK2RS 20 — ns 23.11
  33680.  
  33681. SCK2 reset hold time tSCK2RH 20 — ns 23.3, 23.5, 23.11
  33682.  
  33683. MD reset setup time tMDRS 3 — tcyc 23.12
  33684.  
  33685. MD reset hold time tMDRH 20 — ns 23.3, 23.5, 23.12
  33686.  
  33687. 5(6(7 assert time tRESW 20 — tcyc 23.3, 23.4, 23.5,
  33688. 23.6, 23.11
  33689.  
  33690. PLL synchronization settling time tPLL 200 — µs 23.9, 23.10
  33691.  
  33692. Standby return oscillation settling time 1 tOSC2 10 — ms 23.4, 23.6
  33693.  
  33694. Standby return oscillation settling time 2 tOSC3 5 — ms 23.7
  33695.  
  33696. Standby return oscillation settling time 3 tOSC4 5 — ms 23.8
  33697.  
  33698. IRL interrupt determination time tIRLSTB — 200 µs 23.10
  33699. (RTC used, standby mode)
  33700.  
  33701. 7567 reset hold time tTRSTRH 0 ns 23.3, 23.5
  33702.  
  33703. Note: When a crystal resonator is connected to EXTAL and XTAL, the maximum frequency is
  33704. 33.3 MHz. When a 3rd overtone crystal resonator is used, an external tank circuit is
  33705. necessary.
  33706.  
  33707. tEXcyc
  33708.  
  33709. tEXH tEXL
  33710.  
  33711. VIH VIH VIH
  33712. 1/2VDDQ 1/2VDDQ
  33713.  
  33714. VIL VIL
  33715.  
  33716. tEXf tEXr
  33717.  
  33718. Note: When the clock is input from the EXTAL pin
  33719.  
  33720. Figure 23.1 EXTAL Clock Input Timing
  33721.  
  33722. Rev. 2.0, 02/99, page 714 of 830
  33723.  
  33724. ----------------------- Page 729-----------------------
  33725.  
  33726. t
  33727. cyc
  33728.  
  33729. tCKOH tCKOL
  33730.  
  33731. VOH VOH VOH
  33732. 1/2VDDQ 1/2VDDQ
  33733.  
  33734. VOL VOL
  33735.  
  33736. tCKOf tCKOr
  33737.  
  33738. Figure 23.2 CKIO Clock Output Timing
  33739.  
  33740. Stable oscillation
  33741.  
  33742. CKIO,
  33743. internal clock
  33744.  
  33745. VDD VDD min
  33746. tRESW
  33747. tOSC1
  33748.  
  33749. RESET
  33750.  
  33751. tSCK2RH
  33752.  
  33753. SCK2
  33754.  
  33755. tOSCMD tMDRH
  33756.  
  33757. MD8, MD7,
  33758. MD2–MD0
  33759.  
  33760. tTRSTRH
  33761.  
  33762. TRST
  33763.  
  33764. Notes: 1. Oscillation settling time when on-chip resonator is used
  33765. 2. PLL2 not operating
  33766.  
  33767.  
  33768. Figure 23.3 Power-On Oscillation Settling Time
  33769.  
  33770. Rev. 2.0, 02/99, page 715 of 830
  33771.  
  33772. ----------------------- Page 730-----------------------
  33773.  
  33774. Standby Stable oscillation
  33775.  
  33776. CKIO,
  33777. internal clock
  33778.  
  33779. tRESW
  33780.  
  33781. tOSC2
  33782.  
  33783. RESET
  33784.  
  33785. Notes: 1. Oscillation settling time when on-chip resonator is used
  33786. 2. PLL2 not operating
  33787.  
  33788.  
  33789. Figure 23.4 Standby Return Oscillation Settling Time (Return by 5(6(7)
  33790. 5(6(7
  33791.  
  33792. Stable oscillation
  33793.  
  33794. Internal clock
  33795.  
  33796. VDD min
  33797. VDD
  33798. tRESW
  33799. tOSC1
  33800.  
  33801. RESET
  33802.  
  33803. tSCK2RH
  33804.  
  33805. SCK2
  33806.  
  33807. tOSCMD tMDRH
  33808.  
  33809. MD8, MD7,
  33810. MD2–MD0
  33811. tTRSTRH
  33812.  
  33813. TRST
  33814.  
  33815. CKIO
  33816.  
  33817. Notes: 1. Oscillation settling time when on-chip resonator is used
  33818. 2. PLL2 operating
  33819.  
  33820. Figure 23.5 Power-On Oscillation Settling Time
  33821.  
  33822. Rev. 2.0, 02/99, page 716 of 830
  33823.  
  33824. ----------------------- Page 731-----------------------
  33825.  
  33826. Standby Stable oscillation
  33827.  
  33828. Internal
  33829. clock
  33830. tRESW
  33831. tOSC2
  33832.  
  33833. RESET
  33834.  
  33835. CKIO
  33836.  
  33837. Notes: 1. Oscillation settling time when on-chip resonator is used
  33838. 2. PLL2 operating
  33839.  
  33840. Figure 23.6 Standby Return Oscillation Settling Time (Return by 5(6(7)
  33841. 5(6(7
  33842.  
  33843. Standby Stable oscillation
  33844.  
  33845. CKIO,
  33846. internal clock
  33847.  
  33848. tOSC3
  33849.  
  33850. NMI
  33851.  
  33852. Note: Oscillation settling time when on-chip resonator is used
  33853.  
  33854. Figure 23.7 Standby Return Oscillation Settling Time (Return by NMI)
  33855.  
  33856. Rev. 2.0, 02/99, page 717 of 830
  33857.  
  33858. ----------------------- Page 732-----------------------
  33859.  
  33860. Standby Stable oscillation
  33861.  
  33862. CKIO,
  33863. internal clock
  33864.  
  33865. tOSC4
  33866.  
  33867. IRL3–IRL0
  33868.  
  33869. Note: Oscillation settling time when on-chip resonator is used
  33870.  
  33871.  
  33872. Figure 23.8 Standby Return Oscillation Settling Time (Return by ,5/–,5/)
  33873. ,5/ ,5/
  33874.  
  33875. Reset or NMI
  33876. interrupt request
  33877.  
  33878. Stable input clock Stable input clock
  33879.  
  33880. EXTAL input
  33881.  
  33882. PLL synchronization tPLL × 2 PLL synchronization
  33883.  
  33884. PLL output,
  33885. CKIO output
  33886.  
  33887. Internal clock
  33888.  
  33889. STATUS1–
  33890. Normal Standby Normal
  33891. STATUS0
  33892.  
  33893. Figure 23.9 PLL Synchronization Settling Time in Case of 5(6(7 or NMI Interrupt
  33894. 5(6(7
  33895.  
  33896. Rev. 2.0, 02/99, page 718 of 830
  33897.  
  33898. ----------------------- Page 733-----------------------
  33899.  
  33900. IRL3–IRL0
  33901. interrupt request
  33902.  
  33903. Stable input clock Stable input clock
  33904.  
  33905. EXTAL input
  33906.  
  33907. PLL synchronization tIRLSTB tPLL × 2 PLL synchronization
  33908.  
  33909. PLL output,
  33910. CKIO output
  33911.  
  33912. Internal clock
  33913.  
  33914. STATUS1–
  33915. Normal Standby Normal
  33916. STATUS0
  33917.  
  33918. Figure 23.10 PLL Synchronization Settling Time in Case of IRL Interrupt
  33919.  
  33920. CKIO
  33921.  
  33922. tRESW
  33923.  
  33924. RESET
  33925.  
  33926. tSCK2RS tSCK2RH
  33927.  
  33928. SCK2
  33929.  
  33930. Figure 23.11 Manual Reset Input Timing
  33931.  
  33932. RESET
  33933.  
  33934. tMDRS
  33935. tMDRH
  33936.  
  33937. MD6–MD3
  33938.  
  33939. Figure 23.12 Mode Input Timing
  33940.  
  33941. Rev. 2.0, 02/99, page 719 of 830
  33942.  
  33943. ----------------------- Page 734-----------------------
  33944.  
  33945. 23.3.2 Control Signal Timing
  33946.  
  33947. Table 23.6 Control Signal Timing
  33948.  
  33949. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  33950. DDQ DD a L
  33951.  
  33952. 66 MHz 83 MHz 100 MHz
  33953.  
  33954. Item Symbol Min Max Min Max Min Max Unit Figure Note
  33955.  
  33956. %5(4 setup time tBREQS 2 — 2 — 2 — ns BGA
  33957.  
  33958. 3.5 — 1.5 — — — ns QFP
  33959.  
  33960. %5(4 hold time t 1.5 — 1.5 — 1.5 — ns
  33961. BREQH
  33962.  
  33963. %$&. delay time tBACKD — 10 — 8 — 6 ns
  33964.  
  33965. Bus tri-state delay time tBOFF1 — 15 — 12 — 10 ns
  33966.  
  33967. Bus tri-state delay time tBOFF2 — 2 — 2 — 2 tcyc 23.13
  33968. to standby mode
  33969.  
  33970. Bus buffer on time t — 15 — 12 — 10 ns
  33971. BON1
  33972.  
  33973. Bus buffer on time from t — 1 — 1 — 1 t 23.13
  33974. BON2 cyc
  33975.  
  33976. standby
  33977.  
  33978. STATUS0/1 delay time tSTD1 — 11 — 9 — 7 ns 23.13
  33979.  
  33980. STATUS0/1 delay time tSTD2 — 2 — 2 — 2 tcyc 23.13
  33981. to standby
  33982.  
  33983. Rev. 2.0, 02/99, page 720 of 830
  33984.  
  33985. ----------------------- Page 735-----------------------
  33986.  
  33987. Normal operation Standby mode Normal operation
  33988.  
  33989. CKIO
  33990.  
  33991. STATUS 0, STATUS 1 Normal Standby Normal
  33992.  
  33993. tSTD2 tSTD1
  33994.  
  33995. CSn, RD, RD/WR,
  33996. WEn, BS, RAS, RAS2,
  33997. CE2A, CE2B, RD2, tBOFF2 tBON2
  33998. RD/WR2
  33999.  
  34000. A25–A0, D63–D0
  34001.  
  34002. DACKn, DRAKn, SCK,
  34003. * TXD, TXD2, CTS2,
  34004. RTS2
  34005.  
  34006. Note: * When the PHZ bit in STBCR is set to 1, these pins go to the high-impedance state (except
  34007. for pins being used as port pins, which retain their port state).
  34008.  
  34009. Figure 23.13 Pin Drive Timing for Standby Mode
  34010.  
  34011. Rev. 2.0, 02/99, page 721 of 830
  34012.  
  34013. ----------------------- Page 736-----------------------
  34014.  
  34015. 23.3.3. Bus Timing
  34016.  
  34017. Table 23.7 Bus Timing
  34018.  
  34019. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  34020. DDQ DD a L
  34021.  
  34022. 66 MHz 83 MHz 100 MHz
  34023. Item Symbol Min Max Min Max Min Max Unit Notes
  34024. Address delay time tAD — 10 — 8 — 6 ns
  34025. %6 delay time tBSD — 10 — 8 — 6 ns
  34026.  
  34027. &6 delay time tCSD — 10 — 8 — 6 ns
  34028.  
  34029. 5: delay time tRWD — 10 — 8 — 6 ns
  34030.  
  34031. 5' delay time tRSD — 10 — 8 — 6 ns
  34032.  
  34033. Read data setup time tRDS 2 — 2 — 2 — ns BGA
  34034. 3.5 — 3.5 — — — ns QFP
  34035. Read data hold time t 1.5 — 1.5 — 1.5 — ns
  34036. RDH
  34037.  
  34038. :( delay time (falling tWEDF — 10 — 8 — 6 ns Relative
  34039. edge) to CKIO
  34040. falling
  34041. edge
  34042. :( delay time tWED1 — 10 — 8 — 6 ns
  34043.  
  34044. Write data delay time tWDD — 10 — 8 — 6 ns
  34045.  
  34046. 5'< setup time tRDYS 2 — 2 — 2 — ns BGA
  34047.  
  34048. 3.5 — 3.5 — — — ns QFP
  34049.  
  34050. 5'< hold time tRDYH 1.5 — 1.5 — 1.5 ns
  34051.  
  34052. 5$6 delay time tRASD — 10 — 8 — 6 ns
  34053.  
  34054. &$6 delay time 1 tCASD1 — 10 — 8 — 6 ns DRAM
  34055.  
  34056. &$6 delay time 2 tCASD2 — 10 — 8 — 6 ns SDRAM
  34057.  
  34058. CKE delay time tCKED — 10 — 8 — 6 ns SDRAM
  34059. DQM delay time tDQMD — 10 — 8 — 6 ns SDRAM
  34060. )5$0( delay time tFMD — 10 — 8 — 6 ns MPX
  34061.  
  34062. ,2,6 setup time tIO16S 2 — 2 — 2 — ns BGA
  34063.  
  34064. 3.5 — 3.5 — — — ns QFP
  34065.  
  34066. ,2,6 hold time tIO16H 1.5 — 1.5 — 1.5 — ns PCMCIA
  34067.  
  34068. ,&,2:5 delay time tICWSDF — 10 — 8 — 6 ns PCMCIA
  34069. (falling edge)
  34070. ,&,25' delay time tICRSD — 10 — 8 — 6 ns PCMCIA
  34071.  
  34072. DACK delay time tDACD — 10 — 8 — 6 ns
  34073.  
  34074. Rev. 2.0, 02/99, page 722 of 830
  34075.  
  34076. ----------------------- Page 737-----------------------
  34077.  
  34078. Table 23.7 Bus Timing (cont)
  34079.  
  34080. 66 MHz 83 MHz 100 MHz
  34081.  
  34082. Item Symbol Min Max Min Max Min Max Unit Notes
  34083.  
  34084. DACK delay time tDACDF — 10 — 8 — 6 ns Relative
  34085. (falling edge) to CKIO
  34086. falling
  34087. edge
  34088.  
  34089. Rev. 2.0, 02/99, page 723 of 830
  34090.  
  34091. ----------------------- Page 738-----------------------
  34092.  
  34093. T1 T2
  34094.  
  34095. CKIO
  34096.  
  34097. tAD tAD
  34098.  
  34099. A25–A0
  34100.  
  34101. tCSD tCSD
  34102.  
  34103. CSn
  34104.  
  34105. tRWD tRWD
  34106.  
  34107. RD/WR
  34108.  
  34109. tRSD tRSD tRSD
  34110.  
  34111. RD
  34112.  
  34113. D63–D0 tRDS tRDH
  34114.  
  34115. (read)
  34116.  
  34117. tWED1
  34118. tWEDF tWEDF
  34119.  
  34120. WEn
  34121.  
  34122. tWDD tWDD tWDD
  34123.  
  34124. D63–D0
  34125. (write)
  34126.  
  34127. tBSD tBSD
  34128.  
  34129. BS
  34130.  
  34131. RDY
  34132.  
  34133. tDACD
  34134. tDACD tDACD
  34135. DACKn
  34136. (SA: IO ← memory)
  34137.  
  34138. tDACDF
  34139. tDACDF
  34140. DACKn
  34141. (SA: IO → memory)
  34142.  
  34143. tDACD tDACD
  34144. DACKn
  34145. (DA)
  34146.  
  34147. Note: IO: DACK device
  34148. SA: Single address DMA transfer
  34149. DA: Dual address DMA transfer
  34150. DACK set to active-high
  34151.  
  34152. Figure 23.14 SRAM Bus Cycle: Basic Bus Cycle (No Wait)
  34153.  
  34154. Rev. 2.0, 02/99, page 724 of 830
  34155.  
  34156. ----------------------- Page 739-----------------------
  34157.  
  34158. T1 Tw T2
  34159.  
  34160. CKIO
  34161.  
  34162. tAD tAD
  34163.  
  34164. A25–A0
  34165.  
  34166. tCSD tCSD
  34167.  
  34168. CSn
  34169.  
  34170. tRWD tRWD
  34171.  
  34172. RD/WR
  34173.  
  34174. tRSD tRSD tRSD
  34175.  
  34176. RD
  34177.  
  34178. D63–D0 tRDS tRDH
  34179.  
  34180. (read)
  34181.  
  34182. tWED1
  34183. tWEDF tWEDF
  34184.  
  34185. WEn
  34186.  
  34187. tWDD tWDD tWDD
  34188.  
  34189. D63–D0
  34190. (write)
  34191.  
  34192. tBSD tBSD
  34193.  
  34194. BS
  34195.  
  34196. tRDYS tRDYH
  34197.  
  34198. RDY
  34199.  
  34200. tDACD
  34201. tDACD tDACD
  34202. DACKn
  34203. (SA: IO ← memory)
  34204.  
  34205. tDACDF
  34206. tDACDF
  34207. DACKn
  34208. (SA: IO → memory)
  34209.  
  34210. tDACD tDACD
  34211. DACKn
  34212. (DA)
  34213.  
  34214. Note: IO: DACK device
  34215. SA: Single address DMA transfer
  34216. DA: Dual address DMA transfer
  34217.  
  34218.  
  34219. Figure 23.15 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait)
  34220.  
  34221. Rev. 2.0, 02/99, page 725 of 830
  34222.  
  34223. ----------------------- Page 740-----------------------
  34224.  
  34225. T1 Tw Twe T2
  34226.  
  34227. CKIO
  34228.  
  34229. tAD tAD
  34230.  
  34231. A25–A0
  34232.  
  34233. tCSD tCSD
  34234.  
  34235. CSn
  34236.  
  34237. tRWD tRWD
  34238.  
  34239. RD/WR
  34240.  
  34241. tRSD tRSD tRSD
  34242.  
  34243. RD
  34244.  
  34245. D63–D0 tRDS tRDH
  34246.  
  34247. (read)
  34248.  
  34249. tWED1
  34250. tWEDF tWEDF
  34251.  
  34252. WEn
  34253.  
  34254. tWDD tWDD tWDD
  34255.  
  34256. D63–D0
  34257. (write)
  34258.  
  34259. tBSD tBSD
  34260.  
  34261. BS
  34262.  
  34263. tRDYS tRDYH
  34264.  
  34265. RDY
  34266.  
  34267. tDACD tRDYS tRDYH
  34268.  
  34269. DACKn tDACD tDACD
  34270.  
  34271. (SA: IO ← memory)
  34272.  
  34273. tDACDF
  34274. tDACDF
  34275. DACKn
  34276. (SA: IO → memory)
  34277.  
  34278. tDACD tDACD
  34279. DACKn
  34280. (DA)
  34281.  
  34282. Note: IO: DACK device
  34283. SA: Single address DMA transfer
  34284. DA: Dual address DMA transfer
  34285.  
  34286.  
  34287. Figure 23.16 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait + One External Wait)
  34288.  
  34289. Rev. 2.0, 02/99, page 726 of 830
  34290.  
  34291. ----------------------- Page 741-----------------------
  34292.  
  34293. TS1 T1 T2 TH1
  34294.  
  34295. CKIO
  34296.  
  34297. tAD tAD
  34298. A25–A0
  34299.  
  34300. tCSD tCSD
  34301. CSn
  34302.  
  34303. tRWD tRWD
  34304.  
  34305. RD/WR
  34306.  
  34307. tRSD tRSD tRSD
  34308. RD
  34309.  
  34310. D63–D0 tRDS tRDH
  34311. (read)
  34312.  
  34313. tWED1
  34314. tWEDF tWEDF
  34315. WEn
  34316.  
  34317. tWDD tWDD tWDD
  34318.  
  34319. D63–D0
  34320. (write)
  34321.  
  34322. tBSD tBSD
  34323.  
  34324. BS
  34325.  
  34326. RDY
  34327.  
  34328. tDACD tDACD
  34329. DACKn tDACD
  34330. (SA: IO ← memory)
  34331.  
  34332. tDACDF
  34333. tDACDF
  34334. DACKn
  34335. (SA: IO → memory)
  34336.  
  34337. tDACD tDACD
  34338. DACKn
  34339. (DA)
  34340.  
  34341. Figure 23.17 SRAM Bus Cycle: Basic Bus Cycle (No Wait, Address Setup/Hold Time
  34342. Insertion, AnS = 1, AnH = 1)
  34343.  
  34344. Rev. 2.0, 02/99, page 727 of 830
  34345.  
  34346. ----------------------- Page 742-----------------------
  34347.  
  34348. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  34349.  
  34350. CKIO
  34351. tAD tAD
  34352.  
  34353. A25–A5
  34354. tAD
  34355.  
  34356. A4–A0
  34357.  
  34358. tCSD tCSD
  34359.  
  34360. CSn
  34361. tRWD tRWD
  34362.  
  34363. RD/WR
  34364. tRSD
  34365. tRSD tRSD
  34366.  
  34367. RD
  34368.  
  34369. D63–D0 tRDS tRDH tRDS tRDH
  34370.  
  34371. (read)
  34372.  
  34373. tBSD tBSD
  34374.  
  34375. BS
  34376.  
  34377. RDY
  34378. tDACD tDACD
  34379. tDACD
  34380. DACKn
  34381. (SA: IO ← memory)
  34382. tDACD tDACD
  34383.  
  34384. DACKn
  34385. (DA)
  34386.  
  34387. Note: IO: DACK device
  34388. SA: Single address DMA transfer
  34389. DA: Dual address DMA transfer
  34390. DACK set to active-high
  34391.  
  34392. Figure 23.18 Burst ROM Bus Cycle (No Wait)
  34393.  
  34394. Rev. 2.0, 02/99, page 728 of 830
  34395.  
  34396. ----------------------- Page 743-----------------------
  34397.  
  34398. (
  34399. 1
  34400. s
  34401. t
  34402.  
  34403. D
  34404. a
  34405. t
  34406. a
  34407. :
  34408.  
  34409. O
  34410. n
  34411. e
  34412. T1 Tw Twe TB2 TB1 Twb TB2 TB1 Twb TB2 TB1 Twb T2
  34413.  
  34414. I
  34415. n
  34416. t CKIO
  34417. e
  34418. r
  34419. n
  34420. tAD tAD
  34421. a
  34422. l A25–A5
  34423.  
  34424. W tAD
  34425. a F
  34426. i
  34427. t i
  34428. g A4–A0
  34429. + u
  34430. O r t
  34431. e
  34432. tCSD CSD
  34433. n 2
  34434. e 3 CSn
  34435. E .
  34436. 1
  34437. x 9
  34438. tRWD tRWD
  34439. t
  34440. e
  34441. r B
  34442. RD/WR
  34443. n u
  34444. a r
  34445. t t
  34446. l
  34447. RSD RSD
  34448. s
  34449. W t RD
  34450. a R t
  34451. i O
  34452. t t RDH
  34453. t RDS t RDS
  34454. ;
  34455. RDH
  34456. M
  34457. D63–D0
  34458.  
  34459. 2
  34460. (read)
  34461. n B
  34462. d u
  34463. R /
  34464. t
  34465. 3 s
  34466. BSD
  34467. e r C
  34468. v
  34469. BS
  34470. d
  34471. . / y
  34472. t
  34473.  
  34474. RDYH
  34475. 2 4 c t
  34476. t
  34477. t t
  34478. . l
  34479. RDYS RDYS RDYH
  34480. 0 h e
  34481. ,
  34482.  
  34483. RDY
  34484. 0 D
  34485. 2 a
  34486. tRDYS tRDYH
  34487. / t
  34488. tDACD
  34489. 9 a DACKn
  34490. 9 :
  34491. , t
  34492. O
  34493. (SA: IO ← memory) DACD
  34494. p
  34495. n
  34496. t t
  34497. a
  34498. DACD DACD
  34499. g e
  34500. e I DACKn
  34501. 7 n (DA)
  34502. 2 t
  34503. e
  34504. 9 r
  34505. o n
  34506. f a
  34507. l
  34508. 8
  34509. 3 W
  34510. 0
  34511. a
  34512. i
  34513. t
  34514. )
  34515.  
  34516. ----------------------- Page 744-----------------------
  34517.  
  34518. R
  34519. e
  34520. v
  34521. .
  34522.  
  34523. 2
  34524. .
  34525. 0
  34526. ,
  34527.  
  34528. 0 (
  34529. 2 N TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  34530. / o
  34531. 9
  34532. ,9 W CKIO
  34533. p a
  34534. i
  34535. t
  34536. a
  34537. AD
  34538. t
  34539. tAD
  34540. g ,
  34541. e A
  34542. A25–A5
  34543.  
  34544. 7 d t
  34545. 3 d
  34546. AD
  34547. 0 r F
  34548. o e i A4–A0
  34549. f s g
  34550. s u
  34551. 8 S r t t
  34552. 3
  34553. CSD CSD
  34554. 0 e e
  34555. t 2
  34556. u
  34557. CSn
  34558. 3
  34559. p .
  34560. 2
  34561. t
  34562. /
  34563. tRWD RWD
  34564. H 0
  34565. o
  34566. RD/WR
  34567.  
  34568. l B
  34569. d
  34570. u
  34571. t tRSD
  34572. T
  34573. RSD
  34574. r
  34575. i s
  34576. RD
  34577. m t
  34578. e R tRDS tRDH tRDS tRDH
  34579. I O D63–D0
  34580. n M (read)
  34581. s
  34582. e
  34583. t
  34584.  
  34585. BSD
  34586. r B
  34587. tBSD
  34588. t
  34589. i u
  34590. o
  34591. BS
  34592. s
  34593. n
  34594. , C
  34595. A y
  34596. n c RDY
  34597. l
  34598. S e
  34599. t
  34600. =
  34601. tDACD DACD tDACD
  34602. DACKn
  34603. 1
  34604. , (SA: IO ← memory)
  34605.  
  34606. A
  34607. n t t
  34608. H
  34609. DACD DACD
  34610. DACKn
  34611.  
  34612. =
  34613. (DA)
  34614.  
  34615. 1
  34616. )
  34617.  
  34618. ----------------------- Page 745-----------------------
  34619.  
  34620. F
  34621. i
  34622. g
  34623. u T1 Tw Twe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe T2
  34624. r
  34625. e
  34626.  
  34627. 2
  34628. CKIO
  34629. 3
  34630. .
  34631. 2 t t
  34632. 1
  34633. AD AD
  34634.  
  34635.  
  34636. A25`A5
  34637.  
  34638. B
  34639. u t
  34640. r
  34641. AD
  34642. s A4`A0
  34643. t
  34644.  
  34645. R t t
  34646. O
  34647. CSD CSD
  34648. M
  34649. CSn
  34650.  
  34651.  
  34652. B
  34653. u
  34654. tRWD tRWD
  34655. s
  34656.  
  34657. RD/WR
  34658. C
  34659. y
  34660. c t
  34661. l
  34662. tRSD tRSD RSD
  34663. e
  34664.  
  34665. (
  34666. RD
  34667. O
  34668. n t t t t
  34669. e
  34670. RDS RDH RDS RDH
  34671. D63`D0
  34672. I
  34673. n (read)
  34674. t
  34675. e
  34676. r
  34677. t t tBSD tBSD
  34678. n
  34679. BSD BSD
  34680. a BS
  34681. R l
  34682. e W
  34683. v
  34684. . a
  34685. t t t t
  34686.  
  34687. RDYS RDYH RDYS RDYH
  34688. 2 i
  34689. t
  34690. .
  34691. ,0 + RDY
  34692.  
  34693. 0 O t t tRDYS tRDYH
  34694. 2
  34695. RDYS RDYH
  34696. / n
  34697. 9 e
  34698. 9
  34699. t t t
  34700. E
  34701. DACD DACD DACD
  34702. , DACKn
  34703. p x
  34704. t
  34705. (SA: IO ← memory)
  34706. a e
  34707. g r
  34708. e n t
  34709.  
  34710. t
  34711. a
  34712. DACD DACD
  34713. 7
  34714. 3 l
  34715. DACKn
  34716.  
  34717. 1 W (DA)
  34718. o a
  34719. f
  34720. i
  34721. 8 t
  34722. )
  34723. 3
  34724. 0
  34725.  
  34726. ----------------------- Page 746-----------------------
  34727.  
  34728. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  34729.  
  34730. R CKIO
  34731. e
  34732. v t t
  34733. . AD AD
  34734.  
  34735. 2 Row
  34736. .
  34737. BANK
  34738. ,0 F
  34739. i
  34740. 0 g
  34741. tAD
  34742. 2 u
  34743. r
  34744. Precharge-sel
  34745. /
  34746. Row H/L
  34747. 9 e
  34748. 9
  34749. , 2
  34750. p 3
  34751. .
  34752. a 2
  34753. Addr Row column
  34754. g 2
  34755. e t t
  34756.  
  34757. CSD
  34758.  
  34759. CSD
  34760. 7 S
  34761. 3
  34762. CSn
  34763. ( y
  34764. 2 R n
  34765. o C c t
  34766. h
  34767. t
  34768. f
  34769. RWD RWD
  34770. 8 D r
  34771. o
  34772. RD/WR
  34773. 3 = n
  34774. 0
  34775. 1 o t t
  34776. u
  34777. RASD RASD
  34778. ,
  34779.  
  34780. C s RAS
  34781. A D t t
  34782. R
  34783. CASD2 CASD2
  34784. S
  34785. tCASD2
  34786. L A CASS
  34787. a M
  34788. t
  34789. e A
  34790. n
  34791. t tDQMD
  34792. u
  34793. DQMD
  34794. c
  34795. y t DQMn
  34796. o
  34797. = -
  34798. P
  34799. 3 r
  34800. tRDS tRDH
  34801. ,
  34802. e D63–D0
  34803. T c d0
  34804. h
  34805. (read)
  34806. P
  34807. a
  34808. t
  34809. C
  34810. WDD
  34811. r t
  34812. g
  34813. WDD
  34814. = e D63–D0
  34815. 3 B (write)
  34816. )
  34817. u
  34818. s
  34819. tBSD tBSD
  34820.  
  34821. C
  34822. BS
  34823. y
  34824. c
  34825. l
  34826. e
  34827. :
  34828. CKE
  34829. S
  34830. i
  34831. n
  34832. g
  34833. t tDACD tDACD
  34834. l
  34835. DACD
  34836. e DACKn
  34837.  
  34838. (SA: IO ← memory)
  34839.  
  34840. Note: IO: DACK device
  34841. SA: Single address DMA transfer
  34842. DA: Dual address DMA transfer
  34843. DACK set to active-high
  34844.  
  34845. ----------------------- Page 747-----------------------
  34846.  
  34847. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  34848.  
  34849. CKIO
  34850. F t
  34851. i
  34852. AD tAD
  34853. g
  34854. u BANK Row
  34855. r
  34856. e
  34857.  
  34858. 2
  34859. tAD
  34860. 3 Precharge-sel
  34861. .
  34862. 2
  34863. Row H/L
  34864. 3
  34865.  
  34866.  
  34867.  
  34868. S Addr
  34869. y
  34870. Row c0
  34871. n
  34872. ( c t t
  34873. h
  34874. CSD
  34875. R
  34876. CSD
  34877. r
  34878. CSn
  34879. C o
  34880. D n
  34881. o t
  34882. =
  34883. t
  34884. u
  34885. RWD RWD
  34886. s
  34887. 1
  34888. RD/WR
  34889.  
  34890. , D
  34891. C R t t
  34892. A
  34893. RASD
  34894. A
  34895. RASD
  34896. S M
  34897. RAS
  34898.  
  34899. L t t
  34900. a A
  34901. CASD2 CASD2
  34902. t
  34903. t u
  34904. CASD2
  34905. e
  34906. n t
  34907. CASS
  34908. o
  34909. c -
  34910. y P
  34911. = r
  34912. t tDQMD
  34913. e
  34914. DQMD
  34915.  
  34916. 3 c DQMn
  34917. , h
  34918. T a
  34919. R P r
  34920. e g
  34921. t tRDH
  34922. C
  34923. RDS
  34924. v e D63–D0
  34925. . R
  34926. d0 d1 d2 d3
  34927. 2 = (read)
  34928. . e
  34929. 3
  34930. t
  34931. 0 a
  34932. WDD
  34933. , ) d tWDD
  34934. 0 D63–D0
  34935. 2 B (write)
  34936. / u
  34937. 9 s
  34938. 9
  34939. , C tBSD tBSD
  34940. p y BS
  34941. a c
  34942. g l
  34943. e e
  34944. :
  34945. 7 B CKE
  34946. 3
  34947. 3 u
  34948. r
  34949. o s
  34950. f t
  34951.  
  34952. 8
  34953. tDACD tDACD tDACD
  34954. 3 DACKn
  34955. 0 (SA: IO ← memory)
  34956.  
  34957. ----------------------- Page 748-----------------------
  34958.  
  34959. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  34960.  
  34961. CKIO
  34962.  
  34963. tAD tAD
  34964.  
  34965. BANK Row
  34966.  
  34967. tRWD tAD
  34968.  
  34969. Precharge-sel Row H/L
  34970.  
  34971. tRWD
  34972.  
  34973. Addr Row c0
  34974.  
  34975. tCSD tCSD
  34976.  
  34977. CSn
  34978.  
  34979. tRWD tRWD
  34980.  
  34981. RD/WR
  34982.  
  34983. tRASD tRASD
  34984.  
  34985. RAS
  34986.  
  34987. tCASD2 tCASD2 tCASD2
  34988.  
  34989. CASS
  34990.  
  34991. tDQMD tDQMD
  34992.  
  34993. DQMn
  34994.  
  34995. D63–D0 tRDS tRDH
  34996. (read) d0 d1 d2 d3
  34997.  
  34998. tWDD tWDD
  34999. D63–D0
  35000. (write)
  35001.  
  35002. tBSD tBSD
  35003.  
  35004. BS
  35005.  
  35006. CKE
  35007.  
  35008. tDACD tDACD tDACD
  35009.  
  35010. DACKn
  35011. (SA: IO ← memory)
  35012.  
  35013. Figure 23.24 Synchronous DRAM Normal Read Bus Cycle: ACT + READ Commands,
  35014. Burst (RCD = 1, CAS Latency = 3)
  35015.  
  35016. Rev. 2.0, 02/99, page 734 of 830
  35017.  
  35018. ----------------------- Page 749-----------------------
  35019.  
  35020. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35021.  
  35022. CKIO
  35023.  
  35024. tAD tAD tAD
  35025.  
  35026. BANK Row
  35027.  
  35028. tAD
  35029.  
  35030. Precharge-sel Row H/L
  35031.  
  35032. Addr Row c0
  35033.  
  35034. tCSD tCSD
  35035. CSn
  35036.  
  35037. tRWD tRWD
  35038.  
  35039. RD/WR
  35040.  
  35041. tRASD tRASD tRASD tRASD
  35042.  
  35043. RAS
  35044.  
  35045. tCASD2 tCASD2 tCASD2
  35046.  
  35047. CASS
  35048.  
  35049. tDQMD tDQMD
  35050.  
  35051. DQMn
  35052.  
  35053. D63–D0 tRDS tRDH
  35054.  
  35055. (read) d0 d1 d2 d3
  35056.  
  35057. tWDD tWDD
  35058. D63–D0
  35059. (write)
  35060.  
  35061. tBSD tBSD
  35062.  
  35063. BS
  35064.  
  35065. CKE
  35066.  
  35067. tDACD tDACD tDACD
  35068. DACKn
  35069. (SA: IO ← memory)
  35070.  
  35071. Figure 23.25 Synchronous DRAM Normal Read Bus Cycle: PRE + ACT + READ
  35072. Commands, Burst (TPC = 1, RCD = 1, CAS Latency = 3)
  35073.  
  35074. Rev. 2.0, 02/99, page 735 of 830
  35075.  
  35076. ----------------------- Page 750-----------------------
  35077.  
  35078. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35079.  
  35080. CKIO
  35081.  
  35082. tAD tAD
  35083.  
  35084. BANK Row
  35085.  
  35086. Precharge-sel H/L
  35087.  
  35088. Addr
  35089. c0
  35090.  
  35091. tCSD tCSD
  35092.  
  35093. CSn
  35094.  
  35095. tRWD tRWD
  35096.  
  35097. RD/WR
  35098.  
  35099. tRASD tRASD
  35100.  
  35101. RAS
  35102.  
  35103. tCASD2 tCASD2
  35104.  
  35105. CASS
  35106.  
  35107. tDQMD tDQMD
  35108.  
  35109. DQMn
  35110.  
  35111. D63–D0 tRDS tRDH
  35112.  
  35113. (read) d0 d1 d2 d3
  35114.  
  35115. tWDD tWDD
  35116. D63–D0
  35117. (write)
  35118.  
  35119. tBSD tBSD
  35120.  
  35121. BS
  35122.  
  35123. CKE
  35124.  
  35125. tDACD tDACD tDACD
  35126.  
  35127. DACKn
  35128. (SA: IO ← memory)
  35129.  
  35130. Figure 23.26 Synchronous DRAM Normal Read Bus Cycle: READ Command, Burst
  35131. (CAS Latency = 3)
  35132.  
  35133. Rev. 2.0, 02/99, page 736 of 830
  35134.  
  35135. ----------------------- Page 751-----------------------
  35136.  
  35137. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  35138.  
  35139. CKIO
  35140.  
  35141. tAD tAD
  35142.  
  35143. BANK Row
  35144.  
  35145. tAD
  35146. Precharge-sel Row H/L
  35147.  
  35148. Addr Row column
  35149.  
  35150. tCSD tCSD
  35151.  
  35152. CSn
  35153.  
  35154. tRWD tRWD
  35155.  
  35156. RD/WR
  35157.  
  35158. tRASD tRASD
  35159.  
  35160. RAS
  35161.  
  35162. tCASD2 tCASD2
  35163. tCASD2
  35164.  
  35165. CASS
  35166.  
  35167. tDQMD tDQMD
  35168.  
  35169. DQMn
  35170.  
  35171. tWDD
  35172. tWDD tWDD
  35173. D63–D0
  35174. c0
  35175. (write)
  35176.  
  35177. tBSD tBSD
  35178. BS
  35179.  
  35180. CKE
  35181. tDACD tDACD
  35182. DACKn
  35183. (SA: IO → memory)
  35184.  
  35185. Figure 23.27 Synchronous DRAM Auto-Precharge Write Bus Cycle: Single
  35186. (RCD = 1, TRWL = 2, TPC = 1)
  35187.  
  35188. Rev. 2.0, 02/99, page 737 of 830
  35189.  
  35190. ----------------------- Page 752-----------------------
  35191.  
  35192. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  35193.  
  35194. CKIO
  35195.  
  35196. tAD tAD
  35197.  
  35198. BANK Row
  35199.  
  35200. tAD
  35201. Precharge-sel Row H/L
  35202.  
  35203. Addr Row c0
  35204.  
  35205. tCSD tCSD
  35206.  
  35207. CSn
  35208.  
  35209. tRWD tRWD
  35210.  
  35211. RD/WR
  35212.  
  35213. tRASD tRASD
  35214.  
  35215. RAS
  35216.  
  35217. tCASD2 tCASD2
  35218. tCASD2
  35219.  
  35220. CASS
  35221.  
  35222. tDQMD tDQMD
  35223.  
  35224. DQMn
  35225.  
  35226. tWDD
  35227. tWDD tWDD
  35228. D63–D0
  35229. d0 d1 d2 d3
  35230. (write)
  35231.  
  35232. tBSD tBSD
  35233. BS
  35234.  
  35235. CKE
  35236. tDACD tDACD
  35237. DACKn
  35238. (SA: IO → memory)
  35239.  
  35240. Figure 23.28 Synchronous DRAM Auto-Precharge Write Bus Cycle: Burst
  35241. (RCD = 1, TRWL = 2, TPC = 1)
  35242.  
  35243. Rev. 2.0, 02/99, page 738 of 830
  35244.  
  35245. ----------------------- Page 753-----------------------
  35246.  
  35247. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  35248.  
  35249. CKIO
  35250.  
  35251. tAD tAD
  35252.  
  35253. BANK Row
  35254.  
  35255. tAD
  35256.  
  35257. Precharge-sel Row H/L
  35258.  
  35259. Addr Row c0
  35260.  
  35261. tCSD tCSD
  35262.  
  35263. CSn
  35264.  
  35265. tRWD tRWD
  35266.  
  35267. RD/WR
  35268.  
  35269. tRASD tRASD
  35270.  
  35271. RAS
  35272.  
  35273. tCASD2 tCASD2
  35274. tCASD2
  35275.  
  35276. CASS
  35277.  
  35278. tDQMD tDQMD
  35279.  
  35280. DQMn
  35281.  
  35282. tWDD
  35283. tWDD tWDD
  35284. D63–D0
  35285. d0 d1 d2 d3
  35286. (write)
  35287.  
  35288. tBSD tBSD
  35289. BS
  35290.  
  35291. CKE
  35292.  
  35293. tDACD tDACD
  35294.  
  35295. DACKn
  35296. (SA: IO → memory)
  35297.  
  35298. Figure 23.29 Synchronous DRAM Normal Write Bus Cycle: ACT + WRITE Commands,
  35299. Burst (RCD = 1, TRWL = 2)
  35300.  
  35301. Rev. 2.0, 02/99, page 739 of 830
  35302.  
  35303. ----------------------- Page 754-----------------------
  35304.  
  35305. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  35306.  
  35307. CKIO
  35308.  
  35309. tAD tAD tAD
  35310.  
  35311. BANK Row Row
  35312.  
  35313. tAD
  35314. Precharge-sel H/L Row H/L
  35315.  
  35316. Addr Row c0
  35317.  
  35318. tCSD tCSD
  35319.  
  35320. CSn
  35321.  
  35322. tRWD tRWD tRWD tRWD
  35323.  
  35324. RD/WR
  35325.  
  35326. tRASD tRASD tRASD tRASD
  35327.  
  35328. RAS
  35329.  
  35330. tCASD2 tCASD2
  35331. tCASD2
  35332.  
  35333. CASS
  35334.  
  35335. tDQMD tDQMD
  35336.  
  35337. DQMn
  35338.  
  35339. tWDD
  35340. tWDD tWDD
  35341. D63–D0
  35342. (write) d0 d1 d2 d3
  35343.  
  35344. tBSD tBSD
  35345. BS
  35346.  
  35347. CKE
  35348. tDACD tDACD tDACD
  35349.  
  35350. DACKn
  35351. (SA: IO → memory)
  35352.  
  35353. Figure 23.30 Synchronous DRAM Normal Write Bus Cycle: PRE + ACT + WRITE
  35354. Commands, Burst (TPC = 1, RCD = 1, TRWL = 2)
  35355.  
  35356. Rev. 2.0, 02/99, page 740 of 830
  35357.  
  35358. ----------------------- Page 755-----------------------
  35359.  
  35360. Tnop (Tnop) Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  35361.  
  35362. CKIO
  35363.  
  35364. tAD tAD
  35365.  
  35366. BANK Row
  35367.  
  35368. Precharge-sel H/L
  35369.  
  35370. Addr c0
  35371.  
  35372. tCSD tCSD
  35373.  
  35374. CSn
  35375.  
  35376. tRWD tRWD
  35377.  
  35378. RD/WR
  35379.  
  35380. RAS
  35381.  
  35382. tCASD2 tCASD2
  35383.  
  35384. CASS
  35385.  
  35386. tDQMD tDQMD
  35387.  
  35388. DQMn
  35389.  
  35390. tWDD
  35391. tWDD tWDD
  35392. D63–D0
  35393. d0 d1 d2 d3
  35394. (write)
  35395.  
  35396. tBSD tBSD
  35397. BS
  35398.  
  35399. CKE
  35400. tDACD SA-DMA tDACD
  35401.  
  35402. DACKn
  35403. (SA: IO → memory)
  35404.  
  35405. Normal write
  35406.  
  35407. Note: In the case of SA-DMA only, the (Tnop) cycle is inserted, and the DACKn signal is output as shown
  35408. by the solid line. In a normal write, the (Tnop) cycle is omitted and the DACKn signal is output as
  35409. shown by the dotted line.
  35410.  
  35411. Figure 23.31 Synchronous DRAM Normal Write Bus Cycle: WRITE Command, Burst
  35412. (TRWL = 2)
  35413.  
  35414. Rev. 2.0, 02/99, page 741 of 830
  35415.  
  35416. ----------------------- Page 756-----------------------
  35417.  
  35418. Tpr Tpc
  35419.  
  35420. CKIO
  35421.  
  35422. tAD tAD
  35423.  
  35424. BANK Row
  35425.  
  35426. Precharge-sel H/L
  35427.  
  35428. Addr
  35429.  
  35430. tCSD tCSD
  35431.  
  35432. CSn
  35433.  
  35434. tRWD tRWD
  35435.  
  35436. RD/WR
  35437.  
  35438. tRASD tRASD
  35439.  
  35440. RAS
  35441.  
  35442. tCASD2 tCASD2
  35443.  
  35444. CASS
  35445.  
  35446. tDQMD tDQMD
  35447.  
  35448. DQMn
  35449.  
  35450. tWDD tWDD
  35451. D63–D0
  35452. (write)
  35453.  
  35454. tBSD
  35455. BS
  35456.  
  35457. CKE
  35458.  
  35459. tDACD tDACD
  35460.  
  35461. DACKn
  35462.  
  35463. Figure 23.32 Synchronous DRAM Bus Cycle: Synchronous DRAM Precharge Command
  35464. (TPC = 1)
  35465.  
  35466. Rev. 2.0, 02/99, page 742 of 830
  35467.  
  35468. ----------------------- Page 757-----------------------
  35469.  
  35470. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  35471.  
  35472. CKIO
  35473.  
  35474. tAD tAD
  35475.  
  35476. BANK
  35477.  
  35478. Precharge-sel
  35479.  
  35480. Addr
  35481.  
  35482. tCSD tCSD tCSD tCSD
  35483.  
  35484. CSn
  35485.  
  35486. tRWD tRWD
  35487.  
  35488. RD/WR
  35489.  
  35490. tRASD tRASD tRASD tRASD
  35491.  
  35492. RAS
  35493.  
  35494. tCASD2 tCASD2 tCASD2 tCASD2
  35495.  
  35496. CASS
  35497.  
  35498. tDQMD tDQMD
  35499. DQMn
  35500.  
  35501. tWDD tWDD
  35502. D63–D0
  35503. (write)
  35504.  
  35505. tBSD
  35506.  
  35507. BS
  35508.  
  35509. CKE
  35510. tDACD tDACD
  35511.  
  35512. DACKn
  35513.  
  35514. Figure 23.33 Synchronous DRAM Bus Cycle: Synchronous DRAM Auto-Refresh
  35515. (TRAS = 1, TRC = 1)
  35516.  
  35517. Rev. 2.0, 02/99, page 743 of 830
  35518.  
  35519. ----------------------- Page 758-----------------------
  35520.  
  35521. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  35522.  
  35523. CKIO
  35524.  
  35525. tAD tAD
  35526.  
  35527. BANK
  35528.  
  35529. Precharge-sel
  35530.  
  35531. Addr
  35532.  
  35533. tCSD
  35534. tCSD tCSD tCSD
  35535.  
  35536. CSn
  35537.  
  35538. tRWD tRWD
  35539.  
  35540. RD/WR
  35541.  
  35542. tRASD
  35543. tRASD tRASD tRASD
  35544.  
  35545. RAS
  35546.  
  35547. tCASD2
  35548. tCASD2 tCASD2 tCASD2
  35549.  
  35550. CASS
  35551.  
  35552. tDQMD tDQMD
  35553. DQMn
  35554.  
  35555. tWDD tWDD
  35556.  
  35557. D63–D0
  35558. (write)
  35559.  
  35560. tBSD
  35561.  
  35562. BS
  35563.  
  35564. tCKED tCKED
  35565.  
  35566. CKE
  35567.  
  35568. tDACD tDACD
  35569.  
  35570. DACKn
  35571.  
  35572. Figure 23.34 Synchronous DRAM Bus Cycle: Synchronous DRAM Self-Refresh (TRC = 1)
  35573.  
  35574. Rev. 2.0, 02/99, page 744 of 830
  35575.  
  35576. ----------------------- Page 759-----------------------
  35577.  
  35578. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  35579.  
  35580. CKIO
  35581.  
  35582. tAD tAD tAD
  35583.  
  35584. BANK
  35585.  
  35586. Precharge-sel
  35587.  
  35588. Addr
  35589.  
  35590. tCSD tCSD tCSD
  35591.  
  35592. CSn
  35593.  
  35594. tRWD tRWD tRWD
  35595.  
  35596. RD/WR
  35597.  
  35598. tRASD tRASD tRASD
  35599.  
  35600. RAS
  35601.  
  35602. tCASD2 tCASD2 tCASD2 tCASD2
  35603.  
  35604. CASS
  35605.  
  35606. tDQMD tDQMD
  35607.  
  35608. DQMn
  35609.  
  35610. tWDD tWDD
  35611. D63–D0
  35612. (write)
  35613.  
  35614. tBSD
  35615.  
  35616. BS
  35617.  
  35618. CKE
  35619.  
  35620. tDACD tDACD
  35621.  
  35622. DACKn
  35623.  
  35624. Figure 23.35 (a) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  35625. Setting (PALL)
  35626.  
  35627. Rev. 2.0, 02/99, page 745 of 830
  35628.  
  35629. ----------------------- Page 760-----------------------
  35630.  
  35631. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  35632.  
  35633. CKIO
  35634.  
  35635. tAD tAD tAD
  35636.  
  35637. BANK
  35638.  
  35639. Precharge-sel
  35640.  
  35641. Addr
  35642.  
  35643. tCSD tCSD tCSD
  35644.  
  35645. CSn
  35646.  
  35647. tRWD tRWD tRWD
  35648.  
  35649. RD/WR
  35650.  
  35651. tRASD tRASD tRASD
  35652.  
  35653. RAS
  35654.  
  35655. tCASD2 tCASD2 tCASD2 tCASD2
  35656.  
  35657. CASS
  35658.  
  35659. tDQMD tDQMD
  35660.  
  35661. DQMn
  35662.  
  35663. tWDD tWDD
  35664. D63–D0
  35665. (write)
  35666.  
  35667. tBSD
  35668.  
  35669. BS
  35670.  
  35671. CKE
  35672.  
  35673. tDACD tDACD
  35674.  
  35675. DACKn
  35676.  
  35677. Figure 23.35 (b) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  35678. Setting (SET)
  35679.  
  35680. Rev. 2.0, 02/99, page 746 of 830
  35681.  
  35682. ----------------------- Page 761-----------------------
  35683.  
  35684. Tr1 Tr2 Tc1 Tc2 Tpc Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  35685.  
  35686. CKIO
  35687.  
  35688. tAD tAD tAD tAD tAD tAD
  35689.  
  35690. A25–A0 Row column Row column
  35691. (
  35692. (
  35693. 1
  35694. )
  35695.  
  35696. t tCSD tCSD tCSD
  35697. R
  35698. CSD
  35699. C
  35700. CSn
  35701. D t t
  35702.  
  35703. tRWD tRWD RWD RWD
  35704. =
  35705.  
  35706. 0
  35707. RD/WR
  35708. ,
  35709.  
  35710. A t t t tRASD t tRASD
  35711. n
  35712. RASD RASD RASD RASD
  35713. W F RAS
  35714. i
  35715. g
  35716. = u
  35717. r
  35718. 0
  35719. t t t t t t
  35720. e
  35721. CASD1 CASD1 CASD1 CASD1 CASD1 CASD1
  35722. ,
  35723.  
  35724. T 2
  35725. CASn
  35726. 3
  35727. P .
  35728. C 3
  35729. 6
  35730.  
  35731. t t t t
  35732. =
  35733. RDS RDH RDS RDH
  35734.  
  35735. D63–D0
  35736.  
  35737. 1 D (read)
  35738. ; R
  35739. (
  35740. A
  35741. t t
  35742. 2
  35743. WDD WDD
  35744. ) M tWDD tWDD tWDD tWDD
  35745. R D63–D0
  35746. C B (write)
  35747. D u
  35748. s
  35749. R = C
  35750. 1 y
  35751. t t tBSD tBSD
  35752. e
  35753. BSD BSD
  35754. , c
  35755. v
  35756. BS
  35757. . A l
  35758. e
  35759. 2 n s
  35760. ,0. W t t t t t t
  35761.  
  35762. DACD DACD DACD DACD DACD DACD
  35763. 0 = DACKn
  35764. 2
  35765. / 1 (SA: IO ← memory)
  35766. 9 ,
  35767. ,9 T
  35768. p P
  35769. C
  35770. t t t
  35771. a
  35772. DACD DACD DACD tDACD tDACD tDACD
  35773. g DACKn
  35774. e = (SA: IO → memory)
  35775. 7 2
  35776. 4 )
  35777. 7
  35778.  
  35779. o
  35780. f
  35781.  
  35782. 8
  35783. 3 Note: IO: DACK device (2)
  35784. 0
  35785. (1)
  35786. SA: Single address DMA transfer
  35787. DA: Dual address DMA transfer
  35788. DACK set to active-high
  35789.  
  35790. ----------------------- Page 762-----------------------
  35791.  
  35792. T1r Tr2 Tc1 Tc2 Tce Tpc
  35793.  
  35794. CKIO
  35795.  
  35796. tAD tAD tAD
  35797.  
  35798. A25–A0 Row column
  35799.  
  35800. tCSD tCSD
  35801.  
  35802. CSn
  35803.  
  35804. tRWD tRWD
  35805.  
  35806. RD/WR
  35807.  
  35808. tRASD tRASD tRASD
  35809. RAS
  35810.  
  35811. tCASD1 tCASD1 tCASD1
  35812. CASn
  35813.  
  35814. tRDS tRDH
  35815. D63–D0
  35816. (read)
  35817.  
  35818. tWDD
  35819. D63–D0
  35820. (write)
  35821.  
  35822. tBSD tBSD
  35823.  
  35824. BS
  35825.  
  35826. tDACD tDACD
  35827. DACKn
  35828. (SA: IO ← memory)
  35829.  
  35830. Figure 23.37 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  35831.  
  35832. Rev. 2.0, 02/99, page 748 of 830
  35833.  
  35834. ----------------------- Page 763-----------------------
  35835.  
  35836. F
  35837. T1r Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  35838. i
  35839. g
  35840. u CKIO
  35841. r
  35842. e
  35843.  
  35844. 2 t t t t
  35845. 3
  35846. AD AD AD AD
  35847. .
  35848. 3 A25–A0 Row c0 c1 c2 c3
  35849. 8
  35850.  
  35851.  
  35852.  
  35853. D tCSD tCSD
  35854. R
  35855. A
  35856. CSn
  35857. M
  35858.  
  35859. B
  35860. u
  35861. tRWD tRWD
  35862. r
  35863. s RD/WR
  35864. t
  35865.  
  35866. B
  35867. u
  35868. s
  35869. tRASD tRASD tRASD
  35870.  
  35871. C RAS
  35872. y
  35873. c
  35874. l
  35875. e
  35876.  
  35877. (
  35878. E
  35879. tRWD tCASD1 tCASD1 tCASD1 tCASD1
  35880. D
  35881. CASn
  35882. O
  35883.  
  35884. M
  35885. o
  35886. d
  35887. D63–D0 tRDS tRDH tRDS tRDH
  35888. e
  35889. , (read) d0 d1 d2 d3
  35890. R R
  35891. e
  35892. v. C tWDD
  35893. 2 D
  35894. 0. = D63–D0
  35895. ,
  35896. 0
  35897. 0
  35898. (write)
  35899. ,
  35900. 2 A
  35901. /
  35902. 9 n
  35903. ,9 W tBSD tBSD tBSD tBSD
  35904. p
  35905. a = BS
  35906. g 0
  35907. e ,
  35908.  
  35909. 7 T
  35910. 4 P
  35911. 9
  35912. C t t t
  35913. o
  35914. DACD DACD DACD
  35915. DACKn
  35916. f =
  35917. 8
  35918. (SA: IO ← memory)
  35919. 3 1
  35920. )
  35921. 0
  35922.  
  35923. ----------------------- Page 764-----------------------
  35924.  
  35925. R
  35926. e F
  35927. i
  35928. v. g
  35929. u
  35930. 2. r
  35931. 0 e
  35932. , 2 Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tce Tpc
  35933. 0 3
  35934. 2 .
  35935. / 3 CKIO
  35936. 9 9
  35937. 9
  35938. ,
  35939. t t
  35940.  
  35941. AD AD t
  35942.  
  35943. AD
  35944. p D
  35945. a R A25–A0 Row c0 c1 c2 c3
  35946. g
  35947. e A t t
  35948. M
  35949. CSD CSD
  35950.  
  35951. 7
  35952. 5
  35953. CSn
  35954. 0 B
  35955. o u t t
  35956. r
  35957. RWD RWD
  35958. f
  35959. s
  35960. 8 t
  35961. 3
  35962. RD/WR
  35963. 0 B
  35964. u
  35965. tRASD t
  35966. s
  35967. tRASD RASD
  35968.  
  35969. C RAS
  35970. y
  35971. c
  35972. l
  35973. e
  35974. tCASD1
  35975.  
  35976. t t t t t
  35977. (
  35978. CASD1 CASD1 CASD1 CASD1 CASD1
  35979. E CASn
  35980. D
  35981. O
  35982.  
  35983. M D63–D0 tRDS tRDH tRDS tRDH
  35984. o
  35985. (read) d0 d1 d2 d3
  35986. d
  35987. e
  35988. , t
  35989. WDD
  35990. R D63–D0
  35991. C (write)
  35992. D
  35993.  
  35994. =
  35995. tBSD tBSD
  35996.  
  35997. 1 BS
  35998. ,
  35999.  
  36000. A
  36001. n t t
  36002. W
  36003. DACD DACD tDACD
  36004.  
  36005. DACKn
  36006. = (SA: IO ← memory)
  36007.  
  36008. 1
  36009. ,
  36010.  
  36011. T
  36012. P
  36013. C
  36014.  
  36015. =
  36016.  
  36017. 1
  36018. )
  36019.  
  36020. ----------------------- Page 765-----------------------
  36021.  
  36022. F
  36023. i
  36024. g
  36025. u
  36026. r
  36027. e
  36028.  
  36029. 2
  36030. 3
  36031. .
  36032. 4
  36033. 0
  36034.  
  36035.  
  36036.  
  36037. D
  36038. R Tcw Tc2 Tcnw Tc1 Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tce Tpc
  36039. A
  36040. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw
  36041. M CKIO
  36042.  
  36043. B
  36044. tAD tAD tAD
  36045. u A25–A0 row c0 c1 c2 c3
  36046. r
  36047. s
  36048. t
  36049.  
  36050. tCSD
  36051. B
  36052. tCSD
  36053. CSn
  36054. u
  36055. s
  36056. C C
  36057. A
  36058. tRWD tRWD
  36059. y
  36060. S c
  36061. RD/WR
  36062. l
  36063. N e tRASD
  36064. e
  36065. t
  36066. ( t RASD
  36067. g E
  36068. RASD
  36069. RAS
  36070. a D
  36071. t
  36072. e O
  36073. P
  36074. tCASD1 tCASD1 tCASD1 tCASD1 t
  36075. M
  36076. CASD1
  36077. u CASn
  36078. l o
  36079. s
  36080. e d
  36081. e
  36082. W , D63–D0 tRDS tRDH tRDS tRDH
  36083. i R (read) d0 d1 d2 d3
  36084. d C
  36085. t
  36086. R h D
  36087. tWDD
  36088. D63–D0
  36089. e )
  36090. v = (write)
  36091. .
  36092. 1
  36093. 2 , t t
  36094. .
  36095. BSD BSD
  36096. ,0 A BS
  36097. n
  36098. 0 W
  36099. 2 t
  36100. /
  36101. DACD
  36102. 9
  36103. tDACD
  36104. =
  36105. DACKn tDACD
  36106. 9
  36107. , 1 (SA: IO ← memory)
  36108. p ,
  36109. a T
  36110. g P
  36111. e
  36112. 7 C
  36113. 5 =
  36114. 1
  36115. 1
  36116. o ,
  36117. f 2
  36118. 8 -
  36119. 3 C
  36120. 0 y
  36121. c
  36122. l
  36123. e
  36124.  
  36125. ----------------------- Page 766-----------------------
  36126.  
  36127. R
  36128. e
  36129. v
  36130. .
  36131.  
  36132. 2
  36133. .
  36134. 0
  36135. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  36136. ,
  36137.  
  36138. 0
  36139. 2 F
  36140. CKIO
  36141. / i
  36142. 9 g
  36143. ,9 u t t t t
  36144. r
  36145. AD AD AD AD
  36146. p e
  36147. a Row c0 c1 c2 c3
  36148. 2
  36149. A25–A0
  36150. g
  36151. e 3
  36152. .
  36153. t
  36154. 4
  36155. CSD
  36156. 7
  36157. 1
  36158. t
  36159. 5
  36160. CSD
  36161.  
  36162. 2 CSn
  36163. o ( D
  36164. f E R
  36165. 8 D A
  36166. 3
  36167. O
  36168. t t
  36169. 0 M
  36170. RWD RWD
  36171.  
  36172. M
  36173. RD/WR
  36174. B
  36175. o u
  36176. d r
  36177. e s
  36178. tRASD tRASD
  36179. , t
  36180.  
  36181. R B RAS
  36182. C u
  36183. D s
  36184. C
  36185. tCASD1
  36186.  
  36187. tCASD1 tCASD1 tCASD1 t
  36188. =
  36189. CASD1
  36190. y
  36191. 0 c
  36192. CASn
  36193. l
  36194. , e
  36195. A :
  36196. n R
  36197. W
  36198. t t t t
  36199. A
  36200. D63–D0 RDS RDH RDS RDH
  36201. S (read) d0 d1 d2 d3
  36202. =
  36203. 0 D tWDD
  36204. ) o
  36205. w D63–D0
  36206. n (write)
  36207.  
  36208. M tBSD tBSD tBSD tBSD
  36209. o
  36210. d BS
  36211. e
  36212.  
  36213. S
  36214. t
  36215. a
  36216. t t t t
  36217. e
  36218. DACD DACD DACD
  36219. DACKn
  36220. (SA: IO ← memory)
  36221.  
  36222. ----------------------- Page 767-----------------------
  36223.  
  36224. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  36225.  
  36226. F CKIO
  36227. i
  36228. g
  36229. u
  36230. r
  36231. e
  36232. tAD tAD tAD
  36233.  
  36234. 2 c0 c1 c2 c3
  36235. 3
  36236. A25–A0
  36237. .
  36238. 4
  36239. 2
  36240. tCSD
  36241.  
  36242. t
  36243.  
  36244. CSD
  36245. D
  36246. R
  36247. CSn
  36248. ( A
  36249. E M
  36250. D
  36251. t t
  36252. B
  36253. RWD RWD
  36254. O u
  36255.  
  36256. RD/WR
  36257. M r
  36258. s
  36259. t
  36260. o
  36261. RAS-down
  36262. d B mode ended
  36263. e u
  36264. tRASD
  36265. , s
  36266. R C RAS
  36267. C y
  36268. c
  36269. t
  36270. D
  36271. CASD1
  36272. l
  36273. e
  36274. t t t t
  36275. =
  36276. CASD1 CASD1 CASD1 CASD1
  36277. :
  36278.  
  36279. 0 R CASn
  36280. , A
  36281. A S
  36282. n
  36283. R W D
  36284. o
  36285. D63–D0 tRDS tRDH tRDS tRDH
  36286. e = w (read)
  36287. v. 0 n d0 d1 d2 d3
  36288. 2 ) M
  36289. tWDD
  36290. .
  36291. ,0 o D63–D0
  36292. 0 d
  36293. e (write)
  36294. 2
  36295. / C
  36296. 9
  36297. 9 o
  36298. tBSD tBSD tBSD tBSD
  36299. , n
  36300. p t
  36301. i BS
  36302. a n
  36303. g u
  36304. e a
  36305. 7 t
  36306. i
  36307. 5 o t t
  36308. 3 n
  36309. DACD DACD
  36310.  
  36311. o
  36312. DACKn
  36313. f
  36314. (SA: IO ← memory)
  36315. 8
  36316. 3
  36317. 0
  36318.  
  36319. ----------------------- Page 768-----------------------
  36320.  
  36321. F
  36322. R i
  36323. g
  36324. e u Tc2 Tc1 Tc2 Tpc
  36325. v
  36326. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1
  36327. . r
  36328. e
  36329. 2
  36330. . 2 CKIO
  36331. 0 3
  36332. , .
  36333. 0 4
  36334. 2 3 tAD tAD tAD
  36335. /
  36336. 9
  36337. 9 D
  36338. A25–A0 Row c0 c1 c2 c3
  36339. , R
  36340. p
  36341. a A t t
  36342. g M
  36343. CSD CSD
  36344. e CSn
  36345.  
  36346. 7 B
  36347. 5 u
  36348. 4 r
  36349. s
  36350. t t
  36351. o
  36352. RWD RWD
  36353. t
  36354. f
  36355. B
  36356. RD/WR
  36357. 8
  36358. 3 u
  36359. 0 s
  36360.  
  36361. C
  36362. tRASD tRASD tRASD
  36363. y
  36364. c
  36365. l
  36366. RAS
  36367. e
  36368.  
  36369. (
  36370. F tCASD1 t t t t
  36371. a
  36372. CASD1 CASD1 CASD1 CASD1
  36373. s
  36374. t
  36375. CASn
  36376.  
  36377. P
  36378. a
  36379. g
  36380. e
  36381. D63–D0 tRDS tRDH tRDS tRDH
  36382.  
  36383. M (read) d0 d1 d2 d3
  36384. o
  36385. tWDD
  36386. d
  36387. e
  36388. tWDD tWDD tWDD
  36389. ,
  36390. D63–D0
  36391. R (write) d0 d1 d2 d3
  36392. C
  36393. D
  36394.  
  36395. =
  36396. tBSD tBSD
  36397.  
  36398. 0
  36399. , BS
  36400.  
  36401. A
  36402. n
  36403. W tDACD tDACD tDACD
  36404.  
  36405. =
  36406. DACKn
  36407.  
  36408. 0
  36409. (SA: IO ← memory)
  36410. ,
  36411.  
  36412. T tDACD tDACD t
  36413. P
  36414. DACD
  36415. C DACKn
  36416. (SA: IO → memory)
  36417. =
  36418.  
  36419. 1
  36420. )
  36421.  
  36422. ----------------------- Page 769-----------------------
  36423.  
  36424. F
  36425. i
  36426. g
  36427. u
  36428. r
  36429. e
  36430.  
  36431. 2
  36432. 3
  36433. .
  36434. 4
  36435. 4 Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tpc
  36436.  
  36437.  
  36438.  
  36439. D CKIO
  36440. R
  36441. A tAD tAD tAD
  36442. M A25–A0 Row c0 c1 c2 c3
  36443.  
  36444. B
  36445. u
  36446. tCSD tCSD
  36447. r
  36448. s
  36449. CSn
  36450. t
  36451.  
  36452. B t t
  36453. u
  36454. RWD RWD
  36455. s RD/WR
  36456.  
  36457. C t
  36458. y
  36459. RASD t
  36460. c
  36461. tRASD RASD
  36462. l
  36463. e RAS
  36464.  
  36465. (
  36466. F t
  36467. a
  36468. CASD1 tCASD1 tCASD1 tCASD1 tCASD1
  36469. s
  36470. t
  36471. CASn
  36472.  
  36473. P
  36474. a t
  36475. g
  36476. D63–D0 tRDS tRDH tRDS RDH
  36477. e
  36478. (read) d0 d1 d2 d3
  36479. M
  36480. tWDD
  36481. o
  36482. tWDD tWDD t
  36483. d
  36484. WDD
  36485. R
  36486. D63–D0
  36487. e
  36488. d0 d1 d2 d3
  36489. e
  36490. (write)
  36491. ,
  36492.  
  36493. v. R
  36494. 2 C
  36495. tBSD tBSD
  36496. 0. D BS
  36497. ,
  36498. 0 = t
  36499. 2
  36500. DACD
  36501. / 1 t tDACD
  36502. 9 ,
  36503. DACD
  36504.  
  36505. A
  36506. DACKn
  36507. 9
  36508. , n (SA: IO ← memory)
  36509. p W tDACD
  36510. a
  36511. tDACD tDACD
  36512. g
  36513. e =
  36514. DACKn
  36515. (SA: IO → memory)
  36516. 7 1
  36517. 5 ,
  36518. 5 T
  36519. o P
  36520. f C
  36521. 8
  36522. 3 =
  36523. 0
  36524. 1
  36525. )
  36526.  
  36527. ----------------------- Page 770-----------------------
  36528.  
  36529. R (
  36530. e F
  36531. v. a
  36532. s
  36533. 2 t
  36534. .
  36535. 0 P
  36536. , a
  36537. 0 g
  36538. 2 e
  36539. /
  36540. 9 M
  36541. 9
  36542. , o
  36543.  
  36544. Tc1 Tcw Tc2 Tcnw Tcnw Tc1
  36545. d
  36546. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcw Tc2 Tcnw Tpc
  36547. p
  36548. a e
  36549. , CKIO
  36550. g
  36551. e R
  36552.  
  36553. t t t
  36554. C
  36555. AD AD AD
  36556. 7
  36557. 5 D
  36558. A25–A0
  36559. F
  36560. Row c0 c1 c2 c3
  36561. 6 i
  36562. o = g t tCSD
  36563. u
  36564. CSD
  36565. f 1 CSn
  36566. 8 , r
  36567. 3 A e
  36568. 0 2
  36569. t t
  36570. n
  36571. RWD RWD
  36572. 3
  36573. W
  36574. RD/WR
  36575. .
  36576. 4
  36577. 5
  36578. t
  36579. =
  36580. RASD t
  36581.  
  36582. t RASD
  36583.  
  36584.  
  36585. RASD
  36586.  
  36587. 1 D RAS
  36588. ,
  36589. T R t t t
  36590. A
  36591. CASD1 t CASD1 t CASD1
  36592. P
  36593. CASD1 CASD1
  36594. C M
  36595. CASn
  36596.  
  36597. = B D63–D0 tRDS tRDH tRDS tRDH
  36598. 1 u
  36599. ,
  36600. (read) d0 d1 d2 d3
  36601. r t
  36602. 2
  36603. WDD
  36604. s
  36605. t
  36606. t t
  36607. - WDD WDD t
  36608. C
  36609. WDD
  36610. B
  36611. D63–D0
  36612. d0 d1 d2 d3
  36613. y u (write)
  36614. c s
  36615. l
  36616. e C
  36617. tBSD tBSD
  36618.  
  36619. C y BS
  36620. A c
  36621. l
  36622. tDACD
  36623. S e t t
  36624.  
  36625. DACD DACD
  36626. N
  36627. DACKn
  36628. e (SA: IO ← memory)
  36629. g
  36630. tDACD t t
  36631. a
  36632. DACD DACD
  36633. t DACKn
  36634. e
  36635. (SA: IO → memory)
  36636. P
  36637. u
  36638. l
  36639. s
  36640. e
  36641.  
  36642. W
  36643. i
  36644. d
  36645. t
  36646. h
  36647. )
  36648.  
  36649. ----------------------- Page 771-----------------------
  36650.  
  36651. F
  36652. i
  36653. g
  36654. u
  36655. r
  36656. e
  36657.  
  36658. 2
  36659. 3
  36660. .
  36661. 4
  36662. 6
  36663. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  36664.  
  36665.  
  36666.  
  36667. D CKIO
  36668. R
  36669. A
  36670. tAD tAD tAD tAD
  36671. M A25–A0 Row c0 c1 c2 c3
  36672.  
  36673. B
  36674. u
  36675. tCSD tCSD tCSD
  36676. r
  36677. s CSn
  36678. t
  36679.  
  36680. B
  36681. u
  36682. tRWD tRWD tRWD
  36683. s
  36684. RD/WR
  36685. C
  36686. y
  36687. c
  36688. tRASD
  36689. l t
  36690. e
  36691. RASD
  36692. :
  36693.  
  36694. R
  36695. RAS
  36696. A
  36697. n A
  36698. S
  36699. t t t t t
  36700. W
  36701. CASD1 CASD1 CASD1 CASD1 CASD1
  36702.  
  36703. D
  36704. CASn
  36705.  
  36706. = o
  36707. 0 w
  36708. ) n
  36709. D63–D0 tRDS tRDH tRDS tRDH
  36710.  
  36711. M (read) t d0 d1 d2 d3
  36712. o
  36713. WDD
  36714. d tWDD tWDD tWDD
  36715. R e D63–D0
  36716. e S
  36717. d0 d1 d2 d3
  36718. (write)
  36719. v t
  36720. . a
  36721. 2 t
  36722. . e t t
  36723. 0
  36724. BSD BSD
  36725. (
  36726. , F
  36727. 0
  36728. BS
  36729. a
  36730. 2 s
  36731. / t
  36732. 9
  36733. 9 P
  36734. tDACD tDACD tDACD
  36735. , a DACKn
  36736. p g
  36737. a e
  36738. (SA: IO ← memory)
  36739. g M
  36740. e
  36741. tDACD tDACD tDACD
  36742. 7 o
  36743. d
  36744. DACKn
  36745. 5
  36746. 7 e (SA: IO → memory)
  36747. ,
  36748.  
  36749. o R
  36750. f
  36751. 8 C
  36752. 3 D
  36753. 0
  36754. =
  36755.  
  36756. 0
  36757. ,
  36758.  
  36759. ----------------------- Page 772-----------------------
  36760.  
  36761. F
  36762. i
  36763. g
  36764. R u
  36765. e r
  36766. v e
  36767. .
  36768. 2 2
  36769. . 3
  36770. 0 .
  36771. 4
  36772. Tc1 Tc2 Tc1 Tc2
  36773. , Tnop Tc1 Tc2 Tc1 Tc2
  36774. 0 7
  36775. 2 CKIO
  36776. / D
  36777. 9
  36778. ,9 R t t
  36779. A
  36780. AD AD
  36781. p
  36782. a M
  36783. A25–A0 c0 c1 c2 c3
  36784. g
  36785. e B t t
  36786. 7 u
  36787. CSD tCSD CSD
  36788. 5 r CSn
  36789. 8 s
  36790. t
  36791. o B
  36792. f
  36793. t t
  36794. u
  36795. t
  36796. 8
  36797. RWD RWD RWD
  36798. 3 s RD/WR
  36799. 0 C
  36800. R y
  36801. c t
  36802. C l
  36803. RAS down mode ended RASD
  36804. e
  36805. D : RAS
  36806. = R t t t t
  36807. A
  36808. CASD1 CASD1 CASD1 CASD1
  36809. 0
  36810. tCASD1
  36811. , S
  36812. A
  36813. CASn
  36814. D
  36815. n o
  36816. W w t t t
  36817. n
  36818. RDS t RDS RDH
  36819.  
  36820. D63–D0 RDH
  36821. =
  36822. M
  36823. (read) d0 d1 d2 d3
  36824.  
  36825. 0 tWDD
  36826. ) o t
  36827. d
  36828. WDD tWDD tWDD
  36829. e
  36830. D63–D0
  36831.  
  36832. d0 d1 d2 d3
  36833. C (write)
  36834. o
  36835. n t t
  36836. t
  36837. BSD BSD
  36838. i
  36839. n
  36840. u
  36841. BS
  36842. a
  36843. t
  36844. i
  36845. o
  36846. tDACD tDACD tDACD
  36847. n DACKn
  36848.  
  36849. ( (SA: IO ← memory)
  36850. F
  36851. a t t t
  36852. s
  36853. DACD DACD DACD
  36854. t
  36855. DACKn
  36856. P (SA: IO → memory)
  36857. a
  36858. g
  36859. e
  36860.  
  36861. M
  36862. o
  36863. d
  36864. e
  36865. ,
  36866.  
  36867. ----------------------- Page 773-----------------------
  36868.  
  36869. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  36870.  
  36871. CKIO
  36872.  
  36873. tAD
  36874.  
  36875. A25–A0
  36876.  
  36877. tCSD
  36878.  
  36879. CSn
  36880.  
  36881. tRWD
  36882.  
  36883. RD/WR
  36884.  
  36885. tRASD tRASD tRASD
  36886.  
  36887. RAS
  36888.  
  36889. tCASD1
  36890. tCASD1 tCASD1
  36891.  
  36892. CASn
  36893.  
  36894. tWDD
  36895.  
  36896. D63–D0
  36897. (write)
  36898.  
  36899. BS
  36900.  
  36901. tDACD
  36902. DACKn
  36903. (SA: IO ← memory)
  36904.  
  36905. tDACD
  36906.  
  36907. DACKn
  36908. (SA: IO → memory)
  36909.  
  36910. Figure 23.48 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 0, TRC = 1)
  36911.  
  36912. Rev. 2.0, 02/99, page 759 of 830
  36913.  
  36914. ----------------------- Page 774-----------------------
  36915.  
  36916. TRr1 TRr2 TRr3 TRr4 TRr4w TRr5 Trc Trc Trc
  36917.  
  36918. CKIO
  36919.  
  36920. tAD
  36921.  
  36922. A25–A0
  36923.  
  36924. tCSD
  36925.  
  36926. CSn
  36927.  
  36928. tRWD
  36929.  
  36930. RD/WR
  36931.  
  36932. tRASD tRASD tRASD
  36933.  
  36934. RAS
  36935. tCASD1
  36936. tCASD1 tCASD1
  36937.  
  36938. CASn
  36939.  
  36940. tWDD
  36941.  
  36942. D63–D0
  36943. (write)
  36944.  
  36945. BS
  36946.  
  36947. tDACD
  36948. DACKn
  36949. (SA: IO ← memory)
  36950.  
  36951. tDACD
  36952.  
  36953. DACKn
  36954. (SA: IO → memory)
  36955.  
  36956. Figure 23.49 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 1, TRC = 1)
  36957.  
  36958. Rev. 2.0, 02/99, page 760 of 830
  36959.  
  36960. ----------------------- Page 775-----------------------
  36961.  
  36962. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  36963.  
  36964. CKIO
  36965.  
  36966. tAD
  36967.  
  36968. A25–A0
  36969.  
  36970. tCSD
  36971.  
  36972. CSn
  36973.  
  36974. tRWD
  36975.  
  36976. RD/WR
  36977.  
  36978. tRASD tRASD tRASD
  36979.  
  36980. RAS
  36981.  
  36982. tCASD1 tCASD1 tCASD1
  36983.  
  36984. CASn
  36985.  
  36986. tWDD
  36987.  
  36988. D63–D0
  36989. (write)
  36990.  
  36991. BS
  36992.  
  36993. tDACD
  36994. DACKn
  36995. (SA: IO ← memory)
  36996.  
  36997. tDACD
  36998. DACKn
  36999. (SA: IO → memory)
  37000.  
  37001. Figure 23.50 DRAM Bus Cycle: DRAM Self-Refresh (TRC = 1)
  37002.  
  37003. Rev. 2.0, 02/99, page 761 of 830
  37004.  
  37005. ----------------------- Page 776-----------------------
  37006.  
  37007. Tpcm1 Tpcm2 Tpcm0 Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  37008. R
  37009. e CKIO
  37010. v. F
  37011. i
  37012. 2 g t t t t
  37013. .
  37014. AD AD AD AD
  37015. 0 u
  37016. , r A25–A0
  37017. 0 e
  37018. 2 2
  37019. / 3
  37020. 9
  37021. t t t t
  37022. .
  37023. CSD CSD CSD CSD
  37024. 9 5
  37025. , 1
  37026. CExx
  37027. (
  37028. p 2 REG (WE7)
  37029. a ) (
  37030. g P 1 t t t t
  37031. e )
  37032. RWD RWD RWD RWD
  37033. 7 O C P RD/WR
  37034. 6 n M C
  37035. 2 e C M
  37036. o I t t t t t
  37037. I
  37038. t
  37039. C
  37040. RSD
  37041. f
  37042. RSD RSD RSD
  37043. A
  37044. RSD RSD
  37045. 8 n I
  37046. t
  37047. RD
  37048. 3 e M A
  37049. 0 r
  37050. n e M t t
  37051. m
  37052. RDS RDH
  37053. a
  37054. tRDS tRDH
  37055. e
  37056. D15–D0
  37057. l o m
  37058. W
  37059. (read)
  37060. r
  37061. y o t t
  37062. a
  37063. WED1
  37064.  
  37065. WED1
  37066. i B r t t
  37067. y
  37068. t WEDF t WEDF
  37069. t
  37070. WEDF WEDF
  37071. u
  37072. + B
  37073. WE1
  37074. s
  37075. O C u t
  37076. s
  37077. tWDD WDD
  37078. n y C t t t t
  37079. c
  37080. WDD WDD WDD
  37081. e
  37082. WDD
  37083. l y
  37084. D15–D0
  37085.  
  37086. E e c (write)
  37087. x ( l
  37088. t T e
  37089. e E (
  37090. t t tBSD
  37091. T
  37092. BSD BSD
  37093. r
  37094. D
  37095. t
  37096. n
  37097. BSD
  37098. a E BS
  37099. l = D
  37100. W 1 = t t
  37101. ,
  37102. RDYS RDYH
  37103.  
  37104. a T 0
  37105. i , RDY
  37106. t E
  37107. ) H T t t
  37108. E
  37109. RDYS RDYH
  37110.  
  37111. t t t t
  37112. H
  37113. DACD
  37114. =
  37115. DACD DACD DACD
  37116.  
  37117. 1
  37118. DACKn
  37119. , = (DA)
  37120.  
  37121. 0
  37122. ,
  37123.  
  37124. N TED TEH
  37125. o
  37126.  
  37127. W (1)
  37128. a
  37129. (2)
  37130. i
  37131. t
  37132. )
  37133. Note: IO: DACK device
  37134. SA: Single address DMA transfer
  37135. DA: Dual address DMA transfer
  37136. DACK set to active-high
  37137.  
  37138. ----------------------- Page 777-----------------------
  37139.  
  37140. Tpci1 Tpci2 Tpci0 Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  37141.  
  37142. F CKIO
  37143. i
  37144. g
  37145. u t t t t
  37146. r
  37147. AD AD AD AD
  37148. e
  37149. A25–A0
  37150. 2
  37151. 3
  37152. .
  37153. 5 tCSD tCSD tCSD tCSD
  37154. ( 2
  37155. 2
  37156. CExx
  37157.  
  37158. ) ( REG (WE7)
  37159. O P 1
  37160. )
  37161. C
  37162. t t t t
  37163. n P
  37164. RWD RWD RWD RWD
  37165. e M C RD/WR
  37166. I C M
  37167. n
  37168. t I
  37169. t t
  37170. C
  37171. ICRSD ICRSD
  37172. e A
  37173. t t t
  37174. r
  37175. ICRSD ICRSD ICRSD
  37176. I
  37177. n I A
  37178. / ICIORD (WE2)
  37179. a O
  37180. l I
  37181.  
  37182. W /
  37183. B O
  37184. tRDS tRDH t t
  37185. u
  37186. D15–D0 RDS RDH
  37187. a s B
  37188. i (read)
  37189. t C u
  37190. + s
  37191. tICWSDF tICWSDF tICWSDF
  37192. y
  37193. C
  37194. t
  37195. O
  37196. t
  37197. c
  37198. ICWSDF ICWSDF
  37199. n l y
  37200. e ICIOWR (WE3)
  37201. c
  37202. e ( l
  37203. T e
  37204. t
  37205. E
  37206. tWDD WDD
  37207.  
  37208. E (
  37209. t t t
  37210. x
  37211. WDD WDD
  37212. T
  37213. WDD
  37214. t D E D15–D0
  37215. e
  37216. r (write)
  37217. R n = D
  37218. e a 1 = t t t
  37219. v l ,
  37220. BSD BSD BSD
  37221.  
  37222. .
  37223. t
  37224. W T 0
  37225. BSD
  37226.  
  37227. 2. E , BS
  37228. 0 a H T
  37229. i
  37230. , t E
  37231. t t
  37232.  
  37233. RDYS RDYH
  37234. 0 ) = H
  37235. 2 RDY
  37236. / 1 =
  37237. 9 , t
  37238. 9
  37239. IO16S tRDYS tRDYH
  37240. 0
  37241. tIO16H
  37242. ,
  37243. ,
  37244. p N IOIS16
  37245. a
  37246. g o t t
  37247.  
  37248. t t IO16S IO16H
  37249. e
  37250. DACD DACD t t
  37251. W
  37252. DACD DACD
  37253. DACKn
  37254. 7
  37255. 6 a (DA)
  37256. 3 i
  37257. t
  37258. )
  37259. o
  37260. f
  37261.  
  37262. 8 (1)
  37263. 3 (2)
  37264. 0
  37265.  
  37266. ----------------------- Page 778-----------------------
  37267.  
  37268. F
  37269. i
  37270. g
  37271. R u
  37272. e r
  37273. e
  37274. v Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w
  37275. . 2
  37276. 2 3
  37277. . .
  37278. 0 5 CKIO
  37279. , 3
  37280. 0 t t
  37281. 2
  37282. AD AD
  37283. / P
  37284. 9 C
  37285. A25–A1
  37286. 9
  37287. , M
  37288. p
  37289. t
  37290. C
  37291. AD
  37292. a
  37293. g I A0
  37294. e A
  37295.  
  37296. 7 I
  37297. /
  37298. t t t
  37299. 6
  37300. CSD CSD CSD
  37301. 4 O CExx
  37302. REG (WE7)
  37303. o B
  37304. f
  37305. u
  37306. 8 s
  37307. tRWD tRWD
  37308. 3
  37309. 0 C RD/WR
  37310. y
  37311. c
  37312. l
  37313. tICRSD t tICRSD
  37314. e
  37315. ICRSD
  37316.  
  37317. ( ICIORD (WE2)
  37318. T
  37319. E tRDS tRDH
  37320. D D15–D0
  37321. (read)
  37322. =
  37323. t t t
  37324. 1
  37325. ICWSDF ICWSDF tICWSDF ICWSDF
  37326. , t
  37327.  
  37328. ICWSDF
  37329. T
  37330. E
  37331. ICIOWR (WE3)
  37332. H tWDD tWDD tWDD
  37333.  
  37334. =
  37335. tWDD tWDD
  37336.  
  37337. 1
  37338. D15–D0
  37339. ,
  37340. (write)
  37341. O
  37342. n t tBSD
  37343. e
  37344. BSD
  37345.  
  37346. I
  37347. n BS
  37348. t
  37349. e
  37350. tRDYS tRDYH tRDYS tRDYH
  37351. r
  37352. n
  37353. a
  37354. l RDY
  37355.  
  37356. W
  37357. a
  37358. i IOIS16
  37359. t
  37360. ,
  37361.  
  37362. B tIO16S tIO16H
  37363. u
  37364. s
  37365.  
  37366. S
  37367. i
  37368. z
  37369. i
  37370. n
  37371. g
  37372. )
  37373.  
  37374. ----------------------- Page 779-----------------------
  37375.  
  37376. Tm1 Tmd1w Tmd1 Tm0 Tmd1w Tmd1w Tmd1
  37377. (
  37378. 2
  37379. )
  37380. CKIO
  37381.  
  37382. M F
  37383. i
  37384. t t t t
  37385. P
  37386. FMD FMD FMD FMD
  37387. g
  37388. X u RD/FRAME
  37389. r t t
  37390. B e
  37391. RDS RDS
  37392. t t t t t t
  37393. a 2
  37394. WDD WDD RDH WDD WDD RDH
  37395. s 3
  37396. i
  37397. A D0 A D0
  37398. . D63–D0
  37399. c 5
  37400. B 4
  37401. u
  37402. (
  37403. t t t t
  37404. s
  37405. CSD CSD CSD CSD
  37406. 1
  37407. C ) CSn
  37408. y M
  37409. c
  37410. l P
  37411. t t t t
  37412. e
  37413. RWD RWD RWD RWD
  37414. : X
  37415. R B
  37416. e
  37417. RD/WR
  37418. a a
  37419. s
  37420. d i
  37421. c
  37422. tWED1 tWED1 tWED1 tWED1
  37423. (
  37424. 1 B
  37425. WEn
  37426. s u
  37427. t
  37428. s t t
  37429. D
  37430. t t RDYS RDYH
  37431. C
  37432. RDYS RDYH
  37433. a
  37434. t y
  37435. a c
  37436. : l
  37437. RDY t t
  37438. e
  37439. t RDYS RDYH
  37440. O :
  37441. BSD t tBSD
  37442.  
  37443. t BSD
  37444. n R
  37445. BSD
  37446. e e
  37447. I a BS
  37448. n d
  37449. t
  37450. e ( t t
  37451. 1
  37452. DACD DACD t t
  37453. r
  37454. DACD DACD
  37455. R n s
  37456. t
  37457. e a D DACKn
  37458. v l (DA)
  37459. . W a
  37460. 2 t
  37461. . a a
  37462. 0 i :
  37463. ,0 t O
  37464. +
  37465. (1) (2)
  37466. 2 n
  37467. / O e
  37468. 9 1st data bus cycle information 1st data bus cycle information
  37469. 9 n I
  37470. , e n D63–D61: Access size
  37471. D63–D61: Access size
  37472. t
  37473. p E e 000: Byte 000: Byte
  37474. a r
  37475. g x n 001: Word (2 bytes) 001: Word (2 bytes)
  37476. e t a
  37477. e 010: Long (4 bytes) 010: Long (4 bytes)
  37478. 7 r l
  37479. n W
  37480. 011: Quad (8 bytes) 011: Quad (8 bytes)
  37481. 6
  37482. 5 a 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37483. l a
  37484. o W i D25–D0: Address D25–D0: Address
  37485. f t
  37486. )
  37487. 8 a
  37488. 3 i Note: IO: DACK device
  37489. 0 t
  37490. ) SA: Single address DMA transfer
  37491.  
  37492. DA: Dual address DMA transfer
  37493. DACK set to active-high
  37494.  
  37495. ----------------------- Page 780-----------------------
  37496.  
  37497. (
  37498. R 3
  37499. e )
  37500. v. M Tm1 Tmd1 Tm1 Tmd1w Tmd1 Tm1 Tmd1w Tmd1w Tmd1
  37501. 2. P
  37502. 0 X
  37503. ,
  37504. CKIO
  37505. 0 B F
  37506. i
  37507. 2 a ( g
  37508. t t tFMD tFMD t t
  37509. 2
  37510. FMD FMD FMD FMD
  37511. / s u
  37512. 9 i )
  37513. 9 c r
  37514. RD/FRAME
  37515. , B M e
  37516. p u P 2 t t t t t t t t t
  37517. a 3
  37518. WDD WDD WDD WDD WDD WDD WDD WDD WDD
  37519. g s X . D63–D0
  37520. 5
  37521. A D0 A D0 A D0
  37522. e C B 5
  37523. 7 y a
  37524. 6 c
  37525. t t t t t t
  37526. s (
  37527. CSD CSD CSD CSD CSD CSD
  37528. 6 l i 1
  37529. e c )
  37530. o :
  37531. CSn
  37532. f W B M
  37533. u
  37534. t t t
  37535. 8
  37536. RWD RWD RWD
  37537. 3 r s P tRWD tRWD tRWD
  37538. 0 i C X
  37539. t
  37540. e
  37541. y B
  37542. RD/WR
  37543.  
  37544. ( c
  37545. 1 l a t t t t t t
  37546. s e s
  37547. WED1 WED1 WED1 WED1 WED1 WED1
  37548. t : i
  37549. c
  37550. WEn
  37551. D W B
  37552. a
  37553. t t
  37554. r u
  37555. RDYS RDYH
  37556. t
  37557. tRDYS tRDYH tRDYS tRDYH
  37558. a i s
  37559. t
  37560. : e C
  37561. O
  37562. RDY
  37563. (
  37564. t t
  37565. y
  37566. RDYS RDYH
  37567. 1
  37568. t t tBSD
  37569. n
  37570. BSD
  37571. c
  37572. BSD
  37573. s t t
  37574. l
  37575. t
  37576. e t
  37577. BSD BSD BSD
  37578. e
  37579. I D :
  37580. n
  37581. BS
  37582. t a W
  37583. e t
  37584. a r
  37585. t t t t t
  37586. r
  37587. DACD DACD tDACD DACD DACD DACD
  37588. : i
  37589. n t
  37590. a O e DACKn
  37591. l n ( (DA)
  37592. W e 1
  37593. s
  37594. a I t
  37595. i n D
  37596. t t
  37597. e a
  37598. + r t (1) (2) (3)
  37599. O n a
  37600. a :
  37601. n l N 1st data bus cycle information 1st data bus cycle information 1st data bus cycle information
  37602. e W o D63–D61: Access size D63–D61: Access size D63–D61: Access size
  37603. E a W
  37604. x
  37605. 000: Byte 000: Byte 000: Byte
  37606. i
  37607. t t a
  37608. e )
  37609. 001: Word (2 bytes) 001: Word (2 bytes) 001: Word (2 bytes)
  37610. i
  37611. r t 010: Long (4 bytes) 010: Long (4 bytes) 010: Long (4 bytes)
  37612. n )
  37613. a 011: Quad (8 bytes) 011: Quad (8 bytes) 011: Quad (8 bytes)
  37614.  
  37615. l
  37616. 1xx: Burst (32 bytes) 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37617. W D25–D0: Address D25–D0: Address D25–D0: Address
  37618. a
  37619. i
  37620. t
  37621. )
  37622.  
  37623. ----------------------- Page 781-----------------------
  37624.  
  37625. F
  37626. i
  37627. g
  37628. u Tm1 Tmd1w Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  37629. r
  37630. e
  37631.  
  37632. 2
  37633. CKIO
  37634. (
  37635. 2 3
  37636. ) .
  37637. t t t t
  37638. 5
  37639. FMD FMD FMD FMD
  37640.  
  37641. M 6 RD/FRAME
  37642. P (
  37643. X 1
  37644. tWDD tWDD tRDS tRDH tWDD tWDD tRDS tRDH
  37645. ) D63–D0
  37646. 2 B
  37647. A D0 D1 D2 D3 A D0 D1 D2 D3
  37648. n u M
  37649. d s 2 P tCSD tCSD tCSD tCSD
  37650. / C n X
  37651. 3
  37652. r y d B CSn
  37653. d c /
  37654. 3
  37655. t
  37656. / l u
  37657. RWD
  37658. 4 e r s t t t
  37659. d
  37660. RWD RWD RWD
  37661. t :
  37662. h B / C
  37663. 4 RD/WR
  37664. D u t y
  37665. a r h c t t t t
  37666. l
  37667. WED1 WED1 WED1 WED1
  37668. t s D e
  37669. a t
  37670. WEn
  37671. :
  37672. : R a B tRDYH t
  37673. t
  37674. RDYS
  37675. E e a u tRDYS tRDYH tRDYS tRDYH
  37676. x a : r
  37677. t d N s
  37678. e t
  37679. RDY
  37680.  
  37681. r ( o
  37682. t t
  37683. 1 R
  37684. BSD BSD
  37685. n s I tBSD tBSD
  37686. a t n e
  37687. l t a
  37688. D
  37689. BS
  37690. W e d
  37691. a r (
  37692. n
  37693. t t t
  37694. a t
  37695. t
  37696. 1
  37697. DACD DACD DACD DACD
  37698. i a a s
  37699. R t : l t DACKn
  37700. e C N W D (DA)
  37701. v
  37702. . o o a a
  37703. 2 n I i t
  37704. . t n t a
  37705. 0 r t ) :
  37706. , o e O
  37707. l
  37708. 0
  37709. (1) (2)
  37710. ) r
  37711. 2 n n
  37712. / a e 1st data bus cycle information 1st data bus cycle information
  37713. 9 l
  37714. 9 I D63–D61: Access size D63–D61: Access size
  37715. , W n
  37716. t 000: Byte 000: Byte
  37717. p a e
  37718. a i r 001: Word (2 bytes) 001: Word (2 bytes)
  37719. g t n
  37720. ;
  37721. 010: Long (4 bytes) 010: Long (4 bytes)
  37722. e a
  37723. l 011: Quad (8 bytes) 011: Quad (8 bytes)
  37724. 7
  37725. 6 W 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37726. 7
  37727. a
  37728. D25–D0: Address D25–D0: Address
  37729.  
  37730. o i
  37731. f t
  37732. ;
  37733. 8
  37734. 3
  37735. 0
  37736.  
  37737. ----------------------- Page 782-----------------------
  37738.  
  37739. R
  37740. e
  37741. v. F
  37742. i
  37743. 2 g
  37744. Tm1 Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  37745. 0. u
  37746. , r
  37747. e
  37748. CKIO
  37749. 0
  37750. 2 2 ( 2
  37751. / 2 3
  37752. t t t t
  37753. 9 n
  37754. FMD FMD FMD FMD
  37755. ) .
  37756. 9 d M 5 RD/FRAME
  37757. , / 7
  37758. p 3 P
  37759. a r
  37760. t t
  37761. X
  37762. t t
  37763. (
  37764. WDD
  37765. d
  37766. WDD WDD WDD
  37767. g / 1 D63–D0
  37768. e 4 B )
  37769. A D0 D1 D2 D3 A D0 D1 D2 D3
  37770.  
  37771. 7 t u M
  37772. h
  37773. 6 s
  37774. P
  37775. t t t t
  37776. 8 D
  37777. CSD CSD CSD CSD
  37778. C 2 X
  37779. o a y n CSn
  37780. f t d
  37781. 8 a c / B t
  37782. l
  37783. t
  37784. 3
  37785. RWD
  37786. : u
  37787. RWD
  37788. 3 e r t t
  37789. 0 N : s
  37790. RWD RWD
  37791. d
  37792. o B / C
  37793. u 4
  37794. RD/WR
  37795. I t y
  37796. n r h c
  37797. s l
  37798. t t t t
  37799. t
  37800. WED1 WED1 WED1 WED1
  37801. e t D e
  37802. :
  37803. WEn
  37804. r W a B
  37805. n t tRDYH t
  37806. a r
  37807. RDYS
  37808. l i a u t t t t
  37809. :
  37810. RDYS RDYH RDYS RDYH
  37811. t r
  37812. W e N s
  37813. t
  37814. (
  37815. RDY
  37816. a 1 o W t t
  37817. i s I
  37818. BSD BSD
  37819. t t t
  37820. t n r
  37821. BSD BSD
  37822. + D t i
  37823. e t
  37824. e
  37825. BS
  37826. E a r
  37827. x t n (
  37828. t a a 1 t t t t
  37829. :
  37830. DACD DACD DACD
  37831. e s
  37832. DACD
  37833. l
  37834. r O W t
  37835. n D
  37836. DACKn
  37837. a n a a (DA)
  37838. l e
  37839. i t
  37840. W I t a
  37841. n ) :
  37842. a t O
  37843. i e
  37844. t r n (1) (2)
  37845. C n e
  37846. a
  37847. o l I 1st data bus cycle information 1st data bus cycle information
  37848. n W n D63–D61: Access size D63–D61: Access size
  37849. t t
  37850. r e
  37851. a
  37852. 000: Byte 000: Byte
  37853. o r
  37854. l i n
  37855. ) t 001: Word (2 bytes) 001: Word (2 bytes)
  37856. ; a
  37857. l 010: Long (4 bytes) 010: Long (4 bytes)
  37858.  
  37859. W 011: Quad (8 bytes) 011: Quad (8 bytes)
  37860. a
  37861. 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  37862. i
  37863. t
  37864. D25–D0: Address D25–D0: Address
  37865. ;
  37866.  
  37867. ----------------------- Page 783-----------------------
  37868.  
  37869. T1 T2 T1 Tw T2 T1 Tw Twe T2
  37870.  
  37871. CKIO
  37872.  
  37873. tAD tAD tAD tAD tAD tAD
  37874.  
  37875. A25–A0
  37876.  
  37877. (
  37878. 3
  37879. tCSD tCSD tCSD tCSD tCSD tCSD
  37880. )
  37881. CSn
  37882. B F
  37883. a i
  37884. s g
  37885. i u
  37886. t t t t t t
  37887. c
  37888. RWD RWD RWD RWD RWD RWD
  37889. r
  37890. R e
  37891. RD/WR
  37892.  
  37893. e ( 2
  37894. a 2 3
  37895. )
  37896. t t t t t t t t t
  37897. d .
  37898. RSD RSD RSD RSD RSD RSD RSD RSD RSD
  37899.  
  37900. B 5
  37901. C 8
  37902. RD
  37903. a (
  37904. y s 1
  37905. c i ) M
  37906. t t t t t t
  37907. c
  37908. RDS RDH RDS RDH RDS RDH
  37909. l B D63–D0
  37910. e R a e (read)
  37911. ( m
  37912. t
  37913. e
  37914. WED1 t t
  37915. O s
  37916. WED1 WED1
  37917. a i o
  37918. c
  37919. t t t t t t
  37920. n d
  37921. WEDF WED1 WEDF WED1 WEDF WED1
  37922. r
  37923. e C R y WEn
  37924. I y e B
  37925. n a
  37926. t c d y
  37927. tBSD tBSD t
  37928. e l
  37929. BSD
  37930. e t
  37931. r C e
  37932. tBSD t t
  37933.  
  37934. BSD BSD
  37935. n ( y C
  37936. a O c o BS
  37937. l
  37938. n l n
  37939. W e e t tRDYS t t
  37940. (
  37941. RDYS RDYH
  37942. I r
  37943. t
  37944. a N
  37945. RDYH
  37946. i n o
  37947. t t o l
  37948.  
  37949. RDY
  37950. + e W S
  37951. r
  37952. t t
  37953. R R
  37954. RDYS RDYH
  37955. n
  37956. t t t t t
  37957. O
  37958. DACD DACD DACD DACD DACD
  37959. e a a A t t t t
  37960. v n i
  37961. DACD DACD DACD DACD
  37962. . e l t M
  37963. W )
  37964. DACKn
  37965.  
  37966. 2
  37967. E
  37968. (SA: IO ← memory)
  37969. 0. x a B
  37970. , t i u
  37971. t
  37972. 0 e ) s t t t t tDACD tDACD
  37973. r
  37974. DACD
  37975. 2
  37976. DACD DACD DACD
  37977. / n C
  37978. 9 a y DACKn
  37979. 9 l c (DA)
  37980. , l
  37981. p W e
  37982. s
  37983. a a
  37984. g i
  37985. e t
  37986. )
  37987. 7
  37988. 6
  37989. 9 (1) (2) (3)
  37990.  
  37991. o
  37992. f
  37993.  
  37994. 8 Note: IO: DACK device
  37995. 3
  37996. 0
  37997. SA: Single address DMA transfer
  37998. DA: Dual address DMA transfer
  37999. DACK set to active-high
  38000.  
  38001. ----------------------- Page 784-----------------------
  38002.  
  38003. TS1 T1 T2 TH1
  38004.  
  38005. CKIO
  38006.  
  38007. tAD tAD
  38008.  
  38009. A25–A0
  38010.  
  38011. tCSD tCSD
  38012.  
  38013. CSn
  38014.  
  38015. tRWD tRWD
  38016.  
  38017. RD/WR
  38018.  
  38019. tRSD tRSD tRSD
  38020.  
  38021. RD
  38022.  
  38023. D63–D0 tRDS tRDH
  38024.  
  38025. (read)
  38026. tWED1
  38027. tWEDF tWED1
  38028.  
  38029. WEn
  38030.  
  38031. tBSD
  38032. tBSD
  38033.  
  38034. BS
  38035.  
  38036. RDY
  38037.  
  38038. tDACD tDACD
  38039. DACKn
  38040. (SA: IO ← memory)
  38041.  
  38042. tDACD tDACD
  38043.  
  38044. DACKn
  38045. (DA)
  38046.  
  38047. Figure 23.59 Memory Byte Control SRAM Bus Cycle: Basic Read Cycle (No Wait,
  38048. Address Setup/Hold Time Insertion, AnS = 1, AnH = 1)
  38049.  
  38050. Rev. 2.0, 02/99, page 770 of 830
  38051.  
  38052. ----------------------- Page 785-----------------------
  38053.  
  38054. 23.3.4 Peripheral Module Signal Timing
  38055.  
  38056. Table 23.8 Peripheral Module Signal Timing
  38057.  
  38058. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  38059. DDQ DD a L
  38060.  
  38061. 66 MHz 83 MHz 100 MHz
  38062.  
  38063. Module Item Symbol Min Max Min Max Min Max Unit Figure
  38064.  
  38065. TMU, Timer clock pulse tTCLKWH 4 — 4 — 4 — Pcyc* 23.60
  38066. RTC width (high)
  38067.  
  38068. Timer clock pulse tTCLKWL 4 — 4 — 4 — Pcyc* 23.60
  38069. width (low)
  38070.  
  38071. Timer clock rise tTCLKr — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38072. time
  38073.  
  38074. Timer clock fall tTCLKf — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38075. time
  38076.  
  38077. Oscillation settling tROSC — 3 — 3 — 3 s 23.61
  38078. time
  38079.  
  38080. SCI Input clock cycle tScyc 4 — 4 — 4 — Pcyc* 23.62
  38081. (asynchronous)
  38082.  
  38083. Input clock cycle tScyc 6 — 6 — 6 — Pcyc* 23.62
  38084. (synchronous)
  38085.  
  38086. Input clock pulse tSCKW 0.4 0.6 0.4 0.6 0.4 0.6 tScyc 23.62
  38087. width
  38088.  
  38089. Input clock rise tSCKr — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38090. time
  38091.  
  38092. Input clock fall tSCKf — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38093. time
  38094.  
  38095. Transfer data t — 30 — 30 — 30 ns 23.63
  38096. TXD
  38097.  
  38098. delay time
  38099.  
  38100. Receive data tRXS 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38101. setup time
  38102. (synchronous)
  38103.  
  38104. Receive data tRXH 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38105. hold time
  38106. (synchronous)
  38107.  
  38108. Rev. 2.0, 02/99, page 771 of 830
  38109.  
  38110. ----------------------- Page 786-----------------------
  38111.  
  38112. Table 23.8 Peripheral Module Signal Timing (cont)
  38113.  
  38114. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2 on)
  38115. DDQ DD a L
  38116.  
  38117. 66 MHz 83 MHz 100 MHz
  38118.  
  38119. Module Item Symbol Min Max Min Max Min Max Unit Figure Note
  38120.  
  38121. I/O ports Output data delay tPORTD — 10 — 8 — 6 ns 23.64
  38122. time
  38123.  
  38124. Input data setup tPORTS 2 — 2 — 2 — ns 23.64 BGABGA
  38125. time
  38126.  
  38127. 3.5 — 3.5 — — — ns QFPQFP
  38128.  
  38129. Input data hold tPORTH 1.5 — 1.5 — 1.5 — ns 23.64
  38130. time
  38131.  
  38132. DMAC '5(4Q setup time tDRQS 2 — 2 — 2 — ns 23.65 BGABGA
  38133.  
  38134. 3.5 — 3.5 — — — ns QFPQFP
  38135.  
  38136. '5(4Q hold time t 1.5 — 1.5 — 1.5 — ns 23.65
  38137. DRQH
  38138.  
  38139. DRAKn delay time tDRAKD — 10 — 8 — 6 ns 23.65
  38140.  
  38141. Hitachi- Input clock cycle tTCKcyc 50 — 50 — 50 — ns 23.66
  38142. UDI
  38143.  
  38144. Input clock pulse tTCKH 15 — 15 — 15 — ns 23.66
  38145. width (high)
  38146.  
  38147. Input clock pulse tTCKL 15 — 15 — 15 — ns 23.66
  38148. width (low)
  38149.  
  38150. Input clock rise tTCKr — 10 — 10 — 10 ns 23.66
  38151. time
  38152.  
  38153. Input clock fall tTCKf — 10 — 10 — 10 ns 23.66
  38154. time
  38155.  
  38156. Hitachi- $6(%5. setup t 10 — 10 — 10 — t 23.67
  38157. ASEBRKS cyc
  38158.  
  38159. UDI time
  38160.  
  38161. $6(%5. hold time t 10 — 10 — 10 — t 23.67
  38162. ASEBRKH cyc
  38163.  
  38164. TDI/TMS setup tTDIS 15 — 15 — 15 — ns 23.68
  38165. time
  38166.  
  38167. TDI/TMS hold time t 15 — 15 — 15 — ns 23.68
  38168. TDIH
  38169.  
  38170. TDO delay time tTDO 0 10 0 10 0 10 ns 23.68
  38171.  
  38172. ASE-PINBRK tPINBRK 2 — 2 — 2 — Pcy 23.69
  38173. pulse width c*
  38174.  
  38175. Note: * Pcyc: P clock cycles
  38176.  
  38177. Rev. 2.0, 02/99, page 772 of 830
  38178.  
  38179. ----------------------- Page 787-----------------------
  38180.  
  38181. TCLK
  38182.  
  38183. tTCLKWH tTCLKWL
  38184. tTCLKf tTCLKr
  38185.  
  38186. Figure 23.60 TCLK Input Timing
  38187.  
  38188. Stable oscillation
  38189.  
  38190. RTC internal clock
  38191.  
  38192. V
  38193. cc
  38194. V min
  38195. cc tROSC
  38196.  
  38197. Figure 23.61 RTC Oscillation Settling Time at Power-On
  38198.  
  38199. tSCKW
  38200.  
  38201. SCK, SCK2
  38202.  
  38203. t
  38204. Scyc
  38205. tSCKf tSCKr
  38206.  
  38207. Figure 23.62 SCK Input Clock Timing
  38208.  
  38209. t
  38210. Scyc
  38211.  
  38212. SCK
  38213.  
  38214. tTXD tTXD
  38215.  
  38216. TXD
  38217.  
  38218. RXD
  38219.  
  38220. tRXS tRXH
  38221.  
  38222. Figure 23.63 SCI I/O Synchronous Mode Clock Timing
  38223. Rev. 2.0, 02/99, page 773 of 830
  38224.  
  38225. ----------------------- Page 788-----------------------
  38226.  
  38227. CKIO
  38228.  
  38229. Ports 19–0
  38230. (read)
  38231.  
  38232. tPORTS tPORTH
  38233.  
  38234. tPORTD tPORTD
  38235. Ports 19–0
  38236. (write)
  38237.  
  38238. Figure 23.64 I/O Port Input/Output Timing
  38239.  
  38240. CKIO
  38241.  
  38242. tDRQH tDRQH
  38243.  
  38244. DREQn
  38245.  
  38246. tDRQS tDRQS
  38247.  
  38248. tDRAKD
  38249. DRAKn
  38250.  
  38251. Figure 23.65 '5(4/DRAK Timing
  38252. '5(4
  38253.  
  38254. tTCKcyc
  38255.  
  38256. tTCKH tTCKL
  38257.  
  38258. VIH VIH VIH
  38259. 1/2VDDQ 1/2VDDQ
  38260.  
  38261. VIL VIL
  38262.  
  38263. tTCKf tTCKr
  38264.  
  38265. Note: When clock is input from TCK pin
  38266.  
  38267. Figure 23.66 TCK Input Timing
  38268.  
  38269. Rev. 2.0, 02/99, page 774 of 830
  38270.  
  38271. ----------------------- Page 789-----------------------
  38272.  
  38273. RESET
  38274.  
  38275. SCK2/
  38276. MRESET
  38277.  
  38278. tASEBRKS tASEBRKH tASEBRKS tASEBRKH
  38279.  
  38280. ASEBRK/
  38281. BRKACK
  38282.  
  38283. Figure 23.67 Reset Hold Timing
  38284.  
  38285. t
  38286. TCK TCKcyc
  38287.  
  38288. TDI tTDIS tTDIH
  38289. TMS
  38290.  
  38291. tTDO
  38292. TDO
  38293.  
  38294. Figure 23.68 Hitachi-UDI Data Transfer Timing
  38295.  
  38296. tPINBRK
  38297.  
  38298.  
  38299. ASEBRK
  38300.  
  38301. Figure 23.69 Pin Break Timing
  38302.  
  38303. Rev. 2.0, 02/99, page 775 of 830
  38304.  
  38305. ----------------------- Page 790-----------------------
  38306.  
  38307. 23.3.5 AC Characteristic Test Conditions
  38308.  
  38309. The AC characteristic test conditions are as follows:
  38310.  
  38311. • Input/output signal reference level: 1.5 V (VDDQ = 3.3 ±0.3 V)
  38312. • Input pulse level: VSSQ–3.0 V (VSSQ–VDDQ for 5(6(7, 7567, NMI, and $6(%5./BRKACK)
  38313. • Input rise/fall time: 1 ns
  38314.  
  38315. The output load circuit is shown in figure 23.70.
  38316.  
  38317. IOL
  38318.  
  38319. LSI output pin DUT output
  38320.  
  38321. CL VREF
  38322.  
  38323. IOH
  38324.  
  38325. Notes: 1. C is the total value, including the capacitance of the test jig, etc.
  38326. L
  38327. The capacitance of each pin is set to 30 pF.
  38328. 2. IOL and IOH values are as shown in table 23.3, Permissible Output Currents.
  38329.  
  38330. Figure 23.70 Output Load Circuit
  38331.  
  38332. Rev. 2.0, 02/99, page 776 of 830
  38333.  
  38334. ----------------------- Page 791-----------------------
  38335.  
  38336. 23.3.6 Delay Time Variation Due to Load Capacitance
  38337.  
  38338. A graph (reference data) of the variation in delay time when a load capacitance greater than that
  38339. stipulated (30 pF) is connected to the SH7750’s pins is shown below. The graph shown in figure
  38340. 23.71 should be taken into consideration if the stipulated capacitance is exceeded when
  38341. connecting an external device.
  38342.  
  38343. The graph will not be linear if the connected load capacitance exceeds the range shown in figure
  38344. 23.71.
  38345.  
  38346. +4.0 ns
  38347.  
  38348. +3.0 ns
  38349.  
  38350. e
  38351. m
  38352. i
  38353. T
  38354. +2.0 ns
  38355. y
  38356. a
  38357. l
  38358. e
  38359. D
  38360.  
  38361. +1.0 ns
  38362.  
  38363. +0.0 ns
  38364. +0 pF +25 pF +50 pF
  38365.  
  38366. Load Capacitance
  38367.  
  38368. Figure 23.71 Load Capacitance vs. Delay Time
  38369.  
  38370. Rev. 2.0, 02/99, page 777 of 830
  38371.  
  38372. ----------------------- Page 792-----------------------
  38373.  
  38374. Rev. 2.0, 02/99, page 778 of 830
  38375.  
  38376. ----------------------- Page 793-----------------------
  38377.  
  38378. Appendix A Address List
  38379.  
  38380. Table A.1 Address List
  38381.  
  38382. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38383. Address*1 Reset Reset nization
  38384.  
  38385. Clock
  38386.  
  38387. CCN PTEH H'FF00 0000 H'1F00 0000 32 Undefined Undefined Held Held Iclk
  38388.  
  38389. CCN PTEL H'FF00 0004 H'1F00 0004 32 Undefined Undefined Held Held Iclk
  38390.  
  38391. CCN TTB H'FF00 0008 H'1F00 0008 32 Undefined Undefined Held Held Iclk
  38392.  
  38393. CCN TEA H'FF00 000C H'1F00 000C 32 Undefined Held Held Held Iclk
  38394.  
  38395. CCN MMUCR H'FF00 0010 H'1F00 0010 32 H'0000 0000 H'0000 0000 Held Held Iclk
  38396.  
  38397. CCN BASRA H'FF00 0014 H'1F00 0014 8 Undefined Held Held Held Iclk
  38398.  
  38399. CCN BASRB H'FF00 0018 H'1F00 0018 8 Undefined Held Held Held Iclk
  38400.  
  38401. CCN CCR H'FF00 001C H'1F00 001C 32 H'0000 0000 H'0000 0000 Held Held Iclk
  38402.  
  38403. CCN TRA H'FF00 0020 H'1F00 0020 32 Undefined Undefined Held Held Iclk
  38404.  
  38405. CCN EXPEVT H'FF00 0024 H'1F00 0024 32 H'0000 0000 H'0000 0020 Held Held Iclk
  38406.  
  38407. CCN INTEVT H'FF00 0028 H'1F00 0028 32 Undefined Undefined Held Held Iclk
  38408.  
  38409. CCN PTEA H'FF00 0034 H'1F00 0034 32 Undefined Undefined Held Held Iclk
  38410.  
  38411. CCN QACR0 H'FF00 0038 H'1F00 0038 32 Undefined Undefined Held Held Iclk
  38412.  
  38413. CCN QACR1 H'FF00 003C H'1F00 003C 32 Undefined Undefined Held Held Iclk
  38414.  
  38415. UBC BARA H'FF20 0000 H'1F20 0000 32 Undefined Held Held Held Iclk
  38416.  
  38417. UBC BAMRA H'FF20 0004 H'1F20 0004 8 Undefined Held Held Held Iclk
  38418.  
  38419. UBC BBRA H'FF20 0008 H'1F20 0008 16 H'0000 Held Held Held Iclk
  38420.  
  38421. UBC BARB H'FF20 000C H'1F20 000C 32 Undefined Held Held Held Iclk
  38422.  
  38423. UBC BAMRB H'FF20 0010 H'1F20 0010 8 Undefined Held Held Held Iclk
  38424.  
  38425. UBC BBRB H'FF20 0014 H'1F20 0014 16 H'0000 Held Held Held Iclk
  38426.  
  38427. UBC BDRB H'FF20 0018 H'1F20 0018 32 Undefined Held Held Held Iclk
  38428.  
  38429. UBC BDMRB H'FF20 001C H'1F20 001C 32 Undefined Held Held Held Iclk
  38430.  
  38431. 2
  38432. UBC BRCR H'FF20 0020 H'1F20 0020 16 H'0000* Held Held Held Iclk
  38433.  
  38434. BSC BCR1 H'FF80 0000 H'1F80 0000 32 H'0000 0000*2 Held Held Held Bclk
  38435.  
  38436. 2
  38437. BSC BCR2 H'FF80 0004 H'1F80 0004 16 H'3FFC* Held Held Held Bclk
  38438.  
  38439. BSC WCR1 H'FF80 0008 H'1F80 0008 32 H'7777 7777 Held Held Held Bclk
  38440.  
  38441. BSC WCR2 H'FF80 000C H'1F80 000C 32 H'FFFE EFFF Held Held Held Bclk
  38442.  
  38443. BSC WCR3 H'FF80 0010 H'1F80 0010 32 H'0777 7777 Held Held Held Bclk
  38444.  
  38445. Rev. 2.0, 02/99, page 779 of 830
  38446.  
  38447. ----------------------- Page 794-----------------------
  38448.  
  38449. Table A.1 Address List (cont)
  38450.  
  38451. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38452. Address*1 Reset Reset nization
  38453.  
  38454. Clock
  38455.  
  38456. BSC MCR H'FF80 0014 H'1F80 0014 32 H'0000 0000 Held Held Held Bclk
  38457.  
  38458. BSC PCR H'FF80 0018 H'1F80 0018 16 H'0000 Held Held Held Bclk
  38459.  
  38460. BSC RTCSR H'FF80 001C H'1F80 001C 16 H'0000 Held Held Held Bclk
  38461.  
  38462. BSC RTCNT H'FF80 0020 H'1F80 0020 16 H'0000 Held Held Held Bclk
  38463.  
  38464. BSC RTCOR H'FF80 0024 H'1F80 0024 16 H'0000 Held Held Held Bclk
  38465.  
  38466. BSC RFCR H'FF80 0028 H'1F80 0028 16 H'0000 Held Held Held Bclk
  38467.  
  38468. BSC PCTRA H'FF80 002C H'1F80 002C 32 H'0000 0000 Held Held Held Bclk
  38469.  
  38470. BSC PDTRA H'FF80 0030 H'1F80 0030 16 Undefined Held Held Held Bclk
  38471.  
  38472. BSC PCTRB H'FF80 0040 H'1F80 0040 32 H'0000 0000 Held Held Held Bclk
  38473.  
  38474. BSC PDTRB H'FF80 0044 H'1F80 0044 16 Undefined Held Held Held Bclk
  38475.  
  38476. BSC GPIOIC H'FF80 0048 H'1F80 0048 16 H'0000 0000 Held Held Held Bclk
  38477.  
  38478. BSC SDMR2 H'FF90 xxxx H'1F90 xxxx 8 Write-only Bclk
  38479.  
  38480. BSC SDMR3 H'FF94 xxxx H'1F94 xxxx 8 Bclk
  38481.  
  38482. DMAC SAR0 H'FFA0 0000 H'1FA0 0000 32 Undefined Undefined Held Held Bclk
  38483.  
  38484. DMAC DAR0 H'FFA0 0004 H'1FA0 0004 32 Undefined Undefined Held Held Bclk
  38485.  
  38486. DMAC DMATCR0 H'FFA0 0008 H'1FA0 0008 32 Undefined Undefined Held Held Bclk
  38487.  
  38488. DMAC CHCR0 H'FFA0 000C H'1FA0 000C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38489.  
  38490. DMAC SAR1 H'FFA0 0010 H'1FA0 0010 32 Undefined Undefined Held Held Bclk
  38491.  
  38492. DMAC DAR1 H'FFA0 0014 H'1FA0 0014 32 Undefined Undefined Held Held Bclk
  38493.  
  38494. DMAC DMATCR1 H'FFA0 0018 H'1FA0 0018 32 Undefined Undefined Held Held Bclk
  38495.  
  38496. DMAC CHCR1 H'FFA0 001C H'1FA0 001C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38497.  
  38498. DMAC SAR2 H'FFA0 0020 H'1FA0 0020 32 Undefined Undefined Held Held Bclk
  38499.  
  38500. DMAC DAR2 H'FFA0 0024 H'1FA0 0024 32 Undefined Undefined Held Held Bclk
  38501.  
  38502. DMAC DMATCR2 H'FFA0 0028 H'1FA0 0028 32 Undefined Undefined Held Held Bclk
  38503.  
  38504. DMAC CHCR2 H'FFA0 002C H'1FA0 002C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38505.  
  38506. DMAC SAR3 H'FFA0 0030 H'1FA0 0030 32 Undefined Undefined Held Held Bclk
  38507.  
  38508. DMAC DAR3 H'FFA0 0034 H'1FA0 0034 32 Undefined Undefined Held Held Bclk
  38509.  
  38510. DMAC DMATCR3 H'FFA0 0038 H'1FA0 0038 32 Undefined Undefined Held Held Bclk
  38511.  
  38512. DMAC CHCR3 H'FFA0 003C H'1FA0 003C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38513.  
  38514. DMAC DMAOR H'FFA0 0040 H'1FA0 0040 32 H'0000 0000 H'0000 0000 Held Held Bclk
  38515.  
  38516. Rev. 2.0, 02/99, page 780 of 830
  38517.  
  38518. ----------------------- Page 795-----------------------
  38519.  
  38520. Table A.1 Address List (cont)
  38521.  
  38522. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38523. Address*1 Reset Reset nization
  38524.  
  38525. Clock
  38526. CPG FRQCR H'FFC0 0000 H'1FC0 0000 16 *2 Held Held Held Pclk
  38527.  
  38528. CPG STBCR H'FFC0 0004 H'1FC0 0004 8 H'00 Held Held Held Pclk
  38529.  
  38530. 3
  38531. CPG WTCNT H'FFC0 0008 H'1FC0 0008 8/16* H'00 Held Held Held Pclk
  38532.  
  38533. 3
  38534. CPG WTCSR H'FFC0 000C H'1FC0 000C 8/16* H'00 Held Held Held Pclk
  38535.  
  38536. CPG STBCR2 H'FFC0 0010 H'1FC0 0010 8 H'00 Held Held Held Pclk
  38537.  
  38538. RTC R64CNT H'FFC8 0000 H'1FC8 0000 8 Held Held Held Held Pclk
  38539.  
  38540. RTC RSECCNT H'FFC8 0004 H'1FC8 0004 8 Held Held Held Held Pclk
  38541.  
  38542. RTC RMINCNT H'FFC8 0008 H'1FC8 0008 8 Held Held Held Held Pclk
  38543.  
  38544. RTC RHRCNT H'FFC8 000C H'1FC8 000C 8 Held Held Held Held Pclk
  38545.  
  38546. RTC RWKCNT H'FFC8 0010 H'1FC8 0010 8 Held Held Held Held Pclk
  38547.  
  38548. RTC RDAYCNT H'FFC8 0014 H'1FC8 0014 8 Held Held Held Held Pclk
  38549.  
  38550. RTC RMONCNT H'FFC8 0018 H'1FC8 0018 8 Held Held Held Held Pclk
  38551.  
  38552. RTC RYRCNT H'FFC8 001C H'1FC8 001C 16 Held Held Held Held Pclk
  38553. RTC RSECAR H'FFC8 0020 H'1FC8 0020 8 Held *2 Held Held Held Pclk
  38554.  
  38555. RTC RMINAR H'FFC8 0024 H'1FC8 0024 8 Held *2 Held Held Held Pclk
  38556.  
  38557. RTC RHRAR H'FFC8 0028 H'1FC8 0028 8 Held *2 Held Held Held Pclk
  38558.  
  38559. 2
  38560. RTC RWKAR H'FFC8 002C H'1FC8 002C 8 Held * Held Held Held Pclk
  38561. RTC RDAYAR H'FFC8 0030 H'1FC8 0030 8 Held *2 Held Held Held Pclk
  38562.  
  38563. RTC RMONAR H'FFC8 0034 H'1FC8 0034 8 Held *2 Held Held Held Pclk
  38564.  
  38565. RTC RCR1 H'FFC8 0038 H'1FC8 0038 8 H'00*2 H'00*2 Held Held Pclk
  38566.  
  38567. RTC RCR2 H'FFC8 003C H'1FC8 003C 8 H'09*2 H'00*2 Held Held Pclk
  38568.  
  38569. INTC ICR H'FFD0 0000 H'1FD0 0000 16 H'0000*2 H'0000*2 Held Held Pclk
  38570.  
  38571. INTC IPRA H'FFD0 0004 H'1FD0 0004 16 H'0000 H'0000 Held Held Pclk
  38572.  
  38573. INTC IPRB H'FFD0 0008 H'1FD0 0008 16 H'0000 H'0000 Held Held Pclk
  38574.  
  38575. INTC IPRC H'FFD0 000C H'1FD0 000C 16 H'0000 H'0000 Held Held Pclk
  38576.  
  38577. TMU TOCR H'FFD8 0000 H'1FD8 0000 8 H'00 H'00 Held Held Pclk
  38578. TMU TSTR H'FFD8 0004 H'1FD8 0004 8 H'00 H'00 Held H'00*2 Pclk
  38579.  
  38580. TMU TCOR0 H'FFD8 0008 H'1FD8 0008 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38581.  
  38582. TMU TCNT0 H'FFD8 000C H'1FD8 000C 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38583.  
  38584. TMU TCR0 H'FFD8 0010 H'1FD8 0010 16 H'0000 H'0000 Held Held Pclk
  38585.  
  38586. Rev. 2.0, 02/99, page 781 of 830
  38587.  
  38588. ----------------------- Page 796-----------------------
  38589.  
  38590. Table A.1 Address List (cont)
  38591.  
  38592. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  38593. Address*1 Reset Reset nization
  38594.  
  38595. Clock
  38596.  
  38597. TMU TCOR1 H'FFD8 0014 H'1FD8 0014 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38598.  
  38599. TMU TCNT1 H'FFD8 0018 H'1FD8 0018 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38600.  
  38601. TMU TCR1 H'FFD8 001C H'1FD8 001C 16 H'0000 H'0000 Held Held Pclk
  38602.  
  38603. TMU TCOR2 H'FFD8 0020 H'1FD8 0020 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38604.  
  38605. TMU TCNT2 H'FFD8 0024 H'1FD8 0024 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  38606.  
  38607. TMU TCR2 H'FFD8 0028 H'1FD8 0028 16 H'0000 H'0000 Held Held Pclk
  38608.  
  38609. TMU TCPR2 H'FFD8 002C H'1FD8 002C 32 Held Held Held Held Pclk
  38610.  
  38611. SCI SCSMR1 H'FFE0 0000 H'1FE0 0000 8 H'00 H'00 Held H'00 Pclk
  38612.  
  38613. SCI SCBRR1 H'FFE0 0004 H'1FE0 0004 8 H'FF H'FF Held H'FF Pclk
  38614.  
  38615. SCI SCSCR1 H'FFE0 0008 H'1FE0 0008 8 H'00 H'00 Held H'00 Pclk
  38616.  
  38617. SCI SCTDR1 H'FFE0 000C H'1FE0 000C 8 H'FF H'FF Held H'FF Pclk
  38618.  
  38619. SCI SCSSR1 H'FFE0 0010 H'1FE0 0010 8 H'84 H'84 Held H'84 Pclk
  38620.  
  38621. SCI SCRDR1 H'FFE0 0014 H'1FE0 0014 8 H'00 H'00 Held H'00 Pclk
  38622.  
  38623. SCI SCSCMR1 H'FFE0 0018 H'1FE0 0018 8 H'00 H'00 Held H'00 Pclk
  38624. SCI SCSPTR1 H'FFE0 001C H'1FE0 001C 8 H'00*2 H'00*2 Held H'00*2 Pclk
  38625.  
  38626. SCIF SCSMR2 H'FFE8 0000 H'1FE8 0000 16 H'0000 H'0000 Held Held Pclk
  38627.  
  38628. SCIF SCBRR2 H'FFE8 0004 H'1FE8 0004 8 H'FF H'FF Held Held Pclk
  38629.  
  38630. SCIF SCSCR2 H'FFE8 0008 H'1FE8 0008 16 H'0000 H'0000 Held Held Pclk
  38631.  
  38632. SCIF SCFTDR2 H'FFE8 000C H'1FE8 000C 8 Undefined Undefined Held Held Pclk
  38633.  
  38634. SCIF SCFSR2 H'FFE8 0010 H'1FE8 0010 16 H'0060 H'0060 Held Held Pclk
  38635.  
  38636. SCIF SCFRDR2 H'FFE8 0014 H'1FE8 0014 8 Undefined Undefined Held Held Pclk
  38637.  
  38638. SCIF SCFCR2 H'FFE8 0018 H'1FE8 0018 16 H'0000 H'0000 Held Held Pclk
  38639.  
  38640. SCIF SCFDR2 H'FFE8 001C H'1FE8 001C 16 H'0000 H'0000 Held Held Pclk
  38641. SCIF SCSPTR2 H'FFE8 0020 H'1FE8 0020 16 H'0000*2 H'0000*2 Held Held Pclk
  38642.  
  38643. SCIF SCLSR2 H'FFE8 0024 H'1FE8 0024 16 H'0000 H'0000 Held Held Pclk
  38644.  
  38645. Hitachi- SDIR H'FFF0 0000 H'1FF0 0000 16 H'FFFF*2 Held Held Held Pclk
  38646.  
  38647. UDI
  38648.  
  38649. Hitachi- SDDR H'FFF0 0008 H'1FF0 0008 32 Held Held Held Held Pclk
  38650. UDI
  38651. Notes: 1. With control registers, the above addresses in the physical page number field can be
  38652. accessed by means of a TLB setting. When these addresses are referenced directly
  38653. without using the TLB, operations are limited.
  38654. 2. Includes undefined bits. See the descriptions of the individual modules.
  38655. 3. Use word-size access when writing. Perform the write with the upper byte set to H'5A
  38656. or H'A5, respectively. Byte- and longword-size writes cannot be used.
  38657. Use byte-size access when reading.
  38658.  
  38659. Rev. 2.0, 02/99, page 782 of 830
  38660.  
  38661. ----------------------- Page 797-----------------------
  38662.  
  38663. Appendix B Package Dimensions
  38664.  
  38665. Unit :mm
  38666.  
  38667. 4× 0.20
  38668.  
  38669. 27.0
  38670. A 20 18 16 14 12 10 8 6 4 2
  38671. B 19 17 15 13 11 9 7 5 3 1
  38672.  
  38673. A
  38674. B
  38675. C
  38676. D
  38677. E
  38678. 5 F
  38679. 3 G
  38680. 6
  38681. 0. H
  38682. J
  38683. 0
  38684. . K
  38685. 7 L
  38686. 2
  38687. M
  38688. 7 N
  38689. 2
  38690. 1. P
  38691. R
  38692. T
  38693. U
  38694. V
  38695. W
  38696. Y
  38697.  
  38698. 1 0.635 1.27
  38699. .
  38700. 0.35 C 2
  38701.  
  38702. 0.15 C
  38703.  
  38704. A
  38705. 1
  38706. C .
  38707. 0
  38708.  
  38709. ±
  38710.  
  38711. 0
  38712. 6
  38713. .
  38714. 0
  38715.  
  38716. 256 × φ0.75 ± 0.15 Hitachi Code BP-256
  38717. 0.30 S C A S B S
  38718. 0.10 S C JEDEC Code MO-151
  38719. EIAJ Code –
  38720. Details of the part A Weight 3.0 g
  38721.  
  38722. Figure B.1 Package Dimensions (256-Pin BGA)
  38723.  
  38724. Rev. 2.0, 02/99, page 783 of 830
  38725.  
  38726. ----------------------- Page 798-----------------------
  38727.  
  38728. 30.6 ± 0.2 Unit: mm
  38729.  
  38730. 28
  38731.  
  38732. 156 105
  38733.  
  38734. 157 104
  38735.  
  38736. 2
  38737. .
  38738. 0
  38739.  
  38740. ±
  38741.  
  38742. 6
  38743. . 5
  38744. 0 .
  38745. 3 0
  38746.  
  38747. 208 53
  38748. x
  38749. a
  38750. 1 52 M 5 4
  38751. 0.22 ± 0.05 0 0
  38752. 0.10 M 0 6 0 0. .
  38753. 0.20 ± 0.04 2. 5. ± ± 1.25 1.3
  38754. 3
  38755. 3 7 5
  38756. 1 1
  38757. . . 0° – 8°
  38758. 0 0
  38759.  
  38760.  
  38761. 0 5
  38762. 1. 1. 0.5 ± 0.1
  38763. 0 0
  38764. 0.10 + –
  38765. 5
  38766. 1 Hitachi Code FP-208E
  38767. .
  38768. 0 JEDEC —
  38769.  
  38770. Dimension including the plating thickness EIAJ Conforms
  38771. Base material dimension Weight (reference value) 5.3 g
  38772.  
  38773. Figure B.2 Package Dimensions (208-Pin QFP)
  38774.  
  38775. Rev. 2.0, 02/99, page 784 of 830
  38776.  
  38777. ----------------------- Page 799-----------------------
  38778.  
  38779. Appendix C Mode Pin Settings
  38780.  
  38781. The MD8–MD0 pin values are input in the event of a power-on reset via the 5(6(7 or
  38782. SCK2/05(6(7 pin.
  38783.  
  38784. Clock Modes
  38785.  
  38786. Pin Values Frequency PLL1 PLL2 Initial Clock Frequency
  38787. Divider 1 Ratio*2
  38788.  
  38789. Mode MD2 MD1 MD0 CPU Bus Peripheral
  38790. Clock Clock Module
  38791. Clock
  38792.  
  38793. 0 0 0 0 Off On On 6 3/2 3/2
  38794.  
  38795. 1 0 0 1 Off On On 6 1 1
  38796.  
  38797. 2 0 1 0 On On On 3 1 1/2
  38798.  
  38799. 3 0 1 1 Off On On 6 2 1
  38800.  
  38801. 4 1 0 0 On On On 3 3/2 3/4
  38802.  
  38803. 5 1 0 1 Off On On 6 3 3/2
  38804.  
  38805. Notes: 1. MD2–MD0 pin value combinations other than those shown above cannot be set.
  38806. 2. Taking the input clock (EXTAL or crystal resonator frequency) as 1.
  38807.  
  38808. Area 0 Bus Width
  38809.  
  38810. Pin Value
  38811.  
  38812. MD4 MD3 Bus Width
  38813.  
  38814. 0 0 64 bits
  38815.  
  38816. 1 8 bits
  38817.  
  38818. 1 0 16 bits
  38819.  
  38820. 1 32 bits
  38821.  
  38822. Endian
  38823.  
  38824. Pin Value
  38825.  
  38826. MD5 Endian
  38827.  
  38828. 0 Big endian
  38829.  
  38830. 1 Little endian
  38831.  
  38832. Rev. 2.0, 02/99, page 785 of 830
  38833.  
  38834. ----------------------- Page 800-----------------------
  38835.  
  38836. Area 0 Memory Type
  38837.  
  38838. Pin Value
  38839.  
  38840. MD6 Memory Type
  38841.  
  38842. 0 MPX bus
  38843.  
  38844. 1 Normal memory
  38845.  
  38846. Master/Slave
  38847.  
  38848. Pin Value
  38849.  
  38850. MD7 Master/Slave
  38851.  
  38852. 0 Slave
  38853.  
  38854. 1 Master
  38855.  
  38856. Clock Input
  38857.  
  38858. Pin Value
  38859.  
  38860. MD8 Clock Input
  38861.  
  38862. 0 External input clock
  38863.  
  38864. 1 Crystal resonator
  38865.  
  38866. Rev. 2.0, 02/99, page 786 of 830
  38867.  
  38868. ----------------------- Page 801-----------------------
  38869.  
  38870. Appendix D &.,2(1% Pin Configuration
  38871.  
  38872. SH7750 VDDQ
  38873. rd_pullup_control
  38874.  
  38875. rd_dt_ RD/CASS/FRAME
  38876.  
  38877. rd_hiz_control VDDQ
  38878.  
  38879. RD2
  38880.  
  38881. VDDQ
  38882. rdwr_pullup_control
  38883.  
  38884. rdwr_dt_ RD/WR
  38885.  
  38886. rdwr_hiz_control VDDQ
  38887.  
  38888. RD/WR2
  38889.  
  38890. PLL2
  38891. Bus clock CKIO
  38892.  
  38893. ckio_hiz_control
  38894.  
  38895. CKIO2
  38896.  
  38897. VDDQ
  38898.  
  38899. VSSQ
  38900.  
  38901. CKIO2ENB
  38902.  
  38903. Figure D.1 &.,2(1% Pin Configuration
  38904. &.,2(1%
  38905.  
  38906. Rev. 2.0, 02/99, page 787 of 830
  38907.  
  38908. ----------------------- Page 802-----------------------
  38909.  
  38910. &.,2(1% Description
  38911. &.,2(1%
  38912.  
  38913. 0 5' , RD/:5 , and CKIO2 have the same pin states as 5' , RD/:5 , and
  38914. CKIO, respectively
  38915.  
  38916. 1 5' , RD/:5 , and CKIO2 are in the high-impedance state
  38917.  
  38918. Note: CKIO is fed back to PLL2 to coordinate the external clock and internal clock phases.
  38919. However, CKIO2 is not fed back.
  38920.  
  38921. Rev. 2.0, 02/99, page 788 of 830
  38922.  
  38923. ----------------------- Page 803-----------------------
  38924.  
  38925. Appendix E Pin Functions
  38926.  
  38927. E.1 Pin States
  38928.  
  38929. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State
  38930.  
  38931. Signal Name I/O Reset Reset Sleep Standby Bus Notes
  38932. (Power-On) (Manual) Released
  38933.  
  38934. Master Slave Master Slave
  38935.  
  38936. D0–D7 I/O Z Z Z Z Z Z Z
  38937.  
  38938. D8–D15 I/O Z Z Z Z Z Z Z
  38939.  
  38940. D16–D23 I/O Z Z Z Z Z Z Z
  38941.  
  38942. D24–D31 I/O Z Z Z Z Z Z Z
  38943.  
  38944. D32–D39 I/O Z Z ZK ZK ZK ZK ZK Output
  38945. state held
  38946. when
  38947. used as
  38948. port
  38949.  
  38950. D40–D47 I/O Z Z ZK ZK ZK ZK ZK Output
  38951. state held
  38952. when
  38953. used as
  38954. port
  38955.  
  38956. D48–D55 I/O Z Z Z Z Z Z Z
  38957.  
  38958. D56–D63 I/O Z Z Z Z Z Z Z
  38959.  
  38960. A0, A1, A18–A25 O Z Z Z Z Z Z Z
  38961. A2–A17 O Z Z ZO*9 Z O ZO*7 Z
  38962.  
  38963. 5(6(7 I I I I I I I I
  38964.  
  38965. %$&./%65(4 O H H H H O H O
  38966.  
  38967. %5(4/%6$&. I I I I I I I I
  38968. %6 O H Z H Z O*4 ZH*7 Z
  38969.  
  38970. CKE O H Z O*6 Z O*6 L O*6
  38971.  
  38972. &6–&6 O H Z H Z O*4 ZH*7 Z
  38973.  
  38974. 5$6 O H Z O*6 Z O*4 ZO*5 ZO*5
  38975.  
  38976. 5'/&$66 O H Z O*6 Z O*4 ZO*5 ZO*5
  38977.  
  38978. RD/:5 O H Z H Z O*4 ZH*7 Z
  38979.  
  38980. 5'< I I I I I I I I
  38981.  
  38982. Rev. 2.0, 02/99, page 789 of 830
  38983.  
  38984. ----------------------- Page 804-----------------------
  38985.  
  38986. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  38987.  
  38988. Signal Name I/O Reset Reset Sleep Standby Bus Notes
  38989. (Power-On) (Manual) Released
  38990.  
  38991. Master Slave Master Slave
  38992. :(/&$6/DQM7 O H Z O*6 Z O*4 ZO*5 ZO*5
  38993.  
  38994. :(/&$6/DQM6 O H Z O*6 Z O*4 ZO*5 ZO*5
  38995.  
  38996. :(/&$6/DQM5 O H Z O*6 Z O*4 ZO*5 ZO*5
  38997.  
  38998. :(/&$6/DQM4 O H Z O*6 Z O*4 ZO*5 ZO*5
  38999.  
  39000. :(/&$6/DQM3 O H Z O*6 Z O*4 ZO*5 ZO*5
  39001.  
  39002. :(/&$6/DQM2 O H Z O*6 Z O*4 ZO*5 ZO*5
  39003.  
  39004. :(/&$6/DQM1 O H Z O*6 Z O*4 ZO*5 ZO*5
  39005.  
  39006. :(/&$6/DQM0 O H Z O*6 Z O*4 ZO*5 ZO*5
  39007.  
  39008. DACK1–DACK0 O L L L L O*4 ZO*8 O DMAC
  39009.  
  39010. MD7/TXD I/O I I I I IO ZO*8 IO SCI
  39011.  
  39012. MD6/,2,6 I I I I I I I I PCMCIA
  39013. (I/O)
  39014.  
  39015. 1 6 4 5 5
  39016. MD5/5$6 I/O* I I IO* I IO* IO* IO* DRAM2
  39017.  
  39018. 2 4 7
  39019. MD4/&(% I/O* I I IH I IO* IH* I PCMCIA
  39020.  
  39021. 3 4 7
  39022. MD3/&($ I/O* I I IH I IO* IH* I PCMCIA
  39023. CKIO O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39024.  
  39025. STATUS1– O O O O O O O O
  39026. STATUS0
  39027.  
  39028. ,5/–,5/ I I I I I I I I INTC
  39029.  
  39030. NMI I I I I I I I I INTC
  39031.  
  39032. '5(4–'5(4 I I I I I I I I DMAC
  39033. DRAK1–DRAK0 O L L L L O*4 ZO*8 O DMAC
  39034.  
  39035. MD0/SCK I/O I I I I IO IO*8 IO SCI
  39036.  
  39037. RXD I I I I I I I I SCI
  39038.  
  39039. SCK2/05(6(7 I I I I I I I I SCIF
  39040. MD1/TXD2 I/O I I I I IO IO*8 IO SCIF
  39041.  
  39042. MD2/RXD2 I I I I I I I I SCIF
  39043. &76 I/O I I I I IO IO*8 IO SCIF
  39044.  
  39045. MD8/576 I/O I I I I IO IO*8 IO SCIF
  39046.  
  39047. TCLK I/O I I I I IO IO IO TMU
  39048.  
  39049. Rev. 2.0, 02/99, page 790 of 830
  39050.  
  39051. ----------------------- Page 805-----------------------
  39052.  
  39053. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  39054.  
  39055. Signal Name I/O Reset Reset Sleep Standby Bus Notes
  39056. (Power-On) (Manual) Released
  39057.  
  39058. Master Slave Master Slave
  39059.  
  39060. TDO I/O O O O O O O O Hitachi-
  39061. UDI
  39062.  
  39063. TMS I I I I I I I I Hitachi-
  39064. UDI
  39065.  
  39066. TCK I I I I I I I I Hitachi-
  39067. UDI
  39068.  
  39069. TDI I I I I I I I I Hitachi-
  39070. UDI
  39071.  
  39072. 7567 I I I I I I I I Hitachi-
  39073. UDI
  39074. CKIO2*10 O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39075.  
  39076. 5'*10 O H Z O*6 Z O*4 ZO*5 ZO*5
  39077.  
  39078. RD/:5*10 O H Z H Z O*4 ZH*7 Z
  39079.  
  39080. &.,2(1% I I I I I I I I
  39081.  
  39082. Notes: I: Input
  39083. O: Output
  39084. H: High-level output
  39085. L: Low-level output
  39086. Z: High-impedance
  39087. K: Output state held
  39088.  
  39089. 1. Output when area 2 DRAM is used.
  39090. 2. Output when area 5 PCMCIA is used.
  39091. 3. Output when area 6 PCMCIA is used.
  39092. 4. Depends on refresh and DMAC operations.
  39093. 5. Z (I) or O (refresh), depending on register setting (BCR1.HIZCNT).
  39094. 6. Depends on refresh operation.
  39095. 7. Z (I) or H (state held), depending on register setting (BCR1.HIZMEM).
  39096. 8. Z or O, depending on register setting (STBCR.PHZ).
  39097. 9. Output when refreshing is set.
  39098. 10. Operation in respective state when &.,2(1% = 0; Z when &.,2(1% = 1.
  39099. 11. Z or O, depending on register setting (FRQCR.CKOEN).
  39100.  
  39101. Rev. 2.0, 02/99, page 791 of 830
  39102.  
  39103. ----------------------- Page 806-----------------------
  39104.  
  39105. E.2 Handling of Unused Pins
  39106.  
  39107. • When RTC is not used
  39108.  EXTAL2: Pull up to 3.3 V
  39109.  XTAL2: Leave unconnected
  39110.  VDD-RTC: Power supply (3.3 V)
  39111.  VSS-RTC: Power supply (0 V)
  39112. • When PLL1 is not used
  39113.  VDD-PLL1: Power supply (3.3 V)
  39114.  VSS-PLL1: Power supply (0 V)
  39115. • When PLL2 is not used
  39116.  VDD-PLL2: Power supply (3.3 V)
  39117.  VSS-PLL2: Power supply (0 V)
  39118. • When on-chip crystal oscillator is not used
  39119.  XTAL: Leave unconnected
  39120.  VDD-CPG: Power supply (3.3 V)
  39121.  VSS-CPG: Power supply (0 V)
  39122.  
  39123. Rev. 2.0, 02/99, page 792 of 830
  39124.  
  39125. ----------------------- Page 807-----------------------
  39126.  
  39127. Appendix F Synchronous DRAM Address
  39128. Multiplexing Tables
  39129.  
  39130. (1) BUS 64 (16M: 512k × 16b × 2) × 4
  39131. AMX 0 AMXEXT 0 16M, column-addr-8bit 8MB
  39132.  
  39133. SH7750 Address Pins Synchronous DRAM Function
  39134. Address Pins
  39135.  
  39136. RAS Cycle CAS Cycle
  39137.  
  39138. A14 A22 A22 A11 BANK selects bank address
  39139.  
  39140. A13 A21 H/L A10 Address precharge setting
  39141.  
  39142. A12 A20 0 A9 Address
  39143.  
  39144. A11 A19 0 A8
  39145.  
  39146. A10 A18 A10 A7
  39147.  
  39148. A9 A17 A9 A6
  39149.  
  39150. A8 A16 A8 A5
  39151.  
  39152. A7 A15 A7 A4
  39153.  
  39154. A6 A14 A6 A3
  39155.  
  39156. A5 A13 A5 A2
  39157.  
  39158. A4 A12 A4 A1
  39159.  
  39160. A3 A11 A3 A0
  39161.  
  39162. A2 Not used
  39163.  
  39164. A1 Not used
  39165.  
  39166. A0 Not used
  39167.  
  39168. Rev. 2.0, 02/99, page 793 of 830
  39169.  
  39170. ----------------------- Page 808-----------------------
  39171.  
  39172. (2) BUS 32 (16M: 512k × 16b × 2) × 2
  39173. AMX 0 AMXEXT 0 16M, column-addr-8bit 4MB
  39174.  
  39175. SH7750 Address Pins Synchronous DRAM Function
  39176. Address Pins
  39177.  
  39178. RAS Cycle CAS Cycle
  39179.  
  39180. A14
  39181.  
  39182. A13 A21 A21 A11 BANK selects bank address
  39183.  
  39184. A12 A20 H/L A10 Address precharge setting
  39185.  
  39186. A11 A19 0 A9 Address
  39187.  
  39188. A10 A18 0 A8
  39189.  
  39190. A9 A17 A9 A7
  39191.  
  39192. A8 A16 A8 A6
  39193.  
  39194. A7 A15 A7 A5
  39195.  
  39196. A6 A14 A6 A4
  39197.  
  39198. A5 A13 A5 A3
  39199.  
  39200. A4 A12 A4 A2
  39201.  
  39202. A3 A11 A3 A1
  39203.  
  39204. A2 A10 A2 A0
  39205.  
  39206. A1 Not used
  39207.  
  39208. A0 Not used
  39209.  
  39210. Rev. 2.0, 02/99, page 794 of 830
  39211.  
  39212. ----------------------- Page 809-----------------------
  39213.  
  39214. (3) BUS 64 (16M: 512k × 16b × 2) × 4
  39215. AMX 0 AMXEXT 1 16M, column-addr-8bit 8MB
  39216.  
  39217. SH7750 Address Pins Synchronous DRAM Function
  39218. Address Pins
  39219.  
  39220. RAS Cycle CAS Cycle
  39221.  
  39222. A14 A21 A21 A11 BANK selects bank address
  39223.  
  39224. A13 A22 H/L A10 Address precharge setting
  39225.  
  39226. A12 A20 0 A9 Address
  39227.  
  39228. A11 A19 0 A8
  39229.  
  39230. A10 A18 A10 A7
  39231.  
  39232. A9 A17 A9 A6
  39233.  
  39234. A8 A16 A8 A5
  39235.  
  39236. A7 A15 A7 A4
  39237.  
  39238. A6 A14 A6 A3
  39239.  
  39240. A5 A13 A5 A2
  39241.  
  39242. A4 A12 A4 A1
  39243.  
  39244. A3 A11 A3 A0
  39245.  
  39246. A2 Not used
  39247.  
  39248. A1 Not used
  39249.  
  39250. A0 Not used
  39251.  
  39252. Rev. 2.0, 02/99, page 795 of 830
  39253.  
  39254. ----------------------- Page 810-----------------------
  39255.  
  39256. (4) BUS 32 (16M: 512k × 16b × 2) × 2
  39257. AMX 0 AMXEXT 1 16M, column-addr-8bit 4MB
  39258.  
  39259. SH7750 Address Pins Synchronous DRAM Function
  39260. Address Pins
  39261.  
  39262. RAS Cycle CAS Cycle
  39263.  
  39264. A14
  39265.  
  39266. A13 A20 A20 A11 BANK selects bank address
  39267.  
  39268. A12 A21 H/L A10 Address precharge setting
  39269.  
  39270. A11 A19 0 A9 Address
  39271.  
  39272. A10 A18 0 A8
  39273.  
  39274. A9 A17 A9 A7
  39275.  
  39276. A8 A16 A8 A6
  39277.  
  39278. A7 A15 A7 A5
  39279.  
  39280. A6 A14 A6 A4
  39281.  
  39282. A5 A13 A5 A3
  39283.  
  39284. A4 A12 A4 A2
  39285.  
  39286. A3 A11 A3 A1
  39287.  
  39288. A2 A10 A2 A0
  39289.  
  39290. A1 Not used
  39291.  
  39292. A0 Not used
  39293.  
  39294. Rev. 2.0, 02/99, page 796 of 830
  39295.  
  39296. ----------------------- Page 811-----------------------
  39297.  
  39298. (5) BUS 64 (16M: 1M × 8b × 2) × 8
  39299. AMX 1 AMXEXT 0 16M, column-addr-9bit 16MB
  39300.  
  39301. SH7750 Address Pins Synchronous DRAM Function
  39302. Address Pins
  39303.  
  39304. RAS Cycle CAS Cycle
  39305.  
  39306. A14 A23 A23 A11 BANK selects bank address
  39307.  
  39308. A13 A22 H/L A10 Address precharge setting
  39309.  
  39310. A12 A21 0 A9 Address
  39311.  
  39312. A11 A20 A11 A8
  39313.  
  39314. A10 A19 A10 A7
  39315.  
  39316. A9 A18 A9 A6
  39317.  
  39318. A8 A17 A8 A5
  39319.  
  39320. A7 A16 A7 A4
  39321.  
  39322. A6 A15 A6 A3
  39323.  
  39324. A5 A14 A5 A2
  39325.  
  39326. A4 A13 A4 A1
  39327.  
  39328. A3 A12 A3 A0
  39329.  
  39330. A2 Not used
  39331.  
  39332. A1 Not used
  39333.  
  39334. A0 Not used
  39335.  
  39336. Rev. 2.0, 02/99, page 797 of 830
  39337.  
  39338. ----------------------- Page 812-----------------------
  39339.  
  39340. (6) BUS 32 (16M: 1M × 8b × 2) × 4
  39341. AMX 1 AMXEXT 0 16M, column-addr-9bit 8MB
  39342.  
  39343. SH7750 Address Pins Synchronous DRAM Function
  39344. Address Pins
  39345.  
  39346. RAS Cycle CAS Cycle
  39347.  
  39348. A14
  39349.  
  39350. A13 A22 A22 A11 BANK selects bank address
  39351.  
  39352. A12 A21 H/L A10 Address precharge setting
  39353.  
  39354. A11 A20 0 A9 Address
  39355.  
  39356. A10 A19 A10 A8
  39357.  
  39358. A9 A18 A9 A7
  39359.  
  39360. A8 A17 A8 A6
  39361.  
  39362. A7 A16 A7 A5
  39363.  
  39364. A6 A15 A6 A4
  39365.  
  39366. A5 A14 A5 A3
  39367.  
  39368. A4 A13 A4 A2
  39369.  
  39370. A3 A12 A3 A1
  39371.  
  39372. A2 A11 A2 A0
  39373.  
  39374. A1 Not used
  39375.  
  39376. A0 Not used
  39377.  
  39378. Rev. 2.0, 02/99, page 798 of 830
  39379.  
  39380. ----------------------- Page 813-----------------------
  39381.  
  39382. (7) BUS 64 (16M: 1M × 8b × 2) × 8
  39383. AMX 1 AMXEXT 1 16M, column-addr-9bit 16MB
  39384.  
  39385. SH7750 Address Pins Synchronous DRAM Function
  39386. Address Pins
  39387.  
  39388. RAS Cycle CAS Cycle
  39389.  
  39390. A14 A22 A22 A11 BANK selects bank address
  39391.  
  39392. A13 A23 H/L A10 Address precharge setting
  39393.  
  39394. A12 A21 0 A9 Address
  39395.  
  39396. A11 A20 A11 A8
  39397.  
  39398. A10 A19 A10 A7
  39399.  
  39400. A9 A18 A9 A6
  39401.  
  39402. A8 A17 A8 A5
  39403.  
  39404. A7 A16 A7 A4
  39405.  
  39406. A6 A15 A6 A3
  39407.  
  39408. A5 A14 A5 A2
  39409.  
  39410. A4 A13 A4 A1
  39411.  
  39412. A3 A12 A3 A0
  39413.  
  39414. A2 Not used
  39415.  
  39416. A1 Not used
  39417.  
  39418. A0 Not used
  39419.  
  39420. Rev. 2.0, 02/99, page 799 of 830
  39421.  
  39422. ----------------------- Page 814-----------------------
  39423.  
  39424. (8) BUS 32 (16M: 1M × 8b × 2) × 4
  39425. AMX 1 AMXEXT 1 16M, column-addr-9bit 8MB
  39426.  
  39427. SH7750 Address Pins Synchronous DRAM Function
  39428. Address Pins
  39429.  
  39430. RAS Cycle CAS Cycle
  39431.  
  39432. A14
  39433.  
  39434. A13 A21 A21 A11 BANK selects bank address
  39435.  
  39436. A12 A22 H/L A10 Address precharge setting
  39437.  
  39438. A11 A20 0 A9 Address
  39439.  
  39440. A10 A19 A10 A8
  39441.  
  39442. A9 A18 A9 A7
  39443.  
  39444. A8 A17 A8 A6
  39445.  
  39446. A7 A16 A7 A5
  39447.  
  39448. A6 A15 A6 A4
  39449.  
  39450. A5 A14 A5 A3
  39451.  
  39452. A4 A13 A4 A2
  39453.  
  39454. A3 A12 A3 A1
  39455.  
  39456. A2 A11 A2 A0
  39457.  
  39458. A1 Not used
  39459.  
  39460. A0 Not used
  39461.  
  39462. Rev. 2.0, 02/99, page 800 of 830
  39463.  
  39464. ----------------------- Page 815-----------------------
  39465.  
  39466. (9) BUS 64 (64M: 1M × 16b × 4) × 4
  39467. AMX 2 64M, column-addr-8bit 32MB
  39468.  
  39469. SH7750 Address Pins Synchronous DRAM Function
  39470. Address Pins
  39471.  
  39472. RAS Cycle CAS Cycle
  39473.  
  39474. A16 A24 A24 A13 BANK selects bank address
  39475.  
  39476. A15 A23 A23 A12
  39477.  
  39478. A14 A22 0 A11 Address precharge setting
  39479.  
  39480. A13 A21 H/L A10
  39481.  
  39482. A12 A20 0 A9 Address
  39483.  
  39484. A11 A19 0 A8
  39485.  
  39486. A10 A18 A10 A7
  39487.  
  39488. A9 A17 A9 A6
  39489.  
  39490. A8 A16 A8 A5
  39491.  
  39492. A7 A15 A7 A4
  39493.  
  39494. A6 A14 A6 A3
  39495.  
  39496. A5 A13 A5 A2
  39497.  
  39498. A4 A12 A4 A1
  39499.  
  39500. A3 A11 A3 A0
  39501.  
  39502. A2 Not used
  39503.  
  39504. A1 Not used
  39505.  
  39506. A0 Not used
  39507.  
  39508. Rev. 2.0, 02/99, page 801 of 830
  39509.  
  39510. ----------------------- Page 816-----------------------
  39511.  
  39512. (10) BUS 32 (64M: 1M × 16b × 4) × 2
  39513. AMX 2 64M, column-addr-8bit 16MB
  39514.  
  39515. SH7750 Address Pins Synchronous DRAM Function
  39516. Address Pins
  39517.  
  39518. RAS Cycle CAS Cycle
  39519.  
  39520. A16
  39521.  
  39522. A15 A23 A23 A13 BANK selects bank address
  39523.  
  39524. A14 A22 A22 A12
  39525.  
  39526. A13 A21 0 A11 Address precharge setting
  39527.  
  39528. A12 A20 H/L A10
  39529.  
  39530. A11 A19 0 A9 Address
  39531.  
  39532. A10 A18 0 A8
  39533.  
  39534. A9 A17 A9 A7
  39535.  
  39536. A8 A16 A8 A6
  39537.  
  39538. A7 A15 A7 A5
  39539.  
  39540. A6 A14 A6 A4
  39541.  
  39542. A5 A13 A5 A3
  39543.  
  39544. A4 A12 A4 A2
  39545.  
  39546. A3 A11 A3 A1
  39547.  
  39548. A2 A10 A2 A0
  39549.  
  39550. A1 Not used
  39551.  
  39552. A0 Not used
  39553.  
  39554. Rev. 2.0, 02/99, page 802 of 830
  39555.  
  39556. ----------------------- Page 817-----------------------
  39557.  
  39558. (11) BUS 64 (64M: 2M × 8b × 4) × 8
  39559. AMX 3 64M, column-addr-9bit 64MB
  39560.  
  39561. SH7750 Address Pins Synchronous DRAM Function
  39562. Address Pins
  39563.  
  39564. RAS Cycle CAS Cycle
  39565.  
  39566. A16 A25 A25 A13 BANK selects bank address
  39567.  
  39568. A15 A24 A24 A12
  39569.  
  39570. A14 A23 0 A11 Address precharge setting
  39571.  
  39572. A13 A22 H/L A10
  39573.  
  39574. A12 A21 0 A9 Address
  39575.  
  39576. A11 A20 A11 A8
  39577.  
  39578. A10 A19 A10 A7
  39579.  
  39580. A9 A18 A9 A6
  39581.  
  39582. A8 A17 A8 A5
  39583.  
  39584. A7 A16 A7 A4
  39585.  
  39586. A6 A15 A6 A3
  39587.  
  39588. A5 A14 A5 A2
  39589.  
  39590. A4 A13 A4 A1
  39591.  
  39592. A3 A12 A3 A0
  39593.  
  39594. A2 Not used
  39595.  
  39596. A1 Not used
  39597.  
  39598. A0 Not used
  39599.  
  39600. Rev. 2.0, 02/99, page 803 of 830
  39601.  
  39602. ----------------------- Page 818-----------------------
  39603.  
  39604. (12) BUS 32 (64M: 2M × 8b × 4) × 4
  39605. AMX 3 64M, column-addr-9bit 32MB
  39606.  
  39607. SH7750 Address Pins Synchronous DRAM Function
  39608. Address Pins
  39609.  
  39610. RAS Cycle CAS Cycle
  39611.  
  39612. A16
  39613.  
  39614. A15 A24 A24 A13 BANK selects bank address
  39615.  
  39616. A14 A23 A23 A12
  39617.  
  39618. A13 A22 0 A11 Address precharge setting
  39619.  
  39620. A12 A21 H/L A10
  39621.  
  39622. A11 A20 0 A9 Address
  39623.  
  39624. A10 A19 A10 A8
  39625.  
  39626. A9 A18 A9 A7
  39627.  
  39628. A8 A17 A8 A6
  39629.  
  39630. A7 A16 A7 A5
  39631.  
  39632. A6 A15 A6 A4
  39633.  
  39634. A5 A14 A5 A3
  39635.  
  39636. A4 A13 A4 A2
  39637.  
  39638. A3 A12 A3 A1
  39639.  
  39640. A2 A11 A2 A0
  39641.  
  39642. A1 Not used
  39643.  
  39644. A0 Not used
  39645.  
  39646. Rev. 2.0, 02/99, page 804 of 830
  39647.  
  39648. ----------------------- Page 819-----------------------
  39649.  
  39650. (13) BUS 64 (64M: 512k × 32b × 4) × 2
  39651. AMX 4 64M, column-addr-8bit 16MB
  39652.  
  39653. SH7750 Address Pins Synchronous DRAM Function
  39654. Address Pins
  39655.  
  39656. RAS Cycle CAS Cycle
  39657.  
  39658. A15 A23 A23 A12 BANK selects bank address
  39659.  
  39660. A14 A22 A22 A11
  39661.  
  39662. A13 A21 H/L A10 Address precharge setting
  39663.  
  39664. A12 A20 0 A9 Address
  39665.  
  39666. A11 A19 0 A8
  39667.  
  39668. A10 A18 A10 A7
  39669.  
  39670. A9 A17 A9 A6
  39671.  
  39672. A8 A16 A8 A5
  39673.  
  39674. A7 A15 A7 A4
  39675.  
  39676. A6 A14 A6 A3
  39677.  
  39678. A5 A13 A5 A2
  39679.  
  39680. A4 A12 A4 A1
  39681.  
  39682. A3 A11 A3 A0
  39683.  
  39684. A2 Not used
  39685.  
  39686. A1 Not used
  39687.  
  39688. A0 Not used
  39689.  
  39690. Rev. 2.0, 02/99, page 805 of 830
  39691.  
  39692. ----------------------- Page 820-----------------------
  39693.  
  39694. (14) BUS 32 (64M: 512k × 32b × 4) × 1
  39695. AMX 4 64M, column-addr-8bit 8MB
  39696.  
  39697. SH7750 Address Pins Synchronous DRAM Function
  39698. Address Pins
  39699.  
  39700. RAS Cycle CAS Cycle
  39701.  
  39702. A15
  39703.  
  39704. A14 A22 A22 A12 BANK selects bank address
  39705.  
  39706. A13 A21 A21 A11
  39707.  
  39708. A12 A20 H/L A10 Address precharge setting
  39709.  
  39710. A11 A19 0 A9 Address
  39711.  
  39712. A10 A18 0 A8
  39713.  
  39714. A9 A17 A9 A7
  39715.  
  39716. A8 A16 A8 A6
  39717.  
  39718. A7 A15 A7 A5
  39719.  
  39720. A6 A14 A6 A4
  39721.  
  39722. A5 A13 A5 A3
  39723.  
  39724. A4 A12 A4 A2
  39725.  
  39726. A3 A11 A3 A1
  39727.  
  39728. A2 A10 A2 A0
  39729.  
  39730. A1 Not used
  39731.  
  39732. A0 Not used
  39733.  
  39734. Rev. 2.0, 02/99, page 806 of 830
  39735.  
  39736. ----------------------- Page 821-----------------------
  39737.  
  39738. (15) BUS 64 (64M: 1M × 32b × 2) × 2
  39739. AMX 5 64M, column-addr-8bit 16MB
  39740.  
  39741. SH7750 Address Pins Synchronous DRAM Function
  39742. Address Pins
  39743.  
  39744. RAS Cycle CAS Cycle
  39745.  
  39746. A15 A23 A23 A12 BANK selects bank address
  39747.  
  39748. A14 A22 0 A11
  39749.  
  39750. A13 A21 H/L A10 Address precharge setting
  39751.  
  39752. A12 A20 0 A9 Address
  39753.  
  39754. A11 A19 0 A8
  39755.  
  39756. A10 A18 A10 A7
  39757.  
  39758. A9 A17 A9 A6
  39759.  
  39760. A8 A16 A8 A5
  39761.  
  39762. A7 A15 A7 A4
  39763.  
  39764. A6 A14 A6 A3
  39765.  
  39766. A5 A13 A5 A2
  39767.  
  39768. A4 A12 A4 A1
  39769.  
  39770. A3 A11 A3 A0
  39771.  
  39772. A2 Not used
  39773.  
  39774. A1 Not used
  39775.  
  39776. A0 Not used
  39777.  
  39778. Rev. 2.0, 02/99, page 807 of 830
  39779.  
  39780. ----------------------- Page 822-----------------------
  39781.  
  39782. (16) BUS 32 (64M: 1M × 32b × 2) × 1
  39783. AMX 5 64M, column-addr-8bit 8MB
  39784.  
  39785. SH7750 Address Pins Synchronous DRAM Function
  39786. Address Pins
  39787.  
  39788. RAS Cycle CAS Cycle
  39789.  
  39790. A15
  39791.  
  39792. A14 A22 A22 A12 BANK selects bank address
  39793.  
  39794. A13 A21 0 A11
  39795.  
  39796. A12 A20 H/L A10 Address precharge setting
  39797.  
  39798. A11 A19 0 A9 Address
  39799.  
  39800. A10 A18 0 A8
  39801.  
  39802. A9 A17 A9 A7
  39803.  
  39804. A8 A16 A8 A6
  39805.  
  39806. A7 A15 A7 A5
  39807.  
  39808. A6 A14 A6 A4
  39809.  
  39810. A5 A13 A5 A3
  39811.  
  39812. A4 A12 A4 A2
  39813.  
  39814. A3 A11 A3 A1
  39815.  
  39816. A2 A10 A2 A0
  39817.  
  39818. A1 Not used
  39819.  
  39820. A0 Not used
  39821.  
  39822. Rev. 2.0, 02/99, page 808 of 830
  39823.  
  39824. ----------------------- Page 823-----------------------
  39825.  
  39826. (17) BUS 64 (16M: 256k × 32b × 2) × 2
  39827. AMX 7 16M, column-addr-8bit 4MB
  39828.  
  39829. SH7750 Address Pins Synchronous DRAM Function
  39830. Address Pins
  39831.  
  39832. RAS Cycle CAS Cycle
  39833.  
  39834. A13 A21 A21 A10 BANK selects bank address
  39835.  
  39836. A12 A20 H/L A9 Address precharge setting
  39837.  
  39838. A11 A19 0 A8 Address
  39839.  
  39840. A10 A18 A10 A7
  39841.  
  39842. A9 A17 A9 A6
  39843.  
  39844. A8 A16 A8 A5
  39845.  
  39846. A7 A15 A7 A4
  39847.  
  39848. A6 A14 A6 A3
  39849.  
  39850. A5 A13 A5 A2
  39851.  
  39852. A4 A12 A4 A1
  39853.  
  39854. A3 A11 A3 A0
  39855.  
  39856. A2 Not used
  39857.  
  39858. A1 Not used
  39859.  
  39860. A0 Not used
  39861.  
  39862. Rev. 2.0, 02/99, page 809 of 830
  39863.  
  39864. ----------------------- Page 824-----------------------
  39865.  
  39866. (18) BUS 32 (16M: 256k × 32b × 2) × 1
  39867. AMX 7 16M, column-addr-8bit 2MB
  39868.  
  39869. SH7750 Address Pins Synchronous DRAM Function
  39870. Address Pins
  39871.  
  39872. RAS Cycle CAS Cycle
  39873.  
  39874. A13
  39875.  
  39876. A12 A20 A20 A10 BANK selects bank address
  39877.  
  39878. A11 A19 H/L A9 Address precharge setting
  39879.  
  39880. A10 A18 0 A8 Address
  39881.  
  39882. A9 A17 A9 A7
  39883.  
  39884. A8 A16 A8 A6
  39885.  
  39886. A7 A15 A7 A5
  39887.  
  39888. A6 A14 A6 A4
  39889.  
  39890. A5 A13 A5 A3
  39891.  
  39892. A4 A12 A4 A2
  39893.  
  39894. A3 A11 A3 A1
  39895.  
  39896. A2 A10 A2 A0
  39897.  
  39898. A1 Not used
  39899.  
  39900. A0 Not used
  39901.  
  39902. Rev. 2.0, 02/99, page 810 of 830
  39903.  
  39904. ----------------------- Page 825-----------------------
  39905.  
  39906. Appendix G SH7750 On-Demand Data Transfer Mode
  39907.  
  39908. G.1 Pins in DDT Mode
  39909.  
  39910. Figure G.1 shows the system configuration in DDT mode.
  39911.  
  39912. DBREQ/DREQ0
  39913.  
  39914. BAVL/DRACK0
  39915.  
  39916. TR/DREQ1
  39917.  
  39918. TDACK/DACK0
  39919.  
  39920. SH7750 ID1, ID0/DRAK1, DACK1 External device
  39921.  
  39922. CLK
  39923.  
  39924. D63–D0
  39925.  
  39926. A25–A0, RAS, CAS, WE, DQMn, CKE
  39927.  
  39928. Synchronous
  39929. DRAM
  39930.  
  39931. Figure G.1 System Configuration in On-Demand Data Transfer Mode
  39932.  
  39933. • '%5(4 : Data bus release request signal for transmitting the data transfer request format
  39934. '%5(4
  39935. (DTR format) or a DMA request from an external device to the DMAC
  39936. If there is a wait for release of the data bus, an external device can have the data bus released
  39937. by asserting '%5(4. When '%5(4 is accepted, the BSC asserts %$9/.
  39938.  
  39939. • %$9/ : Data bus D63–D0 release signal
  39940. %$9/
  39941. Assertion of %$9/ means that the data bus will be released two cycles later.
  39942.  
  39943. • 75 : Transfer request signal
  39944. 75
  39945. Assertion of 75 has the following different meanings.
  39946.  In normal data transfer mode (except channel 0), 75 is asserted, and at the same time the
  39947. DTR format is output, two cycles after %$9/ is asserted.
  39948.  In the case of the handshake protocol without use of the data bus, asserting 75 enables a
  39949. transfer request to be issued for the channel for which a transfer request was made
  39950. immediately before. This function can be used only when %$9/ is not asserted two cycles
  39951. earlier.
  39952.  In the case of direct data transfer mode (valid only for channel 2), a direct transfer request
  39953. can be made to channel 2 by asserting '%5(4 and 75 simultaneously.
  39954.  
  39955. Rev. 2.0, 02/99, page 811 of 830
  39956.  
  39957. ----------------------- Page 826-----------------------
  39958.  
  39959. • 7'$&. : Reply strobe signal for external device from DMAC
  39960. 7'$&.
  39961. In the case of a read cycle, the SH7750 asserts 7'$&. in the same cycle in which valid read
  39962. data is carried. In the case of a write cycle, the SH7750 asserts 7'$&. two cycles before the
  39963. valid write data output cycle.
  39964.  
  39965. • ID1, ID0: Channel number notification signals
  39966.  00: Channel 0 (means demand data transfer)
  39967.  01: Channel 1
  39968.  10: Channel 2
  39969.  11: Channel 3
  39970.  
  39971. Data Transfer Request Format
  39972.  
  39973. 63 61 60 59 57 55 48 31 0
  39974.  
  39975. SZ ID MD COUNT (Reserved) ADDRESS
  39976.  
  39977. R/W
  39978.  
  39979. Figure G.2 Data Transfer Request Format
  39980.  
  39981. The data transfer request format (DTR format) consists of 64 bits. In the case of normal data
  39982. transfer mode (channel 0, except channel 0) and the handshake protocol using the data bus, the
  39983. transfer data size, read/write access, channel number, transfer request mode, number of transfers,
  39984. and transfer source or transfer destination address are specified. A specification in bits 47–32 is
  39985. invalid.
  39986.  
  39987. In normal data transfer mode (channel 0), only single address mode can be set. With the DTR
  39988. format, DS = (0: MD = 10, 11, 1: MD = 01), RL = 0, AL = 0, DM[1:0] = 01, SM[1:0] = 01,
  39989. RS[3:0] = (0010: R/W = 0, 0011: R/W = 1), TM = (0: MD = 11, 1: MD = 01, 10), TS[2:0] =
  39990. (SZ), and IE = 0 settings are made in DMA channel control register 0, COUNT is set in transfer
  39991. count register 0, and ADDRESS is set in source/destination address register 0. Therefore, in
  39992. DDT mode, the above control registers cannot be written to by the CPU, but can be read.
  39993.  
  39994. Rev. 2.0, 02/99, page 812 of 830
  39995.  
  39996. ----------------------- Page 827-----------------------
  39997.  
  39998. Bits 63 to 61: Transmit Size (SZ2–SZ0)
  39999. • 000: Byte size (8-bit) specification
  40000. • 001: Word size (16-bit) specification
  40001. • 010: Longword size (32-bit) specification
  40002. • 011: Quadword size (64-bit) specification
  40003. • 100: 32-byte block transfer specification
  40004. • 101: Reserved
  40005. • 110: Reserved
  40006. • 111: Transfer end specification
  40007.  
  40008. Bit 60: Read/Write (R/W)
  40009. • 0: Memory read specification
  40010. • 1: Memory write specification
  40011.  
  40012. Bits 59 and 58: Channel Number (ID1, ID0)
  40013. • 00: Channel 0 (demand data transfer)
  40014. • 01: Channel 1
  40015. • 10: Channel 2
  40016. • 11: Channel 3
  40017.  
  40018. Bits 57 and 56: Transfer Request Mode (MD1, MD0)
  40019. • 00: Handshake protocol (data bus used)
  40020. • 01: Burst mode (edge detection) specification
  40021. • 10: Burst mode (level detection) specification
  40022. • 11: Cycle steal mode specification
  40023.  
  40024. Bits 55 to 48: Transfer Count (COUNT7–COUNT0)
  40025. • 00000000: Maximum number of transfers (16M)
  40026.  
  40027. Bits 47 to 32: Reserved
  40028.  
  40029. Bits 31 to 0: Address (ADDRESS31–ADDRESS0)
  40030. • R/W = 0: Transfer source address specification
  40031. • R/W = 1: Transfer destination address specification
  40032.  
  40033. Notes: 1. Only the ID field is valid for channels 1 to 3.
  40034. 2. To start data transfer on channel 0, the initial value of MD in the DTR format must be
  40035. 01, 10, or 11.
  40036. 3. The COUNT field is ignored if MD = 00.
  40037. 4. In edge-sense burst mode, DMA transfer is executed continuously. In level-sense burst
  40038. mode and cycle steal mode, a handshake protocol is used to transfer each unit of data.
  40039.  
  40040. Rev. 2.0, 02/99, page 813 of 830
  40041.  
  40042. ----------------------- Page 828-----------------------
  40043.  
  40044. 5. The maximum number of transfers can be specified by setting COUNT = 0 as DTR
  40045. format initialization data. If the amount of data to be transferred is unknown, set
  40046. COUNT = 0, start DMA transfer, and transfer the DTR format (ID = 00, MD ≠ 00,
  40047. SZ = 111) when the required amount of data has been transferred. This will terminate
  40048. DMA transfer on channel 0.
  40049. In this case, the TE bit in DMA channel control register 0 is not set, but transfer
  40050. cannot be restarted.
  40051.  
  40052. G.2 Transfer Request Acceptance on Each Channel
  40053.  
  40054. On channel 0, a DMA data transfer request can be made by means of the DTR format. No further
  40055. transfer requests are accepted between DTR format acceptance and the end of the data transfer.
  40056.  
  40057. On channels 1 to 3, output a transfer request from an external device by means of the DTR
  40058. format (ID = 01, 10, or 11) after making DMAC control register settings in the same way as in
  40059. normal DMA mode. Each of channels 1 to 3 has a request queue that can accept up to four
  40060. transfer requests. When a request queue is full, the fifth and subsequent transfer requests will be
  40061. ignored, and so transfer requests must not be output.
  40062.  
  40063. CLK
  40064.  
  40065. DBREQ
  40066.  
  40067. BAVL
  40068.  
  40069. TR
  40070.  
  40071. A25–A0 RA CA
  40072.  
  40073.  
  40074. D63–D0 DTR D0 D1 D2 D3
  40075.  
  40076. RAS,
  40077. CAS, WE BA RD
  40078.  
  40079. TDACK
  40080.  
  40081. ID1, ID0 00
  40082.  
  40083. Figure G.3 Single Address Mode/Burst Mode/External Bus →→ External Device 32-Byte
  40084. Block Transfer/Channel 0 On-Demand Data Transfer
  40085.  
  40086. Rev. 2.0, 02/99, page 814 of 830
  40087.  
  40088. ----------------------- Page 829-----------------------
  40089.  
  40090. CLK
  40091.  
  40092. DBREQ
  40093.  
  40094. BAVL
  40095.  
  40096. TR
  40097.  
  40098. A25–A0 RA CA
  40099.  
  40100.  
  40101. D63–D0 DTR D0 D1 D2 D3
  40102.  
  40103. RAS,
  40104. BA WT
  40105. CAS, WE
  40106.  
  40107. TDACK
  40108.  
  40109. ID1, ID0
  40110.  
  40111. Figure G.4 Single Address Mode/Burst Mode/External Device →→ External Bus 32-Byte
  40112. Block Transfer/Channel 0 On-Demand Data Transfer
  40113.  
  40114. CLK
  40115.  
  40116. DBREQ
  40117.  
  40118. BAVL
  40119.  
  40120. TR
  40121.  
  40122. A25–A0 RA CA CA CA
  40123.  
  40124.  
  40125. D63–D0 DTR D0 D1
  40126.  
  40127. RAS,
  40128. BA RD RD RD
  40129. CAS, WE
  40130.  
  40131. DQMn
  40132.  
  40133. TDACK
  40134.  
  40135. ID1, ID0 00 00
  40136.  
  40137. Figure G.5 Single Address Mode/Burst Mode/External Bus →→ External Device 64-Bit
  40138. Transfer/Channel 0 On-Demand Data Transfer
  40139.  
  40140. Rev. 2.0, 02/99, page 815 of 830
  40141.  
  40142. ----------------------- Page 830-----------------------
  40143.  
  40144. CLK
  40145.  
  40146. DBREQ
  40147.  
  40148. BAVL
  40149.  
  40150. TR
  40151.  
  40152. A25–A0 RA CA CA
  40153.  
  40154.  
  40155. D63–D0 DTR D0 D1
  40156.  
  40157. RAS,
  40158. BA WT WT
  40159. CAS, WE
  40160.  
  40161. DQMn
  40162.  
  40163. TDACK
  40164.  
  40165. ID1, ID0
  40166.  
  40167. Figure G.6 Single Address Mode/Burst Mode/External Device →→ External Bus 64-Bit
  40168. Transfer/Channel 0 On-Demand Data Transfer
  40169.  
  40170. CLK
  40171.  
  40172. DBREQ
  40173.  
  40174. BAVL
  40175.  
  40176. TR
  40177.  
  40178. A25–A0 CA CA
  40179.  
  40180.  
  40181. D63–D0 DTR D0 D1 D2 D3 DTR D0 D1
  40182. MD = 10 or 11 MD = 00
  40183.  
  40184. CMD WT WT
  40185.  
  40186. TDACK
  40187.  
  40188. ID1, ID0
  40189.  
  40190. Start of data transfer Next transfer request
  40191.  
  40192.  
  40193.  
  40194. Figure G.7 Handshake Protocol Using Data Bus
  40195. (Channel 0 On-Demand Data Transfer)
  40196.  
  40197. Rev. 2.0, 02/99, page 816 of 830
  40198.  
  40199. ----------------------- Page 831-----------------------
  40200.  
  40201. CLK
  40202.  
  40203. DBREQ
  40204.  
  40205. BAVL
  40206.  
  40207. TR
  40208.  
  40209. A25–A0 CA CA
  40210.  
  40211.  
  40212. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  40213. MD = 10 or 11
  40214.  
  40215. CMD WT WT
  40216.  
  40217. TDACK
  40218.  
  40219. ID1, ID0
  40220.  
  40221. Start of data transfer Next transfer request
  40222.  
  40223.  
  40224.  
  40225. Figure G.8 Handshake Protocol without Use of Data Bus
  40226. (Channel 0 On-Demand Data Transfer)
  40227.  
  40228. Rev. 2.0, 02/99, page 817 of 830
  40229.  
  40230. ----------------------- Page 832-----------------------
  40231.  
  40232. CLK
  40233.  
  40234. DBREQ
  40235.  
  40236. BAVL
  40237.  
  40238. TR
  40239.  
  40240. A25–A0 RA CA
  40241.  
  40242. D63–D0 D0 D1 D2 D3
  40243.  
  40244. RAS, CAS,
  40245. BA RD
  40246. WE
  40247.  
  40248. Figure G.9 Read from Synchronous DRAM Precharge Bank
  40249.  
  40250. CLK
  40251.  
  40252. DBREQ
  40253.  
  40254. Transfer requests can be accepted
  40255.  
  40256. BAVL
  40257.  
  40258. TR
  40259.  
  40260. A25–A0 RA CA
  40261.  
  40262. D63–D0 D0 D1 D2 D3
  40263.  
  40264. RAS, CAS,
  40265. PCH BA RD
  40266. WE
  40267.  
  40268. Figure G.10 Read from Synchronous DRAM Non-Precharge Bank (Row Miss)
  40269.  
  40270. Rev. 2.0, 02/99, page 818 of 830
  40271.  
  40272. ----------------------- Page 833-----------------------
  40273.  
  40274. CLK
  40275.  
  40276. DBREQ
  40277.  
  40278. BAVL
  40279.  
  40280. TR
  40281.  
  40282. A25–A0 CA
  40283.  
  40284. D63–D0 D0 D1 D2 D3
  40285.  
  40286. RAS, CAS,
  40287. RD
  40288. WE
  40289.  
  40290. Figure G.11 Read from Synchronous DRAM (Row Hit)
  40291.  
  40292. CLK
  40293.  
  40294. DBREQ
  40295.  
  40296. BAVL
  40297.  
  40298. TR
  40299.  
  40300. A25–A0 RA CA
  40301.  
  40302. D63–D0 D0 D1 D2 D3
  40303.  
  40304. RAS, CAS,
  40305. BA WT
  40306. WE
  40307.  
  40308. Figure G.12 Write to Synchronous DRAM Precharge Bank
  40309.  
  40310. Rev. 2.0, 02/99, page 819 of 830
  40311.  
  40312. ----------------------- Page 834-----------------------
  40313.  
  40314. CLK
  40315.  
  40316. DBREQ
  40317.  
  40318. Transfer requests can be accepted
  40319.  
  40320. BAVL
  40321.  
  40322. TR
  40323.  
  40324. A25–A0 RA CA
  40325.  
  40326. D63–D0 D0 D1 D2 D3
  40327.  
  40328. RAS, CAS,
  40329. PCH BA WT
  40330. WE
  40331.  
  40332. Figure G.13 Write to Synchronous DRAM Non-Precharge Bank (Row Miss)
  40333.  
  40334. CLK
  40335.  
  40336. DBREQ
  40337.  
  40338. BAVL
  40339.  
  40340. TR
  40341.  
  40342. A25–A0 CA
  40343.  
  40344. D63–D0 D0 D1 D2 D3
  40345.  
  40346. RAS, CAS,
  40347. WT
  40348. WE
  40349.  
  40350. Figure G.14 Write to Synchronous DRAM (Row Hit)
  40351.  
  40352. Rev. 2.0, 02/99, page 820 of 830
  40353.  
  40354. ----------------------- Page 835-----------------------
  40355.  
  40356. CLK
  40357.  
  40358. DBREQ
  40359.  
  40360. BAVL
  40361.  
  40362. TR
  40363.  
  40364. A25–A0 RA CA
  40365.  
  40366.  
  40367. D63–D0 DTR D0 D1 D2
  40368.  
  40369. RAS,
  40370. BA RD
  40371. CAS, WE
  40372.  
  40373. TDACK
  40374.  
  40375. ID1, ID0 00
  40376.  
  40377. Figure G.15 Single Address Mode/Burst Mode/External Bus →→ External Device 32-Byte
  40378. Block Transfer/Channel 0 On-Demand Data Transfer
  40379.  
  40380. Rev. 2.0, 02/99, page 821 of 830
  40381.  
  40382. ----------------------- Page 836-----------------------
  40383.  
  40384. DMA Operation Register (DMAOR)
  40385.  
  40386. 31 15 9 8 2 1 0
  40387.  
  40388. PR[1:0] AE
  40389. DDT NMIF
  40390.  
  40391. DDT: 0: Normal DMA mode DME
  40392. 1: On-demand data transfer mode
  40393.  
  40394. Figure G.16 DDT Mode Setting
  40395.  
  40396. CLK
  40397.  
  40398. DBREQ
  40399.  
  40400. BAVL
  40401. No DMA request sampling
  40402.  
  40403. TR
  40404.  
  40405. A25–A0 CA CA
  40406.  
  40407.  
  40408. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3 D1 D2 D3
  40409. MD = 01
  40410.  
  40411. CMD WT WT
  40412.  
  40413. TDACK
  40414.  
  40415. ID1, ID0
  40416.  
  40417. Start of data transfer
  40418.  
  40419. Figure G.17 Single Address Mode/Burst Mode/Edge Detection/
  40420. External Device →→ External Bus Data Transfer
  40421.  
  40422. Rev. 2.0, 02/99, page 822 of 830
  40423.  
  40424. ----------------------- Page 837-----------------------
  40425.  
  40426. CLK
  40427.  
  40428. DBREQ
  40429.  
  40430. BAVL
  40431. Wait for next DMA request
  40432.  
  40433. TR
  40434.  
  40435. A25–A0 CA CA
  40436.  
  40437.  
  40438. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  40439. MD = 10
  40440.  
  40441. CMD RD RD
  40442.  
  40443. TDACK
  40444.  
  40445. ID1, ID0
  40446.  
  40447. Start of data transfer
  40448.  
  40449. Figure G.18 Single Address Mode/Burst Mode/Level Detection/
  40450. External Bus →→ External Device Data Transfer
  40451.  
  40452. CLK
  40453.  
  40454. DBREQ
  40455.  
  40456. BAVL
  40457.  
  40458. TR
  40459.  
  40460. A25–A0 CA CA CA
  40461.  
  40462.  
  40463. D63–D0 DTR D0 D2 D3
  40464. MD = 01 Idle cycle Idle cycle Idle cycle
  40465.  
  40466. CMD RD RD RD
  40467.  
  40468. DQMn
  40469.  
  40470. TDACK
  40471.  
  40472. ID1, ID0
  40473.  
  40474. Figure G.19 Single Address Mode/Burst Mode/Edge Detection/Byte, Word, Longword,
  40475. Quadword/External Bus →→ External Device Data Transfer
  40476.  
  40477. Rev. 2.0, 02/99, page 823 of 830
  40478.  
  40479. ----------------------- Page 838-----------------------
  40480.  
  40481. CLK
  40482.  
  40483. DBREQ
  40484.  
  40485. BAVL
  40486.  
  40487. TR
  40488.  
  40489. A25–A0 CA CA CA
  40490.  
  40491.  
  40492. D63–D0 DTR D0 D1 D3
  40493.  
  40494. MD = 01
  40495.  
  40496. CMD WT WT WT
  40497.  
  40498. DQMn
  40499. Idle cycle Idle cycle Idle cycle
  40500.  
  40501. TDACK
  40502.  
  40503. ID1, ID0
  40504.  
  40505. Figure G.20 Single Address Mode/Burst Mode/Edge Detection/Byte, Word, Longword,
  40506. Quadword/External Device →→ External Bus Data Transfer
  40507.  
  40508. Rev. 2.0, 02/99, page 824 of 830
  40509.  
  40510. ----------------------- Page 839-----------------------
  40511.  
  40512. CLK
  40513.  
  40514. DBREQ
  40515.  
  40516. BAVL
  40517.  
  40518. TR
  40519.  
  40520. A25–A0 RA CA
  40521.  
  40522.  
  40523. D63–D0 DTR D0 D1 D2 D3
  40524.  
  40525. ID = 1, 2, or 3
  40526. RAS,
  40527. BA RD
  40528. CAS, WE
  40529.  
  40530. TDACK
  40531.  
  40532. ID1, ID0 01 or 10 or 11
  40533.  
  40534. Figure G.21 Single Address Mode/Burst Mode/32-Byte Block Transfer/DMA Transfer
  40535. Request to Channels 1–3 Using Data Bus
  40536.  
  40537. Rev. 2.0, 02/99, page 825 of 830
  40538.  
  40539. ----------------------- Page 840-----------------------
  40540.  
  40541. CLK
  40542.  
  40543. DBREQ
  40544.  
  40545. BAVL
  40546.  
  40547. TR
  40548.  
  40549. A25–A0 RA CA
  40550.  
  40551.  
  40552. D63–D0 D0 D1 D2 D3
  40553.  
  40554. RAS,
  40555. BA RD
  40556. CAS, WE
  40557.  
  40558. TDACK
  40559.  
  40560. ID1, ID0 10
  40561.  
  40562. No DTR cycle, so requests can be made at any time
  40563.  
  40564. Figure G.22 Single Address Mode/Burst Mode/32-Byte Block Transfer/
  40565. External Bus →→ External Device Data Transfer/
  40566. Direct Data Transfer Request to Channel 2 without Using Data Bus
  40567.  
  40568. Rev. 2.0, 02/99, page 826 of 830
  40569.  
  40570. ----------------------- Page 841-----------------------
  40571.  
  40572. Four requests can be queued Handshaking is necessary
  40573. to send additional requests
  40574.  
  40575. CLK
  40576.  
  40577. 3rd 4th 5th
  40578.  
  40579. DBREQ
  40580.  
  40581. BAVL
  40582. No more requests
  40583.  
  40584. TR
  40585.  
  40586. A25–A0 RA CA CA CA
  40587.  
  40588. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  40589.  
  40590. RAS,
  40591. CAS, WE BA RD RD RD NOP
  40592.  
  40593. TDACK
  40594.  
  40595. ID1, ID0
  40596.  
  40597. Must be ignored
  40598. (no request transmitted)
  40599.  
  40600. Figure G.23 Single Address Mode/Burst Mode/External Bus →→ External Device Data
  40601. Transfer/Direct Data Transfer Request to Channel 2
  40602.  
  40603. Rev. 2.0, 02/99, page 827 of 830
  40604.  
  40605. ----------------------- Page 842-----------------------
  40606.  
  40607. Four requests can be queued Handshaking is necessary
  40608. to send additional requests
  40609.  
  40610. CLK
  40611.  
  40612. 3rd 4th 5th
  40613.  
  40614. DBREQ
  40615.  
  40616. BAVL
  40617.  
  40618. TR
  40619.  
  40620. A25–A0 RA CA CA CA
  40621.  
  40622. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  40623.  
  40624. RAS,
  40625. BA WT WT WT NOP
  40626. CAS, WE
  40627.  
  40628. TDACK
  40629.  
  40630. ID1, ID0
  40631.  
  40632. Must be ignored
  40633. (no request transmitted)
  40634.  
  40635.  
  40636. Figure G.24 Single Address Mode/Burst Mode/External Device →→ External Bus Data
  40637. Transfer/Direct Data Transfer Request to Channel 2
  40638.  
  40639. Rev. 2.0, 02/99, page 828 of 830
  40640.  
  40641. ----------------------- Page 843-----------------------
  40642.  
  40643. Four requests can be queued Handshaking is necessary
  40644. to send additional requests
  40645.  
  40646. CLK
  40647.  
  40648. 3rd 4th 5th
  40649.  
  40650. DBREQ
  40651.  
  40652. BAVL
  40653.  
  40654. TR
  40655.  
  40656. A25–A0 CA CA CA
  40657.  
  40658. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  40659.  
  40660. RAS,
  40661. RD RD RD NOP
  40662. CAS, WE
  40663.  
  40664. TDACK
  40665.  
  40666. ID1, ID0
  40667.  
  40668. Must be ignored
  40669. (no request transmitted)
  40670.  
  40671. Figure G.25 Single Address Mode/Burst Mode/External Bus →→ External Device Data
  40672. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  40673.  
  40674. Rev. 2.0, 02/99, page 829 of 830
  40675.  
  40676. ----------------------- Page 844-----------------------
  40677.  
  40678. Four requests can be queued
  40679. Handshaking is necessary
  40680. to send additional requests
  40681.  
  40682. CLK
  40683.  
  40684. 3rd 4th 5th
  40685.  
  40686. DBREQ
  40687.  
  40688. BAVL
  40689.  
  40690. TR
  40691.  
  40692. A25–A0 CA CA CA
  40693.  
  40694. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  40695.  
  40696. RAS,
  40697. WT WT WT NOP
  40698. CAS, WE
  40699.  
  40700. TDACK
  40701.  
  40702. ID1, ID0
  40703.  
  40704. Must be ignored
  40705. (no request transmitted)
  40706.  
  40707. Figure G.26 Single Address Mode/Burst Mode/External Device →→ External Bus Data
  40708. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  40709.  
  40710. Rev. 2.0, 02/99, page 830 of 830
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement