Advertisement
atreyu187

Dreamcast Guides : SuperH (SH) 32-Bit RISC MCU/MPU Series

Jan 4th, 2013
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 MB | None | 0 0
  1. ----------------------- Page 1-----------------------
  2.  
  3. SuperH (SH) 32-Bit RISC MCU/MPU Series
  4.  
  5. SH7750
  6.  
  7. High-Performance RISC Engine
  8.  
  9. Hardware Manual
  10.  
  11. ADE-602-124A
  12.  
  13. Rev. 2.0
  14. 03/02/99
  15. Hitachi, Ltd.
  16.  
  17. ----------------------- Page 2-----------------------
  18.  
  19. Cautions
  20.  
  21. 1. Hitachi neither warrants nor grants licenses of any rights of Hitachi’s or any third party’s
  22. patent, copyright, trademark, or other intellectual property rights for information contained in
  23. this document. Hitachi bears no responsibility for problems that may arise with third party’s
  24. rights, including intellectual property rights, in connection with use of the information
  25. contained in this document.
  26.  
  27. 2. Products and product specifications may be subject to change without notice. Confirm that you
  28. have received the latest product standards or specifications before final design, purchase or use.
  29.  
  30. 3. Hitachi makes every attempt to ensure that its products are of high quality and reliability.
  31. However, contact Hitachi’s sales office before using the product in an application that demands
  32. especially high quality and reliability or where its failure or malfunction may directly threaten
  33. human life or cause risk of bodily injury, such as aerospace, aeronautics, nuclear power,
  34. combustion control, transportation, traffic, safety equipment or medical equipment for life
  35. support.
  36.  
  37. 4. Design your application so that the product is used within the ranges guaranteed by Hitachi
  38. particularly for maximum rating, operating supply voltage range, heat radiation characteristics,
  39. installation conditions and other characteristics. Hitachi bears no responsibility for failure or
  40. damage when used beyond the guaranteed ranges. Even within the guaranteed ranges, consider
  41. normally foreseeable failure rates or failure modes in semiconductor devices and employ
  42. systemic measures such as fail-safes, so that the equipment incorporating Hitachi product does
  43. not cause bodily injury, fire or other consequential damage due to operation of the Hitachi
  44. product.
  45.  
  46. 5. This product is not designed to be radiation resistant.
  47.  
  48. 6. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document
  49. without written approval from Hitachi.
  50.  
  51. 7. Contact Hitachi’s sales office for any questions regarding this document or Hitachi
  52. semiconductor products.
  53.  
  54. ----------------------- Page 3-----------------------
  55.  
  56. Preface
  57.  
  58. The SH-4 (SH7750) has been developed as the top-end model in the SuperH RISC engine
  59. family, featuring a 128-bit graphic engine for multimedia applications and 360 MIPS performance.
  60.  
  61. The SH7750 CPU has a RISC type instruction set, and features upward-compatibility at the object
  62. code level with SH-1, SH-2, SH-3, and SH-3E microcomputers.
  63.  
  64. In addition to single- and double-precision floating-point operation capability, the on-chip FPU has
  65. a 128-bit graphic engine that enables 32-bit floating-point data to be processed 128 bits at a time.
  66. It also supports 4 × 4 array operations and inner product operations, enabling a performance of 1.4
  67. GFLOPS to be achieved.
  68.  
  69. A superscalar architecture is employed that enables simultaneous execution of two instructions
  70. (including FPU instructions), providing performance of up to twice that of conventional
  71. architectures at the same frequency.
  72.  
  73. SH7750 on-chip peripheral modules include oscillator circuits, an interrupt controller (INTC),
  74. direct memory access controller (DMAC), timer unit (TMU), real-time clock (RTC), serial
  75. communication interfaces (SCI, SCIF), and a user break controller (UBC), enabling a user system
  76. to be configured with a minimum of components.
  77.  
  78. An 8-kbyte instruction cache and 16-kbyte data cache are also provided, and the on-chip memory
  79. management unit (MMU) handles translation from the 4-Gbyte virtual address space to the
  80. physical address space. The bus state controller (BSC) supporting external memory access can
  81. handle a 64-bit synchronous DRAM 4-bank system and 64-bit data bus as well as ROM, SRAM,
  82. DRAM, synchronous DRAM, and PCMCIA.
  83.  
  84. This hardware manual explains the hardware features of the SH7750. For details of instructions,
  85. see the Programming Manual.
  86.  
  87. Related Manual:
  88. SH7750 Programming Manual (Document No. ADE-602-156)
  89.  
  90. Please consult your Hitachi sales representative for information on development environment
  91. systems.
  92.  
  93. SuperH is a trademark of Hitachi, Ltd.
  94.  
  95. 1
  96.  
  97. ----------------------- Page 4-----------------------
  98.  
  99. Contents
  100.  
  101. Section 1 Overview ............................................................................................ 1
  102. 1.1 SH7750 Features ............................................................................................. 1
  103. 1.2 Block Diagram ................................................................................................ 8
  104.  
  105. Section 2 Programming Model........................................................................... 9
  106. 2.1 Data Formats .................................................................................................. 9
  107. 2.2 Register Configuration...................................................................................... 10
  108. 2.2.1 Privileged Mode and Banks ..................................................................... 10
  109. 2.2.2 General Registers .................................................................................. 13
  110. 2.2.3 Floating-Point Registers ........................................................................ 15
  111. 2.2.4 Control Registers.................................................................................. 17
  112. 2.2.5 System Registers .................................................................................. 18
  113. 2.3 Memory-Mapped Registers ................................................................................ 20
  114. 2.4 Data Format in Registers................................................................................... 21
  115. 2.5 Data Formats in Memory .................................................................................. 21
  116. 2.6 Processor States............................................................................................... 22
  117. 2.7 Processor Modes .............................................................................................. 23
  118.  
  119. Section 3 Memory Management Unit (MMU).................................................... 25
  120. 3.1 Overview........................................................................................................ 25
  121. 3.1.1 Features .............................................................................................. 25
  122. 3.1.2 Role of the MMU ................................................................................. 25
  123. 3.1.3 Register Configuration........................................................................... 28
  124. 3.1.4 Caution............................................................................................... 28
  125. 3.2 Register Descriptions........................................................................................ 29
  126. 3.3 Memory Space ................................................................................................ 32
  127. 3.3.1 Physical Memory Space ......................................................................... 32
  128. 3.3.2 External Memory Space ......................................................................... 35
  129. 3.3.3 Virtual Memory Space ........................................................................... 36
  130. 3.3.4 On-Chip RAM Space ............................................................................ 37
  131. 3.3.5 Address Translation ............................................................................... 37
  132. 3.3.6 Single Virtual Memory Mode and Multiple Virtual Memory Mode................. 38
  133. 3.3.7 Address Space Identifier (ASID) ............................................................... 38
  134. 3.4 TLB Functions ................................................................................................ 38
  135. 3.4.1 Unified TLB (UTLB) Configuration.......................................................... 38
  136. 3.4.2 Instruction TLB (ITLB) Configuration ...................................................... 42
  137. 3.4.3 Address Translation Method .................................................................... 42
  138. 3.5 MMU Functions.............................................................................................. 45
  139. 3.5.1 MMU Hardware Management .................................................................. 45
  140.  
  141. 2
  142.  
  143. ----------------------- Page 5-----------------------
  144.  
  145. 3.5.2 MMU Software Management................................................................... 45
  146. 3.5.3 MMU Instruction (LDTLB)..................................................................... 45
  147. 3.5.4 Hardware ITLB Miss Handling ................................................................. 46
  148. 3.5.5 Avoiding Synonym Problems.................................................................. 47
  149. 3.6 MMU Exceptions............................................................................................. 48
  150. 3.6.1 Instruction TLB Multiple Hit Exception .................................................... 48
  151. 3.6.2 Instruction TLB Miss Exception .............................................................. 49
  152. 3.6.3 Instruction TLB Protection Violation Exception.......................................... 50
  153. 3.6.4 Data TLB Multiple Hit Exception ............................................................ 51
  154. 3.6.5 Data TLB Miss Exception....................................................................... 51
  155. 3.6.6 Data TLB Protection Violation Exception .................................................. 52
  156. 3.6.7 Initial Page Write Exception.................................................................... 53
  157. 3.7 Memory-Mapped TLB Configuration ................................................................... 54
  158. 3.7.1 ITLB Address Array ............................................................................... 55
  159. 3.7.2 ITLB Data Array 1................................................................................. 56
  160. 3.7.3 ITLB Data Array 2................................................................................. 57
  161. 3.7.4 UTLB Address Array .............................................................................. 57
  162. 3.7.5 UTLB Data Array 1 ............................................................................... 59
  163. 3.7.6 UTLB Data Array 2 ............................................................................... 60
  164.  
  165. Section 4 Caches ................................................................................................ 61
  166. 4.1 Overview ........................................................................................................ 61
  167. 4.1.1 Features............................................................................................... 61
  168. 4.1.2 Register Configuration ........................................................................... 62
  169. 4.2 Register Descriptions ........................................................................................ 62
  170. 4.3 Operand Cache (OC) ......................................................................................... 65
  171. 4.3.1 Configuration ....................................................................................... 65
  172. 4.3.2 Read Operation ..................................................................................... 66
  173. 4.3.3 Write Operation .................................................................................... 67
  174. 4.3.4 Write-Back Buffer .................................................................................. 69
  175. 4.3.5 Write-Through Buffer ............................................................................. 69
  176. 4.3.6 RAM Mode.......................................................................................... 69
  177. 4.3.7 OC Index Mode..................................................................................... 70
  178. 4.3.8 Coherency between Cache and External Memory ......................................... 71
  179. 4.3.9 Prefetch Operation ................................................................................. 71
  180. 4.4 Instruction Cache (IC) ....................................................................................... 72
  181. 4.4.1 Configuration ....................................................................................... 72
  182. 4.4.2 Read Operation ..................................................................................... 73
  183. 4.4.3 IC Index Mode ...................................................................................... 74
  184. 4.5 Memory-Mapped Cache Configuration ................................................................. 74
  185. 4.5.1 IC Address Array ................................................................................... 74
  186. 4.5.2 IC Data Array ....................................................................................... 75
  187. 4.5.3 OC Address Array.................................................................................. 76
  188.  
  189. 3
  190.  
  191. ----------------------- Page 6-----------------------
  192.  
  193. 4.5.4 OC Data Array ..................................................................................... 78
  194. 4.6 Store Queues................................................................................................... 79
  195. 4.6.1 SQ Configuration ................................................................................. 79
  196. 4.6.2 SQ Writes ........................................................................................... 79
  197. 4.6.3 Transfer to External Memory................................................................... 79
  198. 4.6.4 SQ Protection ...................................................................................... 81
  199.  
  200. Section 5 Exceptions .......................................................................................... 83
  201. 5.1 Overview........................................................................................................ 83
  202. 5.1.1 Features .............................................................................................. 83
  203. 5.1.2 Register Configuration........................................................................... 83
  204. 5.2 Register Descriptions........................................................................................ 84
  205. 5.3 Exception Handling Functions............................................................................ 85
  206. 5.3.1 Exception Handling Flow ....................................................................... 85
  207. 5.3.2 Exception Handling Vector Addresses........................................................ 85
  208. 5.4 Exception Types and Priorities ........................................................................... 86
  209. 5.5 Exception Flow ............................................................................................... 88
  210. 5.5.1 Exception Flow .................................................................................... 88
  211. 5.5.2 Exception Source Acceptance .................................................................. 89
  212. 5.5.3 Exception Requests and BL Bit................................................................ 91
  213. 5.5.4 Return from Exception Handling.............................................................. 91
  214. 5.6 Description of Exceptions.................................................................................. 92
  215. 5.6.1 Resets................................................................................................. 92
  216. 5.6.2 General Exceptions................................................................................ 97
  217. 5.6.3 Interrupts............................................................................................. 111
  218. 5.6.4 Priority Order with Multiple Exceptions.................................................... 114
  219. 5.7 Usage Notes.................................................................................................... 115
  220. 5.8 Restrictions .................................................................................................... 115
  221.  
  222. Section 6 Floating-Point Unit............................................................................. 117
  223. 6.1 Overview........................................................................................................ 117
  224. 6.2 Data Formats .................................................................................................. 117
  225. 6.2.1 Floating-Point Format ........................................................................... 117
  226. 6.2.2 Non-Numbers (NaN).............................................................................. 119
  227. 6.2.3 Denormalized Numbers .......................................................................... 120
  228. 6.3 Registers ........................................................................................................ 121
  229. 6.3.1 Floating-Point Registers ........................................................................ 121
  230. 6.3.2 Floating-Point Status/Control Register (FPSCR) ....................................... 123
  231. 6.3.3 Floating-Point Communication Register (FPUL)........................................ 124
  232. 6.4 Rounding ....................................................................................................... 124
  233. 6.5 Floating-Point Exceptions ................................................................................. 125
  234. 6.6 Graphics Support Functions............................................................................... 126
  235. 6.6.1 Geometric Operation Instructions ............................................................. 126
  236.  
  237. 4
  238.  
  239. ----------------------- Page 7-----------------------
  240.  
  241. 6.6.2 Pair Single-Precision Data Transfer........................................................... 128
  242.  
  243. Section 7 Instruction Set..................................................................................... 129
  244. 7.1 Execution Environment ..................................................................................... 129
  245. 7.2 Addressing Modes............................................................................................. 131
  246. 7.3 Instruction Set ................................................................................................. 135
  247.  
  248. Section 8 Pipelining............................................................................................ 149
  249. 8.1 Pipelines ........................................................................................................ 149
  250. 8.2 Parallel-Executability........................................................................................ 156
  251. 8.3 Execution Cycles and Pipeline Stalling ................................................................ 160
  252.  
  253. Section 9 Power-Down Modes........................................................................... 177
  254. 9.1 Overview ........................................................................................................ 177
  255. 9.1.1 Types of Power-Down Modes .................................................................. 177
  256. 9.1.2 Register Configuration ........................................................................... 179
  257. 9.1.3 Pin Configuration ................................................................................. 179
  258. 9.2 Register Descriptions ........................................................................................ 179
  259. 9.2.1 Standby Control Register (STBCR) .......................................................... 179
  260. 9.2.2 Peripheral Module Pin High Impedance Control.......................................... 182
  261. 9.2.3 Peripheral Module Pin Pull-Up Control..................................................... 182
  262. 9.2.4 Standby Control Register 2 (STBCR2)...................................................... 183
  263. 9.3 Sleep Mode ..................................................................................................... 184
  264. 9.3.1 Transition to Sleep Mode........................................................................ 184
  265. 9.3.2 Exit from Sleep Mode ............................................................................ 184
  266. 9.4 Deep Sleep Mode ............................................................................................. 184
  267. 9.4.1 Transition to Deep Sleep Mode ................................................................ 184
  268. 9.4.2 Exit from Deep Sleep Mode .................................................................... 184
  269. 9.5 Standby Mode.................................................................................................. 185
  270. 9.5.1 Transition to Standby Mode .................................................................... 185
  271. 9.5.2 Exit from Standby Mode......................................................................... 186
  272. 9.5.3 Clock Pause Function ............................................................................ 186
  273. 9.6 Module Standby Function .................................................................................. 187
  274. 9.6.1 Transition to Module Standby Function..................................................... 187
  275. 9.6.2 Exit from Module Standby Function ......................................................... 187
  276. 9.7 STATUS Pin Change Timing ............................................................................ 188
  277. 9.7.1 In Reset............................................................................................... 188
  278. 9.7.2 In Exit from Standby Mode ..................................................................... 189
  279. 9.7.3 In Exit from Sleep Mode ........................................................................ 191
  280. 9.7.4 In Exit from Deep Sleep Mode................................................................. 194
  281.  
  282. Section 10 Clock Oscillation Circuits.................................................................. 197
  283. 10.1 Overview ........................................................................................................ 197
  284.  
  285. 5
  286.  
  287. ----------------------- Page 8-----------------------
  288.  
  289. 10.1.1 Features .............................................................................................. 197
  290. 10.2 Overview of CPG ............................................................................................ 199
  291. 10.2.1 Block Diagram of CPG .......................................................................... 199
  292. 10.2.2 CPG Pin Configuration ......................................................................... 201
  293. 10.2.3 CPG Register Configuration ................................................................... 201
  294. 10.3 Clock Operating Modes..................................................................................... 202
  295. 10.4 CPG Register Description ................................................................................. 203
  296. 10.4.1 Frequency Control Register (FRQCR) ...................................................... 203
  297. 10.5 Changing the Frequency .................................................................................... 206
  298. 10.5.1 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is Off) ........ 206
  299. 10.5.2 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is On) ........ 206
  300. 10.5.3 Changing Bus Clock Division Ratio (When PLL Circuit 2 is On) ................. 207
  301. 10.5.4 Changing Bus Clock Division Ratio (When PLL Circuit 2 is Off) ................. 207
  302. 10.5.5 Changing CPU or Peripheral Module Clock Division Ratio.......................... 207
  303. 10.6 Output Clock Control....................................................................................... 207
  304. 10.7 Overview of Watchdog Timer............................................................................. 208
  305. 10.7.1 Block Diagram ..................................................................................... 208
  306. 10.7.2 Register Configuration........................................................................... 209
  307. 10.8 WDT Register Descriptions ............................................................................... 209
  308. 10.8.1 Watchdog Timer Counter (WTCNT) ......................................................... 209
  309. 10.8.2 Watchdog Timer Control/Status Register (WTCSR) .................................... 210
  310. 10.8.3 Notes on Register Access ....................................................................... 212
  311. 10.9 Using the WDT ............................................................................................... 213
  312. 10.9.1 Standby Clearing Procedure..................................................................... 213
  313. 10.9.2 Frequency Changing Procedure ................................................................ 213
  314. 10.9.3 Using Watchdog Timer Mode .................................................................. 214
  315. 10.9.4 Using Interval Timer Mode ..................................................................... 214
  316. 10.10 Notes on Board Design...................................................................................... 215
  317.  
  318. Section 11 Realtime Clock (RTC) ...................................................................... 217
  319. 11.1 Overview........................................................................................................ 217
  320. 11.1.1 Features .............................................................................................. 217
  321. 11.1.2 Block Diagram ..................................................................................... 218
  322. 11.1.3 Pin Configuration ................................................................................. 219
  323. 11.1.4 Register Configuration........................................................................... 219
  324. 11.2 Register Descriptions........................................................................................ 221
  325. 11.2.1 64 Hz Counter (R64CNT) ...................................................................... 221
  326. 11.2.2 Second Counter (RSECCNT).................................................................. 221
  327. 11.2.3 Minute Counter (RMINCNT).................................................................. 222
  328. 11.2.4 Hour Counter (RHRCNT) ...................................................................... 222
  329. 11.2.5 Day-of-Week Counter (RWKCNT) ........................................................... 223
  330. 11.2.6 Day Counter (RDAYCNT) ..................................................................... 224
  331. 11.2.7 Month Counter (RMONCNT) ................................................................. 224
  332.  
  333. 6
  334.  
  335. ----------------------- Page 9-----------------------
  336.  
  337. 11.2.8 Year Counter (RYRCNT) ....................................................................... 225
  338. 11.2.9 Second Alarm Register (RSECAR)........................................................... 226
  339. 11.2.10 Minute Alarm Register (RMINAR) .......................................................... 226
  340. 11.2.11 Hour Alarm Register (RHRAR) ............................................................... 227
  341. 11.2.12 Day-of-Week Alarm Register (RWKAR).................................................... 227
  342. 11.2.13 Day Alarm Register (RDAYAR) .............................................................. 228
  343. 11.2.14 Month Alarm Register (RMONAR).......................................................... 229
  344. 11.2.15 RTC Control Register 1 (RCR1) ............................................................. 229
  345. 11.2.16 RTC Control Register 2 (RCR2) ............................................................. 231
  346. 11.3 Operation........................................................................................................ 234
  347. 11.3.1 Time Setting Procedures ......................................................................... 234
  348. 11.3.2 Time Reading Procedures ........................................................................ 235
  349. 11.3.3 Alarm Function .................................................................................... 237
  350. 11.4 Interrupts ........................................................................................................ 238
  351. 11.5 Usage Notes .................................................................................................... 238
  352. 11.5.1 Register Initialization............................................................................. 238
  353. 11.5.2 Crystal Oscillator Circuit........................................................................ 238
  354.  
  355. Section 12 Timer Unit (TMU) ........................................................................... 241
  356. 12.1 Overview ........................................................................................................ 241
  357. 12.1.1 Features............................................................................................... 241
  358. 12.1.2 Block Diagram...................................................................................... 242
  359. 12.1.3 Pin Configuration ................................................................................. 242
  360. 12.1.4 Register Configuration ........................................................................... 243
  361. 12.2 Register Descriptions ........................................................................................ 244
  362. 12.2.1 Timer Output Control Register (TOCR) .................................................... 244
  363. 12.2.2 Timer Start Register (TSTR) ................................................................... 245
  364. 12.2.3 Timer Constant Registers (TCOR) ........................................................... 246
  365. 12.2.4 Timer Counters (TCNT) ......................................................................... 246
  366. 12.2.5 Timer Control Registers (TCR) ............................................................... 247
  367. 12.2.6 Input Capture Register (TCPR2) .............................................................. 250
  368. 12.3 Operation........................................................................................................ 251
  369. 12.3.1 Counter Operation ................................................................................. 251
  370. 12.3.2 Input Capture Function .......................................................................... 254
  371. 12.4 Interrupts ........................................................................................................ 255
  372. 12.5 Usage Notes .................................................................................................... 256
  373. 12.5.1 Register Writes ..................................................................................... 256
  374. 12.5.2 TCNT Register Reads ............................................................................ 256
  375. 12.5.3 Resetting the RTC Frequency Divider ....................................................... 256
  376. 12.5.4 External Clock Frequency ....................................................................... 256
  377.  
  378. Section 13 Bus State Controller (BSC)...............................................................257
  379. 13.1 Overview ....................................................................................................... .257
  380.  
  381. 7
  382.  
  383. ----------------------- Page 10-----------------------
  384.  
  385. 13.1.1 Features ..............................................................................................257
  386. 13.1.2 Block Diagram .....................................................................................259
  387. 13.1.3 Pin Configuration .................................................................................260
  388. 13.1.4 Register Configuration...........................................................................263
  389. 13.1.5 Overview of Areas.................................................................................264
  390. 13.1.6 PCMCIA Support.................................................................................267
  391. 13.2 Register Descriptions........................................................................................271
  392. 13.2.1 Bus Control Register 1 (BCR1) ...............................................................271
  393. 13.2.2 Bus Control Register 2 (BCR2) ...............................................................279
  394. 13.2.3 Wait Control Register 1 (WCR1).............................................................280
  395. 13.2.4 Wait Control Register 2 (WCR2).............................................................282
  396. 13.2.5 Wait Control Register 3 (WCR3).............................................................290
  397. 13.2.6 Memory Control Register (MCR) ............................................................291
  398. 13.2.7 PCMCIA Control Register (PCR) ...........................................................298
  399. 13.2.8 Synchronous DRAM Mode Register (SDMR) ............................................301
  400. 13.2.9 Refresh Timer Control/Status Register (RTSCR)........................................303
  401. 13.2.10 Refresh Timer Counter (RTCNT).............................................................305
  402. 13.2.11 Refresh Time Constant Register (RTCOR) ................................................305
  403. 13.2.12 Refresh Count Register (RFCR) ..............................................................306
  404. 13.2.13Notes on Accessing Refresh Control Registers ...........................................307
  405. 13.3 Operation .......................................................................................................307
  406. 13.3.1 Endian/Access Size and Data Alignment ....................................................307
  407. 13.3.2 Areas ..................................................................................................318
  408. 13.3.3 Basic Interface ......................................................................................323
  409. 13.3.4 DRAM Interface ...................................................................................331
  410. 13.3.5 Synchronous DRAM Interface.................................................................349
  411. 13.3.6 Burst ROM Interface..............................................................................373
  412. 13.3.7 PCMCIA Interface ................................................................................376
  413. 13.3.8 MPX Interface ......................................................................................385
  414. 13.3.9 Byte Control SRAM .............................................................................392
  415. 13.3.10 Waits between Access Cycles ..................................................................397
  416. 13.3.11 Bus Arbitration.....................................................................................398
  417. 13.3.12 Master Mode ........................................................................................401
  418. 13.3.13 Slave Mode..........................................................................................402
  419. 13.3.14 Partial-Sharing Master Mode ...................................................................403
  420. 13.3.15 Cooperation between Master and Slave......................................................404
  421.  
  422. Section 14 Direct Memory Access Controller (DMAC)...................................... 405
  423. 14.1 Overview........................................................................................................ 405
  424. 14.1.1 Features .............................................................................................. 405
  425. 14.1.2 Block Diagram ..................................................................................... 407
  426. 14.1.3 Pin Configuration ................................................................................. 408
  427. 14.1.4 Register Configuration........................................................................... 409
  428.  
  429. 8
  430.  
  431. ----------------------- Page 11-----------------------
  432.  
  433. 14.2 Register Descriptions ........................................................................................ 411
  434. 14.2.1 DMA Source Address Registers 0–3 (SAR0–SAR3) .................................... 411
  435. 14.2.2 DMA Destination Address Registers 0–3 (DAR0–DAR3) ............................. 412
  436. 14.2.3 DMA Transfer Count Registers 0–3 (DMATCR0–DMATCR3)..................... 413
  437. 14.2.4 DMA Channel Control Registers 0–3 (CHCR0–CHCR3)............................. 414
  438. 14.2.5 DMA Operation Register (DMAOR)......................................................... 422
  439. 14.3 Operation........................................................................................................ 424
  440. 14.3.1 DMA Transfer Procedure......................................................................... 424
  441. 14.3.2 DMA Transfer Requests.......................................................................... 426
  442. 14.3.3 Channel Priorities ................................................................................. 428
  443. 14.3.4 Types of DMA Transfer.......................................................................... 431
  444. 14.3.5 Number of Bus Cycle States and DREQ Pin Sampling Timing...................... 439
  445. 14.3.6 Ending DMA Transfer ............................................................................ 454
  446. 14.4 Examples of Use .............................................................................................. 457
  447. 14.4.1 Examples of Transfer between External Memory and an External Device
  448. with DACK ......................................................................................... 457
  449. 14.5 On-Demand Data Transfer Mode .......................................................................... 458
  450. 14.5.1 Operation............................................................................................. 458
  451. 14.5.2 Notes on Use of DDT Module ................................................................. 460
  452. 14.6 Usage Notes .................................................................................................... 462
  453.  
  454. Section 15 Serial Communication Interface (SCI).............................................. 463
  455. 15.1 Overview ........................................................................................................ 463
  456. 15.1.1 Features............................................................................................... 463
  457. 15.1.2 Block Diagram...................................................................................... 465
  458. 15.1.3 Pin Configuration ................................................................................. 466
  459. 15.1.4 Register Configuration ........................................................................... 466
  460. 15.2 Register Descriptions ........................................................................................ 467
  461. 15.2.1 Receive Shift Register (SCRSR1) ............................................................ 467
  462. 15.2.2 Receive Data Register (SCRDR1) ............................................................ 467
  463. 15.2.3 Transmit Shift Register (SCTSR1)........................................................... 468
  464. 15.2.4 Transmit Data Register (SCTDR1) ........................................................... 468
  465. 15.2.5 Serial Mode Register (SCSMR1) ............................................................. 469
  466. 15.2.6 Serial Control Register (SCSCR1) ........................................................... 471
  467. 15.2.7 Serial Status Register (SCSSR1) ............................................................. 475
  468. 15.2.8 Serial Port Register (SCSPTR1) .............................................................. 479
  469. 15.2.9 Bit Rate Register (SCBRR1) ................................................................... 483
  470. 15.3 Operation........................................................................................................ 491
  471. 15.3.1 Overview ............................................................................................. 491
  472. 15.3.2 Operation in Asynchronous Mode............................................................. 493
  473. 15.3.3 Multiprocessor Communication Function .................................................. 503
  474. 15.3.4 Operation in Synchronous Mode .............................................................. 511
  475. 15.4 SCI Interrupt Sources and DMAC ....................................................................... 520
  476.  
  477. 9
  478.  
  479. ----------------------- Page 12-----------------------
  480.  
  481. 15.5 Usage Notes.................................................................................................... 521
  482.  
  483. Section 16 Serial Communication Interface with FIFO (SCIF).......................... 525
  484. 16.1 Overview........................................................................................................ 525
  485. 16.1.1 Features .............................................................................................. 525
  486. 16.1.2 Block Diagram ..................................................................................... 527
  487. 16.1.3 Pin Configuration ................................................................................. 528
  488. 16.1.4 Register Configuration........................................................................... 529
  489. 16.2 Register Descriptions........................................................................................ 529
  490. 16.2.1 Receive Shift Register (SCRSR2)............................................................ 529
  491. 16.2.2 Receive FIFO Data Register (SCFRDR2).................................................. 530
  492. 16.2.3 Transmit Shift Register (SCTSR2) .......................................................... 530
  493. 16.2.4 Transmit FIFO Data Register (SCFTDR2) ................................................ 531
  494. 16.2.5 Serial Mode Register (SCSMR2) ............................................................. 531
  495. 16.2.6 Serial Control Register (SCSCR2)........................................................... 533
  496. 16.2.7 Serial Status Register (SCFSR2) ............................................................. 536
  497. 16.2.8 Bit Rate Register (SCBRR2)................................................................... 542
  498. 16.2.9 FIFO Control Register (SCFCR2) ........................................................... 543
  499. 16.2.10 FIFO Data Count Register (SCFDR2) ...................................................... 546
  500. 16.2.11 Serial Port Register (SCSPTR2).............................................................. 546
  501. 16.2.12 Line Status Register (SCLSR2)............................................................... 552
  502. 16.3 Operation ....................................................................................................... 553
  503. 16.3.1 Overview............................................................................................. 553
  504. 16.3.2 Serial Operation.................................................................................... 554
  505. 16.4 SCIF Interrupt Sources and the DMAC ................................................................ 565
  506. 16.5 Usage Notes.................................................................................................... 566
  507.  
  508. Section 17 Smart Card Interface......................................................................... 571
  509. 17.1 Overview........................................................................................................ 571
  510. 17.1.1 Features .............................................................................................. 571
  511. 17.1.2 Block Diagram ..................................................................................... 572
  512. 17.1.3 Pin Configuration ................................................................................. 573
  513. 17.1.4 Register Configuration........................................................................... 573
  514. 17.2 Register Descriptions........................................................................................ 574
  515. 17.2.1 Smart Card Mode Register (SCSCMR1) ................................................... 574
  516. 17.2.2 Serial Mode Register (SCSMR1) ............................................................. 575
  517. 17.2.3 Serial Control Register (SCSCR1)........................................................... 576
  518. 17.2.4 Serial Status Register (SCSSR1) ............................................................. 577
  519. 17.3 Operation ....................................................................................................... 578
  520. 17.3.1 Overview............................................................................................. 578
  521. 17.3.2 Pin Connections ................................................................................... 579
  522. 17.3.3 Data Format......................................................................................... 580
  523. 17.3.4 Register Settings .................................................................................. 581
  524.  
  525. 10
  526.  
  527. ----------------------- Page 13-----------------------
  528.  
  529. 17.3.5 Clock..................................................................................................................................................... 583
  530. 17.3.6 Data Transfer Operations............................................................................................................. 586
  531. 17.4 Usage Notes..................................................................................................................................................... 593
  532.  
  533. Section 18 I/O Ports ...........................................................................................597
  534. 18.1 Overview...............................................................................................................................................................597
  535. 18.1.1 Features................................................................................................................................................597
  536. 18.1.2 Block Diagrams................................................................................................................................598
  537. 18.1.3 Pin Configuration.............................................................................................................................605
  538. 18.1.4 Register Configuration..................................................................................................................607
  539. 18.2 Register Descriptions......................................................................................................................................608
  540. 18.2.1 Port Control Register A (PCTRA)..........................................................................................608
  541. 18.2.2 Port Data Register A (PDTRA)................................................................................................609
  542. 18.2.3 Port Control Register B (PCTRB)..........................................................................................610
  543. 18.2.4 Port Data Register B (PDTRB)................................................................................................611
  544. 18.2.5 GPIO Interrupt Control Register (GPIOIC).........................................................................611
  545. 18.2.6 Serial Port Register (SCSPTR1).............................................................................................612
  546. 18.2.7 Serial Port Register (SCSPTR2).............................................................................................614
  547.  
  548. Section 19 Interrupt Controller (INTC) ..............................................................617
  549. 19.1 Overview...............................................................................................................................................................617
  550. 19.1.1 Features................................................................................................................................................617
  551. 19.1.2 Block Diagram..................................................................................................................................617
  552. 19.1.3 Pin Configuration.............................................................................................................................619
  553. 19.1.4 Register Configuration..................................................................................................................619
  554. 19.2 Interrupt Sources...............................................................................................................................................620
  555. 19.2.1 NMI Interrupt.....................................................................................................................................620
  556. 19.2.2 IRL Interrupts.....................................................................................................................................621
  557. 19.2.3 On-Chip Peripheral Module Interrupts...................................................................................623
  558. 19.2.4 Interrupt Exception Handling and Priority...........................................................................624
  559. 19.3 Register Descriptions......................................................................................................................................627
  560. 19.3.1 Interrupt Priority Registers A to C (IPRA–IPRC)............................................................627
  561. 19.3.2 Interrupt Control Register (ICR)..............................................................................................628
  562. 19.4 INTC Operation.................................................................................................................................................630
  563. 19.4.1 Interrupt Operation Sequence....................................................................................................630
  564. 19.4.2 Multiple Interrupts...........................................................................................................................632
  565. 19.4.3 Interrupt Masking with MAI Bit...............................................................................................632
  566. 19.5 Interrupt Response Time...............................................................................................................................633
  567.  
  568. Section 20 User Break Controller (UBC)
  569. 20.1 Overview...............................................................................................................................................................635
  570. 20.1.1 Features................................................................................................................................................635
  571. 20.1.2 Block Diagram..................................................................................................................................636
  572.  
  573. 11
  574.  
  575. ----------------------- Page 14-----------------------
  576.  
  577. 20.2 Register Descriptions .....................................................................................................................................638
  578. 20.2.1 Access to UBC Control Registers...........................................................................................638
  579. 20.2.2 Break Address Register A (BARA) .......................................................................................639
  580. 20.2.3 Break ASID Register A (BASRA) .........................................................................................640
  581. 20.2.4 Break Address Mask Register A (BAMRA)......................................................................640
  582. 20.2.5 Break Bus Cycle Register A (BBRA)..................................................................................641
  583. 20.2.6 Break Address Register B (BARB) .......................................................................................643
  584. 20.2.7 Break ASID Register B (BASRB) .........................................................................................643
  585. 20.2.8 Break Address Mask Register B (BAMRB)......................................................................643
  586. 20.2.9 Break Data Register B (BDRB)..............................................................................................643
  587. 20.2.10 Break Data Mask Register B (BDMRB)..........................................................................644
  588. 20.2.11 Break Bus Cycle Register B (BBRB) ...............................................................................645
  589. 20.2.12 Break Control Register (BRCR)...........................................................................................645
  590. 20.3 Operation..............................................................................................................................................................647
  591. 20.3.1 Explanation of Terms Relating to Accesses ......................................................................647
  592. 20.3.2 Explanation of Terms Relating to Instruction Intervals ................................................648
  593. 20.3.3 User Break Operation Sequence..............................................................................................649
  594. 20.3.4 Instruction Access Cycle Break...............................................................................................650
  595. 20.3.5 Operand Access Cycle Break ...................................................................................................651
  596. 20.3.6 Condition Match Flag Setting ..................................................................................................652
  597. 20.3.7 Program Counter (PC) Value Saved .....................................................................................652
  598. 20.3.8 Contiguous A and B Settings for Sequential Conditions .............................................653
  599. 20.3.9 Usage Notes.......................................................................................................................................654
  600. 20.4 User Break Debug Support Function ......................................................................................................655
  601. 20.5 Examples of Use...............................................................................................................................................657
  602.  
  603. Section 21 Hitachi User Debug Interface (Hitachi-UDI)....................................659
  604. 21.1 Overview ..............................................................................................................................................................659
  605. 21.1.1 Features ...............................................................................................................................................659
  606. 21.1.2 Block Diagram .................................................................................................................................659
  607. 21.1.3 Pin Configuration ............................................................................................................................661
  608. 21.1.4 Register Configuration..................................................................................................................662
  609. 21.2 Register Descriptions .....................................................................................................................................662
  610. 21.2.1 Instruction Register (SDIR) .......................................................................................................662
  611. 21.2.2 Data Register (SDDR) .................................................................................................................664
  612. 21.2.3 Bypass Register (SDBPR) .........................................................................................................664
  613. 21.3 Operation..............................................................................................................................................................665
  614. 21.3.1 TAP Control.......................................................................................................................................665
  615. 21.3.2 Hitachi-UDI Reset ..........................................................................................................................666
  616. 21.3.3 Hitachi-UDI Interrupt.....................................................................................................................666
  617. 21.3.4 Bypass ..................................................................................................................................................666
  618. 21.4 Usage Notes........................................................................................................................................................667
  619.  
  620. 12
  621.  
  622. ----------------------- Page 15-----------------------
  623.  
  624. Section 22 Pin Description .................................................................................669
  625. 22.1 Pin Arrangement ...............................................................................................................................................669
  626. 22.2 Pin Functions......................................................................................................................................................671
  627. 22.2.1 Pin Functions (256-Pin BGA) ...................................................................................................671
  628. 22.2.2 Pin Functions (208-Pin QFP) ....................................................................................................681
  629.  
  630. Section 23 Electrical Characteristics ...................................................................689
  631. 23.1 Absolute Maximum Ratings........................................................................................................................689
  632. 23.2 DC Characteristics...........................................................................................................................................690
  633. 23.3 AC Characteristics...........................................................................................................................................692
  634. 23.3.1 Clock and Control Signal Timing............................................................................................693
  635. 23.3.2 Control Signal Timing...................................................................................................................700
  636. 23.3.3. Bus Timing ........................................................................................................................................702
  637. 23.3.4 Peripheral Module Signal Timing ...........................................................................................750
  638. 23.3.5 AC Characteristic Test Conditions .........................................................................................755
  639. 23.3.6 Delay Time Variation Due to Load Capacitance .........................................................756
  640. 23.3.4 Peripheral Module Signal Timing ...........................................................................................750
  641. 23.3.5 AC Characteristic Test Conditions .........................................................................................755
  642. 23.3.6 Delay Time Variation Due to Load Capacitance .........................................................756
  643.  
  644. Appendix A Address List...................................................................................757
  645.  
  646. Appendix B Package Dimensions......................................................................762
  647.  
  648. Appendix C Mode Pin Settings..........................................................................764
  649.  
  650. Appendix D CKIO2ENB Pin Configuration .....................................................766
  651.  
  652. Appendix E Pin Functions .................................................................................768
  653. E.1 Pin States ...............................................................................................................................................................768
  654. E.2 Handling of Unused Pins.................................................................................................................................770
  655.  
  656. Appendix F Synchronous DRAM Address Multiplexing Tables .....................772
  657.  
  658. Appendix G SH7750 On-Demand Data Transfer Mode....................................790
  659. G.1 Pins in DDT Mode.............................................................................................................................................790
  660. G.2 Transfer Request Acceptance on Each Channel.................................................................................793
  661.  
  662. 13
  663.  
  664. ----------------------- Page 16-----------------------
  665.  
  666. 14
  667.  
  668. ----------------------- Page 17-----------------------
  669.  
  670. Section 1 Overview
  671.  
  672. 1 . 1 SH7750 Features
  673.  
  674. The SH7750 is a 32-bit RISC (reduced instruction set computer) microprocessor, featuring object
  675. code upward-compatibility with SH-1, SH-2, SH-3, and SH-3E microcomputers. It includes an 8-
  676. kbyte instruction cache, a 16-kbyte operand cache with a choice of copy-back or write-through
  677. mode, and an MMU (memory management unit) with a 64-entry fully-associative unified TLB
  678. (translation lookaside buffer).
  679.  
  680. The SH7750 has an on-chip bus state controller (BSC) that allows direct connection to DRAM and
  681. synchronous DRAM without external circuitry. Its 16-bit fixed-length instruction set enables
  682. program code size to be reduced by almost 50% compared with 32-bit instructions.
  683.  
  684. The features of the SH7750 are summarized in table 1.1.
  685.  
  686. 1
  687.  
  688. ----------------------- Page 18-----------------------
  689.  
  690. Table 1.1 SH7750 Features
  691.  
  692. Item Features
  693.  
  694. LSI Operating frequency: 200 MHz
  695.  
  696. Performance:
  697.  
  698. 360 MIPS (200 MHz)
  699.  
  700. 1.4 GFLOPS (200 MHz)
  701.  
  702. Superscalar architecture: Parallel execution of two instructions
  703.  
  704. Voltage: 1.8 V (internal), 3.3 V (I/O)
  705.  
  706. Packages: 256-pin BGA, 208-pin QFP
  707.  
  708. External buses
  709.  
  710. Separate 26-bit address and 64-bit data buses
  711.  
  712. External bus frequency of 1/2, 1/3, 1/4, 1/6, or 1/8 times internal bus
  713. frequency
  714.  
  715. CPU Original Hitachi SH architecture
  716.  
  717. 32-bit internal data bus
  718.  
  719. General register file:
  720.  
  721. Sixteen 32-bit general registers (and eight 32-bit shadow registers)
  722.  
  723. Seven 32-bit control registers
  724.  
  725. Four 32-bit system registers
  726.  
  727. RISC-type instruction set (upward-compatible with SH Series)
  728.  
  729. Fixed 16-bit instruction length for improved code efficiency
  730.  
  731. Load-store architecture
  732.  
  733. Delayed branch instructions
  734.  
  735. Conditional execution
  736.  
  737. C-based instruction set
  738.  
  739. Superscalar architecture (providing simultaneous execution of two
  740. instructions) including FPU
  741.  
  742. Instruction execution time: Maximum 2 instructions/cycle
  743.  
  744. Virtual address space: 4 Gbytes (448-Mbyte external memory space)
  745.  
  746. Space identifier ASIDs: 8 bits, 256 virtual address spaces
  747.  
  748. On-chip multiplier
  749.  
  750. Five-stage pipeline
  751.  
  752. 2
  753.  
  754. ----------------------- Page 19-----------------------
  755.  
  756. Table 1.1 SH7750 Features (cont)
  757.  
  758. Item Features
  759.  
  760. FPU On-chip floating-point coprocessor
  761.  
  762. Supports single-precision (32 bits) and double-precision (64 bits)
  763.  
  764. Supports IEEE754-compliant data types and exceptions
  765.  
  766. Two rounding modes: Round to Nearest and Round to Zero
  767.  
  768. Handling of denormalized numbers: Truncation to zero or interrupt generation
  769. for compliance with IEEE754
  770.  
  771. Floating-point registers: 32 bits × 16 words × 2 banks
  772. (single-precision × 16 words or double-precision × 8 words) × 2 banks
  773.  
  774. 32-bit CPU-FPU floating-point communication register (FPUL)
  775.  
  776. Supports FMAC (multiply-and-accumulate) instruction
  777.  
  778. Supports FDIV (divide) and FSQRT (square root) instructions
  779.  
  780. Supports FLDI0/FLDI1 (load constant 0/1) instructions
  781.  
  782. Instruction execution times
  783.  
  784. Latency (FMAC/FADD/FSUB/FMUL): 3 cycles (single-precision), 8 cycles
  785. (double-precision)
  786.  
  787. Pitch (FMAC/FADD/FSUB/FMUL): 1 cycle (single-precision), 6 cycles
  788. (double-precision)
  789.  
  790. Note: FMAC is supported for single-precision only.
  791.  
  792. 3-D graphics instructions (single-precision only):
  793.  
  794. 4-dimensional vector conversion and matrix operations (FTRV): 4 cycles
  795. (pitch), 7 cycles (latency)
  796.  
  797. 4-dimensional vector (FIPR) inner product: 1 cycle (pitch), 4 cycles (latency)
  798.  
  799. Five-stage pipeline
  800.  
  801. 3
  802.  
  803. ----------------------- Page 20-----------------------
  804.  
  805. Table 1.1 SH7750 Features (cont)
  806.  
  807. Item Features
  808.  
  809. Clock pulse Choice of main clock: 1/2, 1, 3, or 6 times EXTAL
  810. generator (CPG) Clock modes:
  811.  
  812. CPU frequency: 1, 1/2, 1/3, 1/4, 1/6, or 1/8 times main clock: maximum 200
  813. MHz
  814.  
  815. Bus frequency: 1/2, 1/3, 1/4, 1/6, or 1/8 times main clock: maximum 100 MHz
  816.  
  817. Peripheral frequency: 1/2, 1/3, 1/4, 1/6, or 1/8 times main clock: maximum 50
  818. MHz
  819.  
  820. Power-down modes
  821.  
  822. Sleep mode
  823.  
  824. Standby mode
  825.  
  826. Module standby function
  827.  
  828. Single-channel watchdog timer
  829.  
  830. Memory 4-Gbyte address space, 256 address space identifiers (8-bit ASIDs)
  831. management Single virtual mode and multiple virtual memory mode
  832. unit (MMU)
  833. Supports multiple page sizes: 1 kbyte, 4 kbytes, 64 kbytes, 1 Mbyte
  834.  
  835. 4-entry fully-associative TLB for instructions
  836.  
  837. 64-entry fully-associative TLB for instructions and operands
  838.  
  839. Supports software-controlled replacement and random-counter replacement
  840. algorithm
  841.  
  842. TLB contents can be accessed directly by address mapping
  843.  
  844. 4
  845.  
  846. ----------------------- Page 21-----------------------
  847.  
  848. Table 1.1 SH7750 Features (cont)
  849.  
  850. Item Features
  851.  
  852. Cache memory Instruction cache (IC)
  853.  
  854. 8 kbytes, direct mapping
  855.  
  856. 256 entries, 32-byte block length
  857.  
  858. Normal mode (8-kbyte cache)
  859.  
  860. Index mode
  861.  
  862. Operand cache (OC)
  863.  
  864. 16 kbytes, direct mapping
  865.  
  866. 512 entries, 32-byte block length
  867.  
  868. Normal mode (16-kbyte cache)
  869.  
  870. Index mode
  871.  
  872. RAM mode (8-kbyte cache + 8-kbyte RAM)
  873.  
  874. Choice of write method (copy-back or write-through)
  875.  
  876. Single-stage copy-back buffer, single-stage write-through buffer
  877.  
  878. Cache memory contents can be accessed directly by address mapping
  879. (usable as on-chip memory)
  880.  
  881. Store queue (32 bytes × 2 entries)
  882.  
  883. Interrupt controller Five independent external interrupts (NMI, IRL3 to IRL0)
  884. (INTC) 15-level signed external interrupts: IRL3 to IRL0
  885.  
  886. On-chip peripheral module interrupts: Priority level can be set for each
  887. module
  888.  
  889. User break Supports debugging by means of user break interrupts
  890. controller (UBC) Two break channels
  891.  
  892. Address, data value, access type, and data size can all be set as break
  893. conditions
  894.  
  895. Supports sequential break function
  896.  
  897. 5
  898.  
  899. ----------------------- Page 22-----------------------
  900.  
  901. Table 1.1 SH7750 Features (cont)
  902.  
  903. Item Features
  904.  
  905. Bus state Supports external memory access
  906. controller (BSC) 64/32/16/8-bit external data bus
  907.  
  908. External memory space divided into seven areas, each of up to 64 Mbytes,
  909. with the following parameters settable for each area:
  910.  
  911. Bus size (8, 16, 32, or 64 bits)
  912.  
  913. Number of wait cycles (hardware wait function also supported)
  914.  
  915. Direct connection of DRAM, synchronous DRAM, and burst ROM possible by
  916. setting space type
  917.  
  918. Supports fast page mode and DRAM EDO
  919.  
  920. Supports PCMCIA interface
  921.  
  922. Chip select signals (CS0 to CS6) output for relevant areas
  923.  
  924. DRAM/synchronous DRAM refresh functions
  925.  
  926. Programmable refresh interval
  927.  
  928. Supports CAS-before-RAS refresh mode and self-refresh mode
  929.  
  930. DRAM/synchronous DRAM burst access function
  931.  
  932. Big endian or little endian mode can be set
  933.  
  934. Direct memory 4-channel physical address DMA controller
  935. access controller
  936. Transfer data size: 8, 16, 32, or 64 bits, or 32 bytes
  937. (DMAC)
  938. Address modes:
  939.  
  940. 1-bus-cycle single address mode
  941.  
  942. 2-bus-cycle dual address mode
  943.  
  944. Transfer requests: External, on-chip module, or auto-requests
  945.  
  946. Bus modes: Cycle-steal or burst mode
  947.  
  948. Supports on-demand data transfer
  949.  
  950. Timer unit (TMU) 3-channel auto-reload 32-bit timer
  951.  
  952. Input capture function
  953.  
  954. Choice of seven counter input clocks
  955.  
  956. Realtime clock (RTC)On-chip clock and calendar functions
  957.  
  958. Built-in 32 kHz crystal oscillator with maximum 1/256 second resolution
  959. (cycle interrupts)
  960.  
  961. 6
  962.  
  963. ----------------------- Page 23-----------------------
  964.  
  965. Table 1.1 SH7750 Features (cont)
  966.  
  967. Item Features
  968.  
  969. Serial Two full-duplex communication channels (SCI, SCIF)
  970. communication
  971. Channel 1 (SCI):
  972. interface
  973. (SCI, SCIF) Choice of asynchronous mode or synchronous mode
  974.  
  975. Supports smart card interface
  976.  
  977. Channel 2 (SCIF):
  978.  
  979. Supports asynchronous mode
  980.  
  981. Separate 16-byte FIFOs provided for transmitter and receiver
  982.  
  983. Packages 256-pin BGA, 208-pin QFP
  984.  
  985. 7
  986.  
  987. ----------------------- Page 24-----------------------
  988.  
  989. 1 . 2 Block Diagram
  990.  
  991. Figure 1.1 shows an internal block diagram of the SH7750.
  992.  
  993. CPU UBC FPU
  994.  
  995. )
  996. s
  997. n )
  998. s
  999. o )
  1000. i n
  1001. t a ) ) )
  1002. c o t a
  1003. i e e t
  1004. u t a d r r a
  1005. r c d a o Lower 32-bit data o
  1006. t u ( o t t d
  1007. s r l s s t
  1008. n t s ( ( ( i
  1009. i s s b
  1010. ( n e a a a -
  1011. t
  1012. s i r t t 2
  1013. s ( d a a a 3
  1014. d
  1015. e a d d d
  1016. r t t t t r
  1017. d a a i i i e
  1018. d t b b b p
  1019. d i - - -
  1020. t b 2 p
  1021. a i - 2 4
  1022. t b 2 3 3 Lower 32-bit data 6 U
  1023. i - 3
  1024. b 2
  1025. 2- 3
  1026. 3
  1027.  
  1028. I cache O cache
  1029. ITLB CCN UTLB
  1030. (8 kB) (16 kB)
  1031.  
  1032. s
  1033. s
  1034. e a a
  1035. t t
  1036. r a a
  1037. d
  1038. CPG d d d
  1039. t t
  1040. a i i
  1041. t b b
  1042. i - -
  1043. b 2 2
  1044. 9- 3 3
  1045. 2
  1046. INTC s
  1047. u
  1048. b
  1049.  
  1050. a
  1051. t
  1052. a
  1053. d s
  1054.  
  1055. l u BSC
  1056. SCI a b DMAC
  1057. r
  1058. e s
  1059. (SCIF) h s
  1060. p e
  1061. i r
  1062. r d
  1063. e d
  1064. p a
  1065. t
  1066. i l
  1067. b a
  1068. - r
  1069. RTC 6 e
  1070. 1 h a a
  1071. p s t t
  1072. i s a a
  1073. r e d d
  1074. e
  1075. r t t
  1076. P d i i
  1077. d b- b-
  1078. TMU A 4 4
  1079. 6 6
  1080.  
  1081. External
  1082. bus interface
  1083.  
  1084. 26-bit
  1085. 64-bit
  1086. address
  1087. data
  1088.  
  1089. CCN: Cache and TLB controller UTLB: Unified TLB (translation lookaside buffer)
  1090. BSC: Bus state controller RTC: Realtime clock
  1091. CPG: Clock pulse generator SCI: Serial communication interface
  1092. DMAC: Direct memory access controller SCIF: Serial communication interface with FIFO
  1093. FPU: Floating-point unit TMU: Timer unit
  1094. INTC: Interrupt controller UBC: User break controller
  1095. ITLB: Instruction TLB (translation lookaside buffer)
  1096.  
  1097.  
  1098. Figure 1.1 Block Diagram of SH7750 Functions
  1099.  
  1100. 8
  1101.  
  1102. ----------------------- Page 25-----------------------
  1103.  
  1104. Section 2 Programming Model
  1105.  
  1106. 2 . 1 Data Formats
  1107.  
  1108. The data formats handled by the SH7750 are shown in figure 2.1.
  1109.  
  1110. 7 0
  1111. Byte (8 bits)
  1112.  
  1113. 15 0
  1114. Word (16 bits)
  1115.  
  1116. 31 0
  1117. Longword (32 bits)
  1118.  
  1119. 31 30 22 0
  1120. Single-precision floating-point (32 bits) s exp fraction
  1121.  
  1122. 63 62 51 0
  1123. Double-precision floating-point (64 bits) s exp fraction
  1124.  
  1125. Figure 2.1 Data Formats
  1126.  
  1127. 9
  1128.  
  1129. ----------------------- Page 26-----------------------
  1130.  
  1131. 2 . 2 Register Configuration
  1132.  
  1133. 2 . 2 . 1 Privileged Mode and Banks
  1134.  
  1135. Processor Modes: The SH7750 has two processor modes, user mode and privileged mode. The
  1136. SH7750 normally operates in user mode, and switches to privileged mode when an exception
  1137. occurs or an interrupt is accepted. There are four kinds of registers—general registers, system
  1138. registers, control registers, and floating-point registers—and the registers that can be accessed differ
  1139. in the two processor modes.
  1140.  
  1141. General Registers: There are 16 general registers, designated R0 to R15. General registers R0
  1142. to R7 are banked registers which are switched by a processor mode change.
  1143.  
  1144. In privileged mode, the register bank bit (RB) in the status register (SR) defines which banked
  1145. register set is accessed as general registers, and which set is accessed only through the load control
  1146. register (LDC) and store control register (STC) instructions.
  1147.  
  1148. When the RB bit is 1 (that is, when bank 1 is selected), the 16 registers comprising bank 1 general
  1149. registers R0_BANK1 to R7_BANK1 and non-banked general registers R8 to R15 can be accessed
  1150. as general registers R0 to R15. In this case, the eight registers comprising bank 0 general registers
  1151. R0_BANK0 to R7_BANK0 are accessed by the LDC/STC instructions. When the RB bit is 0
  1152. (that is, when bank 0 is selected), the 16 registers comprising bank 0 general registers R0_BANK0
  1153. to R7_BANK0 and non-banked general registers R8 to R15 can be accessed as general registers R0
  1154. to R15. In this case, the eight registers comprising bank 1 general registers R0_BANK1 to
  1155. R7_BANK1 are accessed by the LDC/STC instructions.
  1156.  
  1157. In user mode, the 16 registers comprising bank 0 general registers R0_BANK0 to R7_BANK0 and
  1158. non-banked general registers R8 to R15 can be accessed as general registers R0 to R15. The eight
  1159. registers comprising bank 1 general registers R0_BANK1 to R7_BANK1 cannot be accessed.
  1160.  
  1161. Control Registers: Control registers comprise the global base register (GBR) and status
  1162. register (SR), which can be accessed in both processor modes, and the saved status register (SSR),
  1163. saved program counter (SPC), vector base register (VBR), saved general register 15 (SGR), and
  1164. debug base register (DBR), which can only be accessed in privileged mode. Some bits of the status
  1165. register (such as the RB bit) can only be accessed in privileged mode.
  1166.  
  1167. System Registers: System registers comprise the multiply-and-accumulate registers
  1168. (MACH/MACL), the procedure register (PR), the program counter (PC), the floating-point
  1169. status/control register (FPSCR), and the floating-point communication register (FPUL). Access to
  1170. these registers does not depend on the processor mode.
  1171.  
  1172. 10
  1173.  
  1174. ----------------------- Page 27-----------------------
  1175.  
  1176. Floating-Point Registers: There are thirty-two floating-point registers, FR0–FR15 and
  1177. XF0–XF15. FR0–FR15 and XF0–XF15 can be assigned to either of two banks (FPR0_BANK0–
  1178. FPR15_BANK0 or FPR0_BANK1–FPR15_BANK1).
  1179.  
  1180. FR0–FR15 can be used as the eight registers DR0/2/4/6/8/10/12/14 (double-precision floating-
  1181. point registers, or pair registers) or the four registers FV0/4/8/12 (register vectors), while XF0–
  1182. XF15 can be used as the eight registers XD0/2/4/6/8/10/12/14 (register pairs) or register matrix
  1183. XMTRX.
  1184.  
  1185. Register values after a reset are shown in table 2.1.
  1186.  
  1187. Table 2.1 Initial Register Values
  1188.  
  1189. Type Registers Initial Value*
  1190.  
  1191. General registers R0_BANK0–R7_BANK0, Undefined
  1192. R0_BANK1–R7_BANK1,
  1193. R8–R15
  1194.  
  1195. Control registers SR MD bit = 1, RB bit = 1, BL bit = 1, FD bit = 0,
  1196. I3–I0 = 1111 (H'F), reserved bits = 0, others
  1197. undefined
  1198.  
  1199. GBR, SSR, SPC, SGR, DBR Undefined
  1200.  
  1201. VBR H'00000000
  1202.  
  1203. System registers MACH, MACL, PR, FPUL Undefined
  1204.  
  1205. PC H'A0000000
  1206.  
  1207. FPSCR H'00040001
  1208.  
  1209. Floating-point FR0–FR15, XF0–XF15 Undefined
  1210. registers
  1211.  
  1212. Note: * Initialized by a power-on reset and manual reset.
  1213.  
  1214. The register configuration in each processor is shown in figure 2.2.
  1215.  
  1216. Switching between user mode and privileged mode is controlled by the processor mode bit (MD) in
  1217. the status register.
  1218.  
  1219. 11
  1220.  
  1221. ----------------------- Page 28-----------------------
  1222.  
  1223. 31 0 31 0 31 0
  1224. 1, 2 1, 3 1, 4
  1225. _ _ _
  1226. R0 BANK0* * R0 BANK1* * R0 BANK0* *
  1227. 2 3 4
  1228. _ _ _
  1229. R1 BANK0* R1 BANK1* R1 BANK0*
  1230. 2 3 4
  1231. _ _ _
  1232. R2 BANK0* R2 BANK1* R2 BANK0*
  1233. 2 3 4
  1234. _ _ _
  1235. R3 BANK0* R3 BANK1* R3 BANK0*
  1236. 2 3 4
  1237. _ _ _
  1238. R4 BANK0* R4 BANK1* R4 BANK0*
  1239. 2 3 4
  1240. _ _ _
  1241. R5 BANK0* R5 BANK1* R5 BANK0*
  1242. 2 3 4
  1243. _ _ _
  1244. R6 BANK0* R6 BANK1* R6 BANK0*
  1245. 2 3 4
  1246. _ _ _
  1247. R7 BANK0* R7 BANK1* R7 BANK0*
  1248. R8 R8 R8
  1249. R9 R9 R9
  1250. R10 R10 R10
  1251. R11 R11 R11
  1252. R12 R12 R12
  1253. R13 R13 R13
  1254. R14 R14 R14
  1255. R15 R15 R15
  1256.  
  1257. SR SR SR
  1258. SSR SSR
  1259.  
  1260. GBR GBR GBR
  1261. MACH MACH MACH
  1262. MACL MACL MACL
  1263. PR PR PR
  1264. VBR VBR
  1265.  
  1266. PC PC PC
  1267. SPC SPC
  1268.  
  1269. SGR SGR
  1270.  
  1271. DBR DBR
  1272.  
  1273. 1, 4 1, 3
  1274. _ _
  1275. R0 BANK0* * R0 BANK1* *
  1276. 4 3
  1277. _ _
  1278. R1 BANK0* R1 BANK1*
  1279. 4 3
  1280. _ _
  1281. R2 BANK0* R2 BANK1*
  1282. 4 3
  1283. _ _
  1284. R3 BANK0* R3 BANK1*
  1285. 4 3
  1286. _ _
  1287. R4 BANK0* R4 BANK1*
  1288. 4 3
  1289. _ _
  1290. R5 BANK0* R5 BANK1*
  1291. 4 3
  1292. _ _
  1293. R6 BANK0* R6 BANK1*
  1294. 4 3
  1295. _ _
  1296. R7 BANK0* R7 BANK1*
  1297. (a) Register configuration (b) Register configuration in (c) Register configuration in
  1298. in user mode privileged mode (RB = 1) privileged mode (RB = 0)
  1299.  
  1300. Notes: 1. The R0 register is used as the index register in indexed register-indirect addressing mode and
  1301. indexed GBR indirect addressing mode.
  1302. 2. Banked registers
  1303. 3. Banked registers
  1304. Accessed as general registers when the RB bit is set to 1 in the SR register. Accessed only by
  1305. LDC/STC instructions when the RB bit is cleared to 0.
  1306. 4. Banked registers
  1307. Accessed as general registers when the RB bit is cleared to 0 in the SR register. Accessed only by
  1308. LDC/STC instructions when the RB bit is set to 1.
  1309.  
  1310. Figure 2.2 CPU Register Configuration in Each Processor Mode
  1311.  
  1312. 12
  1313.  
  1314. ----------------------- Page 29-----------------------
  1315.  
  1316. 2 . 2 . 2 General Registers
  1317.  
  1318. Figure 2.3 shows the relationship between the processor modes and general registers. The SH7750
  1319. has twenty-four 32-bit general registers (R0_BANK0–R7_BANK0, R0_BANK1–R7_BANK1, and
  1320. R8–R15). However, only 16 of these can be accessed as general registers R0–R15 in one processor
  1321. mode. The SH7750 has two processor modes, user mode and privileged mode, in which R0–R7 are
  1322. assigned as shown below.
  1323.  
  1324. R0_BANK0–R7_BANK0
  1325.  
  1326. • In user mode (SR.MD = 0), R0–R7 are always assigned to R0_BANK0–R7_BANK0.
  1327.  
  1328. • In privileged mode (SR.MD = 1), R0–R7 are assigned to R0_BANK0–R7_BANK0 only when
  1329. SR.RB = 0.
  1330.  
  1331. R0_BANK1–R7_BANK1
  1332.  
  1333. • In user mode, R0_BANK1–R7_BANK1 cannot be accessed.
  1334.  
  1335. • In privileged mode, R0–R7 are assigned to R0_BANK1–R7_BANK1 only when SR.RB = 1.
  1336.  
  1337. 13
  1338.  
  1339. ----------------------- Page 30-----------------------
  1340.  
  1341. SR.MD = 0 or
  1342. (SR.MD = 1, SR.RB = 0) (SR.MD = 1, SR.RB = 1)
  1343.  
  1344. R0 R0_BANK0 R0_BANK0
  1345. R1 R1_BANK0 R1_BANK0
  1346. R2 R2_BANK0 R2_BANK0
  1347. R3 R3_BANK0 R3_BANK0
  1348. R4 R4_BANK0 R4_BANK0
  1349. R5 R5_BANK0 R5_BANK0
  1350. R6 R6_BANK0 R6_BANK0
  1351. R7 R7_BANK0 R7_BANK0
  1352.  
  1353. R0_BANK1 R0_BANK1 R0
  1354. R1_BANK1 R1_BANK1 R1
  1355. R2_BANK1 R2_BANK1 R2
  1356. R3_BANK1 R3_BANK1 R3
  1357. R4_BANK1 R4_BANK1 R4
  1358. R5_BANK1 R5_BANK1 R5
  1359. R6_BANK1 R6_BANK1 R6
  1360. R7_BANK1 R7_BANK1 R7
  1361.  
  1362. R8 R8 R8
  1363. R9 R9 R9
  1364. R10 R10 R10
  1365. R11 R11 R11
  1366. R12 R12 R12
  1367. R13 R13 R13
  1368. R14 R14 R14
  1369. R15 R15 R15
  1370.  
  1371. Figure 2.3 General Registers
  1372.  
  1373. Programming Note: As the user’s R0–R7 are assigned to R0_BANK0–R7_BANK0, and after
  1374. an exception or interrupt R0–R7 are assigned to R0_BANK1–R7_BANK1, it is not necessary for
  1375. the interrupt handler to save and restore the user’s R0–R7 (R0_BANK0–R7_BANK0).
  1376.  
  1377. After a reset, the values of R0_BANK0–R7_BANK0, R0_BANK1–R7_BANK1, and R8–R15 are
  1378. undefined.
  1379.  
  1380. 14
  1381.  
  1382. ----------------------- Page 31-----------------------
  1383.  
  1384. 2 . 2 . 3 Floating-Point Registers
  1385.  
  1386. Figure 2.4 shows the floating-point registers. There are thirty-two 32-bit floating-point registers,
  1387. divided into two banks (FPR0_BANK0–FPR15_BANK0 and FPR0_BANK1–FPR15_BANK1).
  1388. These 32 registers are referenced as FR0–FR15, DR0/2/4/6/8/10/12/14, FV0/4/8/12, XF0–XF15,
  1389. XD0/2/4/6/8/10/12/14, or XMTRX. The correspondence between FPRn_BANKi and the reference
  1390. name is determined by the FR bit in FPSCR (see figure 2.4).
  1391.  
  1392. • Floating-point registers, FPRn_BANKi (32 registers)
  1393.  
  1394. FPR0_BANK0, FPR1_BANK0, FPR2_BANK0, FPR3_BANK0, FPR4_BANK0,
  1395. FPR5_BANK0, FPR6_BANK0, FPR7_BANK0, FPR8_BANK0, FPR9_BANK0,
  1396. FPR10_BANK0, FPR11_BANK0, FPR12_BANK0, FPR13_BANK0, FPR14_BANK0,
  1397. FPR15_BANK0
  1398.  
  1399. FPR0_BANK1, FPR1_BANK1, FPR2_BANK1, FPR3_BANK1, FPR4_BANK1,
  1400. FPR5_BANK1, FPR6_BANK1, FPR7_BANK1, FPR8_BANK1, FPR9_BANK1,
  1401. FPR10_BANK1, FPR11_BANK1, FPR12_BANK1, FPR13_BANK1, FPR14_BANK1,
  1402. FPR15_BANK1
  1403.  
  1404. • Single-precision floating-point registers, FRi (16 registers)
  1405.  
  1406. When FPSCR.FR = 0, FR0–FR15 are assigned to FPR0_BANK0–FPR15_BANK0.
  1407.  
  1408. When FPSCR.FR = 1, FR0–FR15 are assigned to FPR0_BANK1–FPR15_BANK1.
  1409.  
  1410. • Double-precision floating-point registers or single-precision floating-point register pairs, DRi
  1411. (8 registers): A DR register comprises two FR registers.
  1412.  
  1413. DR0 = {FR0, FR1}, DR2 = {FR2, FR3}, DR4 = {FR4, FR5}, DR6 = {FR6, FR7},
  1414. DR8 = {FR8, FR9}, DR10 = {FR10, FR11}, DR12 = {FR12, FR13}, DR14 = {FR14,
  1415. FR15}
  1416.  
  1417. • Single-precision floating-point vector registers, FVi (4 registers): An FV register comprises
  1418. four FR registers
  1419.  
  1420. FV0 = {FR0, FR1, FR2, FR3}, FV4 = {FR4, FR5, FR6, FR7},
  1421. FV8 = {FR8, FR9, FR10, FR11}, FV12 = {FR12, FR13, FR14, FR15}
  1422.  
  1423. • Single-precision floating-point extended registers, XFi (16 registers)
  1424.  
  1425. When FPSCR.FR = 0, XF0–XF15 are assigned to FPR0_BANK1–FPR15_BANK1.
  1426.  
  1427. When FPSCR.FR = 1, XF0–XF15 are assigned to FPR0_BANK0–FPR15_BANK0.
  1428.  
  1429. • Single-precision floating-point extended register pairs, XDi (8 registers): An XD register
  1430. comprises two XF registers
  1431.  
  1432. XD0 = {XF0, XF1}, XD2 = {XF2, XF3}, XD4 = {XF4, XF5}, XD6 = {XF6, XF7},
  1433. XD8 = {XF8, XF9}, XD10 = {XF10, XF11}, XD12 = {XF12, XF13}, XD14 = {XF14,
  1434. XF15}
  1435.  
  1436. 15
  1437.  
  1438. ----------------------- Page 32-----------------------
  1439.  
  1440. • Single-precision floating-point extended register matrix, XMTRX: XMTRX comprises all 16
  1441. XF registers
  1442.  
  1443. XMTRX = XF0 XF4 XF8 XF12
  1444.  
  1445. XF1 XF5 XF9 XF13
  1446.  
  1447. XF2 XF6 XF10 XF14
  1448.  
  1449. XF3 XF7 XF11 XF15
  1450.  
  1451. FPSCR.FR = 0 FPSCR.FR = 1
  1452.  
  1453. FV0 DR0 FR0 FPR0_BANK0 XF0 XD0 XMTRX
  1454. FR1 FPR1_BANK0 XF1
  1455. DR2 FR2 FPR2_BANK0 XF2 XD2
  1456. FR3 FPR3_BANK0 XF3
  1457. FV4 DR4 FR4 FPR4_BANK0 XF4 XD4
  1458. FR5 FPR5_BANK0 XF5
  1459. DR6 FR6 FPR6_BANK0 XF6 XD6
  1460. FR7 FPR7_BANK0 XF7
  1461. FV8 DR8 FR8 FPR8_BANK0 XF8 XD8
  1462. FR9 FPR9_BANK0 XF9
  1463. DR10 FR10 FPR10_BANK0 XF10 XD10
  1464. FR11 FPR11_BANK0 XF11
  1465. FV12 DR12 FR12 FPR12_BANK0 XF12 XD12
  1466. FR13 FPR13_BANK0 XF13
  1467. DR14 FR14 FPR14_BANK0 XF14 XD14
  1468. FR15 FPR15_BANK0 XF15
  1469.  
  1470. XMTRX XD0 XF0 FPR0_BANK1 FR0 DR0 FV0
  1471. XF1 FPR1_BANK1 FR1
  1472. XD2 XF2 FPR2_BANK1 FR2 DR2
  1473. XF3 FPR3_BANK1 FR3
  1474. XD4 XF4 FPR4_BANK1 FR4 DR4 FV4
  1475. XF5 FPR5_BANK1 FR5
  1476. XD6 XF6 FPR6_BANK1 FR6 DR6
  1477. XF7 FPR7_BANK1 FR7
  1478. XD8 XF8 FPR8_BANK1 FR8 DR8 FV8
  1479. XF9 FPR9_BANK1 FR9
  1480. XD10 XF10 FPR10_BANK1 FR10 DR10
  1481. XF11 FPR11_BANK1 FR11
  1482. XD12 XF12 FPR12_BANK1 FR12 DR12 FV12
  1483. XF13 FPR13_BANK1 FR13
  1484. XD14 XF14 FPR14_BANK1 FR14 DR14
  1485. XF15 FPR15_BANK1 FR15
  1486.  
  1487. Figure 2.4 Floating-Point Registers
  1488.  
  1489. 16
  1490.  
  1491. ----------------------- Page 33-----------------------
  1492.  
  1493. Programming Note: After a reset, the values of FPR0_BANK0–FPR15_BANK0 and
  1494. FPR0_BANK1–FPR15_BANK1 are undefined.
  1495.  
  1496. 2 . 2 . 4 Control Registers
  1497.  
  1498. Status register, SR (32 bits, privilege protection, initial value = 0111 0000
  1499. 0000 0000 0000 00XX 1111 00XX)
  1500.  
  1501. 31 30 29 28 27 16 15 14 10 9 8 7 4 3 2 1 0
  1502.  
  1503. — MD RB BL — FD — M Q IMASK — S T
  1504.  
  1505. Note: —: Reserved. These bits are always read as 0, and should only be written with 0.
  1506. X: Undefined
  1507.  
  1508. • MD: Processor mode
  1509.  
  1510. MD = 0: User mode (some instructions cannot be executed, and some resources cannot be
  1511. accessed)
  1512.  
  1513. MD = 1: Privileged mode
  1514.  
  1515. • RB: General register bank specifier in privileged mode (set to 1 by a reset, exception, or
  1516. interrupt)
  1517.  
  1518. RB = 0: R0_BANK0–R7_BANK0 are accessed as general registers R0–R7. (R0_BANK1–
  1519. R7_BANK1 can be accessed using LDC/STC R0_BANK–R7_BANK instructions.)
  1520.  
  1521. RB = 1: R0_BANK1–R7_BANK1 are accessed as general registers R0–R7. (R0_BANK0–
  1522. R7_BANK0 can be accessed using LDC/STC R0_BANK–R7_BANK instructions.)
  1523.  
  1524. • BL: Exception/interrupt block bit (set to 1 by a reset, exception, or interrupt)
  1525.  
  1526. BL = 1: Interrupt requests are masked. If a general exception other than a user break occurs
  1527. while BL = 1, the processor switches to the reset state.
  1528.  
  1529. • FD: FPU disable bit (cleared to 0 by a reset)
  1530.  
  1531. FD = 1: An FPU instruction causes a general FPU disable exception, and if the FPU
  1532. instruction is in a delay slot, a slot FPU disable exception is generated. (FPU instructions:
  1533. H'F*** instructions, LDC(.L)/STS(.L) instructions for FPUL/FPSCR)
  1534.  
  1535. • M, Q: Used by the DIV0S, DIV0U, and DIV1 instructions.
  1536.  
  1537. • IMASK: Interrupt mask level
  1538.  
  1539. External interrupts of a lower level than IMASK are masked.
  1540.  
  1541. • S: Specifies a saturation operation for a MAC instruction.
  1542.  
  1543. • T: True/false condition or carry/borrow bit
  1544.  
  1545. 17
  1546.  
  1547. ----------------------- Page 34-----------------------
  1548.  
  1549. Saved status register, SSR (32 bits, privilege protection, initial value
  1550. undefined): The current contents of SR are saved to SSR in the event of an exception or
  1551. interrupt.
  1552.  
  1553. Saved program counter, SPC (32 bits, privilege protection, initial value
  1554. undefined): The address of an instruction at which an interrupt or exception occurs is saved to
  1555. SPC.
  1556.  
  1557. Global base register, GBR (32 bits, initial value undefined): GBR is referenced as
  1558. the base address in a GBR-referencing MOV instruction.
  1559.  
  1560. Vector base register, VBR (32 bits, privilege protection, initial value = H'0000
  1561. 0000): VBR is referenced as the branch destination base address in the event of an exception or
  1562. interrupt. For details, see section 5, Exceptions.
  1563.  
  1564. Saved general register 15, SGR (32 bits, privilege protection, initial value
  1565. undefined): The contents of R15 are saved to SGR in the event of an exception or interrupt.
  1566.  
  1567. Debug base register, DBR (32 bits, privilege protection, initial value
  1568. undefined): When the user break debug function is enabled (BRCR.UBDE = 1), DBR is
  1569. referenced as the user break handler branch destination address instead of VBR.
  1570.  
  1571. 2 . 2 . 5 System Registers
  1572.  
  1573. Multiply-and-accumulate register high, MACH (32 bits, initial value
  1574. undefined)
  1575. Multiply-and-accumulate register low, MACL (32 bits, initial value undefined)
  1576. MACH/MACL is used for the added value in a MAC instruction, and to store a MAC instruction
  1577. or MUL operation result.
  1578.  
  1579. Procedure register, PR (32 bits, initial value undefined): The return address is stored
  1580. in PR in a subroutine call using a BSR, BSRF, or JSR instruction, and PR is referenced by the
  1581. subroutine return instruction (RTS).
  1582.  
  1583. Program counter, PC (32 bits, initial value = H'A000 0000): PC indicates the
  1584. instruction fetch address.
  1585.  
  1586. 18
  1587.  
  1588. ----------------------- Page 35-----------------------
  1589.  
  1590. Floating-point status/control register, FPSCR (32 bits, initial value = H'0004
  1591. 0001)
  1592.  
  1593. 31 22 21 20 19 18 17 12 11 7 6 2 1 0
  1594.  
  1595. — FR SZ PR DN Cause Enable Flag RM
  1596.  
  1597. Note: —: Reserved. These bits are always read as 0, and should only be written with 0.
  1598.  
  1599. • FR: Floating-point register bank
  1600.  
  1601. FR = 0: FPR0_BANK0–FPR15_BANK0 are assigned to FR0–FR15; FPR0_BANK1–
  1602. FPR15_BANK1 are assigned to XF0–XF15.
  1603.  
  1604. FR = 1: FPR0_BANK0–FPR15_BANK0 are assigned to XF0–XF15; FPR0_BANK1–
  1605. FPR15_BANK1 are assigned to FR0–FR15.
  1606.  
  1607. • SZ: Transfer size mode
  1608.  
  1609. SZ = 0: The data size of the FMOV instruction is 32 bits.
  1610.  
  1611. SZ = 1: The data size of the FMOV instruction is a 32-bit register pair (64 bits).
  1612.  
  1613. • PR: Precision mode
  1614.  
  1615. PR = 0: Floating-point instructions are executed as single-precision operations.
  1616.  
  1617. PR = 1: Floating-point instructions are executed as double-precision operations (the result of
  1618. instructions for which double-precision is not supported is undefined).
  1619.  
  1620. Do not set SZ and PR to 1 simultaneously; this setting is reserved.
  1621.  
  1622. [SZ, PR = 11]: Reserved (FPU operation instruction is undefined.)
  1623.  
  1624. • DN: Denormalization mode
  1625.  
  1626. DN = 0: A denormalized number is treated as such.
  1627.  
  1628. DN = 1: A denormalized number is treated as zero.
  1629.  
  1630. FPU Invalid Division Overflow Underflow Inexact
  1631. Error (E) Operation (V) by Zero (Z) (O) (U) (I)
  1632.  
  1633. Cause FPU exception Bit 17 Bit 16 Bit 15 Bit 14 Bit 13 Bit 12
  1634. cause field
  1635.  
  1636. Enable FPU exception None Bit 11 Bit 10 Bit 9 Bit 8 Bit 7
  1637. enable field
  1638.  
  1639. Flag FPU exception flagNone Bit 6 Bit 5 Bit 4 Bit 3 Bit 2
  1640. field
  1641.  
  1642. When an FPU operation instruction is executed, the cause field is cleared to zero first. When
  1643. the next FPU exception is requested, the corresponding bits in the cause field and flag field are
  1644. set to 1. The flag field holds the status of the exception generated after the field was last cleared.
  1645.  
  1646. 19
  1647.  
  1648. ----------------------- Page 36-----------------------
  1649.  
  1650. • RM: Rounding mode
  1651.  
  1652. • RM = 00: Round to Nearest
  1653.  
  1654. • RM = 01: Round to Zero
  1655.  
  1656. • RM = 10: Reserved
  1657.  
  1658. • RM = 11: Reserved
  1659.  
  1660. • Bits 22 to 31: Reserved
  1661.  
  1662. Floating-point communication register, FPUL (32 bits, initial value
  1663. undefined): Data transfer between FPU registers and CPU registers is carried out via the FPUL
  1664. register.
  1665.  
  1666. Programming Note: When SZ = 1 and big endian mode is selected, FMOV can be used for
  1667. double-precision floating-point load or store operations. In little endian mode, two 32-bit data size
  1668. moves must be executed, with SZ = 0, to load or store a double-precision floating-point number.
  1669.  
  1670. 2 . 3 Memory-Mapped Registers
  1671.  
  1672. Appendix A shows the control registers mapped to memory. The control registers are double-
  1673. mapped to the following two memory areas. All registers have two addresses.
  1674.  
  1675. H'1F00 0000–H'1FFF FFFF
  1676. H'FF00 0000–H'FFFF FFFF
  1677.  
  1678. These two areas are used as follows.
  1679.  
  1680. • H'1F00 0000–H'1FFF FFFF
  1681.  
  1682. This area must be accessed in address translation mode using the TLB. Since external memory
  1683. is defined as a 29-bit address space in the SH7750 architecture, the TLB’s physical page
  1684. numbers do not cover a 32-bit address space. In address translation, the page numbers of this
  1685. area can be set in the corresponding field of the TLB by accessing a memory-mapped register.
  1686. The page numbers of this area should be used as the actual page numbers set in the TLB. When
  1687. address translation is not performed, the operation of accesses to this area is undefined.
  1688.  
  1689. • H'FF00 0000–H'FFFF FFFF
  1690.  
  1691. This area must be accessed without address translation.
  1692.  
  1693. Do not access undefined locations in either area The operation of an access to an undefined
  1694. location is undefined. Also, memory-mapped registers must be accessed using a fixed data size.
  1695. The operation of an access using an invalid data size is undefined.
  1696.  
  1697. Programming Note: Access to area H'FF00 0000–H'FFFF FFFF in user mode will cause an
  1698. address error. Memory-mapped registers can be referenced in user mode by means of access that
  1699. involves address translation.
  1700.  
  1701. 20
  1702.  
  1703. ----------------------- Page 37-----------------------
  1704.  
  1705. 2 . 4 Data Format in Registers
  1706.  
  1707. Register operands are always longwords (32 bits). When a memory operand is only a byte (8 bits)
  1708. or a word (16 bits), it is sign-extended into a longword when loaded into a register.
  1709.  
  1710. 31 0
  1711. Longword
  1712.  
  1713. 2 . 5 Data Formats in Memory
  1714.  
  1715. Memory data formats are classified into bytes, words, and longwords. Memory can be accessed in
  1716. 8-bit byte, 16-bit word, or 32-bit longword form. A memory operand less than 32 bits in length is
  1717. sign-extended before being loaded into a register.
  1718.  
  1719. A word operand must be accessed starting from a word boundary (even address of a 2-byte unit:
  1720. address 2n), and a longword operand starting from a longword boundary (even address of a 4-byte
  1721. unit: address 4n). An address error will result if this rule is not observed. A byte operand can be
  1722. accessed from any address.
  1723.  
  1724. Big endian or little endian byte order can be selected for the data format. The endian should be set
  1725. with the MD5 external pin in a power-on reset. Big endian is selected when the MD5 pin is low,
  1726. and little endian when high. The endian cannot be changed dynamically. Bit positions are numbered
  1727. left to right from most-significant to least-significant. Thus, in a 32-bit longword, the leftmost
  1728. bit, bit 31, is the most significant bit and the rightmost bit, bit 0, is the least significant bit.
  1729.  
  1730. The data format in memory is shown in figure 2.5. In little endian mode, data written as byte-size
  1731. (8 bits) should be read as byte size, and data written as word-size (16 bits) should be read as word
  1732. size.
  1733.  
  1734. A A + 1 A + 2 A + 3 A + 11 A + 10 A + 9 A + 8
  1735.  
  1736. 31 23 15 7 0 31 23 15 7 0
  1737.  
  1738. 7 0 7 0 7 0 7 0 7 0 7 0 7 0 7 0
  1739. Address A Byte 0 Byte 1 Byte 2 Byte 3 Byte 3 Byte 2 Byte 1 Byte 0 Address A + 8
  1740.  
  1741. 15 0 15 0 15 0 15 0
  1742. Address A + 4 Word 0 Word 1 Word 1 Word 0 Address A + 4
  1743.  
  1744. 31 0 31 0
  1745. Address A + 8 Longword Longword Address A
  1746.  
  1747. Big endian Little endian
  1748.  
  1749. Figure 2.5 Data Formats In Memory
  1750.  
  1751. 21
  1752.  
  1753. ----------------------- Page 38-----------------------
  1754.  
  1755. Note: The SH7750 does not support endian conversion for the 64-bit data format. Therefore, if
  1756. double-precision floating-point format (64-bit) access is performed in little endian mode,
  1757. the upper and lower 32 bits will be reversed.
  1758.  
  1759. 2 . 6 Processor States
  1760.  
  1761. The SH7750 has five processor states: the reset state, exception-handling state, bus-released state,
  1762. program execution state, and power-down state.
  1763.  
  1764. Reset State: In this state the CPU is reset. The reset state is entered when the RESET pin goes
  1765. low. The CPU enters the power-on reset state if the MRESET pin is high, and the manual reset
  1766. state if the MRESET pin is low. For more information on resets, see section 5, Exceptions.
  1767.  
  1768. In the power-on reset state, the internal state of the CPU and the on-chip peripheral module
  1769. registers are initialized. In the manual reset state, the internal state of the CPU and registers of on-
  1770. chip peripheral modules other than the bus state controller (BSC) are initialized. Since the bus
  1771. state controller (BSC) is not initialized in the manual reset state, refreshing operations continue.
  1772. Refer to the register configurations in the relevant sections for further details.
  1773.  
  1774. Exception-Handling State: This is a transient state during which the CPU’s processor state
  1775. flow is altered by a reset, general exception, or interrupt exception handling source.
  1776.  
  1777. In the case of a reset, the CPU branches to address H'A000 0000 and starts executing the user-coded
  1778. exception handling program.
  1779.  
  1780. In the case of a general exception or interrupt, the program counter (PC) contents are saved in the
  1781. saved program counter (SPC), the status register (SR) contents are saved in the saved status
  1782. register (SSR), and the R15 contents are saved in saved general register 15 (SGR). The CPU
  1783. branches to the start address of the user-coded exception service routine found from the sum of the
  1784. contents of the vector base address and the vector offset. See section 5, Exceptions, for more
  1785. information on resets, general exceptions, and interrupts.
  1786.  
  1787. Program Execution State: In this state the CPU executes program instructions in sequence.
  1788.  
  1789. Power-Down State: In the power-down state, CPU operation halts and power consumption is
  1790. reduced. The power-down state is entered by executing a SLEEP instruction. There are two modes
  1791. in the power-down state: sleep mode and standby mode. For details, see section 9, Power-Down
  1792. Modes.
  1793.  
  1794. Bus-Released State: In this state the CPU has released the bus to a device that requested it.
  1795.  
  1796. Transitions between the states are shown in figure 2.6.
  1797.  
  1798. 22
  1799.  
  1800. ----------------------- Page 39-----------------------
  1801.  
  1802. From any state when From any state when
  1803. RESET = 0 and MRESET = 1 RESET = 0 and MRESET = 0
  1804.  
  1805.  
  1806. Power-on reset state Manual reset state
  1807. RESET = 0,
  1808. MRESET = 1
  1809. Reset state
  1810.  
  1811. RESET = 1, RESET = 1,
  1812. MRESET = 1 MRESET = 0
  1813.  
  1814. Exception-handling state
  1815.  
  1816. Bus request
  1817. Bus request
  1818. clearance
  1819. Interrupt Interrupt
  1820.  
  1821. Exception End of exception
  1822. Bus-released state interrupt transition
  1823. processing
  1824.  
  1825. Bus request
  1826. Bus
  1827. clearance
  1828. request
  1829.  
  1830. Bus request Bus request Program execution state
  1831. clearance
  1832.  
  1833. SLEEP instruction SLEEP instruction
  1834. with STBY bit with STBY bit set
  1835. cleared
  1836.  
  1837. Sleep mode Standby mode
  1838.  
  1839. Power-down state
  1840.  
  1841. Figure 2.6 Processor State Transitions
  1842.  
  1843. 2 . 7 Processor Modes
  1844.  
  1845. There are two processor modes: user mode and privileged mode. The processor mode is determined
  1846. by the processor mode bit (MD) in the status register (SR). User mode is selected when the MD
  1847. bit is cleared to 0, and privileged mode when the MD bit is set to 1. When the reset state or
  1848. exception state is entered, the MD bit is set to 1. When exception handling ends, the MD bit is
  1849. cleared to 0 and user mode is entered. There are certain registers and bits which can only be accessed
  1850. in privileged mode.
  1851.  
  1852. 23
  1853.  
  1854. ----------------------- Page 40-----------------------
  1855.  
  1856. 24
  1857.  
  1858. ----------------------- Page 41-----------------------
  1859.  
  1860. Section 3 Memory Management Unit (MMU)
  1861.  
  1862. 3 . 1 Overview
  1863.  
  1864. 3 . 1 . 1 Features
  1865.  
  1866. The SH7750 can handle 29-bit external memory space from an 8-bit address space identifier and 32-
  1867. bit logical (virtual) address space. Address translation from virtual address to physical address is
  1868. performed using the memory management unit (MMU) built into the SH7750. The MMU
  1869. performs high-speed address translation by caching user-created address translation table information
  1870. in an address translation buffer (translation lookaside buffer: TLB). The SH7750 has four
  1871. instruction TLB (ITLB) entries and 64 unified TLB (UTLB) entries. UTLB copies are stored in the
  1872. ITLB by hardware. A paging system is used for address translation, with support for four page
  1873. sizes (1, 4, and 64 kbytes, and 1 Mbyte). It is possible to set the virtual address space access right
  1874. and implement storage protection independently for privileged mode and user mode.
  1875.  
  1876. 3 . 1 . 2 Role of the MMU
  1877.  
  1878. The MMU was conceived as a means of making efficient use of physical memory. As shown in
  1879. figure 3.1, when a process is smaller in size than the physical memory, the entire process can be
  1880. mapped onto physical memory, but if the process increases in size to the point where it does not
  1881. fit into physical memory, it becomes necessary to divide the process into smaller parts, and map
  1882. the parts requiring execution onto physical memory on an ad hoc basis ((1)). Having this mapping
  1883. onto physical memory executed consciously by the process itself imposes a heavy burden on the
  1884. process. The virtual memory system was devised as a means of handling all physical memory
  1885. mapping to reduce this burden ((2)). With a virtual memory system, the size of the available
  1886. virtual memory is much larger than the actual physical memory, and processes are mapped onto
  1887. this virtual memory. Thus processes only have to consider their operation in virtual memory, and
  1888. mapping from virtual memory to physical memory is handled by the MMU. The MMU is
  1889. normally managed by the OS, and physical memory switching is carried out so as to enable the
  1890. virtual memory required by a task to be mapped smoothly onto physical memory. Physical
  1891. memory switching is performed via secondary storage, etc.
  1892.  
  1893. The virtual memory system that came into being in this way works to best effect in a time sharing
  1894. system (TSS) that allows a number of processes to run simultaneously ((3)). Running a number of
  1895. processes in a TSS did not increase efficiency since each process had to take account of physical
  1896. memory mapping. Efficiency is improved and the load on each process reduced by the use of a
  1897. virtual memory system ((4)). In this system, virtual memory is allocated to each process. The task
  1898. of the MMU is to map a number of virtual memory areas onto physical memory in an efficient
  1899. manner. It is also provided with memory protection functions to prevent a process from
  1900. inadvertently accessing another process’s physical memory.
  1901.  
  1902. 25
  1903.  
  1904. ----------------------- Page 42-----------------------
  1905.  
  1906. When address translation from virtual memory to physical memory is performed using the MMU,
  1907. it may happen that the translation information has not been recorded in the MMU, or the virtual
  1908. memory of a different process is accessed by mistake. In such cases, the MMU will generate an
  1909. exception, change the physical memory mapping, and record the new address translation
  1910. information.
  1911.  
  1912. Although the functions of the MMU could be implemented by software alone, having address
  1913. translation performed by software each time a process accessed physical memory would be very
  1914. inefficient. For this reason, a buffer for address translation (the translation lookaside buffer: TLB)
  1915. is provided in hardware, and frequently used address translation information is placed here. The TLB
  1916. can be described as a cache for address translation information. However, unlike a cache, if address
  1917. translation fails—that is, if an exception occurs—switching of the address translation information
  1918. is normally performed by software. Thus memory management can be performed in a flexible
  1919. manner by software.
  1920.  
  1921. There are two methods by which the MMU can perform mapping from virtual memory to physical
  1922. memory: the paging method, using fixed-length address translation, and the segment method, using
  1923. variable-length address translation. With the paging method, the unit of translation is a fixed-size
  1924. address space called a page (usually from 1 to 64 kbytes in size).
  1925.  
  1926. In the following descriptions, the address space in virtual memory in the SH7750 is referred to as
  1927. virtual address space, and the address space in physical memory as physical address space.
  1928.  
  1929. 26
  1930.  
  1931. ----------------------- Page 43-----------------------
  1932.  
  1933. Virtual
  1934. memory MMU Physical
  1935. Process 1
  1936. Physical memory
  1937. Physical Process 1
  1938. memory
  1939. memory
  1940. Process 1
  1941.  
  1942. (1) (2)
  1943.  
  1944. Virtual
  1945. Physical
  1946. Process 1 Process 1 memory
  1947. memory
  1948.  
  1949. MMU Physical
  1950. memory
  1951.  
  1952. Process 2 Process 2
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958. Process 3 Process 3
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965. (3) (4)
  1966.  
  1967. Figure 3.1 Role of the MMU
  1968.  
  1969.  
  1970.  
  1971. 27
  1972.  
  1973. ----------------------- Page 44-----------------------
  1974.  
  1975. 3 . 1 . 3 Register Configuration
  1976.  
  1977. The MMU registers are shown in table 3.1.
  1978.  
  1979. Table 3.1 MMU Registers
  1980.  
  1981. Abbrevia- Initial P 4 Area 7 Acces
  1982. Name tion R/W Value* 1 Address* 2 Address* 2 s Size
  1983.  
  1984. Page table entry high PTEH R/W Undefined H'FF00 0000 H'1F00 0000 32
  1985. register
  1986.  
  1987. Page table entry low PTEL R/W Undefined H'FF00 0004 H'1F00 0004 32
  1988. register
  1989.  
  1990. Page table entry PTEA R/W Undefined H'FF00 0034 H'1F00 0034 32
  1991. assistance register
  1992.  
  1993. Translation table base TTB R/W Undefined H'FF00 0008 H'1F00 0008 32
  1994. register
  1995.  
  1996. TLB exception address TEA R/W Undefined H'FF00 000C H'1F00 000C 32
  1997. register
  1998.  
  1999. MMU control register MMUCR R/W H'0000 0000 H'FF00 0010 H'1F00 0010 32
  2000.  
  2001. Notes: 1. The initial value is the value after a power-on reset or manual reset.
  2002. 2. This is the address when using the virtual/physical address space P4 area. When
  2003. making an access from physical address space area 7 using the TLB, the upper 3 bits
  2004. of the address are ignored.
  2005.  
  2006. 3 . 1 . 4 Caution
  2007.  
  2008. Operation is not guaranteed if an area designated as a reserved area in this manual is accessed.
  2009.  
  2010. 28
  2011.  
  2012. ----------------------- Page 45-----------------------
  2013.  
  2014. 3 . 2 Register Descriptions
  2015.  
  2016. There are six MMU-related registers.
  2017.  
  2018. 1. PTEH
  2019.  
  2020. 31 10 9 8 7 0
  2021.  
  2022. VPN — — ASID
  2023.  
  2024. 2. PTEL
  2025.  
  2026. 31 30 29 28 10 9 8 7 6 5 4 3 2 1 0
  2027.  
  2028. — — — PPN — V SZ PR SZ C D SH WT
  2029.  
  2030. 3. PTEA
  2031.  
  2032. 31 4 3 2 0
  2033.  
  2034. TC SA
  2035.  
  2036. 4. TTB
  2037.  
  2038. 31 0
  2039.  
  2040. TTB
  2041.  
  2042. 5. TEA
  2043.  
  2044. 31
  2045.  
  2046. Virtual address at which MMU exception or address error occurred
  2047.  
  2048. 6. MMUCR
  2049.  
  2050. 31 26 25 24 23 18 17 16 15 10 9 8 7 6 5 4 3 2 1 0
  2051.  
  2052. LRUI — — URB — — URC SV — — — — — TI — AT
  2053.  
  2054. SQMD
  2055.  
  2056. — indicates a reserved bit: the write value must be 0, and a read will return an undefined value.
  2057.  
  2058. Figure 3.2 MMU-Related Registers
  2059.  
  2060. 29
  2061.  
  2062. ----------------------- Page 46-----------------------
  2063.  
  2064. 1. Page table entry high register (PTEH): Longword access to PTEH can be performed
  2065. from H'FF00 0000 in the P4 area and H'1F00 0000 in area 7. PTEH consists of the virtual page
  2066. number (VPN) and address space identifier (ASID). When an MMU exception or address error
  2067. exception occurs, the VPN of the virtual address at which the exception occurred is set in the VPN
  2068. field by hardware. VPN varies according to the page size, but the VPN set by hardware when an
  2069. exception occurs consists of the upper 22 bits of the virtual address which caused the exception.
  2070. VPN setting can also be carried out by software. The number of the currently executing process is
  2071. set in the ASID field by software. ASID is not updated by hardware. VPN and ASID are recorded in
  2072. the UTLB by means of the LDLTB instruction.
  2073.  
  2074. 2. Page table entry low register (PTEL): Longword access to PTEL can be performed
  2075. from H'FF00 0004 in the P4 area and H'1F00 0004 in area 7. PTEL is used to hold the physical
  2076. page number and page management information to be recorded in the UTLB by means of the
  2077. LDTLB instruction. The contents of this register are not changed unless a software directive is
  2078. issued.
  2079.  
  2080. 3. Page table entry assistance register (PTEA): Longword access to PTEA can be
  2081. performed from H'FF00 0034 in the P4 area and H'1F00 0034 in area 7. PTEL is used to store
  2082. assistance bits for PCMCIA access to the UTLB by means of the LDTLB instruction. The
  2083. contents of this register are not changed unless a software directive is issued.
  2084.  
  2085. 4. Translation table base register (TTB): Longword access to TTB can be performed
  2086. from H'FF00 0008 in the P4 area and H'1F00 0008 in area 7. TTB is used, for example, to hold
  2087. the base address of the currently used page table. The contents of TTB are not changed unless a
  2088. software directive is issued. This register can be freely used by software.
  2089.  
  2090. 5. TLB exception address register (TEA): Longword access to TEA can be performed
  2091. from H'FF00 000C in the P4 area and H'1F00 000C in area 7. After an MMU exception or address
  2092. error exception occurs, the virtual address at which the exception occurred is set in TEA by
  2093. hardware. The contents of this register can be changed by software.
  2094.  
  2095. 6. MMU control register (MMUCR): MMUCR contains the following bits:
  2096. LRUI: Least recently used ITLB
  2097. URB: UTLB replace boundary
  2098. URC: UTLB replace counter
  2099. SQMD: Store queue mode bit
  2100. SV: Single virtual mode bit
  2101. TI: TLB invalidate
  2102. AT: Address translation bit
  2103.  
  2104. Longword access to MMUCR can be performed from H'FF00 0010 in the P4 area and H'1F00
  2105. 0010 in area 7. The individual bits perform MMU settings as shown below. Therefore, MMUCR
  2106. rewriting should be performed by a program in the P1 or P2 area. After MMUCR is updated, an
  2107. instruction that performs data access to the P0, P3, U0, or store queue area should be located at
  2108.  
  2109. 30
  2110.  
  2111. ----------------------- Page 47-----------------------
  2112.  
  2113. least four instructions after the MMUCR update instruction. Also, a branch instruction to the P0,
  2114. P3, or U0 area should be located at least eight instructions after the MMUCR update instruction.
  2115. MMUCR contents can be changed by software. The LRUI bits and URC bits may also be updated
  2116. by hardware.
  2117.  
  2118. LRUI: The LRU (least recently used) method is used to decide the ITLB entry to be replaced in the
  2119. event of an ITLB miss. The entry to be purged from the ITLB can be confirmed using the LRUI
  2120. bits. LRUI is updated by means of the algorithm shown below. A dash in this table means that
  2121. updating is not performed.
  2122.  
  2123. LRUI
  2124.  
  2125. [ 5 ] [ 4 ] [ 3 ] [ 2 ] [ 1 ] [ 0 ]
  2126.  
  2127. When ITLB entry 0 is used 0 0 0 — — —
  2128.  
  2129. When ITLB entry 1 is used 1 — — 0 0 —
  2130.  
  2131. When ITLB entry 2 is used — 1 — 1 — 0
  2132.  
  2133. When ITLB entry 3 is used — — 1 — 1 1
  2134.  
  2135. Other than the above — — — — — —
  2136.  
  2137. When the LRUI bit settings are as shown below, the corresponding ITLB entry is updated by
  2138. an ITLB miss. An asterisk in this table means “don’t care”.
  2139.  
  2140. LRUI
  2141.  
  2142. [ 5 ] [ 4 ] [ 3 ] [ 2 ] [ 1 ] [ 0 ]
  2143.  
  2144. ITLB entry 0 is updated 1 1 1 * * *
  2145.  
  2146. ITLB entry 1 is updated 0 * * 1 1 *
  2147.  
  2148. ITLB entry 2 is updated * 0 * 0 * 1
  2149.  
  2150. ITLB entry 3 is updated * * 0 * 0 0
  2151.  
  2152. Other than the above Setting prohibited
  2153.  
  2154. Ensure that values for which “Setting prohibited” is indicated in the above table are not set at
  2155. the discretion of software. After a power-on or manual reset the LRUI bits are initialized to 0,
  2156. and therefore a prohibited setting is never made by a hardware update.
  2157.  
  2158. URB: Bits that indicate the UTLB entry boundary at which replacement is to be performed. Valid
  2159. only when URB > 0.
  2160.  
  2161. URC: Random counter for indicating the UTLB entry for which replacement is to be performed
  2162. with an LDTLB instruction. URC is incremented each time the UTLB is accessed. When URB >
  2163. 0, URC is reset to 0 when the condition URC = URB occurs. Also note that, if a value is written
  2164.  
  2165. 31
  2166.  
  2167. ----------------------- Page 48-----------------------
  2168.  
  2169. to URC by software which results in the condition URC > URB, incrementing is first performed
  2170. in excess of URB until URC = H'3F. URC is not incremented by an LDTLB instruction.
  2171.  
  2172. • SQMD: Store queue mode bit. Specifies the right of access to the store queues.
  2173.  
  2174. 0: User/privileged access possible
  2175.  
  2176. 1: Privileged access possible (address error exception in case of user access)
  2177.  
  2178. • SV: Bit that switches between single virtual memory mode and multiple virtual memory mode.
  2179.  
  2180. 0: Multiple virtual memory mode
  2181.  
  2182. 1: Single virtual memory mode
  2183.  
  2184. When this bit is changed, ensure that 1 is also written to the TI bit.
  2185.  
  2186. • TI: Writing 1 to this bit invalidates (clears to 0) all valid UTLB/ITLB bits. This bit always
  2187. returns 0 when read.
  2188.  
  2189. • AT: Specifies MMU enabling or disabling.
  2190.  
  2191. 0: MMU disabled
  2192.  
  2193. 1: MMU enabled
  2194.  
  2195. MMU exceptions are not generated when the AT bit is 0. In the case of software that does not
  2196. use the MMU, therefore, the AT bit should be cleared to 0.
  2197.  
  2198. 3 . 3 Memory Space
  2199.  
  2200. 3 . 3 . 1 Physical Memory Space
  2201.  
  2202. The SH7750 supports a 32-bit physical memory space, and can access a 4-Gbyte address space.
  2203. When the MMUCR.AT bit is cleared to 0 and the MMU is disabled, the address space is this
  2204. physical memory space. The physical memory space is divided into a number of areas, as shown in
  2205. figure 3.3. The physical memory space is permanently mapped onto 29-bit external memory space;
  2206. this correspondence can be implemented by ignoring the upper 3 bits of the physical memory
  2207. space addresses. In privileged mode, the 4-Gbyte space from the P0 area to the P4 area can be
  2208. accessed. In user mode, a 2-Gbyte space in the U0 area can be accessed. Accessing the P1 to P4
  2209. areas (except the store queue area) in user mode will cause an address error.
  2210.  
  2211. 32
  2212.  
  2213. ----------------------- Page 49-----------------------
  2214.  
  2215. External
  2216. memory space
  2217. H'0000 0000 Area 0 H'0000 0000
  2218.  
  2219. Area 1
  2220. Area 2
  2221. Area 3
  2222. P0 area Area 4 U0 area
  2223. Cacheable Area 5 Cacheable
  2224.  
  2225. Area 6
  2226. Area 7
  2227.  
  2228. H'8000 0000 H'8000 0000
  2229. P1 area
  2230. Cacheable
  2231. H'A000 0000
  2232. P2 area
  2233. Non-cacheable
  2234. Address error
  2235. H'C000 0000
  2236. P3 area
  2237. Cacheable
  2238. H'E000 0000 P4 area Store queue area H'E000 0000
  2239. H'E400 0000
  2240. Non-cacheable Address error
  2241. H'FFFF FFFF H'FFFF FFFF
  2242.  
  2243. Privileged mode User mode
  2244.  
  2245. Figure 3.3 Physical Memory Space (MMUCR.AT = 0)
  2246.  
  2247. P0, P1, P3, U0 Areas: The P0, P1, P3, and U0 areas can be accessed using the cache.
  2248. Whether or not the cache is used is determined by the cache control register (CCR). When the
  2249. cache is used, with the exception of the P1 area, switching between the copy-back method and the
  2250. write-through method for write accesses is specified by the CCR.WT bit. For the P1 area,
  2251. switching is specified by the CCR.CB bit. Zeroizing the upper 3 bits of an address in these areas
  2252. gives the corresponding external memory space address. However, since area 7 in the external
  2253. memory space is a reserved area, a reserved area also appears in these areas.
  2254.  
  2255. P2 Area: The P2 area cannot be accessed using the cache. In the P2 area, zeroizing the upper 3
  2256. bits of an address gives the corresponding external memory space address. However, since area 7 in
  2257. the external memory space is a reserved area, a reserved area also appears in this area.
  2258.  
  2259. P4 Area: The P4 area is mapped onto SH7750 on-chip I/O channels. This area cannot be
  2260. accessed using the cache. The P4 area is shown in detail in figure 3.4.
  2261.  
  2262. 33
  2263.  
  2264. ----------------------- Page 50-----------------------
  2265.  
  2266. H'E000 0000
  2267. Store queue
  2268. H'E400 0000
  2269.  
  2270. Reserved area
  2271.  
  2272.  
  2273.  
  2274. H'F000 0000
  2275. Instruction cache address array
  2276. H'F100 0000
  2277. Instruction cache data array
  2278. H'F200 0000
  2279. Instruction TLB address array
  2280. H'F300 0000
  2281. Instruction TLB data arrays 1 and 2
  2282. H'F400 0000
  2283. Operand cache address array
  2284. H'F500 0000
  2285. Operand cache data array
  2286. H'F600 0000
  2287. Unified TLB address array
  2288. H'F700 0000
  2289. Unified TLB data arrays 1 and 2
  2290. H'F800 0000
  2291.  
  2292.  
  2293.  
  2294.  
  2295. Reserved area
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304. H'FF00 0000
  2305. Control register area
  2306.  
  2307. Figure 3.4 P4 Area
  2308.  
  2309. The area from H'E000 0000 to H'E3FF FFFF comprises addresses for accessing the store queues
  2310. (SQs). When the MMU is disabled (MMUCR.AT = 0), the SQ access right is specified by the
  2311. MMUCR.SQMD bit. For details, see section 4.6, Store Queues.
  2312.  
  2313. The area from H'F000 0000 to H'F0FF FFFF is used for direct access to the instruction cache
  2314. address array. For details, see section 4.5.1, IC Address Array.
  2315.  
  2316. The area from H'F100 0000 to H'F1FF FFFF is used for direct access to the instruction cache data
  2317. array. For details, see section 4.5.2, IC Data Array.
  2318.  
  2319. The area from H'F200 0000 to H'F2FF FFFF is used for direct access to the instruction TLB
  2320. address array. For details, see section 3.7.1, ITLB Address Array.
  2321.  
  2322. The area from H'F300 0000 to H'F3FF FFFF is used for direct access to instruction TLB data
  2323. arrays 1 and 2. For details, see sections 3.7.2, ITLB Data Array 1, and 3.7.3, ITLB Data Array 2.
  2324.  
  2325. 34
  2326.  
  2327. ----------------------- Page 51-----------------------
  2328.  
  2329. The area from H'F400 0000 to H'F4FF FFFF is used for direct access to the operand cache address
  2330. array. For details, see section 4.5.3, OC Address Array.
  2331.  
  2332. The area from H'F500 0000 to H'F5FF FFFF is used for direct access to the operand cache data
  2333. array. For details, see section 4.5.4, OC Data Array.
  2334.  
  2335. The area from H'F600 0000 to H'F6FF FFFF is used for direct access to the unified TLB address
  2336. array. For details, see section 3.7.4, UTLB Address Array.
  2337.  
  2338. The area from H'F700 0000 to H'F7FF FFFF is used for direct access to unified TLB data arrays 1
  2339. and 2. For details, see sections 3.7.5, UTLB Data Array 1, and 3.7.6, UTLB Data Array 2.
  2340.  
  2341. The area from H'FF00 0000 to H'FFFF FFFF is the on-chip peripheral module control register
  2342. area.
  2343.  
  2344. 3 . 3 . 2 External Memory Space
  2345.  
  2346. The SH7750 supports a 29-bit external memory space. The external memory space is divided into
  2347. eight areas as shown in figure 3.5. Areas 0 to 6 relate to memory, such as SRAM, synchronous
  2348. DRAM, DRAM, and PCMCIA. Area 7 is a reserved area. For details, see section 13, Bus State
  2349. Controller (BSC).
  2350.  
  2351. H'0000 0000
  2352. Area 0
  2353.  
  2354. H'0400 0000
  2355. Area 1
  2356.  
  2357. H'0800 0000
  2358. Area 2
  2359.  
  2360. H'0C00 0000
  2361. Area 3
  2362.  
  2363. H'1000 0000
  2364. Area 4
  2365.  
  2366. H'1400 0000
  2367. Area 5
  2368.  
  2369. H'1800 0000
  2370. Area 6
  2371.  
  2372. H'1C00 0000
  2373. Area 7 (reserved area)
  2374. H'1FFF FFFF
  2375.  
  2376. Figure 3.5 External Memory Space
  2377.  
  2378. 35
  2379.  
  2380. ----------------------- Page 52-----------------------
  2381.  
  2382. 3 . 3 . 3 Virtual Memory Space
  2383.  
  2384. Setting the MMUCR.AT bit to 1 enables the P0, P3, and U0 areas of the physical memory space
  2385. in the SH7750 to be mapped onto any external memory space in 1-, 4-, or 64-kbyte, or 1-Mbyte,
  2386. page units. By using an 8-bit address space identifier, the P0, U0, P3, and store queue areas can be
  2387. increased to a maximum of 256. This is called the virtual memory space. Mapping from virtual
  2388. memory space to 29-bit external memory space is carried out using the TLB. Only when area 7 in
  2389. external memory space is accessed using virtual memory space, addresses H'1F00 0000 to H'1FFF
  2390. FFFF of area 7 are not designated as a reserved area, but are equivalent to the P4 area control
  2391. register area in the physical memory space. Virtual memory space is illustrated in figure 3.6.
  2392.  
  2393. 256 External 256
  2394. memory space
  2395.  
  2396. Area 0
  2397.  
  2398. Area 1
  2399.  
  2400. Area 2
  2401.  
  2402. P0 area Area 3
  2403. U0 area
  2404. Cacheable Area 4
  2405. Cacheable
  2406. Address translation possible Area 5 Address translation possible
  2407.  
  2408. Area 6
  2409.  
  2410. Area 7
  2411.  
  2412. P1 area
  2413. Cacheable
  2414. Address translation not possible
  2415.  
  2416. P2 area
  2417. Non-cacheable
  2418. Address translation not possible Address error
  2419.  
  2420. P3 area
  2421. Cacheable
  2422. Address translation possible
  2423. P4 area Store queue area
  2424. Non-cacheable
  2425. Address error
  2426. Address translation not possible
  2427.  
  2428. Privileged mode User mode
  2429.  
  2430. Figure 3.6 Virtual Memory Space (MMUCR.AT = 1)
  2431.  
  2432. P0, P3, U0 Areas: The P0 area (excluding addresses H'7C00 0000 to H'7FFF FFFF), P3 area,
  2433. and U0 area allow access using the cache and address translation using the TLB. These areas can be
  2434. mapped onto any external memory space in 1-, 4-, or 64-kbyte, or 1-Mbyte, page units. When
  2435. CCR is in the cache-enabled state and the TLB enable bit (C bit) is 1, accesses can be performed
  2436. using the cache. In write accesses to the cache, switching between the copy-back method and the
  2437. write-through method is indicated by the TLB write-through bit (WT bit), and is specified in page
  2438. units.
  2439. 36
  2440.  
  2441. ----------------------- Page 53-----------------------
  2442.  
  2443. Only when the P0, P3, and U0 areas are mapped onto external memory space by means of the
  2444. TLB, addresses H'1F00 0000 to H'1FFF FFFF of area 7 in external memory space are allocated to
  2445. the control register area. This enables on-chip peripheral module control registers to be accessed
  2446. from the U0 area in user mode. In this case, the C bit for the corresponding page must be cleared
  2447. to 0.
  2448.  
  2449. In the cache enabled state, when areas P0, P3, and U0 are mapped onto the PCMCIA space by
  2450. means of TLB, it is necessary either to specify 1 for the WT bit or to specify 0 for the C bit; it is
  2451. not possible to use copy-back mode cache for the PCMCIA space.
  2452.  
  2453. P1, P2, P4 Areas: Address translation using the TLB cannot be performed for the P1, P2, or
  2454. P4 area (except for the store queue area). Accesses to these areas are the same as for physical
  2455. memory space. The store queue area can be mapped onto any external memory space by the MMU.
  2456. However, operation in the case of an exception differs from that for normal P0, U0, and P3 spaces.
  2457. For details, see section 4.6, Store Queues.
  2458.  
  2459. 3 . 3 . 4 On-Chip RAM Space
  2460.  
  2461. In the SH7750, half (8 kbytes) of the instruction cache (16 kbytes) can be used as on-chip RAM.
  2462. This can be done by changing the CCR settings.
  2463.  
  2464. When the operand cache is used as on-chip RAM (CCR.ORA = 1), P0 area addresses H'7C00 0000
  2465. to H'7FFF FFFF are an on-chip RAM area. Data accesses (byte/word/longword/quadword) can be
  2466. used in this area. This area can only be used in RAM mode.
  2467.  
  2468. 3.3.5 Address Translation
  2469.  
  2470. When the MMU is used, the virtual address space is divided into units called pages, and translation
  2471. to physical addresses is carried out in these page units. The address translation table in external
  2472. memory contains the physical addresses corresponding to virtual addresses and additional
  2473. information such as memory protection codes. Fast address translation is achieved by caching the
  2474. contents of the address translation table located in external memory into the TLB. In the SH7750,
  2475. basically, the ITLB is used for instruction accesses and the UTLB for data accesses. In the event of
  2476. an access to an area other than the P4 area, the accessed virtual address is translated to a physical
  2477. address. If the virtual address belongs to the P1 or P2 area, the physical address is uniquely
  2478. determined without accessing the TLB. If the virtual address belongs to the P0, U0, or P3 area, the
  2479. TLB is searched using the virtual address, and if the virtual address is recorded in the TLB, a TLB
  2480. hit is made and the corresponding physical address is read from the TLB. If the accessed virtual
  2481. address is not recorded in the TLB, a TLB miss exception is generated and processing switches to
  2482. the TLB miss exception routine. In the TLB miss exception routine, the address translation table
  2483. in external memory is searched, and the corresponding physical address and page management
  2484. information are recorded in the TLB. After the return from the exception handling routine, the
  2485. instruction which caused the TLB miss exception is re-executed.
  2486.  
  2487. 37
  2488.  
  2489. ----------------------- Page 54-----------------------
  2490.  
  2491. 3 . 3 . 6 Single Virtual Memory Mode and Multiple Virtual Memory Mode
  2492.  
  2493. There are two virtual memory systems, single virtual memory and multiple virtual memory, either
  2494. of which can be selected with the MMUCR.SV bit. In the single virtual memory system, a
  2495. number of processes run simultaneously, using virtual address space on an exclusive basis, and the
  2496. physical address corresponding to a particular virtual address is uniquely determined. In the multiple
  2497. virtual memory system, a number of processes run while sharing the virtual address space, and a
  2498. particular virtual address may be translated into different physical addresses depending on the
  2499. process. The only difference between the single virtual memory and multiple virtual memory
  2500. systems in terms of operation is in the TLB address comparison method (see section 3.4.3, Address
  2501. Translation Method).
  2502.  
  2503. 3 . 3 . 7 Address Space Identifier (ASID)
  2504.  
  2505. In multiple virtual memory mode, the 8-bit address space identifier (ASID) is used to distinguish
  2506. between processes running simultaneously while sharing the virtual address space. Software can set
  2507. the ASID of the currently executing process in PTEH in the MMU. The TLB does not have to be
  2508. purged when processes are switched by means of ASID.
  2509.  
  2510. In single virtual memory mode, ASID is used to provide memory protection for processes running
  2511. simultaneously while using the virtual memory space on an exclusive basis.
  2512.  
  2513. 3 . 4 TLB Functions
  2514.  
  2515. 3 . 4 . 1 Unified TLB (UTLB) Configuration
  2516.  
  2517. The unified TLB (UTLB) is so called because of its use for the following two purposes:
  2518.  
  2519. 1. To translate a virtual address to a physical address in a data access
  2520.  
  2521. 2. As a table of address translation information to be recorded in the instruction TLB in the event
  2522. of an ITLB miss
  2523.  
  2524. Information in the address translation table located in external memory is cached into the UTLB.
  2525. The address translation table contains virtual page numbers and address space identifiers, and
  2526. corresponding physical page numbers and page management information. Figure 3.7 shows the
  2527. overall configuration of the UTLB. The UTLB consists of 64 fully-associative type entries. Figure
  2528. 3.8 shows the relationship between the address format and page size.
  2529.  
  2530. 38
  2531.  
  2532. ----------------------- Page 55-----------------------
  2533.  
  2534. 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
  2535.  
  2536. 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
  2537.  
  2538. 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
  2539.  
  2540. 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
  2541.  
  2542. Figure 3.7 UTLB Configuration
  2543.  
  2544. • 1-kbyte page
  2545.  
  2546. Virtual address Physical address
  2547. 31 10 9 0 28 10 9 0
  2548.  
  2549. VPN Offset PPN Offset
  2550.  
  2551. • 4-kbyte page
  2552.  
  2553. Virtual address Physical address
  2554. 31 12 11 0 28 12 11 0
  2555.  
  2556. VPN Offset PPN Offset
  2557.  
  2558. • 64-kbyte page
  2559.  
  2560. Virtual address Physical address
  2561. 31 16 15 0 28 16 15 0
  2562.  
  2563. VPN Offset PPN Offset
  2564.  
  2565. • 1-Mbyte page
  2566.  
  2567. Virtual address Physical address
  2568. 31 20 19 0 28 20 19 0
  2569.  
  2570. VPN Offset PPN Offset
  2571.  
  2572. Figure 3.8 Relationship between Page Size and Address Format
  2573.  
  2574. • VPN: Virtual page number
  2575.  
  2576. For 1-kbyte page: upper 22 bits of virtual address
  2577.  
  2578. For 4-kbyte page: upper 20 bits of virtual address
  2579.  
  2580. For 64-kbyte page: upper 16 bits of virtual address
  2581.  
  2582. For 1-Mbyte page: upper 12 bits of virtual address
  2583.  
  2584. 39
  2585.  
  2586. ----------------------- Page 56-----------------------
  2587.  
  2588. • ASID: Address space identifier
  2589.  
  2590. Indicates the process that can access a virtual page.
  2591.  
  2592. In single virtual memory mode and user mode, or in multiple virtual memory mode, if the SH
  2593. bit is 0, this identifier is compared with the ASID in PTEH when address comparison is
  2594. performed.
  2595.  
  2596. • SH: Share status bit
  2597.  
  2598. When 0, pages are not shared by processes.
  2599.  
  2600. When 1, pages are shared by processes.
  2601.  
  2602. • SZ: Page size bits
  2603.  
  2604. Specify the page size.
  2605.  
  2606. 00: 1-kbyte page
  2607.  
  2608. 01: 4-kbyte page
  2609.  
  2610. 10: 64-kbyte page
  2611.  
  2612. 11: 1-Mbyte page
  2613.  
  2614. • V: Validity bit
  2615.  
  2616. Indicates whether the entry is valid.
  2617.  
  2618. 0: Invalid
  2619.  
  2620. 1: Valid
  2621.  
  2622. Cleared to 0 by a power-on reset.
  2623.  
  2624. Not affected by a manual reset.
  2625.  
  2626. • PPN: Physical page number
  2627.  
  2628. Upper 22 bits of the physical address.
  2629.  
  2630. With a 1-kbyte page, PPN bits [28:10] are valid.
  2631.  
  2632. With a 4-kbyte page, PPN bits [28:12] are valid.
  2633.  
  2634. With a 64-kbyte page, PPN bits [28:16] are valid.
  2635.  
  2636. With a 1-Mbyte page, PPN bits [28:20] are valid.
  2637.  
  2638. The synonym problem must be taken into account when setting the PPN (see section 3.5.5,
  2639. Avoiding Synonym Problems).
  2640.  
  2641. • PR: Protection key data
  2642.  
  2643. 2-bit data expressing the page access right as a code.
  2644.  
  2645. 00: Can be read only, in privileged mode
  2646.  
  2647. 01: Can be read and written in privileged mode
  2648.  
  2649. 10: Can be read only, in privileged or user mode
  2650.  
  2651. 11: Can be read and written in privileged mode or user mode
  2652.  
  2653. 40
  2654.  
  2655. ----------------------- Page 57-----------------------
  2656.  
  2657. • C: Cacheability bit
  2658.  
  2659. Indicates whether a page is cacheable.
  2660.  
  2661. 0: Not cacheable
  2662.  
  2663. 1: Cacheable
  2664.  
  2665. When control register space is mapped, this bit must be cleared to 0.
  2666.  
  2667. When performing PCMCIA space mapping in the cache enabled state, either clear this bit to 0
  2668. or set the WT bit to 1.
  2669.  
  2670. • D: Dirty bit
  2671.  
  2672. Indicates whether a write has been performed to a page.
  2673.  
  2674. 0: Write has not been performed
  2675.  
  2676. 1: Write has been performed
  2677.  
  2678. • WT: Write-through bit
  2679.  
  2680. Specifies the cache write mode.
  2681.  
  2682. 0: Copy-back mode
  2683.  
  2684. 1: Write-through mode
  2685.  
  2686. When performing PCMCIA space mapping in the cache enabled state, either set this bit to 1 or
  2687. clear the C bit to 0.
  2688.  
  2689. • SA: Space attribute bits
  2690.  
  2691. Valid only when the page is mapped onto PCMCIA connected to area 5 or 6.
  2692.  
  2693. 000: Undefined
  2694.  
  2695. 001: Variable-size I/O space (base size according to IOIS16 signal)
  2696.  
  2697. 010: 8-bit I/O space
  2698.  
  2699. 011: 16-bit I/O space
  2700.  
  2701. 100: 8-bit common memory space
  2702.  
  2703. 101: 16-bit common memory space
  2704.  
  2705. 110: 8-bit attribute memory space
  2706.  
  2707. 111: 16-bit attribute memory space
  2708.  
  2709. • TC: Timing control bit
  2710.  
  2711. Used to select wait control register bits in the bus control unit for areas 5 and 6.
  2712.  
  2713. 0: WCR2 (A5W2–A5W0) and PCR (A5PCW1–A5PCW0, A5TED2–A5TED0, A5TEH2–
  2714. A5TEH0) are used
  2715.  
  2716. 1: WCR2 (A6W2–A6W0) and PCR (A6PCW1–A6PCW0, A6TED2–A6TED0, A6TEH2–
  2717. A6TEH0) are used
  2718.  
  2719. 41
  2720.  
  2721. ----------------------- Page 58-----------------------
  2722.  
  2723. 3 . 4 . 2 Instruction TLB (ITLB) Configuration
  2724.  
  2725. The ITLB is used to translate a virtual address to a physical address in an instruction access.
  2726. Information in the address translation table located in the UTLB is cached into the ITLB. Figure
  2727. 3.9 shows the overall configuration of the ITLB. The ITLB consists of 4 fully-associative type
  2728. entries. The address translation information is almost the same as that in the UTLB, but with the
  2729. following differences:
  2730.  
  2731. 1. D and WT bits are not supported.
  2732.  
  2733. 2. There is only one PR bit, corresponding to the upper of the PR bits in the UTLB.
  2734.  
  2735. Entry 0 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2736.  
  2737. Entry 1 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2738.  
  2739. Entry 2 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2740.  
  2741. Entry 3 ASID [7:0] VPN [31:10] V PPN [28:10] SZ [1:0] SH C PR SA [2:0] TC
  2742.  
  2743.  
  2744.  
  2745. Figure 3.9 ITLB Configuration
  2746.  
  2747. 3 . 4 . 3 Address Translation Method
  2748.  
  2749. Figures 3.10 and 3.11 show flowcharts of memory accesses using the UTLB and ITLB.
  2750.  
  2751. 42
  2752.  
  2753. ----------------------- Page 59-----------------------
  2754.  
  2755. Data access to virtual address (VA)
  2756.  
  2757. VA is VA is VA is VA is in P0, U0,
  2758. in P4 area in P2 area in P1 area or P3 area
  2759.  
  2760. On-chip I/O access 0 No
  2761. CCR.OCE? MMUCR.AT = 1
  2762.  
  2763. 1
  2764. Yes
  2765. 0
  2766. CCR.CB? CCR.WT?
  2767. 0
  2768. 1
  2769. SH = 0
  2770. No
  2771. and (MMUCR.SV = 0 or
  2772. SR.MD = 0)
  2773.  
  2774. Yes
  2775.  
  2776. No VPNs match No VPNs match
  2777. and V = 1 and ASIDs match and
  2778. V = 1
  2779.  
  2780. Yes Yes
  2781.  
  2782. Only one No
  2783. Data TLB miss entry matches
  2784.  
  2785. exception Yes
  2786.  
  2787.  
  2788. SR.MD?
  2789. Data TLB multiple
  2790. 0 (User) 1 (Privileged) hit exception
  2791.  
  2792. PR? Memory access
  2793. 00 or 10 11 01 or 11 00 or 10
  2794. 01 W W W W
  2795. R/W? R/W? R/W? R/W?
  2796.  
  2797. R R R R
  2798. 1
  2799. D?
  2800. Data TLB protection
  2801. 0
  2802. Data TLB protection violation exception
  2803. violation exception Initial page write
  2804.  
  2805. exception
  2806.  
  2807. C = 1 No
  2808. and CCR.OCE = 1
  2809.  
  2810. Yes
  2811. Cache access 0
  2812. WT?
  2813. in copy-back mode
  2814.  
  2815. 1
  2816. Cache access
  2817. in write-through mode
  2818.  
  2819. Memory access
  2820.  
  2821. (Non-cacheable)
  2822.  
  2823. Figure 3.10 Flowchart of Memory Access Using UTLB
  2824.  
  2825. 43
  2826.  
  2827. ----------------------- Page 60-----------------------
  2828.  
  2829. Instruction access to virtual address (VA)
  2830.  
  2831. VA is VA is VA is VA is in P0, U0,
  2832. in P4 area in P2 area in P1 area or P3 area
  2833.  
  2834. Access prohibited 0 CCR.ICE? No MMUCR.AT = 1
  2835.  
  2836. 1
  2837. Yes
  2838.  
  2839. SH = 0
  2840. No
  2841. and (MMUCR.SV = 0 or
  2842. SR.MD = 0)
  2843.  
  2844. Yes
  2845.  
  2846. No VPNs match No VPNs match
  2847. and V = 1 and ASIDs match and
  2848. V = 1
  2849.  
  2850. Yes
  2851. Yes
  2852.  
  2853. Hardware ITLB Only one No
  2854. Search UTLB miss handling entry matches
  2855.  
  2856. Yes
  2857. Yes
  2858. Match? Record in ITLB
  2859.  
  2860. No
  2861.  
  2862. SR.MD?
  2863. Instruction TLB 0 (User)
  2864. miss exception
  2865. 1 (Privileged)
  2866. 0
  2867. PR?
  2868. Instruction TLB
  2869. 1 multiple hit exception
  2870.  
  2871. Instruction TLB protection C = 1 No
  2872. violation exception and CCR.ICE = 1
  2873.  
  2874. Yes
  2875.  
  2876. Cache access
  2877.  
  2878. Memory access
  2879.  
  2880. (Non-cacheable)
  2881.  
  2882. Figure 3.11 Flowchart of Memory Access Using ITLB
  2883.  
  2884. 44
  2885.  
  2886. ----------------------- Page 61-----------------------
  2887.  
  2888. 3 . 5 MMU Functions
  2889.  
  2890. 3 . 5 . 1 MMU Hardware Management
  2891.  
  2892. The SH7750 supports the following MMU functions.
  2893.  
  2894. 1. The MMU decodes the virtual address to be accessed by software, and performs address
  2895. translation by controlling the UTLB/ITLB in accordance with the MMUCR settings.
  2896.  
  2897. 2. The MMU determines the cache access status on the basis of the page management information
  2898. read during address translation (C, WT, SA, and TC bits).
  2899.  
  2900. 3. If address translation cannot be performed normally in a data access or instruction access, the
  2901. MMU notifies software by means of an MMU exception.
  2902.  
  2903. 4. If address translation information is not recorded in the ITLB in an instruction access, the
  2904. MMU searches the UTLB, and if the necessary address translation information is recorded in the
  2905. UTLB, the MMU copies this information into the ITLB in accordance with MMUCR.LRUI.
  2906.  
  2907. 3 . 5 . 2 MMU Software Management
  2908.  
  2909. Software processing for the MMU consists of the following:
  2910.  
  2911. 1. Setting of MMU-related registers. Some registers are also partially updated by hardware
  2912. automatically.
  2913.  
  2914. 2. Recording, deletion, and reading of TLB entries. There are two methods of recording UTLB
  2915. entries: by using the LDTLB instruction, or by writing directly to the memory-mapped UTLB.
  2916. ITLB entries can only be recorded by writing directly to the memory-mapped ITLB. For
  2917. deleting or reading UTLB/ITLB entries, it is possible to access the memory-mapped
  2918. UTLB/ITLB.
  2919. 3. MMU exception handling. When an MMU exception occurs, processing is performed based on
  2920. information set by hardware.
  2921.  
  2922. 3 . 5 . 3 MMU Instruction (LDTLB)
  2923.  
  2924. A TLB load instruction (LDTLB) is provided for recording UTLB entries. When an LDTLB
  2925. instruction is issued, the SH7750 copies the contents of PTEH, PTEL, and PTEA to the UTLB
  2926. entry indicated by MMUCR.URC. ITLB entries are not updated by the LDTLB instruction, and
  2927. therefore address translation information purged from the UTLB entry may still remain in the ITLB
  2928. entry. As the LDTLB instruction changes address translation information, ensure that it is issued
  2929. by a program in the P1 or P2 area. The operation of the LDTLB instruction is shown in figure
  2930. 3.12.
  2931.  
  2932. 45
  2933.  
  2934. ----------------------- Page 62-----------------------
  2935.  
  2936. MMUCR
  2937. 31 26 25 24 23 18 17 16 15 10 9 8 7 3 2 1 0
  2938.  
  2939. LRUI — URB — URC SV — TI —AT
  2940.  
  2941. Entry specification SQMD
  2942.  
  2943. PTEL
  2944. 31 29 28 10 9 8 7 6 5 4 3 2 1 0
  2945.  
  2946. — PPN — V SZ PR SZ C D SH WT
  2947. PTEH
  2948. 31 10 9 8 7 0
  2949.  
  2950. VPN — ASID PTEA
  2951.  
  2952. 31 4 3 2 0
  2953.  
  2954. — TC SA
  2955.  
  2956. Write
  2957.  
  2958. 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
  2959.  
  2960. 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
  2961.  
  2962. 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
  2963.  
  2964. 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
  2965.  
  2966. UTLB
  2967.  
  2968. Figure 3.12 Operation of LDTLB Instruction
  2969.  
  2970. 3 . 5 . 4 Hardware ITLB Miss Handling
  2971.  
  2972. In an instruction access, the SH7750 searches the ITLB. If it cannot find the necessary address
  2973. translation information (i.e. in the event of an ITLB miss), the UTLB is searched by hardware, and
  2974. if the necessary address translation information is present, it is recorded in the ITLB. This
  2975. procedure is known as hardware ITLB miss handling. If the necessary address translation
  2976. information is not found in the UTLB search, an instruction TLB miss exception is generated and
  2977. processing passes to software.
  2978.  
  2979. 46
  2980.  
  2981. ----------------------- Page 63-----------------------
  2982.  
  2983. 3 . 5 . 5 Avoiding Synonym Problems
  2984.  
  2985. When 1- or 4-kbyte pages are recorded in TLB entries, a synonym problem may arise. The problem
  2986. is that, when a number of virtual addresses are mapped onto a single physical address, the same
  2987. physical address data is recorded in a number of cache entries, and it becomes impossible to
  2988. guarantee data integrity. This problem does not occur with the instruction TLB or instruction cache
  2989. . In the SH7750, entry specification is performed using bits [13:5] of the virtual address in order to
  2990. achieve fast operand cache operation. However, bits [13:10] of the virtual address in the case of a 1-
  2991. kbyte page, and bits [13:12] of the virtual address in the case of a 4-kbyte page, are subject to
  2992. address translation. As a result, bits [13:10] of the physical address after translation may differ from
  2993. bits [13:10] of the virtual address.
  2994.  
  2995. Consequently, the following restrictions apply to the recording of address translation information
  2996. in UTLB entries.
  2997.  
  2998. 1. When address translation information whereby a number of 1-kbyte page UTLB entries are
  2999. translated into the same physical address is recorded in the UTLB, ensure that the VPN [13:10]
  3000. values are the same.
  3001.  
  3002. 2. When address translation information whereby a number of 4-kbyte page UTLB entries are
  3003. translated into the same physical address is recorded in the UTLB, ensure that the VPN [13:12]
  3004. values are the same.
  3005.  
  3006. 3. Do not use 1-kbyte page UTLB entry physical addresses with UTLB entries of a different page
  3007. size.
  3008.  
  3009. 4. Do not use 4-kbyte page UTLB entry physical addresses with UTLB entries of a different page
  3010. size.
  3011.  
  3012. The above restrictions apply only when performing accesses using the cache. When cache index
  3013. mode is used, VPN [25] is used for the entry address instead of VPN [13], and therefore the above
  3014. restrictions apply to VPN [25].
  3015.  
  3016. Note: When multiple items of address translation information use the same physical memory to
  3017. provide for future SH Series expansion, ensure that the VPN [20:10] values are the same.
  3018. Also, do not use the same physical address for address translation information of different
  3019. page sizes.
  3020.  
  3021. 47
  3022.  
  3023. ----------------------- Page 64-----------------------
  3024.  
  3025. 3 . 6 MMU Exceptions
  3026.  
  3027. There are seven MMU exceptions: the instruction TLB multiple hit exception, instruction TLB
  3028. miss exception, instruction TLB protection violation exception, data TLB multiple hit exception,
  3029. data TLB miss exception, data TLB protection violation exception, and initial page write
  3030. exception. Refer to figures 3.10 and 3.11 for the conditions under which each of these exceptions
  3031. occurs.
  3032.  
  3033. 3 . 6 . 1 Instruction TLB Multiple Hit Exception
  3034.  
  3035. An instruction TLB multiple hit exception occurs when more than one ITLB entry matches the
  3036. virtual address to which an instruction access has been made. If multiple hits occur when the
  3037. UTLB is searched by hardware in hardware ITLB miss handling, a data TLB multiple hit exception
  3038. will result.
  3039.  
  3040. When an instruction TLB multiple hit exception occurs a reset is executed, and cache coherency is
  3041. not guaranteed.
  3042.  
  3043. Hardware Processing: In the event of an instruction TLB multiple hit exception, hardware
  3044. carries out the following processing:
  3045.  
  3046. 1. Sets the virtual address at which the exception occurred in TEA.
  3047.  
  3048. 2. Sets exception code H'140 in EXPEVT.
  3049.  
  3050. 3. Branches to the reset handling routine (H'A000 0000).
  3051.  
  3052. Software Processing (Reset Routine): The ITLB entries which caused the multiple hit
  3053. exception are checked in the reset handling routine. This exception is intended for use in program
  3054. debugging, and should not normally be generated.
  3055.  
  3056. 48
  3057.  
  3058. ----------------------- Page 65-----------------------
  3059.  
  3060. 3 . 6 . 2 Instruction TLB Miss Exception
  3061.  
  3062. An instruction TLB miss exception occurs when address translation information for the virtual
  3063. address to which an instruction access is made is not found in the UTLB entries by the hardware
  3064. ITLB miss handling procedure. The instruction TLB miss exception processing carried out by
  3065. hardware and software is shown below. This is the same as the processing for a data TLB miss
  3066. exception.
  3067.  
  3068. Hardware Processing: In the event of an instruction TLB miss exception, hardware carries out
  3069. the following processing:
  3070.  
  3071. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  3072.  
  3073. 2. Sets the virtual address at which the exception occurred in TEA.
  3074.  
  3075. 3. Sets exception code H'040 in EXPEVT.
  3076.  
  3077. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  3078. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  3079. delayed branch instruction in SPC.
  3080.  
  3081. 5. Sets the SR contents at the time of the exception in SSR.
  3082.  
  3083. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  3084.  
  3085. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  3086.  
  3087. 8. Sets the RB bit in SR to 1.
  3088.  
  3089. 9. Branches to the address obtained by adding offset H'0000 0400 to the contents of VBR, and
  3090. starts the instruction TLB miss exception handling routine.
  3091.  
  3092. Software Processing (Instruction TLB Miss Exception Handling Routine):
  3093. Software is responsible for searching the external memory page table and assigning the necessary
  3094. page table entry. Software should carry out the following processing in order to find and assign the
  3095. necessary page table entry.
  3096.  
  3097. 1. Write to PTEL the values of the PPN, PR, SZ, C, D, SH, V, and WT bits in the page table
  3098. entry recorded in the external memory address translation table. If necessary, the values of the
  3099. SA and TC bits should be written to PTEA.
  3100.  
  3101. 2. When the entry to be replaced in entry replacement is specified by software, write that value to
  3102. URC in the MMUCR register. If URC is greater than URB at this time, the value should be
  3103. changed to an appropriate value after issuing an LDTLB instruction.
  3104.  
  3105. 3. Execute the LDTLB instruction and write the contents of PTEH, PTEL, and PTEA to the TLB.
  3106.  
  3107. 4. Finally, execute the exception handling return instruction (RTE), terminate the exception
  3108. handling routine, and return control to the normal flow. The RTE instruction should be issued
  3109. at least one instruction after the LDTLB instruction.
  3110.  
  3111. 49
  3112.  
  3113. ----------------------- Page 66-----------------------
  3114.  
  3115. 3 . 6 . 3 Instruction TLB Protection Violation Exception
  3116.  
  3117. An instruction TLB protection violation exception occurs when, even though an ITLB entry
  3118. contains address translation information matching the virtual address to which an instruction access
  3119. is made, the actual access type is not permitted by the access right specified by the PR bit. The
  3120. instruction TLB protection violation exception processing carried out by hardware and software is
  3121. shown below.
  3122.  
  3123. Hardware Processing: In the event of an instruction TLB protection violation exception,
  3124. hardware carries out the following processing:
  3125.  
  3126. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  3127.  
  3128. 2. Sets the virtual address at which the exception occurred in TEA.
  3129.  
  3130. 3. Sets exception code H'0A0 in EXPEVT.
  3131.  
  3132. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  3133. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  3134. delayed branch instruction in SPC.
  3135.  
  3136. 5. Sets the SR contents at the time of the exception in SSR.
  3137.  
  3138. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  3139.  
  3140. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  3141.  
  3142. 8. Sets the RB bit in SR to 1.
  3143.  
  3144. 9. Branches to the address obtained by adding offset H'0000 0100 to the contents of VBR, and
  3145. starts the instruction TLB protection violation exception handling routine.
  3146.  
  3147. Software Processing (Instruction TLB Protection Violation Exception Handling
  3148. Routine): Resolve the instruction TLB protection violation, execute the exception handling
  3149. return instruction (RTE), terminate the exception handling routine, and return control to the
  3150. normal flow. The RTE instruction should be issued at least one instruction after the LDTLB
  3151. instruction.
  3152.  
  3153. 50
  3154.  
  3155. ----------------------- Page 67-----------------------
  3156.  
  3157. 3 . 6 . 4 Data TLB Multiple Hit Exception
  3158.  
  3159. A data TLB multiple hit exception occurs when more than one UTLB entry matches the virtual
  3160. address to which a data access has been made. A data TLB multiple hit exception is also generated
  3161. if multiple hits occur when the UTLB is searched in hardware ITLB miss handling.
  3162.  
  3163. When a data TLB multiple hit exception occurs a reset is executed, and cache coherency is not
  3164. guaranteed. The contents of PPN in the UTLB prior to the exception may also be corrupted.
  3165.  
  3166. Hardware Processing: In the event of a data TLB multiple hit exception, hardware carries out
  3167. the following processing:
  3168.  
  3169. 1. Sets the virtual address at which the exception occurred in TEA.
  3170.  
  3171. 2. Sets exception code H'140 in EXPEVT.
  3172.  
  3173. 3. Branches to the reset handling routine (H'A000 0000).
  3174.  
  3175. Software Processing (Reset Routine): The UTLB entries which caused the multiple hit
  3176. exception are checked in the reset handling routine. This exception is intended for use in program
  3177. debugging, and should not normally be generated.
  3178.  
  3179. 3 . 6 . 5 Data TLB Miss Exception
  3180.  
  3181. A data TLB miss exception occurs when address translation information for the virtual address to
  3182. which a data access is made is not found in the UTLB entries. The data TLB miss exception
  3183. processing carried out by hardware and software is shown below.
  3184.  
  3185. Hardware Processing: In the event of a data TLB miss exception, hardware carries out the
  3186. following processing:
  3187.  
  3188. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  3189.  
  3190. 2. Sets the virtual address at which the exception occurred in TEA.
  3191.  
  3192. 3. Sets exception code H'040 in the case of a read, or H'060 in the case of a write, in EXPEVT
  3193. (OCBP, OCBWB: read; OCBI, MOVCA.L: write).
  3194.  
  3195. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  3196. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  3197. delayed branch instruction in SPC.
  3198.  
  3199. 5. Sets the SR contents at the time of the exception in SSR.
  3200.  
  3201. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  3202.  
  3203. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  3204.  
  3205. 8. Sets the RB bit in SR to 1.
  3206.  
  3207. 9. Branches to the address obtained by adding offset H'0000 0400 to the contents of VBR, and
  3208. starts the data TLB miss exception handling routine.
  3209.  
  3210. 51
  3211.  
  3212. ----------------------- Page 68-----------------------
  3213.  
  3214. Software Processing (Data TLB Miss Exception Handling Routine): Software is
  3215. responsible for searching the external memory page table and assigning the necessary page table
  3216. entry. Software should carry out the following processing in order to find and assign the necessary
  3217. page table entry.
  3218.  
  3219. 1. Write to PTEL the values of the PPN, PR, SZ, C, D, SH, V, and WT bits in the page table
  3220. entry recorded in the external memory address translation table. If necessary, the values of the
  3221. SA and TC bits should be written to PTEA.
  3222.  
  3223. 2. When the entry to be replaced in entry replacement is specified by software, write that value to
  3224. URC in the MMUCR register. If URC is greater than URB at this time, the value should be
  3225. changed to an appropriate value after issuing an LDTLB instruction.
  3226.  
  3227. 3. Execute the LDTLB instruction and write the contents of PTEH, PTEL, and PTEA to the
  3228. UTLB.
  3229.  
  3230. 4. Finally, execute the exception handling return instruction (RTE), terminate the exception
  3231. handling routine, and return control to the normal flow. The RTE instruction should be issued
  3232. at least one instruction after the LDTLB instruction.
  3233.  
  3234. 3 . 6 . 6 Data TLB Protection Violation Exception
  3235.  
  3236. A data TLB protection violation exception occurs when, even though a UTLB entry contains
  3237. address translation information matching the virtual address to which a data access is made, the
  3238. actual access type is not permitted by the access right specified by the PR bit. The data TLB
  3239. protection violation exception processing carried out by hardware and software is shown below.
  3240.  
  3241. Hardware Processing: In the event of a data TLB protection violation exception, hardware
  3242. carries out the following processing:
  3243.  
  3244. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  3245.  
  3246. 2. Sets the virtual address at which the exception occurred in TEA.
  3247.  
  3248. 3. Sets exception code H'0A0 in the case of a read, or H'0C0 in the case of a write, in EXPEVT
  3249. (OCBP, OCBWB: read; OCBI, MOVCA.L: write).
  3250.  
  3251. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  3252. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  3253. delayed branch instruction in SPC.
  3254.  
  3255. 5. Sets the SR contents at the time of the exception in SSR.
  3256.  
  3257. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  3258.  
  3259. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  3260.  
  3261. 8. Sets the RB bit in SR to 1.
  3262.  
  3263. 9. Branches to the address obtained by adding offset H'0000 0100 to the contents of VBR, and
  3264. starts the data TLB protection violation exception handling routine.
  3265.  
  3266. 52
  3267.  
  3268. ----------------------- Page 69-----------------------
  3269.  
  3270. Software Processing (Data TLB Protection Violation Exception Handling
  3271. Routine): Resolve the data TLB protection violation, execute the exception handling return
  3272. instruction (RTE), terminate the exception handling routine, and return control to the normal flow.
  3273. The RTE instruction should be issued at least one instruction after the LDTLB instruction.
  3274.  
  3275. 3 . 6 . 7 Initial Page Write Exception
  3276.  
  3277. An initial page write exception occurs when the D bit is 0 even though a UTLB entry contains
  3278. address translation information matching the virtual address to which a data access (write) is made,
  3279. and the access is permitted. The initial page write exception processing carried out by hardware and
  3280. software is shown below.
  3281.  
  3282. Hardware Processing: In the event of an initial page write exception, hardware carries out the
  3283. following processing:
  3284.  
  3285. 1. Sets the VPN of the virtual address at which the exception occurred in PTEH.
  3286.  
  3287. 2. Sets the virtual address at which the exception occurred in TEA.
  3288.  
  3289. 3. Sets exception code H'080 in EXPEVT.
  3290.  
  3291. 4. Sets the PC value indicating the address of the instruction at which the exception occurred in
  3292. SPC. If the exception occurred at a delay slot, sets the PC value indicating the address of the
  3293. delayed branch instruction in SPC.
  3294.  
  3295. 5. Sets the SR contents at the time of the exception in SSR.
  3296.  
  3297. 6. Sets the MD bit in SR to 1, and switches to privileged mode.
  3298.  
  3299. 7. Sets the BL bit in SR to 1, and masks subsequent exception requests.
  3300.  
  3301. 8. Sets the RB bit in SR to 1.
  3302.  
  3303. 9. Branches to the address obtained by adding offset H'0000 0100 to the contents of VBR, and
  3304. starts the initial page write exception handling routine.
  3305.  
  3306. Software Processing (Initial Page Write Exception Handling Routine): The
  3307. following processing should be carried out as the responsibility of software:
  3308.  
  3309. 1. Retrieve the necessary page table entry from external memory.
  3310.  
  3311. 2. Write 1 to the D bit in the external memory page table entry.
  3312.  
  3313. 3. Write to PTEL the values of the PPN, PR, SZ, C, D, WT, SH, and V bits in the page table
  3314. entry recorded in external memory. If necessary, the values of the SA and TC bits should be
  3315. written to PTEA.
  3316.  
  3317. 4. When the entry to be replaced in entry replacement is specified by software, write that value to
  3318. URC in the MMUCR register. If URC is greater than URB at this time, the value should be
  3319. changed to an appropriate value after issuing an LDTLB instruction.
  3320.  
  3321. 5. Execute the LDTLB instruction and write the contents of PTEH, PTEL, and PTEA to the
  3322. UTLB.
  3323.  
  3324. 53
  3325.  
  3326. ----------------------- Page 70-----------------------
  3327.  
  3328. 6. Finally, execute the exception handling return instruction (RTE), terminate the exception
  3329. handling routine, and return control to the normal flow. The RTE instruction should be issued
  3330. at least one instruction after the LDTLB instruction.
  3331.  
  3332. 3 . 7 Memory-Mapped TLB Configuration
  3333.  
  3334. To enable the ITLB and UTLB to be managed by software, their contents can be read and written
  3335. by a P2 area program with a MOV instruction in privileged mode. Operation is not guaranteed if
  3336. access is made from a program in another area. A branch to an area other than the P2 area should
  3337. be made at least 8 instructions after this MOV instruction. The ITLB and UTLB are allocated to
  3338. the P4 area in physical memory space. VPN, V, and ASID in the ITLB can be accessed as an
  3339. address array, PPN, V, SZ, PR, C, and SH as data array 1, and SA and TC as data array 2. VPN,
  3340. D, V, and ASID in the UTLB can be accessed as an address array, PPN, V, SZ, PR, C, D, WT,
  3341. and SH as data array 1, and SA and TC as data array 2. V and D can be accessed from both the
  3342. address array side and the data array side. Only longword access is possible. Instruction fetches
  3343. cannot be performed in these areas. For reserved bits, a write value of 0 should be specified; their
  3344. read value is undefined.
  3345.  
  3346. 54
  3347.  
  3348. ----------------------- Page 71-----------------------
  3349.  
  3350. 3 . 7 . 1 ITLB Address Array
  3351.  
  3352. The ITLB address array is allocated to addresses H'F200 0000 to H'F2FF FFFF in the P4 area. An
  3353. address array access requires a 32-bit address field specification (when reading or writing) and a 32-
  3354. bit data field specification (when writing). Information for selecting the entry to be accessed is
  3355. specified in the address field, and VPN, V, and ASID to be written to the address array are specified
  3356. in the data field.
  3357.  
  3358. In the address field, bits [31:24] have the value H'F2 indicating the ITLB address array, and the
  3359. entry is selected by bits [9:8]. As longword access is used, 0 should be specified for address field
  3360. bits [1:0].
  3361.  
  3362. In the data field, VPN is indicated by bits [31:10], V by bit [8], and ASID by bits [7:0].
  3363.  
  3364. The following two kinds of operation can be used on the ITLB address array:
  3365.  
  3366. 1. ITLB address array read
  3367.  
  3368. VPN, V, and ASID are read into the data field from the ITLB entry corresponding to the entry
  3369. set in the address field.
  3370.  
  3371. 2. ITLB address array write
  3372.  
  3373. VPN, V, and ASID specified in the data field are written to the ITLB entry corresponding to the
  3374. entry set in the address field.
  3375.  
  3376. 31 24 23 10 9 8 7 0
  3377. Address field 1 1 1 1 0 0 1 0 E
  3378.  
  3379. 31 10 99 8 7 0
  3380. Data field VPN V ASID
  3381.  
  3382. VPN: Virtual page number ASID: Address space identifier
  3383. V: Validity bit : Reserved bits (0 write value, undefined
  3384. E: Entry read value)
  3385.  
  3386.  
  3387. Figure 3.13 Memory-Mapped ITLB Address Array
  3388.  
  3389. 55
  3390.  
  3391. ----------------------- Page 72-----------------------
  3392.  
  3393. 3 . 7 . 2 ITLB Data Array 1
  3394.  
  3395. ITLB data array 1 is allocated to addresses H'F300 0000 to H'F37F FFFF in the P4 area. A data
  3396. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data
  3397. field specification (when writing). Information for selecting the entry to be accessed is specified in
  3398. the address field, and PPN, V, SZ, PR, C, and SH to be written to the data array are specified in
  3399. the data field.
  3400.  
  3401. In the address field, bits [31:23] have the value H'F30 indicating ITLB data array 1, and the entry is
  3402. selected by bits [9:8].
  3403.  
  3404. In the data field, PPN is indicated by bits [28:10], V by bit [8], SZ by bits [7] and [4], PR by bit
  3405. [6], C by bit [3], and SH by bit [1].
  3406.  
  3407. The following two kinds of operation can be used on ITLB data array 1:
  3408.  
  3409. 1. ITLB data array 1 read
  3410.  
  3411. PPN, V, SZ, PR, C, and SH are read into the data field from the ITLB entry corresponding to
  3412. the entry set in the address field.
  3413.  
  3414. 2. ITLB data array 1 write
  3415.  
  3416. PPN, V, SZ, PR, C, and SH specified in the data field are written to the ITLB entry
  3417. corresponding to the entry set in the address field.
  3418.  
  3419. 31 24 23 10 9 8 7 0
  3420. Address field 1 1 1 1 0 0 1 1 0 E
  3421.  
  3422. 31 30 2928 10 9 8 7 6 5 4 3 2 1 0
  3423. Data field PPN V C
  3424.  
  3425. PPN: Physical page number PR: Protection key data PR SZ SH
  3426. V: Validity bit C: Cacheability bit
  3427. E: Entry SH: Share status bit
  3428. SZ: Page size bits : Reserved bits (0 write value, undefined
  3429. read value)
  3430.  
  3431. Figure 3.14 Memory-Mapped ITLB Data Array 1
  3432.  
  3433. 56
  3434.  
  3435. ----------------------- Page 73-----------------------
  3436.  
  3437. 3 . 7 . 3 ITLB Data Array 2
  3438.  
  3439. ITLB data array 2 is allocated to addresses H'F380 0000 to H'F3FF FFFF in the P4 area. A data
  3440. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data
  3441. field specification (when writing). Information for selecting the entry to be accessed is specified in
  3442. the address field, and SA and TC to be written to data array 2 are specified in the data field.
  3443.  
  3444. In the address field, bits [31:23] have the value H'F38 indicating ITLB data array 2, and the entry is
  3445. selected by bits [9:8].
  3446.  
  3447. In the data field, SA is indicated by bits [2:0], and TC by bit [3].
  3448.  
  3449. The following two kinds of operation can be used on ITLB data array 2:
  3450.  
  3451. 1. ITLB data array 2 read
  3452.  
  3453. SA and TC are read into the data field from the ITLB entry corresponding to the entry set in the
  3454. address field.
  3455.  
  3456. 2. ITLB data array 2 write
  3457.  
  3458. SA and TC specified in the data field are written to the ITLB entry corresponding to the entry
  3459. set in the address field.
  3460.  
  3461. 31 24 23 10 9 8 7 0
  3462. Address field 1 1 1 1 0 0 1 1 1 E
  3463.  
  3464. 31 4 3 2 0
  3465. Data field SA
  3466.  
  3467. TC
  3468. TC: Timing control bit SA: Space attribute bits
  3469. E: Entry : Reserved bits (0 write value, undefined read
  3470. value)
  3471.  
  3472. Figure 3.15 Memory-Mapped ITLB Data Array 2
  3473.  
  3474. 3 . 7 . 4 UTLB Address Array
  3475.  
  3476. The UTLB address array is allocated to addresses H'F600 0000 to H'F6FF FFFF in the P4 area. An
  3477. address array access requires a 32-bit address field specification (when reading or writing) and a 32-
  3478. bit data field specification (when writing). Information for selecting the entry to be accessed is
  3479. specified in the address field, and VPN, D, V, and ASID to be written to the address array are
  3480. specified in the data field.
  3481.  
  3482. 57
  3483.  
  3484. ----------------------- Page 74-----------------------
  3485.  
  3486. In the address field, bits [31:24] have the value H'F6 indicating the UTLB address array, and the
  3487. entry is selected by bits [13:8]. The address array bit [7] association bit (A bit) specifies whether or
  3488. not address comparison is performed when writing to the UTLB address array.
  3489.  
  3490. In the data field, VPN is indicated by bits [31:10], D by bit [9], V by bit [8], and ASID by bits
  3491. [7:0].
  3492.  
  3493. The following three kinds of operation can be used on the UTLB address array:
  3494.  
  3495. 1. UTLB address array read
  3496.  
  3497. VPN, D, V, and ASID are read into the data field from the UTLB entry corresponding to the
  3498. entry set in the address field. In a read, associative operation is not performed regardless of
  3499. whether the association bit specified in the address field is 1 or 0.
  3500.  
  3501. 2. UTLB address array write (non-associative)
  3502.  
  3503. VPN, D, V, and ASID specified in the data field are written to the UTLB entry corresponding
  3504. to the entry set in the address field. The A bit in the address field should be cleared to 0.
  3505.  
  3506. 3. UTLB address array write (associative)
  3507.  
  3508. When a write is performed with the A bit in the address field set to 1, comparison of all the
  3509. UTLB entries is carried out using the VPN specified in the data field and PTEH.ASID. The
  3510. usual address comparison rules are followed, but if a UTLB miss occurs, the result is no
  3511. operation, and an exception is not generated. If the comparison identifies a UTLB entry
  3512. corresponding to the VPN specified in the data field, D and V specified in the data field are
  3513. written to that entry. If there is more than one matching entry, a data TLB multiple hit
  3514. exception results. This associative operation is simultaneously carried out on the ITLB, and if a
  3515. matching entry is found in the ITLB, V is written to that entry. Even if the UTLB comparison
  3516. results in no operation, a write to the ITLB side only is performed as long as there is an ITLB
  3517. match. If there is a match in both the UTLB and ITLB, the UTLB information is also written
  3518. to the ITLB.
  3519.  
  3520. 31 24 23 14 13 8 7 2 1 0
  3521. Address field 1 1 1 1 0 1 1 0 E A
  3522.  
  3523. 31 30 2928 10 9 8 7 0
  3524. Data field VPN D V ASID
  3525.  
  3526. VPN: Virtual page number ASID: Address space identifier
  3527. V: Validity bit A: Association bit
  3528. E: Entry : Reserved bits (0 write value, undefined
  3529. D: Dirty bit read value)
  3530.  
  3531.  
  3532. Figure 3.16 Memory-Mapped UTLB Address Array
  3533.  
  3534. 58
  3535.  
  3536. ----------------------- Page 75-----------------------
  3537.  
  3538. 3 . 7 . 5 UTLB Data Array 1
  3539.  
  3540. UTLB data array 1 is allocated to addresses H'F700 0000 to H'F77F FFFF in the P4 area. A data
  3541. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data
  3542. field specification (when writing). Information for selecting the entry to be accessed is specified in
  3543. the address field, and PPN, V, SZ, PR, C, D, SH, and WT to be written to the data array are
  3544. specified in the data field.
  3545.  
  3546. In the address field, bits [31:23] have the value H'F70 indicating UTLB data array 1, and the entry
  3547. is selected by bits [13:8].
  3548.  
  3549. In the data field, PPN is indicated by bits [28:10], V by bit [8], SZ by bits [7] and [4], PR by bits
  3550. [6:5], C by bit [3], D by bit [2], SH by bit [1], and WT by bit [0].
  3551.  
  3552. The following two kinds of operation can be used on UTLB data array 1:
  3553.  
  3554. 1. UTLB data array 1 read
  3555.  
  3556. PPN, V, SZ, PR, C, D, SH, and WT are read into the data field from the UTLB entry
  3557. corresponding to the entry set in the address field.
  3558.  
  3559. 2. UTLB data array 1 write
  3560.  
  3561. PPN, V, SZ, PR, C, D, SH, and WT specified in the data field are written to the UTLB entry
  3562. corresponding to the entry set in the address field.
  3563.  
  3564. 31 24 23 14 13 8 7 0
  3565. Address field 1 1 1 1 0 1 1 1 0 E
  3566.  
  3567. 31 30 2928 10 9 8 7 6 5 4 3 2 1 0
  3568. Data field PPN V PR C D
  3569.  
  3570. PPN: Physical page number PR: Protection key data SZ SH WT
  3571. V: Validity bit C: Cacheability bit
  3572. E: Entry SH: Share status bit
  3573. SZ: Page size bits WT: Write-through bit
  3574. D: Dirty bit : Reserved bits (0 write value, undefined
  3575. read value)
  3576.  
  3577. Figure 3.17 Memory-Mapped UTLB Data Array 1
  3578.  
  3579. 59
  3580.  
  3581. ----------------------- Page 76-----------------------
  3582.  
  3583. 3 . 7 . 6 UTLB Data Array 2
  3584.  
  3585. UTLB data array 2 is allocated to addresses H'F780 0000 to H'F7FF FFFF in the P4 area. A data
  3586. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data
  3587. field specification (when writing). Information for selecting the entry to be accessed is specified in
  3588. the address field, and SA and TC to be written to data array 2 are specified in the data field.
  3589.  
  3590. In the address field, bits [31:23] have the value H'F78 indicating UTLB data array 2, and the entry
  3591. is selected by bits [13:8].
  3592.  
  3593. In the data field, TC is indicated by bit [3], and SA by bits [2:0].
  3594.  
  3595. The following two kinds of operation can be used on UTLB data array 2:
  3596.  
  3597. 1. UTLB data array 2 read
  3598.  
  3599. SA and TC are read into the data field from the UTLB entry corresponding to the entry set in
  3600. the address field.
  3601.  
  3602. 2. UTLB data array 2 write
  3603.  
  3604. SA and TC specified in the data field are written to the UTLB entry corresponding to the entry
  3605. set in the address field.
  3606.  
  3607. 31 24 23 14 13 8 7 0
  3608. Address field 1 1 1 1 0 1 1 1 1 E
  3609.  
  3610. 31 4 3 2 0
  3611. Data field
  3612. SA
  3613.  
  3614. TC
  3615. TC: Timing control bit SA: Space attribute bits
  3616. E: Entry : Reserved bits (0 write value, undefined read
  3617. value)
  3618.  
  3619. Figure 3.18 Memory-Mapped UTLB Data Array 2
  3620.  
  3621. 60
  3622.  
  3623. ----------------------- Page 77-----------------------
  3624.  
  3625. Section 4 Caches
  3626.  
  3627. 4 . 1 Overview
  3628.  
  3629. 4 . 1 . 1 Features
  3630.  
  3631. The SH7750 has an on-chip 8-kbyte instruction cache (IC) for instructions and 16-kbyte operand
  3632. cache (OC) for data. Half of the memory of the operand cache (8 kbytes) can also be used as on-
  3633. chip RAM. The features of these caches are summarized in table 4.1.
  3634.  
  3635. Table 4.1 Cache Features
  3636.  
  3637. Item Instruction Cache Operand Cache
  3638.  
  3639. Capacity 8-kbyte cache 16-kbyte cache or 8-kbyte cache +
  3640. 8-kbyte RAM
  3641.  
  3642. Type Direct mapping Direct mapping
  3643.  
  3644. Line size 32 bytes 32 bytes
  3645.  
  3646. Entries 256 512
  3647.  
  3648. Write method Copy-back/write-through selectable
  3649.  
  3650. Item Store Queues
  3651.  
  3652. Capacity 2 × 32 bytes
  3653.  
  3654. Addresses H'E000 0000 to H'E3FF FFFF
  3655.  
  3656. Write Store instruction (1-cycle write)
  3657.  
  3658. Write-back Prefetch instruction
  3659.  
  3660. Access right MMU off: according to MMUCR.SQMD
  3661. MMU on: according to individual page PR
  3662.  
  3663. 61
  3664.  
  3665. ----------------------- Page 78-----------------------
  3666.  
  3667. 4 . 1 . 2 Register Configuration
  3668.  
  3669. Table 4.2 shows the cache control registers.
  3670.  
  3671. Table 4.2 Cache Control Registers
  3672.  
  3673. Initial P 4 Area 7 Acces
  3674. Name Abbreviatio R/ W Value* 1 Address* 2 Address* 2 s Size
  3675.  
  3676. n
  3677.  
  3678. Cache control CCR R/W H'0000 0000 H'FF00 001C H'1F00 001C 32
  3679. register
  3680.  
  3681. Queue address QACR0 R/W Undefined H'FF00 0038 H'1F00 0038 32
  3682. control register 0
  3683.  
  3684. Queue address QACR1 R/W Undefined H'FF00 003C H'1F00 003C 32
  3685. control register 1
  3686.  
  3687. Notes: 1. The initial value is the value after a power-on or manual reset.
  3688. 2. This is the address when using the virtual/physical address space P4 area. When
  3689. making an access from physical address space area 7 using the TLB, the upper 3 bits
  3690. of the address are ignored.
  3691.  
  3692. 4 . 2 Register Descriptions
  3693.  
  3694. There are three cache and store queue related control registers, as shown in figure 4.1.
  3695.  
  3696. CCR
  3697.  
  3698. 31 16 15 14 12 11 10 9 8 7 6 5 4 3 2 1 0
  3699.  
  3700. CB
  3701.  
  3702. IIX ICI ICE OIX ORA OCI WT OCE
  3703.  
  3704. QACR0
  3705.  
  3706. 31 5 4 2 1 0
  3707.  
  3708. AREA
  3709.  
  3710. QACR1
  3711.  
  3712. 31 5 4 2 1 0
  3713.  
  3714. AREA
  3715.  
  3716. indicates reserved bits: 0 must be specified in a write; the read value is undefined.
  3717.  
  3718. Figure 4.1 Cache and Store Queue Control Registers
  3719.  
  3720. 62
  3721.  
  3722. ----------------------- Page 79-----------------------
  3723.  
  3724. (1) Cache Control Register (CCR): CCR contains the following bits:
  3725.  
  3726. IIX: IC index enable
  3727. ICI: IC invalidation
  3728. ICE: IC enable
  3729. OIX: OC index enable
  3730. ORA: OC RAM enable
  3731. OCI: OC invalidation
  3732. CB: Copy-back enable
  3733. WT: Write-through enable
  3734. OCE: OC enable
  3735.  
  3736. Longword access to CCR can be performed from H'FF00 001C in the P4 area and H'1F00 001C in
  3737. area 7. The CCR bits are used for the cache settings described below. Consequently, CCR
  3738. modifications must only be made by a program in the non-cached P2 area. After CCR is updated,
  3739. an instruction that performs data access to the P0, P1, P3, or U0 area should be located at least
  3740. four instructions after the CCR update instruction. Also, a branch instruction to the P0, P1, P3,
  3741. or U0 area should be located at least eight instructions after the CCR update instruction.
  3742.  
  3743. • IIX: IC index enable bit
  3744.  
  3745. 0: Address bits [12:5] used for IC entry selection
  3746.  
  3747. 1: Address bits [25] and [11:5] used for IC entry selection
  3748.  
  3749. • ICI: IC invalidation bit
  3750.  
  3751. When 1 is written to this bit, the V bits of all IC entries are cleared to 0. This bit always
  3752. returns 0 when read.
  3753.  
  3754. • ICE: IC enable bit
  3755.  
  3756. Indicates whether or not the IC is to be used. When address translation is performed, the IC
  3757. cannot be used unless the C bit in the page management information is also 1.
  3758.  
  3759. 0: IC not used
  3760.  
  3761. 1: IC used
  3762.  
  3763. • OIX: OC index enable bit
  3764.  
  3765. 0: Address bits [13:5] used for OC entry selection
  3766.  
  3767. 1: Address bits [25] and [12:5] used for OC entry selection
  3768.  
  3769. • ORA: OC RAM enable bit
  3770.  
  3771. When the OC is enabled (OCE = 1), the ORA bit specifies whether the 8 kbytes from entry
  3772. 128 to entry 255 and from entry 384 to entry 511 of the OC are to be used as RAM. When the
  3773. OC is not enabled (OCE = 0), the ORA bit should be cleared to 0.
  3774.  
  3775. 0: 16 kbytes used as cache
  3776.  
  3777. 1: 8 kbytes used as cache, and 8 kbytes as RAM
  3778.  
  3779. 63
  3780.  
  3781. ----------------------- Page 80-----------------------
  3782.  
  3783. • OCI: OC invalidation bit
  3784.  
  3785. When 1 is written to this bit, the V and U bits of all OC entries are cleared to 0. This bit
  3786. always returns 0 when read.
  3787.  
  3788. • CB: Copy-back bit
  3789.  
  3790. Indicates the P1 area cache write mode.
  3791.  
  3792. 0: Write-through mode
  3793.  
  3794. 1: Copy-back mode
  3795.  
  3796. • WT: Write-through bit
  3797.  
  3798. Indicates the P0, U0, and P3 area cache write mode. When address translation is performed, the
  3799. value of the WT bit in the page management information has priority.
  3800.  
  3801. 0: Copy-back mode
  3802.  
  3803. 1: Write-through mode
  3804.  
  3805. • OCE: OC enable bit
  3806.  
  3807. Indicates whether or not the OC is to be used. When address translation is performed, the OC
  3808. cannot be used unless the C bit in the page management information is also 1.
  3809.  
  3810. 0: OC not used
  3811.  
  3812. 1: OC used
  3813.  
  3814. (2) Queue Address Control Register 0 (QACR0): Longword access to QACR0 can be
  3815. performed from H'FF00 0038 in the P4 area and H'1F00 0038 in area 7. QACR0 specifies the area
  3816. onto which store queue 0 (SQ0) is mapped when the MMU is off.
  3817.  
  3818. (3) Queue Address Control Register 1 (QACR1): Longword access to QACR1 can be
  3819. performed from H'FF00 003C in the P4 area and H'1F00 003C in area 7. QACR1 specifies the
  3820. area onto which store queue 1 (SQ1) is mapped when the MMU is off.
  3821.  
  3822. 64
  3823.  
  3824. ----------------------- Page 81-----------------------
  3825.  
  3826. 4 . 3 Operand Cache (OC)
  3827.  
  3828. 4 . 3 . 1 Configuration
  3829.  
  3830. Figure 4.2 shows the configuration of the operand cache.
  3831.  
  3832. Effective address
  3833.  
  3834. 31 26 25 13 12 11 10 9 5 4 3 2 1 0
  3835.  
  3836. RAM area
  3837. determination
  3838.  
  3839. [11:5]
  3840. OIX ORA
  3841. [13] [12]
  3842.  
  3843. 22
  3844. Longword (LW) selection
  3845. 9
  3846. Address array 3 Data array
  3847.  
  3848. n 0 Tag address U V LW0 LW1 LW2 LW3 LW4 LW5 LW6 LW7
  3849. o
  3850. i
  3851. t
  3852. c
  3853. e
  3854. l
  3855. e
  3856. s
  3857.  
  3858. MMU y
  3859. r
  3860. t
  3861. n
  3862. E
  3863.  
  3864. 19
  3865.  
  3866. 511 19 bits 1 bit 1 bit 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits
  3867.  
  3868. Compare
  3869.  
  3870. Read data Write data
  3871.  
  3872. Hit signal
  3873.  
  3874. Figure 4.2 Configuration of Operand Cache
  3875.  
  3876. The operand cache consists of 512 cache lines, each composed of a 19-bit tag, V bit, U bit, and 32-
  3877. byte data.
  3878.  
  3879. • Tag
  3880.  
  3881. 65
  3882.  
  3883. ----------------------- Page 82-----------------------
  3884.  
  3885. Stores the upper 19 bits of the 29-bit external memory address of the data line to be cached.
  3886. The tag is not initialized by a power-on or manual reset.
  3887.  
  3888. • V bit (validity bit)
  3889.  
  3890. Indicates that valid data is stored in the cache line. When this bit is 1, the cache line data is
  3891. valid. The V bit is initialized to 0 by a power-on reset, but retains its value in a manual reset.
  3892.  
  3893. • U bit (dirty bit)
  3894.  
  3895. The U bit is set to 1 if data is written to the cache line while the cache is being used in copy-
  3896. back mode. That is, the U bit indicates a mismatch between the data in the cache line and the
  3897. data in external memory. The U bit is never set to 1 while the cache is being used in write-
  3898. through mode, unless it is modified by accessing the memory-mapped cache (see section 4.5,
  3899. Memory-Mapped Cache Configuration). The U bit is initialized to 0 by a power-on reset, but
  3900. retains its value in a manual reset.
  3901.  
  3902. • Data field
  3903.  
  3904. The data field holds 32 bytes (256 bits) of data per cache line. The data array is not initialized
  3905. by a power-on or manual reset.
  3906.  
  3907. 4 . 3 . 2 Read Operation
  3908.  
  3909. When the OC is enabled (CCR.OCE = 1) and data is read by means of an effective address from a
  3910. cacheable area, the cache operates as follows:
  3911.  
  3912. 1. The tag, V bit, and U bit are read from the cache line indexed by effective address bits [13:5].
  3913.  
  3914. 2. The tag is compared with bits [28:10] of the address resulting from effective address translation
  3915. by the MMU:
  3916.  
  3917. 〈 If the tag matches and the V bit is 1 → (3a)
  3918.  
  3919. 〈 If the tag matches and the V bit is 0 → (3b)
  3920.  
  3921. 〈 If the tag does not match and the V bit is 0 → (3b)
  3922.  
  3923. 〈 If the tag does not match, the V bit is 1, and the U bit is → (3b)
  3924. 0
  3925.  
  3926. 〈 If the tag does not match, the V bit is 1, and the U bit is → (3c)
  3927. 1
  3928.  
  3929. 3a. Cache hit
  3930.  
  3931. 66
  3932.  
  3933. ----------------------- Page 83-----------------------
  3934.  
  3935. The data indexed by effective address bits [4:0] is read from the data field of the cache line
  3936. indexed by effective address bits [13:5] in accordance with the access size
  3937. (quadword/longword/word/byte).
  3938.  
  3939. 3b.Cache miss (no write-back)
  3940.  
  3941. Data is read into the cache line from the external memory space corresponding to the effective
  3942. address. Data reading is performed, using the wraparound method, in order from the longword
  3943. data corresponding to the effective address, and when the corresponding data arrives in the cache,
  3944. the read data is returned to the CPU. While the remaining one cache line of data is being read,
  3945. the CPU can execute the next processing. When reading of one line of data is completed, the
  3946. tag corresponding to the effective address is recorded in the cache, and 1 is written to the V bit.
  3947.  
  3948. 3c. Cache miss (with write-back)
  3949.  
  3950. The tag and data field of the cache line indexed by effective address bits [13:5] are saved in the
  3951. write-back buffer. Then data is read into the cache line from the external memory space
  3952. corresponding to the effective address. Data reading is performed, using the wraparound method,
  3953. in order from the longword data corresponding to the effective address, and when the
  3954. corresponding data arrives in the cache, the read data is returned to the CPU. While the
  3955. remaining one cache line of data is being read, the CPU can execute the next processing. When
  3956. reading of one line of data is completed, the tag corresponding to the effective address is
  3957. recorded in the cache, 1 is written to the V bit, and 0 to the U bit. The data in the write-back
  3958. buffer is then written back to external memory.
  3959.  
  3960. 4 . 3 . 3 Write Operation
  3961.  
  3962. When the OC is enabled (CCR.OCE = 1) and data is written by means of an effective address to a
  3963. cacheable area, the cache operates as follows:
  3964.  
  3965. 1. The tag, V bit, and U bit are read from the cache line indexed by effective address bits [13:5].
  3966.  
  3967. 2. The tag is compared with bits [28:10] of the address resulting from effective address translation
  3968. by the MMU:
  3969.  
  3970. 67
  3971.  
  3972. ----------------------- Page 84-----------------------
  3973.  
  3974. Copy-back Write-through
  3975.  
  3976. 〈 If the tag matches and the V bit is 1 → (3a) → (3b)
  3977.  
  3978. 〈 If the tag matches and the V bit is 0 → (3c) → (3d)
  3979.  
  3980. 〈 If the tag does not match and the V bit is 0 → (3c) → (3d)
  3981.  
  3982. 〈 If the tag does not match, the V bit is 1, and the U bit is → (3c) → (3d)
  3983. 0
  3984.  
  3985. 〈 If the tag does not match, the V bit is 1, and the U bit is → (3e) → (3d)
  3986. 1
  3987.  
  3988. 3a. Cache hit (copy-back)
  3989.  
  3990. A data write in accordance with the access size (quadword/longword/word/byte) is performed for
  3991. the data indexed by bits [4:0] of the effective address of the data field of the cache line indexed
  3992. by effective address bits [13:5]. Then 1 is set in the U bit.
  3993.  
  3994. 3b.Cache hit (write-through)
  3995.  
  3996. A data write in accordance with the access size (quadword/longword/word/byte) is performed for
  3997. the data indexed by bits [4:0] of the effective address of the data field of the cache line indexed
  3998. by effective address bits [13:5]. A write is also performed to the corresponding external memory
  3999. using the specified access size.
  4000.  
  4001. 3c. Cache miss (no copy-back/write-back)
  4002.  
  4003. A data write in accordance with the access size (quadword/longword/word/byte) is performed for
  4004. the data indexed by bits [4:0] of the effective address of the data field of the cache line indexed
  4005. by effective address bits [13:5]. Then, data is read into the cache line from the external memory
  4006. space corresponding to the effective address. Data reading is performed, using the wraparound
  4007. method, in order from the longword data corresponding to the effective address, and one cache
  4008. line of data is read excluding the written data. During this time, the CPU can execute the next
  4009. processing. When reading of one line of data is completed, the tag corresponding to the
  4010. effective address is recorded in the cache, and 1 is written to the V bit and U bit.
  4011.  
  4012. 3d. Cache miss (write-through)
  4013.  
  4014. A write of the specified access size is performed to the external memory corresponding to the
  4015. effective address. In this case, a write to cache is not performed.
  4016.  
  4017. 3e. Cache miss (with copy-back/write-back)
  4018.  
  4019. 68
  4020.  
  4021. ----------------------- Page 85-----------------------
  4022.  
  4023. The tag and data field of the cache line indexed by effective address bits [13:5] are first saved in
  4024. the write-back buffer, and then a data write in accordance with the access size
  4025. (quadword/longword/word/byte) is performed for the data indexed by bits [4:0] of the effective
  4026. address of the data field of the cache line indexed by effective address bits [13:5]. Then, data is
  4027. read into the cache line from the external memory space corresponding to the effective address.
  4028. Data reading is performed, using the wraparound method, in order from the longword data
  4029. corresponding to the effective address, and one cache line of data is read excluding the written
  4030. data. During this time, the CPU can execute the next processing. When reading of one line of
  4031. data is completed, the tag corresponding to the effective address is recorded in the cache, and 1 is
  4032. written to the V bit and U bit. The data in the write-back buffer is then written back to external
  4033. memory.
  4034.  
  4035. 4 . 3 . 4 Write-Back Buffer
  4036.  
  4037. In order to give priority to data reads to the cache and improve performance, the SH7750 has a
  4038. write-back buffer which holds the relevant cache entry when it becomes necessary to purge a dirty
  4039. cache entry into external memory as the result of a cache miss. The write-back buffer contains one
  4040. cache line of data and the physical address of the purge destination.
  4041.  
  4042. Physical address bits [28:5] LW0 LW1 LW2 LW3 LW4 LW5 LW6 LW7
  4043.  
  4044. Figure 4.3 Configuration of Write-Back Buffer
  4045.  
  4046. 4 . 3 . 5 Write-Through Buffer
  4047.  
  4048. The SH7750 has a 64-bit buffer for holding write data when writing data in write-through mode or
  4049. writing to a non-cacheable area. This allows the CPU to proceed to the next operation as soon as
  4050. the write to the write-through buffer is completed, without waiting for completion of the write to
  4051. external memory.
  4052.  
  4053. Physical address bits [28:0] LW0 LW1
  4054.  
  4055. Figure 4.4 Configuration of Write-Through Buffer
  4056.  
  4057. 4 . 3 . 6 RAM Mode
  4058.  
  4059. Setting CCR.ORA to 1 enables 8 kbytes of the operand cache to be used as RAM. The operand
  4060. cache entries used as RAM are entries 128 to 255 and 384 to 511 . Other entries can still be used
  4061. as cache. RAM can be accessed using addresses H'7C00 0000 to H'7FFF FFFF. Byte-, word-,
  4062. longword-, and quadword-size data reads and writes can be performed in the operand cache RAM
  4063. area. Instruction fetches cannot be performed in this area.
  4064. 69
  4065.  
  4066. ----------------------- Page 86-----------------------
  4067.  
  4068. An example of RAM use is shown below. Here, the 4 kbytes comprising OC entries 128 to 256
  4069. are designated as RAM area 1, and the 4 kbytes comprising OC entries 384 to 511 as RAM area 2.
  4070.  
  4071. • When OC index mode is off (CCR.OIX = 0)
  4072.  
  4073. H'7C00 0000 to H'7C00 0FFF (4 kB): Corresponds to RAM area 1
  4074.  
  4075. H'7C00 1000 to H'7C00 1FFF (4 kB): Corresponds to RAM area 1
  4076.  
  4077. H'7C00 2000 to H'7C00 2FFF (4 kB): Corresponds to RAM area 2
  4078.  
  4079. H'7C00 3000 to H'7C00 3FFF (4 kB): Corresponds to RAM area 2
  4080.  
  4081. H'7C00 4000 to H'7C00 4FFF (4 kB): Corresponds to RAM area 1
  4082.  
  4083. : : :
  4084.  
  4085. RAM areas 1 and 2 then repeat every 8 kbytes up to H'7FFF FFFF.
  4086.  
  4087. Thus, to secure a continuous 8-kbyte RAM area, the area from H'7C00 1000 to H'7C00 2FFF
  4088. can be used, for example.
  4089.  
  4090. • When OC index mode is on (CCR.OIX = 1)
  4091.  
  4092. H'7C00 0000 to H'7C00 0FFF (4 kB): Corresponds to RAM area 1
  4093.  
  4094. H'7C00 1000 to H'7C00 1FFF (4 kB): Corresponds to RAM area 1
  4095.  
  4096. H'7C00 2000 to H'7C00 2FFF (4 kB): Corresponds to RAM area 1
  4097.  
  4098. : : :
  4099.  
  4100. H'7DFF F000 to H'7DFF FFFF (4 kB): Corresponds to RAM area 1
  4101.  
  4102. H'7E00 0000 to H'7E00 0FFF (4 kB): Corresponds to RAM area 2
  4103.  
  4104. H'7E00 1000 to H'7E00 1FFF (4 kB): Corresponds to RAM area 2
  4105.  
  4106. : : :
  4107. H'7FFF F000 to H'7FFF FFFF (4 kB): Corresponds to RAM area 2
  4108.  
  4109. As the distinction between RAM areas 1 and 2 is indicated by address bit [25], the area from
  4110. H'7DFF F000 to H'7E00 0FFF should be used to secure a continuous 8-kbyte RAM area.
  4111.  
  4112. 4 . 3 . 7 OC Index Mode
  4113.  
  4114. Setting CCR.OIX to 1 enables OC indexing to be performed using bit [25] of the effective address.
  4115. This is called OC index mode. In normal mode, with CCR.OIX cleared to 0, OC indexing is
  4116. performed using bits [13:5] of the effective address; therefore, when 16 kbytes or more of
  4117. consecutive data is handled, the OC is fully used by this data. This results in frequent cache
  4118. misses. Using index mode allows the OC to be handled as two 8-kbyte areas by means of effective
  4119. address bit [25], providing efficient use of the cache.
  4120.  
  4121. 70
  4122.  
  4123. ----------------------- Page 87-----------------------
  4124.  
  4125. 4 . 3 . 8 Coherency between Cache and External Memory
  4126.  
  4127. Coherency between cache and external memory should be assured by software. In the SH7750, the
  4128. following four new instructions are supported for cache operations. Details of these instructions are
  4129. given in the Programming Manual.
  4130.  
  4131. Invalidate instruction: OCBI @Rn Cache invalidation (no write-back)
  4132.  
  4133. Purge instruction: OCBP @Rn Cache invalidation (with write-back)
  4134.  
  4135. Write-back instruction: OCBWB @Rn Cache write-back
  4136.  
  4137. Allocate instruction: MOVCA.L R0,@Rn Cache allocation
  4138.  
  4139. 4 . 3 . 9 Prefetch Operation
  4140.  
  4141. The SH7750 supports a prefetch instruction to reduce the cache fill penalty incurred as the result of
  4142. a cache miss. If it is known that a cache miss will result from a read or write operation, it is
  4143. possible to fill the cache with data beforehand by means of the prefetch instruction to prevent a
  4144. cache miss due to the read or write operation, and so improve software performance. If a prefetch
  4145. instruction is executed for data already held in the cache, or if the prefetch address results in a
  4146. UTLB miss or a protection violation, the result is no operation, and an exception is not generated.
  4147. Details of the prefetch instruction are given in the Programming Manual.
  4148.  
  4149. Prefetch instruction: PREF @Rn
  4150.  
  4151. 71
  4152.  
  4153. ----------------------- Page 88-----------------------
  4154.  
  4155. 4 . 4 Instruction Cache (IC)
  4156.  
  4157. 4 . 4 . 1 Configuration
  4158.  
  4159. Figure 4.5 shows the configuration of the instruction cache.
  4160.  
  4161. Effective address
  4162.  
  4163. 31 26 25 13 12 11 10 9 5 4 3 2 1 0
  4164.  
  4165. [11:5]
  4166. IIX
  4167. [12]
  4168.  
  4169. 22 Longword (LW) selection
  4170.  
  4171. 8 3
  4172. Address array Data array
  4173.  
  4174. n 0 Tag address V LW0 LW1 LW2 LW3 LW4 LW5 LW6 LW7
  4175. o
  4176. i
  4177. t
  4178. c
  4179. e
  4180. l
  4181. e
  4182. s
  4183.  
  4184. MMU y
  4185. r
  4186. t
  4187. n
  4188. E
  4189.  
  4190. 19
  4191.  
  4192. 255 19 bits 1 bit 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits 32 bits
  4193.  
  4194. Compare
  4195.  
  4196. Read data
  4197.  
  4198. Hit signal
  4199.  
  4200. Figure 4.5 Configuration of Instruction Cache
  4201.  
  4202. The instruction cache consists of 256 cache lines, each composed of a 19-bit tag, V bit, and 32-
  4203. byte data (16 instructions).
  4204.  
  4205. • Tag
  4206.  
  4207. 72
  4208.  
  4209. ----------------------- Page 89-----------------------
  4210.  
  4211. Stores the upper 19 bits of the 29-bit external memory address of the data line to be cached.
  4212. The tag is not initialized by a power-on or manual reset.
  4213.  
  4214. • V bit (validity bit)
  4215.  
  4216. Indicates that valid data is stored in the cache line. When this bit is 1, the cache line data is
  4217. valid. The V bit is initialized to 0 by a power-on reset, but retains its value in a manual reset.
  4218.  
  4219. • Data array
  4220.  
  4221. The data field holds 32 bytes (256 bits) of data per cache line. The data array is not initialized
  4222. by a power-on or manual reset.
  4223.  
  4224. 4 . 4 . 2 Read Operation
  4225.  
  4226. When the IC is enabled (CCR.ICE = 1) and instruction fetches are performed by means of an
  4227. effective address from a cacheable area, the instruction cache operates as follows:
  4228.  
  4229. 1. The tag and V bit are read from the cache line indexed by effective address bits [12:5].
  4230.  
  4231. 2. The tag is compared with bits [28:10] of the address resulting from effective address translation
  4232. by the MMU:
  4233.  
  4234.  If the tag matches and the V bit is 1 → (3a)
  4235.  
  4236.  If the tag matches and the V bit is 0 → (3b)
  4237.  
  4238.  If the tag does not match and the V bit is 0 → (3b)
  4239.  
  4240.  If the tag does not match and the V bit is 1 → (3b)
  4241.  
  4242. 3a. Cache hit
  4243.  
  4244. The data indexed by effective address bits [4:2] is read as an instruction from the data field of the
  4245. cache line indexed by effective address bits [12:5].
  4246.  
  4247. 3b.Cache miss
  4248.  
  4249. Data is read into the cache line from the external memory space corresponding to the effective
  4250. address. Data reading is performed, using the wraparound method, in order from the longword
  4251. data corresponding to the effective address, and when the corresponding data arrives in the cache,
  4252. the read data is returned to the CPU as an instruction. When reading of one line of data is
  4253. completed, the tag corresponding to the effective address is recorded in the cache, and 1 is
  4254. written to the V bit.
  4255.  
  4256. 73
  4257.  
  4258. ----------------------- Page 90-----------------------
  4259.  
  4260. 4 . 4 . 3 IC Index Mode
  4261.  
  4262. Setting CCR.IIX to 1 enables IC indexing to be performed using bit [25] of the effective address.
  4263. This is called IC index mode. In normal mode, with CCR.IIX cleared to 0, IC indexing is
  4264. performed using bits [12:5] of the effective address; therefore, when 8 kbytes or more of
  4265. consecutive program instructions are handled, the IC is fully used by this program. This results in
  4266. frequent cache misses. Using index mode allows the IC to be handled as two 4-kbyte areas by
  4267. means of effective address bit [25], providing efficient use of the cache.
  4268.  
  4269. 4 . 5 Memory-Mapped Cache Configuration
  4270.  
  4271. To enable the IC and OC to be managed by software, their contents can be read and written by a P2
  4272. area program with a MOV instruction in privileged mode. Operation is not guaranteed if access is
  4273. made from a program in another area. In this case, a branch to the P0, U0, P1, or P3 area should
  4274. be made at least 8 instructions after this MOV instruction. The IC and OC are allocated to the P4
  4275. area in physical memory space. Only data accesses can be used on both the IC address array and
  4276. data array and the OC address array and data array, and accesses are always longword-size.
  4277. Instruction fetches cannot be performed in these areas. For reserved bits, a write value of 0 should
  4278. be specified; their read value is undefined.
  4279.  
  4280. 4 . 5 . 1 IC Address Array
  4281.  
  4282. The IC address array is allocated to addresses H'F000 0000 to H'F0FF FFFF in the P4 area. An
  4283. address array access requires a 32-bit address field specification (when reading or writing) and a 32-
  4284. bit data field specification. The entry to be accessed is specified in the address field, and the write
  4285. tag and V bit are specified in the data field.
  4286.  
  4287. In the address field, bits [31:24] have the value H'F0 indicating the IC address array, and the entry
  4288. is specified by bits [12:5]. CCR.IIX has no effect on this entry specification. The address array bit
  4289. [3] association bit (A bit) specifies whether or not association is performed when writing to the IC
  4290. address array. As only longword access is used, 0 should be specified for address field bits [1:0].
  4291.  
  4292. In the data field, the tag is indicated by bits [31:10], and the V bit by bit [0]. As the IC address
  4293. array tag is 19 bits in length, data field bits [31:29] are not used in the case of a write in which
  4294. association is not performed. Data field bits [31:29] are used for the virtual address specification
  4295. only in the case of a write in which association is performed.
  4296.  
  4297. The following three kinds of operation can be used on the IC address array:
  4298.  
  4299. 1. IC address array read
  4300.  
  4301. The tag and V bit are read into the data field from the IC entry corresponding to the entry set in
  4302. the address field. In a read, associative operation is not performed regardless of whether the
  4303. association bit specified in the address field is 1 or 0.
  4304.  
  4305. 74
  4306.  
  4307. ----------------------- Page 91-----------------------
  4308.  
  4309. 2. IC address array write (non-associative)
  4310.  
  4311. The tag and V bit specified in the data field are written to the IC entry corresponding to the
  4312. entry set in the address field. The A bit in the address field should be cleared to 0.
  4313.  
  4314. 3. IC address array write (associative)
  4315.  
  4316. When a write is performed with the A bit in the address field set to 1, the tag stored in the entry
  4317. specified in the address field is compared with the tag specified in the data field. If the MMU is
  4318. enabled at this time, comparison is performed after the virtual address specified by data field bits
  4319. [31:10] has been translated to a physical address using the ITLB. If the addresses match and the
  4320. V bit is 1, the V bit specified in the data field is written into the IC entry. This operation is
  4321. used to invalidate a specific IC entry. If an ITLB miss occurs during address translation, or the
  4322. comparison shows a mismatch, no operation results and the write is not performed. If an
  4323. instruction TLB multiple hit exception occurs during address translation, processing switches
  4324. to the instruction TLB multiple hit exception handling routine.
  4325.  
  4326. 31 24 23 13 12 5 4 3 2 1 0
  4327. Address field 1 1 1 1 0 0 0 0 Entry A
  4328.  
  4329. 31 10 9 1 0
  4330. Data field Tag address V
  4331.  
  4332. V : Validity bit
  4333. A : Association bit
  4334. : Reserved bits (0 write value, undefined read value)
  4335.  
  4336. Figure 4.6 Memory-Mapped IC Address Array
  4337.  
  4338. 4 . 5 . 2 IC Data Array
  4339.  
  4340. The IC data array is allocated to addresses H'F100 0000 to H'F1FF FFFF in the P4 area. A data
  4341. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data
  4342. field specification. The entry to be accessed is specified in the address field, and the longword data
  4343. to be written is specified in the data field.
  4344.  
  4345. In the address field, bits [31:24] have the value H'F1 indicating the IC data array, and the entry is
  4346. specified by bits [12:5]. CCR.IIX has no effect on this entry specification. Address field bits [4:2]
  4347. are used for the longword data specification in the entry. As only longword access is used, 0 should
  4348. be specified for address field bits [1:0].
  4349.  
  4350. The data field is used for the longword data specification.
  4351.  
  4352. The following two kinds of operation can be used on the IC data array:
  4353.  
  4354. 1. IC data array read
  4355. 75
  4356.  
  4357. ----------------------- Page 92-----------------------
  4358.  
  4359. Longword data is read into the data field from the data specified by the longword specification
  4360. bits in the address field in the IC entry corresponding to the entry set in the address field.
  4361.  
  4362. 2. IC data array write
  4363.  
  4364. The longword data specified in the data field is written for the data specified by the longword
  4365. specification bits in the address field in the IC entry corresponding to the entry set in the
  4366. address field.
  4367.  
  4368. 31 24 23 13 12 5 4 2 1 0
  4369. Address field 1 1 1 1 0 0 0 1 Entry L
  4370.  
  4371. 31 0
  4372. Data field Longword data
  4373.  
  4374. L : Longword specification bits
  4375. : Reserved bits (0 write value, undefined read value)
  4376.  
  4377. Figure 4.7 Memory-Mapped IC Data Array
  4378.  
  4379. 4 . 5 . 3 OC Address Array
  4380.  
  4381. The OC address array is allocated to addresses H'F400 0000 to H'F4FF FFFF in the P4 area. An
  4382. address array access requires a 32-bit address field specification (when reading or writing) and a 32-
  4383. bit data field specification. The entry to be accessed is specified in the address field, and the write
  4384. tag, U bit, and V bit are specified in the data field.
  4385.  
  4386. In the address field, bits [31:24] have the value H'F4 indicating the OC address array, and the entry
  4387. is specified by bits [13:5]. CCR.OIX and CCR.ORA have no effect on this entry specification.
  4388. The address array bit [3] association bit (A bit) specifies whether or not association is performed
  4389. when writing to the OC address array. As only longword access is used, 0 should be specified for
  4390. address field bits [1:0].
  4391.  
  4392. 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].
  4393. As the OC address array tag is 19 bits in length, data field bits [31:29] are not used in the case of a
  4394. write in which association is not performed. Data field bits [31:29] are used for the virtual address
  4395. specification only in the case of a write in which association is performed.
  4396.  
  4397. The following three kinds of operation can be used on the OC address array:
  4398.  
  4399. 1. OC address array read
  4400.  
  4401. The tag, U bit, and V bit are read into the data field from the OC entry corresponding to the
  4402. entry set in the address field. In a read, associative operation is not performed regardless of
  4403. whether the association bit specified in the address field is 1 or 0.
  4404.  
  4405. 76
  4406.  
  4407. ----------------------- Page 93-----------------------
  4408.  
  4409. 2. OC address array write (non-associative)
  4410.  
  4411. The tag, U bit, and V bit specified in the data field are written to the OC entry corresponding to
  4412. the entry set in the address field. The A bit in the address field should be cleared to 0.
  4413.  
  4414. When a write is performed to a cache line for which the U bit and V bit are both 1, after write-
  4415. back of that cache line, the tag, U bit, and V bit specified in the data field are written.
  4416.  
  4417. 3. OC address array write (associative)
  4418.  
  4419. When a write is performed with the A bit in the address field set to 1, the tag stored in the entry
  4420. specified in the address field is compared with the tag specified in the data field. If the MMU is
  4421. enabled at this time, comparison is performed after the virtual address specified by data field bits
  4422. [31:10] has been translated to a physical address using the UTLB. If the addresses match and the
  4423. V bit is 1, the U bit and V bit specified in the data field are written into the OC entry. This
  4424. operation is used to invalidate a specific OC entry. If the OC entry U bit is 1, and 0 is written
  4425. to the V bit or to the U bit, write-back is performed. If an UTLB miss occurs during address
  4426. translation, or the comparison shows a mismatch, no operation results and the write is not
  4427. performed. If a data TLB multiple hit exception occurs during address translation, processing
  4428. switches to the data TLB multiple hit exception handling routine.
  4429.  
  4430. 31 24 23 1413 5 4 3 2 1 0
  4431. Address field 1 1 1 1 0 1 0 0 Entry A
  4432.  
  4433. 31 10 9 2 1 0
  4434. Data field Tag address U V
  4435.  
  4436. V : Validity bit
  4437. U : Dirty bit
  4438. A : Association bit
  4439. : Reserved bits (0 write value, undefined read value)
  4440.  
  4441. Figure 4.8 Memory-Mapped OC Address Array
  4442.  
  4443. 77
  4444.  
  4445. ----------------------- Page 94-----------------------
  4446.  
  4447. 4 . 5 . 4 OC Data Array
  4448.  
  4449. The OC data array is allocated to addresses H'F500 0000 to H'F5FF FFFF in the P4 area. A data
  4450. array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data
  4451. field specification. The entry to be accessed is specified in the address field, and the longword data
  4452. to be written is specified in the data field.
  4453.  
  4454. In the address field, bits [31:24] have the value H'F5 indicating the OC data array, and the entry is
  4455. specified by bits [13:5]. CCR.OIX and CCR.ORA have no effect on this entry specification.
  4456. Address field bits [4:2] are used for the longword data specification in the entry. As only longword
  4457. access is used, 0 should be specified for address field bits [1:0].
  4458.  
  4459. The data field is used for the longword data specification.
  4460.  
  4461. The following two kinds of operation can be used on the OC data array:
  4462.  
  4463. 1. OC data array read
  4464.  
  4465. Longword data is read into the data field from the data specified by the longword specification
  4466. bits in the address field in the OC entry corresponding to the entry set in the address field.
  4467.  
  4468. 2. OC data array write
  4469.  
  4470. The longword data specified in the data field is written for the data specified by the longword
  4471. specification bits in the address field in the OC entry corresponding the entry set in the address
  4472. field. This write does not set the U bit to 1 on the address array side.
  4473.  
  4474. 31 24 23 1413 5 4 2 1 0
  4475. Address field 1 1 1 1 0 1 0 1 Entry L
  4476.  
  4477. 31 0
  4478. Data field Longword data
  4479.  
  4480. L : Longword specification bits
  4481. : Reserved bits (0 write value, undefined read value)
  4482.  
  4483. Figure 4.9 Memory-Mapped OC Data Array
  4484.  
  4485. 78
  4486.  
  4487. ----------------------- Page 95-----------------------
  4488.  
  4489. 4 . 6 Store Queues
  4490.  
  4491. Two 32-byte store queues (SQs) are supported to perform high-speed writes to external memory.
  4492.  
  4493. 4 . 6 . 1 SQ Configuration
  4494.  
  4495. There are two 32-byte store queues, SQ0 and SQ1, as shown in figure 4.10. These two store
  4496. queues can be set independently.
  4497.  
  4498. SQ0 SQ0[0] SQ0[1] SQ0[2] SQ0[3] SQ0[4] SQ0[5] SQ0[6] SQ0[7]
  4499.  
  4500. SQ1 SQ1[0] SQ1[1] SQ1[2] SQ1[3] SQ1[4] SQ1[5] SQ1[6] SQ1[7]
  4501.  
  4502. 4B 4B 4B 4B 4B 4B 4B 4B
  4503.  
  4504. Figure 4.10 Store Queue Configuration
  4505.  
  4506. 4 . 6 . 2 SQ Writes
  4507.  
  4508. A write to the SQs can be performed using a store instruction (MOV) on P4 area H'E000 0000 to
  4509. H'E3FF FFFC. A longword or quadword access size can be used. The meaning of the address bits
  4510. is as follows:
  4511.  
  4512. [31:26]: 111000 Store queue specification
  4513. [25:6]: Don’t care Used for external memory transfer/access right
  4514. [5]: 0/1 0: SQ0 specification 1: SQ1 specification
  4515. [4:2]: LW specification Specifies longword position in SQ0/SQ1
  4516. [1:0] 00 Fixed at 0
  4517.  
  4518. 4 . 6 . 3 Transfer to External Memory
  4519.  
  4520. Transfer from the SQs to external memory can be performed with a prefetch instruction (PREF).
  4521. Issuing a PREF instruction for P4 area H'E000 0000 to H'E3FF FFFC starts a burst transfer from
  4522. the SQs to external memory. The burst transfer length is fixed at 32 bytes, and the start address is
  4523. always at a 32-byte boundary. While the contents of one SQ are being transferred to external
  4524. memory, the other SQ can be written to without a penalty cycle, but writing to the SQ involved
  4525. in the transfer to external memory is deferred until the transfer is completed.
  4526.  
  4527. The SQ transfer destination external memory address bit [28:0] specification is as shown below,
  4528. according to whether the MMU is on or off.
  4529.  
  4530. 79
  4531.  
  4532. ----------------------- Page 96-----------------------
  4533.  
  4534. • When MMU is on
  4535.  
  4536. The SQ area (H'E000 0000 to H'E3FF FFFF) is set in VPN of the UTLB, and the transfer
  4537. destination external memory address in PPN. The ASID, V, SZ, SH, PR, and D bits have the
  4538. same meaning as for normal address translation, but the C and WT bits have no meaning with
  4539. regard to this page. Since burst transfer is prohibited for PCMCIA areas, the SA and TC bits
  4540. also have no meaning.
  4541.  
  4542. When a prefetch instruction is issued for the SQ area, address translation is performed and
  4543. external memory address bits [28:10] are generated in accordance with the SZ bit specification.
  4544. For external memory address bits [9:5], the address prior to address translation is generated in
  4545. the same way as when the MMU is off. External memory address bits [4:0] are fixed at 0.
  4546. Transfer from the SQs to external memory is performed to this address.
  4547.  
  4548. • When MMU is off
  4549.  
  4550. The SQ area (H'E000 0000 to H'E3FF FFFF) is specified as the address at which a prefetch is
  4551. performed. The meaning of address bits [31:0] is as follows:
  4552.  
  4553. [31:26]: 111000 Store queue specification
  4554.  
  4555. [25:6]: Address External memory address bits [25:6]
  4556.  
  4557. [5]: 0/1 0: SQ0 specification
  4558. 1: SQ1 specification and external memory address bit [5]
  4559.  
  4560. [4:2]: Don’t care No meaning in a prefetch
  4561.  
  4562. [1:0] 00 Fixed at 0
  4563.  
  4564. External memory address bits [28:26], which cannot be generated from the above address, are
  4565. generated from the QACR0/1 registers.
  4566.  
  4567. QACR0 [4:2]: External memory address bits [28:26] corresponding to SQ0
  4568.  
  4569. QACR1 [4:2]: External memory address bits [28:26] corresponding to SQ1
  4570.  
  4571. External memory address bits [4:0] are always fixed at 0 since burst transfer starts at a 32-byte
  4572. boundary.
  4573.  
  4574. 80
  4575.  
  4576. ----------------------- Page 97-----------------------
  4577.  
  4578. 4 . 6 . 4 SQ Protection
  4579.  
  4580. It is possible to set protection against SQ writes and transfers to external memory. If an SQ write
  4581. violates the protection setting, an exception will be generated but the SQ contents will be
  4582. corrupted. If a transfer from the SQs to external memory (prefetch instruction) violates the
  4583. protection setting, the transfer to external memory will be inhibited and an exception will be
  4584. generated.
  4585.  
  4586. • When MMU is on
  4587.  
  4588. Operation is in accordance with the address translation information recorded in the UTLB, and
  4589. MMUCR.SQMD. Write type exception judgment is performed for writes to the SQs, and read
  4590. type for transfer from the SQs to external memory (PREF instruction), and a TLB miss
  4591. exception, protection violation exception, or initial page write exception is generated.
  4592. However, if SQ access is enabled, in privileged mode only, by MMUCR.SQMD, an address
  4593. error will be flagged in user mode even if address translation is successful.
  4594.  
  4595. • When MMU is off
  4596.  
  4597. Operation is in accordance with MMUCR.SQMD.
  4598.  
  4599. 0: Privileged/user access possible
  4600.  
  4601. 1: Privileged access possible
  4602.  
  4603. If the SQ area is accessed in user mode when MMUCR.SQMD is set to 1, an address error will
  4604. be flagged.
  4605.  
  4606. 81
  4607.  
  4608. ----------------------- Page 98-----------------------
  4609.  
  4610. 82
  4611.  
  4612. ----------------------- Page 99-----------------------
  4613.  
  4614. Section 5 Exceptions
  4615.  
  4616. 5 . 1 Overview
  4617.  
  4618. 5 . 1 . 1 Features
  4619.  
  4620. Exception handling is processing handled by a special routine, separate from normal program
  4621. processing, that is executed by the CPU in case of abnormal events. For example, if the executing
  4622. instruction ends abnormally, appropriate action must be taken in order to return to the original
  4623. program sequence, or report the abnormality before terminating the processing. The process of
  4624. generating an exception handling request in response to abnormal termination, and passing control
  4625. to a user-written exception handling routine, in order to support such functions, is given the
  4626. generic name of exception handling.
  4627.  
  4628. SH7750 exception handling is of three kinds: for resets, general exceptions, and interrupts.
  4629.  
  4630. 5 . 1 . 2 Register Configuration
  4631.  
  4632. The registers used in exception handling are shown in table 5.1.
  4633.  
  4634. Table 5.1 Exception-Related Registers
  4635.  
  4636. Abbrevia P 4 Area 7 Acces
  4637. Name tion R/W Initial Value*1 Address* 2 Address* 2 s Size
  4638.  
  4639. TRAPA exception TRA R/W Undefined H'FF00 0020 H'1F00 0020 32
  4640. register
  4641.  
  4642. Exception event EXPEVT R/W H'0000 0000/ H'FF00 0024 H'1F00 0024 32
  4643. register H'0000 0020*1
  4644.  
  4645. Interrupt event INTEVT R/W Undefined H'FF00 0028 H'1F00 0028 32
  4646. register
  4647.  
  4648. Notes: 1. H'0000 0000 is set in a power-on reset, and H'0000 0020 in a manual reset.
  4649. 2. This is the address when using the virtual/physical address space P4 area. When
  4650. making an access from physical address space area 7 using the TLB, the upper 3 bits
  4651. of the address are ignored.
  4652.  
  4653. 83
  4654.  
  4655. ----------------------- Page 100-----------------------
  4656.  
  4657. 5 . 2 Register Descriptions
  4658.  
  4659. There are three registers related to exception handling. These are allocated to memory, and can be
  4660. accessed by specifying the P4 address or area 7 address.
  4661.  
  4662. 1. The exception event register (EXPEVT) resides at P4 address H'FF00 0024, and contains a 12-
  4663. bit exception code. The exception code set in EXPEVT is that for a reset or general exception
  4664. event. The exception code is set automatically by hardware when an exception occurs.
  4665. EXPEVT can also be modified by software.
  4666.  
  4667. 2. The interrupt event register (INTEVT) resides at P4 address H'FF00 0028, and contains a 12-bit
  4668. exception code. The exception code set in INTEVT is that for an interrupt request. The
  4669. exception code is set automatically by hardware when an exception occurs. INTEVT can also be
  4670. modified by software.
  4671.  
  4672. 3. The TRAPA exception register (TRA) resides at P4 address H'FF00 0020, and contains 8-bit
  4673. immediate data (imm) for the TRAPA instruction. TRA is set automatically by hardware when
  4674. a TRAPA instruction is executed. TRA can also be modified by software.
  4675.  
  4676. The bit configurations of EXPEVT, INTEVT, and TRA are shown in figure 5.1.
  4677.  
  4678. EXPEVT and INTEVT
  4679.  
  4680. 31 12 11 0
  4681.  
  4682. 0 0 Exception code
  4683.  
  4684. TRA
  4685.  
  4686. 31 10 9 2 1 0
  4687.  
  4688. 0 0 imm 0 0
  4689.  
  4690. 0: Reserved bits. These bits are always read as 0, and should only be written
  4691. with 0.
  4692. imm: 8-bit immediate data of the TRAPA instruction
  4693.  
  4694. Figure 5.1 Register Bit Configurations
  4695.  
  4696. 84
  4697.  
  4698. ----------------------- Page 101-----------------------
  4699.  
  4700. 5 . 3 Exception Handling Functions
  4701.  
  4702. 5 . 3 . 1 Exception Handling Flow
  4703.  
  4704. In exception handling, the contents of the program counter (PC) and status register (SR) are saved
  4705. in the saved program counter (SPC) and saved status register (SSR), and the CPU starts execution
  4706. of the appropriate exception handling routine according to the vector address. An exception
  4707. handling routine is a program written by the user to handle a specific exception. The exception
  4708. handling routine is terminated and control returned to the original program by executing a return-
  4709. from-exception instruction (RTE). This instruction restores the PC and SR contents and returns
  4710. control to the normal processing routine at the point at which the exception occurred.
  4711.  
  4712. The basic processing flow is as follows. See section 2, Data Formats and Registers, for the
  4713. meaning of the individual SR bits.
  4714.  
  4715. 1. The PC and SR contents are saved in SPC and SSR.
  4716.  
  4717. 2. The block bit (BL) in SR is set to 1.
  4718.  
  4719. 3. The mode bit (MD) in SR is set to 1.
  4720.  
  4721. 4. The register bank bit (RB) in SR is set to 1.
  4722.  
  4723. 5. In a reset, the FPU disable bit (FD) in SR is cleared to 0.
  4724.  
  4725. 6. The exception code is written to bits 11–0 of the exception event register (EXPEVT) or
  4726. interrupt event register (INTEVT).
  4727.  
  4728. 7. The CPU branches to the determined exception handling vector address, and the exception
  4729. handling routine begins.
  4730.  
  4731. 5 . 3 . 2 Exception Handling Vector Addresses
  4732.  
  4733. The reset vector address is fixed at H'A000 0000. Exception and interrupt vector addresses are
  4734. determined by adding the offset for the specific event to the vector base address, which is set by
  4735. software in the vector base register (VBR). In the case of the TLB miss exception, for example, the
  4736. offset is H'0000 0400, so if H'9C08 0000 is set in VBR, the exception handling vector address
  4737. will be H'9C08 0400. If a further exception occurs at the exception handling vector address, a
  4738. duplicate exception will result, and recovery will be difficult; therefore, fixed physical addresses
  4739. (P1, P2) should be specified for vector addresses.
  4740.  
  4741. 85
  4742.  
  4743. ----------------------- Page 102-----------------------
  4744.  
  4745. 5 . 4 Exception Types and Priorities
  4746.  
  4747. Table 5.2 shows the types of exceptions, with their relative priorities, vector addresses, and
  4748. exception/interrupt codes.
  4749.  
  4750. Table 5.2 Exceptions
  4751.  
  4752. Exception Execution Priority Priority Vector Exception
  4753. Category Mode Exception Level Order Address Offset Code
  4754.  
  4755. Reset Abort type Power-on reset 1 1 H'A000 0000 — H’000
  4756.  
  4757. Manual reset 1 2 H'A000 0000 — H’020
  4758.  
  4759. Hitachi-UDI reset 1 1 H'A000 0000 — H’000
  4760.  
  4761. Instruction TLB multiple-hit 1 3 H'A000 0000 — H’140
  4762. exception
  4763.  
  4764. Data TLB multiple-hit exception 1 4 H'A000 0000 — H’140
  4765.  
  4766. General Re- User break before instruction 2 0 (VBR/DBR) H'100/— H'1E0
  4767. exception execution execution*1
  4768.  
  4769. type
  4770.  
  4771. Instruction address error 2 1 (VBR) H'100 H'0E0
  4772.  
  4773. Instruction TLB miss exception 2 2 (VBR) H'400 H'040
  4774.  
  4775. Instruction TLB protection violation 2 3 (VBR) H'100 H'0A0
  4776. exception
  4777.  
  4778. General illegal instruction 2 4 (VBR) H'100 H'180
  4779. exception
  4780.  
  4781. Slot illegal instruction exception 2 4 (VBR) H'100 H'1A0
  4782.  
  4783. General FPU disable exception 2 4 (VBR) H'100 H'800
  4784.  
  4785. Slot FPU disable exception 2 4 (VBR) H'100 H'820
  4786.  
  4787. Data address error (read) 2 5 (VBR) H'100 H'0E0
  4788.  
  4789. Data address error (write) 2 5 (VBR) H'100 H'100
  4790.  
  4791. Data TLB miss exception (read) 2 6 (VBR) H'400 H'040
  4792.  
  4793. Data TLB miss exception (write) 2 6 (VBR) H'400 H'060
  4794.  
  4795. Data TLB protection 2 7 (VBR) H'100 H'0A0
  4796. violation exception (read)
  4797.  
  4798. Data TLB protection 2 7 (VBR) H'100 H'0C0
  4799. violation exception (write)
  4800.  
  4801. FPU exception 2 8 (VBR) H'100 H'120
  4802.  
  4803. Initial page write exception 2 9 (VBR) H'100 H'080
  4804.  
  4805. Completion Unconditional trap (TRAPA) 2 4 (VBR) H'100 H'160
  4806. type
  4807.  
  4808. User break after instruction 2 10 (VBR/DBR) H'100/— H'1E0
  4809. execution*1
  4810.  
  4811. 86
  4812.  
  4813. ----------------------- Page 103-----------------------
  4814.  
  4815. Table 5.2 Exceptions (cont)
  4816.  
  4817. Exception Execution Priority Priority Vector Exception
  4818. Category Mode Exception Level Order Address Offset Code
  4819.  
  4820. Interrupt Completion Nonmaskable interrupt 3 — (VBR) H'600 H'1C0
  4821. type
  4822.  
  4823. External IRL3–IRL0 0 4 *2 (VBR) H'600 H'200
  4824. interrupts
  4825.  
  4826. 1 H'220
  4827.  
  4828. 2 H'240
  4829.  
  4830. 3 H'260
  4831.  
  4832. 4 H'280
  4833.  
  4834. 5 H'2A0
  4835.  
  4836. 6 H'2C0
  4837.  
  4838. 7 H'2E0
  4839.  
  4840. 8 H'300
  4841.  
  4842. 9 H'320
  4843.  
  4844. A H'340
  4845.  
  4846. B H'360
  4847.  
  4848. C H'380
  4849.  
  4850. D H'3A0
  4851.  
  4852. E H'3C0
  4853.  
  4854. Peripheral TMU0 TUNI0 4 *2 (VBR) H'600 H'400
  4855. module
  4856. interrupt
  4857. (module/
  4858. source)
  4859.  
  4860. TMU1 TUNI1 H'420
  4861.  
  4862. TMU2 TUNI2 H'440
  4863.  
  4864. TICPI2 H'460
  4865.  
  4866. RTC ATI H'480
  4867.  
  4868. PRI H'4A0
  4869.  
  4870. CUI H'4C0
  4871.  
  4872. SCI ERI H'4E0
  4873.  
  4874. RXI H'500
  4875.  
  4876. TXI H'520
  4877.  
  4878. TEI H'540
  4879.  
  4880. WDT ITI H'560
  4881.  
  4882. 87
  4883.  
  4884. ----------------------- Page 104-----------------------
  4885.  
  4886. Table 5.2 Exceptions (cont)
  4887.  
  4888. Exception Execution Priority Priority Vector Exception
  4889. Category Mode Exception Level Order Address Offset Code
  4890.  
  4891. Interrupt Completion Peripheral DMAC DMTE0 4 *2 (VBR) H'600 H'640
  4892. type module
  4893. interrupt
  4894. (module/
  4895. source)
  4896.  
  4897. REF RCMI H'580
  4898.  
  4899. ROVI H'5A0
  4900.  
  4901. Hitachi-UDI Hitachi- H'600
  4902. UDI
  4903.  
  4904. GPIO GPIOI H'620
  4905.  
  4906. DMTE1 H'660
  4907.  
  4908. DMTE2 H'680
  4909.  
  4910. DMTE3 H'6A0
  4911.  
  4912. DMAE H'6C0
  4913.  
  4914. SCIF ERI H'700
  4915.  
  4916. RXI H'720
  4917.  
  4918. BRI H'740
  4919.  
  4920. TXI H'760
  4921.  
  4922. Priority: Priority is first assigned by priority level, then by priority order within each level (the lowest
  4923. number represents the highest priority).
  4924. Exception transition destination: Control passes to H'A000 0000 in a reset, and to [VBR + offset] in
  4925. other cases.
  4926. Exception code: Stored in EXPEVT for a reset or general exception, and in INTEVT for an interrupt.
  4927. IRL: Interrupt request level (pins IRL3–IRL0).
  4928. Module/source: See the sections on the relevant peripheral modules.
  4929.  
  4930. Notes: 1. When BRCR.UBDE = 1, PC = DBR. In other cases, PC = VBR + H'100.
  4931. 2. The priority order of external interrupts and peripheral module interrupts can be set by
  4932. software.
  4933.  
  4934. 5 . 5 Exception Flow
  4935.  
  4936. 5 . 5 . 1 Exception Flow
  4937.  
  4938. Figure 5.2 shows an outline flowchart of the basic operations in instruction execution and
  4939. exception handling. For the sake of clarity, the following description assumes that instructions are
  4940. executed sequentially, one by one. Figure 5.2 shows the relative priority order of the different kinds
  4941. of exceptions (reset/general exception/interrupt). Register settings in the event of an exception are
  4942.  
  4943. 88
  4944.  
  4945. ----------------------- Page 105-----------------------
  4946.  
  4947. shown only for SSR, SPC, EXPEVT/INTEVT, SR, and PC, but other registers may be set
  4948. automatically by hardware, depending on the exception. For details, see section 5.6, Description of
  4949. Exceptions. Also, see section 5.6.4, Priority Order with Multiple Exceptions, for exception
  4950. handling during execution of a delayed branch instruction and a delay slot instruction, and in the
  4951. case of instructions in which two data accesses are performed.
  4952.  
  4953. Reset Yes
  4954. requested?
  4955.  
  4956. No
  4957.  
  4958. Execute next instruction
  4959.  
  4960. General Yes Is highest- Yes
  4961. exception requested? priority exception
  4962. re-exception
  4963. type?
  4964. Cancel instruction execution
  4965. No
  4966. No result
  4967.  
  4968. Interrupt Yes
  4969. requested?
  4970.  
  4971. SSR ← SR EXPEVT ← exception code
  4972. No
  4973. SPC ← PC SR. {MD, RB, BL, FD, IMASK} ← 11101111
  4974. SGR ← R15 PC ← H'A000 0000
  4975. EXPEVT/INTEVT ← exception code
  4976. SR.{MD,RB,BL} ← 111
  4977. PC ← (BRCR.UBDE=1 && User_Break?
  4978. DBR: (VBR + Offset))
  4979.  
  4980. Figure 5.2 Instruction Execution and Exception Handling
  4981.  
  4982. 5 . 5 . 2 Exception Source Acceptance
  4983.  
  4984. A priority ranking is provided for all exceptions for use in determining which of two or more
  4985. simultaneously generated exceptions should be accepted. Five of the general exceptions—the
  4986. general illegal instruction exception, slot illegal instruction exception, general FPU disable
  4987. exception, slot FPU disable exception, and unconditional trap exception—are detected in the
  4988. process of instruction decoding, and do not occur simultaneously in the instruction pipeline. These
  4989. exceptions therefore all have the same priority. General exceptions are detected in the order of
  4990. instruction execution. However, exception handling is performed in the order of instruction flow
  4991. (program order). Thus, an exception for an earlier instruction is accepted before that for a later
  4992. instruction. An example of the order of acceptance for general exceptions is shown in figure 5.3.
  4993.  
  4994. 89
  4995.  
  4996. ----------------------- Page 106-----------------------
  4997.  
  4998. Pipeline flow: TLB miss (data access)
  4999. Instruction n IF ID EX MA WB
  5000. Instruction n+1 IF ID EX MA WB
  5001.  
  5002. General illegal instruction exception
  5003.  
  5004. TLB miss (instruction access)
  5005. Instruction n+2 IF ID EX MA WB
  5006.  
  5007. IF: Instruction fetch
  5008. ID: Instruction decode
  5009. EX: Instruction execution
  5010. Instruction n+3 IF ID EX MA WB
  5011. MA: Memory access
  5012. WB: Write-back
  5013.  
  5014. Order of detection:
  5015.  
  5016. General illegal instruction exception (instruction n+1) and
  5017. TLB miss (instruction n+2) are detected simultaneously
  5018.  
  5019. TLB miss (instruction n)
  5020.  
  5021. Order of exception handling: Program order
  5022.  
  5023. TLB miss (instruction n)
  5024. 1
  5025.  
  5026. Re-execution of instruction n
  5027.  
  5028. General illegal instruction exception
  5029. (instruction n+1)
  5030. 2
  5031.  
  5032. Re-execution of instruction n+1
  5033.  
  5034. TLB miss (instruction n+2)
  5035.  
  5036. 3
  5037.  
  5038. Re-execution of instruction n+2
  5039.  
  5040. Execution of instruction n+3 4
  5041.  
  5042. Figure 5.3 Example of General Exception Acceptance Order
  5043.  
  5044. 90
  5045.  
  5046. ----------------------- Page 107-----------------------
  5047.  
  5048. 5 . 5 . 3 Exception Requests and BL Bit
  5049.  
  5050. When the BL bit in SR is 0, exceptions and interrupts are accepted.
  5051.  
  5052. When the BL bit in SR is 1 and an exception other than a user break is generated, the CPU’s
  5053. internal registers are set to their post-reset state, the registers of the other modules retain their
  5054. contents prior to the exception, and the CPU branches to the same address as in a reset (H'A000
  5055. 0000). For the operation in the event of a user break, see section 20, User Break Controller. If an
  5056. ordinary interrupt occurs, the interrupt request is held pending and is accepted after the BL bit has
  5057. been cleared to 0 by software. If a nonmaskable interrupt (NMI) occurs, it can be held pending or
  5058. accepted according to the setting made by software.
  5059.  
  5060. Thus, normally, SPC and SSR are saved and then the BL bit in SR is cleared to 0, to enable
  5061. multiple exception state acceptance.
  5062.  
  5063. 5 . 5 . 4 Return from Exception Handling
  5064.  
  5065. The RTE instruction is used to return from exception handling. When the RTE instruction is
  5066. executed, the SPC contents are restored to PC and the SSR contents to SR, and the CPU returns
  5067. from the exception handling routine by branching to the SPC address. If SPC and SSR were saved
  5068. to external memory, set the BL bit in SR to 1 before restoring the SPC and SSR contents and
  5069. issuing the RTE instruction.
  5070.  
  5071. 91
  5072.  
  5073. ----------------------- Page 108-----------------------
  5074.  
  5075. 5 . 6 Description of Exceptions
  5076.  
  5077. The various exception handling operations are described here, covering exception sources,
  5078. transition addresses, and processor operation when a transition is made.
  5079.  
  5080. 5 . 6 . 1 Resets
  5081.  
  5082. (1) Power-On Reset
  5083.  
  5084. • Sources:
  5085.  
  5086.  SCK2 pin high level and RESET pin low level
  5087.  
  5088.  When the watchdog timer overflows while the WT/IT bit is set to 1 and the RSTS bit is
  5089. cleared to 0 in WTCSR. For details, see section 10, Clock Oscillation Circuits.
  5090.  
  5091. • Transition address: H'A000 0000
  5092.  
  5093. • Transition operations:
  5094.  
  5095. Exception code H'000 is set in EXPEVT, initialization of VBR and SR is performed, and a
  5096. branch is made to PC = H'A000 0000.
  5097.  
  5098. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  5099. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  5100. set to B'1111.
  5101.  
  5102. CPU and on-chip peripheral module initialization is performed. For details, see the register
  5103. descriptions in the relevant sections. For some CPU functions, the TRST pin and RESET pin
  5104. must be driven low. It is therefore essential to execute a power-on reset and drive theTRST pin
  5105. low when powering on.
  5106.  
  5107. Power_on_reset()
  5108.  
  5109. {
  5110.  
  5111. EXPEVT = H'00000000;
  5112.  
  5113. VBR = H'00000000;
  5114.  
  5115. SR.MD = 1;
  5116.  
  5117. SR.RB = 1;
  5118.  
  5119. SR.BL = 1;
  5120.  
  5121. SR.(I0-I3) = B'1111;
  5122.  
  5123. SR.FD=0;
  5124.  
  5125. Initialize_CPU();
  5126.  
  5127. Initialize_Module(PowerOn);
  5128.  
  5129. PC = H'A0000000;
  5130.  
  5131. }
  5132.  
  5133. 92
  5134.  
  5135. ----------------------- Page 109-----------------------
  5136.  
  5137. (2) Manual Reset
  5138.  
  5139. • Sources:
  5140.  
  5141.  SCK2 pin low level and RESET pin low level
  5142.  
  5143.  When a general exception other than a user break occurs while the BL bit is set to 1 in SR
  5144.  
  5145.  When the watchdog timer overflows while the RSTS bit is set to 1 in WTCSR. For
  5146. details, see section 10, Clock Oscillation Circuits.
  5147.  
  5148. • Transition address: H'A000 0000
  5149.  
  5150. • Transition operations:
  5151.  
  5152. Exception code H'020 is set in EXPEVT, initialization of VBR and SR is performed, and a
  5153. branch is made to PC = H'A000 0000.
  5154.  
  5155. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  5156. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  5157. set to B'1111.
  5158.  
  5159. CPU and on-chip peripheral module initialization is performed. For details, see the register
  5160. descriptions in the relevant sections.
  5161.  
  5162. Manual_reset()
  5163.  
  5164. {
  5165.  
  5166. EXPEVT = H'00000020;
  5167.  
  5168. VBR = H'00000000;
  5169.  
  5170. SR.MD = 1;
  5171.  
  5172. SR.RB = 1;
  5173.  
  5174. SR.BL = 1;
  5175.  
  5176. SR.(I0-I3) = B'1111;
  5177.  
  5178. SR.FD = 0;
  5179.  
  5180. Initialize_CPU();
  5181.  
  5182. Initialize_Module(Manual);
  5183.  
  5184. PC = H'A0000000;
  5185.  
  5186. }
  5187.  
  5188. 93
  5189.  
  5190. ----------------------- Page 110-----------------------
  5191.  
  5192. Table 5-3 Types of Reset
  5193.  
  5194. Reset State Transition
  5195. Conditions Internal States
  5196.  
  5197. On-Chip Peripheral
  5198. Type SCK2 RESET CPU Modules
  5199.  
  5200. Power-on reset High Low Initialized See Register
  5201. Configuration in each
  5202. section
  5203.  
  5204. Manual reset Low Low Initialized
  5205.  
  5206. (3) Hitachi-UDI Reset
  5207.  
  5208. • Source: SDIR.TI3–TI0 = B'0110 (negation) or B'0111 (assertion)
  5209.  
  5210. • Transition address: H'A000 0000
  5211.  
  5212. • Transition operations:
  5213.  
  5214. Exception code H'000 is set in EXPEVT, initialization of VBR and SR is performed, and a
  5215. branch is made to PC = H'A000 0000.
  5216.  
  5217. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  5218. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  5219. set to B'1111.
  5220.  
  5221. CPU and on-chip peripheral module initialization is performed. For details, see the register
  5222. descriptions in the relevant sections.
  5223.  
  5224. Hitachi-UDI_reset()
  5225.  
  5226. {
  5227.  
  5228. EXPEVT = H'00000000;
  5229.  
  5230. VBR = H'00000000;
  5231.  
  5232. SR.MD = 1;
  5233.  
  5234. SR.RB = 1;
  5235.  
  5236. SR.BL = 1;
  5237.  
  5238. SR.(I0-I3) = B'1111;
  5239.  
  5240. SR.FD = 0;
  5241.  
  5242. Initialize_CPU();
  5243.  
  5244. Initialize_Module(PowerOn);
  5245.  
  5246. PC = H'A0000000;
  5247.  
  5248. }
  5249.  
  5250. (4) Instruction TLB Multiple-Hit Exception
  5251.  
  5252. • Source: Multiple ITLB address matches
  5253.  
  5254. 94
  5255.  
  5256. ----------------------- Page 111-----------------------
  5257.  
  5258. • Transition address: H'A000 0000
  5259.  
  5260. • Transition operations:
  5261.  
  5262. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5263. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5264. the ASID when this exception occurred.
  5265.  
  5266. Exception code H'140 is set in EXPEVT, initialization of VBR and SR is performed, and a
  5267. branch is made to PC = H'A000 0000.
  5268.  
  5269. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  5270. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  5271. set to B'1111.
  5272.  
  5273. CPU and on-chip peripheral module initialization is performed in the same way as in a manual
  5274. reset. For details, see the register descriptions in the relevant sections.
  5275.  
  5276. TLB_multi_hit()
  5277.  
  5278. {
  5279.  
  5280. TEA = EXCEPTION_ADDRESS;
  5281.  
  5282. PTEH.VPN = PAGE_NUMBER;
  5283.  
  5284. EXPEVT = H'00000140;
  5285.  
  5286. VBR = H'00000000;
  5287.  
  5288. SR.MD = 1;
  5289.  
  5290. SR.RB = 1;
  5291.  
  5292. SR.BL = 1;
  5293.  
  5294. SR.(I0-I3) = B'1111;
  5295.  
  5296. SR.FD = 0;
  5297.  
  5298. Initialize_CPU();
  5299.  
  5300. Initialize_Module(Manual);
  5301.  
  5302. PC = H'A0000000;
  5303.  
  5304. }
  5305.  
  5306. (5) Operand TLB Multiple-Hit Exception
  5307.  
  5308. • Source: Multiple UTLB address matches
  5309.  
  5310. • Transition address: H'A000 0000
  5311.  
  5312. • Transition operations:
  5313.  
  5314. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5315. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5316. the ASID when this exception occurred.
  5317.  
  5318. Exception code H'140 is set in EXPEVT, initialization of VBR and SR is performed, and a
  5319. branch is made to PC = H'A000 0000.
  5320.  
  5321. 95
  5322.  
  5323. ----------------------- Page 112-----------------------
  5324.  
  5325. In the initialization processing, the VBR register is set to H'0000 0000, and in SR, the MD,
  5326. RB, and BL bits are set to 1, the FD bit is cleared to 0, and the interrupt mask bits (I3–I0) are
  5327. set to B'1111.
  5328.  
  5329. CPU and on-chip peripheral module initialization is performed in the same way as in a manual
  5330. reset. For details, see the register descriptions in the relevant sections.
  5331.  
  5332. TLB_multi_hit()
  5333.  
  5334. {
  5335.  
  5336. TEA = EXCEPTION_ADDRESS;
  5337.  
  5338. PTEH.VPN = PAGE_NUMBER;
  5339.  
  5340. EXPEVT = H'00000140;
  5341.  
  5342. VBR = H'00000000;
  5343.  
  5344. SR.MD = 1;
  5345.  
  5346. SR.RB = 1;
  5347.  
  5348. SR.BL = 1;
  5349.  
  5350. SR.(I0-I3) = B'1111;
  5351.  
  5352. SR.FD = 0;
  5353.  
  5354. Initialize_CPU();
  5355.  
  5356. Initialize_Module(Manual);
  5357.  
  5358. PC = H'A0000000;
  5359.  
  5360. }
  5361.  
  5362. 96
  5363.  
  5364. ----------------------- Page 113-----------------------
  5365.  
  5366. 5 . 6 . 2 General Exceptions
  5367.  
  5368. (1) Data TLB Miss Exception
  5369.  
  5370. • Source: Address mismatch in UTLB address comparison
  5371.  
  5372. • Transition address: VBR + H'0000 0400
  5373.  
  5374. • Transition operations:
  5375.  
  5376. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5377. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5378. the ASID when this exception occurred.
  5379.  
  5380. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5381. and SSR.
  5382.  
  5383. Exception code H'040 (for a read access) or H'060 (for a write access) is set in EXPEVT. The
  5384. BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0400.
  5385.  
  5386. To speed up TLB miss processing, the offset is separate from that of other exceptions.
  5387.  
  5388. Data_TLB_miss_exception()
  5389.  
  5390. {
  5391.  
  5392. TEA = EXCEPTION_ADDRESS;
  5393.  
  5394. PTEH.VPN = PAGE_NUMBER;
  5395.  
  5396. SPC = PC;
  5397.  
  5398. SSR = SR;
  5399.  
  5400. EXPEVT = read_access ? H'00000040 : H'00000060;
  5401.  
  5402. SR.MD = 1;
  5403.  
  5404. SR.RB = 1;
  5405.  
  5406. SR.BL = 1;
  5407.  
  5408. PC = VBR + H'00000400;
  5409.  
  5410. }
  5411.  
  5412. 97
  5413.  
  5414. ----------------------- Page 114-----------------------
  5415.  
  5416. (2) Instruction TLB Miss Exception
  5417.  
  5418. • Source: Address mismatch in ITLB address comparison
  5419.  
  5420. • Transition address: VBR + H'0000 0400
  5421.  
  5422. • Transition operations:
  5423.  
  5424. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5425. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5426. the ASID when this exception occurred.
  5427.  
  5428. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5429. and SSR.
  5430.  
  5431. Exception code H'040 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5432. branch is made to PC = VBR + H'0400.
  5433.  
  5434. To speed up TLB miss processing, the offset is separate from that of other exceptions.
  5435.  
  5436. ITLB_miss_exception()
  5437.  
  5438. {
  5439.  
  5440. TEA = EXCEPTION_ADDRESS;
  5441.  
  5442. PTEH.VPN = PAGE_NUMBER;
  5443.  
  5444. SPC = PC;
  5445.  
  5446. SSR = SR;
  5447.  
  5448. EXPEVT = H'00000040;
  5449.  
  5450. SR.MD = 1;
  5451.  
  5452. SR.RB = 1;
  5453.  
  5454. SR.BL = 1;
  5455.  
  5456. PC = VBR + H'00000400;
  5457.  
  5458. }
  5459.  
  5460. 98
  5461.  
  5462. ----------------------- Page 115-----------------------
  5463.  
  5464. (3) Initial Page Write Exception
  5465.  
  5466. • Source: TLB is hit in a store access, but dirty bit D = 0
  5467.  
  5468. • Transition address: VBR + H'0000 0100
  5469.  
  5470. • Transition operations:
  5471.  
  5472. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5473. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5474. the ASID when this exception occurred.
  5475.  
  5476. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5477. and SSR.
  5478.  
  5479. Exception code H'080 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5480. branch is made to PC = VBR + H'0100.
  5481.  
  5482. Initial_write_exception()
  5483.  
  5484. {
  5485.  
  5486. TEA = EXCEPTION_ADDRESS;
  5487.  
  5488. PTEH.VPN = PAGE_NUMBER;
  5489.  
  5490. SPC = PC;
  5491.  
  5492. SSR = SR;
  5493.  
  5494. EXPEVT = H'00000080;
  5495.  
  5496. SR.MD = 1;
  5497.  
  5498. SR.RB = 1;
  5499.  
  5500. SR.BL = 1;
  5501.  
  5502. PC = VBR + H'00000100;
  5503.  
  5504. }
  5505.  
  5506. 99
  5507.  
  5508. ----------------------- Page 116-----------------------
  5509.  
  5510. (4) Data TLB Protection Violation Exception
  5511.  
  5512. • Source: The access does not accord with the UTLB protection information (PR bits) shown
  5513. below.
  5514.  
  5515. P R Privileged Mode User Mode
  5516.  
  5517. 00 Only read access possible Access not possible
  5518.  
  5519. 01 Read/write access possible Access not possible
  5520.  
  5521. 10 Only read access possible Only read access possible
  5522.  
  5523. 11 Read/write access possible Read/write access possible
  5524.  
  5525. • Transition address: VBR + H'0000 0100
  5526.  
  5527. • Transition operations:
  5528.  
  5529. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5530. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5531. the ASID when this exception occurred.
  5532.  
  5533. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5534. and SSR.
  5535.  
  5536. Exception code H'0A0 (for a read access) or H'0C0 (for a write access) is set in EXPEVT. The
  5537. BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0100.
  5538.  
  5539. Data_TLB_protection_violation_exception()
  5540.  
  5541. {
  5542.  
  5543. TEA = EXCEPTION_ADDRESS;
  5544.  
  5545. PTEH.VPN = PAGE_NUMBER;
  5546.  
  5547. SPC = PC;
  5548.  
  5549. SSR = SR;
  5550.  
  5551. EXPEVT = read_access ? H'000000A0 : H'000000C0;
  5552.  
  5553. SR.MD = 1;
  5554.  
  5555. SR.RB = 1;
  5556.  
  5557. SR.BL = 1;
  5558.  
  5559. PC = VBR + H'00000100;
  5560.  
  5561. }
  5562.  
  5563. 100
  5564.  
  5565. ----------------------- Page 117-----------------------
  5566.  
  5567. (5) Instruction TLB Protection Violation Exception
  5568.  
  5569. • Source: The access does not accord with the ITLB protection information (PR bits) shown
  5570. below.
  5571.  
  5572. P R Privileged Mode User Mode
  5573.  
  5574. 0 Access possible Access not possible
  5575.  
  5576. 1 Access possible Access possible
  5577.  
  5578. • Transition address: VBR + H'0000 0100
  5579.  
  5580. • Transition operations:
  5581.  
  5582. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5583. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5584. the ASID when this exception occurred.
  5585.  
  5586. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5587. and SSR.
  5588.  
  5589. Exception code H'0A0 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5590. branch is made to PC = VBR + H'0100.
  5591.  
  5592. ITLB_protection_violation_exception()
  5593.  
  5594. {
  5595.  
  5596. TEA = EXCEPTION_ADDRESS;
  5597.  
  5598. PTEH.VPN = PAGE_NUMBER;
  5599.  
  5600. SPC = PC;
  5601.  
  5602. SSR = SR;
  5603.  
  5604. EXPEVT = H'000000A0;
  5605.  
  5606. SR.MD = 1;
  5607.  
  5608. SR.RB = 1;
  5609.  
  5610. SR.BL = 1;
  5611.  
  5612. PC = VBR + H'00000100;
  5613.  
  5614. }
  5615.  
  5616. 101
  5617.  
  5618. ----------------------- Page 118-----------------------
  5619.  
  5620. (6) Data Address Error
  5621.  
  5622. • Sources:
  5623.  
  5624.  Word data access from other than a word boundary (2n +1)
  5625.  
  5626.  Longword data access from other than a longword data boundary (4n +1, 4n + 2, or 4n +3)
  5627.  
  5628.  Quadword data access from other than a quadword data boundary (8n +1, 8n + 2, 8n +3, 8n
  5629. + 4, 8n + 5, 8n + 6, or 8n + 7)
  5630.  
  5631.  Access to area H'8000 0000–H'FFFF FFFF in user mode
  5632.  
  5633. • Transition address: VBR + H'0000 0100
  5634.  
  5635. • Transition operations:
  5636.  
  5637. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5638. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5639. the ASID when this exception occurred.
  5640.  
  5641. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5642. and SSR.
  5643.  
  5644. Exception code H'0E0 (for a read access) or H'100 (for a write access) is set in EXPEVT. The
  5645. BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0100. For
  5646. details, see section 3, Memory Management Unit (MMU).
  5647.  
  5648. Data_address_error()
  5649.  
  5650. {
  5651.  
  5652. TEA = EXCEPTION_ADDRESS;
  5653.  
  5654. PTEN.VPN = PAGE_NUMBER;
  5655.  
  5656. SPC = PC;
  5657.  
  5658. SSR = SR;
  5659.  
  5660. EXPEVT = read_access? H'000000E0: H'00000100;
  5661.  
  5662. SR.MD = 1;
  5663.  
  5664. SR.RB = 1;
  5665.  
  5666. SR.BL = 1;
  5667.  
  5668. PC = VBR + H'00000100;
  5669.  
  5670. }
  5671.  
  5672. 102
  5673.  
  5674. ----------------------- Page 119-----------------------
  5675.  
  5676. (7) Instruction Address Error
  5677.  
  5678. • Sources:
  5679.  
  5680.  Instruction fetch from other than a word boundary (2n +1)
  5681.  
  5682.  Instruction fetch from area H'8000 0000–H'FFFF FFFF in user mode
  5683.  
  5684. • Transition address: VBR + H'0000 0100
  5685.  
  5686. • Transition operations:
  5687.  
  5688. The virtual address (32 bits) at which this exception occurred is set in TEA, and the
  5689. corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates
  5690. the ASID when this exception occurred.
  5691.  
  5692. The PC and SR contents for the instruction at which this exception occurred are saved in the
  5693. SPC and SSR.
  5694.  
  5695. Exception code H'0E0 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5696. branch is made to PC = VBR + H'0100. For details, see section 3, Memory Management Unit
  5697. (MMU).
  5698.  
  5699. Instruction_address_error()
  5700.  
  5701. {
  5702.  
  5703. TEA = EXCEPTION_ADDRESS;
  5704.  
  5705. PTEN.VPN = PAGE_NUMBER;
  5706.  
  5707. SPC = PC;
  5708.  
  5709. SSR = SR;
  5710.  
  5711. EXPEVT = H'000000E0;
  5712.  
  5713. SR.MD = 1;
  5714.  
  5715. SR.RB = 1;
  5716.  
  5717. SR.BL = 1;
  5718.  
  5719. PC = VBR + H'00000100;
  5720.  
  5721. }
  5722.  
  5723. 103
  5724.  
  5725. ----------------------- Page 120-----------------------
  5726.  
  5727. (8) Unconditional Trap
  5728.  
  5729. • Source: Execution of TRAPA instruction
  5730.  
  5731. • Transition address: VBR + H'0000 0100
  5732.  
  5733. • Transition operations:
  5734.  
  5735. As this is a processing-completion-type exception, the PC contents for the instruction
  5736. following the TRAPA instruction are saved in SPC. The value of SR when the TRAPA
  5737. instruction is executed are saved in SSR. The 8-bit immediate value in the TRAPA instruction
  5738. is multiplied by 4, and the result is set in TRA [9]. Exception code H'160 is set in EXPEVT.
  5739. The BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0100.
  5740.  
  5741. TRAPA_exception()
  5742.  
  5743. {
  5744.  
  5745. SPC = PC + 2;
  5746.  
  5747. SSR = SR;
  5748.  
  5749. TRA = imm << 2;
  5750.  
  5751. EXPEVT = H'00000160;
  5752.  
  5753. SR.MD = 1;
  5754.  
  5755. SR.RB = 1;
  5756.  
  5757. SR.BL = 1;
  5758.  
  5759. PC = VBR + H'00000100;
  5760.  
  5761. }
  5762.  
  5763. 104
  5764.  
  5765. ----------------------- Page 121-----------------------
  5766.  
  5767. (9) General Illegal Instruction Exception
  5768.  
  5769. • Sources:
  5770.  
  5771.  Decoding of an undefined instruction not in a delay slot
  5772.  
  5773. Delayed branch instructions: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT/S,
  5774. BF/S
  5775.  
  5776. Undefined instruction: H'FFFD
  5777.  
  5778.  Decoding in user mode of a privileged instruction not in a delay slot
  5779.  
  5780. Privileged instructions: LDC, STC, RTE, LDTLB, SLEEP, but excluding LDC/STC
  5781. instructions that access GBR
  5782.  
  5783. • Transition address: VBR + H'0000 0100
  5784.  
  5785. • Transition operations:
  5786.  
  5787. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5788. and SSR.
  5789.  
  5790. Exception code H'180 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5791. branch is made to PC = VBR + H'0100. Operation is not guaranteed if an undefined code other
  5792. than H'FFFD is decoded.
  5793.  
  5794. General_illegal_instruction_exception()
  5795.  
  5796. {
  5797.  
  5798. SPC = PC;
  5799.  
  5800. SSR = SR;
  5801.  
  5802. EXPEVT = H'00000180;
  5803.  
  5804. SR.MD = 1;
  5805.  
  5806. SR.RB = 1;
  5807.  
  5808. SR.BL = 1;
  5809.  
  5810. PC = VBR + H'00000100;
  5811.  
  5812. }
  5813.  
  5814. 105
  5815.  
  5816. ----------------------- Page 122-----------------------
  5817.  
  5818. (10) Slot Illegal Instruction Exception
  5819.  
  5820. • Sources:
  5821.  
  5822.  Decoding of an undefined instruction in a delay slot
  5823.  
  5824. Delayed branch instructions: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT/S,
  5825. BF/S
  5826.  
  5827. Undefined instruction: H'FFFD
  5828.  
  5829.  Decoding of an instruction that modifies PC in a delay slot
  5830.  
  5831. Instructions that modify PC: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT, BF,
  5832. BT/S, BF/S, TRAPA, LDC Rm, SR, LDC.L @Rm+, SR
  5833.  
  5834.  Decoding in user mode of a privileged instruction in a delay slot
  5835.  
  5836. Privileged instructions: LDC, STC, RTE, LDTLB, SLEEP, but excluding LDC/STC
  5837. instructions that access GBR
  5838.  
  5839.  Decoding of a PC-relative MOV instruction or MOVA instruction in a delay slot
  5840.  
  5841. • Transition address: VBR + H'0000 0100
  5842.  
  5843. • Transition operations:
  5844.  
  5845. The PC contents for the preceding delayed branch instruction are saved in SPC. The SR
  5846. contents when this exception occurred are saved in SSR.
  5847.  
  5848. Exception code H'1A0 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5849. branch is made to PC = VBR + H'0100. Operation is not guaranteed if an undefined code other
  5850. than H'FFFD is decoded.
  5851.  
  5852. Slot_illegal_instruction_exception()
  5853.  
  5854. {
  5855.  
  5856. SPC = PC - 2;
  5857.  
  5858. SSR = SR;
  5859.  
  5860. EXPEVT = H'000001A0;
  5861.  
  5862. SR.MD = 1;
  5863.  
  5864. SR.RB = 1;
  5865.  
  5866. SR.BL = 1;
  5867.  
  5868. PC = VBR + H'00000100;
  5869.  
  5870. }
  5871.  
  5872. 106
  5873.  
  5874. ----------------------- Page 123-----------------------
  5875.  
  5876. (11) General FPU Disable Exception
  5877.  
  5878. • Source: Decoding of an FPU instruction* not in a delay slot with SR.FD =1
  5879.  
  5880. • Transition address: VBR + H'0000 0100
  5881.  
  5882. • Transition operations:
  5883.  
  5884. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  5885. and SSR.
  5886.  
  5887. Exception code H'800 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5888. branch is made to PC = VBR + H'0100.
  5889.  
  5890. Note: * FPU instructions are instructions in which the first 4 bits of the instruction code
  5891. are F (but excluding undefined instruction H'FFFD), and the LDS, STS, LDS.L, and
  5892. STS.L instructions corresponding to FPUL and FPSCR.
  5893.  
  5894. General_fpu_disable_exception()
  5895.  
  5896. {
  5897.  
  5898. SPC = PC;
  5899.  
  5900. SSR = SR;
  5901.  
  5902. EXPEVT = H'00000800;
  5903.  
  5904. SR.MD = 1;
  5905.  
  5906. SR.RB = 1;
  5907.  
  5908. SR.BL = 1;
  5909.  
  5910. PC = VBR + H'00000100;
  5911.  
  5912. }
  5913.  
  5914. 107
  5915.  
  5916. ----------------------- Page 124-----------------------
  5917.  
  5918. (12) Slot FPU Disable Exception
  5919.  
  5920. • Source: Decoding of an FPU instruction in a delay slot with SR.FD =1
  5921.  
  5922. • Transition address: VBR + H'0000 0100
  5923.  
  5924. • Transition operations:
  5925.  
  5926. The PC contents for the preceding delayed branch instruction are saved in SPC. The SR
  5927. contents when this exception occurred are saved in SSR.
  5928.  
  5929. Exception code H'820 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  5930. branch is made to PC = VBR + H'0100.
  5931.  
  5932. Slot_fpu_disable_exception()
  5933.  
  5934. {
  5935.  
  5936. SPC = PC - 2;
  5937.  
  5938. SSR = SR;
  5939.  
  5940. EXPEVT = H'00000820;
  5941.  
  5942. SR.MD = 1;
  5943.  
  5944. SR.RB = 1;
  5945.  
  5946. SR.BL = 1;
  5947.  
  5948. PC = VBR + H'00000100;
  5949.  
  5950. }
  5951.  
  5952. 108
  5953.  
  5954. ----------------------- Page 125-----------------------
  5955.  
  5956. (13) User Breakpoint Trap
  5957.  
  5958. • Source: Fulfilling of a break condition set in the user break controller
  5959.  
  5960. • Transition address: VBR + H'0000 0100, or DBR
  5961.  
  5962. • Transition operations:
  5963.  
  5964. In the case of a post-execution break, the PC contents for the instruction following the
  5965. instruction at which the breakpoint is set are set in SPC. In the case of a pre-execution break,
  5966. the PC contents for the instruction at which the breakpoint is set are set in SPC.
  5967.  
  5968. The SR contents when the break occurred are saved in SSR. Exception code H'1E0 is set in
  5969. EXPEVT.
  5970.  
  5971. The BL, MD, and RB bits are set to 1 in SR, and a branch is made to PC = VBR + H'0100. It
  5972. is also possible to branch to PC = DBR.
  5973.  
  5974. For details of PC, etc., when a data break is set, see section 20, User Break Controller.
  5975.  
  5976. User_break_exception()
  5977.  
  5978. {
  5979.  
  5980. SPC = (pre_execution break? PC : PC + 2);
  5981.  
  5982. SSR = SR;
  5983.  
  5984. EXPEVT = H'000001E0;
  5985.  
  5986. SR.MD = 1;
  5987.  
  5988. SR.RB = 1;
  5989.  
  5990. SR.BL = 1;
  5991.  
  5992. PC = (BRCR.UBDE==1 ? DBR : VBR + H’00000100);
  5993.  
  5994. }
  5995.  
  5996. 109
  5997.  
  5998. ----------------------- Page 126-----------------------
  5999.  
  6000. (14) FPU Exception
  6001.  
  6002. • Source: Exception due to execution of a floating-point operation
  6003.  
  6004. • Transition address: VBR + H'0000 0100
  6005.  
  6006. • Transition operations:
  6007.  
  6008. The PC and SR contents for the instruction at which this exception occurred are saved in SPC
  6009. and SSR. Exception code H'120 is set in EXPEVT. The BL, MD, and RB bits are set to 1 in
  6010. SR, and a branch is made to PC = VBR + H'0100.
  6011.  
  6012. FPU_exception()
  6013.  
  6014. {
  6015.  
  6016. SPC = PC;
  6017.  
  6018. SSR = SR;
  6019.  
  6020. EXPEVT = H'00000120;
  6021.  
  6022. SR.MD = 1;
  6023.  
  6024. SR.RB = 1;
  6025.  
  6026. SR.BL = 1;
  6027.  
  6028. PC = VBR + H'00000100;
  6029.  
  6030. }
  6031.  
  6032. 110
  6033.  
  6034. ----------------------- Page 127-----------------------
  6035.  
  6036. 5 . 6 . 3 Interrupts
  6037.  
  6038. (1) NMI
  6039.  
  6040. • Source: NMI pin edge detection
  6041.  
  6042. • Transition address: VBR + H'0000 0600
  6043.  
  6044. • Transition operations:
  6045.  
  6046. The PC and SR contents for the instruction at which this exception is accepted are saved in
  6047. SPC and SSR.
  6048.  
  6049. Exception code H'1C0 is set in INTEVT. The BL, MD, and RB bits are set to 1 in SR, and a
  6050. branch is made to PC = VBR + H'0600. When the BL bit in SR is 0, this interrupt is not
  6051. masked by the interrupt mask bits in SR, and is accepted at the highest priority level. When
  6052. the BL bit in SR is 1, a software setting can specify whether this interrupt is to be masked or
  6053. accepted. For details, see section 19, Interrupt Controller.
  6054.  
  6055. NMI()
  6056.  
  6057. {
  6058.  
  6059. SPC = PC;
  6060.  
  6061. SSR = SR;
  6062.  
  6063. INTEVT = H'000001C0;
  6064.  
  6065. SR.MD = 1;
  6066.  
  6067. SR.RB = 1;
  6068.  
  6069. SR.BL = 1;
  6070.  
  6071. PC = VBR + H'00000600;
  6072.  
  6073. }
  6074.  
  6075. 111
  6076.  
  6077. ----------------------- Page 128-----------------------
  6078.  
  6079. (2) IRL Interrupts
  6080.  
  6081. • Source: The interrupt mask bit setting in SR is smaller than the IRL (3–0) level, and the BL
  6082. bit in SR is 0 (accepted at instruction boundary).
  6083.  
  6084. • Transition address: VBR + H'0000 0600
  6085.  
  6086. • Transition operations:
  6087.  
  6088. The PC contents immediately after the instruction at which the interrupt is accepted are set in
  6089. SPC. The SR contents at the time of acceptance are set in SSR.
  6090.  
  6091. The code corresponding to the IRL (3–0) level is set in INTEVT. See table 19.5, Interrupt
  6092. Exception Handling Sources and Priority Order, for the corresponding codes. The BL, MD, and
  6093. RB bits are set to 1 in SR, and a branch is made to VBR + H'0600. The acceptance level is not
  6094. set in the interrupt mask bits in SR. When the BL bit in SR is 1, the interrupt is masked. For
  6095. details, see section 19, Interrupt Controller.
  6096.  
  6097. IRL()
  6098.  
  6099. {
  6100.  
  6101. SPC = PC;
  6102.  
  6103. SSR = SR;
  6104.  
  6105. INTEVT = H'00000200 ~ H'000003C0;
  6106.  
  6107. SR.MD = 1;
  6108.  
  6109. SR.RB = 1;
  6110.  
  6111. SR.BL = 1;
  6112.  
  6113. PC = VBR + H'00000600;
  6114.  
  6115. }
  6116.  
  6117. 112
  6118.  
  6119. ----------------------- Page 129-----------------------
  6120.  
  6121. (3) Peripheral Module Interrupts
  6122.  
  6123. • Source: The interrupt mask bit setting in SR is smaller than the peripheral module (Hitachi-
  6124. UDI, GPIO, DMAC, TMU, RTC, SCI, SCIF, WDT, or REF) interrupt level, and the BL bit
  6125. in SR is 0 (accepted at instruction boundary).
  6126.  
  6127. • Transition address: VBR + H'0000 0600
  6128.  
  6129. • Transition operations:
  6130.  
  6131. The PC contents immediately after the instruction at which the interrupt is accepted are set in
  6132. SPC. The SR contents at the time of acceptance are set in SSR.
  6133.  
  6134. The code corresponding to the interrupt source is set in INTEVT. The BL, MD, and RB bits are
  6135. set to 1 in SR, and a branch is made to VBR + H'0600. The module interrupt levels should be
  6136. set as values between B'0000 and B'1111 in the interrupt priority registers (IPRA–IPRC) in the
  6137. interrupt controller. For details, see section 19, Interrupt Controller.
  6138.  
  6139. Module_interruption()
  6140.  
  6141. {
  6142.  
  6143. SPC = PC;
  6144.  
  6145. SSR = SR;
  6146.  
  6147. INTEVT = H'00000400 ~ H'00000760;
  6148.  
  6149. SR.MD = 1;
  6150.  
  6151. SR.RB = 1;
  6152.  
  6153. SR.BL = 1;
  6154.  
  6155. PC = VBR + H'00000600;
  6156.  
  6157. }
  6158.  
  6159. 113
  6160.  
  6161. ----------------------- Page 130-----------------------
  6162.  
  6163. 5 . 6 . 4 Priority Order with Multiple Exceptions
  6164.  
  6165. With some instructions, such as instructions that make two accesses to memory, and the
  6166. indivisible pair comprising a delayed branch instruction and delay slot instruction, multiple
  6167. exceptions occur. Care is required in these cases, as the exception priority order differs from the
  6168. normal order.
  6169.  
  6170. 1. Instructions that make two accesses to memory
  6171.  
  6172. With MAC instructions, memory-to-memory arithmetic/logic instructions, and TAS
  6173. instructions, two data transfers are performed by a single instruction, and an exception will be
  6174. detected for each of these data transfers. In these cases, therefore, the following order is used to
  6175. determine priority.
  6176.  
  6177. a. Data address error in first data transfer
  6178.  
  6179. b. TLB miss in first data transfer
  6180.  
  6181. c. TLB protection violation in first data transfer
  6182.  
  6183. d. Initial page write exception in first data transfer
  6184.  
  6185. e. Data address error in second data transfer
  6186.  
  6187. f. TLB miss in second data transfer
  6188.  
  6189. g. TLB protection violation in second data transfer
  6190.  
  6191. h. Initial page write exception in second data transfer
  6192.  
  6193. 2. Indivisible delayed branch instruction and delay slot instruction
  6194.  
  6195. As a delayed branch instruction and its associated delay slot instruction are indivisible, they are
  6196. treated as a single instruction. Consequently, the priority order for exceptions that occur in
  6197. these instructions differs from the usual priority order. The priority order shown below is for
  6198. the case where the delay slot instruction has only one data transfer.
  6199.  
  6200. a. The delayed branch instruction is checked for priority levels 1 and 2.
  6201.  
  6202. b. The delay slot instruction is checked for priority levels 1 and 2.
  6203.  
  6204. c. A check is performed for priority level 3 in the delayed branch instruction and priority level
  6205. 3 in the delay slot instruction. (There is no priority ranking between these two.)
  6206.  
  6207. d. A check is performed for priority level 4 in the delayed branch instruction and priority level
  6208. 4 in the delay slot instruction. (There is no priority ranking between these two.)
  6209.  
  6210. If the delay slot instruction has a second data transfer, two checks are performed in step b, as in
  6211. 1 above.
  6212.  
  6213. If the accepted exception (the highest-priority exception) is a delay slot instruction re-execution
  6214. type exception, the branch instruction PR register write operation (PC → PR operation
  6215. performed in BSR, BSRF, JSR) is inhibited.
  6216.  
  6217. 114
  6218.  
  6219. ----------------------- Page 131-----------------------
  6220.  
  6221. 5 . 7 Usage Notes
  6222.  
  6223. 1. Return from exception handling
  6224.  
  6225. a. Check the BL bit in SR with software. If SPC and SSR have been saved to external
  6226. memory, set the BL bit in SR to 1 before restoring them.
  6227.  
  6228. b. Issue an RTE instruction. When RTE is executed, the SPC contents are set in PC, the
  6229. SSR contents are set in SR, and branch is made to the SPC address to return from the
  6230. exception handling routine.
  6231.  
  6232. 2. If an exception or interrupt occurs when SR.BL = 1
  6233.  
  6234. a. Exception
  6235.  
  6236. When an exception other than a user break occurs, the CPU’s internal registers are set to
  6237. their post-reset state, the registers of the other modules retain their contents prior to the
  6238. exception, and the CPU branches to the same address as in a reset (H'A000 0000). The
  6239. value in EXPEVT at this time is H'0000 0020; the value of the SPC and SSR registers is
  6240. undefined.
  6241.  
  6242. b. Interrupt
  6243.  
  6244. If an ordinary interrupt occurs, the interrupt request is held pending and is accepted after the
  6245. BL bit in SR has been cleared to 0 by software. If a nonmaskable interrupt (NMI) occurs, it
  6246. can be held pending or accepted according to the setting made by software. In the sleep or
  6247. standby state, however, an interrupt is accepted even if the BL bit in SR is set to 1.
  6248.  
  6249. 3. SPC when an exception occurs
  6250.  
  6251. a. Re-execution type exception
  6252.  
  6253. The PC value for the instruction in which the exception occurred is set in SPC, and the
  6254. instruction is re-executed after returning from exception handling. If an exception occurs in
  6255. a delay slot instruction, however, the PC value for the delay slot instruction is saved in
  6256. SPC regardless of whether or not the preceding delay slot instruction condition is satisfied.
  6257. b. Completion type exception or interrupt
  6258.  
  6259. The PC value for the instruction following that in which the exception occurred is set in
  6260. SPC. If an exception occurs in a branch instruction with delay slot, however, the PC value
  6261. for the branch destination is saved in SPC.
  6262.  
  6263. An exception must not be generated in an RTE instruction delay slot, as the operation will be
  6264. undefined in this case.
  6265.  
  6266. 5 . 8 Restrictions
  6267.  
  6268. 1. Restrictions on first instruction of exception handling routine
  6269.  
  6270.  Do not locate a BT, BF, BT/S, BF/S, BRA, or BSR instruction at address VBR + H'100,
  6271. VBR + H'400, or VBR + H'600.
  6272.  
  6273. 115
  6274.  
  6275. ----------------------- Page 132-----------------------
  6276.  
  6277.  When the UBDE bit in the BRCR register is set to 1 and the user break debug support
  6278. function* is used, do not locate a BT, BF, BT/S, BF/S, BRA, or BSR instruction at the
  6279. address indicated by the DBR register.
  6280.  
  6281. Note: * See section 20.4.
  6282.  
  6283. 116
  6284.  
  6285. ----------------------- Page 133-----------------------
  6286.  
  6287. Section 6 Floating-Point Unit
  6288.  
  6289. 6 . 1 Overview
  6290.  
  6291. The floating-point unit (FPU) has the following features:
  6292.  
  6293. • Conforms to IEEE754 standard
  6294.  
  6295. • 32 single-precision floating-point registers (can also be referenced as 16 double-precision
  6296. registers)
  6297.  
  6298. • Two rounding modes: Round to Nearest and Round to Zero
  6299.  
  6300. • Two denormalization modes: Flush to Zero and Treat Denormalized Number
  6301.  
  6302. • Six exception sources: FPU Error, Invalid Operation, Divide By Zero, Overflow, Underflow,
  6303. and Inexact
  6304.  
  6305. • Comprehensive instructions: Single-precision, double-precision, graphics support, system
  6306. control
  6307.  
  6308. When the FD bit in SR is set to 1, the FPU cannot be used, and an attempt to execute an FPU
  6309. instruction will cause an FPU disable exception.
  6310.  
  6311. 6 . 2 Data Formats
  6312.  
  6313. 6 . 2 . 1 Floating-Point Format
  6314.  
  6315. A floating-point number consists of the following three fields:
  6316.  
  6317. • Sign (s)
  6318.  
  6319. • Exponent (e)
  6320.  
  6321. • Fraction (f)
  6322.  
  6323. The SH7750 can handle single-precision and double-precision floating-point numbers, using the
  6324. formats shown in figures 6.1 and 6.2.
  6325.  
  6326. 31 30 23 22 0
  6327.  
  6328. s e f
  6329.  
  6330. Figure 6.1 Format of Single-Precision Floating-Point Number
  6331.  
  6332. 117
  6333.  
  6334. ----------------------- Page 134-----------------------
  6335.  
  6336. 63 62 52 51 0
  6337.  
  6338. s e f
  6339.  
  6340. Figure 6.2 Format of Double-Precision Floating-Point Number
  6341.  
  6342. The exponent is expressed in biased form, as follows:
  6343.  
  6344. e = E + bias
  6345.  
  6346. The range of unbiased exponent E is Emin – 1 to Emax + 1. The two values Emin – 1 and Emax + 1
  6347. are distinguished as follows. Emin – 1 indicates zero (both positive and negative sign) and a
  6348. denormalized number, and Emax + 1 indicates positive or negative infinity or a non-number (NaN).
  6349. Table 6.1 shows bias, Emin , and Emax values.
  6350.  
  6351. Table 6.1 Floating-Point Number Formats and Parameters
  6352.  
  6353. Parameter Single-Precision Double-Precision
  6354.  
  6355. Total bit width 32 bits 64 bits
  6356.  
  6357. Sign bit 1 bit 1 bit
  6358.  
  6359. Exponent field 8 bits 11 bits
  6360.  
  6361. Fraction field 23 bits 52 bits
  6362.  
  6363. Precision 24 bits 53 bits
  6364.  
  6365. Bias +127 +1023
  6366.  
  6367. E +127 +1023
  6368. max
  6369.  
  6370. E –126 –1022
  6371. min
  6372.  
  6373. Floating-point number value v is determined as follows:
  6374.  
  6375. If E = Emax + 1 and f ≠ 0, v is a non-number (NaN) irrespective of sign s
  6376.  
  6377. s
  6378. If E = Emax + 1 and f = 0, v = (–1) (infinity) [positive or negative infinity]
  6379.  
  6380. s E
  6381. If Emin ≤ E ≤ Emax , v = (–1) 2 (1.f) [normalized number]
  6382.  
  6383. s Emin
  6384. If E = Emin – 1 and f ≠ 0, v = (–1) 2 (0.f) [denormalized number]
  6385.  
  6386. s
  6387. If E = Emin – 1 and f = 0, v = (–1) 0 [positive or negative zero]
  6388.  
  6389. Table 6.2 shows the ranges of the various numbers in hexadecimal notation.
  6390.  
  6391. 118
  6392.  
  6393. ----------------------- Page 135-----------------------
  6394.  
  6395. Table 6.2 Floating-Point Ranges
  6396.  
  6397. Type Single-Precision Double-Precision
  6398.  
  6399. Signaling non-number H'7FFFFFFF to H'7FC00000 H'7FFFFFFF H'FFFFFFFF to
  6400. H'7FF80000 H'00000000
  6401.  
  6402. Quiet non-number H'7FBFFFFF to H'7F800001 H'7FF7FFFF H'FFFFFFFF to
  6403. H'7FF00000 H'00000001
  6404.  
  6405. Positive infinity H'7F800000 H'7FF00000 H'00000
  6406.  
  6407. Positive normalized H'7F7FFFFF to H'00800000 H'7FEFFFFF H'FFFFFFFF to
  6408. number H'00100000 H'00000000
  6409.  
  6410. Positive denormalized H'007FFFFF to H'00000001 H'000FFFFF H'FFFFFFFF to
  6411. number H'00000000 H'00000001
  6412.  
  6413. Positive zero H'00000000 H'00000000 H'00000000
  6414.  
  6415. Negative zero H'80000000 H'80000000 H'00000000
  6416.  
  6417. Negative denormalized numberH'80000001 to H'807FFFFF H'80000000 H'00000001 to
  6418. H'800FFFFF H'FFFFFFFF
  6419.  
  6420. Negative normalized H'80800000 to H'FF7FFFFF H'80100000 H'00000000 to
  6421. number H'FFEFFFFF H'FFFFFFFF
  6422.  
  6423. Negative infinity H'FF800000 H'FFF00000 H'00000000
  6424.  
  6425. Quiet non-number H'FF800001 to H'FFBFFFFF H'FFF00000 H'00000001 to
  6426. H'FFF7FFFF H'FFFFFFFF
  6427.  
  6428. Signaling non-number H'FFC00000 to H'FFFFFFFF H'FFF80000 H'00000000 to
  6429. H'FFFFFFFF H'FFFFFFFF
  6430.  
  6431. 6 . 2 . 2 Non-Numbers (NaN)
  6432.  
  6433. Figure 6.3 shows the bit pattern of a non-number (NaN). A value is NaN in the following case:
  6434.  
  6435. • Sign bit: Don’t care
  6436.  
  6437. • Exponent field: All bits are 1
  6438.  
  6439. • Fraction field: At least one bit is 1
  6440.  
  6441. The NaN is a signaling NaN (sNaN) if the MSB of the fraction field is 1, and a quiet NaN (qNaN)
  6442. if the MSB is 0.
  6443.  
  6444. 119
  6445.  
  6446. ----------------------- Page 136-----------------------
  6447.  
  6448. 31 30 23 22 0
  6449.  
  6450. x 11111111 Nxxxxxxxxxxxxxxxxxxxxxx
  6451.  
  6452. N = 1: sNaN
  6453. N = 0: qNaN
  6454.  
  6455.  
  6456. Figure 6.3 Single-Precision NaN Bit Pattern
  6457.  
  6458. An sNAN is input in an operation, except copy, FABS, and FNEG, that generates a floating-point
  6459. value.
  6460.  
  6461. • When the EN.V bit in the FPSCR register is 0, the operation result (output) is a qNaN.
  6462.  
  6463. • When the EN.V bit in the FPSCR register is 1, an invalid operation exception will be
  6464. generated. In this case, the contents of the operation destination register are unchanged.
  6465.  
  6466. If a qNaN is input in an operation that generates a floating-point value, and an sNaN has not been
  6467. input in that operation, the output will always be a qNaN irrespective of the setting of the EN.V
  6468. bit in the FPSCR register. An exception will not be generated in this case.
  6469.  
  6470. The qNAN values generated by the SH7750 as operation results are as follows:
  6471.  
  6472. • Single-precision qNaN: H'7FBFFFFF
  6473.  
  6474. • Double-precision qNaN: H'7FF7FFFF FFFFFFFF
  6475.  
  6476. See the individual instruction descriptions for details of floating-point operations when a non-
  6477. number (NaN) is input.
  6478.  
  6479. 6 . 2 . 3 Denormalized Numbers
  6480.  
  6481. For a denormalized number floating-point value, the exponent field is expressed as 0, and the
  6482. fraction field as a non-zero value.
  6483.  
  6484. When the DN bit in the FPU’s status register FPSCR is 1, a denormalized number (source operand
  6485. or operation result) is always flushed to 0 in a floating-point operation that generates a value (an
  6486. operation other than copy, FNEG, or FABS).
  6487.  
  6488. When the DN bit in FPSCR is 0, a denormalized number (source operand or operation result) is
  6489. processed as it is. See the individual instruction descriptions for details of floating-point operations
  6490. when a denormalized number is input.
  6491.  
  6492. 120
  6493.  
  6494. ----------------------- Page 137-----------------------
  6495.  
  6496. 6 . 3 Registers
  6497.  
  6498. 6 . 3 . 1 Floating-Point Registers
  6499.  
  6500. Figure 6.4 shows the floating-point register configuration. There are thirty-two 32-bit floating-
  6501. point registers, referenced by specifying FR0–FR15, DR0/2/4/6/8/10/12/14, FV0/4/8/12, XF0–
  6502. XF15, XD0/2/4/6/8/10/12/14, or XMTRX.
  6503.  
  6504. 1. Floating-point registers, FPRi_BANKj (32 registers)
  6505.  
  6506. FPR0_BANK0–FPR15_BANK0
  6507.  
  6508. FPR0_BANK1–FPR15_BANK1
  6509.  
  6510. 2. Single-precision floating-point registers, FRi (16 registers)
  6511.  
  6512. When FPSCR.FR = 0, FR0–FR15 indicate FPR0_BANK0–FPR15_BANK0;
  6513.  
  6514. when FPSCR.FR = 1, FR0–FR15 indicate FPR0_BANK1–FPR15_BANK1.
  6515.  
  6516. 3. Double-precision floating-point registers, DRi (8 registers): A DR register comprises two FR
  6517. registers
  6518.  
  6519. DR0 = {FR0, FR1}, DR2 = {FR2, FR3}, DR4 = {FR4, FR5}, DR6 = {FR6, FR7},
  6520. DR8 = {FR8, FR9}, DR10 = {FR10, FR11}, DR12 = {FR12, FR13}, DR14 = {FR14,
  6521. FR15}
  6522.  
  6523. 4. Single-precision floating-point vector registers, FVi (4 registers): An FV register comprises
  6524. four FR registers
  6525.  
  6526. FV0 = {FR0, FR1, FR2, FR3}, FV4 = {FR4, FR5, FR6, FR7},
  6527. FV8 = {FR8, FR9, FR10, FR11}, FV12 = {FR12, FR13, FR14, FR15}
  6528.  
  6529. 5. Single-precision floating-point extended registers, XFi (16 registers)
  6530.  
  6531. When FPSCR.FR = 0, XF0–XF15 indicate FPR0_BANK1–FPR15_BANK1;
  6532.  
  6533. when FPSCR.FR = 1, XF0–XF15 indicate FPR0_BANK0–FPR15_BANK0.
  6534.  
  6535. 6. Double-precision floating-point extended registers, XDi (8 registers): An XD register comprises
  6536. two XF registers
  6537.  
  6538. XD0 = {XF0, XF1}, XD2 = {XF2, XF3}, XD4 = {XF4, XF5}, XD6 = {XF6, XF7},
  6539. XD8 = {XF8, XF9}, XD10 = {XF10, XF11}, XD12 = {XF12, XF13}, XD14 = {XF14,
  6540. XF15}
  6541.  
  6542. 121
  6543.  
  6544. ----------------------- Page 138-----------------------
  6545.  
  6546. 7. Single-precision floating-point extended register matrix, XMTRX: XMTRX comprises all 16
  6547. XF registers
  6548.  
  6549. XMTRX = XF0 XF4 XF8 XF12
  6550.  
  6551. XF1 XF5 XF9 XF13
  6552.  
  6553. XF2 XF6 XF10 XF14
  6554.  
  6555. XF3 XF7 XF11 XF15
  6556.  
  6557. FPSCR.FR = 0 FPSCR.FR = 1
  6558.  
  6559. FV0 DR0 FR0 FPR0_BANK0 XF0 XD0 XMTRX
  6560. FR1 FPR1_BANK0 XF1
  6561. DR2 FR2 FPR2_BANK0 XF2 XD2
  6562. FR3 FPR3_BANK0 XF3
  6563. FV4 DR4 FR4 FPR4_BANK0 XF4 XD4
  6564. FR5 FPR5_BANK0 XF5
  6565. DR6 FR6 FPR6_BANK0 XF6 XD6
  6566. FR7 FPR7_BANK0 XF7
  6567. FV8 DR8 FR8 FPR8_BANK0 XF8 XD8
  6568. FR9 FPR9_BANK0 XF9
  6569. DR10 FR10 FPR10_BANK0 XF10 XD10
  6570. FR11 FPR11_BANK0 XF11
  6571. FV12 DR12 FR12 FPR12_BANK0 XF12 XD12
  6572. FR13 FPR13_BANK0 XF13
  6573. DR14 FR14 FPR14_BANK0 XF14 XD14
  6574. FR15 FPR15_BANK0 XF15
  6575.  
  6576. XMTRX XD0 XF0 FPR0_BANK1 FR0 DR0 FV0
  6577. XF1 FPR1_BANK1 FR1
  6578. XD2 XF2 FPR2_BANK1 FR2 DR2
  6579. XF3 FPR3_BANK1 FR3
  6580. XD4 XF4 FPR4_BANK1 FR4 DR4 FV4
  6581. XF5 FPR5_BANK1 FR5
  6582. XD6 XF6 FPR6_BANK1 FR6 DR6
  6583. XF7 FPR7_BANK1 FR7
  6584. XD8 XF8 FPR8_BANK1 FR8 DR8 FV8
  6585. XF9 FPR9_BANK1 FR9
  6586. XD10 XF10 FPR10_BANK1 FR10 DR10
  6587. XF11 FPR11_BANK1 FR11
  6588. XD12 XF12 FPR12_BANK1 FR12 DR12 FV12
  6589. XF13 FPR13_BANK1 FR13
  6590. XD14 XF14 FPR14_BANK1 FR14 DR14
  6591. XF15 FPR15_BANK1 FR15
  6592.  
  6593. Figure 6.4 Floating-Point Registers
  6594.  
  6595. 122
  6596.  
  6597. ----------------------- Page 139-----------------------
  6598.  
  6599. 6 . 3 . 2 Floating-Point Status/Control Register (FPSCR)
  6600.  
  6601. Floating-point status/control register, FPSCR (32 bits, initial value = H'0004
  6602. 0001)
  6603.  
  6604. • FR: Floating-point register bank
  6605.  
  6606. FR = 0: FPR0_BANK0–FPR15_BANK0 are assigned to FR0–FR15; FPR0_BANK1–
  6607. FPR15_BANK1 are assigned to XF0–XF15.
  6608.  
  6609. FR = 1: FPR0_BANK0–FPR15_BANK0 are assigned to XF0–XF15; FPR0_BANK1–
  6610. FPR15_BANK1 are assigned to FR0–FR15.
  6611.  
  6612. • SZ: Transfer size mode
  6613.  
  6614. SZ = 0: The data size of the FMOV instruction is 32 bits.
  6615.  
  6616. SZ = 1: The data size of the FMOV instruction is a 32-bit register pair (64 bits).
  6617.  
  6618. • PR: Precision mode
  6619.  
  6620. PR = 0: Floating-point instructions are executed as single-precision operations.
  6621.  
  6622. PR = 1: Floating-point instructions are executed as double-precision operations (graphics
  6623. support instructions are undefined).
  6624.  
  6625. Do not set SZ and PR to 1 simultaneously; this setting is reserved.
  6626.  
  6627. [SZ, PR = 11]: Reserved (FPU operation instruction is undefined.)
  6628.  
  6629. • DN: Denormalization mode
  6630.  
  6631. DN = 0: A denormalized number is treated as such.
  6632.  
  6633. DN = 1: A denormalized number is treated as zero.
  6634.  
  6635. FPU Invalid Division Overflow Underflow Inexact
  6636. Error (E) Operation (V) by Zero (Z) (O) (U) (I)
  6637.  
  6638. Cause FPU exception Bit 17 Bit 16 Bit 15 Bit 14 Bit 13 Bit 12
  6639. cause field
  6640.  
  6641. Enable FPU exception None Bit 11 Bit 10 Bit 9 Bit 8 Bit 7
  6642. enable field
  6643.  
  6644. Flag FPU exception flagNone Bit 6 Bit 5 Bit 4 Bit 3 Bit 2
  6645. field
  6646.  
  6647. When an FPU exception is requested, the corresponding bits in the cause and flag fields are set
  6648. to 1. Each time an FPU operation instruction is executed, the cause field is cleared to 0 first.
  6649. The flag field retains the value of 1 until cleared to 0 by software.
  6650.  
  6651. • RM: Rounding mode
  6652.  
  6653. 123
  6654.  
  6655. ----------------------- Page 140-----------------------
  6656.  
  6657. RM = 00: Round to Nearest
  6658.  
  6659. RM = 01: Round to Zero
  6660.  
  6661. RM = 10: Reserved
  6662.  
  6663. RM = 11: Reserved
  6664.  
  6665. • Bits 22 to 31: Reserved
  6666.  
  6667. These bits are always read as 0, and should only be written with 0.
  6668.  
  6669. Notes: The following functions have been added to the FPU of the SH7750 (not provided in the
  6670. FPU of the SH7718):
  6671.  
  6672. 1. The FR, SZ, and PR bits have been added.
  6673.  
  6674. 2. Exception O (overflow), U (underflow), and I (inexact) bits have been added to the
  6675. cause, enable, and flag fields.
  6676.  
  6677. 3. An exception E (FPU error) bit has been added to the cause field.
  6678.  
  6679. 6 . 3 . 3 Floating-Point Communication Register (FPUL)
  6680.  
  6681. Information is transferred between the FPU and CPU via the FPUL register. The 32-bit FPUL
  6682. register is a system register, and is accessed from the CPU side by means of LDS and STS
  6683. instructions. For example, to convert the integer stored in general register R1 to a single-precision
  6684. floating-point number, the processing flow is as follows:
  6685.  
  6686. R1 → (LDS instruction) → FPUL → (single-precision FLOAT instruction) → FR1
  6687.  
  6688. 6 . 4 Rounding
  6689.  
  6690. In a floating-point instruction, rounding is performed when generating the final operation result
  6691. from the intermediate result. Therefore, the result of combination instructions such as FMAC,
  6692. FTRV, and FIPR will differ from the result when using a basic instruction such as FADD, FSUB,
  6693. or FMUL. Rounding is performed once in FMAC, but twice in FADD, FSUB, and FMUL.
  6694.  
  6695. There are two rounding methods, the method to be used being determined by the RM field in
  6696. FPSCR.
  6697.  
  6698. • RM = 00: Round to Nearest
  6699.  
  6700. • RM = 01: Round to Zero
  6701.  
  6702. Round to Nearest: The value is rounded to the nearest expressible value. If there are two
  6703. nearest expressible values, the one with an LSB of 0 is selected.
  6704.  
  6705. If the unrounded value is 2Emax (2 – 2–P) or more, the result will be infinity with the same sign as
  6706.  
  6707. the unrounded value. The values of Emax and P, respectively, are 127 and 24 for single-precision,
  6708. and 1023 and 53 for double-precision.
  6709.  
  6710. 124
  6711.  
  6712. ----------------------- Page 141-----------------------
  6713.  
  6714. Round to Zero: The digits below the round bit of the unrounded value are discarded.
  6715.  
  6716. If the unrounded value is larger than the maximum expressible absolute value, the value will be
  6717. the maximum expressible absolute value.
  6718.  
  6719. 6 . 5 Floating-Point Exceptions
  6720.  
  6721. FPU-related exceptions are as follows:
  6722.  
  6723. • General illegal instruction/slot illegal instruction exception
  6724.  
  6725. The exception occurs if an FPU instruction is executed when SR.FD = 1.
  6726.  
  6727. • FPU exceptions
  6728.  
  6729. The exception sources are as follows:
  6730.  
  6731.  FPU error (E): When FPSCR.DN = 0 and a denormalized number is input
  6732.  
  6733.  Invalid operation (V): In case of an invalid operation, such as NaN input
  6734.  
  6735.  Division by zero (Z): Division with a zero divisor
  6736.  
  6737.  Overflow (O): When the operation result overflows
  6738.  
  6739.  Underflow (U): When the operation result underflows
  6740.  
  6741.  Inexact exception (I): When overflow, underflow, or rounding occurs
  6742.  
  6743. The FPSCR cause field contains bits corresponding to all of above sources E, V, Z, O, U, and
  6744. I, and the FPSCR flag and enable fields contain bits corresponding to sources V, Z, O, U, and
  6745. I, but not E. Thus, FPU errors cannot be disabled.
  6746.  
  6747. When an exception source occurs, the corresponding bit in the cause field is set to 1, and 1 is
  6748. added to the corresponding bit in the flag field. When an exception source does not occur, the
  6749. corresponding bit in the cause field is cleared to 0, but the corresponding bit in the flag field
  6750. remains unchanged.
  6751.  
  6752. • Enable/disable exception handling
  6753.  
  6754. The SH7750 supports enable exception handling and disable exception handling.
  6755.  
  6756. Enable exception handling is initiated in the following cases:
  6757.  FPU error (E): FPSCR.DN = 0 and a denormalized number is input
  6758.  
  6759.  Invalid operation (V): FPSCR.EN.V = 1 and (instruction = FTRV or invalid operation)
  6760.  
  6761.  Division by zero (Z): FPSCR.EN.Z = 1 and division with a zero divisor
  6762.  
  6763.  Overflow (O): FPSCR.EN.O = 1 and instruction with possibility of operation result
  6764. overflow
  6765.  
  6766.  Underflow (U): FPSCR.EN.U = 1 and instruction with possibility of operation result
  6767. underflow
  6768.  
  6769.  Inexact exception (I): FPSCR.EN.I = 1 and instruction with possibility of inexact operation
  6770. result
  6771.  
  6772. 125
  6773.  
  6774. ----------------------- Page 142-----------------------
  6775.  
  6776. These possibilities are shown in the individual instruction descriptions. All exception events
  6777. that originate in the FPU are assigned as the same exception event. The meaning of an
  6778. exception is determined by software by reading system register FPSCR and interpreting the
  6779. information it contains. If no bits are set in the cause field of FPSCR when one or more of
  6780. bits O, U, I, and V (in case of FTRV only) are set in the enable field, this indicates that an
  6781. actual exception source is not generated. Also, the destination register is not changed by any
  6782. enable exception handling operation.
  6783.  
  6784. Except for the above, the FPU disables exception handling. In all processing, the bit
  6785. corresponding to source V, Z, O, U, or I is set to 1, and disable exception handling is provided
  6786. for each exception.
  6787.  
  6788.  Invalid operation (V): qNAN is generated as the result.
  6789.  
  6790.  Division by zero (Z): Infinity with the same sign as the unrounded value is generated.
  6791.  
  6792.  Overflow (O):
  6793.  
  6794. When rounding mode = RZ, the maximum normalized number, with the same sign as the
  6795. unrounded value, is generated.
  6796.  
  6797. When rounding mode = RN, infinity with the same sign as the unrounded value is
  6798. generated.
  6799.  
  6800.  Underflow (U):
  6801.  
  6802. When FPSCR.DN = 0, a denormalized number with the same sign as the unrounded value,
  6803. or zero with the same sign as the unrounded value, is generated.
  6804.  
  6805. When FPSCR.DN = 1, zero with the same sign as the unrounded value, is generated.
  6806.  
  6807.  Inexact exception (I): An inexact result is generated.
  6808.  
  6809. 6 . 6 Graphics Support Functions
  6810.  
  6811. The SH7750 supports two kinds of graphics functions: new instructions for geometric operations,
  6812. and pair single-precision transfer instructions that enable high-speed data transfer.
  6813.  
  6814. 6 . 6 . 1 Geometric Operation Instructions
  6815.  
  6816. Geometric operation instructions perform approximate-value computations. To enable high-speed
  6817. computation with a minimum of hardware, the SH7750 ignores comparatively small values in the
  6818. partial computation results of four multiplications. Consequently, the error shown below is
  6819. produced in the result of the computation:
  6820.  
  6821. Maximum error = MAX (individual multiplication result ×
  6822.  
  6823. –MIN (number of multiplier significant digits–1, number of multiplicand significant digits–1) –23 –
  6824. 2 ) + MAX (result value × 2 , 2
  6825. 149)
  6826.  
  6827. The number of significant digits is 24 for a normalized number and 23 for a denormalized number
  6828. (number of leading zeros in the fractional part).
  6829.  
  6830. 126
  6831.  
  6832. ----------------------- Page 143-----------------------
  6833.  
  6834. In future version of SH series, the above error is guaranteed, but the same result as SH7750 is not
  6835. guaranteed.
  6836.  
  6837. FIPR FVm, FVn (m, n: 0, 4, 8, 12): This instruction is basically used for the following
  6838. purposes:
  6839.  
  6840. • Inner product (m ≠ n):
  6841.  
  6842. This operation is generally used for surface/rear surface determination for polygon surfaces.
  6843.  
  6844. • Sum of square of elements (m = n):
  6845.  
  6846. This operation is generally used to find the length of a vector.
  6847.  
  6848. Since approximate-value computations are performed to enable high-speed computation, the
  6849. inexact exception (I) bit in the cause field and flag field is always set to 1 when an FIPR
  6850. instruction is executed. Therefore, if the corresponding bit is set in the enable field, enable
  6851. exception handling will be executed.
  6852.  
  6853. FTRV XMTRX, FVn (n: 0, 4, 8, 12): This instruction is basically used for the following
  6854. purposes:
  6855.  
  6856. • Matrix (4 × 4) ⋅ vector (4):
  6857.  
  6858. This operation is generally used for viewpoint changes, angle changes, or movements called
  6859. vector transformations (4-dimensional). Since affine transformation processing for angle +
  6860. parallel movement basically requires a 4 × 4 matrix, the SH7750 supports 4-dimensional
  6861. operations.
  6862.  
  6863. • Matrix (4 × 4) × matrix (4 × 4):
  6864.  
  6865. This operation requires the execution of four FTRV instructions.
  6866.  
  6867. Since approximate-value computations are performed to enable high-speed computation, the
  6868. inexact exception (I) bit in the cause field and flag field is always set to 1 when an FTRV
  6869. instruction is executed. Therefore, if the corresponding bit is set in the enable field, enable
  6870. exception handling will be executed. For the same reason, it is not possible to check all data types
  6871. in the registers beforehand when executing an FTRV instruction. If the V bit is set in the enable
  6872. field, enable exception handling will be executed.
  6873.  
  6874. FRCHG: This instruction modifies banked registers. For example, when the FTRV instruction
  6875. is executed, matrix elements must be set in an array in the background bank. However, to create
  6876. the actual elements of a translation matrix, it is easier to use registers in the foreground bank.
  6877. When the LDC instruction is used on FPSCR, this instruction expends 4 to 5 cycles in order to
  6878. maintain the FPU state. With the FRCHG instruction, an FPSCR.FR bit modification can be
  6879. performed in one cycle.
  6880.  
  6881. 127
  6882.  
  6883. ----------------------- Page 144-----------------------
  6884.  
  6885. 6 . 6 . 2 Pair Single-Precision Data Transfer
  6886.  
  6887. In addition to the powerful new geometric operation instructions, the SH7750 also supports high-
  6888. speed data transfer instructions.
  6889.  
  6890. When FPSCR.SZ = 1, the SH7750 can perform data transfer by means of pair single-precision
  6891. data transfer instructions.
  6892.  
  6893. • FMOV DRm/XDm, DRn/XDRn (m, n: 0, 2, 4, 6, 8, 10, 12, 14)
  6894.  
  6895. • FMOV DRm/XDm, @Rn (m: 0, 2, 4, 6, 8, 10, 12, 14; n: 0 to 15)
  6896.  
  6897. These instructions enable two single-precision (2 × 32-bit) data items to be transferred; that is, the
  6898. transfer performance of these instructions is doubled.
  6899.  
  6900. • FSCHG
  6901.  
  6902. This instruction changes the value of the SZ bit in FPSCR, enabling fast switching between
  6903. use and non-use of pair single-precision data transfer.
  6904.  
  6905. 128
  6906.  
  6907. ----------------------- Page 145-----------------------
  6908.  
  6909. Section 7 Instruction Set
  6910.  
  6911. 7 . 1 Execution Environment
  6912.  
  6913. PC: At the start of instruction execution, PC indicates the address of the instruction itself.
  6914.  
  6915. Data sizes and data types: The SH7750’s instruction set is implemented with 16-bit fixed-length
  6916. instructions. The SH7750 can use byte (8-bit), word (16-bit), longword (32-bit), and quadword (64-
  6917. bit) data sizes for memory access. Single-precision floating-point data (32 bits) can be moved to
  6918. and from memory using longword or quadword size. Double-precision floating-point data (64 bits)
  6919. can be moved to and from memory using longword size. When a double-precision floating-point
  6920. operation is specified (FPSCR.PR = 1), the result of an operation using quadword access will be
  6921. undefined. When the SH7750 moves byte-size or word-size data from memory to a register, the
  6922. data is sign-extended.
  6923.  
  6924. Load-Store Architecture: The SH7750 features a load-store architecture in which operations
  6925. are basically executed using registers. Except for bit-manipulation operations such as logical AND
  6926. that are executed directly in memory, operands in an operation that requires memory access are
  6927. loaded into registers and the operation is executed between the registers.
  6928.  
  6929. Delayed Branches: Except for the two branch instructions BF and BT, the SH7750’s branch
  6930. instructions and RTE are delayed branches. In a delayed branch, the instruction following the
  6931. branch is executed before the branch destination instruction. This execution slot following a
  6932. delayed branch is called a delay slot. For example, the BRA execution sequence is as follows:
  6933.  
  6934. Static Sequence Dynamic Sequence
  6935.  
  6936. BRA TARGET BRA TARGET
  6937.  
  6938. ADD R1, R0 ADD R1, R0 ADD in delay slot is executed before
  6939. next_2 target_instr branching to TARGET
  6940.  
  6941. Delay Slot: An illegal instruction exception may occur when a specific instruction is executed
  6942. in a delay slot. See section 5, Exceptions. The instruction following BF/S or BT/S for which the
  6943. branch is not taken is also a delay slot instruction.
  6944.  
  6945. T Bit: The T bit in the status register (SR) is used to show the result of a compare operation, and
  6946. is referenced by a conditional branch instruction. An example of the use of a conditional branch
  6947. instruction is shown below.
  6948.  
  6949. ADD #1, R0 ; T bit is not changed by ADD operation
  6950. CMP/EQ R1, R0; If R0 = R1, T bit is set to 1
  6951. BT TARGET ; Branches to TARGET if T bit = 1 (R0 = R1)
  6952.  
  6953. 129
  6954.  
  6955. ----------------------- Page 146-----------------------
  6956.  
  6957. In an RTE delay slot, status register (SR) bits are referenced as follows. In instruction access, the
  6958. MD bit is used before modification, and in data access, the MD bit is accessed after modification.
  6959. The other bits—S, T, M, Q, FD, BL, and RB—after modification are used for delay slot
  6960. instruction execution. The STC and STC.L SR instructions access all SR bits after modification.
  6961.  
  6962. Constant Values: An 8-bit constant value can be specified by the instruction code and an
  6963. immediate value. 16-bit and 32-bit constant values can be defined as literal constant values in
  6964. memory, and can be referenced by a PC-relative load instruction.
  6965.  
  6966. MOV.W @(disp, PC), Rn
  6967. MOV.L @(disp, PC), Rn
  6968.  
  6969. There are no PC-relative load instructions for floating-point operations. However, it is possible to
  6970. set 0.0 or 1.0 by using the FLDI0 or FLDI1 instruction on a single-precision floating-point
  6971. register.
  6972.  
  6973. 130
  6974.  
  6975. ----------------------- Page 147-----------------------
  6976.  
  6977. 7 . 2 Addressing Modes
  6978.  
  6979. Addressing modes and effective address calculation methods are shown in table 7.1. When a
  6980. location in virtual memory space is accessed (MMUCR.AT = 1), the effective address is translated
  6981. into a physical memory address. If multiple virtual memory space systems are selected
  6982. (MMUCR.SV = 0), the least significant bit of PTEH is also referenced as the access ASID. See
  6983. section 3, Memory Management Unit (MMU).
  6984.  
  6985. Table 7.1 Addressing Modes and Effective Addresses
  6986.  
  6987. Addressin Instruction Calculation
  6988. g Mode Format Effective Address Calculation Method Formula
  6989.  
  6990. Register Rn Effective address is register Rn. —
  6991. direct (Operand is register Rn contents.)
  6992.  
  6993. Register @Rn Effective address is register Rn contents. Rn → EA
  6994. indirect (EA: effective
  6995. Rn Rn
  6996. address)
  6997.  
  6998. Register @Rn+ Effective address is register Rn contents. Rn → EA
  6999. indirect A constant is added to Rn after instruction After
  7000. with post- execution: 1 for a byte operand, 2 for a word instruction
  7001. increment operand, 4 for a longword operand, 8 for a quadword execution
  7002. operand. Byte:
  7003.  
  7004. Rn Rn Rn + 1 → Rn
  7005.  
  7006. Word:
  7007. Rn + 1/2/4/8
  7008. + Rn + 2 → Rn
  7009.  
  7010. Longword:
  7011. 1/2/4/8 Rn + 4 → Rn
  7012.  
  7013. Quadword:
  7014. Rn + 8 → Rn
  7015.  
  7016. Register @–Rn Effective address is register Rn contents, Byte:
  7017. indirect decremented by a constant beforehand: Rn – 1 → Rn
  7018. with pre- 1 for a byte operand, 2 for a word operand, Word:
  7019. decrement 4 for a longword operand, 8 for a quadword operand. Rn – 2 → Rn
  7020.  
  7021. Rn Longword:
  7022. Rn – 4 → Rn
  7023. Rn – 1/2/4/8
  7024. – Rn – 1/2/4/8
  7025. Quadword:
  7026. Rn – 8 → Rn
  7027. 1/2/4/8
  7028. Rn → EA
  7029. (Instruction
  7030. executed
  7031. with Rn after
  7032. calculation)
  7033.  
  7034. 131
  7035.  
  7036. ----------------------- Page 148-----------------------
  7037.  
  7038. Table 7.1 Addressing Modes and Effective Addresses (cont)
  7039.  
  7040. Addressin Instruction Calculation
  7041. g Mode Format Effective Address Calculation Method Formula
  7042.  
  7043. Register @(disp:4, Rn) Effective address is register Rn contents with Byte: Rn +
  7044. indirect with 4-bit displacement disp added. After disp is disp → EA
  7045. displacement zero-extended, it is multiplied by 1 (byte), 2 (word), Word: Rn +
  7046. or 4 (longword), according to the operand size. disp × 2 → EA
  7047.  
  7048. Rn Longword:
  7049. Rn + disp × 4
  7050. disp + Rn + disp × 1/2/4 → EA
  7051. (zero-extended)
  7052.  
  7053. ×
  7054.  
  7055. 1/2/4
  7056.  
  7057. Indexed @(R0, Rn) Effective address is sum of register Rn and R0 Rn + R0 → EA
  7058. register contents.
  7059. indirect
  7060. Rn
  7061.  
  7062. + Rn + R0
  7063.  
  7064. R0
  7065.  
  7066. GBR indirect @(disp:8, Effective address is register GBR contents with Byte: GBR +
  7067. with GBR) 8-bit displacement disp added. After disp is disp → EA
  7068. displacement zero-extended, it is multiplied by 1 (byte), 2 (word), Word: GBR +
  7069. or 4 (longword), according to the operand size. disp × 2 → EA
  7070.  
  7071. GBR Longword:
  7072. GBR + disp × 4
  7073. GBR
  7074. disp + → EA
  7075. (zero-extended) + disp × 1/2/4
  7076.  
  7077. ×
  7078.  
  7079. 1/2/4
  7080.  
  7081. Indexed GBR @(R0, GBR) Effective address is sum of register GBR and R0 GBR + R0 →
  7082. indirect contents. EA
  7083.  
  7084. GBR
  7085.  
  7086. + GBR + R0
  7087.  
  7088. R0
  7089.  
  7090. 132
  7091.  
  7092. ----------------------- Page 149-----------------------
  7093.  
  7094. Table 7.1 Addressing Modes and Effective Addresses (cont)
  7095.  
  7096. Addressin Instruction Calculation
  7097. g Mode Format Effective Address Calculation Method Formula
  7098.  
  7099. PC-relative @(disp:8, PC) Effective address is PC+4 with 8-bit displacement Word: PC + 4 +
  7100. with disp added. After disp is zero-extended, it is disp × 2 → EA
  7101. displacement multiplied by 2 (word), or 4 (longword), according Longword:
  7102. to the operand size. With a longword operand, PC &
  7103. the lower 2 bits of PC are masked.
  7104. H'FFFFFFFC +
  7105. PC 4 + disp × 4 →
  7106. EA
  7107. *
  7108. &
  7109.  
  7110. H'FFFFFFFC +
  7111.  
  7112. PC + 4 + disp
  7113. 4 × 2
  7114. + or PC &
  7115. H'FFFFFFFC
  7116. disp
  7117. + 4 + disp × 4
  7118. (zero-extended)
  7119. ×
  7120.  
  7121. 2/4
  7122. * With longword operand
  7123.  
  7124. PC-relative disp:8 Effective address is PC+4 with 8-bit displacement PC + 4 + disp ×
  7125. disp added after being sign-extended and 2 → Branch-
  7126. multiplied by 2. Target
  7127.  
  7128. PC
  7129.  
  7130. +
  7131.  
  7132. 4
  7133. + PC + 4 + disp × 2
  7134. disp
  7135. (sign-extended)
  7136.  
  7137. ×
  7138.  
  7139. 2
  7140.  
  7141. 133
  7142.  
  7143. ----------------------- Page 150-----------------------
  7144.  
  7145. Table 7.1 Addressing Modes and Effective Addresses (cont)
  7146.  
  7147. Addressin Instruction Calculation
  7148. g Mode Format Effective Address Calculation Method Formula
  7149.  
  7150. PC-relative disp:12 Effective address is PC+4 with 12-bit displacement PC + 4 + disp ×
  7151. disp added after being sign-extended and 2 → Branch-
  7152. multiplied by 2. Target
  7153.  
  7154. PC
  7155.  
  7156. +
  7157.  
  7158. 4
  7159. + PC + 4 + disp × 2
  7160. disp
  7161. (sign-extended)
  7162.  
  7163. ×
  7164.  
  7165. 2
  7166.  
  7167. Rn Effective address is sum of PC+4 and Rn. PC + 4 + Rn →
  7168. Branch-Target
  7169. PC
  7170.  
  7171. +
  7172.  
  7173. 4 + PC + 4 + Rn
  7174.  
  7175. Rn
  7176.  
  7177. Immediate #imm:8 8-bit immediate data imm of TST, AND, OR, or XOR —
  7178. instruction is zero-extended.
  7179.  
  7180. #imm:8 8-bit immediate data imm of MOV, ADD, or CMP/EQ —
  7181. instruction is sign-extended.
  7182.  
  7183. #imm:8 8-bit immediate data imm of TRAPA instruction is —
  7184. zero-extended and multiplied by 4.
  7185.  
  7186. Note: For the addressing modes below that use a displacement (disp), the assembler descriptions
  7187. in this manual show the value before scaling (× 1, ×2, or ×4) is performed according to the
  7188. operand size. This is done to clarify the operation of the chip. Refer to the relevant
  7189. assembler notation rules for the actual assembler descriptions.
  7190. @ (disp:4, Rn) ; Register indirect with displacement
  7191. @ (disp:8, GBR) ; GBR indirect with displacement
  7192. @ (disp:8, PC) ; PC-relative with displacement
  7193. disp:8, disp:12 ; PC-relative
  7194.  
  7195. 134
  7196.  
  7197. ----------------------- Page 151-----------------------
  7198.  
  7199. 7 . 3 Instruction Set
  7200.  
  7201. Table 7.2 shows the notation used in the following SH instruction list.
  7202.  
  7203. Table 7.2 Notation Used in Instruction List
  7204.  
  7205. Item Format Description
  7206.  
  7207. Instruction OP.Sz SRC, DEST OP: Operation code
  7208. mnemonic Sz: Size
  7209. SRC: Source
  7210. DEST: Source and/or destination operand
  7211.  
  7212. Summary of →, ← Transfer direction
  7213. operation (xx) Memory operand
  7214. M/Q/T SR flag bits
  7215. & Logical AND of individual bits
  7216. | Logical OR of individual bits
  7217. ∧ Logical exclusive-OR of individual bits
  7218. ~ Logical NOT of individual bits
  7219. <<n, >>n n-bit shift
  7220.  
  7221. Instruction code MSB ↔ LSB mmmm: Register number (Rm, FRm)
  7222. nnnn: Register number (Rn, FRn)
  7223. 0000: R0, FR0
  7224. 0001: R1, FR1
  7225. :
  7226. 1111: R15, FR15
  7227. mmm: Register number (DRm, XDm, Rm_BANK)
  7228. nnn: Register number (DRm, XDm, Rn_BANK)
  7229. 000: DR0, XD0, R0_BANK
  7230. 001: DR2, XD2, R1_BANK
  7231. :
  7232. 111: DR14, XD14, R7_BANK
  7233. mm: Register number (FVm)
  7234. nn: Register number (FVn)
  7235. 00: FV0
  7236. 01: FV4
  7237. 10: FV8
  7238. 11: FV12
  7239. iiii: Immediate data
  7240. dddd: Displacement
  7241.  
  7242. Privileged mode “Privileged” means the instruction can only be executed
  7243. in privileged mode.
  7244.  
  7245. T bit Value of T bit after —: No change
  7246. instruction execution
  7247.  
  7248. Note: Scaling (× 1, ×2, ×4, or ×8) is executed according to the size of the instruction operand(s).
  7249.  
  7250. 135
  7251.  
  7252. ----------------------- Page 152-----------------------
  7253.  
  7254. Table 7.3 Fixed-Point Transfer Instructions
  7255.  
  7256. Instruction Operation Instruction Code Privileged T Bit
  7257.  
  7258. MOV #imm,Rn imm → sign extension → Rn 1110nnnniiiiiiii — —
  7259.  
  7260. MOV.W @(disp,PC),Rn (disp × 2 + PC + 4) → sign 1001nnnndddddddd — —
  7261. extension → Rn
  7262.  
  7263. MOV.L @(disp,PC),Rn (disp × 4 + PC & H'FFFFFFFC 1101nnnndddddddd — —
  7264. + 4) → Rn
  7265.  
  7266. MOV Rm,Rn Rm → Rn 0110nnnnmmmm0011 — —
  7267.  
  7268. MOV.B Rm,@Rn Rm → (Rn) 0010nnnnmmmm0000 — —
  7269.  
  7270. MOV.W Rm,@Rn Rm → (Rn) 0010nnnnmmmm0001 — —
  7271.  
  7272. MOV.L Rm,@Rn Rm → (Rn) 0010nnnnmmmm0010 — —
  7273.  
  7274. MOV.B @Rm,Rn (Rm) → sign extension → Rn 0110nnnnmmmm0000 — —
  7275.  
  7276. MOV.W @Rm,Rn (Rm) → sign extension → Rn 0110nnnnmmmm0001 — —
  7277.  
  7278. MOV.L @Rm,Rn (Rm) → Rn 0110nnnnmmmm0010 — —
  7279.  
  7280. MOV.B Rm,@-Rn Rn-1 → Rn, Rm → (Rn) 0010nnnnmmmm0100 — —
  7281.  
  7282. MOV.W Rm,@-Rn Rn-2 → Rn, Rm → (Rn) 0010nnnnmmmm0101 — —
  7283.  
  7284. MOV.L Rm,@-Rn Rn-4 → Rn, Rm → (Rn) 0010nnnnmmmm0110 — —
  7285.  
  7286. MOV.B @Rm+,Rn (Rm)→ sign extension → Rn, 0110nnnnmmmm0100 — —
  7287. Rm + 1 → Rm
  7288.  
  7289. MOV.W @Rm+,Rn (Rm) → sign extension → Rn, 0110nnnnmmmm0101 — —
  7290. Rm + 2 → Rm
  7291.  
  7292. MOV.L @Rm+,Rn (Rm) → Rn, Rm + 4 → Rm 0110nnnnmmmm0110 — —
  7293.  
  7294. MOV.B R0,@(disp,Rn) R0 → (disp + Rn) 10000000nnnndddd — —
  7295.  
  7296. MOV.W R0,@(disp,Rn) R0 → (disp × 2 + Rn) 10000001nnnndddd — —
  7297.  
  7298. MOV.L Rm,@(disp,Rn) Rm → (disp × 4 + Rn) 0001nnnnmmmmdddd — —
  7299.  
  7300. MOV.B @(disp,Rm),R0 (disp + Rm) → sign extension 10000100mmmmdddd — —
  7301. → R0
  7302.  
  7303. MOV.W @(disp,Rm),R0 (disp × 2 + Rm) → sign extension 10000101mmmmdddd — —
  7304. → R0
  7305.  
  7306. MOV.L @(disp,Rm),Rn (disp × 4 + Rm) → Rn 0101nnnnmmmmdddd — —
  7307.  
  7308. MOV.B Rm,@(R0,Rn) Rm → (R0 + Rn) 0000nnnnmmmm0100 — —
  7309.  
  7310. MOV.W Rm,@(R0,Rn) Rm → (R0 + Rn) 0000nnnnmmmm0101 — —
  7311.  
  7312. MOV.L Rm,@(R0,Rn) Rm → (R0 + Rn) 0000nnnnmmmm0110 — —
  7313.  
  7314. MOV.B @(R0,Rm),Rn (R0 + Rm) → sign extension 0000nnnnmmmm1100 — —
  7315. → Rn
  7316.  
  7317. MOV.W @(R0,Rm),Rn (R0 + Rm) → sign extension 0000nnnnmmmm1101 — —
  7318. → Rn
  7319.  
  7320. MOV.L @(R0,Rm),Rn (R0 + Rm) → Rn 0000nnnnmmmm1110 — —
  7321.  
  7322. 136
  7323.  
  7324. ----------------------- Page 153-----------------------
  7325.  
  7326. Table 7.3 Fixed-Point Transfer Instructions (cont)
  7327.  
  7328. Instruction Operation Instruction Code Privileged T Bit
  7329.  
  7330. MOV.B R0,@(disp,GBR) R0 → (disp + GBR) 11000000dddddddd — —
  7331.  
  7332. MOV.W R0,@(disp,GBR) R0 → (disp × 2 + GBR) 11000001dddddddd — —
  7333.  
  7334. MOV.L R0,@(disp,GBR) R0 → (disp × 4 + GBR) 11000010dddddddd — —
  7335.  
  7336. MOV.B @(disp,GBR),R0 (disp + GBR) → 11000100dddddddd — —
  7337. sign extension → R0
  7338.  
  7339. MOV.W @(disp,GBR),R0 (disp × 2 + GBR) → 11000101dddddddd — —
  7340. sign extension → R0
  7341.  
  7342. MOV.L @(disp,GBR),R0 (disp × 4 + GBR) → R0 11000110dddddddd — —
  7343.  
  7344. MOVA @(disp,PC),R0 disp × 4 + PC & H'FFFFFFFC 11000111dddddddd — —
  7345. + 4 → R0
  7346.  
  7347. MOVT Rn T → Rn 0000nnnn00101001 — —
  7348.  
  7349. SWAP.B Rm,Rn Rm → swap lower 2 bytes 0110nnnnmmmm1000 — —
  7350. → Rn
  7351.  
  7352. SWAP.W Rm,Rn Rm → swap upper/lower 0110nnnnmmmm1001 — —
  7353. words → Rn
  7354.  
  7355. XTRCT Rm,Rn Rm:Rn middle 32 bits → Rn 0010nnnnmmmm1101 — —
  7356.  
  7357. 137
  7358.  
  7359. ----------------------- Page 154-----------------------
  7360.  
  7361. Table 7.4 Arithmetic Operation Instructions
  7362.  
  7363. Instruction Operation Instruction Code Privileged T Bit
  7364.  
  7365. ADD Rm,Rn Rn + Rm → Rn 0011nnnnmmmm1100 — —
  7366.  
  7367. ADD #imm,Rn Rn + imm → Rn 0111nnnniiiiiiii — —
  7368.  
  7369. ADDC Rm,Rn Rn + Rm + T → Rn, carry → T 0011nnnnmmmm1110 — Carry
  7370.  
  7371. ADDV Rm,Rn Rn + Rm → Rn, overflow → T 0011nnnnmmmm1111 — Overflow
  7372.  
  7373. CMP/EQ #imm,R0 When R0 = imm, 1 → T 10001000iiiiiiii — Comparison
  7374. Otherwise, 0 → T result
  7375.  
  7376. CMP/EQ Rm,Rn When Rn = Rm, 1 → T 0011nnnnmmmm0000 — Comparison
  7377. Otherwise, 0 → T result
  7378.  
  7379. CMP/HS Rm,Rn When Rn ≥ Rm (unsigned), 0011nnnnmmmm0010 — Comparison
  7380. 1 → T result
  7381. Otherwise, 0 → T
  7382.  
  7383. CMP/GE Rm,Rn When Rn ≥ Rm (signed), 1 → T 0011nnnnmmmm0011 — Comparison
  7384. Otherwise, 0 → T result
  7385.  
  7386. CMP/HI Rm,Rn When Rn > Rm (unsigned), 0011nnnnmmmm0110 — Comparison
  7387. 1 → T result
  7388. Otherwise, 0 → T
  7389.  
  7390. CMP/GT Rm,Rn When Rn > Rm (signed), 1 → T 0011nnnnmmmm0111 — Comparison
  7391. Otherwise, 0 → T result
  7392.  
  7393. CMP/PZ Rn When Rn ≥ 0, 1 → T 0100nnnn00010001 — Comparison
  7394. Otherwise, 0 → T result
  7395.  
  7396. CMP/PL Rn When Rn > 0, 1 → T 0100nnnn00010101 — Comparison
  7397. Otherwise, 0 → T result
  7398.  
  7399. CMP/STR Rm,Rn When any bytes are equal, 0010nnnnmmmm1100 — Comparison
  7400. 1 → T result
  7401. Otherwise, 0 → T
  7402.  
  7403. DIV1 Rm,Rn 1-step division (Rn ÷ Rm) 0011nnnnmmmm0100 — Calculation
  7404. result
  7405.  
  7406. DIV0S Rm,Rn MSB of Rn → Q, 0010nnnnmmmm0111 — Calculation
  7407. MSB of Rm → M, M^Q → T result
  7408.  
  7409. DIV0U 0 → M/Q/T 0000000000011001 — 0
  7410.  
  7411. DMULS.L Rm,Rn Signed, Rn × Rm → MAC, 0011nnnnmmmm1101 — —
  7412. 32 × 32 → 64 bits
  7413.  
  7414. DMULU.L Rm,Rn Unsigned, Rn × Rm → MAC, 0011nnnnmmmm0101 — —
  7415. 32 × 32 → 64 bits
  7416.  
  7417. DT Rn Rn – 1 → Rn; when Rn = 0, 0100nnnn00010000 — Comparison
  7418. 1 → T result
  7419. When Rn ≠ 0, 0 → T
  7420.  
  7421. EXTS.B Rm,Rn Rm sign-extended from 0110nnnnmmmm1110 — —
  7422. byte → Rn
  7423.  
  7424. 138
  7425.  
  7426. ----------------------- Page 155-----------------------
  7427.  
  7428. Table 7.4 Arithmetic Operation Instructions (cont)
  7429.  
  7430. Instruction Operation Instruction Code Privileged T Bit
  7431.  
  7432. EXTS.W Rm,Rn Rm sign-extended from 0110nnnnmmmm1111 — —
  7433. word → Rn
  7434.  
  7435. EXTU.B Rm,Rn Rm zero-extended from 0110nnnnmmmm1100 — —
  7436. byte → Rn
  7437.  
  7438. EXTU.W Rm,Rn Rm zero-extended from 0110nnnnmmmm1101 — —
  7439. word → Rn
  7440.  
  7441. MAC.L @Rm+,@Rn+ Signed, (Rn) × (Rm) + MAC → 0000nnnnmmmm1111 — —
  7442. MAC
  7443. Rn + 4 → Rn, Rm + 4 → Rm
  7444. 32 × 32 + 64 → 64 bits
  7445.  
  7446. MAC.W @Rm+,@Rn+ Signed, (Rn) × (Rm) + MAC → 0100nnnnmmmm1111 — —
  7447. MAC
  7448. Rn + 2 → Rn, Rm + 2 → Rm
  7449. 16 × 16 + 64 → 64 bits
  7450.  
  7451. MUL.L Rm,Rn Rn × Rm → MACL 0000nnnnmmmm0111 — —
  7452. 32 × 32 → 32 bits
  7453.  
  7454. MULS.W Rm,Rn Signed, Rn × Rm → MACL 0010nnnnmmmm1111 — —
  7455. 16 × 16 → 32 bits
  7456.  
  7457. MULU.W Rm,Rn Unsigned, Rn × Rm → MACL 0010nnnnmmmm1110 — —
  7458. 16 × 16 → 32 bits
  7459.  
  7460. NEG Rm,Rn 0 – Rm → Rn 0110nnnnmmmm1011 — —
  7461.  
  7462. NEGC Rm,Rn 0 – Rm – T → Rn, borrow → T 0110nnnnmmmm1010 — Borrow
  7463.  
  7464. SUB Rm,Rn Rn – Rm → Rn 0011nnnnmmmm1000 — —
  7465.  
  7466. SUBC Rm,Rn Rn – Rm – T → Rn, borrow → T 0011nnnnmmmm1010 — Borrow
  7467.  
  7468. SUBV Rm,Rn Rn – Rm → Rn, underflow → T 0011nnnnmmmm1011 — Underflow
  7469.  
  7470. 139
  7471.  
  7472. ----------------------- Page 156-----------------------
  7473.  
  7474. Table 7.5 Logic Operation Instructions
  7475.  
  7476. Instruction Operation Instruction Code Privileged T Bit
  7477.  
  7478. AND Rm,Rn Rn & Rm → Rn 0010nnnnmmmm1001 — —
  7479.  
  7480. AND #imm,R0 R0 & imm → R0 11001001iiiiiiii — —
  7481.  
  7482. AND.B #imm,@(R0,GBR) (R0 + GBR) & imm → (R0 + 11001101iiiiiiii — —
  7483. GBR)
  7484.  
  7485. NOT Rm,Rn ~Rm → Rn 0110nnnnmmmm0111 — —
  7486.  
  7487. OR Rm,Rn Rn | Rm → Rn 0010nnnnmmmm1011 — —
  7488.  
  7489. OR #imm,R0 R0 | imm → R0 11001011iiiiiiii — —
  7490.  
  7491. OR.B #imm,@(R0,GBR) (R0 + GBR) | imm → (R0 + GBR) 11001111iiiiiiii —
  7492.  
  7493. TAS.B @Rn When (Rn) = 0, 1 → T 0100nnnn00011011 — Test result
  7494. Otherwise, 0 → T
  7495. In both cases, 1 → MSB of (Rn)
  7496.  
  7497. TST Rm,Rn Rn & Rm; when result = 0, 0010nnnnmmmm1000 — Test result
  7498. 1 → T
  7499. Otherwise, 0 → T
  7500.  
  7501. TST #imm,R0 R0 & imm; when result = 0, 11001000iiiiiiii — Test result
  7502. 1 → T
  7503. Otherwise, 0 → T
  7504.  
  7505. TST.B #imm,@(R0,GBR) (R0 + GBR) & imm; when result = 11001100iiiiiiii — Test result
  7506. 0, 1 → T
  7507. Otherwise, 0 → T
  7508.  
  7509. XOR Rm,Rn Rn ∧ Rm → Rn 0010nnnnmmmm1010 — —
  7510.  
  7511. XOR #imm,R0 R0 ∧ imm → R0 11001010iiiiiiii — —
  7512.  
  7513. XOR.B #imm,@(R0,GBR) (R0 + GBR) ∧ imm → (R0 + 11001110iiiiiiii — —
  7514. GBR)
  7515.  
  7516. 140
  7517.  
  7518. ----------------------- Page 157-----------------------
  7519.  
  7520. Table 7.6 Shift Instructions
  7521.  
  7522. Instruction Operation Instruction Code Privileged T Bit
  7523.  
  7524. ROTL Rn T ← Rn ← MSB 0100nnnn00000100 — MSB
  7525.  
  7526. ROTR Rn LSB → Rn → T 0100nnnn00000101 — LSB
  7527.  
  7528. ROTCL Rn T ← Rn ← T 0100nnnn00100100 — MSB
  7529.  
  7530. ROTCR Rn T → Rn → T 0100nnnn00100101 — LSB
  7531.  
  7532. SHAD Rm,Rn When Rn ≥ 0, Rn << Rm → Rn 0100nnnnmmmm1100 — —
  7533. When Rn < 0, Rn >> Rm → [MSB
  7534. → Rn]
  7535.  
  7536. SHAL Rn T ← Rn ← 0 0100nnnn00100000 — MSB
  7537.  
  7538. SHAR Rn MSB → Rn → T 0100nnnn00100001 — LSB
  7539.  
  7540. SHLD Rm,Rn When Rn ≥ 0, Rn << Rm → Rn 0100nnnnmmmm1101 — —
  7541. When Rn < 0, Rn >> Rm →
  7542. [0 → Rn]
  7543.  
  7544. SHLL Rn T ← Rn ← 0 0100nnnn00000000 — MSB
  7545.  
  7546. SHLR Rn 0 → Rn → T 0100nnnn00000001 — LSB
  7547.  
  7548. SHLL2 Rn Rn << 2 → Rn 0100nnnn00001000 — —
  7549.  
  7550. SHLR2 Rn Rn >> 2 → Rn 0100nnnn00001001 — —
  7551.  
  7552. SHLL8 Rn Rn << 8 → Rn 0100nnnn00011000 — —
  7553.  
  7554. SHLR8 Rn Rn >> 8 → Rn 0100nnnn00011001 — —
  7555.  
  7556. SHLL16 Rn Rn << 16 → Rn 0100nnnn00101000 — —
  7557.  
  7558. SHLR16 Rn Rn >> 16 → Rn 0100nnnn00101001 — —
  7559.  
  7560. 141
  7561.  
  7562. ----------------------- Page 158-----------------------
  7563.  
  7564. Table 7.7 Branch Instructions
  7565.  
  7566. Instruction Operation Instruction Code Privileged T Bit
  7567.  
  7568. BF label When T = 0, disp × 2 + PC + 10001011dddddddd — —
  7569. 4 → PC
  7570. When T = 1, nop
  7571.  
  7572. BF/S label Delayed branch; when T = 0, disp 10001111dddddddd — —
  7573. × 2 + PC + 4 → PC
  7574. When T = 1, nop
  7575.  
  7576. BT label When T = 1, disp × 2 + PC + 10001001dddddddd — —
  7577. 4 → PC
  7578. When T = 0, nop
  7579.  
  7580. BT/S label Delayed branch; when T = 1, disp 10001101dddddddd — —
  7581. × 2 + PC + 4 → PC
  7582. When T = 0, nop
  7583.  
  7584. BRA label Delayed branch, disp × 2 + 1010dddddddddddd — —
  7585. PC + 4 → PC
  7586.  
  7587. BRAF Rn Rn + PC + 4 → PC 0000nnnn00100011 — —
  7588.  
  7589. BSR label Delayed branch, PC + 4 → PR, 1011dddddddddddd — —
  7590. disp × 2 + PC + 4 → PC
  7591.  
  7592. BSRF Rn Delayed branch, PC + 4 → PR, Rn 0000nnnn00000011 — —
  7593. + PC + 4 → PC
  7594.  
  7595. JMP @Rn Delayed branch, Rn → PC 0100nnnn00101011 — —
  7596.  
  7597. JSR @Rn Delayed branch, PC + 4 → PR, Rn 0100nnnn00001011 — —
  7598. → PC
  7599.  
  7600. RTS Delayed branch, PR → PC 0000000000001011 — —
  7601.  
  7602. 142
  7603.  
  7604. ----------------------- Page 159-----------------------
  7605.  
  7606. Table 7.8 System Control Instructions
  7607.  
  7608. Instruction Operation Instruction Code Privileged T Bit
  7609.  
  7610. CLRMAC 0 → MACH, MACL 0000000000101000 — —
  7611.  
  7612. CLRS 0 → S 0000000001001000 — —
  7613.  
  7614. CLRT 0 → T 0000000000001000 — 0
  7615.  
  7616. LDC Rm,SR Rm → SR 0100mmmm00001110 Privileged LSB
  7617.  
  7618. LDC Rm,GBR Rm → GBR 0100mmmm00011110 — —
  7619.  
  7620. LDC Rm,VBR Rm → VBR 0100mmmm00101110 Privileged —
  7621.  
  7622. LDC Rm,SSR Rm → SSR 0100mmmm00111110 Privileged —
  7623.  
  7624. LDC Rm,SPC Rm → SPC 0100mmmm01001110 Privileged —
  7625.  
  7626. LDC Rm,DBR Rm → DBR 0100mmmm11111010 Privileged —
  7627.  
  7628. LDC Rm,Rn_BANK Rm → Rn_BANK (n = 0 to 7) 0100mmmm1nnn1110 Privileged —
  7629.  
  7630. LDC.L @Rm+,SR (Rm) → SR, Rm + 4 → Rm 0100mmmm00000111 Privileged LSB
  7631.  
  7632. LDC.L @Rm+,GBR (Rm) → GBR, Rm + 4 → Rm 0100mmmm00010111 — —
  7633.  
  7634. LDC.L @Rm+,VBR (Rm) → VBR, Rm + 4 → Rm 0100mmmm00100111 Privileged —
  7635.  
  7636. LDC.L @Rm+,SSR (Rm) → SSR, Rm + 4 → Rm 0100mmmm00110111 Privileged —
  7637.  
  7638. LDC.L @Rm+,SPC (Rm) → SPC, Rm + 4 → Rm 0100mmmm01000111 Privileged —
  7639.  
  7640. LDC.L @Rm+,DBR (Rm) → DBR, Rm + 4 → Rm 0100mmmm11110110 Privileged —
  7641.  
  7642. LDC.L @Rm+,Rn_BANK (Rm) → Rn_BANK, 0100mmmm1nnn0111 Privileged —
  7643. Rm + 4 → Rm
  7644.  
  7645. LDS Rm,MACH Rm → MACH 0100mmmm00001010 — —
  7646.  
  7647. LDS Rm,MACL Rm → MACL 0100mmmm00011010 — —
  7648.  
  7649. LDS Rm,PR Rm → PR 0100mmmm00101010 — —
  7650.  
  7651. LDS.L @Rm+,MACH (Rm) → MACH, Rm + 4 → Rm 0100mmmm00000110 — —
  7652.  
  7653. LDS.L @Rm+,MACL (Rm) → MACL, Rm + 4 → Rm 0100mmmm00010110 — —
  7654.  
  7655. LDS.L @Rm+,PR (Rm) → PR, Rm + 4 → Rm 0100mmmm00100110 — —
  7656.  
  7657. LDTLB PTEH/PTEL → TLB 0000000000111000 Privileged —
  7658.  
  7659. MOVCA.L R0,@Rn R0 → (Rn) (without fetching cache 0000nnnn11000011 — —
  7660. block)
  7661.  
  7662. NOP No operation 0000000000001001 — —
  7663.  
  7664. OCBI @Rn Invalidates operand cache block 0000nnnn10010011 — —
  7665.  
  7666. OCBP @Rn Writes back and invalidates 0000nnnn10100011 — —
  7667. operand cache block
  7668.  
  7669. OCBWB @Rn Writes back operand cache block 0000nnnn10110011 — —
  7670.  
  7671. PREF @Rn (Rn) → operand cache 0000nnnn10000011 — —
  7672.  
  7673. RTE Delayed branch, SSR/SPC → 0000000000101011 Privileged —
  7674. SR/PC
  7675.  
  7676. 143
  7677.  
  7678. ----------------------- Page 160-----------------------
  7679.  
  7680. Table 7.8 System Control Instructions (cont)
  7681.  
  7682. Instruction Operation Instruction Code Privileged T Bit
  7683.  
  7684. SETS 1 → S 0000000001011000 — —
  7685.  
  7686. SETT 1 → T 0000000000011000 — 1
  7687.  
  7688. SLEEP Sleep or standby 0000000000011011 Privileged —
  7689.  
  7690. STC SR,Rn SR → Rn 0000nnnn00000010 Privileged —
  7691.  
  7692. STC GBR,Rn GBR → Rn 0000nnnn00010010 — —
  7693.  
  7694. STC VBR,Rn VBR → Rn 0000nnnn00100010 Privileged —
  7695.  
  7696. STC SSR,Rn SSR → Rn 0000nnnn00110010 Privileged —
  7697.  
  7698. STC SPC,Rn SPC → Rn 0000nnnn01000010 Privileged —
  7699.  
  7700. STC SGR,Rn SGR → Rn 0000nnnn00111010 Privileged —
  7701.  
  7702. STC DBR,Rn DBR → Rn 0000nnnn11111010 Privileged —
  7703.  
  7704. STC Rm_BANK,Rn Rm_BANK → Rn (m = 0 to 7) 0000nnnn1mmm0010 Privileged —
  7705.  
  7706. STC.L SR,@-Rn Rn – 4 → Rn, SR → (Rn) 0100nnnn00000011 Privileged —
  7707.  
  7708. STC.L GBR,@-Rn Rn – 4 → Rn, GBR → (Rn) 0100nnnn00010011 — —
  7709.  
  7710. STC.L VBR,@-Rn Rn – 4 → Rn, VBR → (Rn) 0100nnnn00100011 Privileged —
  7711.  
  7712. STC.L SSR,@-Rn Rn – 4 → Rn, SSR → (Rn) 0100nnnn00110011 Privileged —
  7713.  
  7714. STC.L SPC,@-Rn Rn – 4 → Rn, SPC → (Rn) 0100nnnn01000011 Privileged —
  7715.  
  7716. STC.L SGR,@-Rn Rn – 4 → Rn, SGR → (Rn) 0100nnnn00110010 Privileged —
  7717.  
  7718. STC.L DBR,@-Rn Rn – 4 → Rn, DBR → (Rn) 0100nnnn11110010 Privileged —
  7719.  
  7720. STC.L Rm_BANK,@-Rn Rn – 4 → Rn, 0100nnnn1mmm0011 Privileged —
  7721. Rm_BANK → (Rn) (m = 0 to 7)
  7722.  
  7723. STS MACH,Rn MACH → Rn 0000nnnn00001010 — —
  7724.  
  7725. STS MACL,Rn MACL → Rn 0000nnnn00011010 — —
  7726.  
  7727. STS PR,Rn PR → Rn 0000nnnn00101010 — —
  7728.  
  7729. STS.L MACH,@-Rn Rn – 4 → Rn, MACH → (Rn) 0100nnnn00000010 — —
  7730.  
  7731. STS.L MACL,@-Rn Rn – 4 → Rn, MACL → (Rn) 0100nnnn00010010 — —
  7732.  
  7733. STS.L PR,@-Rn Rn – 4 → Rn, PR → (Rn) 0100nnnn00100010 — —
  7734.  
  7735. TRAPA #imm PC + 2 → SPC, SR → SSR, 11000011iiiiiiii — —
  7736. #imm << 2 → TRA,
  7737. H'160 → EXPEVT,
  7738. VBR + H'0100 → PC
  7739.  
  7740. 144
  7741.  
  7742. ----------------------- Page 161-----------------------
  7743.  
  7744. Table 7.9 Floating-Point Single-Precision Instructions
  7745.  
  7746. Instruction Operation Instruction Code Privileged T Bit
  7747.  
  7748. FLDI0 FRn H'00000000 → FRn 1111nnnn10001101 — —
  7749.  
  7750. FLDI1 FRn H'3F800000 → FRn 1111nnnn10011101 — —
  7751.  
  7752. FMOV FRm,FRn FRm → FRn 1111nnnnmmmm1100 — —
  7753.  
  7754. FMOV.S @Rm,FRn (Rm) → FRn 1111nnnnmmmm1000 — —
  7755.  
  7756. FMOV.S @(R0,Rm),FRn (R0 + Rm) → FRn 1111nnnnmmmm0110 — —
  7757.  
  7758. FMOV.S @Rm+,FRn (Rm) → FRn, Rm + 4 → Rm 1111nnnnmmmm1001 — —
  7759.  
  7760. FMOV.S FRm,@Rn FRm → (Rn) 1111nnnnmmmm1010 — —
  7761.  
  7762. FMOV.S FRm,@-Rn Rn-4 → Rn, FRm → (Rn) 1111nnnnmmmm1011 — —
  7763.  
  7764. FMOV.S FRm,@(R0,Rn) FRm → (R0 + Rn) 1111nnnnmmmm0111 — —
  7765.  
  7766. FMOV DRm,DRn DRm → DRn 1111nnn0mmm01100 — —
  7767.  
  7768. FMOV @Rm,DRn (Rm) → DRn 1111nnn0mmmm1000 — —
  7769.  
  7770. FMOV @(R0,Rm),DRn (R0 + Rm) → DRn 1111nnn0mmmm0110 — —
  7771.  
  7772. FMOV @Rm+,DRn (Rm) → DRn, Rm + 8 → Rm 1111nnn0mmmm1001 — —
  7773.  
  7774. FMOV DRm,@Rn DRm → (Rn) 1111nnnnmmm01010 — —
  7775.  
  7776. FMOV DRm,@-Rn Rn-8 → Rn, DRm → (Rn) 1111nnnnmmm01011 — —
  7777.  
  7778. FMOV DRm,@(R0,Rn) DRm → (R0 + Rn) 1111nnnnmmm00111 — —
  7779.  
  7780. FLDS FRm,FPUL FRm → FPUL 1111mmmm00011101 — —
  7781.  
  7782. FSTS FPUL,FRn FPUL → FRn 1111nnnn00001101 — —
  7783.  
  7784. FABS FRn FRn & H'7FFF FFFF → FRn 1111nnnn01011101 — —
  7785.  
  7786. FADD FRm,FRn FRn + FRm → FRn 1111nnnnmmmm0000 — —
  7787.  
  7788. FCMP/EQ FRm,FRn When FRn = FRm, 1 → T 1111nnnnmmmm0100 — Comparison
  7789. Otherwise, 0 → T result
  7790.  
  7791. FCMP/GT FRm,FRn When FRn > FRm, 1 → T 1111nnnnmmmm0101 — Comparison
  7792. Otherwise, 0 → T result
  7793.  
  7794. FDIV FRm,FRn FRn/FRm → FRn 1111nnnnmmmm0011 — —
  7795.  
  7796. FLOAT FPUL,FRn (float) FPUL → FRn 1111nnnn00101101 — —
  7797.  
  7798. FMAC FR0,FRm,FRn FR0*FRm + FRn → FRn 1111nnnnmmmm1110 — —
  7799.  
  7800. FMUL FRm,FRn FRn*FRm → FRn 1111nnnnmmmm0010 — —
  7801.  
  7802. FNEG FRn FRn ∧ H'80000000 → FRn 1111nnnn01001101 — —
  7803.  
  7804. FSQRT FRn √FRn → FRn 1111nnnn01101101 — —
  7805.  
  7806. FSUB FRm,FRn FRn – FRm → FRn 1111nnnnmmmm0001 — —
  7807.  
  7808. FTRC FRm,FPUL (long) FRm → FPUL 1111mmmm00111101 — —
  7809.  
  7810. 145
  7811.  
  7812. ----------------------- Page 162-----------------------
  7813.  
  7814. Table 7.10Floating-Point Double-Precision Instructions
  7815.  
  7816. Instruction Operation Instruction Code Privileged T Bit
  7817.  
  7818. FABS DRn DRn & H'7FFF FFFF FFFF FFFF1111nnn001011101 — —
  7819. → DRn
  7820.  
  7821. FADD DRm,DRn DRn + DRm → DRn 1111nnn0mmm00000 — —
  7822.  
  7823. FCMP/EQ DRm,DRn When DRn = DRm, 1 → T 1111nnn0mmm00100 — Comparison
  7824. Otherwise, 0 → T result
  7825.  
  7826. FCMP/GT DRm,DRn When DRn > DRm, 1 → T 1111nnn0mmm00101 — Comparison
  7827. Otherwise, 0 → T result
  7828.  
  7829. FDIV DRm,DRn DRn /DRm → DRn 1111nnn0mmm00011 — —
  7830.  
  7831. FCNVDS DRm,FPUL double_to_ float[DRm] → FPUL 1111mmm010111101 — —
  7832.  
  7833. FCNVSD FPUL,DRn float_to_ double [FPUL] → DRn 1111nnn010101101 — —
  7834.  
  7835. FLOAT FPUL,DRn (float)FPUL → DRn 1111nnn000101101 — —
  7836.  
  7837. FMUL DRm,DRn DRn *DRm → DRn 1111nnn0mmm00010 — —
  7838.  
  7839. FNEG DRn DRn ^ H'8000 0000 0000 0000 → 1111nnn001001101 — —
  7840. DRn
  7841.  
  7842. FSQRT DRn √DRn → DRn 1111nnn001101101 — —
  7843.  
  7844. FSUB DRm,DRn DRn – DRm → DRn 1111nnn0mmm00001 — —
  7845.  
  7846. FTRC DRm,FPUL (long) DRm → FPUL 1111mmm000111101 — —
  7847.  
  7848. Table 7.11Floating-Point Control Instructions
  7849.  
  7850. Instruction Operation Instruction Code Privileged T Bit
  7851.  
  7852. LDS Rm,FPSCR Rm → FPSCR 0100mmmm01101010 — —
  7853.  
  7854. LDS Rm,FPUL Rm → FPUL 0100mmmm01011010 — —
  7855.  
  7856. LDS.L @Rm+,FPSCR (Rm) → FPSCR, Rm+4 → Rm 0100mmmm01100110 — —
  7857.  
  7858. LDS.L @Rm+,FPUL (Rm) → FPUL, Rm+4 → Rm 0100mmmm01010110 — —
  7859.  
  7860. STS FPSCR,Rn FPSCR → Rn 0000nnnn01101010 — —
  7861.  
  7862. STS FPUL,Rn FPUL → Rn 0000nnnn01011010 — —
  7863.  
  7864. STS.L FPSCR,@-Rn Rn – 4 → Rn, FPSCR → (Rn) 0100nnnn01100010 — —
  7865.  
  7866. STS.L FPUL,@-Rn Rn – 4 → Rn, FPUL → (Rn) 0100nnnn01010010 — —
  7867.  
  7868. 146
  7869.  
  7870. ----------------------- Page 163-----------------------
  7871.  
  7872. Table 7.12Floating-Point Graphics Acceleration Instructions
  7873.  
  7874. Instruction Operation Instruction Code Privileged T Bit
  7875.  
  7876. FMOV DRm,XDn DRm → XDn 1111nnn1mmm01100 — —
  7877.  
  7878. FMOV XDm,DRn XDm → DRn 1111nnn0mmm11100 — —
  7879.  
  7880. FMOV XDm,XDn XDm → XDn 1111nnn1mmm11100 — —
  7881.  
  7882. FMOV @Rm,XDn (Rm) → XDn 1111nnn1mmmm1000 — —
  7883.  
  7884. FMOV @Rm+,XDn (Rm) → XDn, Rm + 8 → Rm 1111nnn1mmmm1001 — —
  7885.  
  7886. FMOV @(R0,Rm),XDn (R0 + Rm) → XDn 1111nnn1mmmm0110 — —
  7887.  
  7888. FMOV XDm,@Rn XDm → (Rn) 1111nnnnmmm11010 — —
  7889.  
  7890. FMOV XDm,@-Rn Rn – 8 → Rn, XDm → (Rn) 1111nnnnmmm11011 — —
  7891.  
  7892. FMOV XDm,@(R0,Rn) XDm → (R0+Rn) 1111nnnnmmm10111 — —
  7893.  
  7894. FIPR FVm,FVn inner_product [FVm, FVn] → 1111nnmm11101101 — —
  7895. FR[n+3]
  7896.  
  7897. FTRV XMTRX,FVn transform_vector [XMTRX, FVn] 1111nn0111111101 — —
  7898. → FVn
  7899.  
  7900. FRCHG ~F PSCR .FR → SPFCR.FR 1111101111111101 — —
  7901.  
  7902. FSCHG ~F PSCR .SZ → SPFCR.SZ 1111001111111101 — —
  7903.  
  7904. 147
  7905.  
  7906. ----------------------- Page 164-----------------------
  7907.  
  7908. 148
  7909.  
  7910. ----------------------- Page 165-----------------------
  7911.  
  7912. Section 8 Pipelining
  7913.  
  7914. The SH7750 is a 2-ILP (instruction-level-parallelism) superscalar pipelining microprocessor.
  7915. Instruction execution is pipelined, and two instructions can be executed in parallel. The execution
  7916. cycles depend on the implementation of a processor. Definitions in this section may not be
  7917. applicable to SH-4 Series models other than the SH7750.
  7918.  
  7919. 8 . 1 Pipelines
  7920.  
  7921. Figure 8.1 shows the basic pipelines. Normally, a pipeline consists of five or six stages:
  7922. instruction fetch (I), decode and register read (D), execution (EX/SX/F0/F1/F2/F3), data access
  7923. (NA/MA), and write-back (S/FS). An instruction is executed as a combination of basic pipelines.
  7924. Figure 8.2 shows the instruction execution patterns.
  7925.  
  7926. 149
  7927.  
  7928. ----------------------- Page 166-----------------------
  7929.  
  7930. 1. General Pipeline
  7931.  
  7932. I D EX NA S
  7933.  
  7934. • Instruction fetch •Instruction • Operation • Non-memory • Write-back
  7935. decode data access
  7936. •Issue
  7937. •Register read
  7938. •Destination address calculation
  7939. for PC-relative branch
  7940.  
  7941. 2. General Load/Store Pipeline
  7942.  
  7943. I D EX MA S
  7944.  
  7945. • Instruction fetch •Instruction • Address • Memory • Write-back
  7946. decode calculation data access
  7947. • Issue
  7948. • Register read
  7949.  
  7950. 3. Special Pipeline
  7951.  
  7952. I D SX NA S
  7953.  
  7954. • Instruction fetch •Instruction • Operation • Non-memory • Write-back
  7955. decode data access
  7956. • Issue
  7957. • Register read
  7958.  
  7959. 4. Special Load/Store Pipeline
  7960.  
  7961. I D SX MA S
  7962.  
  7963. • Instruction fetch •Instruction • Address • Memory • Write-back
  7964. decode calculation data access
  7965. • Issue
  7966. • Register read
  7967.  
  7968. 5. Floating-Point Pipeline
  7969.  
  7970. I D F1 F2 FS
  7971.  
  7972. • Instruction fetch •Instruction • Computation 1 • Computation 2 • Computation 3
  7973. decode • Write-back
  7974. • Issue
  7975. • Register read
  7976.  
  7977. 6. Floating-Point Extended Pipeline
  7978.  
  7979. I D F0 F1 F2 FS
  7980.  
  7981. • Instruction fetch •Instruction • Computation 0 • Computation 1 • Computation 2 • Computation 3
  7982. decode • Write-back
  7983. • Issue
  7984. • Register read
  7985.  
  7986. 7. FDIV/FSQRT Pipeline
  7987.  
  7988. F3
  7989.  
  7990. Computation: Takes several cycles
  7991.  
  7992. Figure 8.1 Basic Pipelines
  7993.  
  7994. 150
  7995.  
  7996. ----------------------- Page 167-----------------------
  7997.  
  7998. 1. 1-step operation: 1 issue cycle
  7999. EXT[SU].[BW], MOV, MOV#, MOVA, MOVT, SWAP.[BW], XTRCT, ADD*, CMP*,
  8000. DIV*, DT, NEG*, SUB*, AND, AND#, NOT, OR, OR#, TST, TST#, XOR, XOR#,
  8001. ROT*, SHA*, SHL*, BF*, BT*, BRA, NOP, CLRS, CLRT, SETS, SETT,
  8002. LDS to FPUL, STS from FPUL/FPSCR, FLDI0, FLDI1, FMOV, FLDS, FSTS,
  8003. single-/double-precision FABS/FNEG
  8004.  
  8005. I D EX NA S
  8006.  
  8007. 2. Load/store: 1 issue cycle
  8008. MOV.[BWL]. FMOV*@, LDS.L to FPUL, LDTLB, PREF, STS.L from FPUL/FPSCR
  8009. I D EX MA S
  8010.  
  8011. 3. GBR-based load/store: 1 issue cycle
  8012. MOV.[BWL]@(d,GBR)
  8013.  
  8014. I D SX MA S
  8015.  
  8016. 4. JMP, RTS, BRAF: 2 issue cycles
  8017.  
  8018. I D EX NA S
  8019. D EX NA S
  8020.  
  8021. 5. TST.B: 3 issue cycles
  8022.  
  8023. I D SX MA S
  8024. D SX NA S
  8025. D SX NA S
  8026.  
  8027. 6. AND.B, OR.B, XOR.B: 4 issue cycles
  8028.  
  8029. I D SX MA S
  8030. D SX NA S
  8031. D SX NA S
  8032. D SX MA S
  8033.  
  8034. 7. TAS.B: 5 issue cycles
  8035.  
  8036. I D EX MA S
  8037. D EX MA S
  8038. D EX NA S
  8039. D EX NA S
  8040. D EX MA S
  8041.  
  8042. 8. RTE: 5 issue cycles
  8043.  
  8044. I D EX NA S
  8045. D EX NA S
  8046. D EX NA S
  8047. D EX NA S
  8048. D EX NA S
  8049.  
  8050. 9. SLEEP: 4 issue cycles
  8051.  
  8052. I D EX NA S
  8053. D EX NA S
  8054. D EX NA S
  8055. D EX NA S
  8056.  
  8057. Figure 8.2 Instruction Execution Patterns
  8058.  
  8059. 151
  8060.  
  8061. ----------------------- Page 168-----------------------
  8062.  
  8063. 10. OCBI: 1 issue cycle
  8064.  
  8065. I D EX MA S
  8066. MA
  8067.  
  8068. 11. OCBP, OCBWB: 1 issue cycle
  8069.  
  8070. I D EX MA S
  8071. MA
  8072. MA
  8073. MA
  8074. MA
  8075.  
  8076. 12. MOVCA.L: 1 issue cycle
  8077.  
  8078. I D EX MA S
  8079. MA
  8080. MA
  8081. MA
  8082. MA
  8083.  
  8084. MA
  8085. MA
  8086.  
  8087. 13. TRAPA: 7 issue cycles
  8088.  
  8089. I D EX NA S
  8090. D EX NA S
  8091. D EX NA S
  8092. D EX NA S
  8093. D EX NA S
  8094. D EX NA S
  8095. D EX NA S
  8096.  
  8097. 14. CR definition: 1 issue cycle
  8098. LDC to DBR/Rp_BANK/SSR/SPC/VBR, BSR
  8099.  
  8100. I D EX NA S
  8101. SX
  8102. SX
  8103.  
  8104. 15. LDC to GBR: 3 issue cycles
  8105.  
  8106. I D EX NA S
  8107. D SX
  8108. D SX
  8109.  
  8110. 16. LDC to SR: 4 issue cycles
  8111.  
  8112. I D EX NA S
  8113. D SX
  8114. D SX
  8115. D SX
  8116.  
  8117. 17. LDC.L to DBR/Rp_BANK/SSR/SPC/VBR: 1 issue cycle
  8118.  
  8119. I D EX MA S
  8120. SX
  8121. SX
  8122.  
  8123. 18. LDC.L to GBR: 3 issue cycles
  8124. I D EX MA S
  8125. D SX
  8126. D SX
  8127.  
  8128. Figure 8.2 Instruction Execution Patterns (cont)
  8129.  
  8130. 152
  8131.  
  8132. ----------------------- Page 169-----------------------
  8133.  
  8134. 19. LDC.L to SR: 4 issue cycles
  8135.  
  8136. I D EX MA S
  8137. D SX
  8138. D SX
  8139. D SX
  8140.  
  8141. 20. STC from DBR/GBR/Rp_BANK/SR/SSR/SPC/VBR: 2 issue cycles
  8142. D
  8143. I SX NA S
  8144. D SX NA S
  8145.  
  8146. 21. STC.L from SGR: 3 issue cycles
  8147. D
  8148. I SX NA S
  8149. D SX NA S
  8150. D SX NA S
  8151.  
  8152. 22. STC.L from DBR/GBR/Rp_BANK/SR/SSR/SPC/VBR: 2 issue cycles
  8153.  
  8154. I D SX NA S
  8155. D SX MA S
  8156.  
  8157. 23. STC.L from SGR: 3 issue cycles
  8158. D
  8159. I SX NA S
  8160. D SX NA S
  8161. D SX MA S
  8162.  
  8163. 24. LDS to PR, JSR, BSRF: 2 issue cycles
  8164.  
  8165. I D EX NA S
  8166. D SX
  8167. SX
  8168.  
  8169. 25. LDS.L to PR: 2 issue cycles
  8170.  
  8171. I D EX MA S
  8172. D SX
  8173. SX
  8174.  
  8175. 26. STS from PR: 2 issue cycles
  8176. I D SX NA S
  8177. D SX NA S
  8178.  
  8179. 27. STS.L from PR: 2 issue cycles
  8180.  
  8181. I D SX NA S
  8182. D SX MA S
  8183.  
  8184. 28. MACH/L definition: 1 issue cycle
  8185. CLRMAC, LDS to MACH/L
  8186. I D EX NA S
  8187. F1
  8188. F1 F2 FS
  8189.  
  8190. 29. LDS.L to MACH/L: 1 issue cycle
  8191. I D EX MA S
  8192. F1
  8193. F1 F2 FS
  8194.  
  8195. 30. STS from MACH/L: 1 issue cycle
  8196. I D EX NA S
  8197.  
  8198. Figure 8.2 Instruction Execution Patterns (cont)
  8199.  
  8200. 153
  8201.  
  8202. ----------------------- Page 170-----------------------
  8203.  
  8204. 31. STS.L from MACH/L: 1 issue cycle
  8205. I D EX MA S
  8206.  
  8207. 32. LDS to FPSCR: 1 issue cycle
  8208.  
  8209. I D EX NA S
  8210. F1
  8211. F1
  8212. F1
  8213.  
  8214. 33. LDS.L to FPSCR: 1 issue cycle
  8215.  
  8216. I D EX MA S
  8217. F1
  8218. F1
  8219. F1
  8220.  
  8221. 34. Fixed-point multiplication: 2 issue cycles
  8222. DMULS.L, DMULU.L, MUL.L, MULS.W, MULU.W
  8223. I D EX NA S (CPU)
  8224. D EX NA S
  8225.  
  8226. f1 (FPU)
  8227. f1
  8228. f1
  8229. f1 F2 FS
  8230.  
  8231. 35. MAC.W, MAC.L: 2 issue cycles
  8232. I D EX MA S (CPU)
  8233. D EX MA S
  8234.  
  8235. f1 (FPU)
  8236. f1
  8237. f1
  8238.  
  8239. f1 F2 FS
  8240.  
  8241. 36. Single-precision floating-point computation: 1 issue cycle
  8242. FCMP/EQ,FCMP/GT, FADD,FLOAT,FMAC,FMUL,FSUB,FTRC,FRCHG,FSCHG
  8243.  
  8244. I D F1 F2 FS
  8245.  
  8246. 37. Single-precision FDIV/SQRT: 1 issue cycle
  8247.  
  8248. I D F1 F2 FS
  8249. F3
  8250.  
  8251. F1 F2 FS
  8252.  
  8253. 38. Double-precision floating-point computation 1: 1 issue cycle
  8254. FCNVDS, FCNVSD, FLOAT, FTRC
  8255.  
  8256. I D F1 F2 FS
  8257. d F1 F2 FS
  8258.  
  8259. 39. Double-precision floating-point computation 2: 1 issue cycle
  8260. FADD, FMUL, FSUB
  8261.  
  8262. I D F1 F2 FS
  8263. d F1 F2 FS
  8264. d F1 F2 FS
  8265. d F1 F2 FS
  8266. d F1 F2 FS
  8267. F1 F2 FS
  8268.  
  8269. Figure 8.2 Instruction Execution Patterns (cont)
  8270.  
  8271. 154
  8272.  
  8273. ----------------------- Page 171-----------------------
  8274.  
  8275. 40. Double-precision FCMP: 2 issue cycles
  8276. FCMP/EQ,FCMP/GT
  8277.  
  8278. I D F1 F2 FS
  8279. D F1 F2 FS
  8280.  
  8281. 41. Double-precision FDIV/SQRT: 1 issue cycle
  8282. FDIV, FSQRT
  8283.  
  8284. I D F1 F2 FS
  8285. d F1 F2
  8286. F3
  8287. F1 F2
  8288. FS
  8289. F1 F2
  8290. FS
  8291. F1 F2
  8292. FS
  8293. 42. FIPR: 1 issue cycle
  8294.  
  8295. I D F0 F1 F2 FS
  8296.  
  8297. 43. FTRV: 1 issue cycle
  8298.  
  8299. I D F0 F1 F2 FS
  8300. d F0 F1 F2 FS
  8301. d F0 F1 F2 FS
  8302. d F0 F1 F2 FS
  8303.  
  8304. Notes: ?? : Cannot overlap a stage of the same kind, except when two instructions are
  8305. executed in parallel.
  8306.  
  8307. D : Locks D-stage
  8308.  
  8309. d : Register read only
  8310.  
  8311. ?? : Locks, but no operation is executed.
  8312.  
  8313. f1 : Can overlap another f1, but not another F1.
  8314.  
  8315. Figure 8.2 Instruction Execution Patterns (cont)
  8316.  
  8317. 155
  8318.  
  8319. ----------------------- Page 172-----------------------
  8320.  
  8321. 8 . 2 Parallel-Executability
  8322.  
  8323. Instructions are categorized into six groups according to the internal function blocks used, as
  8324. shown in table 8.1. Table 8.2 shows the parallel-executability of pairs of instructions in terms of
  8325. groups. For example, ADD in the EX group and BRA in the BR group can be executed in parallel.
  8326.  
  8327. Table 8.1 Instruction Groups
  8328.  
  8329. 1. MT Group
  8330.  
  8331. CLRT CMP/HI Rm,Rn MOV Rm,Rn
  8332.  
  8333. CMP/EQ #imm,R0 CMP/HS Rm,Rn NOP
  8334.  
  8335. CMP/EQ Rm,Rn CMP/PL Rn SETT
  8336.  
  8337. CMP/GE Rm,Rn CMP/PZ Rn TST #imm,R0
  8338.  
  8339. CMP/GT Rm,Rn CMP/STR Rm,Rn TST Rm,Rn
  8340.  
  8341. 2. EX Group
  8342.  
  8343. ADD #imm,Rn MOVT Rn SHLL2 Rn
  8344.  
  8345. ADD Rm,Rn NEG Rm,Rn SHLL8 Rn
  8346.  
  8347. ADDC Rm,Rn NEGC Rm,Rn SHLR Rn
  8348.  
  8349. ADDV Rm,Rn NOT Rm,Rn SHLR16 Rn
  8350.  
  8351. AND #imm,R0 OR #imm,R0 SHLR2 Rn
  8352.  
  8353. AND Rm,Rn OR Rm,Rn SHLR8 Rn
  8354.  
  8355. DIV0S Rm,Rn ROTCL Rn SUB Rm,Rn
  8356.  
  8357. DIV0U ROTCR Rn SUBC Rm,Rn
  8358.  
  8359. DIV1 Rm,Rn ROTL Rn SUBV Rm,Rn
  8360.  
  8361. DT Rn ROTR Rn SWAP.B Rm,Rn
  8362.  
  8363. EXTS.B Rm,Rn SHAD Rm,Rn SWAP.W Rm,Rn
  8364.  
  8365. EXTS.W Rm,Rn SHAL Rn XOR #imm,R0
  8366.  
  8367. EXTU.B Rm,Rn SHAR Rn XOR Rm,Rn
  8368.  
  8369. EXTU.W Rm,Rn SHLD Rm,Rn XTRCT Rm,Rn
  8370.  
  8371. MOV #imm,Rn SHLL Rn
  8372.  
  8373. MOVA @(disp,PC),R0 SHLL16 Rn
  8374.  
  8375. 3. BR Group
  8376.  
  8377. BF disp BRA disp BT disp
  8378.  
  8379. BF/S disp BSR disp BT/S disp
  8380.  
  8381. 156
  8382.  
  8383. ----------------------- Page 173-----------------------
  8384.  
  8385. Table 8.1 Instruction Groups (cont)
  8386.  
  8387. 4. LS Group
  8388.  
  8389. FABS DRn FMOV.S @Rm+,FRn MOV.L R0,@(disp,GBR)
  8390.  
  8391. FABS FRn FMOV.S FRm,@(R0,Rn) MOV.L Rm,@(disp,Rn)
  8392.  
  8393. FLDI0 FRn FMOV.S FRm,@-Rn MOV.L Rm,@(R0,Rn)
  8394.  
  8395. FLDI1 FRn FMOV.S FRm,@Rn MOV.L Rm,@-Rn
  8396.  
  8397. FLDS FRm,FPUL FNEG DRn MOV.L Rm,@Rn
  8398.  
  8399. FMOV @(R0,Rm),DRn FNEG FRn MOV.W @(disp,GBR),R0
  8400.  
  8401. FMOV @(R0,Rm),XDn FSTS FPUL,FRn MOV.W @(disp,PC),Rn
  8402.  
  8403. FMOV @Rm,DRn LDS Rm,FPUL MOV.W @(disp,Rm),R0
  8404.  
  8405. FMOV @Rm,XDn MOV.B @(disp,GBR),R0 MOV.W @(R0,Rm),Rn
  8406.  
  8407. FMOV @Rm+,DRn MOV.B @(disp,Rm),R0 MOV.W @Rm,Rn
  8408.  
  8409. FMOV @Rm+,XDn MOV.B @(R0,Rm),Rn MOV.W @Rm+,Rn
  8410.  
  8411. FMOV DRm,@(R0,Rn) MOV.B @Rm,Rn MOV.W R0,@(disp,GBR)
  8412.  
  8413. FMOV DRm,@-Rn MOV.B @Rm+,Rn MOV.W R0,@(disp,Rn)
  8414.  
  8415. FMOV DRm,@Rn MOV.B R0,@(disp,GBR) MOV.W Rm,@(R0,Rn)
  8416.  
  8417. FMOV DRm,DRn MOV.B R0,@(disp,Rn) MOV.W Rm,@-Rn
  8418.  
  8419. FMOV DRm,XDn MOV.B Rm,@(R0,Rn) MOV.W Rm,@Rn
  8420.  
  8421. FMOV FRm,FRn MOV.B Rm,@-Rn MOVCA.L R0,@Rn
  8422.  
  8423. FMOV XDm,@(R0,Rn) MOV.B Rm,@Rn OCBI @Rn
  8424.  
  8425. FMOV XDm,@-Rn MOV.L @(disp,GBR),R0 OCBP @Rn
  8426.  
  8427. FMOV XDm,@Rn MOV.L @(disp,PC),Rn OCBWB @Rn
  8428.  
  8429. FMOV XDm,DRn MOV.L @(disp,Rm),Rn PREF @Rn
  8430.  
  8431. FMOV XDm,XDn MOV.L @(R0,Rm),Rn STS FPUL,Rn
  8432.  
  8433. FMOV.S @(R0,Rm),FRn MOV.L @Rm,Rn
  8434.  
  8435. FMOV.S @Rm,FRn MOV.L @Rm+,Rn
  8436.  
  8437. 157
  8438.  
  8439. ----------------------- Page 174-----------------------
  8440.  
  8441. Table 8.1 Instruction Groups (cont)
  8442.  
  8443. 5. FE Group
  8444.  
  8445. FADD DRm,DRn FIPR FVm,FVn FSQRT DRn
  8446.  
  8447. FADD FRm,FRn FLOAT FPUL,DRn FSQRT FRn
  8448.  
  8449. FCMP/EQ FRm,FRn FLOAT FPUL,FRn FSUB DRm,DRn
  8450.  
  8451. FCMP/GT FRm,FRn FMAC FR0,FRm,FRn FSUB FRm,FRn
  8452.  
  8453. FCNVDS DRm,FPUL FMUL DRm,DRn FTRC DRm,FPUL
  8454.  
  8455. FCNVSD FPUL,DRn FMUL FRm,FRn FTRC FRm,FPUL
  8456.  
  8457. FDIV DRm,DRn FRCHG FTRV XMTRX,FVn
  8458.  
  8459. FDIV FRm,FRn FSCHG
  8460.  
  8461. 158
  8462.  
  8463. ----------------------- Page 175-----------------------
  8464.  
  8465. Table 8.1 Instruction Groups (cont)
  8466.  
  8467. 6. CO Group
  8468.  
  8469. AND.B #imm,@(R0,GBR) LDS Rm,FPSCR STC SR,Rn
  8470.  
  8471. BRAF Rm LDS Rm,MACH STC SSR,Rn
  8472.  
  8473. BSRF Rm LDS Rm,MACL STC VBR,Rn
  8474.  
  8475. CLRMAC LDS Rm,PR STC.L DBR,@-Rn
  8476.  
  8477. CLRS LDS.L @Rm+,FPSCR STC.L GBR,@-Rn
  8478.  
  8479. DMULS.L Rm,Rn LDS.L @Rm+,FPUL STC.L Rp_BANK,@-Rn
  8480.  
  8481. DMULU.L Rm,Rn LDS.L @Rm+,MACH STC.L SGR,@-Rn
  8482.  
  8483. FCMP/EQ DRm,DRn LDS.L @Rm+,MACL STC.L SPC,@-Rn
  8484.  
  8485. FCMP/GT DRm,DRn LDS.L @Rm+,PR STC.L SR,@-Rn
  8486.  
  8487. JMP @Rn LDTLB STC.L SSR,@-Rn
  8488.  
  8489. JSR @Rn MAC.L @Rm+,@Rn+ STC.L VBR,@-Rn
  8490.  
  8491. LDC Rm,DBR MAC.W @Rm+,@Rn+ STS FPSCR,Rn
  8492.  
  8493. LDC Rm,GBR MUL.L Rm,Rn STS MACH,Rn
  8494.  
  8495. LDC Rm,Rp_BANK MULS.W Rm,Rn STS MACL,Rn
  8496.  
  8497. LDC Rm,SPC MULU.W Rm,Rn STS PR,Rn
  8498.  
  8499. LDC Rm,SR OR.B #imm,@(R0,GBR) STS.L FPSCR,@-Rn
  8500.  
  8501. LDC Rm,SSR RTE STS.L FPUL,@-Rn
  8502.  
  8503. LDC Rm,VBR RTS STS.L MACH,@-Rn
  8504.  
  8505. LDC.L @Rm+,DBR SETS STS.L MACL,@-Rn
  8506.  
  8507. LDC.L @Rm+,GBR SLEEP STS.L PR,@-Rn
  8508.  
  8509. LDC.L @Rm+,Rp_BANK STC DBR,Rn TAS.B @Rn
  8510.  
  8511. LDC.L @Rm+,SPC STC GBR,Rn TRAPA #imm
  8512.  
  8513. LDC.L @Rm+,SR STC Rp_BANK,Rn TST.B #imm,@(R0,GBR)
  8514.  
  8515. LDC.L @Rm+,SSR STC SGR,Rn XOR.B #imm,@(R0,GBR)
  8516.  
  8517. LDC.L @Rm+,VBR STC SPC,Rn
  8518.  
  8519. 159
  8520.  
  8521. ----------------------- Page 176-----------------------
  8522.  
  8523. Table 8.2 Parallel-Executability
  8524.  
  8525. 2nd Instruction
  8526.  
  8527. MT E X BR L S F E C O
  8528.  
  8529. 1st MT O O O O O X
  8530. Instruction
  8531.  
  8532. EX O X O O O X
  8533.  
  8534. BR O O X O O X
  8535.  
  8536. LS O O O X O X
  8537.  
  8538. FE O O O O X X
  8539.  
  8540. CO X X X X X X
  8541.  
  8542. O: Can be executed in parallel
  8543. X: Cannot be executed in parallel
  8544.  
  8545. 8 . 3 Execution Cycles and Pipeline Stalling
  8546.  
  8547. There are three basic clocks in this processor: the I-clock, B-clock, and P-clock. Each hardware unit
  8548. operates on one of these clocks, as follows:
  8549.  
  8550. • I-clock: CPU, FPU, MMU, caches
  8551.  
  8552. • B-clock: External bus controller
  8553.  
  8554. • P-clock: Peripheral units
  8555.  
  8556. The frequency ratios of the three clocks are determined with the frequency control register
  8557. (FRQCR). In this section, machine cycles are based on the I-clock unless otherwise specified. For
  8558. details of FRQCR, see section 10, Clock Oscillation Circuits.
  8559.  
  8560. Instruction execution cycles are summarized in table 8.3. Penalty cycles due to a pipeline stall or
  8561. freeze are not considered in this table.
  8562.  
  8563. • Issue rate: Interval between the issue of an instruction and that of the next instruction
  8564.  
  8565. • Latency: Interval between the issue of an instruction and the generation of its result
  8566. (completion)
  8567.  
  8568. • Instruction execution pattern (see figure 8.2)
  8569. • Locked pipeline stages
  8570.  
  8571. • Interval between the issue of an instruction and the start of locking
  8572.  
  8573. • Lock time: Period of locking in machine cycle units
  8574.  
  8575. 160
  8576.  
  8577. ----------------------- Page 177-----------------------
  8578.  
  8579. The instruction execution sequence is expressed as a combination of the execution patterns shown
  8580. in figure 8.2. One instruction is separated from the next by the number of machine cycles for its
  8581. issue rate. Normally, execution, data access, and write-back stages cannot be overlapped onto the
  8582. same stages of another instruction; the only exception is when two instructions are executed in
  8583. parallel under parallel-executability conditions. Refer to (a) through (d) in figure 8.3 for some
  8584. simple examples.
  8585.  
  8586. Latency is the interval between issue and completion of an instruction, and is also the interval
  8587. between the execution of two instructions with an interdependent relationship. When there is
  8588. interdependency between two instructions fetched simultaneously, the latter of the two is stalled for
  8589. the following number of cycles:
  8590.  
  8591. • (Latency) cycles when there is flow dependency (read-after-write)
  8592.  
  8593. • (Latency - 1) or (latency - 2) cycles when there is output dependency (write-after-write)
  8594.  
  8595.  Single/double-precision FDN, FSQRT is the preceding instruction (latency – 1) cycles
  8596.  
  8597.  The other FE group is the preceding instruction (latency – 2) cycles
  8598.  
  8599. • 5 or 2 cycles when there is anti-flow dependency (write-after-read), as in the following cases:
  8600.  
  8601.  FTRV is the preceding instruction (5 cycle)
  8602.  
  8603.  A double-precision FADD, FSUB, or FMUL is the preceding instruction (2 cycles)
  8604.  
  8605. In the case of flow dependency, latency may be exceptionally increased or decreased, depending on
  8606. the combination of sequential instructions (figure 8.3 (e)).
  8607.  
  8608. • When a floating-point (FP) computation is followed by an FP register store, the latency of the
  8609. FP computation may be decreased by 1 cycle.
  8610.  
  8611. • If there is a load of the shift amount immediately before an SHAD/SHLD instruction, the
  8612. latency of the load is increased by 1 cycle.
  8613.  
  8614. • If an instruction with a latency of less than 2 cycles, including write-back to an FP register, is
  8615. followed by a double-precision FP instruction, FIPR, or FTRV, the latency of the first
  8616. instruction is increased to 2 cycles.
  8617.  
  8618. The number of cycles in a pipeline stall due to flow dependency will vary depending on the
  8619. combination of interdependent instructions or the fetch timing (see figure 8.3. (e)).
  8620.  
  8621. Output dependency occurs when the destination operands are the same in a preceding FE group
  8622. instruction and a following LS group instruction.
  8623.  
  8624. For the stall cycles of an instruction with output dependency, the longest latency to the last write-
  8625. back among all the destination operands must be applied instead of “latency” (see figure 8.3 (f)). A
  8626. stall due to output dependency with respect to FPSCR, which reflects the result of an FP
  8627. operation, never occurs. For example, when FADD follows FDIV with no dependency between FP
  8628. registers, FADD is not stalled even if both instructions update the cause field of FPSCR.
  8629.  
  8630. 161
  8631.  
  8632. ----------------------- Page 178-----------------------
  8633.  
  8634. Anti-flow dependency can occur only between a preceding double-precision FADD, FMUL, FSUB,
  8635. or FTRV and a following FMOV, FLDI0, FLDI1, FABS, FNEG, or FSTS. See figure 8.3 (g).
  8636.  
  8637. If an executing instruction locks any resource—i.e. a function block that performs a basic
  8638. operation—a following instruction that happens to attempt to use the locked resource must be
  8639. stalled (figure 8.3 (h)). This kind of stall can be compensated by inserting one or more instructions
  8640. independent of the locked resource to separate the interfering instructions. For example, when a
  8641. load instruction and an ADD instruction that references the loaded value are consecutive, the 2-
  8642. cycle stall of the ADD is eliminated by inserting three instructions without dependency. Software
  8643. performance can be improved by such instruction scheduling.
  8644.  
  8645. Other penalties arise in the event of exceptions or external data accesses, as follows.
  8646.  
  8647. • Instruction TLB miss: a penalty of 7 CPU clocks
  8648.  
  8649. • Instruction access to external memory (instruction cache miss, etc.)
  8650.  
  8651. • Data access to external memory (operand cache miss, etc.): a penalty of 2 CPU clocks + 3 bus
  8652. clocks
  8653.  
  8654. • Data access to a memory-mapped control register. The penalty differs from register to register,
  8655. and depends on the kind of operation (read or write), the clock mode, and the bus use conditions
  8656. when the access is made.
  8657.  
  8658. During the penalty cycles of an instruction TLB miss or external instruction access, no instruction
  8659. is issued, but execution of instructions that have already been issued continues. The penalty for a
  8660. data access is a pipeline freeze: that is, the execution of uncompleted instructions is interrupted
  8661. until the arrival of the requested data. The number of penalty cycles for instruction and data
  8662. accesses is largely dependent on the user’s memory subsystems.
  8663.  
  8664. 162
  8665.  
  8666. ----------------------- Page 179-----------------------
  8667.  
  8668. (a) Serial execution: non-parallel-executable instructions
  8669.  
  8670. 1 issue cycle
  8671. SHAD R0,R1 I D EX NA S EX-group SHAD and EX-group ADD
  8672. ADD R2,R3 I D EX NA S cannot be executed in parallel. Therefore,
  8673. next 1 stall cycle SHAD is issued first, and the following
  8674. ADD is recombined with the next
  8675. I D
  8676. ... instruction.
  8677.  
  8678. (b) Parallel execution: parallel-executable and no dependency
  8679.  
  8680. 1 issue cycle
  8681. ADD R2,R1 I D EX NA S EX-group ADD and LS-group MOV.L can
  8682. MOV.L @R4,R5 I D EX MA S be executed in parallel. Overlapping of
  8683. stages in the 2nd instruction is possible.
  8684.  
  8685. (c) Issue rate: multi-step instruction
  8686.  
  8687. AND.B and MOV are fetched
  8688.  
  8689. 4 issue cycles
  8690. AND.B#1,@(R0,GBR) I D SX MA S simultaneously, but MOV is stalled due to
  8691. resource locking. After the lock is released,
  8692. D SX NA S
  8693. MOV is refetched together with the next
  8694. D SX NA S
  8695. instruction.
  8696. D SX MA S
  8697. MOV R1,R2
  8698. I i D E A S
  8699. next
  8700. I ...
  8701. 4 stall cycles
  8702.  
  8703. (d) Branch
  8704.  
  8705. BT/S L_far I D EX NA S No stall occurs if the branch is not taken.
  8706. ADD R0,R1 I D EX NA S
  8707. SUB R2,R3 I D EX NA S
  8708.  
  8709. 2-cycle latency for I-stage of branch destination
  8710. BT/S L_far I D EX NA S If the branch is taken, the I-stage of the
  8711. ADD R0,R1 I D EX NA S branch destination is stalled for the period
  8712. 1 stall cycle of latency. This stall can be covered with a
  8713. L_far I D delay slot instruction which is not parallel-
  8714. ... executable with the branch instruction.
  8715.  
  8716. BT L_skip I D EX NA S Even if the BT/BF branch is taken, the I-
  8717. ADD #1,R0 I D — — — stage of the branch destination is not
  8718. L_skip: I D ... stalled if the displacement is zero.
  8719.  
  8720. No stall
  8721.  
  8722. Figure 8.3 Examples of Pipelined Execution
  8723.  
  8724. 163
  8725.  
  8726. ----------------------- Page 180-----------------------
  8727.  
  8728. (e) Flow dependency
  8729. Zero-cycle latency
  8730. The following instruction, ADD, is not
  8731. MOV R0,R1 I D EX NA S stalled when executed after an instruction
  8732. ADD R2,R1 I D EX NA S with zero-cycle latency, even if there is
  8733. dependency.
  8734. 1-cycle latency
  8735. I D EX NA S ADD and MOV.L are not executed in
  8736. ADD R2,R1
  8737. MOV.L @R1,R1 I i D EX MA S parallel, since MOV.L references the result
  8738. of ADD as its destination address.
  8739. next I ...
  8740. 1 stall cycle
  8741.  
  8742. 2-cycle latency
  8743. MOV.L @R1,R1 I D EX MA S Because MOV.L and ADD are not fetched
  8744. ADD R0,R1 I D EX NA S simultaneously in this example, ADD is
  8745. next I stalled for only 1 cycle even though the
  8746. ... 1 stall cycle
  8747. latency of MOV.L is 2 cycles.
  8748.  
  8749. 2-cycle latency
  8750. 1-cycle increase
  8751.  
  8752. MOV.L @R1,R1 I D EX MA S Due to the flow dependency between the
  8753. SHAD R1,R2 I D d EX NA S load and the SHAD/SHLD shift amount,
  8754. next I the latency of the load is increased to 3
  8755. ...
  8756. 2 stall cycles cycles.
  8757.  
  8758. 4-cycle latency for FPSCR
  8759. F1
  8760. FADD FR1,FR2 I D F2 FS
  8761. STS FPUL,R1 I D EX NA S
  8762. STS FPSCR,R2 I D EX NA S
  8763.  
  8764. 2 stall cycles
  8765.  
  8766. 7-cycle latency for lower FR
  8767. 8-cycle latency for upper FR
  8768. FADD DR0,DR2 I D F1 F2 FS
  8769. d F1 F2 FS
  8770. d F1 F2 FS
  8771. d F1 F2 FS
  8772. d F1 F2 FS FR3 write
  8773. F1 F2 FS FR2 write
  8774. FMOV FR3,FR5 I D EX NA S
  8775. FMOV FR2,FR4 I D EX NA S
  8776.  
  8777. 3-cycle latency for upper/lower FR
  8778.  
  8779. FLOAT FPUL,DR0 I D F1 F2 FS FR1 write
  8780. FMOV.S FR0,@-R15 d F1 F2 FS FR0 write
  8781. I D EX MA S
  8782.  
  8783. Zero-cycle latency
  8784. 3-cycle increase
  8785.  
  8786. FLDI1 FR3 I D EX NA S
  8787. FIPR FV0,FV4 I D d F0 F1 F2 FS
  8788. 3 stall cycles
  8789.  
  8790. 2-cycle latency
  8791. 1-cycle increase
  8792. I D EX MA S
  8793. FMOV @R1,XD14
  8794. FTRV XMTRX,FV0 I D d F0 F1 F2 FS
  8795. d F0 F1 F2 FS
  8796. 3 stall cycles
  8797. d F0 F1 F2 FS
  8798. d F0 F1 F2 FS
  8799.  
  8800. Figure 8.3 Examples of Pipelined Execution (cont)
  8801.  
  8802. 164
  8803.  
  8804. ----------------------- Page 181-----------------------
  8805.  
  8806. (e) Flow dependency (cont)
  8807.  
  8808. Effectively 1-cycle latency for consecutive LDS/FLOAT instructions
  8809.  
  8810. I D EX NA S
  8811. LDS R0,FPUL
  8812. FLOAT FPUL,FR0 I D F1 F2 FS
  8813. LDS R1,FPUL I D EX NA S
  8814. FLOAT FPUL,R1 I D F1 F2 FS
  8815.  
  8816. FTRC FR0,FPUL I D F1 F2 FS Effectively 1-cycle latency for consecutive
  8817. STS FPUL,R0 I D EX NA S FTRC/STS instructions
  8818.  
  8819. FTRC FR1,FPUL I D F1 F2 FS
  8820. STS FPUL,R1 I D EX NA S
  8821.  
  8822. (f) Output dependency
  8823.  
  8824. 11-cycle latency
  8825. FSQRT FR4 I D F1 F2 FS
  8826. F3
  8827.  
  8828. F1 F2 FS
  8829.  
  8830. FMOV FR0,FR4 I D F1 F2 FS
  8831. 10 stall cycles = latency (11) - 1
  8832. The registers are written-back
  8833. in program order.
  8834.  
  8835. 7-cycle latency for lower FR
  8836. FADD DR0,DR2 8-cycle latency for upper FR
  8837. I D F1 F2 FS
  8838. d F1 F2 FS
  8839. d F1 F2 FS
  8840. d F1 F2 FS
  8841. d F1 F2 FS FR3 write
  8842. F1 F2 FS FR2 write
  8843. FMOV FR0,FR3 I D EX NA S
  8844. 6 stall cycles = longest latency (8) - 2
  8845.  
  8846. (g) Anti-flow dependency
  8847.  
  8848. FTRV XMTRX,FV0 I D F0 F1 F2 FS
  8849. d F0 F1 F2 FS
  8850. d F0 F1 F2 FS
  8851. d F0 F1 F2 FS
  8852. FMOV @R1,XD0 I D EX MA S
  8853.  
  8854. 5 stall cycles
  8855.  
  8856. FADD DR0,DR2 I D F1 F2 FS
  8857. d F1 F2 FS
  8858. d F1 F2 FS
  8859. d F1 F2 FS
  8860. d F1 F2 FS
  8861. F1 F2 FS
  8862. FMOV FR4,FR1 I D EX NA S
  8863. 2 stall cycles
  8864.  
  8865. Figure 8.3 Examples of Pipelined Execution (cont)
  8866.  
  8867. 165
  8868.  
  8869. ----------------------- Page 182-----------------------
  8870.  
  8871. (h) Resource conflict
  8872.  
  8873. #1 #2 #3 .................................................. #8 #9 #10 #11 #12
  8874. Latency
  8875. 1 cycle/issue
  8876. FDIV FR6,FR7 I D F1 F2 FS F1 stage locked for 1 cycle
  8877.  
  8878. F3
  8879. F1 F2 FS
  8880.  
  8881. FMAC FR0,FR8,FR9 I D F1 F2 FS
  8882.  
  8883. FMAC FR0,FR10,FR11 I D F1 F2 FS
  8884. .
  8885. .
  8886. . :
  8887. FMAC FR0,FR12,FR13 I D F1 F2 FS
  8888.  
  8889. 1 stall cycle (F1 stage resource conflict)
  8890.  
  8891. FIPR FV8,FV0 I D F0 F1 F2 FS
  8892. FADD FR15,FR4 I D F1 F2 FS
  8893. 1 stall cycle
  8894.  
  8895. LDS.L @R15+,PR I D EX MA FS
  8896. D SX
  8897. SX
  8898. STC GBR,R2 I D SX NA S
  8899. D SX NA S
  8900. 3 stall cycles
  8901.  
  8902. FADD DR0,DR2 I D F1 F2 FS
  8903. d F1 F2 FS
  8904. d F1 F2 FS
  8905. d F1 F2 FS
  8906. d F1 F2 FS
  8907. F1 F2 FS
  8908. MAC.W @R1+,@R2+ I D EX MA S
  8909. 5 stall cycles f1
  8910. D EX
  8911. MA S
  8912. f1
  8913. f1 F2 FS
  8914. f1 F2 FS
  8915.  
  8916. MAC.W @R1+,@R2+ I D EX MA S f1 stage can overlap preceding f1,
  8917. f1 but F1 cannot overlap f1.
  8918.  
  8919. D EX MA S
  8920. f1
  8921. f1 F2 FS
  8922. f1 F2 FS
  8923. MAC.W @R1+,@R2+ I D EX MA S
  8924. 1 stall f1
  8925. cycle D EX MA S
  8926.  
  8927. f1
  8928. f1 F2 FS
  8929. f1 F2 FS
  8930. FADD DR4,DR6 I D F1 F2 FS
  8931. 3 stall cycles 2 stall cycles d F1 F2 FS
  8932.  
  8933. d F1 F2 FS
  8934. d F1 F2 FS
  8935. d F1 F2 FS
  8936. F1
  8937. ...
  8938.  
  8939. Figure 8.3 Examples of Pipelined Execution (cont)
  8940.  
  8941. 166
  8942.  
  8943. ----------------------- Page 183-----------------------
  8944.  
  8945. Table 8.3 Execution Cycles
  8946.  
  8947. Functional No. Instruction InstructionIssue Latency Execution Lock
  8948. Category Group Rate Pattern
  8949.  
  8950. Stage Start Cycles
  8951.  
  8952. Data 1 EXTS.B Rm,Rn EX 1 1 #1 — — —
  8953. transfer
  8954. instructions
  8955.  
  8956. 2 EXTS.W Rm,Rn EX 1 1 #1 — — —
  8957.  
  8958. 3 EXTU.B Rm,Rn EX 1 1 #1 — — —
  8959.  
  8960. 4 EXTU.W Rm,Rn EX 1 1 #1 — — —
  8961.  
  8962. 5 MOV Rm,Rn MT 1 0 #1 — — —
  8963.  
  8964. 6 MOV #imm,Rn EX 1 1 #1 — — —
  8965.  
  8966. 7 MOVA @(disp,PC),R0 EX 1 1 #1 — — —
  8967.  
  8968. 8 MOV.W @(disp,PC),Rn LS 1 2 #2 — — —
  8969.  
  8970. 9 MOV.L @(disp,PC),Rn LS 1 2 #2 — — —
  8971.  
  8972. 10 MOV.B @Rm,Rn LS 1 2 #2 — — —
  8973.  
  8974. 11 MOV.W @Rm,Rn LS 1 2 #2 — — —
  8975.  
  8976. 12 MOV.L @Rm,Rn LS 1 2 #2 — — —
  8977.  
  8978. 13 MOV.B @Rm+,Rn LS 1 1/2 #2 — — —
  8979.  
  8980. 14 MOV.W @Rm+,Rn LS 1 1/2 #2 — — —
  8981.  
  8982. 15 MOV.L @Rm+,Rn LS 1 1/2 #2 — — —
  8983.  
  8984. 16 MOV.B @(disp,Rm),R0 LS 1 2 #2 — — —
  8985.  
  8986. 17 MOV.W @(disp,Rm),R0 LS 1 2 #2 — — —
  8987.  
  8988. 18 MOV.L @(disp,Rm),Rn LS 1 2 #2 — — —
  8989.  
  8990. 19 MOV.B @(R0,Rm),Rn LS 1 2 #2 — — —
  8991.  
  8992. 20 MOV.W @(R0,Rm),Rn LS 1 2 #2 — — —
  8993.  
  8994. 21 MOV.L @(R0,Rm),Rn LS 1 2 #2 — — —
  8995.  
  8996. 22 MOV.B @(disp,GBR),R0 LS 1 2 #3 — — —
  8997.  
  8998. 23 MOV.W @(disp,GBR),R0 LS 1 2 #3 — — —
  8999.  
  9000. 24 MOV.L @(disp,GBR),R0 LS 1 2 #3 — — —
  9001.  
  9002. 25 MOV.B Rm,@Rn LS 1 1 #2 — — —
  9003.  
  9004. 26 MOV.W Rm,@Rn LS 1 1 #2 — — —
  9005.  
  9006. 27 MOV.L Rm,@Rn LS 1 1 #2 — — —
  9007.  
  9008. 28 MOV.B Rm,@-Rn LS 1 1/1 #2 — — —
  9009.  
  9010. 29 MOV.W Rm,@-Rn LS 1 1/1 #2 — — —
  9011.  
  9012. 30 MOV.L Rm,@-Rn LS 1 1/1 #2 — — —
  9013.  
  9014. 31 MOV.B R0,@(disp,Rn) LS 1 1 #2 — — —
  9015.  
  9016. 167
  9017.  
  9018. ----------------------- Page 184-----------------------
  9019.  
  9020. Table 8.3 Execution Cycles (cont)
  9021.  
  9022. Functional No. Instruction InstructionIssue Latency Execution Lock
  9023. Category Group Rate Pattern
  9024.  
  9025. Stage Start Cycles
  9026.  
  9027. Data transfer 32 MOV.W R0,@(disp,Rn) LS 1 1 #2 — — —
  9028. instructions
  9029.  
  9030. 33 MOV.L Rm,@(disp,Rn) LS 1 1 #2 — — —
  9031.  
  9032. 34 MOV.B Rm,@(R0,Rn) LS 1 1 #2 — — —
  9033.  
  9034. 35 MOV.W Rm,@(R0,Rn) LS 1 1 #2 — — —
  9035.  
  9036. 36 MOV.L Rm,@(R0,Rn) LS 1 1 #2 — — —
  9037.  
  9038. 37 MOV.B R0,@(disp,GBR) LS 1 1 #3 — — —
  9039.  
  9040. 38 MOV.W R0,@(disp,GBR) LS 1 1 #3 — — —
  9041.  
  9042. 39 MOV.L R0,@(disp,GBR) LS 1 1 #3 — — —
  9043.  
  9044. 40 MOVCA.L R0,@Rn LS 1 3–7 #12 MA 4 3–7
  9045.  
  9046. 41 MOVT Rn EX 1 1 #1 — — —
  9047.  
  9048. 42 OCBI @Rn LS 1 1–2 #10 MA 4 1–2
  9049.  
  9050. 43 OCBP @Rn LS 1 1–5 #11 MA 4 1–5
  9051.  
  9052. 44 OCBWB @Rn LS 1 1–5 #11 MA 4 1–5
  9053.  
  9054. 45 PREF @Rn LS 1 1 #2 — — —
  9055.  
  9056. 46 SWAP.B Rm,Rn EX 1 1 #1 — — —
  9057.  
  9058. 47 SWAP.W Rm,Rn EX 1 1 #1 — — —
  9059.  
  9060. 48 XTRCT Rm,Rn EX 1 1 #1 — — —
  9061.  
  9062. Fixed-point 49 ADD Rm,Rn EX 1 1 #1 — — —
  9063. arithmetic
  9064. instructions
  9065.  
  9066. 50 ADD #imm,Rn EX 1 1 #1 — — —
  9067.  
  9068. 51 ADDC Rm,Rn EX 1 1 #1 — — —
  9069.  
  9070. 52 ADDV Rm,Rn EX 1 1 #1 — — —
  9071.  
  9072. 53 CMP/EQ #imm,R0 MT 1 1 #1 — — —
  9073.  
  9074. 54 CMP/EQ Rm,Rn MT 1 1 #1 — — —
  9075.  
  9076. 55 CMP/GE Rm,Rn MT 1 1 #1 — — —
  9077.  
  9078. 56 CMP/GT Rm,Rn MT 1 1 #1 — — —
  9079.  
  9080. 57 CMP/HI Rm,Rn MT 1 1 #1 — — —
  9081.  
  9082. 58 CMP/HS Rm,Rn MT 1 1 #1 — — —
  9083.  
  9084. 59 CMP/PL Rn MT 1 1 #1 — — —
  9085.  
  9086. 60 CMP/PZ Rn MT 1 1 #1 — — —
  9087.  
  9088. 61 CMP/STR Rm,Rn MT 1 1 #1 — — —
  9089.  
  9090. 62 DIV0S Rm,Rn EX 1 1 #1 — — —
  9091.  
  9092. 168
  9093.  
  9094. ----------------------- Page 185-----------------------
  9095.  
  9096. Table 8.3 Execution Cycles (cont)
  9097.  
  9098. Functional No. Instruction Instruc- Issue Latency Execu- Lock
  9099. Category tion Rate tion
  9100. Group Pattern
  9101.  
  9102. Stage Start Cycles
  9103.  
  9104. Fixed-point 63 DIV0U EX 1 1 #1 — — —
  9105. arithmetic
  9106. instructions
  9107.  
  9108. 64 DIV1 Rm,Rn EX 1 1 #1 — — —
  9109.  
  9110. 65 DMULS.L Rm,Rn CO 2 4/4 #34 F1 4 2
  9111.  
  9112. 66 DMULU.L Rm,Rn CO 2 4/4 #34 F1 4 2
  9113.  
  9114. 67 DT Rn EX 1 1 #1 — — —
  9115.  
  9116. 68 MAC.L @Rm+,@Rn+ CO 2 2/2/4/4 #35 F1 4 2
  9117.  
  9118. 69 MAC.W @Rm+,@Rn+ CO 2 2/2/4/4 #35 F1 4 2
  9119.  
  9120. 70 MUL.L Rm,Rn CO 2 4/4 #34 F1 4 2
  9121.  
  9122. 71 MULS.W Rm,Rn CO 2 4/4 #34 F1 4 2
  9123.  
  9124. 72 MULU.W Rm,Rn CO 2 4/4 #34 F1 4 2
  9125.  
  9126. 73 NEG Rm,Rn EX 1 1 #1 — — —
  9127.  
  9128. 74 NEGC Rm,Rn EX 1 1 #1 — — —
  9129.  
  9130. 75 SUB Rm,Rn EX 1 1 #1 — — —
  9131.  
  9132. 76 SUBC Rm,Rn EX 1 1 #1 — — —
  9133.  
  9134. 77 SUBV Rm,Rn EX 1 1 #1 — — —
  9135.  
  9136. Logical 78 AND Rm,Rn EX 1 1 #1 — — —
  9137. instructions
  9138.  
  9139. 79 AND #imm,R0 EX 1 1 #1 — — —
  9140.  
  9141. 80 AND.B #imm,@(R0,GBR) CO 4 4 #6 — — —
  9142.  
  9143. 81 NOT Rm,Rn EX 1 1 #1 — — —
  9144.  
  9145. 82 OR Rm,Rn EX 1 1 #1 — — —
  9146.  
  9147. 83 OR #imm,R0 EX 1 1 #1 — — —
  9148.  
  9149. 84 OR.B #imm,@(R0,GBR) CO 4 4 #6 — — —
  9150.  
  9151. 85 TAS.B @Rn CO 5 5 #7 — — —
  9152.  
  9153. 86 TST Rm,Rn MT 1 1 #1 — — —
  9154.  
  9155. 87 TST #imm,R0 MT 1 1 #1 — — —
  9156.  
  9157. 88 TST.B #imm,@(R0,GBR) CO 3 3 #5 — — —
  9158.  
  9159. 89 XOR Rm,Rn EX 1 1 #1 — — —
  9160.  
  9161. 90 XOR #imm,R0 EX 1 1 #1 — — —
  9162.  
  9163. 91 XOR.B #imm,@(R0,GBR) CO 4 4 #6 — — —
  9164.  
  9165. 169
  9166.  
  9167. ----------------------- Page 186-----------------------
  9168.  
  9169. Table 8.3 Execution Cycles (cont)
  9170.  
  9171. Functional No. Instruction Instruc- Issue Latency Execu- Lock
  9172. Category tion Rate tion
  9173. Group Pattern
  9174.  
  9175. Stage Start Cycles
  9176.  
  9177. Shift 92 ROTL Rn EX 1 1 #1 — — —
  9178. instructions
  9179.  
  9180. 93 ROTR Rn EX 1 1 #1 — — —
  9181.  
  9182. 94 ROTCL Rn EX 1 1 #1 — — —
  9183.  
  9184. 95 ROTCR Rn EX 1 1 #1 — — —
  9185.  
  9186. 96 SHAD Rm,Rn EX 1 1 #1 — — —
  9187.  
  9188. 97 SHAL Rn EX 1 1 #1 — — —
  9189.  
  9190. 98 SHAR Rn EX 1 1 #1 — — —
  9191.  
  9192. 99 SHLD Rm,Rn EX 1 1 #1 — — —
  9193.  
  9194. 100 SHLL Rn EX 1 1 #1 — — —
  9195.  
  9196. 101 SHLL2 Rn EX 1 1 #1 — — —
  9197.  
  9198. 102 SHLL8 Rn EX 1 1 #1 — — —
  9199.  
  9200. 103 SHLL16 Rn EX 1 1 #1 — — —
  9201.  
  9202. 104 SHLR Rn EX 1 1 #1 — — —
  9203.  
  9204. 105 SHLR2 Rn EX 1 1 #1 — — —
  9205.  
  9206. 106 SHLR8 Rn EX 1 1 #1 — — —
  9207.  
  9208. 107 SHLR16 Rn EX 1 1 #1 — — —
  9209.  
  9210. Branch 108 BF disp BR 1 2 (or 1) #1 — — —
  9211. instructions
  9212.  
  9213. 109 BF/S disp BR 1 2 (or 1) #1 — — —
  9214.  
  9215. 110 BT disp BR 1 2 (or 1) #1 — — —
  9216.  
  9217. 111 BT/S disp BR 1 2 (or 1) #1 — — —
  9218.  
  9219. 112 BRA disp BR 1 2 #1 — — —
  9220.  
  9221. 113 BRAF Rn CO 2 3 #4 — — —
  9222.  
  9223. 114 BSR disp BR 1 2 #14 SX 3 2
  9224.  
  9225. 115 BSRF Rn CO 2 3 #24 SX 3 2
  9226.  
  9227. 116 JMP @Rn CO 2 3 #4 — — —
  9228.  
  9229. 117 JSR @Rn CO 2 3 #24 SX 3 2
  9230.  
  9231. 118 RTS CO 2 3 #4 — — —
  9232.  
  9233. 170
  9234.  
  9235. ----------------------- Page 187-----------------------
  9236.  
  9237. Table 8.3 Execution Cycles (cont)
  9238.  
  9239. Functional No. Instruction InstructionIssue Latency Execution Lock
  9240. Category Group Rate Pattern
  9241.  
  9242. Stage Start Cycles
  9243.  
  9244. System control 119 NOP MT 1 0 #1 — — —
  9245. instructions
  9246.  
  9247. 120 CLRMAC CO 1 3 #28 F1 3 2
  9248.  
  9249. 121 CLRS CO 1 1 #1 — — —
  9250.  
  9251. 122 CLRT MT 1 1 #1 — — —
  9252.  
  9253. 123 SETS CO 1 1 #1 — — —
  9254.  
  9255. 124 SETT MT 1 1 #1 — — —
  9256.  
  9257. 125 TRAPA #imm CO 7 7 #13 — — —
  9258.  
  9259. 126 RTE CO 5 5 #8 — — —
  9260.  
  9261. 127 SLEEP CO 4 4 #9 — — —
  9262.  
  9263. 128 LDTLB CO 1 1 #2 — — —
  9264.  
  9265. 129 LDC Rm,DBR CO 1 3 #14 SX 3 2
  9266.  
  9267. 130 LDC Rm,GBR CO 3 3 #15 SX 3 2
  9268.  
  9269. 131 LDC Rm,Rp_BANK CO 1 3 #14 SX 3 2
  9270.  
  9271. 132 LDC Rm,SR CO 4 4 #16 SX 3 2
  9272.  
  9273. 133 LDC Rm,SSR CO 1 3 #14 SX 3 2
  9274.  
  9275. 134 LDC Rm,SPC CO 1 3 #14 SX 3 2
  9276.  
  9277. 135 LDC Rm,VBR CO 1 3 #14 SX 3 2
  9278.  
  9279. 136 LDC.L @Rm+,DBR CO 1 1/3 #17 SX 3 2
  9280.  
  9281. 137 LDC.L @Rm+,GBR CO 3 3/3 #18 SX 3 2
  9282.  
  9283. 138 LDC.L @Rm+,Rp_BANKCO 1 1/3 #17 SX 3 2
  9284.  
  9285. 139 LDC.L @Rm+,SR CO 4 4/4 #19 SX 3 2
  9286.  
  9287. 140 LDC.L @Rm+,SSR CO 1 1/3 #17 SX 3 2
  9288.  
  9289. 141 LDC.L @Rm+,SPC CO 1 1/3 #17 SX 3 2
  9290.  
  9291. 142 LDC.L @Rm+,VBR CO 1 1/3 #17 SX 3 2
  9292.  
  9293. 143 LDS Rm,MACH CO 1 3 #28 F1 3 2
  9294.  
  9295. 144 LDS Rm,MACL CO 1 3 #28 F1 3 2
  9296.  
  9297. 145 LDS Rm,PR CO 2 3 #24 SX 3 2
  9298.  
  9299. 146 LDS.L @Rm+,MACH CO 1 1/3 #29 F1 3 2
  9300.  
  9301. 147 LDS.L @Rm+,MACL CO 1 1/3 #29 F1 3 2
  9302.  
  9303. 148 LDS.L @Rm+,PR CO 2 2/3 #25 SX 3 2
  9304.  
  9305. 149 STC DBR,Rn CO 2 2 #20 — — —
  9306.  
  9307. 150 STC SGR,Rn CO 3 3 #21 — — —
  9308.  
  9309. 171
  9310.  
  9311. ----------------------- Page 188-----------------------
  9312.  
  9313. Table 8.3 Execution Cycles (cont)
  9314.  
  9315. Functional No. Instruction InstructionIssue Latency Execution Lock
  9316. Category Group Rate Pattern
  9317.  
  9318. Stage Start Cycles
  9319.  
  9320. System 151 STC GBR,Rn CO 2 2 #20 — — —
  9321. control
  9322. instructions
  9323.  
  9324. 152 STC Rp_BANK,Rn CO 2 2 #20 — — —
  9325.  
  9326. 153 STC SR,Rn CO 2 2 #20 — — —
  9327.  
  9328. 154 STC SSR,Rn CO 2 2 #20 — — —
  9329.  
  9330. 155 STC SPC,Rn CO 2 2 #20 — — —
  9331.  
  9332. 156 STC VBR,Rn CO 2 2 #20 — — —
  9333.  
  9334. 157 STC.L DBR,@-Rn CO 2 2/2 #22 — — —
  9335.  
  9336. 158 STC.L SGR,@-Rn CO 3 3/3 #23 — — —
  9337.  
  9338. 159 STC.L GBR,@-Rn CO 2 2/2 #22 — — —
  9339.  
  9340. 160 STC.L Rp_BANK,@-Rn CO 2 2/2 #22 — — —
  9341.  
  9342. 161 STC.L SR,@-Rn CO 2 2/2 #22 — — —
  9343.  
  9344. 162 STC.L SSR,@-Rn CO 2 2/2 #22 — — —
  9345.  
  9346. 163 STC.L SPC,@-Rn CO 2 2/2 #22 — — —
  9347.  
  9348. 164 STC.L VBR,@-Rn CO 2 2/2 #22 — — —
  9349.  
  9350. 165 STS MACH,Rn CO 1 3 #30 — — —
  9351.  
  9352. 166 STS MACL,Rn CO 1 3 #30 — — —
  9353.  
  9354. 167 STS PR,Rn CO 2 2 #26 — — —
  9355.  
  9356. 168 STS.L MACH,@-Rn CO 1 1/1 #31 — — —
  9357.  
  9358. 169 STS.L MACL,@-Rn CO 1 1/1 #31 — — —
  9359.  
  9360. 170 STS.L PR,@-Rn CO 2 2/2 #27 — — —
  9361.  
  9362. Single- 171 FLDI0 FRn LS 1 0 #1 — — —
  9363. precision
  9364. floating-point
  9365. instructions
  9366.  
  9367. 172 FLDI1 FRn LS 1 0 #1 — — —
  9368.  
  9369. 173 FMOV FRm,FRn LS 1 0 #1 — — —
  9370.  
  9371. 174 FMOV.S @Rm,FRn LS 1 2 #2 — — —
  9372.  
  9373. 175 FMOV.S @Rm+,FRn LS 1 1/2 #2 — — —
  9374.  
  9375. 176 FMOV.S @(R0,Rm),FRn LS 1 2 #2 — — —
  9376.  
  9377. 177 FMOV.S FRm,@Rn LS 1 1 #2 — — —
  9378.  
  9379. 178 FMOV.S FRm,@-Rn LS 1 1/1 #2 — — —
  9380.  
  9381. 179 FMOV.S FRm,@(R0,Rn) LS 1 1 #2 — — —
  9382.  
  9383. 172
  9384.  
  9385. ----------------------- Page 189-----------------------
  9386.  
  9387. 180 FLDS FRm,FPUL LS 1 0 #1 — — —
  9388.  
  9389. 181 FSTS FPUL,FRn LS 1 0 #1 — — —
  9390.  
  9391. Table 8.3 Execution Cycles (cont)
  9392.  
  9393. Functional No. Instruction Instruction Issue Latency Execution Lock
  9394. Category Group Rate Pattern
  9395.  
  9396. Stage Start Cycles
  9397.  
  9398. Single- 182 FABS FRn LS 1 0 #1 — — —
  9399. precision
  9400. floating-point
  9401. instructions
  9402.  
  9403. 183 FADD FRm,FRn FE 1 3/4 #36 — — —
  9404.  
  9405. 184 FCMP/EQ FRm,FRn FE 1 2/4 #36 — — —
  9406.  
  9407. 185 FCMP/GT FRm,FRn FE 1 2/4 #36 — — —
  9408.  
  9409. 186 FDIV FRm,FRn FE 1 12/13 #37 F3 2 10
  9410.  
  9411. F1 11 1
  9412.  
  9413. 187 FLOAT FPUL,FRn FE 1 3/4 #36 — — —
  9414.  
  9415. 188 FMAC FR0,FRm,FRn FE 1 3/4 #36 — — —
  9416.  
  9417. 189 FMUL FRm,FRn FE 1 3/4 #36 — — —
  9418.  
  9419. 190 FNEG FRn LS 1 0 #1 — — —
  9420.  
  9421. 191 FSQRT FRn FE 1 11/12 #37 F3 2 9
  9422.  
  9423. F1 10 1
  9424.  
  9425. 192 FSUB FRm,FRn FE 1 3/4 #36 — — —
  9426.  
  9427. 193 FTRC FRm,FPUL FE 1 3/4 #36 — — —
  9428.  
  9429. 194 FMOV DRm,DRn LS 1 0 #1 — — —
  9430.  
  9431. 195 FMOV @Rm,DRn LS 1 2 #2 — — —
  9432.  
  9433. 196 FMOV @Rm+,DRn LS 1 1/2 #2 — — —
  9434.  
  9435. 197 FMOV @(R0,Rm),DRn LS 1 2 #2 — — —
  9436.  
  9437. 198 FMOV DRm,@Rn LS 1 1 #2 — — —
  9438.  
  9439. 199 FMOV DRm,@-Rn LS 1 1/1 #2 — — —
  9440.  
  9441. 200 FMOV DRm,@(R0,Rn) LS 1 1 #2 — — —
  9442.  
  9443. Double- 201 FABS DRn LS 1 0 #1 — — —
  9444. precision
  9445. floating-point
  9446. instructions
  9447.  
  9448. 202 FADD DRm,DRn FE 1 (7, 8)/9 #39 F1 2 6
  9449.  
  9450. 203 FCMP/EQ DRm,DRn CO 2 3/5 #40 F1 2 2
  9451.  
  9452. 204 FCMP/GT DRm,DRn CO 2 3/5 #40 F1 2 2
  9453.  
  9454. 205 FCNVDS DRm,FPUL FE 1 4/5 #38 F1 2 2
  9455.  
  9456. 173
  9457.  
  9458. ----------------------- Page 190-----------------------
  9459.  
  9460. 206 FCNVSD FPUL,DRn FE 1 (3, 4)/5 #38 F1 2 2
  9461.  
  9462. 207 FDIV DRm,DRn FE 1 (24, 25)/ #41 F3 2 23
  9463. 26
  9464.  
  9465. F1 22 3
  9466.  
  9467. F1 2 2
  9468.  
  9469. 208 FLOAT FPUL,DRn FE 1 (3, 4)/5 #38 F1 2 2
  9470.  
  9471. 209 FMUL DRm,DRn FE 1 (7, 8)/9 #39 F1 2 6
  9472.  
  9473. Table 8.3 Execution Cycles (cont)
  9474.  
  9475. Functional No. Instruction Instruc- Issue Latency Execu- Lock
  9476. Category tion Rate tion
  9477. Group Pattern
  9478.  
  9479. Stage Start Cycles
  9480.  
  9481. Double- 210 FNEG DRn LS 1 0 #1 — — —
  9482. precision
  9483. floating-point
  9484. instructions
  9485.  
  9486. 211 FSQRT DRn FE 1 (23, 24)/ #41 F3 2 22
  9487. 25
  9488.  
  9489. F1 21 3
  9490.  
  9491. F1 2 2
  9492.  
  9493. 212 FSUB DRm,DRn FE 1 (7, 8)/9 #39 F1 2 6
  9494.  
  9495. 213 FTRC DRm,FPUL FE 1 4/5 #38 F1 2 2
  9496.  
  9497. FPU system 214 LDS Rm,FPUL LS 1 1 #1 — — —
  9498. control
  9499. instructions
  9500.  
  9501. 215 LDS Rm,FPSCR CO 1 4 #32 F1 3 3
  9502.  
  9503. 216 LDS.L @Rm+,FPUL CO 1 1/2 #2 — — —
  9504.  
  9505. 217 LDS.L @Rm+,FPSCR CO 1 1/4 #33 F1 3 3
  9506.  
  9507. 218 STS FPUL,Rn LS 1 3 #1 — — —
  9508.  
  9509. 219 STS FPSCR,Rn CO 1 3 #1 — — —
  9510.  
  9511. 220 STS.L FPUL,@-Rn CO 1 1/1 #2 — — —
  9512.  
  9513. 221 STS.L FPSCR,@-Rn CO 1 1/1 #2 — — —
  9514.  
  9515. Graphics 222 FMOV DRm,XDn LS 1 0 #1 — — —
  9516. acceleration
  9517. instructions
  9518.  
  9519. 223 FMOV XDm,DRn LS 1 0 #1 — — —
  9520.  
  9521. 224 FMOV XDm,XDn LS 1 0 #1 — — —
  9522.  
  9523. 225 FMOV @Rm,XDn LS 1 2 #2 — — —
  9524.  
  9525. 226 FMOV @Rm+,XDn LS 1 1/2 #2 — — —
  9526.  
  9527. 174
  9528.  
  9529. ----------------------- Page 191-----------------------
  9530.  
  9531. 227 FMOV @(R0,Rm),XDn LS 1 2 #2 — — —
  9532.  
  9533. 228 FMOV XDm,@Rn LS 1 1 #2 — — —
  9534.  
  9535. 229 FMOV XDm,@-Rm LS 1 1/1 #2 — — —
  9536.  
  9537. 230 FMOV XDm,@(R0,Rn) LS 1 1 #2 — — —
  9538.  
  9539. 231 FIPR FVm,FVn FE 1 4/5 #42 F1 3 1
  9540.  
  9541. 232 FRCHG FE 1 1/4 #36 — — —
  9542.  
  9543. 233 FSCHG FE 1 1/4 #36 — — —
  9544.  
  9545. 234 FTRV XMTRX,FVn FE 1 (5, 5, 6, #43 F0 2 4
  9546. 7)/8
  9547.  
  9548. F1 3 4
  9549.  
  9550. Notes: 1. See table 8.1 for the instruction groups.
  9551. 2. Latency “L1/L2...”: Latency corresponding to a write to each register, including
  9552. MACH/MACL/FPSCR.
  9553. Example: MOV.B @Rm+, Rn “1/2”: The latency for Rm is 1 cycle, and the latency for
  9554. Rn is 2 cycles.
  9555. 3. Branch latency: Interval until the branch destination instruction is fetched
  9556. 4. Conditional branch latency “2 (or 1)”: The latency is 2 for a nonzero displacement, and 1
  9557. for a zero displacement.
  9558. 5. Double-precision floating-point instruction latency “(L1, L2)/L3”: L1 is the latency for FR
  9559. [n+1], L2 that for FR [n], and L3 that for FPSCR.
  9560. 6. FTRV latency “(L1, L2, L3, L4)/L5”: L1 is the latency for FR [n], L2 that for FR [n+1], L3
  9561. that for FR [n+2], L4 that for FR [n+3], and L5 that for FPSCR.
  9562. 7. Latency “L1/L2/L3/L4” of MAC.L and MAC.W instructions: L1 is the latency for Rm, L2
  9563. that for Rn, L3 that for MACH, and L4 that for MACL.
  9564. 8. Latency “L1/L2” of MUL.L, MULS.W, MULU.W, DMULS.L, and DMULU.L instructions:
  9565. L1 is the latency for MACH, and L2 that for MACL.
  9566. 9. Execution pattern: The instruction execution pattern number (see figure 8.2)
  9567. 10.Lock/stage: Stage locked by the instruction
  9568. 11.Lock/start: Locking start cycle; 1 is the first D-stage of the instruction.
  9569. 12.Lock/cycles: Number of cycles locked
  9570. Exceptions:
  9571. 1. When a floating-point computation instruction is followed by an FMOV store, an STS
  9572. FPUL, Rn instruction, or an STS.L FPUL, @-Rn instruction, the latency of the floating-
  9573. point computation is decreased by 1 cycle.
  9574. 2. When the preceding instruction loads the shift amount of the following SHAD/SHLD, the
  9575. latency of the load is increased by 1 cycle.
  9576. 3. When an LS group instruction with a latency of less than 3 cycles is followed by a
  9577. double-precision floating-point instruction, FIPR, or FTRV, the latency of the first
  9578. instruction is increased to 3 cycles.
  9579. Example: In the case of FMOV FR4,FR0 and FIPR FV0,FV4, FIPR is stalled for 2
  9580. cycles.
  9581. 4. When MAC*/MUL*/DMUL* is followed by an STS.L MAC*, @-Rn instruction, the latency
  9582. of MAC*/MUL*/DMUL* is 5 cycles.
  9583.  
  9584. 175
  9585.  
  9586. ----------------------- Page 192-----------------------
  9587.  
  9588. 5. In the case of consecutive executions of MAC*/MUL*/DMUL*, the latency is decreased
  9589. to 2 cycles.
  9590. 6. When an LDS to MAC* is followed by an STS.L MAC*, @-Rn instruction, the latency of
  9591. the LDS to MAC* is 4 cycles.
  9592. 7. When an LDS to MAC* is followed by MAC*/MUL*/DMUL*, the latency of the LDS to
  9593. MAC* is 1 cycle.
  9594. 8. When an FSCHG or FRCHG instruction is followed by an LS group instruction that reads
  9595. or writes to a floating-point register, the aforementioned LS group instruction[s] cannot
  9596. be executed in parallel.
  9597. 9. When a single-precision FTRC instruction is followed by an STS FPUL, Rn instruction,
  9598. the latency of the single-precision FTRC instruction is 1 cycle.
  9599.  
  9600. 176
  9601.  
  9602. ----------------------- Page 193-----------------------
  9603.  
  9604. Section 9 Power-Down Modes
  9605.  
  9606. 9 . 1 Overview
  9607.  
  9608. In the power-down modes, some of the on-chip peripheral modules and the CPU functions are
  9609. halted, enabling power consumption to be reduced.
  9610.  
  9611. 9 . 1 . 1 Types of Power-Down Modes
  9612.  
  9613. The following power-down modes and functions are provided:
  9614.  
  9615. • Sleep mode
  9616.  
  9617. • Deep sleep mode
  9618.  
  9619. • Standby mode
  9620.  
  9621. • Module standby function (TMU, RTC, SCI/SCIF, and DMAC on-chip peripheral modules)
  9622.  
  9623. Table 9.1 shows the conditions for entering these modes from the program execution state, the
  9624. status of the CPU and peripheral modules in each mode, and the method of exiting each mode.
  9625.  
  9626. 177
  9627.  
  9628. ----------------------- Page 194-----------------------
  9629.  
  9630. Table 9.1 Status of CPU and Peripheral Modules in Power-Down Modes
  9631.  
  9632. Status
  9633.  
  9634. Power- On-chip
  9635. Down Entering On- Peripher External Exiting
  9636. Mode Condition CPG CPU Chip a l Pins Memory Method
  9637. s Memory Modules
  9638.  
  9639. Sleep SLEEP Operating Halted Held Operating Held Refreshing 〈 Interrupt
  9640. instruction (registers
  9641. executed held) 〈 Reset
  9642. while STBY
  9643. bit is 0 in
  9644. STBCR
  9645.  
  9646. Deep SLEEP Operating Halted Held Operating Held Self- 〈 Interrupt
  9647. sleep instruction (registers (DMA refreshing
  9648. executed held) halted) 〈 Reset
  9649. while STBY
  9650. bit is 0 in
  9651. STBCR, and
  9652. DSLP bit is
  9653. 1 in
  9654. STBCR2
  9655.  
  9656. Standby SLEEP Halted Halted Held Halted* Held Self- 〈 Interrupt
  9657. instruction (registers refreshing
  9658. executed held) 〈 Reset
  9659. while STBY
  9660. bit is 1 in
  9661. STBCR
  9662.  
  9663. Module Setting Operating Operating Held Specified Held Refreshing 〈 Clearing
  9664. standby MSTP bit to modules MSTP
  9665. 1 in STBCR halted*
  9666. bit to 0
  9667.  
  9668. 〈 Reset
  9669.  
  9670. Note: The RTC operates when the START bit in RCR2 is 1 (see section 11, Realtime Clock (RTC)).
  9671.  
  9672. 178
  9673.  
  9674. ----------------------- Page 195-----------------------
  9675.  
  9676. 9 . 1 . 2 Register Configuration
  9677.  
  9678. Table 9.2 shows the registers used for power-down mode control.
  9679.  
  9680. Table 9.2 Power-Down Mode Registers
  9681.  
  9682. Initial Area 7 Acces
  9683. Name Abbreviation R/ W Value P4 Address Address s Size
  9684.  
  9685. Standby control register STBCR R/W H'00 H'FFC00004 H'1FC00004 8
  9686.  
  9687. Standby control register 2 STBCR2 R/W H'00 H'FFC00010 H'1FC00010 8
  9688.  
  9689. 9 . 1 . 3 Pin Configuration
  9690.  
  9691. Table 9.3 shows the pins used for power-down mode control.
  9692.  
  9693. Table 9.3 Power-Down Mode Pins
  9694.  
  9695. Pin Name Abbreviation I / O Function
  9696.  
  9697. Processor status 1 STATUS1 Output Indicate the processor’s operating
  9698. status.
  9699. Processor status 0 STATUS0
  9700. HH: Reset
  9701. HL: Sleep mode
  9702. LH: Standby mode
  9703. LL: Normal operation
  9704.  
  9705. Note: H: High level
  9706. L: Low level
  9707.  
  9708. 9 . 2 Register Descriptions
  9709.  
  9710. 9 . 2 . 1 Standby Control Register (STBCR)
  9711.  
  9712. The standby control register (STBCR) is an 8-bit readable/writable register that specifies the
  9713. power-down mode status. It is initialized to H'00 by a power-on reset via the RESET pin or due to
  9714. watchdog timer overflow.
  9715.  
  9716. Bit: 7 6 5 4 3 2 1 0
  9717.  
  9718. STBY PHZ PPU MSTP4 MSTP3 MSTP2 MSTP1 MSTP0
  9719.  
  9720. Initial value: 0 0 0 0 0 0 0 0
  9721.  
  9722. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  9723.  
  9724. 179
  9725.  
  9726. ----------------------- Page 196-----------------------
  9727.  
  9728. Bit 7—Standby (STBY): Specifies a transition to standby mode.
  9729.  
  9730. Bit 7: STBY Description
  9731.  
  9732. 0 Transition to sleep mode on execution of SLEEP instruction (Initial value)
  9733.  
  9734. 1 Transition to standby mode on execution of SLEEP instruction
  9735.  
  9736. Bit 6—Peripheral Module Pin High Impedance Control (PHZ): Controls the state of
  9737. peripheral module related pins in standby mode. When the PHZ bit is set to 1, peripheral module
  9738. related pins go to the high-impedance state in standby mode.
  9739.  
  9740. For the relevant pins, see section 9.2.2, Peripheral Module Pin High Impedance Control.
  9741.  
  9742. Bit 6: PHZ Description
  9743.  
  9744. 0 Peripheral module related pins are in normal state (Initial value)
  9745.  
  9746. 1 Peripheral module related pins go to high-impedance state
  9747.  
  9748. Bit 5—Peripheral Module Pin Pull-Up Control (PPU): Controls the state of
  9749. peripheral module related pins. When the PPU bit is cleared to 0, the pull-up resistor is turned on
  9750. for peripheral module related pins in the input or high-impedance state.
  9751.  
  9752. For the relevant pins, see section 9.2.3, Peripheral Module Pin Pull-Up Control.
  9753.  
  9754. Bit 5: PPU Description
  9755.  
  9756. 0 Peripheral module related pin pull-up resistors are on (Initial value)
  9757.  
  9758. 1 Peripheral module related pin pull-up resistors are off
  9759.  
  9760. Bit 4—Module Stop 4 (MSTP4): Specifies stopping of the clock supply to the DMAC
  9761. among the on-chip peripheral modules. The clock supply to the DMAC is stopped when the
  9762. MSTP4 bit is set to 1. When DMA transfer is used, stop the transfer before setting the MSTP4
  9763. bit to 1. When DMA transfer is performed after clearing the MSTP4 bit to 0, DMAC settings
  9764. must be made again.
  9765.  
  9766. Bit 4: MSTP4 Description
  9767.  
  9768. 0 DMAC operates (Initial value)
  9769.  
  9770. 1 DMAC clock supply is stopped
  9771.  
  9772. 180
  9773.  
  9774. ----------------------- Page 197-----------------------
  9775.  
  9776. Bit 3—Module Stop 3 (MSTP3): Specifies stopping of the clock supply to serial
  9777. communication interface channel 2 (SCIF) among the on-chip peripheral modules. The clock
  9778. supply to the SCIF is stopped when the MSTP3 bit is set to 1.
  9779.  
  9780. Bit 3: MSTP3 Description
  9781.  
  9782. 0 SCIF operates (Initial value)
  9783.  
  9784. 1 SCIF clock supply is stopped
  9785.  
  9786. Bit 2—Module Stop 2 (MSTP2): Specifies stopping of the clock supply to the timer unit
  9787. (TMU) among the on-chip peripheral modules. The clock supply to the TMU is stopped when the
  9788. MSTP2 bit is set to 1.
  9789.  
  9790. Bit 2: MSTP2 Description
  9791.  
  9792. 0 TMU operates (Initial value)
  9793.  
  9794. 1 TMU clock supply is stopped
  9795.  
  9796. Bit 1—Module Stop 1 (MSTP1): Specifies stopping of the clock supply to the realtime
  9797. clock (RTC) among the on-chip peripheral modules. The clock supply to the RTC is stopped
  9798. when the MSTP1 bit is set to 1. When the clock supply is stopped, RTC registers cannot be
  9799. accessed but the counters continue to operate.
  9800.  
  9801. Bit 1: MSTP1 Description
  9802.  
  9803. 0 RTC operates (Initial value)
  9804.  
  9805. 1 RTC clock supply is stopped
  9806.  
  9807. Bit 0—Module Stop 0 (MSTP0): Specifies stopping of the clock supply to serial
  9808. communication interface channel 1 (SCI) among the on-chip peripheral modules. The clock supply
  9809. to the SCI is stopped when the MSTP0 bit is set to 1.
  9810.  
  9811. Bit 0: MSTP0 Description
  9812.  
  9813. 0 SCI operates (Initial value)
  9814.  
  9815. 1 SCI clock supply is stopped
  9816.  
  9817. 181
  9818.  
  9819. ----------------------- Page 198-----------------------
  9820.  
  9821. 9 . 2 . 2 Peripheral Module Pin High Impedance Control
  9822.  
  9823. When bit 6 in the standby control register (STBCR) is set to 1, peripheral module related pins go
  9824. to the high-impedance state in standby mode.
  9825.  
  9826. • Relevant Pins
  9827.  
  9828. SCI related pins MD0/SCK MD1/TXD2
  9829.  
  9830. MD7/TXD MD8/RTS2
  9831.  
  9832. CTS2
  9833.  
  9834. DMA related pins DACK0 DRAK0
  9835.  
  9836. DACK1 DRAK1
  9837.  
  9838. • Other Information
  9839.  
  9840. High impedance control is not performed when the above pins are used as port output pins.
  9841.  
  9842. 9 . 2 . 3 Peripheral Module Pin Pull-Up Control
  9843.  
  9844. When bit 5 in the standby control register (STBCR) is cleared to 0, peripheral module related pins
  9845. are pulled up when in the input or high-impedance state.
  9846.  
  9847. • Relevant Pins
  9848.  
  9849. SCI related pins MD0/SCK MD1/TXD2 MD2/RXD2
  9850.  
  9851. MD7/TXD MD8/RTS2 SCK2/MRESET
  9852.  
  9853. RXD CTS2
  9854.  
  9855. DMA related pins DREQ0 DACK0 DRAK0
  9856.  
  9857. DREQ1 DACK1 DRAK1
  9858.  
  9859. TMU related pin TCLK
  9860.  
  9861. 182
  9862.  
  9863. ----------------------- Page 199-----------------------
  9864.  
  9865. 9 . 2 . 4 Standby Control Register 2 (STBCR2)
  9866.  
  9867. Standby control register 2 (STBCR2) is an 8-bit readable/writable register that specifies the sleep
  9868. mode and deep sleep mode transition conditions. It is initialized to H'00 by a power-on reset via
  9869. the RESET pin or due to watchdog timer overflow.
  9870.  
  9871. Bit: 7 6 5 4 3 2 1 0
  9872.  
  9873. DSLP — — — — — — —
  9874.  
  9875. Initial value: 0 0 0 0 0 0 0 0
  9876.  
  9877. R/W: R/W R R R R R R R
  9878.  
  9879. Bit 7—Deep Sleep (DSLP): Specifies a transition to deep sleep mode
  9880.  
  9881. Bit 7: DSLP Description
  9882.  
  9883. 0 Transition to sleep mode or standby mode on execution of SLEEP
  9884. instruction, according to setting of STBY bit in STBCR register(Initial value)
  9885.  
  9886. 1 Transition to deep sleep mode on execution of SLEEP instruction*
  9887.  
  9888. Note: * When the STBY bit in the STBCR register is 0
  9889.  
  9890. Bits 6 to 0—Reserved: Only 0 should only be written to these bits; operation cannot be
  9891. guaranteed if 1 is written. These bits are always read as 0.
  9892.  
  9893. 183
  9894.  
  9895. ----------------------- Page 200-----------------------
  9896.  
  9897. 9 . 3 Sleep Mode
  9898.  
  9899. 9 . 3 . 1 Transition to Sleep Mode
  9900.  
  9901. If a SLEEP instruction is executed when the STBY bit in STBCR is cleared to 0, the chip
  9902. switches from the program execution state to sleep mode. After execution of the SLEEP
  9903. instruction, the CPU halts but its register contents are retained. The on-chip peripheral modules
  9904. continue to operate, and the clock continues to be output from the CKIO pin.
  9905.  
  9906. In sleep mode, a high-level signal is output at the STATUS1 pin, and a low-level signal at the
  9907. STATUS0 pin.
  9908.  
  9909. 9 . 3 . 2 Exit from Sleep Mode
  9910.  
  9911. Sleep mode is exited by means of an interrupt (NMI, IRL, or on-chip peripheral module) or a reset.
  9912. In sleep mode, interrupts are accepted even if the BL bit in the SR register is 1. If necessary, SPC
  9913. and SSR should be saved to the stack before executing the SLEEP instruction.
  9914.  
  9915. Exit by Interrupt: When an NMI, IRL, or on-chip peripheral module interrupt is generated,
  9916. sleep mode is exited and interrupt exception handling is executed. The code corresponding to the
  9917. interrupt source is set in the INTEVT register.
  9918.  
  9919. Exit by Reset: Sleep mode is exited by means of a power-on or manual reset via the RESET
  9920. pin, or a power-on or manual reset executed when the watchdog timer overflows.
  9921.  
  9922. 9 . 4 Deep Sleep Mode
  9923.  
  9924. 9 . 4 . 1 Transition to Deep Sleep Mode
  9925.  
  9926. If a SLEEP instruction is executed when the STBY bit in STBCR is cleared to 0 and the DSLP bit
  9927. in STBCR2 is set to 1, the chip switches from the program execution state to deep sleep mode.
  9928. After execution of the SLEEP instruction, the CPU halts but its register contents are retained.
  9929. Except for the DMAC, on-chip peripheral modules continue to operate, and the clock continues to
  9930. be output from the CKIO pin.
  9931.  
  9932. In deep sleep mode, a high-level signal is output at the STATUS1 pin, and a low-level signal at
  9933. the STATUS0 pin.
  9934.  
  9935. 9 . 4 . 2 Exit from Deep Sleep Mode
  9936.  
  9937. As with sleep mode, deep sleep mode is exited by means of an interrupt (NMI, IRL, or on-chip
  9938. peripheral module) or a reset.
  9939.  
  9940. 184
  9941.  
  9942. ----------------------- Page 201-----------------------
  9943.  
  9944. 9 . 5 Standby Mode
  9945.  
  9946. 9 . 5 . 1 Transition to Standby Mode
  9947.  
  9948. If a SLEEP instruction is executed when the STBY bit in STBCR is set to 1, the chip switches
  9949. from the program execution state to standby mode. In standby mode, the on-chip peripheral
  9950. modules halt as well as the CPU. Clock output from the CKIO pin is also stopped.
  9951.  
  9952. The CPU and cache register contents are retained. Some on-chip peripheral module registers are
  9953. initialized. The state of the peripheral module registers in standby mode is shown in table 9.4.
  9954.  
  9955. Table 9.4 State of Registers in Standby Mode
  9956.  
  9957. Registers That Retain
  9958. Module Initialized Registers Their Contents
  9959.  
  9960. Interrupt controller — All registers
  9961.  
  9962. User break controller — All registers
  9963.  
  9964. Bus state controller — All registers
  9965.  
  9966. On-chip oscillation circuits — All registers
  9967.  
  9968. Timer unit TSTR register* All registers except TSTR
  9969.  
  9970. Realtime clock — All registers
  9971.  
  9972. Direct memory access controller — All registers
  9973.  
  9974. Serial communication interface See Appendix A, Address List See Appendix A, Address List
  9975.  
  9976. Note: * Not initialized when the realtime clock (RTC) is in use (see section 12, Timer Unit (TMU)).
  9977. Note: DMA transfer should be terminated before making a transition to standby mode. Transfer
  9978. results are not guaranteed if standby mode is entered during transfer.
  9979.  
  9980. The procedure for a transition to standby mode is shown below.
  9981.  
  9982. 1. Clear the TME bit in the WDT timer control register (WTCSR) to 0, and stop the WDT.
  9983.  
  9984. Set the initial value for the up-count in the WDT timer counter (WTCNT), and set the clock to
  9985. be used for the up-count in bits CKS2–CKS0 in the WTCSR register.
  9986.  
  9987. 2. Set the STBY bit in the STBCR register to 1, then execute a SLEEP instruction.
  9988.  
  9989. 3. When standby mode is entered and the chip’s internal clock stops, a low-level signal is output
  9990. at the STATUS1 pin, and a high-level signal at the STATUS0 pin.
  9991.  
  9992. 185
  9993.  
  9994. ----------------------- Page 202-----------------------
  9995.  
  9996. 9 . 5 . 2 Exit from Standby Mode
  9997.  
  9998. Standby mode is exited by means of an interrupt (NMI, IRL, or on-chip peripheral module) or a
  9999. reset via the RESET pin.
  10000.  
  10001. Exit by Interrupt: A hot start can be performed by means of the on-chip WDT. When an NMI,
  10002. IRL*1, or on-chip peripheral module (except interval timer)*2 interrupt is detected, the WDT starts
  10003.  
  10004. counting. After the count overflows, clocks are supplied to the entire chip, standby mode is exited,
  10005. and the STATUS1 and STATUS0 pins both go low. Interrupt exception handling is then executed,
  10006. and the code corresponding to the interrupt source is set in the INTEVT register. In standby mode,
  10007. interrupts are accepted even if the BL bit in the SR register is 1, and so, if necessary, SPC and
  10008. SSR should be saved to the stack before executing the SLEEP instruction.
  10009.  
  10010. The phase of the CKIO pin clock output may be unstable immediately after an interrupt is
  10011. detected, until standby mode is exited.
  10012.  
  10013. Notes: 1. Only when the RTC clock (32.768 kHz) is operating (see section 19.2.2, IRL
  10014. Interrupts), standby mode can be exited by means of IRL3–IRL0 (when the IRL3–IRL0
  10015. level is higher than the SR register I3–I0 mask level).
  10016.  
  10017. 2. Standby mode can be exited by means of an RTC interrupt.
  10018.  
  10019. Exit by Reset: Standby mode is exited by means of a reset (power-on or manual) via the
  10020. RESET pin. The RESET pin should be held low until clock oscillation stabilizes. The internal
  10021. clock continues to be output at the CKIO pin.
  10022.  
  10023. 9 . 5 . 3 Clock Pause Function
  10024.  
  10025. In standby mode, it is possible to stop or change the frequency of the clock input from the EXTAL
  10026. pin. This function is used as follows.
  10027.  
  10028. 1. Enter standby mode following the transition procedure described above.
  10029.  
  10030. 2. When standby mode is entered and the chip’s internal clock stops, a low-level signal is output
  10031. at the STATUS1 pin, and a high-level signal at the STATUS0 pin.
  10032.  
  10033. 3. The input clock is stopped, or its frequency changed, after the STATUS1 pin goes low and the
  10034. STATUS0 pin high.
  10035.  
  10036. 4. When the frequency is changed, input an NMI or IRL interrupt after the change. When the
  10037. clock is stopped, input an NMI or IRL interrupt after applying the clock.
  10038.  
  10039. 5. After the time set in the WDT, clock supply begins inside the chip, the STATUS1 and
  10040. STATUS0 pins both go low, and operation is resumed from interrupt exception handling.
  10041.  
  10042. 186
  10043.  
  10044. ----------------------- Page 203-----------------------
  10045.  
  10046. 9 . 6 Module Standby Function
  10047.  
  10048. 9 . 6 . 1 Transition to Module Standby Function
  10049.  
  10050. Setting the MSTP4–MSTP0 bits in the standby control register to 1 enables the clock supply to
  10051. the corresponding on-chip peripheral modules to be halted. Use of this function allows power
  10052. consumption in sleep mode to be further reduced.
  10053.  
  10054. In the module standby state, the on-chip peripheral module external pins retain their states prior to
  10055. halting of the modules, and most registers retain their states prior to halting of the modules.
  10056.  
  10057. Bit Description
  10058.  
  10059. MSTP4 0 DMAC operates
  10060.  
  10061. 1 Clock supplied to DMAC is stopped
  10062.  
  10063. MSTP3 0 SCIF operates
  10064.  
  10065. 1 Clock supplied to SCIF is stopped
  10066.  
  10067. MSTP2 0 TMU operates
  10068. 1 Clock supplied to TMU is stopped, and register is initialized*1
  10069.  
  10070. MSTP1 0 RTC operates
  10071.  
  10072. 2
  10073. 1 Clock supplied to RTC is stopped*
  10074.  
  10075. MSTP0 0 SCI operates
  10076.  
  10077. 1 Clock supplied to SCI is stopped
  10078.  
  10079. Notes: 1. The register initialized is the same as in standby mode, but initialization is not
  10080. performed if the RTC clock is not in use (see section 12, Timer Unit (TMU)).
  10081. 2. The counter operates when the START bit in RCR2 is 1 (see section 11, Realtime Clock
  10082. (RTC)).
  10083.  
  10084. 9 . 6 . 2 Exit from Module Standby Function
  10085.  
  10086. The module standby function is exited by clearing the MSTP4–MSTP0 bits to 0, or by a power-
  10087. on reset via the RESET pin or a power-on reset caused by watchdog timer overflow.
  10088.  
  10089. 187
  10090.  
  10091. ----------------------- Page 204-----------------------
  10092.  
  10093. 9 . 7 STATUS Pin Change Timing
  10094.  
  10095. The STATUS1 and STATUS0 pin change timing is shown below.
  10096.  
  10097. The meaning of the STATUS pin settings is as follows:
  10098.  
  10099. Reset: HH (STATUS1 high, STATUS0 high)
  10100. Sleep: HL (STATUS1 high, STATUS0 low)
  10101. Standby: LH (STATUS1 low, STATUS0 high)
  10102. Normal: LL (STATUS1 low, STATUS0 low)
  10103.  
  10104. The meaning of the clock units is as follows:
  10105.  
  10106. Bcyc: Bus clock cycle
  10107. Pcyc: Peripheral clock cycle
  10108.  
  10109. 9 . 7 . 1 In Reset
  10110.  
  10111. Power-On Reset
  10112.  
  10113. CKIO
  10114.  
  10115. PLL stabilization
  10116. time
  10117. RESET
  10118.  
  10119. SCK2
  10120.  
  10121. STATUS Normal Reset Normal
  10122.  
  10123.  
  10124. 0–30 Bcyc
  10125. 0–5 Bcyc
  10126.  
  10127. Figure 9.1 STATUS Output in Power-On Reset
  10128.  
  10129. 188
  10130.  
  10131. ----------------------- Page 205-----------------------
  10132.  
  10133. Manual Reset
  10134.  
  10135. CKIO
  10136.  
  10137. RESET*
  10138.  
  10139. SCK2
  10140.  
  10141. STATUS Normal Reset Normal
  10142.  
  10143. 0–30 Bcyc
  10144. ≥ 0 Bcyc
  10145.  
  10146. Note: * In a manual reset, STATUS = HH (reset) is set and an internal reset started after waiting
  10147. until the end of the currently executing bus cycle.
  10148.  
  10149. Figure 9.2 STATUS Output in Manual Reset
  10150.  
  10151. 9 . 7 . 2 In Exit from Standby Mode
  10152.  
  10153. Standby → Interrupt
  10154.  
  10155. Oscillation stops Interrupt request WDT overflow
  10156.  
  10157. CKIO
  10158.  
  10159. WDT count
  10160.  
  10161. STATUS Normal Standby Normal
  10162.  
  10163. Figure 9.3 STATUS Output in Standby → Interrupt Sequence
  10164.  
  10165. 189
  10166.  
  10167. ----------------------- Page 206-----------------------
  10168.  
  10169. Standby → Power-On Reset
  10170.  
  10171. Oscillation stops Reset
  10172.  
  10173. CKIO
  10174.  
  10175. RESET*1
  10176.  
  10177. SCK2
  10178.  
  10179. STATUS Normal Standby *2 Reset Normal
  10180.  
  10181. 0–30 Bcyc
  10182. 0–10 Bcyc
  10183.  
  10184. Notes: 1. When standby mode is exited by means of a power-on reset, a WDT count is not
  10185. performed. Hold RESET low for the PLL oscillation stabilization time.
  10186. 2. Undefined
  10187.  
  10188. Figure 9.4 STATUS Output in Standby → Power-On Reset Sequence
  10189.  
  10190. 190
  10191.  
  10192. ----------------------- Page 207-----------------------
  10193.  
  10194. Standby → Manual Reset
  10195.  
  10196. Oscillation stops Reset
  10197.  
  10198. CKIO
  10199.  
  10200. RESET*
  10201.  
  10202. SCK2
  10203.  
  10204. STATUS Normal Standby Reset Normal
  10205.  
  10206. 0–30 0–20 Bcyc
  10207. Bcyc
  10208. Note: * When standby mode is exited by means of a manual reset, a WDT count is not performed.
  10209. Hold RESET low for the PLL oscillation stabilization time.
  10210.  
  10211. Figure 9.5 STATUS Output in Standby → Manual Reset Sequence
  10212.  
  10213. 9 . 7 . 3 In Exit from Sleep Mode
  10214.  
  10215. Sleep → Interrupt
  10216.  
  10217. Interrupt request
  10218.  
  10219. CKIO
  10220.  
  10221. STATUS Normal Sleep Normal
  10222.  
  10223. Figure 9.6 STATUS Output in Sleep → Interrupt Sequence
  10224.  
  10225. 191
  10226.  
  10227. ----------------------- Page 208-----------------------
  10228.  
  10229. Sleep → Power-On Reset
  10230.  
  10231. Reset
  10232.  
  10233. CKIO
  10234.  
  10235. RESET*1
  10236.  
  10237. SCK2
  10238.  
  10239. STATUS Normal Sleep *2 Reset Normal
  10240.  
  10241. 0–30 Bcyc
  10242. 0–10 Bcyc
  10243.  
  10244. Notes: 1. When sleep mode is exited by means of a power-on reset, hold RESET low for the
  10245. oscillation stabilization time.
  10246. 2. Undefined
  10247.  
  10248.  
  10249. Figure 9.7 STATUS Output in Sleep → Power-On Reset Sequence
  10250.  
  10251. 192
  10252.  
  10253. ----------------------- Page 209-----------------------
  10254.  
  10255. Sleep → Manual Reset
  10256.  
  10257. Reset
  10258.  
  10259. CKIO
  10260.  
  10261. RESET*
  10262.  
  10263. SCK2
  10264.  
  10265. STATUS Normal Sleep Reset Normal
  10266.  
  10267. 0–30 Bcyc 0–30 Bcyc
  10268.  
  10269. Note: * Hold RESET low until STATUS = reset.
  10270.  
  10271. Figure 9.8 STATUS Output in Sleep → Manual Reset Sequence
  10272.  
  10273. 193
  10274.  
  10275. ----------------------- Page 210-----------------------
  10276.  
  10277. 9 . 7 . 4 In Exit from Deep Sleep Mode
  10278.  
  10279. Deep Sleep → Interrupt
  10280.  
  10281. Interrupt request
  10282.  
  10283. CKIO
  10284.  
  10285. STATUS Normal Deep sleep Normal
  10286.  
  10287. Figure 9.9 STATUS Output in Deep Sleep → Interrupt Sequence
  10288.  
  10289. Deep Sleep → Power-On Reset
  10290.  
  10291. Reset
  10292.  
  10293. CKIO
  10294.  
  10295. RESET*1
  10296.  
  10297. SCK2
  10298.  
  10299. STATUS Normal Deep sleep *2 Reset Normal
  10300.  
  10301. 0–30 Bcyc
  10302. 0–10 Bcyc
  10303.  
  10304. Notes: 1. When deep sleep mode is exited by means of a power-on reset, holdRESET low for the
  10305. oscillation stabilization time.
  10306. 2. Undefined
  10307.  
  10308. Figure 9.10 STATUS Output in Deep Sleep → Power-On Reset Sequence
  10309.  
  10310. 194
  10311.  
  10312. ----------------------- Page 211-----------------------
  10313.  
  10314. Deep Sleep → Manual Reset
  10315.  
  10316. Reset
  10317.  
  10318. CKIO
  10319.  
  10320. RESET*
  10321.  
  10322. SCK2
  10323.  
  10324. STATUS Normal Deep sleep Reset Normal
  10325.  
  10326. 0–30 Bcyc 0–30 Bcyc
  10327.  
  10328. Note: * Hold RESET low until STATUS = reset.
  10329.  
  10330. Figure 9.11 STATUS Output in Deep Sleep → Manual Reset Sequence
  10331.  
  10332. 195
  10333.  
  10334. ----------------------- Page 212-----------------------
  10335.  
  10336. 196
  10337.  
  10338. ----------------------- Page 213-----------------------
  10339.  
  10340. Section 10 Clock Oscillation Circuits
  10341.  
  10342. 1 0 . 1 Overview
  10343.  
  10344. The on-chip oscillation circuits comprise a clock pulse generator (CPG) and a watchdog timer
  10345. (WDT).
  10346.  
  10347. The CPG generates the clocks supplied inside the processor and performs power-down mode
  10348. control.
  10349.  
  10350. The WDT is a single-channel timer used to count the clock stabilization time when exiting
  10351. standby mode or a temporary standby state when the frequency is changed. It can be used as a
  10352. normal watchdog timer or an interval timer.
  10353.  
  10354. 1 0 . 1 . 1 Features
  10355.  
  10356. The CPG has the following features:
  10357.  
  10358. • Three clocks
  10359.  
  10360. The CPG can generate independently the CPU clock (Iφ) used by the CPU, FPU, caches, and
  10361. TLB, the peripheral module clock (Pφ) used by the peripheral modules, and the bus clock
  10362. (CKIO) used by the external bus interface.
  10363.  
  10364. • Six clock modes
  10365.  
  10366. Any of six clock operating modes can be selected, with different combinations of CPU clock,
  10367. bus clock, and peripheral module clock division ratios after a power-on reset.
  10368.  
  10369. • Frequency change function
  10370.  
  10371. PLL (phase-locked loop) circuits and a frequency divider in the CPG enable the CPU clock, bus
  10372. clock, and peripheral module clock frequencies to be changed independently. Frequency changes
  10373. are performed by software in accordance with the settings in the frequency control register
  10374. (FRQCR).
  10375.  
  10376. • PLL on/off control
  10377.  
  10378. Power consumption can be reduced by stopping the PLL circuits during low-frequency
  10379. operation.
  10380.  
  10381. • Power-down mode control
  10382.  
  10383. It is possible to stop the clock in sleep mode and standby mode, and to stop specific modules
  10384. with the module standby function.
  10385.  
  10386. The WDT has the following features
  10387.  
  10388. • Can be used to secure clock stabilization time
  10389.  
  10390. 197
  10391.  
  10392. ----------------------- Page 214-----------------------
  10393.  
  10394. Used when exiting standby mode or a temporary standby state when the clock frequency is
  10395. changed.
  10396.  
  10397. • Can be switched between watchdog timer mode and interval timer mode
  10398.  
  10399. • Internal reset generation in watchdog timer mode
  10400.  
  10401. An internal reset is executed on counter overflow.
  10402.  
  10403. Power-on reset or manual reset can be selected.
  10404.  
  10405. • Interrupt generation in interval timer mode
  10406.  
  10407. An interval timer interrupt is generated on counter overflow.
  10408.  
  10409. • Selection of eight counter input clocks
  10410.  
  10411. Any of eight clocks can be selected, scaled from the × 1 clock of frequency divider 2 shown in
  10412. figure 10.1.
  10413.  
  10414. The CPG is described in sections 10.2 to 10.6, and the WDT in sections 10.7 to 10.9.
  10415.  
  10416. 198
  10417.  
  10418. ----------------------- Page 215-----------------------
  10419.  
  10420. 1 0 . 2 Overview of CPG
  10421.  
  10422. 1 0 . 2 . 1 Block Diagram of CPG
  10423.  
  10424. Figure 10.1 shows a block diagram of the CPG.
  10425.  
  10426. Oscillator circuit
  10427.  
  10428. Frequency
  10429. divider 2
  10430. PLL circuit 1 × 1
  10431. × 1/2
  10432. × 6
  10433. × 1/3 CPU clock (Iø)
  10434. × 1/4 cycle Icyc
  10435. × 1/6
  10436. × 1/8
  10437.  
  10438. Frequency
  10439. XTAL Crystal divider 1 Peripheral module
  10440. oscillator
  10441. × 1/2 clock (Pø) cycle
  10442. EXTAL Pcyc
  10443.  
  10444. MD8
  10445.  
  10446. Bus clock (Bø)
  10447. cycle Bcyc
  10448.  
  10449. PLL circuit 2
  10450.  
  10451. × 1
  10452. CKIO
  10453.  
  10454. CPG control unit
  10455.  
  10456. MD2
  10457. Clock frequency Standby control
  10458. MD1
  10459. control circuit circuit
  10460. MD0
  10461.  
  10462.  
  10463. FRQCR STBCR
  10464. STBCR2
  10465.  
  10466. Bus interface
  10467.  
  10468. Internal bus
  10469.  
  10470. FRQCR: Frequency control register
  10471. STBCR: Standby control register
  10472. STBCR2: Standby control register 2
  10473.  
  10474. Figure 10.1 Block Diagram of CPG
  10475.  
  10476. 199
  10477.  
  10478. ----------------------- Page 216-----------------------
  10479.  
  10480. The function of each of the CPG blocks is described below.
  10481.  
  10482. PLL Circuit 1: PLL circuit 1 has a function for multiplying the clock frequency from the
  10483. EXTAL pin or crystal oscillator by 6. Starting and stopping is controlled by a frequency control
  10484. register setting. Control is performed so that the internal clock rising edge phase matches the input
  10485. clock rising edge phase.
  10486.  
  10487. PLL Circuit 2: PLL circuit 2 coordinates the phases of the bus clock and the CKIO pin output
  10488. clock. Starting and stopping is controlled by a frequency control register setting.
  10489.  
  10490. Crystal Oscillator: This is the oscillator circuit used when a crystal resonator is connected to
  10491. the XTAL and EXTAL pins. Use of the crystal oscillator can be selected with the MD8 pin.
  10492.  
  10493. Frequency Divider 1: Frequency divider 1 has a function for adjusting the clock waveform
  10494. duty to 50% by halving the input clock frequency when clock input from the EXTAL pin is
  10495. supplied internally without using PLL circuit 1.
  10496.  
  10497. Frequency Divider 2: Frequency divider 2 generates the CPU clock (Iφ), bus clock (Bφ), and
  10498. peripheral module clock (Pφ). The division ratio is set in the frequency control register.
  10499.  
  10500. Clock Frequency Control Circuit: The clock frequency control circuit controls the clock
  10501. frequency by means of the MD pins and frequencycontrol register.
  10502.  
  10503. Standby Control Circuit: The standby control circuit controls the state of the on-chip
  10504. oscillation circuits and other modules when the clock is switched and in sleep and standby modes.
  10505.  
  10506. Frequency Control Register (FRQCR): The frequency control register contains control
  10507. bits for clock output from the CKIO pin, PLL circuit 1 and 2 on/off control, and the CPU clock,
  10508. bus clock, and peripheral module clock frequency division ratios.
  10509.  
  10510. Standby Control Register (STBCR): The standby control register contains power save
  10511. mode control bits. For further information on the standby control register, see section 9, Power-
  10512. Down Modes.
  10513.  
  10514. Standby Control Register 2 (STBCR2): Standby control register 2 contains a power save
  10515. mode control bit. For further information on standby control register 2, see section 9, Power-
  10516. Down Modes.
  10517.  
  10518. 200
  10519.  
  10520. ----------------------- Page 217-----------------------
  10521.  
  10522. 1 0 . 2 . 2 CPG Pin Configuration
  10523.  
  10524. Table 10.1 shows the CPG pins and their functions.
  10525.  
  10526. Table 10.1CPG Pins
  10527.  
  10528. Pin Name Abbreviation I / O Function
  10529.  
  10530. Mode control pins MD0 Input Set clock operating mode
  10531.  
  10532. MD1
  10533.  
  10534. MD2
  10535.  
  10536. Crystal I/O pins XTAL Output Connects crystal resonator
  10537. (clock input pins)
  10538.  
  10539. EXTAL Input Connects crystal resonator, or used as
  10540. external clock input pin
  10541.  
  10542. MD8 Input Selects use/non-use of crystal resonator
  10543.  
  10544. When MD8 = 0, external clock is input from
  10545. EXTAL
  10546.  
  10547. When MD8 = 1, crystal resonator is
  10548. connected directly to EXTAL and XTAL
  10549.  
  10550. Clock output pin CKIO Output Used as external clock output pin
  10551.  
  10552. Level can also be fixed
  10553.  
  10554. CKIO enable pin CKE Output 0 when CKIO output clock is unstable
  10555.  
  10556. 1 0 . 2 . 3 CPG Register Configuration
  10557.  
  10558. Table 10.2 shows the CPG register configuration.
  10559.  
  10560. Table 10.2CPG Register
  10561.  
  10562. Area 7 Acces
  10563. Name Abbreviation R/W Initial ValueP4 Address Address s Size
  10564.  
  10565. Frequency control FRQCR R/W Undefined* H'FFC00000 H'1FC00000 16
  10566. register
  10567.  
  10568. Note: * Depends on the clock operating mode set by pins MD2–MD0.
  10569.  
  10570. 201
  10571.  
  10572. ----------------------- Page 218-----------------------
  10573.  
  10574. 1 0 . 3 Clock Operating Modes
  10575.  
  10576. Table 10.3 shows the clock operating modes corresponding to various combinations of mode
  10577. control pin (MD2–MD0) settings.
  10578.  
  10579. Table 10.4 shows FRQCR settings and internal clock frequencies.
  10580.  
  10581. Table 10.3 Clock Operating Modes
  10582.  
  10583. Clock External 1/2 PLL1 PLL2 Frequency Input Clock
  10584. Operating Pin Combination Frequency (vs. Input Clock) Frequency
  10585. Mode Divider Range (MHz)
  10586.  
  10587. MD2 MD1 MD0 CPU Bus Peripheral
  10588. Clock Clock Module
  10589. Clock
  10590.  
  10591. 0 0 0 0 Off On On 6 3/2 3/2 17–33
  10592.  
  10593. 1 1 Off On On 6 1 1 25–33
  10594.  
  10595. 2 1 0 On On On 3 1 1/2 25–66
  10596.  
  10597. 3 1 Off On On 6 2 1 13–33
  10598.  
  10599. 4 1 0 0 On On On 3 3/2 3/4 17–66
  10600.  
  10601. 5 1 Off On On 6 3 3/2 9–33
  10602.  
  10603. Notes: 1. The maximum frequencies of the CPU clock, bus clock, and peripheral module clock,
  10604. respectively, are 200 MHz, 100 MHz, and 50 MHz.
  10605. 2. The frequency range of PLL2 is 25 MHz to 100 MHz.
  10606.  
  10607. 202
  10608.  
  10609. ----------------------- Page 219-----------------------
  10610.  
  10611. Table 10.4 FRQCR Settings and Internal Clock Frequencies
  10612.  
  10613. FRQCR Frequency Division Ratio Clock Ratio (I:B:P)*
  10614. (Lower
  10615. 9 Bits)
  10616.  
  10617. CPU Bus Peripheral 1/2 Frequency 1/2 Frequency 1/2 Frequency 1/2 Frequency
  10618. Clock Clock Module Divider Off Divider Off Divider On Divider On
  10619. Clock PLL1 Off PLL1 On PLL1 Off PLL1 On
  10620.  
  10621. 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
  10622.  
  10623. H'00A 1/4 1:1/2:1/4 6:3:3/2 1/2:1/4:1/8 3:3/2:3/4
  10624.  
  10625. H'00C 1/8 1:1/2:1/8 6:3:3/4 1/2:1/4:1/16 3:3/2:3/8
  10626.  
  10627. H'011 1/3 1/3 1:1/3:1/3 6:2:2 1/2:1/6:1/6 3:1:1
  10628.  
  10629. H'013 1/6 1:1/3:1/6 6:2:1 1/2:1/6:1/12 3:1:1/2
  10630.  
  10631. 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
  10632.  
  10633. 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
  10634.  
  10635. 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
  10636.  
  10637. 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
  10638.  
  10639. 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
  10640.  
  10641. 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
  10642.  
  10643. 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
  10644.  
  10645. 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
  10646.  
  10647. 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
  10648.  
  10649. 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
  10650.  
  10651. Note: * Taking input clock value as 1.
  10652. Do not set values other than those shown in the table.
  10653.  
  10654. 1 0 . 4 CPG Register Description
  10655.  
  10656. 1 0 . 4 . 1 Frequency Control Register (FRQCR)
  10657.  
  10658. The frequency control register (FRQCR) is a 16-bit readable/writable register that specifies
  10659. use/non-use of clock output from the CKIO pin, PLL circuit 1 and 2 on/off control, and the CPU
  10660. clock, bus clock, and peripheral module clock frequency division ratios. Only word access can be
  10661. used on FRQCR.
  10662.  
  10663. FRQCR is initialized only by a power-on reset via the RESET pin. The initial value of each bit is
  10664. determined by the clock operating mode.
  10665.  
  10666. 203
  10667.  
  10668. ----------------------- Page 220-----------------------
  10669.  
  10670. Bit: 15 14 13 12 11 10 9 8
  10671.  
  10672. — — — — CKOEN PLL1EN PLL2EN IFC2
  10673.  
  10674. Initial value: 0 0 0 0 1 1 1 —
  10675.  
  10676. R/W: R R R R R/W R/W R/W R/W
  10677.  
  10678. Bit: 7 6 5 4 3 2 1 0
  10679.  
  10680. IFC1 IFC0 BFC2 BFC1 BFC0 PFC2 PFC1 PFC0
  10681.  
  10682. Initial value: — — — — — — — —
  10683.  
  10684. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10685.  
  10686. Bits 15 to 12—Reserved: These bits are always read as 0, and should only be written with 0.
  10687.  
  10688. Bit 11—Clock Output Enable (CKOEN): Specifies whether a clock is output from the
  10689. CKIO pin or the CKIO pin is placed in the high-impedance state. When the CKIO pin goes to the
  10690. high-impedance state, operation continues at the operating frequency before this state was entered.
  10691. When the CKIO pin becomes high-impedance, it is pulled up.
  10692.  
  10693. Bit 11: CKOEN Description
  10694.  
  10695. 0 CKIO pin goes to high-impedance state
  10696.  
  10697. 1 Clock is output from CKIO pin (Initial value)
  10698.  
  10699. Bit 10—PLL Circuit 1 Enable (PLL1EN): Specifies whether PLL circuit 1 is on or off.
  10700.  
  10701. Bit 10: PLL1EN Description
  10702.  
  10703. 0 PLL circuit 1 is not used
  10704.  
  10705. 1 PLL circuit 1 is used (Initial value)
  10706.  
  10707. Bit 9—PLL Circuit 2 Enable (PLL2EN): Specifies whether PLL circuit 2 is on or off.
  10708.  
  10709. Bit 9: PLL2EN Description
  10710.  
  10711. 0 PLL circuit 2 is not used
  10712.  
  10713. 1 PLL circuit 2 is used (Initial value)
  10714.  
  10715. 204
  10716.  
  10717. ----------------------- Page 221-----------------------
  10718.  
  10719. Bits 8 to 6—CPU Clock Frequency Division Ratio (IFC): These bits specify the
  10720. CPU clock frequency division ratio with respect to the input clock, 1/2 frequency divider, or PLL
  10721. circuit 1 output frequency.
  10722.  
  10723. Bit 8: IFC2 Bit 7: IFC1 Bit 6: IFC0 Description
  10724.  
  10725. 0 0 0 × 1
  10726.  
  10727. 1 × 1/2
  10728.  
  10729. 1 0 × 1/3
  10730.  
  10731. 1 × 1/4
  10732.  
  10733. 1 0 0 × 1/6
  10734.  
  10735. 1 × 1/8
  10736.  
  10737. Other than the above Setting prohibited (Do not set)
  10738.  
  10739. Bits 5 to 3—Bus Clock Frequency Division Ratio (BFC): These bits specify the bus
  10740. clock frequency division ratio with respect to the input clock, 1/2 frequency divider, or PLL circuit
  10741. 1 output frequency.
  10742.  
  10743. Bit 5: BFC2 Bit 4: BFC1 Bit 3: BFC0 Description
  10744.  
  10745. 0 0 0 × 1
  10746.  
  10747. 1 × 1/2
  10748.  
  10749. 1 0 × 1/3
  10750.  
  10751. 1 × 1/4
  10752.  
  10753. 1 0 0 × 1/6
  10754.  
  10755. 1 × 1/8
  10756.  
  10757. Other than the above Setting prohibited (Do not set)
  10758.  
  10759. Bits 2 to 0—Peripheral Module Clock Frequency Division Ratio (PFC): These
  10760. bits specify the peripheral module clock frequency division ratio with respect to the input clock,
  10761. 1/2 frequency divider, or PLL circuit 1 output frequency.
  10762.  
  10763. Bit 2: PFC2 Bit 1: PFC1 Bit 0: PFC0 Description
  10764.  
  10765. 0 0 0 × 1/2
  10766.  
  10767. 1 × 1/3
  10768.  
  10769. 1 0 × 1/4
  10770.  
  10771. 1 × 1/6
  10772.  
  10773. 1 0 0 × 1/8
  10774.  
  10775. Other than the above Setting prohibited (Do not set)
  10776.  
  10777. 205
  10778.  
  10779. ----------------------- Page 222-----------------------
  10780.  
  10781. 1 0 . 5 Changing the Frequency
  10782.  
  10783. There are two methods of changing the internal clock frequency: by changing stopping and starting
  10784. of PLL circuit 1, and by changing the frequency division ratio of each clock. In both cases, control
  10785. is performed by software by means of the frequency control register. These methods are described
  10786. below.
  10787.  
  10788. 1 0 . 5 . 1 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is
  10789.  
  10790. Off)
  10791.  
  10792. When PLL circuit 1 is changed from the stopped to started state, a PLL stabilization time is
  10793. required. The oscillation stabilization time count is performed by the on-chip WDT.
  10794.  
  10795. 1. Set a value in WDT to provide the specified oscillation stabilization time, and stop the WDT.
  10796. The following settings are necessary:
  10797.  
  10798. WTCSR register TME bit = 0: WDT stopped
  10799.  
  10800. WTCSR register CKS2–CKS0 bits: WDT count clock division ratio
  10801.  
  10802. WTCNT counter: Initial counter value
  10803.  
  10804. 2. Set the PLL1EN bit to 1.
  10805.  
  10806. 3. Internal processor operation stops temporarily, and the WDT starts counting up. The internal
  10807. clock stops and an unstable clock is output to the CKIO pin.
  10808.  
  10809. 4. After the WDT count overflows, clock supply begins within the chip and the processor
  10810. resumes operation. The WDT stops after overflowing.
  10811.  
  10812. 1 0 . 5 . 2 Changing PLL Circuit 1 Starting/Stopping (When PLL Circuit 2 is
  10813.  
  10814. On)
  10815.  
  10816. When PLL circuit 2 is on, a PLL circuit 1 and PLL circuit 2 oscillation stabilization time is
  10817. required.
  10818.  
  10819. 1. Make WDT settings as in 10.5.1.
  10820.  
  10821. 2. Set the PLL1EN bit to 1.
  10822.  
  10823. 3. Internal processor operation stops temporarily, PLL circuit 1 oscillates, and the WDT starts
  10824. counting up. The internal clock stops and an unstable clock is output to the CKIO pin.
  10825. 4. After the WDT count overflows, PLL circuit 2 starts oscillating. The WDT resumes its up-
  10826. count from the value set in step 1 above. During this time, also, the internal clock is stopped
  10827. and an unstable clock is output to the CKIO pin.
  10828.  
  10829. 5. After the WDT count overflows, clock supply begins within the chip and the processor
  10830. resumes operation. The WDT stops after overflowing.
  10831.  
  10832. 206
  10833.  
  10834. ----------------------- Page 223-----------------------
  10835.  
  10836. 1 0 . 5 . 3 Changing Bus Clock Division Ratio (When PLL Circuit 2 is On)
  10837.  
  10838. If PLL circuit 2 is on when the bus clock frequency division ratio is changed, a PLL circuit 2
  10839. oscillation stabilization time is required.
  10840.  
  10841. 1. Make WDT settings as in 10.5.1.
  10842.  
  10843. 2. Set the BFC2–BFC0 bits to the desired value.
  10844.  
  10845. 3. Internal processor operation stops temporarily, and the WDT starts counting up. The internal
  10846. clock stops and an unstable clock is output to the CKIO pin.
  10847.  
  10848. 4. After the WDT count overflows, clock supply begins within the chip and the processor
  10849. resumes operation. The WDT stops after overflowing.
  10850.  
  10851. 1 0 . 5 . 4 Changing Bus Clock Division Ratio (When PLL Circuit 2 is Off)
  10852.  
  10853. If PLL circuit 2 is off when the bus clock frequency division ratio is changed, a WDT count is not
  10854. performed.
  10855.  
  10856. 1. Set the BFC2–BFC0 bits to the desired value.
  10857.  
  10858. 2. The set clock is switched to immediately.
  10859.  
  10860. 1 0 . 5 . 5 Changing CPU or Peripheral Module Clock Division Ratio
  10861.  
  10862. When the CPU or peripheral module clock frequency division ratio is changed, a WDT count is not
  10863. performed.
  10864.  
  10865. 1. Set the IFC2–IFC0 or PFC2–PFC0 bits to the desired value.
  10866.  
  10867. 2. The set clock is switched to immediately.
  10868.  
  10869. 1 0 . 6 Output Clock Control
  10870.  
  10871. The CKIO pin can be switched between clock output and a fixed level setting by means of the
  10872. CKOEN bit in the FRQCR register.
  10873.  
  10874. 207
  10875.  
  10876. ----------------------- Page 224-----------------------
  10877.  
  10878. 1 0 . 7 Overview of Watchdog Timer
  10879.  
  10880. 1 0 . 7 . 1 Block Diagram
  10881.  
  10882. Figure 10.2 shows a block diagram of the WDT.
  10883.  
  10884. WDT
  10885.  
  10886. Standby
  10887. Standby Standby
  10888. mode
  10889. release control
  10890.  
  10891. Frequency
  10892. divider 2 × 1
  10893. clock
  10894. Internal reset Reset Frequency divider
  10895. request control
  10896.  
  10897. Clock selection
  10898. Clock selector
  10899.  
  10900. Interrupt Interrupt
  10901. request control Overflow
  10902. Clock
  10903.  
  10904. WTCSR WTCNT
  10905.  
  10906. Bus interface
  10907.  
  10908. WTCSR: Watchdog timer control/status register
  10909. WTCNT: Watchdog timer counter
  10910.  
  10911. Figure 10.2 Block Diagram of WDT
  10912.  
  10913. 208
  10914.  
  10915. ----------------------- Page 225-----------------------
  10916.  
  10917. 1 0 . 7 . 2 Register Configuration
  10918.  
  10919. The WDT has the two registers summarized in table 10.5. These registers control clock selection
  10920. and timer mode switching.
  10921.  
  10922. Table 10.5WDT Registers
  10923.  
  10924. Initial Area 7
  10925. Name Abbreviation R/W Value P4 Address Address Access
  10926. S i z e
  10927.  
  10928. Watchdog timer WTCNT R/W* H'00 H'FFC00008 H'1FC00008 R: 8, W: 16*
  10929. counter
  10930.  
  10931. Watchdog timer WTCSR R/W* H'00 H'FFC0000C H'1FC0000C R: 8, W: 16*
  10932. control/status
  10933. register
  10934.  
  10935. Note: Use word-size access when writing. Perform the write with the upper byte set to H'5A or
  10936. H'A5, respectively. Byte- and longword-size writes cannot be used.
  10937. Use byte access when reading.
  10938.  
  10939. 1 0 . 8 WDT Register Descriptions
  10940.  
  10941. 1 0 . 8 . 1 Watchdog Timer Counter (WTCNT)
  10942.  
  10943. The watchdog timer counter (WTCNT) is an 8-bit readable/writable counter that counts up on the
  10944. selected clock. When WTCNT overflows, a reset is generated in watchdog timer mode, or an
  10945. interrupt in interval timer mode. WTCNT is initialized to H'00 only by a power-on reset via the
  10946. RESET pin.
  10947.  
  10948. To write to the WTCNT counter, use a word-size access with the upper byte set to H'5A. To read
  10949. WTCNT, use a byte-size access.
  10950.  
  10951. Bit: 7 6 5 4 3 2 1 0
  10952.  
  10953. Initial value: 0 0 0 0 0 0 0 0
  10954.  
  10955. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10956.  
  10957. 209
  10958.  
  10959. ----------------------- Page 226-----------------------
  10960.  
  10961. 1 0 . 8 . 2 Watchdog Timer Control/Status Register (WTCSR)
  10962.  
  10963. The watchdog timer control/status register (WTCSR) is an 8-bit readable/writable register
  10964. containing bits for selecting the count clock and timer mode, and overflow flags.
  10965.  
  10966. WTCSR is initialized to H'00 only by a power-on reset via the RESET pin. It retains its value in
  10967. an internal reset due to WDT overflow. When used to count the clock stabilization time when
  10968. exiting standby mode, WTCSR retains its value after the counter overflows.
  10969.  
  10970. To write to the WTCSR register, use a word-size access with the upper byte set to H'A5. To read
  10971. WTCSR, use a byte-size access.
  10972.  
  10973. Bit: 7 6 5 4 3 2 1 0
  10974.  
  10975. TME WT/IT RSTS WOVF IOVF CKS2 CKS1 CKS0
  10976.  
  10977. Initial value: 0 0 0 0 0 0 0 0
  10978.  
  10979. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  10980.  
  10981. Bit 7—Timer Enable (TME): Specifies starting and stopping of timer operation. Clear this
  10982. bit to 0 when using the WDT in standby mode or to change a clock frequency.
  10983.  
  10984. Bit 7: TME Description
  10985.  
  10986. 0 Up-count stopped, WTCNT value retained (Initial value)
  10987.  
  10988. 1 Up-count started
  10989.  
  10990. Bit 6—Timer Mode Select (WT/IT): Specifies whether the WDT is used as a watchdog
  10991. timer or interval timer.
  10992.  
  10993. Bit 6: WT/IT Description
  10994.  
  10995. 0 Interval timer mode (Initial value)
  10996.  
  10997. 1 Watchdog timer mode
  10998.  
  10999. Note: The up-count may not be performed correctly if WT/IT is modified while the WDT is running.
  11000.  
  11001. Bit 5—Reset Select (RSTS): Specifies the kind of reset to be performed when WTCNT
  11002. overflows in watchdog timer mode. This setting is ignored in interval timer mode.
  11003.  
  11004. Bit 5: RSTS Description
  11005.  
  11006. 0 Power-on reset (Initial value)
  11007.  
  11008. 1 Manual reset
  11009.  
  11010. 210
  11011.  
  11012. ----------------------- Page 227-----------------------
  11013.  
  11014. Bit 4—Watchdog Timer Overflow Flag (WOVF): Indicates that WTCNT has overflowed
  11015. in watchdog timer mode. This flag is not set in interval timer mode.
  11016.  
  11017. Bit 4: WOVF Description
  11018.  
  11019. 0 No overflow (Initial value)
  11020.  
  11021. 1 WTCNT has overflowed in watchdog timer mode
  11022.  
  11023. Bit 3—Interval Timer Overflow Flag (IOVF): Indicates that WTCNT has overflowed in
  11024. interval timer mode. This flag is not set in watchdog timer mode.
  11025.  
  11026. Bit 3: IOVF Description
  11027.  
  11028. 0 No overflow (Initial value)
  11029.  
  11030. 1 WTCNT has overflowed in interval timer mode
  11031.  
  11032. Bits 2 to 0—Clock Select 2 to 0 (CKS2–CKS0): These bits select the clock used for
  11033. the WTCNT count from eight clocks obtained by dividing the frequency divider 2 input clock. The
  11034. overflow periods shown in the following table are for use of a 33 MHz input clock, with frequency
  11035. divider 1 off, and PLL circuit 1 on.
  11036.  
  11037. Description
  11038.  
  11039. Bit 2: CKS2 Bit 1: CKS1 Bit 0: CKS0 Clock Division Ratio Overflow Period
  11040.  
  11041. 0 0 0 1/32 (Initial value) 41 µs
  11042.  
  11043. 1 1/64 82 µs
  11044.  
  11045. 1 0 1/128 164 µs
  11046.  
  11047. 1 1/256 328 µs
  11048.  
  11049. 1 0 0 1/512 656 µs
  11050.  
  11051. 1 1/1024 1.31 ms
  11052.  
  11053. 1 0 1/2048 2.62 ms
  11054.  
  11055. 1 1/4096 5.25 ms
  11056.  
  11057. Note: The up-count may not be performed correctly if bits CKS2–CKS0 are modified while the WDT
  11058. is running. Always stop the WDT before modifying these bits.
  11059.  
  11060. 211
  11061.  
  11062. ----------------------- Page 228-----------------------
  11063.  
  11064. 1 0 . 8 . 3 Notes on Register Access
  11065.  
  11066. The watchdog timer counter (WTCNT) and watchdog timer control/status register (WTCSR) differ
  11067. from other registers in being more difficult to write to. The procedure for writing to these registers
  11068. is given below.
  11069.  
  11070. Writing to WTCNT and WTCSR: These registers must be written to with a word transfer
  11071. instruction. They cannot be written to with a byte or longword transfer instruction. When writing
  11072. to WTCNT, perform the transfer with the upper byte set to H'5A and the lower byte containing the
  11073. write data. When writing to WTCSR, perform the transfer with the upper byte set to H'A5 and the
  11074. lower byte containing the write data. This transfer procedure writes the lower byte data to WTCNT
  11075. or WTCSR. The write formats are shown in figure 10.3.
  11076.  
  11077. WTCNT write
  11078.  
  11079. 15 8 7 0
  11080. Address: H'FFC00008
  11081. H'5A Write data
  11082. (H'1FC00008)
  11083.  
  11084. WTCSR write
  11085.  
  11086. 15 8 7 0
  11087. Address: H'FFC0000C
  11088. H'A5 Write data
  11089. (H'1FC0000C)
  11090.  
  11091. Figure 10.3 Writing to WTCNT and WTCSR
  11092.  
  11093. 212
  11094.  
  11095. ----------------------- Page 229-----------------------
  11096.  
  11097. 1 0 . 9 Using the WDT
  11098.  
  11099. 1 0 . 9 . 1 Standby Clearing Procedure
  11100.  
  11101. The WDT is used when clearing standby mode by means of an NMI or other interrupt. The
  11102. procedure is shown below. (As the WDT does not operate when standby mode is cleared with a
  11103. reset, the RESET pin should be held low until the clock stabilizes.)
  11104.  
  11105. 1. Be sure to clear the TME bit in the WTCSR register to 0 before making a transition to standby
  11106. mode. If the TME bit is set to 1, an inadvertent reset or interval timer interrupt may be caused
  11107. when the count overflows.
  11108.  
  11109. 2. Select the count clock to be used with bits CKS2–CKS0 in the WTCSR register, and set the
  11110. initial value in the WTCNT counter. Make these settings so that the time until the count
  11111. overflows is at least as long as the clock oscillation stabilization time.
  11112.  
  11113. 3. Make a transition to standby mode, and stop the clock, by executing a SLEEP instruction.
  11114.  
  11115. 4. The WDT starts counting on detection of an NMI signal transition edge or an interrupt.
  11116.  
  11117. 5. When the WDT count overflows, the CPG starts clock supply and the processor resumes
  11118. operation. The WOVF flag in the WTCSR register is not set at this time.
  11119.  
  11120. 6. The counter stops at a value of H'00–H'01. The value at which the counter stops depends on
  11121. the clock ratio.
  11122.  
  11123. 1 0 . 9 . 2 Frequency Changing Procedure
  11124.  
  11125. The WDT is used in a frequency change using the PLL. It is not used when the frequency is
  11126. changed simply by making a frequency divider switch.
  11127.  
  11128. 1. Be sure to clear the TME bit in the WTCSR register to 0 before making a frequency change. If
  11129. the TME bit is set to 1, an inadvertent reset or interval timer interrupt may be caused when the
  11130. count overflows.
  11131.  
  11132. 2. Select the count clock to be used with bits CKS2–CKS0 in the WTCSR register, and set the
  11133. initial value in the WTCNT counter. Make these settings so that the time until the count
  11134. overflows is at least as long as the clock oscillation stabilization time.
  11135.  
  11136. 3. When the frequency control register (FRQCR) is modified, the clock stops, and the standby
  11137. state is entered temporarily. The WDT starts counting.
  11138.  
  11139. 4. When the WDT count overflows, the CPG starts clock supply and the processor resumes
  11140. operation. The WOVF flag in the WTCSR register is not set at this time.
  11141.  
  11142. 5. The counter stops at a value of H'00–H'01. The value at which the counter stops depends on
  11143. the clock ratio.
  11144.  
  11145. 6. When re-setting WTCNT immediately after modifying the frequency control register (FRQCR),
  11146. first read the counter and confirm that its value is as described in step 5 above.
  11147.  
  11148. 213
  11149.  
  11150. ----------------------- Page 230-----------------------
  11151.  
  11152. 1 0 . 9 . 3 Using Watchdog Timer Mode
  11153.  
  11154. 1. Set the WT/IT bit in the WTCSR register to 1, select the type of reset with the RSTS bit, and
  11155. the count clock with bits CKS2–CKS0, and set the initial value in the WTCNT counter.
  11156.  
  11157. 2. When the TME bit in the WTCSR register is set to 1, the count starts in watchdog timer
  11158. mode.
  11159.  
  11160. 3. During operation in watchdog timer mode, write H'00 to the counter periodically so that it does
  11161. not overflow.
  11162.  
  11163. 4. When the counter overflows, the WDT sets the WOVF flag in the WTCSR register to 1, and
  11164. generates a reset of the type specified by the RSTS bit. The counter then continues counting.
  11165.  
  11166. 1 0 . 9 . 4 Using Interval Timer Mode
  11167.  
  11168. When the WDT is operating in interval timer mode, an interval timer interrupt is generated each
  11169. time the counter overflows. This enables interrupts to be generated at fixed intervals.
  11170.  
  11171. 1. Clear the WT/IT bit in the WTCSR register to 0, select the count clock with bits CKS2–
  11172. CKS0, and set the initial value in the WTCNT counter.
  11173.  
  11174. 2. When the TME bit in the WTCSR register is set to 1, the count starts in interval timer mode.
  11175.  
  11176. 3. When the counter overflows, the WDT sets the IOVF flag in the WTCSR register to 1, and
  11177. sends an interval timer interrupt request to INTC. The counter continues counting.
  11178.  
  11179. 214
  11180.  
  11181. ----------------------- Page 231-----------------------
  11182.  
  11183. 10.10 Notes on Board Design
  11184.  
  11185. When Using a Crystal Resonator: Place the crystal resonator and capacitors close to the
  11186. EXTAL and XTAL pins. To prevent induction from interfering with correct oscillation, ensure that
  11187. no other signal lines cross the signal lines for these pins.
  11188.  
  11189. CL1 CL2
  11190.  
  11191. Recommended values
  11192. Avoid crossing signal lines R CL1 = CL2 = 0–33 pF
  11193. R = 0Ω
  11194.  
  11195. EXTAL XTAL
  11196.  
  11197. SH7750
  11198.  
  11199. Note: The values for CL1, CL2, and the damping resistance should be determined after
  11200. consultation with the crystal resonator manufacturer.
  11201.  
  11202. Figure 10.4 Points for Attention when Using Crystal Resonator
  11203.  
  11204. When Inputting External Clock from EXTAL Pin: Make no connection to the XTAL
  11205. pin.
  11206.  
  11207. 215
  11208.  
  11209. ----------------------- Page 232-----------------------
  11210.  
  11211. When Using a PLL Oscillator Circuit: Separate VDD-CPG and VSS-CPG from the other
  11212. VDD and VSS lines at the board power supply source, and insert resistors RCB and RB, and
  11213. decoupling capacitors CPB and CB, close to the pins.
  11214.  
  11215. RCB1
  11216. VDD-PLL1
  11217.  
  11218. CPB1
  11219.  
  11220. VSS-PLL1
  11221.  
  11222. RCB2
  11223.  
  11224. VDD-PLL2
  11225.  
  11226. SH7750 CPB2
  11227.  
  11228. VSS-PLL2
  11229.  
  11230. RB
  11231. VDD-CPG
  11232. 3.3 V
  11233. CB
  11234.  
  11235. VSS-CPG
  11236.  
  11237. Figure 10.5 Points for Attention when Using PLL Oscillator Circuit
  11238.  
  11239. 216
  11240.  
  11241. ----------------------- Page 233-----------------------
  11242.  
  11243. Section 11 Realtime Clock (RTC)
  11244.  
  11245. 1 1 . 1 Overview
  11246.  
  11247. The SH7750 includes an on-chip realtime clock (RTC) and a 32.768 kHz crystal oscillator for use
  11248. by the RTC.
  11249.  
  11250. 1 1 . 1 . 1 Features
  11251.  
  11252. The RTC has the following features.
  11253.  
  11254. • Clock and calendar functions (BCD display)
  11255.  
  11256. Counts seconds, minutes, hours, day-of-week, days, months, and years.
  11257.  
  11258. • 1 to 64 Hz timer (binary display)
  11259.  
  11260. The 64 Hz counter register indicates a state of 64 Hz to 1 Hz within the RTC frequency divider
  11261.  
  11262. • Start/stop function
  11263.  
  11264. • 30-second adjustment function
  11265.  
  11266. • Alarm interrupts
  11267.  
  11268. Comparison with second, minute, hour, day-of-week, day, or month can be selected as the
  11269. alarm interrupt condition
  11270.  
  11271. • Periodic interrupts
  11272.  
  11273. An interrupt period of 1/256 second, 1/64 second, 1/16 second, 1/4 second, 1/2 second, 1
  11274. second, or 2 seconds can be selected
  11275.  
  11276. • Carry interrupt
  11277.  
  11278. Carry interrupt function indicating a second counter carry, or a 64 Hz counter carry when the 64
  11279. Hz counter is read
  11280.  
  11281. • Automatic leap year adjustment
  11282.  
  11283. 217
  11284.  
  11285. ----------------------- Page 234-----------------------
  11286.  
  11287. 1 1 . 1 . 2 Block Diagram
  11288.  
  11289. Figure 11.1 shows a block diagram of the RTC.
  11290.  
  11291. ATI
  11292. RTCCLK PRI
  11293. CUI RESET, STBY, etc
  11294.  
  11295. 16.384 kHz
  11296.  
  11297. Prescaler 32.768 kHz RTC crystal RTC operation
  11298. oscillator control unit
  11299.  
  11300. 128 Hz
  11301.  
  11302. RCR1
  11303.  
  11304. RCR2
  11305.  
  11306. Counter unit
  11307. Interrupt
  11308. R64CNT control unit
  11309.  
  11310. RSECCNT RMINCNT RHRCNT RDAYCNT RWKCNT RMONCNT RYRCNT
  11311.  
  11312. RSECAR RMINAR RHRAR RDAYAR RWKAR RMONAR
  11313.  
  11314. To registers
  11315.  
  11316. Bus interface
  11317.  
  11318. Internal peripheral module bus
  11319.  
  11320. Figure 11.1 Block Diagram of RTC
  11321.  
  11322. 218
  11323.  
  11324. ----------------------- Page 235-----------------------
  11325.  
  11326. 1 1 . 1 . 3 Pin Configuration
  11327.  
  11328. Table 11.1 shows the RTC pins.
  11329.  
  11330. Table 11.1RTC Pins
  11331.  
  11332. Pin Name Abbreviation I / O Function
  11333.  
  11334. RTC oscillator crystal pin EXTAL2 Input Connects crystal to RTC oscillator
  11335.  
  11336. RTC oscillator crystal pin XTAL2 Output Connects crystal to RTC oscillator
  11337.  
  11338. Clock input/clock output TCLK I/O External clock input pin/input capture
  11339. control input pin/RTC output pin
  11340. (shared with TMU)
  11341.  
  11342. Dedicated RTC power supplyVCC (RTC) — RTC oscillator power supply pin*
  11343.  
  11344. Dedicated RTC GND pin VSS (RTC) — RTC oscillator GND pin*
  11345.  
  11346. Note: Power must be supplied to the
  11347. RTC power supply pins even when the RTC is not used. When the RTC is used, power
  11348. should be supplied to all power supply pins including these pins. In standby mode, also,
  11349. power should be supplied to all power supply pins including these pins.
  11350.  
  11351. 1 1 . 1 . 4 Register Configuration
  11352.  
  11353. Table 11.2 summarizes the RTC registers.
  11354.  
  11355. Table 11.2RTC Registers
  11356.  
  11357. Initialization
  11358.  
  11359. Power-
  11360. Abbrevia- On Manual Standby Initial Area 7 Access
  11361. Name tion R/W Reset Reset Mode Value P4 Address Address Size
  11362.  
  11363. 64 Hz R64CNT R Counts Counts Counts Undefined H'FFC80000 H'1FC80000 8
  11364. counter
  11365.  
  11366. Second RSECCNT R/W Counts Counts Counts Undefined H'FFC80004 H'1FC80004 8
  11367. counter
  11368.  
  11369. Minute RMINCNT R/W Counts Counts Counts Undefined H'FFC80008 H'1FC80008 8
  11370. counter
  11371.  
  11372. Hour RHRCNT R/W Counts Counts Counts Undefined H'FFC8000C H'1FC8000C 8
  11373. counter
  11374.  
  11375. Day-of- RWKCNT R/W Counts Counts Counts Undefined H'FFC80010 H'1FC80010 8
  11376. week
  11377. counter
  11378.  
  11379. Day RDAYCNT R/W Counts Counts Counts Undefined H'FFC80014 H'1FC80014 8
  11380. counter
  11381.  
  11382. 219
  11383.  
  11384. ----------------------- Page 236-----------------------
  11385.  
  11386. Table 11.2RTC Registers
  11387.  
  11388. Initialization
  11389.  
  11390. Abbrevia- Power-On Manual Standby Initial Area 7 Access
  11391. Name tion R/W Reset Reset Mode Value P4 Address Address Size
  11392.  
  11393. Month RMONCNT R/W Counts Counts Counts Undefined H'FFC80018 H'1FC80018 8
  11394. counter
  11395.  
  11396. Year RYRCNT R/W Counts Counts Counts Undefined H'FFC8001C H'1FC8001C 16
  11397. counter
  11398.  
  11399. Second RSECAR R/W Initialized*1 Held Held Undefined*1 H'FFC80020 H'1FC80020 8
  11400.  
  11401. alarm
  11402. register
  11403.  
  11404. Minute RMINAR R/W Initialized*1 Held Held Undefined*1 H'FFC80024 H'1FC80024 8
  11405.  
  11406. alarm
  11407. register
  11408.  
  11409. Hour RHRAR R/W Initialized*1 Held Held Undefined*1 H'FFC80028 H'1FC80028 8
  11410.  
  11411. alarm
  11412. register
  11413.  
  11414. Day-of- RWKAR R/W Initialized*1 Held Held Undefined*1 H'FFC8002C H'1FC8002C 8
  11415.  
  11416. week
  11417. alarm
  11418. register
  11419.  
  11420. Day RDAYAR R/W Initialized*1 Held Held Undefined*1 H'FFC80030 H'1FC80030 8
  11421.  
  11422. alarm
  11423. register
  11424.  
  11425. Month RMONAR R/W Initialized*1 Held Held Undefined*1 H'FFC80034 H'1FC80034 8
  11426.  
  11427. alarm
  11428. register
  11429.  
  11430. RTC RCR1 R/W Initialized Initialized Held H'00*3 H'FFC80038 H'1FC80038 8
  11431.  
  11432. control
  11433. register 1
  11434.  
  11435. 2 4
  11436. RTC RCR2 R/W Initialized Initialized* Held H'09* H'FFC8003C H'1FC8003C 8
  11437. control
  11438. register 2
  11439.  
  11440. Notes: 1. The ENB bit in each register is initialized.
  11441. 2. Bits other than the RTCEN bit and START bit are initialized.
  11442. 3. The value of the CF bit and AF bit is undefined.
  11443. 4. The value of the PEF bit is undefined.
  11444.  
  11445. 220
  11446.  
  11447. ----------------------- Page 237-----------------------
  11448.  
  11449. 1 1 . 2 Register Descriptions
  11450.  
  11451. 1 1 . 2 . 1 64 Hz Counter (R64CNT)
  11452.  
  11453. R64CNT is an 8-bit read-only register that indicates a state of 64 Hz to 1 Hz within the RTC
  11454. frequency divider.
  11455.  
  11456. If this register is read when a carry is generated from the 128 kHz frequency division stage, bit 7
  11457. (CF) in RTC control register 1 (RCR1) is set to 1, indicating the simultaneous occurrence of the
  11458. carry and the 64 Hz counter read. In this case, the read value is not valid, and so R64CNT must be
  11459. read again after first writing 0 to the CF bit in RCR1 to clear it.
  11460.  
  11461. When the RESET bit or ADJ bit in RTC control register 2 (RCR2) is set to 1, the RTC frequency
  11462. divider is initialized and R64CNT is initialized to H'00.
  11463.  
  11464. R64CNT is not initialized by a power-on or manual reset, or in standby mode.
  11465.  
  11466. Bit 7 is always read as 0 and cannot be modified.
  11467.  
  11468. Bit: 7 6 5 4 3 2 1 0
  11469.  
  11470. — 1 Hz 2 Hz 4 Hz 8 Hz 16 Hz 32 Hz 64 Hz
  11471.  
  11472. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11473.  
  11474. R/W: R R R R R R R R
  11475.  
  11476. 1 1 . 2 . 2 Second Counter (RSECCNT)
  11477.  
  11478. RSECCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  11479. BCD-coded second value in the RTC. It counts on the carry generated once per second by the 64 Hz
  11480. counter.
  11481.  
  11482. The setting range is decimal 00 to 59. The RTC will not operate normally if any other value is
  11483. set. Write processing should be performed after stopping the count with the START bit in RCR2,
  11484. or by using the carry flag.
  11485.  
  11486. RSECCNT is not initialized by a power-on or manual reset, or in standby mode.
  11487.  
  11488. Bit 7 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  11489.  
  11490. Bit: 7 6 5 4 3 2 1 0
  11491.  
  11492. — 10-second units 1-second units
  11493.  
  11494. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11495.  
  11496. R/W: R R/W R/W R/W R/W R/W R/W R/W
  11497.  
  11498. 221
  11499.  
  11500. ----------------------- Page 238-----------------------
  11501.  
  11502. 1 1 . 2 . 3 Minute Counter (RMINCNT)
  11503.  
  11504. RMINCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  11505. BCD-coded minute value in the RTC. It counts on the carry generated once per minute by the
  11506. second counter.
  11507.  
  11508. The setting range is decimal 00 to 59. The RTC will not operate normally if any other value is
  11509. set. Write processing should be performed after stopping the count with the START bit in RCR2,
  11510. or by using the carry flag.
  11511.  
  11512. RMINCNT is not initialized by a power-on or manual reset, or in standby mode.
  11513.  
  11514. Bit 7 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  11515.  
  11516. Bit: 7 6 5 4 3 2 1 0
  11517.  
  11518. — 10-minute units 1-minute units
  11519.  
  11520. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11521.  
  11522. R/W: R R/W R/W R/W R/W R/W R/W R/W
  11523.  
  11524. 1 1 . 2 . 4 Hour Counter (RHRCNT)
  11525.  
  11526. RHRCNT is an 8-bit readable/writable register used as a counter for setting and counting the BCD-
  11527. coded hour value in the RTC. It counts on the carry generated once per hour by the minute counter.
  11528.  
  11529. The setting range is decimal 00 to 23. The RTC will not operate normally if any other value is
  11530. set. Write processing should be performed after stopping the count with the START bit in RCR2,
  11531. or by using the carry flag.
  11532.  
  11533. RHRCNT is not initialized by a power-on or manual reset, or in standby mode.
  11534.  
  11535. Bits 7 and 6 are always read as 0. A write to these bits is invalid, but the write value should
  11536. always be 0.
  11537.  
  11538. Bit: 7 6 5 4 3 2 1 0
  11539.  
  11540. — — 10-hour units 1-hour units
  11541.  
  11542. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  11543.  
  11544. R/W: R R R/W R/W R/W R/W R/W R/W
  11545.  
  11546. 222
  11547.  
  11548. ----------------------- Page 239-----------------------
  11549.  
  11550. 1 1 . 2 . 5 Day-of-Week Counter (RWKCNT)
  11551.  
  11552. RWKCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  11553. BCD-coded day-of-week value in the RTC. It counts on the carry generated once per day by the
  11554. hour counter.
  11555.  
  11556. The setting range is decimal 0 to 6. The RTC will not operate normally if any other value is set.
  11557. Write processing should be performed after stopping the count with the START bit in RCR2, or
  11558. by using the carry flag.
  11559.  
  11560. RWKCNT is not initialized by a power-on or manual reset, or in standby mode.
  11561.  
  11562. Bits 7 to 3 are always read as 0. A write to these bits is invalid, but the write value should always
  11563. be 0.
  11564.  
  11565. Bit: 7 6 5 4 3 2 1 0
  11566.  
  11567. — — — — — Day of week
  11568.  
  11569. Initial value: 0 0 0 0 0 Undefined Undefined Undefined
  11570.  
  11571. R/W: R R R R R R/W R/W R/W
  11572.  
  11573. Day-of-week code 0 1 2 3 4 5 6
  11574.  
  11575. Day of week Sun Mon Tue Wed Thu Fri Sat
  11576.  
  11577. 223
  11578.  
  11579. ----------------------- Page 240-----------------------
  11580.  
  11581. 1 1 . 2 . 6 Day Counter (RDAYCNT)
  11582.  
  11583. RDAYCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  11584. BCD-coded day value in the RTC. It counts on the carry generated once per day by the hour
  11585. counter.
  11586.  
  11587. The setting range is decimal 01 to 31. The RTC will not operate normally if any other value is
  11588. set. Write processing should be performed after stopping the count with the START bit in RCR2,
  11589. or by using the carry flag.
  11590.  
  11591. RDAYCNT is not initialized by a power-on or manual reset, or in standby mode.
  11592.  
  11593. The setting range for RDAYCNT depends on the month and whether the year is a leap year, so care
  11594. is required when making the setting.
  11595.  
  11596. Bits 7 and 6 are always read as 0. A write to these bits is invalid, but the write value should
  11597. always be 0.
  11598.  
  11599. Bit: 7 6 5 4 3 2 1 0
  11600.  
  11601. — — 10-day units 1-day units
  11602.  
  11603. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  11604.  
  11605. R/W: R R R/W R/W R/W R/W R/W R/W
  11606.  
  11607. 1 1 . 2 . 7 Month Counter (RMONCNT)
  11608.  
  11609. RMONCNT is an 8-bit readable/writable register used as a counter for setting and counting the
  11610. BCD-coded month value in the RTC. It counts on the carry generated once per month by the day
  11611. counter.
  11612.  
  11613. The setting range is decimal 01 to 12. The RTC will not operate normally if any other value is
  11614. set. Write processing should be performed after stopping the count with the START bit in RCR2,
  11615. or by using the carry flag.
  11616.  
  11617. RMONCNT is not initialized by a power-on or manual reset, or in standby mode.
  11618.  
  11619. Bits 7 to 5 are always read as 0. A write to these bits is invalid, but the write value should always
  11620. be 0.
  11621.  
  11622. 224
  11623.  
  11624. ----------------------- Page 241-----------------------
  11625.  
  11626. Bit: 7 6 5 4 3 2 1 0
  11627.  
  11628. — — — 10-month 1-month units
  11629. unit
  11630.  
  11631. Initial value: 0 0 0 Undefined Undefined Undefined Undefined Undefined
  11632.  
  11633. R/W: R R R R/W R/W R/W R/W R/W
  11634.  
  11635. 1 1 . 2 . 8 Year Counter (RYRCNT)
  11636.  
  11637. RYRCNT is a 16-bit readable/writable register used as a counter for setting and counting the BCD-
  11638. coded year value in the RTC. It counts on the carry generated once per year by the month counter.
  11639.  
  11640. The setting range is decimal 0000 to 9999. The RTC will not operate normally if any other value
  11641. is set. Write processing should be performed after stopping the count with the START bit in
  11642. RCR2, or by using the carry flag.
  11643.  
  11644. RYRCNT is not initialized by a power-on or manual reset, or in standby mode.
  11645.  
  11646. Bit: 15 14 13 12 11 10 9 8
  11647.  
  11648. 1000-year units 100-year units
  11649.  
  11650. Initial value: Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11651.  
  11652. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11653.  
  11654. Bit: 7 6 5 4 3 2 1 0
  11655.  
  11656. 10-year units 1-year units
  11657.  
  11658. Initial value: Undefined Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11659.  
  11660. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11661.  
  11662. 225
  11663.  
  11664. ----------------------- Page 242-----------------------
  11665.  
  11666. 1 1 . 2 . 9 Second Alarm Register (RSECAR)
  11667.  
  11668. RSECAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-coded
  11669. second value counter, RSECCNT. When the ENB bit is set to 1, the RSECAR value is compared
  11670. with the RSECCNT value. Comparison between the counter and the alarm register is performed
  11671. for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and RMONAR
  11672. in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective values all
  11673. match.
  11674.  
  11675. The setting range is decimal 00 to 59 + ENB bit. The RTC will not operate normally if any other
  11676. value is set.
  11677.  
  11678. The ENB bit in RSECAR is initialized to 0 by a power-on reset. The other fields in RSECAR are
  11679. not initialized by a power-on or manual reset, or in standby mode.
  11680.  
  11681. Bit: 7 6 5 4 3 2 1 0
  11682.  
  11683. ENB 10-second units 1-second units
  11684.  
  11685. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11686.  
  11687. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11688.  
  11689. 1 1 . 2 . 1 0 Minute Alarm Register (RMINAR)
  11690.  
  11691. RMINAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-coded
  11692. minute value counter, RMINCNT. When the ENB bit is set to 1, the RMINAR value is compared
  11693. with the RMINCNT value. Comparison between the counter and the alarm register is performed
  11694. for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and RMONAR
  11695. in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective values all
  11696. match.
  11697.  
  11698. The setting range is decimal 00 to 59 + ENB bit. The RTC will not operate normally if any other
  11699. value is set.
  11700.  
  11701. The ENB bit in RMINAR is initialized by a power-on reset. The other fields in RMINAR are not
  11702. initialized by a power-on or manual reset, or in standby mode.
  11703.  
  11704. Bit: 7 6 5 4 3 2 1 0
  11705.  
  11706. ENB 10-minute units 1-minute units
  11707.  
  11708. Initial value: 0 Undefined Undefined Undefined Undefined Undefined Undefined Undefined
  11709.  
  11710. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11711.  
  11712. 226
  11713.  
  11714. ----------------------- Page 243-----------------------
  11715.  
  11716. 1 1 . 2 . 1 1 Hour Alarm Register (RHRAR)
  11717.  
  11718. RHRAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-coded
  11719. hour value counter, RHRCNT. When the ENB bit is set to 1, the RHRAR value is compared with
  11720. the RHRCNT value. Comparison between the counter and the alarm register is performed for those
  11721. registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and RMONAR in which
  11722. the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective values all match.
  11723.  
  11724. The setting range is decimal 00 to 23 + ENB bit. The RTC will not operate normally if any other
  11725. value is set.
  11726.  
  11727. The ENB bit in RHRAR is initialized by a power-on reset. The other fields in RHRAR are not
  11728. initialized by a power-on or manual reset, or in standby mode.
  11729.  
  11730. Bit 6 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  11731.  
  11732. Bit: 7 6 5 4 3 2 1 0
  11733.  
  11734. ENB — 10-hour units 1-hour units
  11735.  
  11736. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  11737.  
  11738. R/W: R/W R R/W R/W R/W R/W R/W R/W
  11739.  
  11740. 1 1 . 2 . 1 2 Day-of-Week Alarm Register (RWKAR)
  11741.  
  11742. RWKAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-coded
  11743. day-of-week value counter, RWKCNT. When the ENB bit is set to 1, the RWKAR value is
  11744. compared with the RWKCNT value. Comparison between the counter and the alarm register is
  11745. performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  11746. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  11747. values all match.
  11748.  
  11749. The setting range is decimal 0 to 6 + ENB bit. The RTC will not operate normally if any other
  11750. value is set.
  11751.  
  11752. The ENB bit in RWKAR is initialized by a power-on reset. The other fields in RWKAR are not
  11753. initialized by a power-on or manual reset, or in standby mode.
  11754.  
  11755. Bits 6 to 3 are always read as 0. A write to these bits is invalid, but the write value should always
  11756. be 0.
  11757.  
  11758. 227
  11759.  
  11760. ----------------------- Page 244-----------------------
  11761.  
  11762. Bit: 7 6 5 4 3 2 1 0
  11763.  
  11764. ENB — — — — Day of week
  11765.  
  11766. Initial value: 0 0 0 0 0 Undefined Undefined Undefined
  11767.  
  11768. R/W: R/W R R R R R/W R/W R/W
  11769.  
  11770. Day-of-week code 0 1 2 3 4 5 6
  11771.  
  11772. Day of week Sun Mon Tue Wed Thu Fri Sat
  11773.  
  11774. 1 1 . 2 . 1 3 Day Alarm Register (RDAYAR)
  11775.  
  11776. RDAYAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-coded
  11777. day value counter, RDAYCNT. When the ENB bit is set to 1, the RDAYAR value is compared
  11778. with the RDAYCNT value. Comparison between the counter and the alarm register is performed
  11779. for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and RMONAR
  11780. in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective values all
  11781. match.
  11782.  
  11783. The setting range is decimal 01 to 31 + ENB bit. The RTC will not operate normally if any other
  11784. value is set. The setting range for RDAYAR depends on the month and whether the year is a leap
  11785. year, so care is required when making the setting.
  11786.  
  11787. The ENB bit in RDAYAR is initialized by a power-on reset. The other fields in RDAYAR are not
  11788. initialized by a power-on or manual reset, or in standby mode.
  11789.  
  11790. Bit 6 is always read as 0. A write to this bit is invalid, but the write value should always be 0.
  11791.  
  11792. Bit: 7 6 5 4 3 2 1 0
  11793.  
  11794. ENB — 10-day units 1-day units
  11795.  
  11796. Initial value: 0 0 Undefined Undefined Undefined Undefined Undefined Undefined
  11797.  
  11798. R/W: R/W R R/W R/W R/W R/W R/W R/W
  11799.  
  11800. 228
  11801.  
  11802. ----------------------- Page 245-----------------------
  11803.  
  11804. 1 1 . 2 . 1 4 Month Alarm Register (RMONAR)
  11805.  
  11806. RMONAR is an 8-bit readable/writable register used as an alarm register for the RTC’s BCD-coded
  11807. month value counter, RMONCNT. When the ENB bit is set to 1, the RMONAR value is
  11808. compared with the RMONCNT value. Comparison between the counter and the alarm register is
  11809. performed for those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and
  11810. RMONAR in which the ENB bit is set to 1, and the RCR1 alarm flag is set when the respective
  11811. values all match.
  11812.  
  11813. The setting range is decimal 01 to 12 + ENB bit. The RTC will not operate normally if any other
  11814. value is set.
  11815.  
  11816. The ENB bit in RMONAR is initialized by a power-on reset. The other fields in RMONAR are
  11817. not initialized by a power-on or manual reset, or in standby mode.
  11818.  
  11819. Bits 6 and 5 are always read as 0. A write to these bits is invalid, but the write value should
  11820. always be 0.
  11821.  
  11822. Bit: 7 6 5 4 3 2 1 0
  11823.  
  11824. ENB — — 10-month 1-month units
  11825. unit
  11826.  
  11827. Initial value: 0 0 0 Undefined Undefined Undefined Undefined Undefined
  11828.  
  11829. R/W: R/W R R R/W R/W R/W R/W R/W
  11830.  
  11831. 1 1 . 2 . 1 5 RTC Control Register 1 (RCR1)
  11832.  
  11833. RCR1 is an 8-bit readable/writable register containing a carry flag and alarm flag, plus flags to
  11834. enable or disable interrupts for these flags.
  11835.  
  11836. The CIE and AIE bits are initialized to 0 by a power-on or manual reset; the value of bits other
  11837. than CIE and AIE is undefined. In standby mode RCR1 is not initialized, and retains its current
  11838. value.
  11839.  
  11840. Bit: 7 6 5 4 3 2 1 0
  11841.  
  11842. CF — — CIE AIE — — AF
  11843.  
  11844. Initial value: Undefined Undefined Undefined 0 0 Undefined Undefined Undefined
  11845.  
  11846. R/W: R/W R R R/W R/W R R R/W
  11847.  
  11848. 229
  11849.  
  11850. ----------------------- Page 246-----------------------
  11851.  
  11852. Bit 7—Carry Flag (CF): This flag is set to 1 on generation of a second counter carry, or a 64
  11853. Hz counter carry when the 64 Hz counter is read. The count register value read at this time is not
  11854. guaranteed, and so the count register must be read again.
  11855.  
  11856. Bit 7: CF Description
  11857.  
  11858. 0 No second counter carry, or 64 Hz counter carry when 64 Hz counter is read
  11859.  
  11860. [Clearing condition]
  11861.  
  11862. When 0 is written to CF
  11863.  
  11864. 1 Second counter carry, or 64 Hz counter carry when 64 Hz counter is read
  11865.  
  11866. [Setting conditions]
  11867.  
  11868. 〈 Generation of a second counter carry, or a 64 Hz counter carry when the
  11869. 64 Hz counter is read
  11870.  
  11871. 〈 When 1 is written to CF
  11872.  
  11873. Bit 4—Carry Interrupt Enable Flag (CIE): Enables or disables interrupt generation when
  11874. the carry flag (CF) is set to 1.
  11875.  
  11876. Bit 4: CIE Description
  11877.  
  11878. 0 Carry interrupt is not generated when CF flag is set to 1 (Initial value)
  11879.  
  11880. 1 Carry interrupt is generated when CF flag is set to 1
  11881.  
  11882. Bit 3—Alarm Interrupt Enable Flag (AIE): Enables or disables interrupt generation when
  11883. the alarm flag (AF) is set to 1.
  11884.  
  11885. Bit 3: AIE Description
  11886.  
  11887. 0 Alarm interrupt is not generated when AF flag is set to 1 (Initial value)
  11888.  
  11889. 1 Alarm interrupt is generated when AF flag is set to 1
  11890.  
  11891. 230
  11892.  
  11893. ----------------------- Page 247-----------------------
  11894.  
  11895. Bit 0—Alarm Flag (AF): Set to 1 when the alarm time set in those registers among
  11896. RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and RMONAR in which the ENB bit is
  11897. set to 1 matches the respective counter values.
  11898.  
  11899. Bit 0: AF Description
  11900.  
  11901. 0 Alarm registers and counter values do not match (Initial value)
  11902.  
  11903. [Clearing condition]
  11904.  
  11905. When 0 is written to AF
  11906.  
  11907. 1 Alarm registers and counter values match*
  11908.  
  11909. [Setting condition]
  11910.  
  11911. When alarm registers in which the ENB bit is set to 1 and counter values
  11912. match*
  11913.  
  11914. Note: * Writing 1 does not change the value.
  11915.  
  11916. Bits 6, 5, 2, and 1—Reserved. The initial value of these bits is undefined. A write to these
  11917. bits is invalid, but the write value should always be 0.
  11918.  
  11919. 1 1 . 2 . 1 6 RTC Control Register 2 (RCR2)
  11920.  
  11921. RCR2 is an 8-bit readable/writable register used for periodic interrupt control, 30-second
  11922. adjustment, and frequency divider RESET and RTC count control.
  11923.  
  11924. RCR2 is basically initialized to H'09 by a power-on reset, except that the value of the PEF bit is
  11925. undefined. In a manual reset, bits other than RTCEN and START are initialized, while the value of
  11926. the PEF bit is undefined. In standby mode RCR2 is not initialized, and retains its current value.
  11927.  
  11928. Bit: 7 6 5 4 3 2 1 0
  11929.  
  11930. PEF PES2 PES1 PES0 RTCEN ADJ RESET START
  11931.  
  11932. Initial value: Undefined 0 0 0 1 0 0 1
  11933.  
  11934. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  11935.  
  11936. 231
  11937.  
  11938. ----------------------- Page 248-----------------------
  11939.  
  11940. Bit 7—Periodic Interrupt Flag (PEF): Indicates interrupt generation at the interval
  11941. specified by bits PES2–PES0. When this flag is set to 1, a periodic interrupt is generated.
  11942.  
  11943. Bit 7: PEF Description
  11944.  
  11945. 0 Interrupt is not generated at interval specified by bits PES2–PES0
  11946.  
  11947. [Clearing condition]
  11948.  
  11949. When 0 is written to PEF
  11950.  
  11951. 1 Interrupt is generated at interval specified by bits PES2–PES0
  11952.  
  11953. [Setting conditions]
  11954.  
  11955. 〈 Generation of interrupt at interval specified by bits PES2–PES0
  11956.  
  11957. 〈 When 1 is written to PEF
  11958.  
  11959. Bits 6 to 4—Periodic Interrupt Enable (PES2–PES0): These bits specify the period for
  11960. periodic interrupts.
  11961.  
  11962. Bit 6: PES2 Bit 5: PES1 Bit 4: PES0 Description
  11963.  
  11964. 0 0 0 No periodic interrupt generation (Initial value)
  11965.  
  11966. 1 Periodic interrupt generated at 1/256-second
  11967. intervals
  11968.  
  11969. 1 0 Periodic interrupt generated at 1/64-second intervals
  11970.  
  11971. 1 Periodic interrupt generated at 1/16-second intervals
  11972.  
  11973. 1 0 0 Periodic interrupt generated at 1/4-second intervals
  11974.  
  11975. 1 Periodic interrupt generated at 1/2-second intervals
  11976.  
  11977. 1 0 Periodic interrupt generated at 1-second intervals
  11978.  
  11979. 1 Periodic interrupt generated at 2-second intervals
  11980.  
  11981. Bit 3—Oscillator Enable (RTCEN): Controls the operation of the RTC’s crystal
  11982. oscillator.
  11983.  
  11984. Bit 3: RTCEN Description
  11985.  
  11986. 0 RTC crystal oscillator is halted
  11987.  
  11988. 1 RTC crystal oscillator is operated (Initial value)
  11989.  
  11990. 232
  11991.  
  11992. ----------------------- Page 249-----------------------
  11993.  
  11994. Bit 2—30-Second Adjustment (ADJ): Used for 30-second adjustment. When 1 is written
  11995. to this bit, a value up to 29 seconds is rounded down to 00 seconds, and a value of 30 seconds or
  11996. more is rounded up to 1 minute. The frequency divider circuits (RTC prescaler and R64CNT) are
  11997. also reset at this time. This bit always returns 0 if read.
  11998.  
  11999. Bit 2: ADJ Description
  12000.  
  12001. 0 Normal clock operation (Initial value)
  12002.  
  12003. 1 30-second adjustment performed
  12004.  
  12005. Bit 1—Reset (RESET): The frequency divider circuits are initialized by writing 1 to this bit.
  12006. When 1 is written to the RESET bit, the frequency divider circuits (RTC prescaler and R64CNT)
  12007. are reset and the RESET bit is automatically cleared to 0 (i.e. does not need to be written with 0).
  12008.  
  12009. Bit 1: RESET Description
  12010.  
  12011. 0 Normal clock operation (Initial value)
  12012.  
  12013. 1 Frequency divider circuits are reset
  12014.  
  12015. Bit 0—Start Bit (START): Stops and restarts counter (clock) operation.
  12016.  
  12017. Bit 0: START Description
  12018.  
  12019. 0 Second, minute, hour, day, day-of-week, month, and year counters are
  12020. stopped*
  12021.  
  12022. 1 Second, minute, hour, day, day-of-week, month, and year counters operate
  12023. normally* (Initial value)
  12024.  
  12025. Note: * The 64 Hz counter continues to operate unless stopped by means of the RTCEN bit.
  12026.  
  12027. 233
  12028.  
  12029. ----------------------- Page 250-----------------------
  12030.  
  12031. 1 1 . 3 Operation
  12032.  
  12033. Examples of the use of the RTC are shown below.
  12034.  
  12035. 1 1 . 3 . 1 Time Setting Procedures
  12036.  
  12037. Figure 11.2 shows examples of the time setting procedures.
  12038.  
  12039. Stop clock Set RCR2.RESET to 1
  12040. Reset frequency divider Clear RCR2.START to 0
  12041.  
  12042. Set second/minute/hour/day/ In any order
  12043. day-of-week/month/year
  12044.  
  12045. Start clock operation Set RCR2.START to 1
  12046.  
  12047. (a) Setting time after stopping clock
  12048.  
  12049. Clear RCR1.CF to 0
  12050. Clear carry flag
  12051. (Write 1 to RCR1.AF so that alarm flag
  12052. is not cleared)
  12053.  
  12054. Write to counter register Set RYRCNT first and RSECCNT last
  12055.  
  12056. Yes
  12057. Carry flag = 1? Read RCR1 register and check CF bit
  12058.  
  12059. No
  12060.  
  12061. (b) Setting time while clock is running
  12062.  
  12063. Figure 11.2 Examples of Time Setting Procedures
  12064.  
  12065. The procedure for setting the time after stopping the clock is shown in (a). The programming for
  12066. this method is simple, and it is useful for setting all the counters, from second to year.
  12067.  
  12068. 234
  12069.  
  12070. ----------------------- Page 251-----------------------
  12071.  
  12072. The procedure for setting the time while the clock is running is shown in (b). This method is
  12073. useful for modifying only certain counter values (for example, only the second data or hour data). If
  12074. a carry occurs during the write operation, the write data is automatically updated and there will be
  12075. an error in the set data. The carry flag should therefore be used to check the write status. If the carry
  12076. flag (RCR1.CF) is set to 1, the write must be repeated.
  12077.  
  12078. The interrupt function can also be used to determine the carry flag status.
  12079.  
  12080. 1 1 . 3 . 2 Time Reading Procedures
  12081.  
  12082. Figure 11.3 shows examples of the time reading procedures.
  12083.  
  12084. 235
  12085.  
  12086. ----------------------- Page 252-----------------------
  12087.  
  12088. Disable carry interrupts Clear RCR1.CIE to 0
  12089.  
  12090. Clear RCR1.CF to 0
  12091. Clear carry flag (Write 1 to RCR1.AF so that alarm flag
  12092. is not cleared)
  12093.  
  12094. Read counter register
  12095.  
  12096. Yes
  12097. Carry flag = 1? Read RCR1 register and check CF bit
  12098.  
  12099. No
  12100.  
  12101. (a) Reading time without using interrupts
  12102.  
  12103. Clear carry flag
  12104.  
  12105. Enable carry interrupts Set RCR1.CIE to 1
  12106.  
  12107. Clear RCR1.CF to 0
  12108. Clear carry flag (Write 1 to RCR1.AF so that alarm flag
  12109.  
  12110. is not cleared)
  12111.  
  12112. Read counter register
  12113.  
  12114. Yes
  12115. Interrupt generated?
  12116.  
  12117. No
  12118.  
  12119. Disable carry interrupts Clear RCR1.CIE to 0
  12120.  
  12121. (b) Reading time using interrupts
  12122.  
  12123. Figure 11.3 Examples of Time Reading Procedures
  12124.  
  12125. If a carry occurs while the time is being read, the correct time will not be obtained and the read
  12126. must be repeated. The procedure for reading the time without using interrupts is shown in (a), and
  12127. the procedure using carry interrupts in (b). The method without using interrupts is normally used
  12128. to keep the program simple.
  12129.  
  12130. 236
  12131.  
  12132. ----------------------- Page 253-----------------------
  12133.  
  12134. 1 1 . 3 . 3 Alarm Function
  12135.  
  12136. The use of the alarm function is illustrated in figure 11.4.
  12137.  
  12138. Clock running
  12139.  
  12140. Disable alarm interrupts Clear RCR1.AIE to prevent erroneous interrupts
  12141.  
  12142. Set alarm time
  12143.  
  12144. Be sure to reset the flag as it may have been
  12145. Clear alarm flag
  12146. set during alarm time setting
  12147.  
  12148.  
  12149. Enable alarm interrupts Set RCR1.AIE to 1
  12150.  
  12151. Monitor alarm time
  12152. (Wait for interrupt or check
  12153. alarm flag)
  12154.  
  12155. Figure 11.4 Example of Use of Alarm Function
  12156.  
  12157. An alarm can be generated by the second, minute, hour, day-of-week, day, or month value, or a
  12158. combination of these. Write 1 to the ENB bit in the alarm registers involved in the alarm setting,
  12159. and set the alarm time in the lower bits. Write 0 to the ENB bit in registers not involved in the
  12160. alarm setting.
  12161.  
  12162. When the counter and the alarm time match, RCR1.AF is set to 1. Alarm detection can be
  12163. confirmed by reading this bit, but normally an interrupt is used. If 1 has been written to
  12164. RCR1.AIE, an alarm interrupt is generated in the event of alarm, enabling the alarm to be detected.
  12165.  
  12166. The alarm flag remains set while the counter and alarm time match. If the alarm flag is cleared by
  12167. writing 0 during this period, it will therefore be set again immediately afterward. This needs to be
  12168. taken into consideration when writing the program.
  12169.  
  12170. 237
  12171.  
  12172. ----------------------- Page 254-----------------------
  12173.  
  12174. 1 1 . 4 Interrupts
  12175.  
  12176. There are three kinds of RTC interrupt: alarm interrupts, periodic interrupts, and carry interrupts.
  12177.  
  12178. An alarm interrupt request (ATI) is generated when the alarm flag (AF) in RCR1 is set to 1 while
  12179. the alarm interrupt enable bit (AIE) is also set to 1.
  12180.  
  12181. A periodic interrupt request (PRI) is generated when the periodic interrupt enable bits (PES2–
  12182. PES0) in RCR2 are set to a value other than 000 and the periodic interrupt flag (PEF) is set to 1.
  12183.  
  12184. A carry interrupt request (CUI) is generated when the carry flag (CF) in RCR1 is set to 1 while the
  12185. carry interrupt enable bit (CIE) is also set to 1.
  12186.  
  12187. 1 1 . 5 Usage Notes
  12188.  
  12189. 1 1 . 5 . 1 Register Initialization
  12190.  
  12191. After powering on and making the RCR1 register settings, reset the frequency divider (by setting
  12192. RCR2.RESET to 1) and make initial settings for all the other registers.
  12193.  
  12194. 1 1 . 5 . 2 Crystal Oscillator Circuit
  12195.  
  12196. Crystal oscillator circuit constants (recommended values) are shown in table 11.3, and the RTC
  12197. crystal oscillator circuit in figure 11.5.
  12198.  
  12199. Table 11.3Crystal Oscillator Circuit Constants (Recommended Values)
  12200.  
  12201. f C C
  12202. osc in out
  12203.  
  12204. 32.768 kHz 10–22 pF 10–22 pF
  12205.  
  12206. 238
  12207.  
  12208. ----------------------- Page 255-----------------------
  12209.  
  12210. SH7750
  12211. Rf
  12212. RD
  12213. VDD-RTC VSS-RTC EXTAL2 XTAL2
  12214.  
  12215. Noise filter XTAL
  12216.  
  12217. CRTC
  12218. C C
  12219. in out
  12220. RRTC
  12221.  
  12222. 3.3 V
  12223.  
  12224. Notes: 1. Select either the C or C side for the frequency adjustment variable capacitor according to
  12225. in out
  12226.  
  12227. requirements such as the adjustment range, degree of stability, etc.
  12228. 2. Built-in resistance value R (typ. value) = 10 MΩ, R (typ. value) = 400 kΩ
  12229. f D
  12230.  
  12231. 3. C and C values include floating capacitance due to the wiring. Take care when using a solid-
  12232. in out
  12233.  
  12234. earth board.
  12235. 4. The crystal oscillation stabilization time depends on the mounted circuit constants, floating
  12236. capacitance, etc., and should be decided after consultation with the crystal resonator
  12237. manufacturer.
  12238. 5. Place the crystal resonator and load capacitors C and C as close as possible to the chip.
  12239. in out
  12240.  
  12241. (Correct oscillation may not be possible if there is externally induced noise in the EXTAL2 and
  12242. XTAL2 pins.)
  12243. 6. Ensure that the crystal resonator connection pin (EXTAL2 and XTAL2) wiring is routed as far away
  12244. as possible from other power lines (except GND) and signal lines.
  12245. 7. Insert a noise filter in the RTC power supply.
  12246. The values of CRTC and RRTC depend on the bus and CPU frequency.
  12247.  
  12248. Figure 11.5 Example of Crystal Oscillator Circuit Connection
  12249.  
  12250. 239
  12251.  
  12252. ----------------------- Page 256-----------------------
  12253.  
  12254. 240
  12255.  
  12256. ----------------------- Page 257-----------------------
  12257.  
  12258. Section 12 Timer Unit (TMU)
  12259.  
  12260. 1 2 . 1 Overview
  12261.  
  12262. The SH7750 includes an on-chip 32-bit timer unit (TMU) comprising three 32-bit timer channels
  12263. (channels 0 to 2).
  12264.  
  12265. 1 2 . 1 . 1 Features
  12266.  
  12267. The TMU has the following features.
  12268.  
  12269. • Auto-reload type 32-bit down-counter provided for each channel
  12270.  
  12271. • Input capture function provided in channel 2
  12272.  
  12273. • Selection of rising edge or falling edge as external clock input edge when external clock is
  12274. selected or input capture function is used
  12275.  
  12276. • 32-bit timer constant register for auto-reload use, readable/writable at any time, and 32-bit
  12277. down-counter provided for each channel
  12278.  
  12279. • Selection of seven counter input clocks for each channel
  12280.  
  12281. External clock (TCLK), on-chip RTC output clock, five internal clocks (Pφ/4, Pφ/16, Pφ/64,
  12282. Pφ/256, Pφ/1024) (Pφ is the peripheral module clock)
  12283.  
  12284. • Each channel can also operate in module standby mode when the on-chip RTC output clock is
  12285. selected as the counter input clock; that is, timer operation continues even when the clock has
  12286. been stopped for the TMU.
  12287.  
  12288. Timer count operations using an external or internal clock are only possible when a clock is
  12289. supplied to the timer unit.
  12290.  
  12291. • Synchronous read operation
  12292.  
  12293. As the timer counters (TCNT) are serially modified 32-bit registers and the internal peripheral
  12294. module bus is 16 bits wide, there is a time difference when reading the upper 16 bits and lower
  12295. 16 bits of TCNT. To prevent counter read value drift due to this time difference, a
  12296. synchronization circuit is provided that allows simultaneous reading of all 32 bits of the TCNT
  12297. data.
  12298.  
  12299. • Two interrupt sources
  12300.  
  12301. One underflow source (channels 0 to 2) and one input capture source (channel 2)
  12302.  
  12303. • DMAC data transfer request capability
  12304.  
  12305. On channel 2, a data transfer request is sent to the DMAC when an input capture interrupt is
  12306. generated.
  12307.  
  12308. 241
  12309.  
  12310. ----------------------- Page 258-----------------------
  12311.  
  12312. 1 2 . 1 . 2 Block Diagram
  12313.  
  12314. Figure 12.1 shows a block diagram of the TMU.
  12315.  
  12316. RESET, STBY, TUNI0 PCLK/4, 16, 64* TUNI1 TCLK RTCCLK TUNI2 TICPI2
  12317. etc.
  12318.  
  12319. TMU TCLK
  12320. control unit Prescaler control unit
  12321.  
  12322. To each To each
  12323. channel channel
  12324.  
  12325. TOCR
  12326.  
  12327. TSTR
  12328.  
  12329. Ch 0 Ch 1 Ch 2
  12330.  
  12331. Interrupt Interrupt Interrupt
  12332. Counter unit control unit Counter unit control unit Counter unit control unit
  12333.  
  12334. TCR0 TCOR0 TCNT0 TCR1 TCOR1 TCNT1 TCR2 TCOR2 TCNT2 TCPR2
  12335.  
  12336. Bus interface
  12337.  
  12338. Internal peripheral module bus
  12339.  
  12340. Note: * Signals with 1/4, 1/16, and 1/64 the Pφ frequency, supplied to the on-chip peripheral functions.
  12341.  
  12342. Figure 12.1 Block Diagram of TMU
  12343.  
  12344. 1 2 . 1 . 3 Pin Configuration
  12345.  
  12346. Table 12.1 shows the TMU pins.
  12347.  
  12348. Table 12.1TMU Pins
  12349.  
  12350. Pin Name Abbreviation I / O Function
  12351.  
  12352. Clock input/clock output TCLK I/O External clock input pin/input capture
  12353. control input pin/RTC output pin
  12354. (shared with RTC)
  12355.  
  12356. 242
  12357.  
  12358. ----------------------- Page 259-----------------------
  12359.  
  12360. 1 2 . 1 . 4 Register Configuration
  12361.  
  12362. Table 12.2 summarizes the TMU registers.
  12363.  
  12364. Table 12.2TMU Registers
  12365.  
  12366. Initialization
  12367. Chan- Abbre- Area 7 Access
  12368. nel Name viation R/W Initial Value P4 Address Address Size
  12369.  
  12370. Power- Standby
  12371. On Manual Mode
  12372. Reset Reset
  12373.  
  12374. Com- Timer TOCR R/W Initialized Initialized Held H'00 H’FFD80000 H'1FD80000 8
  12375. mon output
  12376. control
  12377. register
  12378.  
  12379. Timer TSTR R/W Initialized Initialized Ini- H'00 H’FFD80004 H'1FD80004 8
  12380. start tialized*1
  12381.  
  12382. register
  12383.  
  12384. 0 Timer TCOR0 R/W Initialized Initialized Held H'FFFFFFFF H’FFD80008 H'1FD80008 32
  12385. constant
  12386. register 0
  12387.  
  12388. Timer TCNT0 R/W Initialized Initialized Held*2 H'FFFFFFFF H’FFD8000C H'1FD8000C 32
  12389.  
  12390. counter 0
  12391.  
  12392. Timer TCR0 R/W Initialized Initialized Held H'0000 H’FFD80010 H'1FD80010 16
  12393. control
  12394. register 0
  12395.  
  12396. 1 Timer TCOR1 R/W Initialized Initialized Held H'FFFFFFFF H’FFD80014 H'1FD80014 32
  12397. constant
  12398. register 1
  12399.  
  12400. Timer TCNT1 R/W Initialized Initialized Held*2 H'FFFFFFFF H’FFD80018 H'1FD80018 32
  12401.  
  12402. counter 1
  12403.  
  12404. Timer TCR1 R/W Initialized Initialized Held H'0000 H’FFD8001C H'1FD8001C 16
  12405. control
  12406. register 1
  12407.  
  12408. 2 Timer TCOR2 R/W Initialized Initialized Held H'FFFFFFFF H’FFD80020 H'1FD80020 32
  12409. constant
  12410. register 2
  12411.  
  12412. Timer TCNT2 R/W Initialized Initialized Held*2 H'FFFFFFFF H’FFD80024 H'1FD80024 32
  12413.  
  12414. counter 2
  12415.  
  12416. Timer TCR2 R/W Initialized Initialized Held H'0000 H’FFD80028 H'1FD80028 16
  12417. control
  12418. register 2
  12419.  
  12420. Input TCPR2 R Held Held Held Undefined H’FFD8002C H'1FD8002C 32
  12421. capture
  12422. register
  12423.  
  12424. Notes: 1. Not initialized in module standby mode when the input clock is the on-chip RTC output
  12425. clock.
  12426. 243
  12427.  
  12428. ----------------------- Page 260-----------------------
  12429.  
  12430. 2. Counts in module standby mode when the input clock is the on-chip RTC output clock.
  12431.  
  12432. 1 2 . 2 Register Descriptions
  12433.  
  12434. 1 2 . 2 . 1 Timer Output Control Register (TOCR)
  12435.  
  12436. TOCR is an 8-bit readable/writable register that specifies whether external pin TCLK is used as the
  12437. external clock or input capture control input pin, or as the on-chip RTC output clock output pin.
  12438.  
  12439. TOCR is initialized to H'00 by a power-on or manual reset, but is not initialized in standby mode.
  12440.  
  12441. Bit: 7 6 5 4 3 2 1 0
  12442.  
  12443. — — — — — — — TCOE
  12444.  
  12445. Initial value: 0 0 0 0 0 0 0 0
  12446.  
  12447. R/W: R R R R R R R R/W
  12448.  
  12449. Bits 7 to 1—Reserved: These bits are always read as 0. A write to these bits is invalid, but
  12450. the write value should always be 0.
  12451.  
  12452. Bit 0—Timer Clock Pin Control (TCOE): Specifies whether timer clock pin TCLK is
  12453. used as the external clock or input capture control input pin, or as the on-chip RTC output clock
  12454. output pin.
  12455.  
  12456. Bit 0: TCOE Description
  12457.  
  12458. 0 Timer clock pin (TCLK) is used as external clock input or input capture
  12459. control input pin (Initial value)
  12460.  
  12461. 1 Timer clock pin (TCLK) is used as on-chip RTC output clock output pin
  12462.  
  12463. 244
  12464.  
  12465. ----------------------- Page 261-----------------------
  12466.  
  12467. 1 2 . 2 . 2 Timer Start Register (TSTR)
  12468.  
  12469. TSTR is an 8-bit readable/writable register that specifies whether the channel 0–2 timer counters
  12470. (TCNT) are operated or stopped.
  12471.  
  12472. TSTR is initialized to H'00 by a power-on or manual reset. In module standby mode, TSTR is not
  12473. initialized when the input clock selected by each channel is the on-chip RTC output clock
  12474. (RTCCLK), and is initialized only when the input clock is the external clock (TCLK) or internal
  12475. clock (Pφ).
  12476.  
  12477. Bit: 7 6 5 4 3 2 1 0
  12478.  
  12479. — — — — — STR2 STR1 STR0
  12480.  
  12481. Initial value: 0 0 0 0 0 0 0 0
  12482.  
  12483. R/W: R R R R R R/W R/W R/W
  12484.  
  12485. Bits 7 to 3—Reserved: These bits are always read as 0. A write to these bits is invalid, but
  12486. the write value should always be 0.
  12487.  
  12488. Bit 2—Counter Start 2 (STR2): Specifies whether timer counter 2 (TCNT2) is operated or
  12489. stopped.
  12490.  
  12491. Bit 2: STR2 Description
  12492.  
  12493. 0 TCNT2 count operation is stopped (Initial value)
  12494.  
  12495. 1 TCNT2 performs count operation
  12496.  
  12497. Bit 1—Counter Start 1 (STR1): Specifies whether timer counter 1 (TCNT1) is operated or
  12498. stopped.
  12499.  
  12500. Bit 1: STR1 Description
  12501.  
  12502. 0 TCNT1 count operation is stopped (Initial value)
  12503.  
  12504. 1 TCNT1 performs count operation
  12505.  
  12506. Bit 0—Counter Start 0 (STR0): Specifies whether timer counter 0 (TCNT0) is operated or
  12507. stopped.
  12508.  
  12509. Bit 0: STR0 Description
  12510.  
  12511. 0 TCNT0 count operation is stopped (Initial value)
  12512.  
  12513. 1 TCNT0 performs count operation
  12514.  
  12515. 245
  12516.  
  12517. ----------------------- Page 262-----------------------
  12518.  
  12519. 1 2 . 2 . 3 Timer Constant Registers (TCOR)
  12520.  
  12521. The TCOR registers are 32-bit readable/writable registers. There are three TCOR registers, one for
  12522. each channel.
  12523.  
  12524. When a TCNT counter underflows while counting down, the TCOR value is set in that TCNT,
  12525. which continues counting down from the set value.
  12526.  
  12527. The TCOR registers are initialized to H'FFFFFFFF by a power-on or manual reset, but are not
  12528. initialized and retain their contents in standby mode.
  12529.  
  12530. Bit: 31 30 29 2 1 0
  12531.  
  12532. · · · · · · · · · · · · ·
  12533.  
  12534. Initial value: 1 1 1 1 1 1
  12535.  
  12536. R/W: R/W R/W R/W R/W R/W R/W
  12537.  
  12538. 1 2 . 2 . 4 Timer Counters (TCNT)
  12539.  
  12540. The TCNT registers are 32-bit readable/writable registers. There are three TCNT registers, one for
  12541. each channel.
  12542.  
  12543. Each TCNT counts down on the input clock selected by TPSC2–TPSC0 in the timer control
  12544. register (TCR).
  12545.  
  12546. When a TCNT counter underflows while counting down, the underflow flag (UNF) is set in the
  12547. corresponding timer control register (TCR). At the same time, the timer constant register (TCOR)
  12548. value is set in TCNT, and the count-down operation continues from the set value.
  12549.  
  12550. As the TCNT registers are serially modified 32-bit registers and the internal peripheral module bus
  12551. is 16 bits wide, there is a time difference when reading the upper 16 bits and lower 16 bits of
  12552. TCNT. To prevent counter read value drift due to this time difference, a synchronization circuit is
  12553. provided. When the upper 16 bits are read, the lower 16 bits are simultaneously stored in a buffer
  12554. register. After the upper 16 bits are read, the lower 16 bits are read from the buffer register.
  12555.  
  12556. The TCNT registers are initialized to H'FFFFFFFF by a power-on or manual reset, but are not
  12557. initialized and retain their contents in standby mode.
  12558.  
  12559. Bit: 31 30 29 2 1 0
  12560.  
  12561. · · · · · · · · · · · · ·
  12562.  
  12563. Initial value: 1 1 1 1 1 1
  12564.  
  12565. R/W: R/W R/W R/W R/W R/W R/W
  12566.  
  12567. 246
  12568.  
  12569. ----------------------- Page 263-----------------------
  12570.  
  12571. When the input clock is the on-chip RTC output clock (RTCCLK), TCNT counts even in module
  12572. standby mode (that is, when the clock for the TMU is stopped). When the input clock is the
  12573. external clock (TCLK) or internal clock (Pφ), TCNT contents are retained in standby mode.
  12574.  
  12575. 1 2 . 2 . 5 Timer Control Registers (TCR)
  12576.  
  12577. The TCR registers are 16-bit readable/writable registers. There are three TCR registers, one for
  12578. each channel.
  12579.  
  12580. Each TCR selects the count clock, specifies the edge when an external clock is selected, and
  12581. controls interrupt generation when the flag indicating timer counter (TCNT) underflow is set to 1.
  12582. TCR2 is also used for channel 2 input capture control, and control of interrupt generation in the
  12583. event of input capture.
  12584.  
  12585. The TCR registers are initialized to H'0000 by a power-on or manual reset, but are not initialized
  12586. in standby mode.
  12587.  
  12588. 1. Channel 0 and 1 TCR bit configuration
  12589.  
  12590. Bit: 15 14 13 12 11 10 9 8
  12591.  
  12592. — — — — — — — UNF
  12593.  
  12594. Initial value: 0 0 0 0 0 0 0 0
  12595.  
  12596. R/W: R R R R R R R R/W
  12597.  
  12598. Bit: 7 6 5 4 3 2 1 0
  12599.  
  12600. — — UNIE CKEG1 CKEG0 TPSC2 TPSC1 TPSC0
  12601.  
  12602. Initial value: 0 0 0 0 0 0 0 0
  12603.  
  12604. R/W: R R R/W R/W R/W R/W R/W R/W
  12605.  
  12606. 2. Channel 2 TCR bit configuration
  12607.  
  12608. 247
  12609.  
  12610. ----------------------- Page 264-----------------------
  12611.  
  12612. Bit: 15 14 13 12 11 10 9 8
  12613.  
  12614. — — — — — — ICPF UNF
  12615.  
  12616. Initial value: 0 0 0 0 0 0 0 0
  12617.  
  12618. R/W: R R R R R R/W R/W R/W
  12619.  
  12620. Bit: 7 6 5 4 3 2 1 0
  12621.  
  12622. ICPE1 ICPE0 UNIE CKEG1 CKEG0 TPSC2 TPSC1 TPSC0
  12623.  
  12624. Initial value: 0 0 0 0 0 0 0 0
  12625.  
  12626. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  12627.  
  12628. Bits 15 to 9, 7, and 6 (Channels 0 and 1); Bits 15 to 10 (Channel 2)—
  12629. Reserved: These bits are always read as 0. A write to these bits is invalid, but the write value
  12630. should always be 0.
  12631.  
  12632. Bit 9—Input Capture Interrupt Flag (ICPF) (Channel 2 Only): Status flag, provided
  12633. in channel 2 only, that indicates the occurrence of input capture.
  12634.  
  12635. Bit 9: ICPF Description
  12636.  
  12637. 0 Input capture has not occurred (Initial value)
  12638.  
  12639. [Clearing condition]
  12640.  
  12641. When 0 is written to ICPF
  12642.  
  12643. 1 Input capture has occurred
  12644.  
  12645. [Setting condition]
  12646.  
  12647. When input capture occurs*
  12648.  
  12649. Note: * Writing 1 does not change the value.
  12650.  
  12651. Bit 8—Underflow Flag (UNF): Status flag that indicates the occurrence of underflow.
  12652.  
  12653. Bit 8: UNF Description
  12654.  
  12655. 0 TCNT has not underflowed (Initial value)
  12656.  
  12657. [Clearing condition]
  12658.  
  12659. When 0 is written to UNF
  12660.  
  12661. 1 TCNT has underflowed
  12662.  
  12663. [Setting condition]
  12664.  
  12665. When TCNT underflows*
  12666.  
  12667. Note: * Writing 1 does not change the value.
  12668.  
  12669. 248
  12670.  
  12671. ----------------------- Page 265-----------------------
  12672.  
  12673. Bits 7 and 6—Input Capture Control (ICPE1, ICPE0) (Channel 2 Only): These
  12674. bits, provided in channel 2 only, specify whether the input capture function is used, and control
  12675. enabling or disabling of interrupt generation when the function is used.
  12676.  
  12677. When the input capture function is used, a data transfer request is sent to the DMAC in the event
  12678. of input capture.
  12679.  
  12680. When using the input capture function, the TCLK pin must be designated as an input pin with the
  12681. TCOE bit in the TOCR register. The CKEG bits specify whether the rising edge or falling edge of
  12682. the TCLK signal is used to set the TCNT2 value in the input capture register (TCPR2).
  12683.  
  12684. The TCNT2 value is set in TCPR2 only when the TCR2.ICPF bit is 0. When the TCR2.ICPF
  12685. bit is 1, TCPR2 is not set in the event of input capture. When input capture occurs, a DMAC
  12686. transfer request is generated regardless of the value of the TCR2.ICPF bit. However, a new DMAC
  12687. transfer request is not generated until processing of the previous request is finished.
  12688.  
  12689. Bit 7: ICPE1 Bit 6: ICPE0 Description
  12690.  
  12691. 0 0 Input capture function is not used (Initial value)
  12692.  
  12693. 1 Reserved (Do not set)
  12694.  
  12695. 1 0 Input capture function is used, but interrupt due to input
  12696. capture (TICPI2) is not enabled
  12697.  
  12698. Data transfer request is sent to DMAC in the event of input
  12699. capture
  12700.  
  12701. 1 Input capture function is used, and interrupt due to input
  12702. capture (TICPI2) is enabled
  12703.  
  12704. Data transfer request is sent to DMAC in the event of input
  12705. capture
  12706.  
  12707. Bit 5—Underflow Interrupt Control (UNIE): Controls enabling or disabling of interrupt
  12708. generation when the UNF status flag is set to 1, indicating TCNT underflow.
  12709.  
  12710. Bit 5: UNIE Description
  12711.  
  12712. 0 Interrupt due to underflow (TUNI) is not enabled (Initial value)
  12713.  
  12714. 1 Interrupt due to underflow (TUNI) is enabled
  12715.  
  12716. Bits 4 and 3—Clock Edge 1 and 0 (CKEG1, CKEG0): These bits select the external
  12717. clock input edge when an external clock is selected or the input capture function is used.
  12718.  
  12719. 249
  12720.  
  12721. ----------------------- Page 266-----------------------
  12722.  
  12723. Bit 4: CKEG1 Bit 3: CKEG0 Description
  12724.  
  12725. 0 0 Count/input capture register set on rising edge (Initial value)
  12726.  
  12727. 1 Count/input capture register set on falling edge
  12728.  
  12729. 1 X Count/input capture register set on both rising and falling edges
  12730.  
  12731. Note: X: 0 or 1 (don’t care)
  12732.  
  12733. Bits 2 to 0—Timer Prescaler 2 to 0 (TPSC2–TPSC0): These bits select the TCNT
  12734. count clock.
  12735.  
  12736. When the on-chip RTC output clock is selected as the count clock for a channel, that channel can
  12737. operate even in module standby mode. When another clock is selected, the channel does not operate
  12738. in standby mode.
  12739.  
  12740. Bit 2: TPSC2 Bit 1: TPSC1 Bit 0: TPSC0 Description
  12741.  
  12742. 0 0 0 Counts on Pφ/4 (Initial value)
  12743.  
  12744. 1 Counts on Pφ/16
  12745.  
  12746. 1 0 Counts on Pφ/64
  12747.  
  12748. 1 Counts on Pφ/256
  12749.  
  12750. 1 0 0 Counts on Pφ/1024
  12751.  
  12752. 1 Reserved (Do not set)
  12753.  
  12754. 1 0 Counts on on-chip RTC output clock
  12755.  
  12756. 1 Counts on external clock
  12757.  
  12758. 1 2 . 2 . 6 Input Capture Register (TCPR2)
  12759.  
  12760. TCPR2 is a 32-bit read-only register for use with the input capture function, provided only in
  12761. channel 2.
  12762.  
  12763. The input capture function is controlled by means of the input capture control bits (ICPE1,
  12764. ICPE0) and clock edge bits (CKEG1, CKEG0) in TCR2. When input capture occurs, the TCNT2
  12765. value is copied into TCPR2. The value is set in TCPR2 only when the ICPF bit in TCR2 is 0.
  12766.  
  12767. TCPR2 is not initialized by a power-on or manual reset, or in standby mode.
  12768.  
  12769. Bit: 31 30 29 2 1 0
  12770.  
  12771. · · · · · · · · · · · · ·
  12772.  
  12773. Initial value: Undefined
  12774.  
  12775. R/W: R R R R R R
  12776.  
  12777. 250
  12778.  
  12779. ----------------------- Page 267-----------------------
  12780.  
  12781. 12.3 Operation
  12782.  
  12783. Each channel has a 32-bit timer counter (TCNT) that performs count-down operations, and a 32-bit
  12784. timer constant register (TCOR). The channels have an auto-reload function that allows cyclic count
  12785. operations, and can also perform external event counting. Channel 2 also has an input capture
  12786. function.
  12787.  
  12788. 1 2 . 3 . 1 Counter Operation
  12789.  
  12790. When one of bits STR0–STR2 is set to 1 in the timer start register (TSTR), the timer counter
  12791. (TCNT) for the corresponding channel starts counting. When TCNT underflows, the UNF flag is
  12792. set in the corresponding timer control register (TCR). If the UNIE bit in TCR is set to 1 at this
  12793. time, an interrupt request is sent to the CPU. At the same time, the value is copied from TCOR
  12794. into TCNT, and the count-down continues (auto-reload function).
  12795.  
  12796. Example of Count Operation Setting Procedure: Figure 12.2 shows an example of the
  12797. count operation setting procedure.
  12798.  
  12799. 1. Select the count clock with bits TPSC2–TPSC0 in the timer control register (TCR). When an
  12800. external clock is selected, set the TCLK pin to input mode with the TCOE bit in TOCR, and
  12801. select the external clock edge with bits CKEG1 and CKEG0 in TCR.
  12802.  
  12803. 2. Specify whether an interrupt is to be generated on TCNT underflow with the UNIE bit in TCR.
  12804.  
  12805. 3. When the input capture function is used, set the ICPE bits in TCR, including specification of
  12806. whether the interrupt function is to be used.
  12807.  
  12808. 4. Set a value in the timer constant register (TCOR).
  12809.  
  12810. 5. Set the initial value in the timer counter (TCNT).
  12811.  
  12812. 6. Set the STR bit to 1 in the timer start register (TSTR) to start the count.
  12813.  
  12814. 251
  12815.  
  12816. ----------------------- Page 268-----------------------
  12817.  
  12818. Operation selection
  12819.  
  12820. Select count clock 1
  12821.  
  12822. Underflow interrupt
  12823. 2
  12824. generation setting
  12825.  
  12826. When input capture
  12827. function is used
  12828.  
  12829. Input capture interrupt 3
  12830. generation setting
  12831.  
  12832. Timer constant
  12833. 4
  12834. register setting
  12835.  
  12836. Set initial timer
  12837. 5
  12838. counter value
  12839.  
  12840. Start count 6
  12841.  
  12842.  
  12843.  
  12844. Note: When an interrupt is generated, clear the source flag in the interrupt handler. If the interrupt
  12845. enabled state is set without clearing the flag, another interrupt will be generated.
  12846.  
  12847. Figure 12.2 Example of Count Operation Setting Procedure
  12848.  
  12849. Auto-Reload Count Operation: Figure 12.3 shows the TCNT auto-reload operation.
  12850.  
  12851. TCNT value
  12852. TCOR value set in TCNT
  12853. on underflow
  12854. TCOR
  12855.  
  12856. H'00000000 Time
  12857.  
  12858. STR0–STR2
  12859.  
  12860. UNF
  12861.  
  12862. Figure 12.3 TCNT Auto-Reload Operation
  12863. 252
  12864.  
  12865. ----------------------- Page 269-----------------------
  12866.  
  12867. TCNT Count Timing:
  12868.  
  12869. • Operating on internal clock
  12870.  
  12871. Any of five count clocks (Pφ/4, Pφ/16, Pφ/64, Pφ/256, or Pφ/1024) scaled from the
  12872. peripheral module clock can be selected as the count clock by means of the TPSC2–TPSC0
  12873. bits in TCR.
  12874.  
  12875. Figure 12.4 shows the timing in this case.
  12876.  
  12877.  
  12878. Internal clock
  12879.  
  12880. TCNT N + 1 N N – 1
  12881.  
  12882. Figure 12.4 Count Timing when Operating on Internal Clock
  12883.  
  12884. • Operating on external clock
  12885.  
  12886. External clock pin (TCLK) input can be selected as the timer clock by means of the TPSC2–
  12887. TPSC0 bits in TCR. The detected edge (rising, falling, or both edges) can be selected with the
  12888. CKEG1 and CKEG0 bits in TCR.
  12889.  
  12890. Figure 12.5 shows the timing for both-edge detection.
  12891.  
  12892.  
  12893. External clock
  12894. input pin
  12895.  
  12896. TCNT N + 1 N N – 1
  12897.  
  12898. Figure 12.5 Count Timing when Operating on External Clock
  12899.  
  12900. • Operating on on-chip RTC output clock
  12901.  
  12902. The on-chip RTC output clock can be selected as the timer clock by means of the TPSC2–
  12903. TPSC0 bits in TCR. Figure 12.6 shows the timing in this case.
  12904.  
  12905. 253
  12906.  
  12907. ----------------------- Page 270-----------------------
  12908.  
  12909. RTC output clock
  12910.  
  12911. TCNT N + 1 N N – 1
  12912.  
  12913. Figure 12.6 Count Timing when Operating on On-Chip RTC Output Clock
  12914.  
  12915. 1 2 . 3 . 2 Input Capture Function
  12916.  
  12917. Channel 2 has an input capture function.
  12918.  
  12919. The procedure for using the input capture function is as follows:
  12920.  
  12921. 1. Use the TCOE bit in the timer output control register (TOCR) to set the TCLK pin to input
  12922. mode.
  12923.  
  12924. 2. Use bits TPSC2–TPSC0 in the timer control register (TCR) to set an internal clock or the on-
  12925. chip RTC output clock as the timer operating clock.
  12926.  
  12927. 3. Use bits IPCE1 and IPCE0 in TCR to specify use of the input capture function, and whether
  12928. interrupts are to generated when this function is used.
  12929.  
  12930. 4. Use bits CKEG1 and CKEG0 in TCR to specify whether the rising or falling edge of the
  12931. TCLK signal is to be used to set the timer counter (TCNT) value in the input capture register
  12932. (TCPR2).
  12933.  
  12934. This function cannot be used in standby mode.
  12935.  
  12936. When input capture occurs, the TCNT2 value is set in TCPR2 only when the ICPF bit in TCR2
  12937. is 0. Also, a new DMAC transfer request is not generated until processing of the previous request
  12938. is finished.
  12939.  
  12940. Figure 12.7 shows the operation timing when the input capture function is used (with TCLK
  12941. rising edge detection).
  12942.  
  12943. 254
  12944.  
  12945. ----------------------- Page 271-----------------------
  12946.  
  12947. TCOR value set in TCNT
  12948. TCNT value on underflow
  12949.  
  12950. TCOR
  12951.  
  12952. H'00000000 Time
  12953.  
  12954. TCLK
  12955.  
  12956. TCPR2 TCNT value set
  12957.  
  12958. TICPI2
  12959.  
  12960. Figure 12.7 Operation Timing when Using Input Capture Function
  12961.  
  12962. 1 2 . 4 Interrupts
  12963.  
  12964. There are four TMU interrupt sources, comprising underflow interrupts and the input capture
  12965. interrupt (when the input capture function is used). Underflow interrupts are generated on channels
  12966. 0 to 2, and input capture interrupts on channel 2 only.
  12967.  
  12968. An underflow interrupt request is generated (for each channel) according to the AND of UNF and
  12969. the interrupt enable bit (UNIE) in TCR.
  12970.  
  12971. When the input capture function is used and an input capture request is generated, an interrupt is
  12972. requested if the input capture input flag (ICPF) in TCR2 is 1 and the input capture control bits
  12973. (ICPE1, ICPE0) in TCR2 are 11.
  12974.  
  12975. The TMU interrupt sources are summarized in table 12.3.
  12976.  
  12977. Table 12.3 TMU Interrupt Sources
  12978.  
  12979. Channel Interrupt Source Description Priority
  12980.  
  12981. 0 TUNI0 Underflow interrupt 0 High
  12982.  
  12983. 1 TUNI1 Underflow interrupt 1 ↑
  12984.  
  12985. 2 TUNI2 Underflow interrupt 2 ↓
  12986.  
  12987. TICPI2 Input capture interrupt 2 Low
  12988.  
  12989. 255
  12990.  
  12991. ----------------------- Page 272-----------------------
  12992.  
  12993. 1 2 . 5 Usage Notes
  12994.  
  12995. 1 2 . 5 . 1 Register Writes
  12996.  
  12997. When performing a register write, timer count operation must be stopped by clearing the start bit
  12998. (STR0–STR2) for the relevant channel in the timer start register (TSTR).
  12999.  
  13000. 1 2 . 5 . 2 TCNT Register Reads
  13001.  
  13002. When performing a TCNT register read, processing for synchronization with the timer count
  13003. operation is performed. If a timer count operation and register read processing are performed
  13004. simultaneously, the TCNT counter value prior to the count-down operation is read by means of the
  13005. synchronization processing.
  13006.  
  13007. 1 2 . 5 . 3 Resetting the RTC Frequency Divider
  13008.  
  13009. When the on-chip RTC output clock is selected as the count clock, the RTC frequency divider
  13010. should be reset.
  13011.  
  13012. 1 2 . 5 . 4 External Clock Frequency
  13013.  
  13014. Ensure that the external clock frequency for any channel does not exceed Pφ/4.
  13015.  
  13016. 256
  13017.  
  13018. ----------------------- Page 273-----------------------
  13019.  
  13020. Section 13 Bus State Controller (BSC)
  13021.  
  13022. 1 3 . 1 Overview
  13023.  
  13024. The functions of the bus state controller (BSC) include division of the physical address space, and
  13025. output of control signals in accordance with various types of memory and bus interface
  13026. specifications. The BSC functions allow DRAM, synchronous DRAM, SRAM, ROM, etc., to be
  13027. connected directly to the SH7750 without the use of external circuitry, and also support the
  13028. PCMCIA interface protocol, enabling system design to be simplified and data transfers to be
  13029. carried out at high speed by a compact system.
  13030.  
  13031. 1 3 . 1 . 1 Features
  13032.  
  13033. The BSC has the following features:
  13034.  
  13035. • Physical address space is managed as 7 independent areas
  13036.  
  13037.  Maximum 64 Mbytes for each of areas 0 to 6
  13038.  
  13039.  Bus width of each area can be set in a register (except area 0, which uses an external pin
  13040. setting)
  13041.  
  13042.  Wait state insertion by RDY pin
  13043.  
  13044.  Wait state insertion can be controlled by program
  13045.  
  13046.  Specification of types of memory connectable to each area
  13047.  
  13048.  Output of control signals allowing direct connection of memory to each area
  13049.  
  13050.  Automatic wait cycle insertion to prevent data bus collisions in case of consecutive
  13051. memory accesses to different areas, or a read access followed by a write access to the same
  13052. area
  13053.  
  13054.  Write strobe setup time and hold time periods can be inserted in a write cycle to enable
  13055. connection to low-speed memory
  13056.  
  13057. • Normal memory (SRAM) interface
  13058.  
  13059.  Wait state insertion can be controlled by program
  13060.  
  13061.  Wait state insertion by RDY pin
  13062.  
  13063. Connectable areas: 0 to 6
  13064.  
  13065. Settable bus widths: 64, 32, 16, 8
  13066.  
  13067. • DRAM interface
  13068.  
  13069.  Row address/column address multiplexing according to DRAM capacity
  13070.  
  13071.  Burst operation (fast page mode, EDO mode)
  13072.  
  13073.  CAS-before-RAS refresh and self-refresh
  13074.  
  13075.  8-CAS byte control for power-down operation
  13076.  
  13077.  DRAM connection control signal timing can be controlled by register settings
  13078.  
  13079. 257
  13080.  
  13081. ----------------------- Page 274-----------------------
  13082.  
  13083.  Consecutive accesses to the same row address
  13084.  
  13085. Connectable areas: 2, 3
  13086.  
  13087. Settable bus widths: 64, 32, 16
  13088.  
  13089. • Synchronous DRAM interface
  13090.  
  13091.  Row address/column address multiplexing according to synchronous DRAM capacity
  13092.  
  13093.  Burst operation
  13094.  
  13095.  Auto-refresh and self-refresh
  13096.  
  13097.  Synchronous DRAM connection control signal timing can be controlled by register settings
  13098.  
  13099.  Consecutive accesses to the same row address
  13100.  
  13101. Connectable areas: 2, 3
  13102.  
  13103. Settable bus widths: 64, 32
  13104.  
  13105. • Burst ROM interface
  13106.  
  13107.  Wait state insertion can be controlled by program
  13108.  
  13109.  Burst operation, executing the number of transfers set in a register
  13110.  
  13111. Connectable areas: 0, 5, 6
  13112.  
  13113. Settable bus widths: 32, 16, 8
  13114.  
  13115. • MPX bus interface
  13116.  
  13117.  Address/data multiplexing
  13118.  
  13119. Connectable areas: 0 to 6
  13120.  
  13121. Settable bus widths: 64, 32
  13122.  
  13123. • Byte control SRAM interface
  13124.  
  13125.  SRAM interface with byte control
  13126.  
  13127. Connectable areas: 1, 4
  13128.  
  13129. Settable bus widths: 64, 32, 16
  13130.  
  13131. • PCMCIA interface
  13132.  
  13133.  Wait state insertion can be controlled by program
  13134.  
  13135.  Bus sizing function for I/O bus width
  13136.  
  13137. • Fine refreshing control
  13138.  
  13139.  Supports refresh operation immediately after self-refresh operation in low-power DRAM by
  13140. means of refresh counter overflow interrupt function
  13141.  
  13142. • Refresh counter can be used as interval timer
  13143.  
  13144.  Interrupt request generated by compare-match
  13145.  
  13146.  Interrupt request generated by refresh counter overflow
  13147.  
  13148. 258
  13149.  
  13150. ----------------------- Page 275-----------------------
  13151.  
  13152. 1 3 . 1 . 2 Block Diagram
  13153.  
  13154. Figure 13.1 shows a block diagram of the BSC.
  13155.  
  13156. s
  13157. u
  13158. b
  13159.  
  13160. l
  13161. a
  13162. n
  13163. r
  13164. e
  13165. Bus t
  13166. n
  13167. I
  13168. interface
  13169.  
  13170. WCR1
  13171. Wait
  13172. RDY
  13173. control unit WCR2
  13174.  
  13175. WCR3
  13176.  
  13177. CS6–CS0 Area BCR1
  13178. CE2A–CE2B control unit
  13179.  
  13180. BCR2
  13181. BS
  13182. RD
  13183. RD/WR MCR s
  13184. u
  13185. b
  13186. WE7–WE0
  13187. e
  13188. l
  13189. RAS u
  13190. d
  13191. CAS, CASxx Memory o
  13192. CKE control unit M
  13193. ICIORD, ICIOWR PCR
  13194.  
  13195. REG
  13196. IOIS16 RFCR
  13197.  
  13198. s
  13199. u
  13200. b RTCNT
  13201.  
  13202. l
  13203. a
  13204. r
  13205. e
  13206. Interrupt h Refresh
  13207. p Comparator
  13208. i
  13209. controller r control unit
  13210. e
  13211. P
  13212.  
  13213. RTCOR
  13214.  
  13215. RTCSR
  13216.  
  13217. BSC
  13218.  
  13219. WCR: Wait control register RFCR: Refresh count register
  13220. BCR: Bus control register RTCNT: Refresh timer count register
  13221. MCR: Memory control register RTCOR: Refresh time constant register
  13222. PCR: PCMCIA control register RTCSR: Refresh timer control/status register
  13223.  
  13224. Figure 13.1 Block Diagram of BSC
  13225.  
  13226. 259
  13227.  
  13228. ----------------------- Page 276-----------------------
  13229.  
  13230. 1 3 . 1 . 3 Pin Configuration
  13231.  
  13232. Table 13.1 shows the BSC pin configuration.
  13233.  
  13234. Table 13.1BSC Pins
  13235.  
  13236. Name Signals I / O Description
  13237.  
  13238. Address bus A25–A0 O Address output
  13239.  
  13240. Data bus D63–D52, I/O Data input/output
  13241. D51–D32
  13242. When port functions are used, D51–D32 cannot be
  13243. used. Leave open.
  13244.  
  13245. Data bus/port D51–D32/ I/O When port functions are not used: data input/output
  13246. PORT19–
  13247. When port functions are used: input/output port
  13248. PORT0
  13249. (input or output set for each bit by register)
  13250.  
  13251. Bus cycle start BS O Signal that indicates the start of a bus cycle
  13252.  
  13253. When using synchronous DRAM: asserted once for
  13254. a burst transfer
  13255.  
  13256. For other burst transfers: asserted each data cycle
  13257.  
  13258. Chip select 6–0 CS6–CS0 O Chip select signals that indicate the area being
  13259. accessed
  13260.  
  13261. CS5 and CS6 are also used as PCMCIA CE1A and
  13262. CE1B
  13263.  
  13264. Read/write RD/WR O Data bus input/output direction designation signal
  13265.  
  13266. Also used as the DRAM/synchronous
  13267. DRAM/PCMCIA write designation signal
  13268.  
  13269. Row address strobeRAS O RAS signal when using DRAM/synchronous DRAM
  13270.  
  13271. Read/column RD /CASS/ O Strobe signal that indicates a read cycle
  13272. address strobe/ FRAME When using synchronous DRAM: CAS signal
  13273. cycle frame
  13274. When using MPX bus: FRAME signal
  13275.  
  13276. Data enable 0 WE0 /CAS0/ O When using synchronous DRAM: selection signal for
  13277. DQM0 D7–D0
  13278.  
  13279. When using DRAM: CAS signal for D7–D0
  13280.  
  13281. In other cases: write strobe signal for D7–D0
  13282.  
  13283. Data enable 1 WE1 /CAS1/ O When using synchronous DRAM: selection signal for
  13284. DQM1 D15–D8
  13285.  
  13286. When using DRAM: CAS signal for D15–D8
  13287.  
  13288. When using PCMCIA: write strobe signal
  13289.  
  13290. In other cases: write strobe signal for D15–D8
  13291.  
  13292. 260
  13293.  
  13294. ----------------------- Page 277-----------------------
  13295.  
  13296. Table 13.1BSC Pins (cont)
  13297.  
  13298. Name Signals I / O Description
  13299.  
  13300. Data enable 2 WE2 /CAS2/ O When using synchronous DRAM: selection signal for
  13301. DQM2/ICIORD D23–D16
  13302.  
  13303. When using DRAM: CAS signal for D23–D16
  13304.  
  13305. When using PCMCIA: ICIORD signal
  13306.  
  13307. In other cases: write strobe signal for D23–D16
  13308.  
  13309. Data enable 3 WE3 /CAS3/ O When using synchronous DRAM: selection signal for
  13310. DQM3/ICIOWR D31–D24
  13311.  
  13312. When using DRAM: CAS signal for D31–D24
  13313.  
  13314. When using PCMCIA: ICIOWR signal
  13315.  
  13316. In other cases: write strobe signal for D31–D24
  13317.  
  13318. Data enable 4 WE4 /CAS4/ O When using synchronous DRAM: selection signal for
  13319. DQM4 D39–D32
  13320.  
  13321. When using DRAM: CAS signal for D39–D32
  13322.  
  13323. In other cases: write strobe signal for D39–D32
  13324.  
  13325. Data enable 5 WE5 /CAS5/ O When using synchronous DRAM: selection signal for
  13326. DQM5 D47–D40
  13327.  
  13328. When using DRAM: CAS signal for D47–D40
  13329.  
  13330. In other cases: write strobe signal for D47–D40
  13331.  
  13332. Data enable 6 WE6 /CAS6/ O When using synchronous DRAM: selection signal for
  13333. DQM6 D55–D48
  13334.  
  13335. When using DRAM: CAS signal for D55–D48
  13336.  
  13337. In other cases: write strobe signal for D55–D48
  13338.  
  13339. Data enable 7 WE7 /CAS7/ O When using synchronous DRAM: selection signal for
  13340. DQM7/REG D63–D56
  13341.  
  13342. When using DRAM: CAS signal for D63–D56
  13343.  
  13344. When using PCMCIA: REG signal
  13345.  
  13346. In other cases: write strobe signal for D63–D56
  13347.  
  13348. Ready RDY I Wait state request signal
  13349.  
  13350. Area 0 MPX bus MD6/IOIS16 I In power-on reset: Designates area 0 bus as MPX
  13351. specification/16-bit bus (1: SRAM, 0: MPX)
  13352. I/O
  13353. When using PCMCIA: 16-bit I/O designation signal.
  13354. Valid only in little-endian mode.
  13355.  
  13356. Clock enable CKE O Synchronous DRAM clock enable control signal
  13357.  
  13358. Bus release BREQ / I Bus release request signal/bus acknowledge signal
  13359. request BSACK
  13360.  
  13361. 261
  13362.  
  13363. ----------------------- Page 278-----------------------
  13364.  
  13365. Table 13.1BSC Pins (cont)
  13366.  
  13367. Name Signals I / O Description
  13368.  
  13369. Bus use BACK/ O Bus use permission signal/bus request
  13370. permission BSREQ
  13371. Area 0 bus MD3/CE2A*1 I/O In power-on reset: external space area 0 bus width
  13372.  
  13373. width/PCMCIA MD4/CE2B*2 specification signal
  13374. card select When using PCMCIA: CE2A, CE2B
  13375.  
  13376. Endian switchover/ MD5/RAS2*3 I/O Endian specification in a power-on reset.
  13377.  
  13378. row address strobe RAS2 when DRAM is connected to area 2
  13379.  
  13380. Master/slave MD7/TXD I/O Indicates master/slave status in a power-on reset.
  13381. switchover
  13382. Serial interface TXD
  13383.  
  13384. DMAC0 DACK0 O DMAC channel 0 data acknowledge
  13385. acknowledge
  13386. signal
  13387.  
  13388. DMAC1 DACK1 O DMAC channel 1 data acknowledge
  13389. acknowledge
  13390. signal
  13391.  
  13392. Read/column RD2 O Same signal as RD /CASS/FRAME
  13393. address strobe/ This signal is used when the RD /CASS/FRAME
  13394. cycle frame 2 signal load is heavy.
  13395.  
  13396. Read/write 2 RD/WR2 O Same signal as RD/WR
  13397.  
  13398. This signal is used when the RD/WR signal load is
  13399. heavy.
  13400.  
  13401. Notes: 1. MD3/CE2A input/output switching is performed by BCR1.A56PCM. Output is selected
  13402. when BCR1.A56PCM = 1.
  13403. 2. MD4/CE2B input/output switching is performed by BCR1.A56PCM. Output is selected
  13404. when BCR1.A56PCM = 1.
  13405. 3. MD5/RAS2 input/output switching is performed by BCR1.DRAMTP. Output is selected
  13406. when BCR1.DRAMTP (2–0) = 101.
  13407.  
  13408. 262
  13409.  
  13410. ----------------------- Page 279-----------------------
  13411.  
  13412. 1 3 . 1 . 4 Register Configuration
  13413.  
  13414. The BSC has the 11 registers shown in table 13.2. In addition, the synchronous DRAM mode
  13415. register incorporated in synchronous DRAM can also be accessed as an SH7750 register. The
  13416. functions of these registers include control of direct interfaces to various types of memory, wait
  13417. states, and refreshing.
  13418.  
  13419. Table 13.2BSC Registers
  13420.  
  13421. Abbrevia- R/ W Initial P 4 Area 7 Acces
  13422. Name tion Value Address Address s Size
  13423.  
  13424. Bus control register 1 BCR1 R/W H'0000 0000 H'FF80 0000 H'1F80 0000 32
  13425.  
  13426. Bus control register 2 BCR2 R/W H'3FFC H'FF80 0004 H'1F80 0004 16
  13427.  
  13428. Wait state control WCR1 R/W H'7777 7777 H'FF80 0008 H'1F80 0008 32
  13429. register 1
  13430.  
  13431. Wait state control WCR2 R/W H'FFFE EFFF H'FF80 000C H'1F80 000C 32
  13432. register 2
  13433.  
  13434. Wait state control WCR3 R/W H'0777 7777 H'FF80 0010 H'1F80 0010 32
  13435. register 3
  13436.  
  13437. Memory control register MCR R/W H'0000 0000 H'FF80 0014 H'1F80 0014 32
  13438.  
  13439. PCMCIA control register PCR R/W H'0000 H'FF80 0018 H'1F80 0018 16
  13440.  
  13441. Refresh timer RTCSR R/W H'0000 H'FF80 001C H'1F80 001C 16
  13442. control/status register
  13443.  
  13444. Refresh timer counter RTCNT R/W H'0000 H'FF80 0020 H'1F80 0020 16
  13445.  
  13446. Refresh time constant RTCOR R/W H'0000 H'FF80 0024 H'1F80 0024 16
  13447. counter
  13448.  
  13449. Refresh count register RFCR R/W H'0000 H'FF80 0028 H'1F80 0028 16
  13450.  
  13451. Synchronous For SDMR2 W — H'FF90 xxxx* H'1F90 xxxx 8
  13452. DRAM mode area 2
  13453. registers
  13454.  
  13455. For SDMR3 H'FF94 xxxx* H'1F94 xxxx
  13456. area 3
  13457.  
  13458. Note: * For details, see section 13.2.8, Synchronous DRAM Mode Registers.
  13459.  
  13460. 263
  13461.  
  13462. ----------------------- Page 280-----------------------
  13463.  
  13464. 1 3 . 1 . 5 Overview of Areas
  13465.  
  13466. Space Divisions: The architecture of the SH7750 provides a 32-bit virtual address space. The
  13467. virtual space is divided into five areas according to the upper address value. External space
  13468. comprises a 29-bit address space, divided into eight areas.
  13469.  
  13470. The virtual space can be allocated to any external space by means of the memory management unit
  13471. (MMU). Details are given in section 3, Memory Management Unit (MMU). This section describes
  13472. the areas into which the external space is divided.
  13473.  
  13474. With the SH7750, various kinds of memory or PC cards can be connected to the seven areas of
  13475. external space as shown in table 13.3, and chip select signals (CS0–CS6, CE2A, CE2B ) are
  13476. output for each of these areas. CS0 is asserted when accessing area 0, and CS6 when accessing area
  13477. 6. When DRAM or synchronous DRAM is connected to area 2 or 3, signals such as RAS, CAS,
  13478. RD/WR, and DQM are also asserted. When the PCMCIA interface is selected for area 5 or 6,
  13479. CE2A/CE2B is asserted in addition to CS5/CS6 for the byte to be accessed.
  13480.  
  13481. 256
  13482.  
  13483. H'0000 0000 Area 0 (CS0) H'0000 0000
  13484.  
  13485. Area 1 (CS1) H'0400 0000
  13486.  
  13487. P0 and P0 and Area 2 (CS2) H'0800 0000
  13488. U0 areas U0 areas
  13489. Area 3 (CS3) H'0C00 0000
  13490.  
  13491. Area 4 (CS4) H'1000 0000
  13492.  
  13493. Area 5 (CS5) H'1400 0000
  13494. H'8000 0000
  13495. P1 area P1 area Area 6 (CS6) H'1800 0000
  13496. H'1C00 0000
  13497. H'A000 0000 Area 7 (reserved area)
  13498. P2 area P2 area H'1FFF FFFF
  13499.  
  13500. H'C000 0000
  13501. P3 area P3 area
  13502.  
  13503. H'E000 0000 Store queue area Store queue area
  13504. H'E400 0000
  13505. P4 area P4 area
  13506. H'FFFF FFFF
  13507.  
  13508. Physical space Virtual space External space
  13509. (MMU off) (MMU on)
  13510.  
  13511. Notes: 1. When the MMU is off (MMUCR.AT = 0), the top 3 bits of the 32-bit address are ignored, and
  13512. memory is mapped onto a fixed 29-bit external space.
  13513. 2. When the MMU is on (MMUCR.AT = 1), the P0, U0, P3, and store queue areas can be
  13514. mapped onto any external space using the TLB.
  13515. For details, see section 3, Memory Management Unit (MMU).
  13516.  
  13517. Figure 13.2 Correspondence between Virtual Address Space and External
  13518. Address Space
  13519.  
  13520. 264
  13521.  
  13522. ----------------------- Page 281-----------------------
  13523.  
  13524. Table 13.3 External Address Space Map
  13525.  
  13526. External Connectable Settable Bus
  13527. Area Addresses S i z e Memory Widths Access
  13528. S i z e
  13529. 0 H'00000000– 64 Mbytes Normal memory 8, 16, 32, 64*1 8, 16, 32, 64
  13530.  
  13531. H'03FFFFFF
  13532. Burst ROM 8, 16, 32*1
  13533.  
  13534. MPX 32, 64*1
  13535.  
  13536. 1 H'04000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13537.  
  13538. H'07FFFFFF
  13539. MPX 32, 64*2
  13540.  
  13541. 2
  13542. Byte control SRAM 16, 32, 64*
  13543. 2 H'08000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13544.  
  13545. H'0BFFFFFF
  13546.  
  13547. 2, 3
  13548. Synchronous DRAM 32, 64* *
  13549. 2,*3
  13550. DRAM 16, 32*
  13551. MPX 32, 64*2
  13552.  
  13553. 3 H'0C000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13554.  
  13555. H'0FFFFFFF
  13556.  
  13557. 2, 3
  13558. Synchronous DRAM 32, 64* *
  13559. 2,*3
  13560. DRAM 16, 32, 64*
  13561. MPX 32, 64*2
  13562.  
  13563. 4 H'10000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13564.  
  13565. H'13FFFFFF
  13566. MPX 32, 64*2
  13567.  
  13568. 2
  13569. Byte control RAM 16, 32, 64*
  13570. 5 H'14000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13571.  
  13572. H'17FFFFFF
  13573. MPX 32, 64*2
  13574.  
  13575. Burst ROM 8, 16, 32*2
  13576.  
  13577. PCMCIA 8, 16*2,*4
  13578.  
  13579. 6 H'18000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13580.  
  13581. H'1BFFFFFF
  13582. MPX 32, 64*2
  13583.  
  13584. Burst ROM 8,16, 32*2
  13585.  
  13586. PCMCIA 8,16*2,*4
  13587.  
  13588. 7*5 H'1C000000– 64 Mbytes — — n: 0 to 7
  13589.  
  13590. H'1FFFFFFF
  13591.  
  13592. Notes: 1. Memory bus width specified by external pins
  13593.  
  13594. 265
  13595.  
  13596. ----------------------- Page 282-----------------------
  13597.  
  13598. 2. Memory bus width specified by register
  13599. 3. With synchronous DRAM interface, bus width is 32 or 64 bits only.
  13600. With DRAM interface, bus width is 16 or 32 bits only for area 2, and 16, 32, or 64 bits
  13601. only for area 3.
  13602. 4. With PCMCIA interface, bus width is 8 or 16 bits only.
  13603. 5. Do not access a reserved area, as operation cannot be guaranteed in this case.
  13604.  
  13605. Area 0: H'00000000 Normal memory/burst ROM/MPX
  13606.  
  13607. Area 1: H'04000000 Normal memory/MPX/byte control
  13608. SRAM
  13609.  
  13610. Area 2: H'08000000 Normal memory/synchronous DRAM/
  13611. DRAM/MPX
  13612.  
  13613. Area 3: H'0C000000 Normal memory/synchronous DRAM/
  13614. DRAM/MPX
  13615.  
  13616. Area 4: H'10000000 Normal memory/MPX/byte control
  13617. SRAM
  13618.  
  13619. Area 5: H'14000000 Normal memory/burst ROM/PCMCIA/
  13620. MPX
  13621. The PCMCIA interface is
  13622. Area 6: H'18000000 Normal memory/burst ROM/PCMCIA/ for memory and I/O card use
  13623.  
  13624. MPX
  13625.  
  13626. Figure 13.3 External Space Allocation
  13627.  
  13628. Memory Bus Width: In the SH7750, the memory bus width can be set independently for each
  13629. space. For area 0, a bus size of 8, 16, 32, or 64 bits can be selected in a power-on reset, using
  13630. external pins. The relationship between the external pins (MD4 and MD3) and the bus width in a
  13631. power-on reset is shown below.
  13632.  
  13633. MD4 MD3 Bus Width
  13634.  
  13635. 0 0 64 bits
  13636.  
  13637. 1 8 bits
  13638.  
  13639. 1 0 16 bits
  13640.  
  13641. 1 32 bits
  13642.  
  13643. When normal memory or ROM is used in areas 1 to 6, a bus width of 8, 16, 32, or 64 bits can be
  13644. selected with bus control register 2 (BCR2). When burst ROM is used, a bus width of 8, 16, or 32
  13645. bits can be selected. When byte control SRAM is used, a bus width of 16, 32, or 64 bits can be
  13646. selected. When the MPX bus is used, a bus width of 32 or 64 bits can be selected. When the
  13647.  
  13648. 266
  13649.  
  13650. ----------------------- Page 283-----------------------
  13651.  
  13652. DRAM interface is used, a bus width of 16, 32, or 64 bits can be selected with the memory
  13653. control register (MCR). When the DRAM interface is used for area 2 or 3, a bus width of 16 or 32
  13654. bits should be set. For the synchronous DRAM interface, set a bus width of 32 or 64 bits in the
  13655. MCR register.
  13656.  
  13657. When using the PCMCIA interface, set a bus width of 8 or 16 bits.
  13658.  
  13659. When using port functions, set a bus width of 8, 16, or 32 bits for all areas.
  13660.  
  13661. For details, see section 13.2.2, Bus Control Register 2 (BCR2), and section 13.2.6, Memory
  13662. Control Register (MCR).
  13663.  
  13664. The area 7 address range, H'1C000000 to H'1FFFFFFFF, is a reserved space and must not be used.
  13665.  
  13666. 1 3 . 1 . 6 PCMCIA Support
  13667.  
  13668. The SH7750 supports PCMCIA compliant interface specifications for physical space areas 5 and
  13669. 6.
  13670.  
  13671. The interfaces supported are basically the IC memory card interface and I/O card interface stipulated
  13672. in JEIDA specifications version 4.2 (PCMCIA2.1).
  13673.  
  13674. Physical space areas 5 and 6 support both the IC memory card interface and the I/O card interface.
  13675.  
  13676. The PCMCIA interface is supported only in little-endian mode.
  13677.  
  13678. Table 13.4 PCMCIA Interface Features
  13679.  
  13680. Item Features
  13681.  
  13682. Access Random access
  13683.  
  13684. Data bus 8/16 bits
  13685.  
  13686. Memory type Mask ROM, OTPROM, EPROM, EEPROM, flash memory, SRAM
  13687.  
  13688. Common memory capacity Max. 64 Mbytes
  13689.  
  13690. Attribute memory capacity Max. 64 Mbytes
  13691.  
  13692. Others Dynamic bus sizing for I/O bus width, access to PCMCIA interface
  13693. from address translation areas
  13694.  
  13695. 267
  13696.  
  13697. ----------------------- Page 284-----------------------
  13698.  
  13699. Table 13.5 PCMCIA Support Interfaces
  13700.  
  13701. IC Memory Card Interface I/O Card Interface Corresponding
  13702. SH7750 Pin
  13703.  
  13704. Signal Signal
  13705. Pin Name I / O Function Name I / O Function
  13706.  
  13707. 1 GND Ground GND Ground —
  13708.  
  13709. 2 D3 I/O Data D3 I/O Data D3
  13710.  
  13711. 3 D4 I/O Data D4 I/O Data D4
  13712.  
  13713. 4 D5 I/O Data D5 I/O Data D5
  13714.  
  13715. 5 D6 I/O Data D6 I/O Data D6
  13716.  
  13717. 6 D7 I/O Data D7 I/O Data D7
  13718.  
  13719. 7 CE1 I Card enable CE1 I Card enable CS5 or CS6
  13720.  
  13721. 8 A10 I Address A10 I Address A10
  13722.  
  13723. 9 OE I Output enable OE I Output enable RD
  13724.  
  13725. 10 A11 I Address A11 I Address A11
  13726.  
  13727. 11 A9 I Address A9 I Address A9
  13728.  
  13729. 12 A8 I Address A8 I Address A8
  13730.  
  13731. 13 A13 I Address A13 I Address A13
  13732.  
  13733. 14 A14 I Address A14 I Address A14
  13734.  
  13735. 15 WE /PGM I Write enable WE /PGM I Write enable WE1
  13736.  
  13737. 16 RDY /BSY O Ready/busy IREQ O Interrupt request Sensed on port
  13738.  
  13739. 17 VCC Operating VCC Operating power supply —
  13740. power supply
  13741.  
  13742. 18 VPP1 Programming VPP1 Programming/ —
  13743. power supply peripheral power supply
  13744.  
  13745. 19 A16 I Address A16 I Address A16
  13746.  
  13747. 20 A15 I Address A15 I Address A15
  13748.  
  13749. 21 A12 I Address A12 I Address A12
  13750.  
  13751. 22 A7 I Address A7 I Address A7
  13752.  
  13753. 23 A6 I Address A6 I Address A6
  13754.  
  13755. 24 A5 I Address A5 I Address A5
  13756.  
  13757. 25 A4 I Address A4 I Address A4
  13758.  
  13759. 26 A3 I Address A3 I Address A3
  13760.  
  13761. 27 A2 I Address A2 I Address A2
  13762.  
  13763. 28 A1 I Address A1 I Address A1
  13764.  
  13765. 268
  13766.  
  13767. ----------------------- Page 285-----------------------
  13768.  
  13769. Table 13.5 PCMCIA Support Interfaces (cont)
  13770.  
  13771. IC Memory Card Interface I/O Card Interface Correspondin
  13772. g SH7750 Pin
  13773.  
  13774. Signal Signal
  13775. Pin Name I / O Function Name I / O Function
  13776.  
  13777. 29 A0 I Address A0 I Address A0
  13778.  
  13779. 30 D0 I/O Data D0 I/O Data D0
  13780.  
  13781. 31 D1 I/O Data D1 I/O Data D1
  13782.  
  13783. 32 D2 I/O Data D2 I/O Data D2
  13784.  
  13785. 33 WP O Write protect IOIS16 O 16-bit I/O port IOIS16
  13786.  
  13787. 34 GND Ground GND Ground —
  13788.  
  13789. 35 GND Ground GND Ground —
  13790.  
  13791. 36 CD1 O Card detection CD1 O Card detection Sensed on port
  13792.  
  13793. 37 D11 I/O Data D11 I/O Data D11
  13794.  
  13795. 38 D12 I/O Data D12 I/O Data D12
  13796.  
  13797. 39 D13 I/O Data D13 I/O Data D13
  13798.  
  13799. 40 D14 I/O Data D14 I/O Data D14
  13800.  
  13801. 41 D15 I/O Data D15 I/O Data D15
  13802.  
  13803. 42 CE2 I Card enable CE2 I Card enable CE2A or CE2B
  13804.  
  13805. 43 RFSH I Refresh request RFSH I Refresh request Output from port
  13806.  
  13807. 44 RFU Reserved IORD I I/O read ICIORD
  13808.  
  13809. 45 RFU Reserved IOWR I I/O write ICIOWR
  13810.  
  13811. 46 A17 I Address A17 I Address A17
  13812.  
  13813. 47 A18 I Address A18 I Address A18
  13814.  
  13815. 48 A19 I Address A19 I Address A19
  13816.  
  13817. 49 A20 I Address A20 I Address A20
  13818.  
  13819. 50 A21 I Address A21 I Address A21
  13820.  
  13821. 51 VCC Power supply VCC Power supply —
  13822.  
  13823. 52 VPP2 Programming VPP2 Programming/ —
  13824. power supply peripheral power
  13825. supply
  13826.  
  13827. 53 A22 I Address A22 I Address A22
  13828.  
  13829. 54 A23 I Address A23 I Address A23
  13830.  
  13831. 55 A24 I Address A24 I Address A24
  13832.  
  13833. 56 A25 I Address A25 I Address A25
  13834.  
  13835. 269
  13836.  
  13837. ----------------------- Page 286-----------------------
  13838.  
  13839. Table 13.5 PCMCIA Support Interfaces (cont)
  13840.  
  13841. IC Memory Card Interface I/O Card Interface Correspondin
  13842. g SH7750 Pin
  13843.  
  13844. Signal Signal
  13845. Pin Name I / O Function Name I / O Function
  13846.  
  13847. 57 RFU Reserved RFU Reserved —
  13848.  
  13849. 58 RESET I Reset RESET I Reset Output from port
  13850.  
  13851. 59 WAIT O Wait request WAIT O Wait request RDY
  13852.  
  13853. 60 RFU Reserved INPACK O Input acknowledge —
  13854.  
  13855. 61 REG I Attribute memory REG I Attribute memory WE7
  13856. space select space select
  13857.  
  13858. 62 BVD2 O Battery voltage SPKR O Digital speech Sensed on port
  13859. detection signal
  13860.  
  13861. 63 BVD1 O Battery voltage STSCHG O Card status Sensed on port
  13862. detection change
  13863.  
  13864. 64 D8 I/O Data D8 I/O Data D8
  13865.  
  13866. 65 D9 I/O Data D9 I/O Data D9
  13867.  
  13868. 66 D10 I/O Data D10 I/O Data D10
  13869.  
  13870. 67 CD2 O Card detection CD2 O Card detection Sensed on port
  13871.  
  13872. 68 GND Ground GND Ground —
  13873.  
  13874. 270
  13875.  
  13876. ----------------------- Page 287-----------------------
  13877.  
  13878. 1 3 . 2 Register Descriptions
  13879.  
  13880. 1 3 . 2 . 1 Bus Control Register 1 (BCR1)
  13881.  
  13882. Bus control register 1 (BCR1) is a 32-bit readable/writable register that specifies the function, bus
  13883. cycle status, etc., of each area.
  13884.  
  13885. BCR1 is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset or
  13886. in standby mode. External memory other than area 0 should not be accessed until register
  13887. initialization is completed.
  13888.  
  13889. Bit: 31 30 29 28 27 26 25 24
  13890.  
  13891. Bit name: ENDIAN MASTER A0MPX — — — IPUP OPUP
  13892.  
  13893. Initial value: 0/1* 0/1* 0/1* 0 0 0 0 0
  13894.  
  13895. R/W: R R R R R R R/W R/W
  13896.  
  13897. Bit: 23 22 21 20 19 18 17 16
  13898.  
  13899. Bit name: — — A1MBC A4MBC BREQEN PSHR MEMMPX —
  13900.  
  13901. Initial value: 0 0 0 0 0 0 0 0
  13902.  
  13903. R/W: R R R/W R/W R/W R/W R/W R
  13904.  
  13905. Bit: 15 14 13 12 11 10 9 8
  13906.  
  13907. Bit name: HIZMEM HIZCNT A0BST2 A0BST1 A0BST0 A5BST2 A5BST1 A5BST0
  13908.  
  13909. Initial value: 0 0 0 0 0 0 0 0
  13910.  
  13911. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13912.  
  13913. Bit: 7 6 5 4 3 2 1 0
  13914.  
  13915. Bit name: A6BST2 A6BST1 A6BST0 DRAMTP2 DRAMTP1 DRAMTP0 — A56PCM
  13916.  
  13917. Initial value: 0 0 0 0 0 0 0 0
  13918.  
  13919. R/W: R/W R/W R/W R/W R/W R/W R R/W
  13920.  
  13921. Note: * These bits sample external pin values in a power-on reset.
  13922.  
  13923. 271
  13924.  
  13925. ----------------------- Page 288-----------------------
  13926.  
  13927. Bit 31—Endian Flag (ENDIAN): Samples the value of the endian specification external pin
  13928. (MD5) in a power-on reset. The endian mode of all spaces is determined by this bit. ENDIAN is a
  13929. read-only bit.
  13930.  
  13931. Bit 31: ENDIAN Description
  13932.  
  13933. 0 In a power-on reset, the endian setting external pin (MD5) is low, designating
  13934. big-endian mode for the SH7750
  13935.  
  13936. 1 In a power-on reset, the endian setting external pin (MD5) is high,
  13937. designating little-endian mode for the SH7750
  13938.  
  13939. Bit 30—Master/Slave Flag (MASTER): Samples the value of the master/slave
  13940. specification external pin (MD7) in a power-on reset. The master/slave status of all spaces is
  13941. determined by this bit. MASTER is a read-only bit.
  13942.  
  13943. Bit 30: MASTER Description
  13944.  
  13945. 0 In a power-on reset, the master/slave setting external pin (MD7) is low,
  13946. designating master mode for the SH7750
  13947.  
  13948. 1 In a power-on reset, the master/slave setting external pin (MD7) is high,
  13949. designating slave mode for the SH7750
  13950.  
  13951. Bit 29—Area 0 Memory Type (A0MPX): Samples the value of the area 0 memory type
  13952. specification external pin (MD6) in a power-on reset. The memory type of area 0 is determined by
  13953. this bit. A0MPX is a read-only bit.
  13954.  
  13955. Bit 29: A0MPX Description
  13956.  
  13957. 0 In a power-on reset, the external pin specifying the area 0 memory type
  13958. (MD6) is low, designating the area 0 memory type as normal memory
  13959.  
  13960. 1 In a power-on reset, the external pin specifying the area 0 memory type
  13961. (MD6) is high, designating the area 0 memory type as MPX
  13962.  
  13963. Bits 28 to 26, 23, 22, 16, and 1—Reserved: These bits are always read as 0, and should
  13964. only be written with 0.
  13965.  
  13966. 272
  13967.  
  13968. ----------------------- Page 289-----------------------
  13969.  
  13970. Bit 25—Control Input Pin Pull-Up Resistor Control (IPUP): Specifies the pull-up
  13971. resistor status for control input pins (NMI, IRL0–IRL3, BREQ , MD6/IOIS16, RDY ). IPUP is
  13972. initialized by a power-on reset.
  13973.  
  13974. Bit 25: IPUP Description
  13975.  
  13976. 0 Pull-up resistor is on for control input pins (NMI, IRL0 –IRL3 , BREQ ,
  13977. MD6/IOIS16, RDY ) (Initial value)
  13978.  
  13979. 1 Pull-up resistor is off for control input pins (NMI, IRL0 –IRL3 , BREQ ,
  13980. MD6/IOIS16, RDY )
  13981.  
  13982. Bit 24—Control Output Pin Pull-Up Resistor Control (OPUP): Specifies the pull-
  13983. up resistor status for control output pins (A[25:0], BS, CSn, RD , WEn , RD/WR, RAS, RAS2,
  13984. CE2A, CE2B , RD2 , RD/WR2) when high-impedance. OPUP is initialized by a power-on reset.
  13985.  
  13986. Bit 24: OPUP Description
  13987.  
  13988. 0 Pull-up resistor is on for control output pins (A[25:0], BS, CSn, RD , WEn ,
  13989. RD/WR, RAS, RAS2, CE2A, CE2B, RD2 , RD/WR2 ) (Initial value)
  13990.  
  13991. 1 Pull-up resistor is off for control output pins (A[25:0], BS, CSn, RD , WEn ,
  13992. RD/WR, RAS, RAS2, CE2A, CE2B, RD2 , RD/WR2 )
  13993.  
  13994. Bit 21—Area 1 SRAM Byte Control Mode (A1MBC): MPX has priority when an
  13995. MPX bus specification is made. This bit is initialized by a power-on reset.
  13996.  
  13997. Bit 21: A1MBC Description
  13998.  
  13999. 0 Area 1 SRAM is set to normal mode (Initial value)
  14000.  
  14001. 1 Area 1 SRAM is set to byte control mode
  14002.  
  14003. Bit 20—Area 4 SRAM Byte Control Mode (A4MBC): MPX has priority when an
  14004. MPX bus specification is made. This bit is initialized by a power-on reset.
  14005.  
  14006. Bit 20: A4MBC Description
  14007.  
  14008. 0 Area 4 SRAM is set to normal mode (Initial value)
  14009.  
  14010. 1 Area 4 SRAM is set to byte control mode
  14011.  
  14012. 273
  14013.  
  14014. ----------------------- Page 290-----------------------
  14015.  
  14016. Bit 19—BREQ Enable (BREQEN): Indicates whether external requests can be accepted.
  14017. BREQEN is initialized to the external request acceptance disabled state by a power-on reset. It is
  14018. ignored in the case of a slave mode startup.
  14019.  
  14020. Bit 19: BREQEN Description
  14021.  
  14022. 0 External requests are not accepted (Initial value)
  14023.  
  14024. 1 External requests are accepted
  14025.  
  14026. Bit 18—Partial-Sharing Bit (PSHR): Sets partial-sharing mode. PSHR is valid only in
  14027. the case of a master mode startup.
  14028.  
  14029. Bit 18: PSHR Description
  14030.  
  14031. 0 Master mode (Initial value)
  14032.  
  14033. 1 Partial-sharing mode
  14034.  
  14035. Bit 17—Area 1 to 6 MPX Bus Specification (MEMMPX): Sets the MPX bus when
  14036. areas 1 to 6 are set as normal memory (or burst ROM). MEMMPX is initialized by a power-on
  14037. reset.
  14038.  
  14039. Bit 17: MEMMPX Description
  14040.  
  14041. 0 Basic interface (or burst ROM interface) is selected when areas 1 to 6 are
  14042. set as normal memory (or burst ROM) (Initial value)
  14043.  
  14044. 1 MPX bus interface is selected when areas 1 to 6 are set as normal memory
  14045. (or burst ROM)
  14046.  
  14047. Bit 15—High-Z Control (HIZMEM): Specifies the state of address and other signals
  14048. (A[25:0], BS, CSn, RD/WR, CE2A, CE2B , RD/WR2) in standby mode.
  14049.  
  14050. Bit 15: HIZMEM Description
  14051.  
  14052. 0 The A[25:0], BS, CSn, RD/WR, CE2A, CE2B, and RD/WR2 signals go to
  14053. high-impedance (High-Z) in standby mode and when the bus is released
  14054. (Initial value)
  14055.  
  14056. 1 The A[25:0], BS, CSn, RD/WR, CE2A, CE2B, and RD/WR2 signals drive in
  14057. standby mode
  14058.  
  14059. 274
  14060.  
  14061. ----------------------- Page 291-----------------------
  14062.  
  14063. Bit 14—High-Z Control (HIZCNT): Specifies the state of the RAS and CAS signals in
  14064. standby mode and when the bus is released.
  14065.  
  14066. Bit 14: HIZCNT Description
  14067.  
  14068. 0 The RAS, RAS2, WEn /CASn/DQMn, RD /CASS/FRAME , and RD2 signals go
  14069. to high-impedance (High-Z) in standby mode and when the bus is released
  14070. (Initial value)
  14071.  
  14072. 1 The RAS, RAS2, WEn /CASn/DQMn, RD /CASS/FRAME , and RD2 signals
  14073. drive in standby mode and when the bus is released
  14074.  
  14075. Bits 13 to 11—Area 0 Burst ROM Control (A0BST2–A0BST0): These bits specify
  14076. whether burst ROM is used in external space area 0. When burst ROM is used, they also specify
  14077. the number of accesses in a burst. If area 0 is an MPX interface area, these bits are ignored.
  14078.  
  14079. Bit 13: A0BST2Bit 12: A0BST1Bit 11: A0BST0Description
  14080.  
  14081. 0 0 0 Area 0 is accessed as normal memory
  14082. (Initial value)
  14083.  
  14084. 1 Area 0 is accessed as burst ROM (4
  14085. consecutive accesses)
  14086.  
  14087. Can be used with 8-, 16-, or 32-bit bus
  14088. width
  14089.  
  14090. 1 0 Area 0 is accessed as burst ROM (8
  14091. consecutive accesses)
  14092.  
  14093. Can be used with 8-, 16-, or 32-bit bus
  14094. width
  14095.  
  14096. 1 Area 0 is accessed as burst ROM (16
  14097. consecutive accesses)
  14098.  
  14099. Can only be used with 8- or 16-bit bus
  14100. width. Do not specify for 32-bit bus width
  14101.  
  14102. 1 0 0 Area 0 is accessed as burst ROM (32
  14103. consecutive accesses)
  14104.  
  14105. Can only be used with 8-bit bus width
  14106.  
  14107. 1 Reserved
  14108.  
  14109. 1 0 Reserved
  14110.  
  14111. 1 Reserved
  14112.  
  14113. 275
  14114.  
  14115. ----------------------- Page 292-----------------------
  14116.  
  14117. Bits 10 to 8—Area 5 Burst Enable (A5BST2–A5BST0): These bits specify whether
  14118. burst ROM is used in external space area 5. When burst ROM is used, they also specify the
  14119. number of accesses in a burst. If area 5 is an MPX interface area, these bits are ignored.
  14120.  
  14121. Bit 10: A5BST2Bit 9: A5BST1 Bit 8: A5BST0 Description
  14122.  
  14123. 0 0 0 Area 5 is accessed in normal mode
  14124. (Initial value)
  14125.  
  14126. 1 Area 5 is burst-accessed (4 consecutive
  14127. accesses)
  14128.  
  14129. Can be used with 8-, 16-, or 32--bit bus
  14130. width
  14131.  
  14132. 1 0 Area 5 is burst-accessed (8 consecutive
  14133. accesses)
  14134.  
  14135. Can be used with 8-, 16-, or 32-bit bus
  14136. width
  14137.  
  14138. 1 Area 5 is burst-accessed (16 consecutive
  14139. accesses)
  14140.  
  14141. Can only be used with 8- or 16-bit bus
  14142. width. Do not specify for 32-bit bus width
  14143.  
  14144. 1 0 0 Area 5 is burst-accessed (32 consecutive
  14145. accesses)
  14146.  
  14147. Can only be used with 8-bit bus width
  14148.  
  14149. 1 Reserved
  14150.  
  14151. 1 0 Reserved
  14152.  
  14153. 1 Reserved
  14154.  
  14155. Note: Clear to 0 when PCMCIA is used.
  14156.  
  14157. 276
  14158.  
  14159. ----------------------- Page 293-----------------------
  14160.  
  14161. Bits 7 to 5—Area 6 Burst Enable (A6BST2–A6BST0): These bits specify whether
  14162. burst ROM is used in external space area 6. When burst ROM is used, they also specify the
  14163. number of accesses in a burst. If area 6 is an MPX interface area, these bits are ignored.
  14164.  
  14165. Bit 7: A6BST2 Bit 6: A6BST1 Bit 5: A6BST0 Description
  14166.  
  14167. 0 0 0 Area 6 is accessed in normal mode
  14168. (Initial value)
  14169.  
  14170. 1 Area 6 is burst-accessed (4 consecutive
  14171. accesses)
  14172.  
  14173. Can be used with 8-, 16-, or 32--bit bus
  14174. width
  14175.  
  14176. 1 0 Area 6 is burst-accessed (8 consecutive
  14177. accesses)
  14178.  
  14179. Can be used with 8-, 16-, or 32-bit bus
  14180. width
  14181.  
  14182. 1 Area 6 is burst-accessed (16 consecutive
  14183. accesses)
  14184.  
  14185. Can only be used with 8- or 16-bit bus
  14186. width. Do not specify for 32-bit bus width
  14187.  
  14188. 1 0 0 Area 6 is burst-accessed (32 consecutive
  14189. accesses)
  14190.  
  14191. Can only be used with 8-bit bus width
  14192.  
  14193. 1 Reserved
  14194.  
  14195. 1 0 Reserved
  14196.  
  14197. 1 Reserved
  14198.  
  14199. Note: Clear to 0 when PCMCIA is used.
  14200.  
  14201. 277
  14202.  
  14203. ----------------------- Page 294-----------------------
  14204.  
  14205. Bits 4 to 2—Area 2 and 3 Memory Type (DRAMTP2–DRAMTP0): These bits
  14206. specify the type of memory connected to external space areas 2 and 3. ROM, SRAM, flash ROM,
  14207. etc., can be directly connected as normal memory. DRAM and synchronous DRAM can also be
  14208. directly connected.
  14209.  
  14210. Bit 4: Bit 3: Bit 2: Description
  14211. DRAMTP2 DRAMTP1 DRAMTP0
  14212.  
  14213. 0 0 0 Areas 2 and 3 are normal memory or
  14214. MPX*1
  14215.  
  14216. (Initial value)
  14217.  
  14218. 1 Reserved (Cannot be set)
  14219.  
  14220. 1
  14221. 1 0 Area 2 is normal memory or MPX* , area 3
  14222. is synchronous DRAM
  14223.  
  14224. 1 Areas 2 and 3 are synchronous DRAM
  14225.  
  14226. 1
  14227. 1 0 0 Area 2 is normal memory or MPX* , area 3
  14228. is DRAM
  14229. 1 Areas 2 and 3 are DRAM*2
  14230.  
  14231. 1 0 Reserved (Cannot be set)
  14232.  
  14233. 1 Reserved (Cannot be set)
  14234.  
  14235. Note: 1. Selection of normal memory or MPX is determined by the setting of the MEMMPX bit
  14236. 2. When this mode is selected, 16 or 32 bits should be specified as the bus width for areas
  14237. 2 and 3. In this mode the MD5 pin is designated for output as the RAS2 pin.
  14238.  
  14239. Bit 0—Area 5 and 6 Bus Type (A56PCM): Specifies whether external space areas 5 and 6
  14240. are accessed as PCMCIA space. The setting of these bits has priority over the MEMMPX and
  14241. AnBST bit settings.
  14242.  
  14243. Bit 0: A56PCM Description
  14244.  
  14245. 0 External space areas 5 and 6 are accessed as normal memory(Initial value)
  14246.  
  14247. 1 External space areas 5 and 6 are accessed as PCMCIA space*
  14248.  
  14249. Note: * The MD3 pin is designated for output as theCE2A pin.
  14250. The MD4 pin is designated for output as the CE2B pin.
  14251.  
  14252. 278
  14253.  
  14254. ----------------------- Page 295-----------------------
  14255.  
  14256. 1 3 . 2 . 2 Bus Control Register 2 (BCR2)
  14257.  
  14258. Bus control register 2 (BCR2) is a 16-bit readable/writable register that specifies the bus width for
  14259. each area, and whether a 16-bit port is used.
  14260.  
  14261. BCR2 is initialized to H'3FFC by a power-on reset, but is not initialized by a manual reset or in
  14262. standby mode. External memory other than area 0 should not be accessed until register
  14263. initialization is completed.
  14264.  
  14265. Bit: 15 14 13 12 11 10 9 8
  14266.  
  14267. Bit name: A0SZ1 A0SZ0 A6SZ1 A6SZ0 A5SZ1 A5SZ0 A4SZ1 A4SZ0
  14268.  
  14269. Initial value: 0/1* 0/1* 1 1 1 1 1 1
  14270.  
  14271. R/W: R R R/W R/W R/W R/W R/W R/W
  14272.  
  14273. Bit: 7 6 5 4 3 2 1 0
  14274.  
  14275. Bit name: A3SZ1 A3SZ0 A2SZ1 A2SZ0 A1SZ1 A0SZ0 — PORTEN
  14276.  
  14277. Initial value: 1 1 1 1 1 1 0 0
  14278.  
  14279. R/W: R/W R/W R/W R/W R/W R/W — R/W
  14280.  
  14281. Note: * These bits sample the values of the external pins that specify the area 0 bus size.
  14282.  
  14283. Bits 15 and 14—Area 0 Bus Width (A0SZ1, A0SZ0): These bits sample the external
  14284. pins (MD3 and MD4) that specify the bus size in a power-on reset. They are read-only bits.
  14285.  
  14286. Bits 2n + 1, 2n—Area n (1 to 6) Bus Width Specification (AnSZ1, AnSZ0):
  14287. These bits specify the bus width of physical space area n (n = 1 to 6).
  14288.  
  14289. (Bit 0): Bit 2n + 1: AnSZ1 Bit 2n: AnSZ0 Description
  14290. PORTEN
  14291.  
  14292. 0 0 0 Bus width is 64 bits (Initial value)
  14293.  
  14294. 1 Bus width is 8 bits
  14295.  
  14296. 1 0 Bus width is 16 bits
  14297.  
  14298. 1 Bus width is 32 bits
  14299.  
  14300. 1 0 0 Reserved (Setting prohibited)
  14301.  
  14302. 1 Bus width is 8 bits
  14303.  
  14304. 1 0 Bus width is 16 bits
  14305.  
  14306. 1 Bus width is 32 bits
  14307.  
  14308. Bit 1—Reserved: This bit is always read as 0, and should only be written with 0.
  14309.  
  14310. 279
  14311.  
  14312. ----------------------- Page 296-----------------------
  14313.  
  14314. Bit 0—Port Function Enable (PORTEN): Specifies whether pins D51 to D32 are used as
  14315. a 20-bit port. When this function is used, a bus width of 8, 16, or 32 bits should be set for all
  14316. areas.
  14317.  
  14318. Bit 0: PORTEN Description
  14319.  
  14320. 0 D51 to D32 are not used as a port (Initial value)
  14321.  
  14322. 1 D51 to D32 are used as a port
  14323.  
  14324. 1 3 . 2 . 3 Wait Control Register 1 (WCR1)
  14325.  
  14326. Wait control register 1 (WCR1) is a 32-bit readable/writable register that specifies the number of
  14327. idle state insertion cycles for each area. With some kinds of memory, data bus drive does not go off
  14328. immediately after the read signal from off-chip goes off. As a result, there is a possibility of a data
  14329. bus collision when consecutive memory accesses are performed on memory in different areas, or
  14330. when a memory write is performed immediately after a read. In the SH7750, the number of idle
  14331. cycles set in the WCR1 register are inserted automatically if there is a possibility of this kind of
  14332. data bus collision.
  14333.  
  14334. WCR1 is initialized to H'77777777 by a power-on reset, but is not initialized by a manual reset or
  14335. in standby mode.
  14336.  
  14337. Bit: 31 30 29 28 27 26 25 24
  14338.  
  14339. Bit name: — DMAIW2 DMAIW1 DMAIW0 — A6IW2 A6IW1 A6IW0
  14340.  
  14341. Initial value: 0 1 1 1 0 1 1 1
  14342.  
  14343. R/W: R R/W R/W R/W R R/W R/W R/W
  14344.  
  14345. Bit: 23 22 21 20 19 18 17 16
  14346.  
  14347. Bit name: — A5IW2 A5IW1 A5IW0 — A4IW2 A4IW1 A4IW0
  14348.  
  14349. Initial value: 0 1 1 1 0 1 1 1
  14350.  
  14351. R/W: R R/W R/W R/W R R/W R/W R/W
  14352.  
  14353. Bit: 15 14 13 12 11 10 9 8
  14354.  
  14355. Bit name: — A3IW2 A3IW1 A3IW0 — A2IW2 A2IW1 A2IW0
  14356.  
  14357. Initial value: 0 1 1 1 0 1 1 1
  14358.  
  14359. R/W: R R/W R/W R/W R R/W R/W R/W
  14360.  
  14361. 280
  14362.  
  14363. ----------------------- Page 297-----------------------
  14364.  
  14365. Bit: 7 6 5 4 3 2 1 0
  14366.  
  14367. Bit name: — A1IW2 A1IW1 A1IW0 — A0IW2 A0IW1 A0IW0
  14368.  
  14369. Initial value: 0 1 1 1 0 1 1 1
  14370.  
  14371. R/W: R R/W R/W R/W R R/W R/W R/W
  14372.  
  14373. Bits 31, 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0, and
  14374. should only be written with 0.
  14375.  
  14376. Bits 30 to 28— DMAIW-DACK Device Inter-Cycle Idle Specification
  14377. (DMAIW2–DMAIW0): These bits specify the number of idle cycles between bus cycles to be
  14378. inserted when switching from a DACK device to another space, or from a read access to a write
  14379. access on the same device. The DMAIW bits are valid only for DMA single address transfer; with
  14380. DMA dual address transfer, inter-area idle cycles are inserted.
  14381.  
  14382. Bits 4n + 2 to 4n—Area n (6 to 0) Inter-Cycle Idle Specification (AnlW2–
  14383. AnlW0): These bits specify the number of idle cycles between bus cycles to be inserted when
  14384. switching from external space area n (n = 6 to 0) to another space, or from a read access to a write
  14385. access in the same space.
  14386.  
  14387. DMAIW2/AnIW2 DMAIW1/AnIW1 DMAIW0/AnIW0 Inserted Idle Cycles
  14388.  
  14389. 0 0 0 0
  14390.  
  14391. 1 1
  14392.  
  14393. 1 0 2
  14394.  
  14395. 1 3
  14396.  
  14397. 1 0 0 6
  14398.  
  14399. 1 9
  14400.  
  14401. 1 0 12
  14402.  
  14403. 1 15 (Initial value)
  14404.  
  14405. • Idle Insertion between Accesses
  14406.  
  14407. 281
  14408.  
  14409. ----------------------- Page 298-----------------------
  14410.  
  14411. Preceding Following Cycle Same Differen
  14412. Cycle Area t Area
  14413.  
  14414. Same Area Different Area
  14415.  
  14416. Read Write Read Write MP X MP X
  14417. Address Address
  14418. Output Output
  14419.  
  14420. CPU DMA CPU DMA CPU DMA CPU DMA
  14421.  
  14422. Read M M M M M M M (1) M (1)
  14423.  
  14424. Write M M M M M (1)
  14425.  
  14426. DMA read M M M M M M — M (1)
  14427. (memory →
  14428. device)
  14429.  
  14430. DMA write D D D D* D D D D — D (1)
  14431. (device →
  14432. memory)
  14433.  
  14434. M, D: WCR1 wait insertion
  14435. (One cycle inserted in MPX access even if WCR1 is cleared to 0)
  14436. M: Memory setting (area 0 to area 6)
  14437. D: DMA setting
  14438. * : No insertion in consecutive accesses to same device
  14439. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  14440. and bits A3IW2–A3IW0 to 000.
  14441.  
  14442. 1 3 . 2 . 4 Wait Control Register 2 (WCR2)
  14443.  
  14444. Wait control register 2 (WCR2) is a 32-bit readable/writable register that specifies the number of
  14445. wait state insertion cycles for each area. It also specifies the data access pitch when performing
  14446. burst memory access. This enables low-speed memory to be directly connected without using
  14447. external circuitry.
  14448.  
  14449. WCR2 is initialized to H'FFFEEFFF by a power-on reset, but is not initialized by a manual reset
  14450. or in standby mode.
  14451.  
  14452. 282
  14453.  
  14454. ----------------------- Page 299-----------------------
  14455.  
  14456. Bit: 31 30 29 28 27 26 25 24
  14457.  
  14458. Bit name: A6W2 A6W1 A6W0 A6B2 A6B1 A6B0 A5W2 A5W1
  14459.  
  14460. Initial value: 1 1 1 1 1 1 1 1
  14461.  
  14462. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14463.  
  14464. Bit: 23 22 21 20 19 18 17 16
  14465.  
  14466. Bit name: A5W0 A5B2 A5B1 A5B0 A4W2 A4W1 A4W0 —
  14467.  
  14468. Initial value: 1 1 1 1 1 1 1 0
  14469.  
  14470. R/W: R/W R/W R/W R/W R/W R/W R/W R
  14471.  
  14472. Bit: 15 14 13 12 11 10 9 8
  14473.  
  14474. Bit name: A3W2 A3W1 A3W0 — A2W2 A2W1 A2W0 A1W2
  14475.  
  14476. Initial value: 1 1 1 0 1 1 1 1
  14477.  
  14478. R/W: R/W R/W R/W R R/W R/W R/W R/W
  14479.  
  14480. Bit: 7 6 5 4 3 2 1 0
  14481.  
  14482. Bit name: A1W1 A1W0 A0W2 A0W1 A0W0 A0B2 A0B1 A0B0
  14483.  
  14484. Initial value: 1 1 1 1 1 1 1 1
  14485.  
  14486. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14487.  
  14488. Bits 31 to 29—Area 6 Wait Control (A6W2—A6W0): These bits specify the number
  14489. of wait states to be inserted for external space area 6.
  14490.  
  14491. Description
  14492.  
  14493. First Cycle
  14494.  
  14495. Bit 31: A6W2 Bit 30: A6W1 Bit 29: A6W0 Inserted Wait States RDY Pin
  14496.  
  14497. 0 0 0 0 Ignored
  14498.  
  14499. 1 1 Enabled
  14500.  
  14501. 1 0 2 Enabled
  14502.  
  14503. 1 3 Enabled
  14504.  
  14505. 1 0 0 6 Enabled
  14506.  
  14507. 1 9 Enabled
  14508.  
  14509. 1 0 12 Enabled
  14510.  
  14511. 1 15 (Initial value) Enabled
  14512.  
  14513. 283
  14514.  
  14515. ----------------------- Page 300-----------------------
  14516.  
  14517. Bits 28 to 26—Area 6 Burst Pitch (A6B2–A6B0): These bits specify the burst pitch in
  14518. a burst transfer.
  14519.  
  14520. Description
  14521.  
  14522. Burst Cycle (Excluding First Cycle)
  14523.  
  14524. Bit 28: A6B2 Bit 27: A6B1 Bit 26: A6B0 States Per Data RDY Pin
  14525. Transfer
  14526.  
  14527. 0 0 0 0 Ignored
  14528.  
  14529. 1 1 Enabled
  14530.  
  14531. 1 0 2 Enabled
  14532.  
  14533. 1 3 Enabled
  14534.  
  14535. 1 0 0 4 Enabled
  14536.  
  14537. 1 5 Enabled
  14538.  
  14539. 1 0 6 Enabled
  14540.  
  14541. 1 7 (Initial value) Enabled
  14542.  
  14543. Bits 25 to 23—Area 5 Wait Control (A5W2–A5W0): These bits specify the number of
  14544. wait states to be inserted for external space area 5.
  14545.  
  14546. Description
  14547.  
  14548. First Cycle
  14549.  
  14550. Bit 25: A5W2 Bit 24: A5W1 Bit 23: A5W0 Inserted Wait States RDY Pin
  14551.  
  14552. 0 0 0 0 Ignored
  14553.  
  14554. 1 1 Enabled
  14555.  
  14556. 1 0 2 Enabled
  14557.  
  14558. 1 3 Enabled
  14559.  
  14560. 1 0 0 6 Enabled
  14561.  
  14562. 1 9 Enabled
  14563.  
  14564. 1 0 12 Enabled
  14565.  
  14566. 1 15 (Initial value) Enabled
  14567.  
  14568. 284
  14569.  
  14570. ----------------------- Page 301-----------------------
  14571.  
  14572. Bits 22 to 20—Area 5 Burst Pitch (A5B2–A5B0): These bits specify the burst pitch in
  14573. a burst transfer.
  14574.  
  14575. Description
  14576.  
  14577. Burst Cycle (Excluding First Cycle)
  14578.  
  14579. Bit 22: A5B2 Bit 21: A5B1 Bit 20: A5B0 Burst Pitch Per Data RDY Pin
  14580. Transfer
  14581.  
  14582. 0 0 0 0 Ignored
  14583.  
  14584. 1 1 Enabled
  14585.  
  14586. 1 0 2 Enabled
  14587.  
  14588. 1 3 Enabled
  14589.  
  14590. 1 0 0 4 Enabled
  14591.  
  14592. 1 5 Enabled
  14593.  
  14594. 1 0 6 Enabled
  14595.  
  14596. 1 7 (Initial value) Enabled
  14597.  
  14598. Bits 19 to 17—Area 4 Wait Control (A4W2–A4W0): These bits specify the number of
  14599. wait states to be inserted for external space area 4.
  14600.  
  14601. Description
  14602.  
  14603. Bit 19: A4W2 Bit 18: A4W1 Bit 17: A4W0 Inserted Wait States RDY Pin
  14604.  
  14605. 0 0 0 0 Ignored
  14606.  
  14607. 1 1 Enabled
  14608.  
  14609. 1 0 2 Enabled
  14610.  
  14611. 1 3 Enabled
  14612.  
  14613. 1 0 0 6 Enabled
  14614.  
  14615. 1 9 Enabled
  14616.  
  14617. 1 0 12 Enabled
  14618.  
  14619. 1 15 (Initial value) Enabled
  14620.  
  14621. Bits 16 and 12—Reserved: These bits are always read as 0, and should only be written with
  14622. 0.
  14623.  
  14624. Bits 15 to 13—Area 3 Wait Control (A3W2–A3W0): These bits specify the number of
  14625. wait states to be inserted for external space area 3. External wait input is only enabled when
  14626. normal memory is used, and is ignored when DRAM or synchronous DRAM is used.
  14627.  
  14628. • When Normal Memory is Used
  14629.  
  14630. 285
  14631.  
  14632. ----------------------- Page 302-----------------------
  14633.  
  14634. Description
  14635.  
  14636. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Inserted Wait States RDY Pin
  14637.  
  14638. 0 0 0 0 Ignored
  14639.  
  14640. 1 1 Enabled
  14641.  
  14642. 1 0 2 Enabled
  14643.  
  14644. 1 3 Enabled
  14645.  
  14646. 1 0 0 6 Enabled
  14647.  
  14648. 1 9 Enabled
  14649.  
  14650. 1 0 12 Enabled
  14651.  
  14652. 1 15 (Initial value) Enabled
  14653.  
  14654. • When DRAM or Synchronous DRAM is Used*1
  14655.  
  14656. Description
  14657.  
  14658. DRAM CAS Synchronous
  14659. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Assertion Width DRAM CAS Latency
  14660. Cycles
  14661.  
  14662. 0 0 0 1 Inhibited
  14663. 1 2 1*2
  14664.  
  14665. 1 0 3 2
  14666.  
  14667. 1 4 3
  14668. 1 0 0 7 4*2
  14669.  
  14670. 1 10 5*2
  14671.  
  14672. 1 0 13 Inhibited
  14673.  
  14674. 1 16 Inhibited
  14675.  
  14676. Notes: 1. External wait input is always ignored.
  14677. 2. Inhibited in RAS down mode.
  14678.  
  14679. Bits 11 to 9—Area 2 Wait Control (A2W2–A2W0): These bits specify the number of
  14680. wait states to be inserted for external space area 2. External wait input is only enabled when
  14681. normal memory is used, and is ignored when DRAM or synchronous DRAM is used.
  14682.  
  14683. • When Normal Memory is Used
  14684.  
  14685. 286
  14686.  
  14687. ----------------------- Page 303-----------------------
  14688.  
  14689. Description
  14690.  
  14691. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Inserted Wait States RDY Pin
  14692.  
  14693. 0 0 0 0 Ignored
  14694.  
  14695. 1 1 Enabled
  14696.  
  14697. 1 0 2 Enabled
  14698.  
  14699. 1 3 Enabled
  14700.  
  14701. 1 0 0 6 Enabled
  14702.  
  14703. 1 9 Enabled
  14704.  
  14705. 1 0 12 Enabled
  14706.  
  14707. 1 15 (Initial value) Enabled
  14708.  
  14709. • When DRAM or Synchronous DRAM is Used*
  14710.  
  14711. Description
  14712.  
  14713. DRAM CAS Synchronous
  14714. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Assertion Width DRAM CAS Latency
  14715. Cycles
  14716.  
  14717. 0 0 0 1 Inhibited
  14718.  
  14719. 1 2 1
  14720.  
  14721. 1 0 3 2
  14722.  
  14723. 1 4 3
  14724.  
  14725. 1 0 0 7 4
  14726.  
  14727. 1 10 5
  14728.  
  14729. 1 0 13 Inhibited
  14730.  
  14731. 1 16 Inhibited
  14732.  
  14733. Note: * External wait input is always ignored.
  14734.  
  14735. 287
  14736.  
  14737. ----------------------- Page 304-----------------------
  14738.  
  14739. Bits 8 to 6—Area 1 Wait Control (A1W2–A1W0): These bits specify the number of
  14740. wait states to be inserted for external space area 1.
  14741.  
  14742. Description
  14743.  
  14744. Bit 8: A1W2 Bit 7: A1W1 Bit 6: A1W0 Inserted Wait States RDY Pin
  14745.  
  14746. 0 0 0 0 Ignored
  14747.  
  14748. 1 1 Enabled
  14749.  
  14750. 1 0 2 Enabled
  14751.  
  14752. 1 3 Enabled
  14753.  
  14754. 1 0 0 6 Enabled
  14755.  
  14756. 1 9 Enabled
  14757.  
  14758. 1 0 12 Enabled
  14759.  
  14760. 1 15 (Initial value) Enabled
  14761.  
  14762. Bits 5 to 3—Area 0 Wait Control (A0W2 to A0W0): These bits specify the number of
  14763. wait states to be inserted for external space area 0.
  14764.  
  14765. Description
  14766.  
  14767. First Cycle
  14768.  
  14769. Bit 5: A0W2 Bit 4: A0W1 Bit 3: A0W0 Inserted Wait States RDY Pin
  14770.  
  14771. 0 0 0 0 Ignored
  14772.  
  14773. 1 1 Enabled
  14774.  
  14775. 1 0 2 Enabled
  14776.  
  14777. 1 3 Enabled
  14778.  
  14779. 1 0 0 6 Enabled
  14780.  
  14781. 1 9 Enabled
  14782.  
  14783. 1 0 12 Enabled
  14784.  
  14785. 1 15 (Initial value) Enabled
  14786.  
  14787. 288
  14788.  
  14789. ----------------------- Page 305-----------------------
  14790.  
  14791. Bits 2 to 0—Area 0 Burst Pitch (A0B2–A0B0): These bits specify the burst pitch in a
  14792. burst transfer.
  14793.  
  14794. Description
  14795.  
  14796. Burst Cycle (Excluding First Cycle)
  14797.  
  14798. Bit 2: A0B2 Bit 1: A0B1 Bit 0: A0B0 Burst Pitch Per Data RDY Pin
  14799. Transfer
  14800.  
  14801. 0 0 0 0 Ignored
  14802.  
  14803. 1 1 Enabled
  14804.  
  14805. 1 0 2 Enabled
  14806.  
  14807. 1 3 Enabled
  14808.  
  14809. 1 0 0 4 Enabled
  14810.  
  14811. 1 5 Enabled
  14812.  
  14813. 1 0 6 Enabled
  14814.  
  14815. 1 7 (Initial value) Enabled
  14816.  
  14817. • When MPX is Used (Areas 0 to 6)
  14818.  
  14819. Bit 4n + 2: Bit 4n + 1: Bit 4n: Description
  14820. AnW2 AnW1 AnW0
  14821.  
  14822. Inserted Wait States RDY Pin
  14823.  
  14824. 1st Data 2nd Data
  14825. Onward
  14826.  
  14827. Read Write
  14828.  
  14829. 0 0 0 1 0 0 Enabled
  14830.  
  14831. 1 1 Enabled
  14832.  
  14833. 1 0 2 2 Enabled
  14834.  
  14835. 1 3 3 Enabled
  14836.  
  14837. 1 0 0 1 0 1 Enabled
  14838.  
  14839. 1 1 Enabled
  14840.  
  14841. 1 0 2 2 Enabled
  14842.  
  14843. 1 3 3 Enabled
  14844.  
  14845. (n = 6 to 0)
  14846.  
  14847. 289
  14848.  
  14849. ----------------------- Page 306-----------------------
  14850.  
  14851. 1 3 . 2 . 5 Wait Control Register 3 (WCR3)
  14852.  
  14853. Wait control register 3 (WCR3) is a 32-bit readable/writable register that specifies the cycles
  14854. inserted in the setup time from the address until assertion of the write strobe, and the data hold
  14855. time from negation of the strobe, for each area. This enables low-speed memory to be directly
  14856. connected without using external circuitry.
  14857.  
  14858. WCR3 is initialized to H'07777777 by a power-on reset, but is not initialized by a manual reset or
  14859. in standby mode.
  14860.  
  14861. Bit: 31 30 29 28 27 26 25 24
  14862.  
  14863. Bit name: — — — — — A6S0 A6H1 A6H0
  14864.  
  14865. Initial value: 0 0 0 0 0 1 1 1
  14866.  
  14867. R/W: R R R R R R/W R/W R/W
  14868.  
  14869. Bit: 23 22 21 20 19 18 17 16
  14870.  
  14871. Bit name: — A5S0 A5H1 A5H0 — A4S0 A4H1 A4H0
  14872.  
  14873. Initial value: 0 1 1 1 0 1 1 1
  14874.  
  14875. R/W: R R/W R/W R/W R R/W R/W R/W
  14876.  
  14877. Bit: 15 14 13 12 11 10 9 8
  14878.  
  14879. Bit name: — A3S0 A3H1 A3H0 — A2S0 A2H1 A2H0
  14880.  
  14881. Initial value: 0 1 1 1 0 1 1 1
  14882.  
  14883. R/W: R R/W R/W R/W R R/W R/W R/W
  14884.  
  14885. Bit: 7 6 5 4 3 2 1 0
  14886.  
  14887. Bit name: — A1S0 A1H1 A0H0 — A0S0 A0H1 A0H0
  14888.  
  14889. Initial value: 0 1 1 1 0 1 1 1
  14890.  
  14891. R/W: R R/W R/W R/W R R/W R/W R/W
  14892.  
  14893. Bits 31 to 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0,
  14894. and should only be written with 0.
  14895.  
  14896. 290
  14897.  
  14898. ----------------------- Page 307-----------------------
  14899.  
  14900. Valid only for normal memory and burst ROM:
  14901.  
  14902. Bit 4n + 2—Area n (6 to 0) Write Strobe Setup Time (AnS0): Specifies the number
  14903. of cycles inserted in the setup time from the address until assertion of the read/write strobe.
  14904.  
  14905. Bit 4n + 2: AnS0 Waits Inserted in Setup
  14906.  
  14907. 0 0
  14908.  
  14909. 1 1 (Initial value)
  14910.  
  14911. (n = 6 to 0)
  14912.  
  14913. Valid only for normal memory and burst ROM:
  14914.  
  14915. Bits 4n + 1 and 4n—Area n (6 to 0) Data Hold Time (AnH1, AnH0): When
  14916. writing, these bits specify the number of cycles to be inserted in the hold time from negation of
  14917. the write strobe. When reading, they specify the number of cycles to be inserted in the hold time
  14918. from the data sampling timing.
  14919.  
  14920. Bit 4n + 1: AnH1 Bit 4n: AnH0 Waits Inserted in Hold
  14921.  
  14922. 0 0 0
  14923.  
  14924. 1 1
  14925.  
  14926. 1 0 2
  14927.  
  14928. 1 3 (Initial value)
  14929.  
  14930. (n = 6 to 0)
  14931.  
  14932. 1 3 . 2 . 6 Memory Control Register (MCR)
  14933.  
  14934. The memory control register (MCR) is a 32-bit readable/writable register that specifiesRAS and
  14935. CAS timing and burst control for DRAM and synchronous DRAM (areas 2 and 3), address
  14936. multiplexing, and refresh control. This enables DRAM and synchronous DRAM to be directly
  14937. connected without using external circuitry.
  14938.  
  14939. MCR is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset or
  14940. in standby mode. Bits RASD, MRSET, TRC2–0, TPC2–0, RCD1–0, TRWL2–0, TRAS2–0,
  14941. BE, SZ1–0, AMXEXT, AMX2–0, and EDOMODE are written in the initialization following a
  14942. power-on reset, and should not be modified subsequently. When writing to bits RFSH and
  14943. RMODE, the same values should be written to the other bits so that they remain unchanged.
  14944. When using DRAM or synchronous DRAM, areas 2 and 3 should not be accessed until register
  14945. initialization is completed.
  14946.  
  14947. 291
  14948.  
  14949. ----------------------- Page 308-----------------------
  14950.  
  14951. Bit: 31 30 29 28 27 26 25 24
  14952.  
  14953. Bit name: RASD MRSET TRC2 TRC1 TRC0 — — —
  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 R R
  14958.  
  14959. Bit: 23 22 21 20 19 18 17 16
  14960.  
  14961. Bit name: TCAS — TPC2 TPC1 TPC0 — RCD1 RCD0
  14962.  
  14963. Initial value: 0 0 0 0 0 0 0 0
  14964.  
  14965. R/W: R/W R R/W R/W R/W R R/W R/W
  14966.  
  14967. Bit: 15 14 13 12 11 10 9 8
  14968.  
  14969. Bit name: TRWL2 TRWL1 TRWL0 TRAS2 TRAS1 TRAS0 BE SZ1
  14970.  
  14971. Initial value: 0 0 0 0 0 0 0 0
  14972.  
  14973. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14974.  
  14975. Bit: 7 6 5 4 3 2 1 0
  14976.  
  14977. Bit name: SZ0 AMXEXT AMX2 AMX1 AMX0 RFSH RMODE EDO
  14978. MODE
  14979.  
  14980. Initial value: 0 0 0 0 0 0 0 0
  14981.  
  14982. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14983.  
  14984. Bit 31—RAS Down (RASD): Sets RAS down mode. When RAS down mode is used, set
  14985. BE to 1. Do not set RAS down mode in slave mode or partial-sharing mode, or when areas 2 and 3
  14986. are both designated as synchronous DRAM space.
  14987.  
  14988. Bit 31: RASD Description
  14989.  
  14990. 0 Normal mode (Initial value)
  14991.  
  14992. 1 RAS down mode
  14993.  
  14994. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  14995. and bits A3IW2–A3IW0 to 000.
  14996.  
  14997. Bit 30—Mode Register Set (MRSET): Set when a synchronous DRAM mode register
  14998. setting is used. See Power-On Sequence in section 13.3.5, Synchronous DRAM Interface.
  14999.  
  15000. Bit 30: MRSET Description
  15001.  
  15002. 0 All-bank precharge (Initial value)
  15003.  
  15004. 1 Mode register setting
  15005.  
  15006. 292
  15007.  
  15008. ----------------------- Page 309-----------------------
  15009.  
  15010. Bits 26 to 24, 22, and 18—Reserved: These bits are always read as 0, and should only be
  15011. written with 0.
  15012.  
  15013. Bits 29 to 27—RAS Precharge Time at End of Refresh (TRC2–TRC0)
  15014. (Synchronous DRAM: auto- and self-refresh both enabled; DRAM: auto- and self-refresh both
  15015. enabled)
  15016.  
  15017. RAS Precharge Time
  15018. Bit 29: TRC2 Bit 28: TRC1 Bit 27: TRC0 Immediately after Refresh
  15019.  
  15020. 0 0 0 0 (Initial value)
  15021.  
  15022. 1 3
  15023.  
  15024. 1 0 6
  15025.  
  15026. 1 9
  15027.  
  15028. 1 0 0 12
  15029.  
  15030. 1 15
  15031.  
  15032. 1 0 18
  15033.  
  15034. 1 21
  15035.  
  15036. Bit 23—CAS Negation Period (TCAS): This bit is valid only when DRAM is connected.
  15037.  
  15038. Bit 23: TCAS CAS Negation Period
  15039.  
  15040. 0 1 (Initial value)
  15041.  
  15042. 1 2
  15043.  
  15044. Bits 21 to 19—RAS Precharge Period (TPC2–TPC0): When the DRAM interface is
  15045. selected for the connected memory, these bits specify the minimum number of cycles until RAS is
  15046. asserted again after being negated. When the synchronous DRAM interface is selected, these bits
  15047. specify the minimum number of cycles until the next bank active command is output after
  15048. precharging.
  15049.  
  15050. 293
  15051.  
  15052. ----------------------- Page 310-----------------------
  15053.  
  15054. RAS Precharge Time
  15055.  
  15056. Bit 21: TPC2 Bit 20: TPC1 Bit 19: TPC0 DRAM Synchronous DRAM
  15057.  
  15058. 0 0 0 0 1* (Initial value)
  15059.  
  15060. 1 1 2
  15061.  
  15062. 1 0 2 3
  15063.  
  15064. 1 3 4*
  15065.  
  15066. 1 0 0 4 5*
  15067.  
  15068. 1 5 6*
  15069.  
  15070. 1 0 6 7*
  15071.  
  15072. 1 7 8*
  15073.  
  15074. Note: * Inhibited in RAS down mode.
  15075.  
  15076. Bits 17 and 16—RAS-CAS Delay (RCD1, RCD0): When the DRAM interface is
  15077. selected for the connected memory, these bits set the RAS-CAS assertion delay time. When the
  15078. synchronous DRAM interface is selected, these bits set the bank active-read/write command delay
  15079. time.
  15080.  
  15081. Description
  15082.  
  15083. Bit 17: RCD1 Bit 16: RCD0 DRAM Synchronous DRAM
  15084.  
  15085. 0 0 2 cycles Reserved (Setting prohibited)
  15086.  
  15087. 1 3 cycles 2 cycles
  15088.  
  15089. 1 0 4 cycles 3 cycles
  15090.  
  15091. 1 5 cycles 4 cycles*
  15092.  
  15093. Note: * Inhibited in RAS down mode.
  15094.  
  15095. Bits 15 to 13—Write Precharge Delay (TRWL2–TRWL0): These bits set the
  15096. synchronous DRAM write precharge delay time. In auto-precharge mode, they specify the time
  15097. until the next bank active command is issued after a write cycle. After a write cycle, the next active
  15098. command is not issued for a period of TPC + TRWL. In RAS down mode, they specify the time
  15099. until the next precharge command is issued. After a write cycle, the next precharge command is not
  15100. issued for a period of TRWL. This setting is valid only when synchronous DRAM is connected.
  15101.  
  15102. 294
  15103.  
  15104. ----------------------- Page 311-----------------------
  15105.  
  15106. Bit 15: TRWL2 Bit 14: TRWL1 Bit 13: TRWL0 Write Precharge ACT Delay
  15107. Time
  15108.  
  15109. 0 0 0 1 (Initial value)
  15110.  
  15111. 1 2
  15112.  
  15113. 1 0 3*
  15114.  
  15115. 1 4*
  15116.  
  15117. 1 0 0 5*
  15118.  
  15119. 1 Reserved (Setting prohibited)
  15120.  
  15121. 1 0 Reserved (Setting prohibited)
  15122.  
  15123. 1 Reserved (Setting prohibited)
  15124.  
  15125. Note: * Inhibited in RAS down mode.
  15126.  
  15127. Bits 12 to 10—CAS-Before-RAS Refresh R A S Assertion Period (TRAS2–
  15128. TRAS0): When the DRAM interface is selected for the connected memory, these bits set the
  15129. RAS assertion period in CAS-before-RAS refreshing. When the synchronous DRAM interface is
  15130. selected, the bank active command is not issued for a period of TRC + TRAS after an auto-refresh
  15131. command is issued.
  15132.  
  15133. Bit 12: TRAS2 Bit 11: TRAS1 Bit 10: TRAS0 RAS /DRAM Command
  15134. Assertion Period Interval after
  15135. Synchronous
  15136. DRAM Refresh
  15137.  
  15138. 0 0 0 2 4 + TRC
  15139. (Initial value)
  15140.  
  15141. 1 3 5 + TRC
  15142.  
  15143. 1 0 4 6 + TRC
  15144.  
  15145. 1 5 7 + TRC
  15146.  
  15147. 1 0 0 6 8 + TRC
  15148.  
  15149. 1 7 9 + TRC
  15150.  
  15151. 1 0 8 10 + TRC
  15152.  
  15153. 1 9 11 + TRC
  15154.  
  15155. Bit 9—Burst Enable (BE): Specifies whether burst access is performed on DRAM. In
  15156. synchronous DRAM access, burst access is always performed regardless of the specification of this
  15157. bit. The DRAM transfer mode depends on EDOMODE.
  15158.  
  15159. 295
  15160.  
  15161. ----------------------- Page 312-----------------------
  15162.  
  15163. B E EDOMODE 8/16/32/64-Bit Transfer 32-Byte Transfer
  15164.  
  15165. 0 0 Single Single
  15166.  
  15167. 1 Setting prohibited Setting prohibited
  15168.  
  15169. 1 0 Single/fast page* Fast page
  15170.  
  15171. 1 EDO EDO
  15172.  
  15173. Note: * In fast page mode, 32-bit or 64-bit transfer with a 16-bit bus, 64-bit transfer with a 32-bit
  15174. bus.
  15175.  
  15176. Bits 8 and 7—Memory Data Size (SZ1, SZ0): These bits specify the memory data size
  15177. of DRAM and synchronous DRAM. This setting has priority over the BCR2 register setting.
  15178.  
  15179. Description
  15180.  
  15181. Bit 8: SZ1 Bit 7: SZ0 DRAM SDRAM
  15182.  
  15183. 0 0 64 bits 64 bits
  15184.  
  15185. 1 Reserved (Setting prohibited) Reserved (Setting prohibited)
  15186.  
  15187. 1 0 16 bits Reserved (Setting prohibited)
  15188.  
  15189. 1 32 bits 32 bits
  15190.  
  15191. Bits 6 to 3—Address Multiplexing (AMXEXT, AMX2–AMX0): These bits specify
  15192. address multiplexing for DRAM and synchronous DRAM. The actual address shift value is
  15193. different for the DRAM interface and the synchronous DRAM interface.
  15194.  
  15195. • For DRAM Interface:
  15196.  
  15197. Bit 6: Bit 5: Bit 4: Bit 3: Description
  15198. AMXEXT AMX2 AMX1 AMX0
  15199.  
  15200. DRAM
  15201.  
  15202. 0* 0 0 0 8-bit column address product
  15203. (Initial value)
  15204.  
  15205. 1 9-bit column address product
  15206.  
  15207. 1 0 10-bit column address product
  15208.  
  15209. 1 11-bit column address product
  15210.  
  15211. 1 0 0 12-bit column address product
  15212.  
  15213. 1 Reserved (Setting prohibited)
  15214.  
  15215. 1 0 Reserved (Setting prohibited)
  15216.  
  15217. 1 Reserved (Setting prohibited)
  15218.  
  15219. Note: * When the DRAM interface is used, clear the AMXEXT bit to 0.
  15220.  
  15221. • For Synchronous DRAM Interface:
  15222.  
  15223. 296
  15224.  
  15225. ----------------------- Page 313-----------------------
  15226.  
  15227. AMX AMXEXT S Z Synchronous DRAM BANK
  15228.  
  15229. 0 0 64 (16M: 512k × 16 bits × 2) × 4 a[22]*
  15230.  
  15231. 32 (16M: 512k × 16 bits × 2) × 2 a[21]*
  15232.  
  15233. 1 64 (16M: 512k × 16 bits × 2) × 4 a[21]*
  15234.  
  15235. 32 (16M: 512k × 16 bits × 2) × 2 a[20]*
  15236.  
  15237. 1 0 64 (16M: 1M × 8 bits × 2) × 8 a[23]*
  15238.  
  15239. 32 (16M: 1M × 8 bits × 2) × 4 a[22]*
  15240.  
  15241. 1 64 (16M: 1M × 8 bits × 2) × 8 a[22]*
  15242.  
  15243. 32 (16M: 1M × 8 bits × 2) × 4 a[21]*
  15244.  
  15245. 2 — 64 (64M: 1M × 16 bits × 4) × 4 a[24:23]*
  15246.  
  15247. 32 (64M: 1M × 16 bits × 4) × 2 a[23:22]*
  15248.  
  15249. 3 64 (64M: 2M × 8 bits × 4) × 8 a[25:24]*
  15250.  
  15251. 32 (64M: 2M × 8 bits × 4) × 4 a[24:23]*
  15252.  
  15253. 4 64 (64M: 512k × 32 bits × 4) × 2 a[23:22]*
  15254.  
  15255. 32 (64M: 512k × 32 bits × 4) × 1 a[22:21]*
  15256.  
  15257. 5 64 (64M: 1M × 32 bits × 2) × 2 a[23]*
  15258.  
  15259. 32 (64M: 1M × 32 bits × 2) × 1 a[22]*
  15260.  
  15261. 6 64 Reserved (Setting prohibited)
  15262.  
  15263. 32 Reserved (Setting prohibited)
  15264.  
  15265. 7 64 (16M: 256k × 32 bits × 2) × 2 a[21]*
  15266.  
  15267. 32 (16M: 256k × 32 bits × 2) × 1 a[20]*
  15268.  
  15269. Note: * a[*]: Physical address
  15270.  
  15271. Bit 2—Refresh Control (RFSH): Specifies refresh control. Selects whether refreshing is
  15272. performed for DRAM and synchronous DRAM. When the refresh function is not used, the refresh
  15273. request cycle generation timer can be used as an interval timer.
  15274.  
  15275. Bit 2: RFSH Description
  15276.  
  15277. 0 Refreshing is not performed (Initial value)
  15278.  
  15279. 1 Refreshing is performed
  15280.  
  15281. 297
  15282.  
  15283. ----------------------- Page 314-----------------------
  15284.  
  15285. Bit 1—Refresh Mode (RMODE): Specifies whether normal refreshing or self-refreshing is
  15286. performed when the RFSH bit is set to 1. When the RFSH bit is 1 and this bit is cleared to 0,
  15287. CAS-before-RAS refreshing or auto-refreshing is performed for DRAM and synchronous DRAM,
  15288. using the cycle set by refresh-related registers RTCNT, RTCOR, and RTCSR. If a refresh request
  15289. is issued during an external bus cycle, the refresh cycle is executed when the bus cycle ends. When
  15290. the RFSH bit is 1 and this bit is set to 1, the self-refresh state is set for DRAM and synchronous
  15291. DRAM, after waiting for the end of any currently executing external bus cycle. All refresh requests
  15292. for memory in the self-refresh state are ignored.
  15293.  
  15294. Bit 1: RMODE Description
  15295.  
  15296. 0 CAS-before-RAS refreshing is performed (when RFSH = 1) (Initial value)
  15297.  
  15298. 1 Self-refreshing is performed (when RFSH = 1)
  15299.  
  15300. Bit 0—EDO Mode (EDOMODE): Used to specify the data sampling timing for data reads
  15301. when using EDO mode DRAM. The setting of this bit does not affect the operation timing of
  15302. memory other than DRAM. Set this bit to 1 only when DRAM is used.
  15303.  
  15304. 1 3 . 2 . 7 PCMCIA Control Register (PCR)
  15305.  
  15306. The PCMCIA control register (PCR) is a 16-bit readable/writable register that specifies the OE
  15307. and WE signal assertion/negation timing for the PCMCIA interface connected to areas 5 and 6.
  15308. The OE and WE signal assertion width is set by the wait control bits in the WCR2 register.
  15309.  
  15310. PCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  15311. standby mode.
  15312.  
  15313. Bit: 15 14 13 12 11 10 9 8
  15314.  
  15315. Bit name: A5PCW1 A5PCW0 A6PCW1 A6PCW0 A5TED2 A5TED1 A5TED0 A6TED2
  15316.  
  15317. Initial value: 0 0 0 0 0 0 0 0
  15318.  
  15319. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15320.  
  15321. Bit: 7 6 5 4 3 2 1 0
  15322.  
  15323. Bit name: A6TED1 A6TED0 A5TEH2 A5TEH1 A5TEH0 A6TEH2 A6TEH1 A6TEH0
  15324.  
  15325. Initial value: 0 0 0 0 0 0 0 0
  15326.  
  15327. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15328.  
  15329. 298
  15330.  
  15331. ----------------------- Page 315-----------------------
  15332.  
  15333. Bits 15 and 14—PCMCIA Wait (A5PCW1, A5PCW0): These bits specify the number
  15334. of waits to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait
  15335. cycle. The setting of these bits is selected when the TC bit is cleared to 0 in the page table entry
  15336. assistance register (PTEA).
  15337.  
  15338. Bit 15: A5PCW1 Bit 14: A5PCW0 Waits Inserted
  15339.  
  15340. 0 0 0 (Initial value)
  15341.  
  15342. 1 15
  15343.  
  15344. 1 0 30
  15345.  
  15346. 1 50
  15347.  
  15348. Bits 13 and 12—PCMCIA Wait (A6PCW1, A6PCW0): These bits specify the number
  15349. of waits to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait
  15350. cycle. The setting of these bits is selected when the TC bit is set to 1 in the page table entry
  15351. assistance register (PTEA).
  15352.  
  15353. Bit 13: A6PCW1 Bit 12: A6PCW0 Waits Inserted
  15354.  
  15355. 0 0 0 (Initial value)
  15356.  
  15357. 1 15
  15358.  
  15359. 1 0 30
  15360.  
  15361. 1 50
  15362.  
  15363. Bits 11 to 9—Address-O E /WE Assertion Delay (A5TED2–A5TED0): These bits set
  15364. the delay time from address output to OE/WE assertion on the connected PCMCIA interface. The
  15365. setting of these bits is selected when the TC bit is cleared to 0 in PTEA.
  15366.  
  15367. Bit 11: A5TED2 Bit 10: A5TED1 Bit 9: A5TED0 Waits Inserted
  15368.  
  15369. 0 0 0 0 (Initial value)
  15370.  
  15371. 1 1
  15372.  
  15373. 1 0 2
  15374.  
  15375. 1 3
  15376.  
  15377. 1 0 0 6
  15378.  
  15379. 1 9
  15380.  
  15381. 1 0 12
  15382.  
  15383. 1 15
  15384.  
  15385. 299
  15386.  
  15387. ----------------------- Page 316-----------------------
  15388.  
  15389. Bits 8 to 6—Address-O E /WE Assertion Delay (A6TED2–A6TED0): These bits set
  15390. the delay time from address output to OE/WE assertion on the connected PCMCIA interface. The
  15391. setting of these bits is selected when the TC bit is set to 1 in PTEA.
  15392.  
  15393. Bit 8: A6TED2 Bit 7: A6TED1 Bit 6: A6TED0 Waits Inserted
  15394.  
  15395. 0 0 0 0 (Initial value)
  15396.  
  15397. 1 1
  15398.  
  15399. 1 0 2
  15400.  
  15401. 1 3
  15402.  
  15403. 1 0 0 6
  15404.  
  15405. 1 9
  15406.  
  15407. 1 0 12
  15408.  
  15409. 1 15
  15410.  
  15411. Bits 5 to 3—O E /WE Negation-Address Delay (A5TEH2–A5TEH0): These bits set
  15412. the address hold delay time from OE/WE negation in a write on the connected PCMCIA interface
  15413. or in an I/O card read. In the case of a memory card read, the address hold delay time from the data
  15414. sampling timing is set. The setting of these bits is selected when the TC bit is cleared to 0 in
  15415. PTEA.
  15416.  
  15417. Bit 5: A5TEH2 Bit 4: A5TEH1 Bit 3: A5TEH0 Waits Inserted
  15418.  
  15419. 0 0 0 0 (Initial value)
  15420.  
  15421. 1 1
  15422.  
  15423. 1 0 2
  15424.  
  15425. 1 3
  15426.  
  15427. 1 0 0 6
  15428.  
  15429. 1 9
  15430.  
  15431. 1 0 12
  15432.  
  15433. 1 15
  15434.  
  15435. 300
  15436.  
  15437. ----------------------- Page 317-----------------------
  15438.  
  15439. Bits 2 to 0—O E /WE Negation-Address Delay (A6TEH2–A6TEH0): These bits set
  15440. the address hold delay time from OE/WE negation in a write on the connected PCMCIA interface
  15441. or in an I/O card read. In the case of a memory card read, the address hold delay time from the data
  15442. sampling timing is set. The setting of these bits is selected when the TC bit is set to 1 in PTEA.
  15443.  
  15444. Bit 2: A6TEH2 Bit 1: A6TEH1 Bit 0: A6TEH0 Waits Inserted
  15445.  
  15446. 0 0 0 0 (Initial value)
  15447.  
  15448. 1 1
  15449.  
  15450. 1 0 2
  15451.  
  15452. 1 3
  15453.  
  15454. 1 0 0 6
  15455.  
  15456. 1 9
  15457.  
  15458. 1 0 12
  15459.  
  15460. 1 15
  15461.  
  15462. 1 3 . 2 . 8 Synchronous DRAM Mode Register (SDMR)
  15463.  
  15464. The synchronous DRAM mode register (SDMR) is a write-only virtual 16-bit register that is
  15465. written to via the synchronous DRAM address bus, and sets the mode of the area 2 and area 3
  15466. synchronous DRAM.
  15467.  
  15468. Settings for the SDMR register must be made before accessing synchronous DRAM.
  15469.  
  15470. Bit: 15 14 13 12 11 10 9 8
  15471.  
  15472. Bit name:
  15473.  
  15474. Initial value: — — — — — — — —
  15475.  
  15476. R/W: W W W W W W W W
  15477.  
  15478. Bit: 7 6 5 4 3 2 1 0
  15479.  
  15480. Bit name:
  15481.  
  15482. Initial value: — — — — — — — —
  15483.  
  15484. R/W: W W W W W W W W
  15485.  
  15486. Since the address bus, not the data bus, is used to write to the synchronous DRAM mode register,
  15487. if the value to be set is “X” and the SDMR register address is “Y”, value “X” is written to the
  15488. synchronous DRAM mode register by performing a write to address X + Y. When the synchronous
  15489. DRAM bus width is set to 32 bits, as A0 of the synchronous DRAM is connected to A2 of the
  15490. SH7750, and A1 of the synchronous DRAM is connected to A3 of the SH7750, the value actually
  15491. written to the synchronous DRAM is the value of “X” shifted 2 bits to the right.
  15492.  
  15493. 301
  15494.  
  15495. ----------------------- Page 318-----------------------
  15496.  
  15497. For example, to write H'0230 to the area 2 SDMR register, arbitrary data is written to address
  15498. H'FF900000 (address “Y”) + H'08C0 (value “X”) (= H'FF9008C0). As a result, H'0230 is written
  15499. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  15500.  
  15501. Similarly, to write H'0230 to the area 3 SDMR register, arbitrary data is written to address
  15502. H'FF940000 (address “Y”) + H'08C0 (value “X”) (= H'FF9408C0). As a result, H'0230 is written
  15503. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  15504.  
  15505. The lower 16 bits of the address are set in the synchronous DRAM mode register.
  15506.  
  15507. For a 32-bit bus:
  15508.  
  15509. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15510.  
  15511. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  15512. DE2 DE1 DE0
  15513.  
  15514. ←→
  15515. 10 bits set in case of 32-bit bus width
  15516.  
  15517. For a 64-bit bus:
  15518.  
  15519. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15520.  
  15521. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  15522. DE2 DE1 DE0
  15523.  
  15524. ←→
  15525. 10 bits set in case of 64-bit bus width
  15526.  
  15527. LMODE: RAS-CAS latency
  15528. BL: Burst length
  15529. WT: Wrap type (0: Sequential)
  15530.  
  15531. BL LMODE
  15532. 000: Reserved 000: Reserved
  15533. 001: Reserved 001: 1
  15534. 010: 4 010: 2
  15535. 011: 8 011: 3
  15536. 100: Reserved 100: Reserved
  15537. 101: Reserved 101: Reserved
  15538. 110: Reserved 110: Reserved
  15539. 111: Reserved 111: Reserved
  15540.  
  15541. 302
  15542.  
  15543. ----------------------- Page 319-----------------------
  15544.  
  15545. 1 3 . 2 . 9 Refresh Timer Control/Status Register (RTSCR)
  15546.  
  15547. The refresh timer control/status register (RTSCR) is a 16-bit readable/writable register that
  15548. specifies the refresh cycle and whether interrupts are to be generated.
  15549.  
  15550. RTSCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  15551. standby mode.
  15552.  
  15553. Bit: 15 14 13 12 11 10 9 8
  15554.  
  15555. Bit name: — — — — — — — —
  15556.  
  15557. Initial value: 0 0 0 0 0 0 0 0
  15558.  
  15559. R/W: — — — — — — — —
  15560.  
  15561. Bit: 7 6 5 4 3 2 1 0
  15562.  
  15563. Bit name: CMF CMIE CKS2 CKS1 CKS0 OVF OVIE LMTS
  15564.  
  15565. Initial value: 0 0 0 0 0 0 0 0
  15566.  
  15567. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15568.  
  15569. Bits 15 to 8—Reserved: These bits are always read as 0. For the write values, see section
  15570. 13.2.13, Notes on Accessing Refresh Control Registers.
  15571.  
  15572. Bit 7—Compare-Match Flag (CMF): Status flag that indicates a match between the refresh
  15573. timer counter (RTCNT) and refresh time constant register (RTCOR) values.
  15574.  
  15575. Bit 7: CMF Description
  15576.  
  15577. 0 RTCNT and RTCOR values do not match (Initial value)
  15578.  
  15579. [Clearing condition]
  15580. When 0 is written to CMF
  15581.  
  15582. 1 RTCNT and RTCOR values match
  15583.  
  15584. [Setting condition]
  15585. When RTCNT = RTCOR*
  15586.  
  15587. Note: * If 1 is written, the original value is retained.
  15588.  
  15589. Bit 6—Compare-Match Interrupt Enable (CMIE): Controls generation or suppression of
  15590. an interrupt request when the CMF flag is set to 1 in RTCSR. Do not set this bit to 1 when
  15591. CAS-before-RAS refreshing or auto-refreshing is used.
  15592.  
  15593. Bit 6: CMIE Description
  15594.  
  15595. 0 Interrupt requests initiated by CMF are disabled (Initial value)
  15596.  
  15597. 1 Interrupt requests initiated by CMF are enabled
  15598.  
  15599. 303
  15600.  
  15601. ----------------------- Page 320-----------------------
  15602.  
  15603. Bits 5 to 3—Clock Select Bits (CKS2–CKS0): These bits select the input clock for
  15604. RTCNT. The base clock is the external bus clock (CKIO). The RTCNT count clock is obtained by
  15605. scaling CKIO by the specified factor.
  15606.  
  15607. Bit 5: CKS2 Bit 4: CKS1 Bit 3: CKS0 Description
  15608.  
  15609. 0 0 0 Clock input disabled (Initial value)
  15610.  
  15611. 1 Bus clock (CKIO)/4
  15612.  
  15613. 1 0 CKIO/16
  15614.  
  15615. 1 CKIO/64
  15616.  
  15617. 1 0 0 CKIO/256
  15618.  
  15619. 1 CKIO/1024
  15620.  
  15621. 1 0 CKIO/2048
  15622.  
  15623. 1 CKIO/4096
  15624.  
  15625. Bit 2—Refresh Count Overflow Flag (OVF): Status flag that indicates that the number
  15626. of refresh requests indicated by the refresh count register (RFCR) has exceeded the number specified
  15627. by the LMTS bit in RTCSR.
  15628.  
  15629. Bit 2: OVF Description
  15630.  
  15631. 0 RFCR has not overflowed the count limit indicated by LMTS (Initial value)
  15632.  
  15633. [Clearing condition]
  15634. When 0 is written to OVF
  15635.  
  15636. 1 RFCR has overflowed the count limit indicated by LMTS
  15637.  
  15638. [Setting condition]
  15639. When RFCR overflows the count limit set by LMTS*
  15640.  
  15641. Note: * If 1 is written, the original value is retained.
  15642.  
  15643. Bit 1—Refresh Count Overflow Interrupt Enable (OVIE): Controls generation or
  15644. suppression of an interrupt request when the OVF flag is set to 1 in RTCSR.
  15645.  
  15646. Bit 1: OVIE Description
  15647.  
  15648. 0 Interrupt requests initiated by OVF are disabled (Initial value)
  15649.  
  15650. 1 Interrupt requests initiated by OVF are enabled
  15651.  
  15652. 304
  15653.  
  15654. ----------------------- Page 321-----------------------
  15655.  
  15656. Bit 0—Refresh Count Overflow Limit Select (LMTS): Specifies the count limit to be
  15657. compared with the refresh count indicated by the refresh count register (RFCR). If the RFCR
  15658. register value exceeds the value specified by LMTS, the OVF flag is set.
  15659.  
  15660. Bit 0: LMTS Description
  15661.  
  15662. 0 Count limit is 1024 (Initial value)
  15663.  
  15664. 1 Count limit is 512
  15665.  
  15666. 1 3 . 2 . 1 0 Refresh Timer Counter (RTCNT)
  15667.  
  15668. The refresh timer counter (RTCNT) is an 8-bit readable/writable counter that is incremented by the
  15669. input clock (selected by bits CKS2–CKS0 in the RTCSR register). When the RTCNT counter
  15670. value matches the RTCOR register value, the CMF bit is set in the RTCSR register and the
  15671. RTCNT counter is cleared.
  15672.  
  15673. RTCNT is initialized to H'0000 by a power-on reset, but continues to count when a manual reset
  15674. is performed. In standby mode, RTCNT is not initialized, and retains its contents.
  15675.  
  15676. Bit: 15 14 13 12 11 10 9 8
  15677.  
  15678. Bit name: — — — — — — — —
  15679.  
  15680. Initial value: 0 0 0 0 0 0 0 0
  15681.  
  15682. R/W: — — — — — — — —
  15683.  
  15684. Bit: 7 6 5 4 3 2 1 0
  15685.  
  15686. Bit name:
  15687.  
  15688. Initial value: 0 0 0 0 0 0 0 0
  15689.  
  15690. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15691.  
  15692. 1 3 . 2 . 1 1 Refresh Time Constant Register (RTCOR)
  15693.  
  15694. The refresh time constant register (RTCOR) is a readable/writable register that specifies the upper
  15695. limit of the RTCNT counter. The RTCOR register and RTCNT counter values (lower 8 bits) are
  15696. constantly compared, and when they match the CMF bit is set in the RTCSR register and the
  15697. RTCNT counter is cleared to 0. If the refresh bit (RFSH) has been set to 1 in the memory control
  15698. register (MCR) and CAS-before-RAS has been selected as the refresh mode, a memory refresh
  15699. cycle is generated when the CMF bit is set.
  15700.  
  15701. 305
  15702.  
  15703. ----------------------- Page 322-----------------------
  15704.  
  15705. RTCOR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its
  15706. contents, in a manual reset and in standby mode.
  15707.  
  15708. Bit: 15 14 13 12 11 10 9 8
  15709.  
  15710. Bit name: — — — — — — — —
  15711.  
  15712. Initial value: 0 0 0 0 0 0 0 0
  15713.  
  15714. R/W: — — — — — — — —
  15715.  
  15716. Bit: 7 6 5 4 3 2 1 0
  15717.  
  15718. Bit name:
  15719.  
  15720. Initial value: 0 0 0 0 0 0 0 0
  15721.  
  15722. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15723.  
  15724. 1 3 . 2 . 1 2 Refresh Count Register (RFCR)
  15725.  
  15726. The refresh count register (RFCR) is a 10-bit readable/writable counter that counts the number of
  15727. refreshes by being incremented each time the RTCOR register and RTCNT counter values match.
  15728. If the RFCR register value exceeds the count limit specified by the LMTS bit in the RTCSR
  15729. register, the OVF flag is set in the RTCSR register and the RFCR register is cleared.
  15730.  
  15731. RFCR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its contents,
  15732. in a manual reset and in standby mode.
  15733.  
  15734. Bit: 15 14 13 12 11 10 9 8
  15735.  
  15736. Bit name: — — — — — —
  15737.  
  15738. Initial value: 0 0 0 0 0 0 0 0
  15739.  
  15740. R/W: — — — — — — R/W R/W
  15741.  
  15742. Bit: 7 6 5 4 3 2 1 0
  15743.  
  15744. Bit name:
  15745.  
  15746. Initial value: 0 0 0 0 0 0 0 0
  15747.  
  15748. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15749.  
  15750. 306
  15751.  
  15752. ----------------------- Page 323-----------------------
  15753.  
  15754. 1 3 . 2 . 1 3 Notes on Accessing Refresh Control Registers
  15755.  
  15756. When the refresh timer control/status register (RTCSR), refresh timer counter (RTCNT), refresh
  15757. time constant register (RTCOR), and refresh count register (RFCR) are written to, a special code is
  15758. added to the data to prevent inadvertent rewriting in the event of program runaway, etc. The
  15759. following procedures should be used for read/write operations.
  15760.  
  15761. Writing to RTCSR, RTCNT, RTCOR, and RFCR: A word transfer instruction must
  15762. always be used when writing to RTCSR, RTCNT, RTCOR, or RFCR. A write cannot be
  15763. performed with a byte transfer instruction.
  15764.  
  15765. When writing to RTCSR, RTCNT, or RTCOR, set B'10100101 in the upper byte and the write
  15766. data in the lower byte, as shown in figure 13.4. When writing to RFCR, set B'101001 in the 6
  15767. bits starting from the MSB in the upper byte, and the write data in the remaining bits.
  15768.  
  15769. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15770. RTCSR,
  15771. RTCNT, 1 0 1 0 0 1 0 1 Write data
  15772. RTCOR
  15773.  
  15774. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15775.  
  15776. 1 0 1 0 0 1 Write data
  15777. RFCR
  15778.  
  15779. Figure 13.4 Writing to RTCSR, RTCNT, RTCOR, and RFCR
  15780.  
  15781. Reading RTCSR, RTCNT, RTCOR, and RFCR: A 16-bit access must always be used
  15782. when reading RTCSR, RTCNT, RTCOR, or RFCR. Undefined bits are read as 0.
  15783.  
  15784. 307
  15785.  
  15786. ----------------------- Page 324-----------------------
  15787.  
  15788. 1 3 . 3 Operation
  15789.  
  15790. 1 3 . 3 . 1 Endian/Access Size and Data Alignment
  15791.  
  15792. The SH7750 supports both big-endian mode, in which the most significant byte (MSByte) is at
  15793. the 0 address end in a string of byte data, and little-endian mode, in which the least significant byte
  15794. (LSByte) is at the 0 address end. The mode is set by means of the MD5 external pin in a power-on
  15795. reset, big-endian mode being set if the MD5 pin is low, and little-endian mode if it is high.
  15796.  
  15797. A data bus width of 8, 16, 32, or 64 bits can be selected for normal memory, 16, 32, or 64 bits for
  15798. DRAM, 32 or 64 bits for synchronous DRAM, and 8 or 16 bits for the PCMCIA interface. Data
  15799. alignment is carried out according to the data bus width and endian mode of each device. Thus, four
  15800. read operations are needed to read longword data from an 8-bit device. In the SH7750, data
  15801. alignment and data length conversion between the different interfaces is performed automatically.
  15802.  
  15803. The relationship between the endian mode, device data length, and access unit, is shown in tables
  15804. 13.6 to 13.13.
  15805.  
  15806. 308
  15807.  
  15808. ----------------------- Page 325-----------------------
  15809.  
  15810. Table 13.6 (1) 64-Bit External Device/Big-Endian Access and Data
  15811. Alignment
  15812.  
  15813. Data Bus
  15814.  
  15815. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  15816.  
  15817. Byte, Adr=8n 1 Data — — — — — — —
  15818. 7–0
  15819.  
  15820. Byte, Adr=8n+1 1 — Data — — — — — —
  15821. 7–0
  15822.  
  15823. Byte, Adr=8n+2 1 — — Data — — — — —
  15824. 7–0
  15825.  
  15826. Byte, Adr=8n+3 1 — — — Data — — — —
  15827. 7–0
  15828.  
  15829. Byte, Adr=8n+4 1 — — — — Data — — —
  15830. 7–0
  15831.  
  15832. Byte, Adr=8n+5 1 — — — — — Data — —
  15833. 7–0
  15834.  
  15835. Byte, Adr=8n+6 1 — — — — — — Data —
  15836. 7–0
  15837.  
  15838. Byte, Adr=8n+7 1 — — — — — — — Data
  15839. 7–0
  15840.  
  15841. Word, Adr=8n 1 Data Data — — — — — —
  15842. 15–8 7–0
  15843.  
  15844. Word, Adr=8n+2 1 — — Data Data — — — —
  15845. 15–8 7–0
  15846.  
  15847. Word, Adr=8n+4 1 — — — — Data Data — —
  15848. 15–8 7–0
  15849.  
  15850. Word, Adr=8n+6 1 — — — — — — Data Data
  15851. 15–8 7–0
  15852.  
  15853. Longword, 1 Data Data Data Data — — — —
  15854. Adr=8n 31–24 23–16 15–8 7–0
  15855.  
  15856. Longword, 1 — — — — Data Data Data Data
  15857. Adr=8n+4 31–24 23–16 15–8 7–0
  15858.  
  15859. Quadword, 1 Data Data Data Data Data Data Data Data
  15860. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  15861.  
  15862. 309
  15863.  
  15864. ----------------------- Page 326-----------------------
  15865.  
  15866. Table 13.6 (2) 64-Bit External Device/Big-Endian Access and Data
  15867. Alignment
  15868.  
  15869. Strobe Signals
  15870.  
  15871. WE7, WE6, WE5, WE4, WE3, WE2, WE1, WE0,
  15872. CAS7 , CAS6 , CAS5 , CAS4 , CAS3 , CAS2 , CAS1 , CAS0 ,
  15873. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  15874.  
  15875. Byte, Adr=8n 1 Asserted
  15876.  
  15877. Byte, Adr=8n+1 1 Asserted
  15878.  
  15879. Byte, Adr=8n+2 1 Asserted
  15880.  
  15881. Byte, Adr=8n+3 1 Asserted
  15882.  
  15883. Byte, Adr=8n+4 1 Asserted
  15884.  
  15885. Byte, Adr=8n+5 1 Asserted
  15886.  
  15887. Byte, Adr=8n+6 1 Asserted
  15888.  
  15889. Byte, Adr=8n+7 1 Asserted
  15890.  
  15891. Word, Adr=8n 1 Asserted Asserted
  15892.  
  15893. Word, Adr=8n+2 1 AssertedAsserted
  15894.  
  15895. Word, Adr=8n+4 1 Asserted Asserted
  15896.  
  15897. Word, Adr=8n+6 1 AssertedAsserted
  15898.  
  15899. Longword, 1 Asserted Asserted AssertedAsserted
  15900. Adr=8n
  15901.  
  15902. Longword, 1 Asserted Asserted AssertedAsserted
  15903. Adr=8n+4
  15904.  
  15905. Quadword, 1 Asserted Asserted AssertedAsserted Asserted Asserted AssertedAsserted
  15906. Adr=8n
  15907.  
  15908. 310
  15909.  
  15910. ----------------------- Page 327-----------------------
  15911.  
  15912. Table 13.732-Bit External Device/Big-Endian Access and Data Alignment
  15913.  
  15914. Data Bus Strobe Signals
  15915.  
  15916. WE3, WE2, WE1, WE0,
  15917. CAS3 , CAS2 , CAS1 , CAS0 ,
  15918. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15919.  
  15920. Byte, Adr=4n 1 Data — — — Asserted
  15921. 7–0
  15922.  
  15923. Byte, Adr=4n+1 1 — Data — — Asserted
  15924. 7–0
  15925.  
  15926. Byte, Adr=4n+2 1 — — Data — Asserted
  15927. 7–0
  15928.  
  15929. Byte, Adr=4n+3 1 — — — Data Asserted
  15930. 7–0
  15931.  
  15932. Word, Adr=4n 1 Data Data — — Asserted Asserted
  15933. 15–8 7–0
  15934.  
  15935. Word, Adr=4n+2 1 — — Data Data Asserted Asserted
  15936. 15–8 7–0
  15937.  
  15938. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15939. Adr=4n 31–24 23–16 15–8 7–0
  15940.  
  15941. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15942. 63–56 55–48 47–40 39–32
  15943.  
  15944. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  15945. 31–24 23–16 15–8 7–0
  15946.  
  15947. 311
  15948.  
  15949. ----------------------- Page 328-----------------------
  15950.  
  15951. Table 13.816-Bit External Device/Big-Endian Access and Data Alignment
  15952.  
  15953. Data Bus Strobe Signals
  15954.  
  15955. WE3, WE2, WE1, WE0,
  15956. CAS3 , CAS2 , CAS1 , CAS0 ,
  15957. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15958.  
  15959. Byte, Adr=2n 1 — — Data — Asserted
  15960. 7–0
  15961.  
  15962. Byte, Adr=2n+1 1 — — — Data Asserted
  15963. 7–0
  15964.  
  15965. Word 1 — — Data Data Asserted Asserted
  15966. 15–8 7–0
  15967.  
  15968. Longword 1 — — Data Data Asserted Asserted
  15969. 31–24 23–16
  15970.  
  15971. 2 — — Data Data Asserted Asserted
  15972. 15–8 7–0
  15973.  
  15974. Quadword 1 — — Data Data Asserted Asserted
  15975. 63–56 55–48
  15976.  
  15977. 2 — — Data Data Asserted Asserted
  15978. 47–40 39–32
  15979.  
  15980. 3 — — Data Data Asserted Asserted
  15981. 31–24 23–16
  15982.  
  15983. 4 — — Data Data Asserted Asserted
  15984. 15–8 7–0
  15985.  
  15986. 312
  15987.  
  15988. ----------------------- Page 329-----------------------
  15989.  
  15990. Table 13.98-Bit External Device/Big-Endian Access and Data Alignment
  15991.  
  15992. Data Bus Strobe Signals
  15993.  
  15994. WE3, WE2, WE1, WE0,
  15995. CAS3 , CAS2 , CAS1 , CAS0 ,
  15996. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15997.  
  15998. Byte 1 — — — Data Asserted
  15999. 7–0
  16000.  
  16001. Word 1 — — — Data Asserted
  16002. 15–8
  16003.  
  16004. 2 — — — Data Asserted
  16005. 7–0
  16006.  
  16007. Longword 1 — — — Data Asserted
  16008. 31–24
  16009.  
  16010. 2 — — — Data Asserted
  16011. 23–16
  16012.  
  16013. 3 — — — Data Asserted
  16014. 15–8
  16015.  
  16016. 4 — — — Data Asserted
  16017. 7–0
  16018.  
  16019. Quadword 1 — — — Data Asserted
  16020. 63–56
  16021.  
  16022. 2 — — — Data Asserted
  16023. 55–48
  16024.  
  16025. 3 — — — Data Asserted
  16026. 47–40
  16027.  
  16028. 4 — — — Data Asserted
  16029. 39–32
  16030.  
  16031. 5 — — — Data Asserted
  16032. 31–24
  16033.  
  16034. 6 — — — Data Asserted
  16035. 23–16
  16036.  
  16037. 7 — — — Data Asserted
  16038. 15–8
  16039.  
  16040. 8 — — — Data Asserted
  16041. 7–0
  16042.  
  16043. 313
  16044.  
  16045. ----------------------- Page 330-----------------------
  16046.  
  16047. Table 13.10 (1) 64-Bit External Device/Little-Endian Access and Data
  16048. Alignment
  16049.  
  16050. Data Bus
  16051.  
  16052. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  16053.  
  16054. Byte, Adr=8n 1 — — — — — — — Data
  16055. 7–0
  16056.  
  16057. Byte, Adr=8n+1 1 — — — — — — Data —
  16058. 7–0
  16059.  
  16060. Byte, Adr=8n+2 1 — — — — — Data — —
  16061. 7–0
  16062.  
  16063. Byte, Adr=8n+3 1 — — — — Data — — —
  16064. 7–0
  16065.  
  16066. Byte, Adr=8n+4 1 — — — Data — — — —
  16067. 7–0
  16068.  
  16069. Byte, Adr=8n+5 1 — — Data — — — — —
  16070. 7–0
  16071.  
  16072. Byte, Adr=8n+6 1 — Data — — — — — —
  16073. 7–0
  16074.  
  16075. Byte, Adr=8n+7 1 Data — — — — — — —
  16076. 7–0
  16077.  
  16078. Word, Adr=8n 1 — — — — — — Data Data
  16079. 15–8 7–0
  16080.  
  16081. Word, Adr=8n+2 1 — — Data Data — —
  16082. 15–8 7–0
  16083.  
  16084. Word, Adr=8n+4 1 — — Data Data — — — —
  16085. 15–8 7–0
  16086.  
  16087. Word, Adr=8n+6 1 Data Data — — — — — —
  16088. 15–8 7–0
  16089.  
  16090. Longword, 1 — — — — Data Data Data Data
  16091. Adr=8n 31–24 23–16 15–8 7–0
  16092.  
  16093. Longword, 1 Data Data Data Data — — — —
  16094. Adr=8n+4 31–24 23–16 15–8 7–0
  16095.  
  16096. Quadword, 1 Data Data Data Data Data Data Data Data
  16097. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  16098.  
  16099. 314
  16100.  
  16101. ----------------------- Page 331-----------------------
  16102.  
  16103. Table 13.10 (2) 64-Bit External Device/Little-Endian Access and Data
  16104. Alignment
  16105.  
  16106. Strobe Signals
  16107.  
  16108. WE7, WE6, WE5, WE4, WE3, WE2, WE1, WE0,
  16109. CAS7 , CAS6 , CAS5 , CAS4 , CAS3 , CAS2 , CAS1 , CAS0 ,
  16110. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  16111.  
  16112. Byte, Adr=8n 1 Asserted
  16113.  
  16114. Byte, Adr=8n+1 1 Asserted
  16115.  
  16116. Byte, Adr=8n+2 1 Asserted
  16117.  
  16118. Byte, Adr=8n+3 1 Asserted
  16119.  
  16120. Byte, Adr=8n+4 1 Asserted
  16121.  
  16122. Byte, Adr=8n+5 1 Asserted
  16123.  
  16124. Byte, Adr=8n+6 1 Asserted
  16125.  
  16126. Byte, Adr=8n+7 1 Asserted
  16127.  
  16128. Word, Adr=8n 1 Asserted Asserted
  16129.  
  16130. Word, Adr=8n+2 1 Asserted Asserted
  16131.  
  16132. Word, Adr=8n+4 1 Asserted Asserted
  16133.  
  16134. Word, Adr=8n+6 1 Asserted Asserted
  16135.  
  16136. Longword, 1 Asserted Asserted Asserted Asserted
  16137. Adr=8n
  16138.  
  16139. Longword, 1 Asserted Asserted Asserted Asserted
  16140. Adr=8n+4
  16141.  
  16142. Quadword, 1 Asserted Asserted Asserted Asserted Asserted Asserted Asserted Asserted
  16143. Adr=8n
  16144.  
  16145. 315
  16146.  
  16147. ----------------------- Page 332-----------------------
  16148.  
  16149. Table 13.11 32-Bit External Device/Little-Endian Access and Data Alignment
  16150.  
  16151. Data Bus Strobe Signals
  16152.  
  16153. WE3, WE2, WE1, WE0,
  16154. CAS3 , CAS2 , CAS1 , CAS0 ,
  16155. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  16156.  
  16157. Byte, Adr=4n 1 — — Data Asserted
  16158. 7–0
  16159.  
  16160. Byte, Adr=4n+1 1 — — Data — Asserted
  16161. 7–0
  16162.  
  16163. Byte, Adr=4n+2 1 — Data — — Asserted
  16164. 7–0
  16165.  
  16166. Byte, Adr=4n+3 1 Data — — — Asserted
  16167. 7–0
  16168.  
  16169. Word, Adr=4n 1 — — Data Data Asserted Asserted
  16170. 15–8 7–0
  16171.  
  16172. Word, Adr=4n+2 1 Data Data — — Asserted Asserted
  16173. 15–8 7–0
  16174.  
  16175. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  16176. Adr=4n 31–24 23–16 15–8 7–0
  16177.  
  16178. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  16179. 31–24 23–16 15–8 7–0
  16180.  
  16181. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  16182. 63–56 55–48 47–40 39–32
  16183.  
  16184. 316
  16185.  
  16186. ----------------------- Page 333-----------------------
  16187.  
  16188. Table 13.12 16-Bit External Device/Little-Endian Access and Data Alignment
  16189.  
  16190. Data Bus Strobe Signals
  16191.  
  16192. WE3, WE2, WE1, WE0,
  16193. CAS3 , CAS2 , CAS1 , CAS0 ,
  16194. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  16195.  
  16196. Byte, Adr=2n 1 — — — Data Asserted
  16197. 7–0
  16198.  
  16199. Byte, Adr=2n+1 1 — — Data — Asserted
  16200. 7–0
  16201.  
  16202. Word 1 — — Data Data Asserted Asserted
  16203. 15–8 7–0
  16204.  
  16205. Longword 1 — — Data Data Asserted Asserted
  16206. 15–8 7–0
  16207.  
  16208. 2 — — Data Data Asserted Asserted
  16209. 31–24 23–16
  16210.  
  16211. Quadword 1 — — Data Data Asserted Asserted
  16212. 15–8 7–0
  16213.  
  16214. 2 — — Data Data Asserted Asserted
  16215. 31–24 23–16
  16216.  
  16217. 3 — — Data Data Asserted Asserted
  16218. 47–40 39–32
  16219.  
  16220. 4 — — Data Data Asserted Asserted
  16221. 63–56 55–48
  16222.  
  16223. 317
  16224.  
  16225. ----------------------- Page 334-----------------------
  16226.  
  16227. Table 13.13 8-Bit External Device/Little-Endian Access and Data Alignment
  16228.  
  16229. Data Bus Strobe Signals
  16230.  
  16231. WE3, WE2, WE1, WE0,
  16232. CAS3 , CAS2 , CAS1 , CAS0 ,
  16233. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  16234.  
  16235. Byte 1 — — — Data Asserted
  16236. 7–0
  16237.  
  16238. Word 1 — — — Data Asserted
  16239. 7–0
  16240.  
  16241. 2 — — — Data Asserted
  16242. 15–8
  16243.  
  16244. Longword 1 — — — Data Asserted
  16245. 7–0
  16246.  
  16247. 2 — — — Data Asserted
  16248. 15–8
  16249.  
  16250. 3 — — — Data Asserted
  16251. 23–16
  16252.  
  16253. 4 — — — Data Asserted
  16254. 31–24
  16255.  
  16256. Quadword 1 — — — Data Asserted
  16257. 7–0
  16258.  
  16259. 2 — — — Data Asserted
  16260. 15–8
  16261.  
  16262. 3 — — — Data Asserted
  16263. 23–16
  16264.  
  16265. 4 — — — Data Asserted
  16266. 31–24
  16267.  
  16268. 5 — — — Data Asserted
  16269. 39–32
  16270.  
  16271. 6 — — — Data Asserted
  16272. 47–40
  16273.  
  16274. 7 — — — Data Asserted
  16275. 55–48
  16276.  
  16277. 8 — — — Data Asserted
  16278. 63–56
  16279.  
  16280. 1 3 . 3 . 2 Areas
  16281.  
  16282. Area 0: For area 0, physical address bits A28 to A26 are 000.
  16283.  
  16284. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function, can
  16285. be connected to this space.
  16286.  
  16287. 318
  16288.  
  16289. ----------------------- Page 335-----------------------
  16290.  
  16291. A bus width of 8, 16, 32, or 64 bits can be selected in a power-on reset by means of external pins
  16292. MD3 and MD4. For details, see Memory Bus Width in section 13.1.5.
  16293.  
  16294. When area 0 space is accessed, the CS0 signal is asserted. In addition, the RD signal, which can be
  16295. used as OE, and write control signals WE0 to WE7 , are asserted.
  16296.  
  16297. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A0W2 to A0W0
  16298. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16299. of the external wait pin (RDY ).
  16300.  
  16301. When the burst function is used, the number of burst cycle transfer states is determined in the
  16302. range 2 to 9 according to the number of waits.
  16303.  
  16304. Area 1: For area 1, physical address bits A28 to A26 are 001.
  16305.  
  16306. Only normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to
  16307. this space.
  16308.  
  16309. A bus width of 8, 16, 32, or 64 bits can be selected with bits A1SZ1 and A1SZ0 in the BCR2
  16310. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  16311. A1SZ1 and A1SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  16312. width of 16, 32, or 64 bits.
  16313.  
  16314. When area 1 space is accessed, the CS1 signal is asserted. In addition, the RD signal, which can be
  16315. used as OE, and write control signals WE0 to WE7 , are asserted.
  16316.  
  16317. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A1W2 to A1W0
  16318. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16319. of the external wait pin (RDY ).
  16320.  
  16321. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16322. and 0–3 cycles, respectively, by means of bit A1S0 and bits A1H1 and A1H0 in the WCR3
  16323. register.
  16324.  
  16325. Area 2: For area 2, physical address bits A28 to A26 are 010.
  16326.  
  16327. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM, can
  16328. be connected to this space.
  16329.  
  16330. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16331. A2SZ1 and A2SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  16332. should be selected with bits A2SZ1 and A2SZ0 in the BCR2 register. When synchronous DRAM
  16333. is connected, select 32 or 64 bits with the SZ bits in the MCR register. When DRAM is
  16334. connected to area 2, select a bus width of 16 or 32 bits with the SZ bits in MCR. For details, see
  16335. Memory Bus Width in section 13.1.5.
  16336.  
  16337. 319
  16338.  
  16339. ----------------------- Page 336-----------------------
  16340.  
  16341. When area 2 space is accessed, the CS2 signal is asserted.
  16342.  
  16343. When normal memory is connected, the RD signal, which can be used as OE, and write control
  16344. signals WE0 to WE7 , are asserted.
  16345.  
  16346. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A2W2 to A2W0
  16347. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16348. of the external wait pin (RDY ).
  16349.  
  16350. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16351. and 0–3 cycles, respectively, by means of bit A2S0 and bits A2H1 and A2H0 in the WCR3
  16352. register.
  16353.  
  16354. When synchronous DRAM is connected, the RAS and CAS signals, RD/WR signal, and byte
  16355. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed.RAS, CAS,
  16356. and data timing control, and address multiplexing control, can be set using the MCR register.
  16357.  
  16358. When DRAM is connected, the RAS2 signal, CAS4 to CAS7 signals, and RD/WR signal are
  16359. asserted, and address multiplexing is performed. RAS2, CAS, and data timing control, and address
  16360. multiplexing control, can be set using the MCR register.
  16361.  
  16362. Area 3: For area 3, physical address bits A28 to A26 are 011.
  16363.  
  16364. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM, can
  16365. be connected to this space.
  16366.  
  16367. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16368. A3SZ1 and A3SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  16369. should be selected with bits A3SZ1 and A3SZ0 in the BCR2 register. When DRAM is connected,
  16370. 16, 32, or 64 bits can be selected with the SZ bits in the MCR register. When synchronous
  16371. DRAM is connected, select 32 or 64 bits with the SZ bits in MCR. For details, see Memory Bus
  16372. Width in section 13.1.5.
  16373.  
  16374. When area 3 space is accessed, the CS3 signal is asserted.
  16375.  
  16376. When normal memory is connected, the RD signal, which can be used as OE, and write control
  16377. signals WE0 to WE7 , are asserted.
  16378.  
  16379. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A3W2 to A3W0
  16380. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16381. of the external wait pin (RDY ).
  16382.  
  16383. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16384. and 0–3 cycles, respectively, by means of bit A3S0 and bits A3H1 and A3H0 in the WCR3
  16385. register.
  16386.  
  16387. 320
  16388.  
  16389. ----------------------- Page 337-----------------------
  16390.  
  16391. When synchronous DRAM is connected, the RAS and CAS signals, RD/WR signal, and byte
  16392. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed. When
  16393. DRAM is connected, the RAS signal, CAS0 to CAS7 signals, and RD/WR signal are asserted,
  16394. and address multiplexing is performed. RAS, CAS, and data timing control, and address
  16395. multiplexing control, can be set using the MCR register.
  16396.  
  16397. Area 4: For area 4, physical address bits A28 to A26 are 100.
  16398.  
  16399. Normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to this
  16400. space.
  16401.  
  16402. A bus width of 8, 16, 32, or 64 bits can be selected with bits A4SZ1 and A4SZ0 in the BCR2
  16403. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  16404. A4SZ1 and A4SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  16405. width of 16, 32, or 64 bits. For details, see Memory Bus Width in section 13.1.5.
  16406.  
  16407. When area 4 space is accessed, the CS4 signal is asserted, and the RD signal, which can be used as
  16408. OE, and write control signals WE0 to WE7 , are also asserted.
  16409.  
  16410. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A4W2 to A4W0
  16411. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16412. of the external wait pin (RDY ).
  16413.  
  16414. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16415. and 0–3 cycles, respectively, by means of bit A4S0 and bits A4H1 and A4H0 in the WCR3
  16416. register.
  16417.  
  16418. Area 5: For area 5, physical address bits A28 to A26 are 101.
  16419.  
  16420. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function, and
  16421. a PCMCIA interface, can be connected to this space.
  16422.  
  16423. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16424. A5SZ1 and A5SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  16425. 32 bits can be selected with bits A5SZ1 and A5SZ0 in BCR2. When MPX is connected, a bus
  16426. width of 32 or 64 bits should be selected with bits A5SZ1 and A5SZ0 in BCR2. When a
  16427. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A5SZ1 and
  16428. A5SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  16429.  
  16430. When area 5 space is accessed with normal memory connected, the CS5 signal is asserted. In
  16431. addition, the RD signal, which can be used as OE, and write control signals WE0 to WE7 , are
  16432. asserted. When a PCMCIA interface is connected, the CE1A and CE2A signals, the RD signal,
  16433. which can be used as OE, and the WE1 , WE2 , WE3 , and WE7 signals, which can be used as WE ,
  16434. ICIORD, ICIOWR , and REG, respectively, are asserted.
  16435.  
  16436. 321
  16437.  
  16438. ----------------------- Page 338-----------------------
  16439.  
  16440. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A5W2 to A5W0
  16441. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16442. of the external wait pin (RDY ).
  16443.  
  16444. When the burst function is used, the number of burst cycle transfer states is determined in the
  16445. range 2 to 9 according to the number of waits.
  16446.  
  16447. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16448. and 0–3 cycles, respectively, by means of bit A5S0 and bits A5H1 and A5H0 in the WCR3
  16449. register.
  16450.  
  16451. When a PCMCIA interface is used, the address/CE1A/CE2A setup and hold times with respect to
  16452. the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A5TED1 and
  16453. A5TED0, and bits A5TEH1 and A5TEH0, in the PCR register. In addition, the number of wait
  16454. cycles can be set in the range 0 to 50 with bits A5PCW1 and A5PCW0. The number of waits set
  16455. in PCR is added to the number of waits set in WCR2.
  16456.  
  16457. Area 6: For area 6, physical address bits A28 to A26 are 110.
  16458.  
  16459. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function, and
  16460. a PCMCIA interface, can be connected to this space.
  16461.  
  16462. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16463. A6SZ1 and A6SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  16464. 32 bits can be selected with bits A6SZ1 and A6SZ0 in BCR2. When MPX is connected, a bus
  16465. width of 32 or 64 bits should be selected with bits A6SZ1 and A6SZ0 in BCR2. When a
  16466. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A6SZ1 and
  16467. A6SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  16468.  
  16469. When area 6 space is accessed with normal memory connected, the CS6 signal is asserted. In
  16470. addition, the RD signal, which can be used as OE, and write control signals WE0 to WE7 , are
  16471. asserted. When a PCMCIA interface is connected, the CE1B and CE2B signals, the RD signal,
  16472. which can be used as OE, and the WE1 , WE2 , WE3 , and WE7 signals, which can be used as WE ,
  16473. ICIORD, ICIOWR , and REG, respectively, are asserted.
  16474.  
  16475. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A6W2 to A6W0
  16476. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16477. of the external wait pin (RDY ).
  16478.  
  16479. When the burst function is used, the number of burst cycle transfer states is determined in the
  16480. range 2 to 9 according to the number of waits.
  16481.  
  16482. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16483. and 0–3 cycles, respectively, by means of bit A6S0 and bits A6H1 and A6H0 in the WCR3
  16484. register.
  16485.  
  16486. 322
  16487.  
  16488. ----------------------- Page 339-----------------------
  16489.  
  16490. When a PCMCIA interface is used, the address/CE1B /CE2B setup and hold times with respect to
  16491. the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A6TED1 and
  16492. A6TED0, and bits A6TEH1 and A6TEH0, in the PCR register. In addition, the number of wait
  16493. cycles can be set in the range 0 to 50 with bits A6PCW1 and A6PCW0. The number of waits set
  16494. in PCR is added to the number of waits set in WCR2.
  16495.  
  16496. 1 3 . 3 . 3 Basic Interface
  16497.  
  16498. Basic Timing: The basic interface of the SH7750 uses strobe signal output in consideration of
  16499. the fact that mainly SRAM will be directly connected. Figure 13.5 shows the basic timing of
  16500. normal space accesses. A no-wait normal access is completed in two cycles. The BS signal is
  16501. asserted for one cycle to indicate the start of a bus cycle. The CSn signal is asserted on the T1
  16502. rising edge, and negated on the next T2 clock rising edge. Therefore, there is no negation period in
  16503. case of access at minimum pitch.
  16504.  
  16505. There is no access size specification when reading. The correct access start address is output in the
  16506. least significant bit of the address, but since there is no access size specification, 32 bits are always
  16507. read in the case of a 32-bit device, and 16 bits in the case of a 16-bit device. When writing, only
  16508. the WE signal for the byte to be written is asserted. For details, see section 13.3.1, Endian/Access
  16509. Size and Data Alignment.
  16510.  
  16511. Read/write operations for cache fill or copy-back follow the set bus width and transfer a total of 32
  16512. bytes consecutively. The first access is performed on the data for which there was an access request,
  16513. and the remaining accesses are performed on the data at the 32-byte boundary. The bus is not
  16514. released during this transfer.
  16515.  
  16516. 323
  16517.  
  16518. ----------------------- Page 340-----------------------
  16519.  
  16520.  
  16521. T1 T2
  16522.  
  16523. CKIO
  16524.  
  16525. A25–A0
  16526.  
  16527. CSn
  16528.  
  16529. RD/WR
  16530.  
  16531. RD
  16532.  
  16533. D63–D0
  16534. (read)
  16535.  
  16536. WEn
  16537.  
  16538. D63–D0
  16539. (write)
  16540.  
  16541. BS
  16542.  
  16543. RDY
  16544.  
  16545. DACKn
  16546. (SA: IO ← memory)
  16547.  
  16548. DACKn
  16549. (SA: IO → memory)
  16550.  
  16551. DACKn
  16552. (DA)
  16553.  
  16554. SA: Single address DMA
  16555. DA: Dual address DMA
  16556.  
  16557.  
  16558. Figure 13.5 Basic Timing of Basic Interface
  16559.  
  16560. 324
  16561.  
  16562. ----------------------- Page 341-----------------------
  16563.  
  16564. Figures 13.6, 13.7, 13.8, and 13.9 show examples of connection to 64-, 32-, 16-, and 8-bit data
  16565. width SRAM.
  16566.  
  16567. 128K × 8-bit
  16568. SH7750 SRAM
  16569.  
  16570. A19–A3 A16–A0
  16571. CSn CS
  16572. RD OE
  16573. D63–D56 I/O7–I/O0
  16574. WE7 WE
  16575.  
  16576. A16–A0
  16577. CS
  16578. OE
  16579. D55–D48 I/O7–I/O0
  16580. WE6 WE
  16581.  
  16582. A16–A0
  16583. CS
  16584. OE
  16585. D47–D40 I/O7–I/O0
  16586. WE5 WE
  16587.  
  16588. A16–A0
  16589. CS
  16590. OE
  16591. D39–D32 I/O7–I/O0
  16592. WE4 WE
  16593.  
  16594. A16–A0
  16595. CS
  16596. OE
  16597. D31–D24 I/O7–I/O0
  16598. WE3 WE
  16599.  
  16600. A16–A0
  16601. CS
  16602. OE
  16603. D23–D16 I/O7–I/O0
  16604. WE2 WE
  16605.  
  16606. A16–A0
  16607. CS
  16608. OE
  16609. D15–D8 I/O7–I/O0
  16610. WE1 WE
  16611.  
  16612. A16–A0
  16613. CS
  16614. OE
  16615. D7–D0 I/O7–I/O0
  16616. WE0 WE
  16617.  
  16618. Figure 13.6 Example of 64-Bit Data Width SRAM Connection
  16619.  
  16620. 325
  16621.  
  16622. ----------------------- Page 342-----------------------
  16623.  
  16624. 128K × 8-bit
  16625. SH7750 SRAM
  16626.  
  16627. A18 A16
  16628.  
  16629. • •
  16630. • •
  16631. • •
  16632. • •
  16633. • •
  16634. • •
  16635. • •
  16636. • •
  16637. A2 A0
  16638. CSn CS
  16639. RD OE
  16640. D31 I/O7
  16641.  
  16642. • • • •
  16643. • • • •
  16644. • • •
  16645. • • • •
  16646.  
  16647. D24 I/O0
  16648. WE3 WE
  16649. D23
  16650.  
  16651.  
  16652. D16 A16
  16653.  
  16654. • •
  16655. WE2 • •
  16656. • •
  16657. D15 • •
  16658. A0
  16659. • • CS
  16660. D8 OE
  16661. WE1 I/O7
  16662.  
  16663. • •
  16664. D7 • •
  16665. • •
  16666.  
  16667. • • • •
  16668. • • I/O0
  16669. D0 WE
  16670. WE0
  16671.  
  16672. A16
  16673.  
  16674. A0
  16675. CS
  16676. OE
  16677. I/O7
  16678. • •
  16679. • •
  16680. • •
  16681.  
  16682. • •
  16683.  
  16684. I/O0
  16685. WE
  16686.  
  16687. A16
  16688.  
  16689. A0
  16690. CS
  16691. OE
  16692. I/O7
  16693.  
  16694. I/O0
  16695. WE
  16696.  
  16697. Figure 13.7 Example of 32-Bit Data Width SRAM Connection
  16698.  
  16699. 326
  16700.  
  16701. ----------------------- Page 343-----------------------
  16702.  
  16703. 128K × 8-bit
  16704. SH7750 SRAM
  16705.  
  16706. A17 A16
  16707.  
  16708.  
  16709. • • •
  16710. • • •
  16711. • • •
  16712. • • •
  16713.  
  16714. A1 A0
  16715. CSn CS
  16716. RD OE
  16717. D15 I/O7
  16718.  
  16719.  
  16720. • •
  16721. • •
  16722. • •
  16723. • •
  16724.  
  16725. D8 I/O0
  16726. WE1 WE
  16727. D7
  16728.  
  16729. • •
  16730. • •
  16731. • •
  16732. • •
  16733.  
  16734. D0 A16
  16735.  
  16736.  
  16737. WE0 •
  16738.  
  16739. A0
  16740. CS
  16741. OE
  16742. I/O7
  16743.  
  16744.  
  16745.  
  16746. I/O0
  16747. WE
  16748.  
  16749. Figure 13.8 Example of 16-Bit Data Width SRAM Connection
  16750.  
  16751. 327
  16752.  
  16753. ----------------------- Page 344-----------------------
  16754.  
  16755. 128K × 8-bit
  16756. SH7750 SRAM
  16757.  
  16758. A16 A16
  16759.  
  16760. • • • •
  16761. • • • •
  16762. • • • •
  16763.  
  16764. • • • •
  16765.  
  16766. A0 A0
  16767. CSn CS
  16768. RD OE
  16769. D7 I/O7
  16770.  
  16771. • • • •
  16772. • • • •
  16773. • •
  16774. • •
  16775. • • • •
  16776.  
  16777. D0 I/O0
  16778. WE0 WE
  16779.  
  16780. Figure 13.9 Example of 8-Bit Data Width SRAM Connection
  16781.  
  16782. Wait State Control: Wait state insertion on the basic interface can be controlled by the WCR2
  16783. settings. If the WCR2 wait specification bits corresponding to a particular area are not zero, a
  16784. software wait is inserted in accordance with that specification. For details, see section 13.2.4, Wait
  16785. Control Register 2 (WCR2).
  16786.  
  16787. The specified number of Tw cycles are inserted as wait cycles using the basic interface wait timing
  16788. shown in figure 13.10.
  16789.  
  16790. 328
  16791.  
  16792. ----------------------- Page 345-----------------------
  16793.  
  16794. T1
  16795. Tw T2
  16796.  
  16797. CKIO
  16798.  
  16799. A25–A0
  16800.  
  16801. CSn
  16802.  
  16803. RD/WR
  16804.  
  16805. RD
  16806.  
  16807. D63–D0
  16808. (read)
  16809.  
  16810. WEn
  16811.  
  16812. D63–D0
  16813. (write)
  16814.  
  16815. BS
  16816.  
  16817. RDY
  16818.  
  16819. DACKn
  16820. (SA: IO ← memory)
  16821.  
  16822. DACKn
  16823. (SA: IO → memory)
  16824.  
  16825. DACKn
  16826. (DA)
  16827.  
  16828. Figure 13.10 Basic Interface Wait Timing (Software Wait Only)
  16829.  
  16830. 329
  16831.  
  16832. ----------------------- Page 346-----------------------
  16833.  
  16834. When software wait insertion is specified by WCR2, the external wait input RDY signal is also
  16835. sampled. RDY signal sampling is shown in figure 13.11. A single-cycle wait is specified as a
  16836. software wait. Sampling is performed at the transition from the Tw state to the T2 state; therefore,
  16837. the RDY signal has no effect if asserted in the T1 cycle or the first Tw cycle. The RDY signal is
  16838. sampled on the rising edge of the clock.
  16839.  
  16840.  
  16841. T1 Tw Twe T2
  16842.  
  16843. CKIO
  16844.  
  16845. A25–A0
  16846.  
  16847. CSn
  16848.  
  16849. RD/WR
  16850.  
  16851. RD
  16852. (read)
  16853.  
  16854. D63–D0
  16855. (read)
  16856.  
  16857. WEn
  16858. (write)
  16859.  
  16860. D63–D0
  16861. (write)
  16862.  
  16863. BS
  16864.  
  16865. RDY
  16866.  
  16867. DACKn
  16868. (SA: IO ← memory)
  16869.  
  16870. DACKn
  16871. (SA: IO → memory)
  16872.  
  16873. DACKn
  16874. (DA)
  16875.  
  16876. Figure 13.11 Basic Interface Wait State Timing (Wait State Insertion by R D Y
  16877. Signal)
  16878.  
  16879. 330
  16880.  
  16881. ----------------------- Page 347-----------------------
  16882.  
  16883. 1 3 . 3 . 4 DRAM Interface
  16884.  
  16885. Direct Connection of DRAM: When the memory type bits (DRAMTP2–0) in BCR1 are set
  16886. to 100, area 3 becomes DRAM space; when set to 101, area 2 and area 3 become DRAM space.
  16887. The DRAM interface function can then be used to connect DRAM directly to the SH7750.
  16888.  
  16889. 16, 32, or 64 bits can be selected as the interface data width for area 3 when bits DRAMTP2–0 are
  16890. set to 100, and 16 or 32 bits can be used for both area 2 and area 3 when bits DRAMTP2–0 are set
  16891. to 101.
  16892.  
  16893. 2-CAS 16-bit DRAMs can be connected, since CAS is used to control byte access.
  16894.  
  16895. Signals used for connection when DRAM is connected to area 3 are RAS, CAS0 to CAS7, and
  16896. RD/WR. CAS2 to CAS7 are not used when the data width is 16 bits. When DRAM is connected
  16897. to areas 2 and 3, the signals for area 2 DRAM connection are RAS2, CAS4 to CAS7, and
  16898. RD/WR, and those for area 3 DRAM connection are RAS, CAS0 to CAS3, and RD/WR.
  16899.  
  16900. In addition to normal read and write access modes, fast page mode is supported for burst access. For
  16901. DRAM connected to areas 2 and 3, EDO mode, which enables the DRAM access time to be
  16902. increased, is supported.
  16903.  
  16904. 331
  16905.  
  16906. ----------------------- Page 348-----------------------
  16907.  
  16908. 1M × 16-bit
  16909. SH7750 DRAM
  16910.  
  16911. A12–A3 A9–A0
  16912. RAS RAS
  16913. CS3 OE
  16914. RD/WR WE
  16915. D63–D48 I/O15–I/O0
  16916. WE7 UCAS
  16917. WE6 LCAS
  16918.  
  16919. A9–A0
  16920. RAS
  16921. OE
  16922. WE
  16923. D47–D32 I/O15–I/O0
  16924. WE5 UCAS
  16925. WE4 LCAS
  16926.  
  16927. A9–A0
  16928. RAS
  16929. OE
  16930. WE
  16931. D31–D16 I/O15–I/O0
  16932. WE3 UCAS
  16933. WE2 LCAS
  16934.  
  16935. A9–A0
  16936. RAS
  16937. OE
  16938. WE
  16939. D15–D0 I/O15–I/O0
  16940. WE1 UCAS
  16941. WE0 LCAS
  16942.  
  16943. Figure 13.12 Example of DRAM Connection (64-Bit Data Width, Area 3)
  16944.  
  16945. 332
  16946.  
  16947. ----------------------- Page 349-----------------------
  16948.  
  16949. 256K × 16-bit
  16950. SH7750 DRAM
  16951.  
  16952. A10 A8
  16953.  
  16954.  
  16955. • • • •
  16956. • • • •
  16957. • •
  16958. • •
  16959. • • • •
  16960. A2 A0
  16961.  
  16962.  
  16963. RAS RAS
  16964. CS3 OE
  16965. RD/WR WE
  16966. D31 I/O15
  16967.  
  16968.  
  16969. • •
  16970. • •
  16971. • •
  16972. • •
  16973. • •
  16974. • •
  16975. • •
  16976. • •
  16977. D16 I/O0
  16978. CAS3 UCAS
  16979. CAS2 LCAS
  16980. D15
  16981.  
  16982. • •
  16983. • •
  16984. • •
  16985.  
  16986. • •
  16987. D0
  16988. A8
  16989.  
  16990. CAS1 • •
  16991. • •
  16992. • •
  16993.  
  16994. CAS0 • •
  16995. A0
  16996.  
  16997.  
  16998. RAS
  16999. OE
  17000. WE
  17001. I/O15
  17002.  
  17003. • •
  17004. • •
  17005. • •
  17006. • •
  17007. I/O0
  17008. UCAS
  17009. LCAS
  17010.  
  17011. Figure 13.13 Example of DRAM Connection (32-Bit Data Width, Area 3)
  17012.  
  17013. 333
  17014.  
  17015. ----------------------- Page 350-----------------------
  17016.  
  17017. 256K × 16-bit
  17018. SH7750 DRAM
  17019.  
  17020. A9 A8
  17021.  
  17022. • • • •
  17023. • • • •
  17024. • • • •
  17025. • • • •
  17026. A1 A0
  17027. CS3
  17028. CS2
  17029. RAS RAS Area 3
  17030.  
  17031. RAS2 OE
  17032. RD/WR WE
  17033. D15 I/O15
  17034.  
  17035. • • • •
  17036. • • • •
  17037. • • • •
  17038. • • • •
  17039. D0 I/O0
  17040. CAS1 UCAS
  17041. CAS0 LCAS
  17042.  
  17043. CAS5
  17044. CAS4
  17045.  
  17046. A8
  17047.  
  17048. • •
  17049. • •
  17050. • •
  17051. • •
  17052. A0
  17053. RAS
  17054. OE
  17055. Area 2
  17056. WE
  17057. I/O15
  17058. • •
  17059. • •
  17060. • •
  17061.  
  17062. • •
  17063. I/O0
  17064. UCAS
  17065. LCAS
  17066.  
  17067. Figure 13.14 Example of DRAM Connection (16-Bit Data Width,
  17068. Areas 2 and 3)
  17069.  
  17070. 334
  17071.  
  17072. ----------------------- Page 351-----------------------
  17073.  
  17074. Address Multiplexing: When area 2 or area 3 is designated as DRAM space, address
  17075. multiplexing is always performed in accesses to DRAM. This enables DRAM, which requires row
  17076. and column address multiplexing, to be connected directly to the SH7750 without using an
  17077. external address multiplexer circuit. Any of the five multiplexing methods shown below can be
  17078. selected, by setting bits AMXEXT and AMX2–0 in MCR for area 2 or 3 DRAM. The relationship
  17079. between the AMXEXT and AMX2–0 bits and address multiplexing is shown in table 13.14. The
  17080. address output pins subject to address multiplexing are A17 to A1. The address signals output by
  17081. pins A25 to A18 are undefined.
  17082.  
  17083. Table 13.14 Relationship between AMXEXT and AMX2–0 Bits and Address
  17084. Multiplexing
  17085.  
  17086. Setting Number External Address Pins
  17087. of Column
  17088. Address
  17089. Bits
  17090.  
  17091. AMXEXT AMX2 AMX1 AMX0 Output Timing A1–A13 A14 A15 A16 A17
  17092.  
  17093. 0 0 0 0 8 bits Column address A1–A13 A14 A15 A16 A17
  17094.  
  17095. Row address A9–A21 A22 A23 A24 A25
  17096.  
  17097. 1 9 bits Column address A1–A13 A14 A15 A16 A17
  17098.  
  17099. Row address A10–A22 A23 A24 A25 A17
  17100.  
  17101. 1 0 10 bits Column address A1–A13 A14 A15 A16 A17
  17102.  
  17103. Row address A11–A23 A24 A25 A16 A17
  17104.  
  17105. 1 11 bits Column address A1–A13 A14 A15 A16 A17
  17106.  
  17107. Row address A12–A24 A25 A15 A16 A17
  17108.  
  17109. 1 0 0 12 bits Column address A1–A13 A14 A15 A16 A17
  17110.  
  17111. Row address A13–A25 A14 A15 A16 A17
  17112.  
  17113. Other settings Reserved — — — — — —
  17114.  
  17115. 335
  17116.  
  17117. ----------------------- Page 352-----------------------
  17118.  
  17119. Basic Timing: The basic timing for DRAM access is 4 cycles. This basic timing is shown in
  17120. figure 13.15. Tpc is the precharge cycle, Tr the RAS assert cycle, Tc1 the CAS assert cycle, and
  17121. Tc2 the read data latch cycle.
  17122.  
  17123.  
  17124. Tr1 Tr2 Tc1 Tc2 Tpc
  17125.  
  17126. CKIO
  17127.  
  17128. A25–A0 Row Column
  17129.  
  17130. CSn
  17131.  
  17132. RD/WR
  17133.  
  17134. RAS
  17135.  
  17136. CAS
  17137.  
  17138. D63–D0
  17139. (read)
  17140.  
  17141. D63–D0
  17142. (write)
  17143.  
  17144. BS
  17145.  
  17146. DACKn
  17147. (SA: IO ← memory)
  17148.  
  17149. DACKn
  17150. (SA: IO → memory)
  17151.  
  17152. Figure 13.15 Basic DRAM Access Timing
  17153.  
  17154. 336
  17155.  
  17156. ----------------------- Page 353-----------------------
  17157.  
  17158. Wait State Control: As the clock frequency increases, it becomes impossible to complete all
  17159. states in one cycle as in basic access. Therefore, provision is made for state extension by using the
  17160. setting bits in WCR2 and MCR. The timing with state extension using these settings is shown in
  17161. figure 13.16. Additional Tpc cycles (cycles used to secure the RAS precharge time) can be inserted
  17162. by means of the TPC bit in MCR, giving from 1 to 7 cycles. The number of cycles from RAS
  17163. assertion to CAS assertion can be set to between 2 and 5 by inserting Trw cycles by means of the
  17164. RCD bit in MCR. Also, the number of cycles from CAS assertion to the end of the access can be
  17165. varied between 1 and 16 according to the setting of A2W2 to A2W0 or A3W2 to A3W0 in WCR2.
  17166.  
  17167.  
  17168. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  17169.  
  17170. CKIO
  17171.  
  17172. A25–A0 Row Column
  17173.  
  17174. CSn
  17175.  
  17176. RD/WR
  17177.  
  17178. RAS
  17179.  
  17180. CAS
  17181.  
  17182. D63–D0
  17183. (read)
  17184.  
  17185. D63–D0
  17186. (write)
  17187.  
  17188. BS
  17189.  
  17190. DACKn
  17191. (SA: IO ← memory)
  17192.  
  17193. DACKn
  17194. (SA: IO → memory)
  17195.  
  17196. Figure 13.16 DRAM Wait State Timing
  17197.  
  17198. 337
  17199.  
  17200. ----------------------- Page 354-----------------------
  17201.  
  17202. Burst Access: In addition to the normal DRAM access mode in which a row address is output in
  17203. each data access, a fast page mode is also provided for the case where consecutive accesses are made
  17204. to the same row. This mode allows fast access to data by outputting the row address only once,
  17205. then changing only the column address for each subsequent access. Normal access or burst access
  17206. using fast page mode can be selected by means of the burst enable (BE) bit in MCR. The timing
  17207. for burst access using fast page mode is shown in figure 13.17.
  17208.  
  17209. In burst transfer, 4 (longword access) or 32 (cache fill or cache write-back) bytes of data are burst-
  17210. transferred in the case of a 16-bit bus size. With a 32-bit bus size, 32 bytes of data are burst-
  17211. transferred (cache fill or cache write-back). In a 32-byte burst transfer (cache fill), the first access
  17212. comprises a longword that includes the data requiring access. The remaining accesses are performed
  17213. on 32-byte boundary data that includes the relevant data. In burst transfer (cache write-back),
  17214. wraparound writing is performed for 32-byte boundary data.
  17215.  
  17216. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tpc
  17217.  
  17218. CKIO
  17219.  
  17220. A25–A0 r c1 c2 c3 c4
  17221.  
  17222. CSn
  17223.  
  17224. RD/WR
  17225.  
  17226. RAS
  17227.  
  17228. CAS
  17229.  
  17230. D63–D0
  17231. d1 d2 d3 d4
  17232. (read)
  17233.  
  17234. D63–D0
  17235. d1 d2 d3 d4
  17236. (write)
  17237.  
  17238. BS
  17239.  
  17240. DACKn
  17241. (SA: IO ← memory)
  17242.  
  17243. DACKn
  17244. (SA: IO → memory)
  17245.  
  17246. Figure 13.17 DRAM Burst Access Timing
  17247.  
  17248. 338
  17249.  
  17250. ----------------------- Page 355-----------------------
  17251.  
  17252. EDO Mode: With DRAM, in addition to the mode in which data is output to the data bus only
  17253. while the CAS signal is asserted in a data read cycle, an EDO (extended data out) mode is also
  17254. provided in which, once the CAS signal is asserted while the RAS signal is asserted, even if the
  17255. CAS signal is negated, data is output to the data bus until the CAS signal is next asserted. In the
  17256. SH7750, the EDO mode bit (EDOMODE) in MCR enables either normal access/burst access
  17257. using fast page mode, or EDO mode normal access/burst access, to be selected for DRAM. When
  17258. EDO mode is set, BE must be set to 1 in MCR. EDO mode normal access is shown in figure
  17259. 13.18, and burst access in figure 13.19.
  17260.  
  17261. CAS Negation Period: The CAS negation period can be set to 1 or 2 by means of the TCAS bit in
  17262. the MCR register.
  17263.  
  17264. Tr1 Tr2 Tc1 Tc2 Tce Tpc
  17265.  
  17266. CKIO
  17267.  
  17268.  
  17269.  
  17270.  
  17271. A25–A0 Row Column
  17272.  
  17273.  
  17274.  
  17275.  
  17276. CSn
  17277.  
  17278.  
  17279.  
  17280. RD/WR
  17281.  
  17282.  
  17283.  
  17284.  
  17285. RAS
  17286.  
  17287.  
  17288.  
  17289.  
  17290. CASn
  17291.  
  17292. D63–D0
  17293.  
  17294. (read)
  17295.  
  17296.  
  17297.  
  17298.  
  17299.  
  17300. BS
  17301.  
  17302.  
  17303.  
  17304. DACKn
  17305. (SA: IO ← memory)
  17306.  
  17307. Figure 13.18 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  17308.  
  17309. 339
  17310.  
  17311. ----------------------- Page 356-----------------------
  17312.  
  17313. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  17314.  
  17315. CKIO
  17316.  
  17317. A25–A0 r c1 c2 c3 c4
  17318.  
  17319. CSn
  17320.  
  17321. RD/WR
  17322.  
  17323. RAS
  17324.  
  17325. CAS
  17326.  
  17327. D63–D0
  17328. d1 d2 d3 d4
  17329. (read)
  17330.  
  17331. BS
  17332.  
  17333. DACKn
  17334. (SA: IO ← memory)
  17335.  
  17336. Figure 13.19 Burst Access Timing in DRAM EDO Mode
  17337.  
  17338. RAS Down Mode: The SH7750 has an address comparator for detecting row address matches in
  17339. burst mode. By using this address comparator, and also setting RAS down mode specification bit
  17340. RASD to 1, it is possible to select RAS down mode, in which RAS remains asserted after the end
  17341. of an access. When RAS down mode is used, if the refresh cycle is longer than the maximum
  17342. DRAM RAS assert time, the refresh cycle must be decreased to or below the maximum value of
  17343. tRAS .
  17344.  
  17345. RAS down mode can only be used when DRAM is connected in area 3.
  17346.  
  17347. In RAS down mode, in the event of an access to an address with a different row address, an access
  17348. to a different area, a refresh request, or a bus request, RAS is negated and the necessary operation is
  17349. performed. When DRAM access is resumed after this, since this is the start of RAS down mode,
  17350. the operation starts with row address output. Timing charts are shown in figures 13.20 (1), (2),
  17351. (3), and (4).
  17352.  
  17353. 340
  17354.  
  17355. ----------------------- Page 357-----------------------
  17356.  
  17357. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  17358.  
  17359. CKIO
  17360.  
  17361. A25–A0 r c1 c2 c3 c4
  17362.  
  17363. CSn
  17364.  
  17365. RD/WR
  17366.  
  17367. RAS
  17368.  
  17369. CAS
  17370.  
  17371. D63–D0
  17372. d1 d2 d3 d4
  17373. (read)
  17374.  
  17375. D63–D0
  17376. d1 d2 d3 d4
  17377. (write)
  17378.  
  17379. BS
  17380.  
  17381. DACKn
  17382. (SA: IO ← memory)
  17383.  
  17384. DACKn
  17385. (SA: IO → memory)
  17386.  
  17387. Figure 13.20 (1) DRAM Burst Bus Cycle, RAS Down Mode Start
  17388. (Fast Page Mode, RCD = 0, Anw = 0)
  17389.  
  17390. 341
  17391.  
  17392. ----------------------- Page 358-----------------------
  17393.  
  17394. Tnop Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  17395.  
  17396. CKIO
  17397.  
  17398.  
  17399.  
  17400. A25–A0 c0 c1 c2 c3
  17401.  
  17402.  
  17403.  
  17404.  
  17405. CSn
  17406.  
  17407.  
  17408. RD/WR
  17409.  
  17410.  
  17411. End of RAS down mode
  17412. RAS
  17413.  
  17414.  
  17415.  
  17416. CASn
  17417.  
  17418. D63–D0
  17419.  
  17420. (read) d0 d1 d2 d3
  17421.  
  17422.  
  17423.  
  17424.  
  17425.  
  17426.  
  17427. D63–D0
  17428. d0 d1 d2 d3
  17429. (write)
  17430.  
  17431.  
  17432.  
  17433. BS
  17434.  
  17435.  
  17436. DACKn
  17437. (SA: IO ← memory)
  17438.  
  17439.  
  17440.  
  17441. DACKn
  17442. (SA: IO → memory)
  17443.  
  17444. Figure 13.20 (2) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  17445. (Fast Page Mode, RCD = 0, Anw = 0)
  17446.  
  17447. 342
  17448.  
  17449. ----------------------- Page 359-----------------------
  17450.  
  17451. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  17452.  
  17453. CKIO
  17454.  
  17455. A25–A0 r c1 c2 c3 c4
  17456.  
  17457. CSn
  17458.  
  17459. RD/WR
  17460.  
  17461. RAS
  17462.  
  17463. CAS
  17464.  
  17465. D63–D0
  17466. d1 d2 d3 d4
  17467. (read)
  17468.  
  17469. BS
  17470.  
  17471. DACKn
  17472. (SA: IO ← memory)
  17473.  
  17474. Figure 13.20 (3) DRAM Burst Bus Cycle, RAS Down Mode Start
  17475. (EDO Mode, RCD = 0, Anw = 0)
  17476.  
  17477. 343
  17478.  
  17479. ----------------------- Page 360-----------------------
  17480.  
  17481. Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  17482.  
  17483. CKIO
  17484.  
  17485. A25–A0 c1 c2 c3 c4
  17486.  
  17487. CSn
  17488.  
  17489. RD/WR
  17490.  
  17491. End of RAS down mode
  17492.  
  17493. RAS
  17494.  
  17495. CAS
  17496.  
  17497. D63–D0
  17498. d1 d2 d3 d4
  17499. (read)
  17500.  
  17501. BS
  17502.  
  17503. DACKn
  17504. (SA: IO ← memory)
  17505.  
  17506. Figure 13.20 (4) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  17507. (EDO Mode, RCD = 0, Anw = 0)
  17508.  
  17509. Refresh Timing: The bus state controller includes a function for controlling DRAM refreshing.
  17510. Distributed refreshing using a CAS-before-RAS cycle can be performed for DRAM by clearing the
  17511. RMODE bit to 0 and setting the RFSH bit to 1 in MCR. Self-refresh mode is also supported.
  17512.  
  17513. When CAS-before-RAS refresh cycles are executed, refreshing is performed at intervals determined
  17514. by the input clock selected by bits CKS2–CKS0 in RTCSR, and the value set in RTCOR. The
  17515. value of bits CKS2–CKS0 in RTCOR should be set so as to satisfy the specification for the
  17516. DRAM refresh interval. First make the settings for RTCOR, RTCNT, and the RMODE and
  17517. RFSH bits in MCR, then make the CKS2–CKS0 setting. When the clock is selected by CKS2–
  17518. CKS0, RTCNT starts counting up from the value at that time. The RTCNT value is constantly
  17519. compared with the RTCOR value, and if the two values are the same, a refresh request is generated
  17520. and the BACK pin goes high. If the SH7750’s external bus can be used, CAS-before-RAS
  17521. refreshing is performed. At the same time, RTCNT is cleared to zero and the count-up is restarted.
  17522. Figure 13.21 shows the operation of CAS-before-RAS refreshing.
  17523.  
  17524. 344
  17525.  
  17526. ----------------------- Page 361-----------------------
  17527.  
  17528. RTCOR value RTCNT cleared to 0 when
  17529. RTCNT = RTCOR
  17530. RTCNT
  17531.  
  17532. H'00000000 Time
  17533.  
  17534. RTCSR.CKS2–0 = 000 ≠ 000
  17535.  
  17536. Refresh
  17537. request
  17538.  
  17539. Refresh request cleared
  17540.  
  17541. by start of refresh cycle
  17542. External bus
  17543.  
  17544. CAS-before-RAS refresh cycle
  17545.  
  17546. Figure 13.21 CAS-Before-RAS Refresh Operation
  17547.  
  17548. Figure 13.22 shows the timing of the CAS-before-RAS refresh cycle.
  17549.  
  17550. The number of RAS assert cycles in the refresh cycle is specified by bits TRAS2–TRAS0 in
  17551. MCR. The specification of the RAS precharge time in the refresh cycle is determined by the
  17552. setting of bits TRC2–TRC0 in MCR.
  17553.  
  17554. 345
  17555.  
  17556. ----------------------- Page 362-----------------------
  17557.  
  17558. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  17559.  
  17560. CKIO
  17561.  
  17562. A25–A0
  17563.  
  17564. CSn
  17565.  
  17566. RD/WR
  17567.  
  17568. RAS
  17569.  
  17570. CAS
  17571.  
  17572. D63–D0
  17573.  
  17574. BS
  17575.  
  17576. Figure 13.22 DRAM CAS-Before-RAS Refresh Cycle Timing (TRAS = 0,
  17577. TRC = 1)
  17578.  
  17579. The self-refreshing supported by the SH7750 is shown in figure 13.23.
  17580.  
  17581. After the self-refresh is cleared, the refresh controller immediately generates a refresh request. The
  17582. RAS precharge time immediately after the end of the self-refreshing can be set by bits TRC2–
  17583. TRC0 in MCR.
  17584.  
  17585. DRAMs include low-power products (L versions) with a long refresh cycle time (for example, the
  17586. HM51W4160AL L version has a refresh cycle of 1024 cycles/128 ms compared with 1024
  17587. cycles/16 ms for the normal version). With these DRAMs, however, the same refresh cycle as for
  17588. the normal version is requested only in the case of refreshing immediately following self-
  17589. refreshing. To ensure efficient DRAM refreshing, therefore, processing is needed to generate an
  17590. overflow interrupt and restore the refresh cycle to the proper value, after the necessary CAS-before-
  17591. RAS refreshing has been performed following self-refreshing of an L-version DRAM, using the
  17592. OVF, OVIE, and LMTS bits in RTCSR and the refresh controller’s refresh count register (RFCR).
  17593. The necessary procedure is as follows.
  17594.  
  17595. 1. Normally, set the refresh counter count cycle to the optimum value for the L version (e.g.
  17596. 1024 cycles/128 ms).
  17597.  
  17598. 346
  17599.  
  17600. ----------------------- Page 363-----------------------
  17601.  
  17602. 2. When a transition is made to self-refreshing:
  17603.  
  17604. a. Provide an interrupt handler to restore the refresh counter count value to the optimum value
  17605. for the L version (e.g. 1024 cycles/128 ms) when a refresh counter overflow interrupt is
  17606. generated.
  17607.  
  17608. b. Re-set the refresh counter count cycle to the requested short cycle (e.g. 1024 cycles/16 ms),
  17609. set refresh controller overflow interruption, and clear the refresh controller’s refresh count
  17610. register (RFCR) to 0.
  17611.  
  17612. c. Set self-refresh mode.
  17613.  
  17614. By using this procedure, the refreshing immediately following a self-refresh will be performed in a
  17615. short cycle, and when adequate refreshing ends, an interrupt is generated and the setting can be
  17616. restored to the original refresh cycle.
  17617.  
  17618. CAS-before-RAS refreshing is performed in normal operation, in sleep mode, and in the case of a
  17619. manual reset.
  17620.  
  17621. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the case
  17622. of a manual reset.
  17623.  
  17624. When the bus has been released in response to a bus arbitration request, or when a transition is
  17625. made to standby mode, signals generally become high-impedance, but whether the RAS and CAS
  17626. signals become high-impedance or continue to be output can be controlled by the HIZCNT bit in
  17627. BCR1. This enables the DRAM to be kept in the self-refreshing state.
  17628.  
  17629. As the DRAM CAS signal is multiplexed with WEn for normal memory (SRAM, etc.), access to
  17630. memory that uses the WEn signals must be disabled during self-refreshing.
  17631.  
  17632. 347
  17633.  
  17634. ----------------------- Page 364-----------------------
  17635.  
  17636. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  17637.  
  17638. CKIO
  17639.  
  17640. A25–A0
  17641.  
  17642. CSn
  17643.  
  17644. RD/WR
  17645.  
  17646. RAS
  17647.  
  17648. CAS
  17649.  
  17650. D63–D0
  17651.  
  17652. BS
  17653.  
  17654. Figure 13.23 DRAM Self-Refresh Cycle Timing
  17655.  
  17656. Power-On Sequence: Regarding use of DRAM after powering on, it is requested that a wait
  17657. time (at least 100 µs or 200 µs) during which no access can be performed be provided, followed by
  17658. at least the prescribed number (usually 8) of dummy CAS-before-RAS refresh cycles. As the bus
  17659. state controller does not perform any special operations for a power-on reset, the necessary power-
  17660. on sequence must be carried out by the initialization program executed after a power-on reset.
  17661.  
  17662. 348
  17663.  
  17664. ----------------------- Page 365-----------------------
  17665.  
  17666. 1 3 . 3 . 5 Synchronous DRAM Interface
  17667.  
  17668. Direct Connection of Synchronous DRAM: Since synchronous DRAM can be selected
  17669. by the CS signal, it can be connected to physical space areas 2 and 3 using RAS and other control
  17670. signals in common. If the memory type bits (DRAMTP2–0) in BCR1 are set to 010, area 2 is
  17671. normal memory space and area 3 is synchronous DRAM space; if set to 011, areas 2 and 3 are
  17672. both synchronous DRAM space.
  17673.  
  17674. With the SH7750, burst read/burst write mode is supported as the synchronous DRAM operating
  17675. mode. The data bus width is 32 or 64 bits, and the SZ size bits in MCR must be set to 00 or 11.
  17676. The burst enable bit (BE) in MCR is ignored, a 32-byte burst transfer is performed in a cache
  17677. fill/copy-back cycle, and in a write-through area write or a non-cacheable area read/write, 32-byte
  17678. data is read even in a single read in order to access synchronous DRAM with a burst read/write
  17679. access. 32-byte data transfer is also performed in a single write, but DQMn is not asserted when
  17680. unnecessary data is transferred.
  17681.  
  17682. The control signals for direct connection of synchronous DRAM are RAS, CAS, RD/WR, CS2 or
  17683. CS3, DQM0 to DQM7, and CKE. All the signals other than CS2 and CS3 are common to all
  17684. areas, and signals other than CKE are valid and latched only when CS2 or CS3 is asserted.
  17685. Synchronous DRAM can therefore be connected in parallel to a number of areas. CKE is negated
  17686. (driven low) when the frequency is changed, when the clock is unstable after the clock supply is
  17687. stopped and restarted, or when self-refreshing is performed, and is always asserted (high) at other
  17688. times.
  17689.  
  17690. Commands for synchronous DRAM are specified by RAS, CAS, RD/WR, and specific address
  17691. signals. The commands are NOP, auto-refresh (REF), self-refresh (SELF), precharge all banks
  17692. (PALL), precharge specified bank (PRE), row address strobe bank active (ACTV), read (READ),
  17693. read with precharge (READA), write (WRIT), write with precharge (WRITA), and mode register
  17694. setting (MRS).
  17695.  
  17696. Byte specification is performed by DQM0 to DQM7. A read/write is performed for the byte for
  17697. which the corresponding DQM signal is low. When the bus width is 64 bits, in big-endian mode
  17698. DQM7 specifies an access to address 8n, and DQM0 specifies an access to address 8n + 7. In little-
  17699. endian mode, DQM7 specifies an access to address 8n + 7, and DQM0 specifies an access to
  17700. address 8n.
  17701.  
  17702. Figures 13.24 and 13.25 show examples of the connection of 16M × 16-bit synchronous DRAMs.
  17703.  
  17704. 349
  17705.  
  17706. ----------------------- Page 366-----------------------
  17707.  
  17708. 512K × 16-bit × 2-bank
  17709. SH7750 synchronous DRAM
  17710.  
  17711. A12–A3 A9–A0
  17712. CKIO CLK
  17713. CKE CKE
  17714. CS3 CS
  17715. RAS RAS
  17716. RD CAS
  17717. RD/WR WE
  17718. D63–D48 I/O15–I/O0
  17719. DQM7 DQMU
  17720. DQM6 DQML
  17721.  
  17722. A9–A0
  17723. CLK
  17724. CKE
  17725. CS
  17726. RAS
  17727. CAS
  17728. WE
  17729. D47–D32 I/O15–I/O0
  17730. DQM5 DQMU
  17731. DQM4 DQML
  17732.  
  17733. A9–A0
  17734. CLK
  17735. CKE
  17736. CS
  17737. RAS
  17738. CAS
  17739. WE
  17740. D31–D16 I/O15–I/O0
  17741. DQM3 DQMU
  17742. DQM2 DQML
  17743.  
  17744. A9–A0
  17745. CLK
  17746. CKE
  17747. CS
  17748. RAS
  17749. CAS
  17750. WE
  17751. D15–D0 I/O15–I/O0
  17752. DQM1 DQMU
  17753. DQM0 DQML
  17754.  
  17755. Figure 13.24 Example of 64-Bit Data Width Synchronous DRAM Connection
  17756. (Area 3)
  17757.  
  17758. 350
  17759.  
  17760. ----------------------- Page 367-----------------------
  17761.  
  17762. 512K × 16-bit × 2-bank
  17763. SH7750 synchronous DRAM
  17764.  
  17765. A11–A2 A9–A0
  17766. CKIO CLK
  17767. CKE CKE
  17768. CS3 CS
  17769. RAS RAS
  17770. RD CAS
  17771. RD/WR WE
  17772. D31–D16 I/O15–I/O0
  17773. DQM3 DQMU
  17774. DQM2 DQML
  17775.  
  17776. A9–A0
  17777. CLK
  17778. CKE
  17779. CS
  17780. RAS
  17781. CAS
  17782. WE
  17783. D15–D0 I/O15–I/O0
  17784. DQM1 DQMU
  17785. DQM0 DQML
  17786.  
  17787. Figure 13.25 Example of 32-Bit Data Width Synchronous DRAM Connection
  17788. (Area 3)
  17789.  
  17790. Address Multiplexing: Synchronous DRAM can be connected without external multiplexing
  17791. circuitry in accordance with the address multiplex specification bits AMXEXT and AMX2–AMX0
  17792. in MCR. Table 13.15 shows the relationship between the address multiplex specification bits and
  17793. the bits output at the address pins. See Appendix F, Synchronous DRAM Address Multiplexing
  17794. Tables.
  17795.  
  17796. The address signals output at A25–A18, A1, and A0 are undefined.
  17797.  
  17798. When A0, the LSB of the synchronous DRAM address, is connected to the SH7750, with a 32-bit
  17799. bus width it makes a longword address specification. Connection should therefore be made in this
  17800. order: connect pin A0 of the synchronous DRAM to pin A2 of the SH7750, then connect pin A1
  17801. to pin A3.
  17802.  
  17803. With a 64-bit bus width, the LSB makes a quadword address specification. Connection should
  17804. therefore be made in this order: connect pin A0 of the synchronous DRAM to pin A3 of the
  17805. SH7750, then connect pin A1 to pin A4.
  17806.  
  17807. 351
  17808.  
  17809. ----------------------- Page 368-----------------------
  17810.  
  17811. Table 13.15 Example of Correspondence between SH7750 and Synchronous
  17812. DRAM Address Pins (64-Bit Bus Width, AMX2–AMX0 = 011,
  17813. AMXEXT = 0)
  17814.  
  17815. SH7750 Address Pin Synchronous DRAM Address Pin
  17816.  
  17817. RAS Cycle CAS Cycle Function
  17818.  
  17819. A14 A22 A22 A11 BANK select bank address
  17820.  
  17821. A13 A21 H/L A10 Address precharge setting
  17822.  
  17823. A12 A20 0 A9
  17824.  
  17825. A11 A19 0 A8
  17826.  
  17827. A10 A18 A10 A7
  17828.  
  17829. A9 A17 A9 A6
  17830.  
  17831. A8 A16 A8 A5
  17832.  
  17833. A7 A15 A7 A4
  17834.  
  17835. A6 A14 A6 A3
  17836.  
  17837. A5 A13 A5 A2
  17838.  
  17839. A4 A12 A4 A1
  17840.  
  17841. A3 A11 A3 A0
  17842.  
  17843. A2 — A2 Not used
  17844.  
  17845. A1 — A1 Not used
  17846.  
  17847. A0 — A0 Not used
  17848.  
  17849. Burst Read: The timing chart for a burst read is shown in figure 13.26. In the following
  17850. example it is assumed that four 512K x 16-bit x 2-bank synchronous DRAMs are connected, and a
  17851. 64-bit data width is used. The burst length is 4. Following the Tr cycle in which ACTV command
  17852. output is performed, a READA command is issued in the Tc1 cycle, and the read data is accepted
  17853. on the rising edge of the external command clock (CKIO) from cycle Td1 to cycle Td4. The Tpc
  17854. cycle is used to wait for completion of auto-precharge based on the READA command inside the
  17855. synchronous DRAM; no new access command can be issued to the same bank during this cycle. In
  17856. the SH7750, the number of Tpc cycles is determined by the specification of bits TPC2–TPC0 in
  17857. MCR, and commands are not issued for the same synchronous DRAM during this interval.
  17858.  
  17859. The example in figure 13.26 shows the basic cycle. To connect slower synchronous DRAM, the
  17860. cycle can be extended by setting WCR2 and MCR bits. The number of cycles from the ACTV
  17861. command output cycle, Tr, to the READA command output cycle, Tc1, can be specified by bits
  17862. RCD1 and RCD0 in MCR, with a value of 0 to 3 specifying 2 to 4 cycles, respectively. In the
  17863. case of 2 or more cycles, a Trw cycle, in which an NOP command is issued for the synchronous
  17864. DRAM, is inserted between the Tr cycle and the Tc cycle. The number of cycles from READA
  17865. command output cycle Tc1 to the first read data latch cycle, Td1, can be specified as 1 to 5 cycles
  17866.  
  17867. 352
  17868.  
  17869. ----------------------- Page 369-----------------------
  17870.  
  17871. independently for areas 2 and 3 by means of bits A2W2–A2W0 and A3W2–A3W0 in WCR2. This
  17872. number of cycles corresponds to the number of synchronous DRAM CAS latency cycles.
  17873.  
  17874. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17875.  
  17876. CKIO
  17877.  
  17878.  
  17879.  
  17880. Bank Row
  17881.  
  17882. t
  17883.  
  17884. Precharge-sel Row H/L
  17885.  
  17886. t
  17887.  
  17888. Address Row c0
  17889.  
  17890.  
  17891.  
  17892.  
  17893. CSn
  17894.  
  17895.  
  17896.  
  17897. RD/WR
  17898.  
  17899.  
  17900.  
  17901. RAS
  17902.  
  17903.  
  17904.  
  17905. CASS
  17906.  
  17907.  
  17908.  
  17909. DQMn
  17910.  
  17911. D63–D0
  17912. (read) d0 d1 d2 d3
  17913.  
  17914.  
  17915.  
  17916.  
  17917.  
  17918. BS
  17919.  
  17920. CKE
  17921.  
  17922.  
  17923.  
  17924. DACKn
  17925. (SA: IO ← memory)
  17926.  
  17927. Figure 13.26 Basic Timing for Synchronous DRAM Burst Read
  17928.  
  17929. In a synchronous DRAM cycle, the BS signal is asserted for one cycle at the start of the bus cycle.
  17930. The order of access is as follows: in a fill operation in the event of a cache miss, 64-bit boundary
  17931. data including the missed data is read first, then 32-byte boundary data including the missed data is
  17932. read in wraparound mode.
  17933.  
  17934. 353
  17935.  
  17936. ----------------------- Page 370-----------------------
  17937.  
  17938. Single Read: With the SH7750, as synchronous DRAM is set to burst read/burst write mode,
  17939. read data output continues after the required data has been read. To prevent data collisions, after the
  17940. required data is read in Td1, empty read cycles Td2 to Td4 are performed, and the SH7750 waits for
  17941. the end of the synchronous DRAM operation. The BS signal is asserted only in Td1.
  17942.  
  17943. When the data width is 64 bits, there are 4 burst transfers in a read. In cache-through and other
  17944. DMA read cycles, of cycles Td1 to Td4, BS is asserted and data latched only in the Td1 cycle.
  17945.  
  17946. Since such empty cycles increase the memory access time, and tend to reduce program execution
  17947. speed and DMA transfer speed, it is important both to avoid unnecessary cache-through area
  17948. accesses, and to use a data structure that will allow data to be placed at a 32-byte boundary, and to
  17949. be transferred in 32-byte units, when carrying out DMA transfer with synchronous DRAM
  17950. specified as the source.
  17951.  
  17952. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  17953.  
  17954. CKIO
  17955.  
  17956. Bank Row
  17957.  
  17958. Precharge-sel Row H/L
  17959.  
  17960. Address Row c1
  17961.  
  17962. CSn
  17963.  
  17964. RD/WR
  17965.  
  17966. RAS
  17967.  
  17968. CASS
  17969.  
  17970. DQMn
  17971.  
  17972. D63–D0
  17973. c1
  17974. (read)
  17975.  
  17976. BS
  17977.  
  17978. CKE
  17979.  
  17980. DACKn
  17981. (SA: IO ← memory)
  17982.  
  17983. Figure 13.27 Basic Timing for Synchronous DRAM Single Read
  17984.  
  17985. 354
  17986.  
  17987. ----------------------- Page 371-----------------------
  17988.  
  17989. Burst Write: The timing chart for a burst write is shown in figure 13.28. In the SH7750, a
  17990. burst write occurs only in the event of cache copy-back or a 32-byte transfer by the DMAC. In a
  17991. burst write operation, following the Tr cycle in which ACTV command output is performed, a
  17992. WRITA command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle, the
  17993. write data is output at the same time as the write command. In the case of the write with auto-
  17994. precharge command, precharging of the relevant bank is performed in the synchronous DRAM after
  17995. completion of the write command, and therefore no command can be issued for the same bank until
  17996. precharging is completed. Consequently, in addition to the precharge wait cycle, Tpc, used in a read
  17997. access, cycle Trwl is also added as a wait interval until precharging is started following the write
  17998. command. Issuance of a new command for the same bank is postponed during this interval. The
  17999. number of Trwl cycles can be specified by bits TRWL2–TRWL0 in MCR. 32-byte boundary data
  18000. is written in wraparound mode.
  18001.  
  18002. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  18003.  
  18004. CKIO
  18005.  
  18006. Bank Row
  18007.  
  18008. Precharge-sel Row H/L
  18009.  
  18010. Address Row c1
  18011.  
  18012. CSn
  18013.  
  18014. RD/WR
  18015.  
  18016. RAS
  18017.  
  18018. CASS
  18019.  
  18020. DQMn
  18021.  
  18022. D63–D0
  18023. c1 c2 c3 c4
  18024. (read)
  18025.  
  18026. CKE
  18027.  
  18028. DACKn
  18029. (SA: IO → memory)
  18030.  
  18031. Figure 13.28 Basic Timing for Synchronous DRAM Burst Write
  18032.  
  18033. 355
  18034.  
  18035. ----------------------- Page 372-----------------------
  18036.  
  18037. Single Write: The basic timing chart for write access is shown in figure 13.29. In a single
  18038. write operation, following the Tr cycle in which ACTV command output is performed, a WRITA
  18039. command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle, the write data
  18040. is output at the same time as the write command. In the case of a write with auto-precharge,
  18041. precharging of the relevant bank is performed in the synchronous DRAM after completion of the
  18042. write command, and therefore no command can be issued for the same bank until precharging is
  18043. completed. Consequently, in addition to the precharge wait cycle, Tpc, used in a read access, cycle
  18044. Trwl is also added as a wait interval until precharging is started following the write command.
  18045. Issuance of a new command for the same bank is postponed during this interval. The number of
  18046. Trwl cycles can be specified by bits TRWL2–TRWL0 in MCR.
  18047.  
  18048. As the SH7750 supports burst read/burst write operations for synchronous DRAM, a single write
  18049. requires the same number of cycles as a burst write.
  18050.  
  18051. 356
  18052.  
  18053. ----------------------- Page 373-----------------------
  18054.  
  18055. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  18056.  
  18057. CKIO
  18058.  
  18059. Bank Row
  18060.  
  18061. Precharge-sel Row H/L
  18062.  
  18063. Address Row c1
  18064.  
  18065. CSn
  18066.  
  18067. RD/WR
  18068.  
  18069. RAS
  18070.  
  18071. CASS
  18072.  
  18073. DQMn
  18074.  
  18075. D63–D0
  18076. c1
  18077. (read)
  18078.  
  18079. BS
  18080.  
  18081. CKE
  18082.  
  18083. DACKn
  18084. (SA: IO → memory)
  18085.  
  18086. Figure 13.29 Basic Timing for Synchronous DRAM Single Write
  18087.  
  18088. 357
  18089.  
  18090. ----------------------- Page 374-----------------------
  18091.  
  18092. RAS Down Mode: The synchronous DRAM bank function is used to support high-speed
  18093. accesses to the same row address. When the RASD bit in MCR is 1, read/write command accesses
  18094. are performed using commands without auto-precharge (READ, WRIT). In this case, precharging
  18095. is not performed when the access ends. When accessing the same row address in the same bank, it
  18096. is possible to issue the READ or WRIT command immediately, without issuing an ACTV
  18097. command, in the same way as in the DRAM RAS down state. As synchronous DRAM is
  18098. internally divided into two or four banks, it is possible to activate one row address in each bank. If
  18099. the next access is to a different row address, a PRE command is first issued to precharge the
  18100. relevant bank, then when precharging is completed, the access is performed by issuing an ACTV
  18101. command followed by a READ or WRIT command. If this is followed by an access to a different
  18102. row address, the access time will be longer because of the precharging performed after the access
  18103. request is issued.
  18104.  
  18105. In a write, when auto-precharge is performed, a command cannot be issued for a period of Trwl +
  18106. Tpc cycles after issuance of the WRIT command. When RAS down mode is used, READ or WRIT
  18107. commands can be issued successively if the row address is the same. The number of cycles can
  18108. thus be reduced by Trwl + Tpc cycles for each write. The number of cycles between issuance of the
  18109. precharge command and the row address strobe command is determined by bits TPC2–TPC0 in
  18110. MCR.
  18111.  
  18112. There is a limit on tRAS, the time for placing each bank in the active state. If there is no guarantee
  18113. that there will not be a cache hit and another row address will be accessed within the period in
  18114. which this value is maintained by program execution, it is necessary to set auto-refresh and set the
  18115. refresh cycle to no more than the maximum value of tRAS . In this way, it is possible to observe the
  18116. restrictions on the maximum active state time for each bank. If auto-refresh is not used, measures
  18117. must be taken in the program to ensure that the banks do not remain active for longer than the
  18118. prescribed time.
  18119.  
  18120. A burst read cycle without auto-precharge is shown in figure 13.30, a burst read cycle for the same
  18121. row address in figure 13.31, and a burst read cycle for different row addresses in figure 13.32.
  18122. Similarly, a burst write cycle without auto-precharge is shown in figure 13.33, a burst write cycle
  18123. for the same row address in figure 13.34, and a burst write cycle for different row addresses in
  18124. figure 13.35.
  18125.  
  18126. When synchronous DRAM is read, there is a 2-cycle latency for the DMQn signal that performs
  18127. the byte specification. As a result, when the READ command is issued in figure 13.30, if the Tc
  18128. cycle is executed immediately, the DMQn signal specification for Td1 cycle data output cannot be
  18129. carried out. Therefore, the CAS latency should not be set to 1.
  18130.  
  18131. When RAS down mode is set, if only accesses to the respective banks in area 3 are considered, as
  18132. long as accesses to the same row address continue, the operation starts with the cycle in figure
  18133. 13.30 or 13.33, followed by repetition of the cycle in figure 13.31 or 13.34. An access to a
  18134. different area during this time has no effect. If there is an access to a different row address in the
  18135. bank active state, after this is detected the bus cycle in figure 13.32 or 13.35 is executed instead of
  18136.  
  18137. 358
  18138.  
  18139. ----------------------- Page 375-----------------------
  18140.  
  18141. that in figure 13.31 or 13.34. In RAS down mode, too, both banks become inactive after a refresh
  18142. cycle or after the bus is released as the result of bus arbitration.
  18143.  
  18144. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  18145.  
  18146. CKIO
  18147.  
  18148. Bank Row
  18149.  
  18150. Precharge-sel Row H/L
  18151.  
  18152. Address Row c1
  18153.  
  18154. CSn
  18155.  
  18156. RD/WR
  18157.  
  18158. RAS
  18159.  
  18160. CASS
  18161.  
  18162. DQMn
  18163.  
  18164. D63–D0
  18165. c1 c2 c3 c4
  18166. (read)
  18167.  
  18168. BS
  18169.  
  18170. CKE
  18171.  
  18172. DACKn
  18173. (SA: IO ← memory)
  18174.  
  18175. Figure 13.30 Burst Read Timing
  18176.  
  18177. 359
  18178.  
  18179. ----------------------- Page 376-----------------------
  18180.  
  18181. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  18182.  
  18183. CKIO
  18184.  
  18185. Bank
  18186.  
  18187. Precharge-sel H/L
  18188.  
  18189. Address c1
  18190.  
  18191. CSn
  18192.  
  18193. RD/WR
  18194.  
  18195. RAS
  18196.  
  18197. CASS
  18198.  
  18199. DQMn
  18200.  
  18201. D63–D0
  18202. (read) c1 c2 c3 c4
  18203.  
  18204. BS
  18205.  
  18206. CKE
  18207.  
  18208. DACKn
  18209. (SA: IO ← memory)
  18210.  
  18211. Figure 13.31 Burst Read Timing (RAS Down, Same Row Address)
  18212.  
  18213. 360
  18214.  
  18215. ----------------------- Page 377-----------------------
  18216.  
  18217. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  18218.  
  18219. CKIO
  18220.  
  18221. Bank Row
  18222.  
  18223. Precharge-sel Row H/L
  18224.  
  18225. Address Row c1
  18226.  
  18227. CSn
  18228.  
  18229. RD/WR
  18230.  
  18231. RAS
  18232.  
  18233. CASS
  18234.  
  18235. DQMn
  18236.  
  18237. D63–D0
  18238. (read) c1 c2 c3 c4
  18239.  
  18240. BS
  18241.  
  18242. CKE
  18243.  
  18244. DACKn
  18245. (SA: IO ← memory)
  18246.  
  18247. Figure 13.32 Burst Read Timing (RAS Down, Different Row Addresses)
  18248.  
  18249. 361
  18250.  
  18251. ----------------------- Page 378-----------------------
  18252.  
  18253. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  18254.  
  18255. CKIO
  18256.  
  18257. Bank Row
  18258.  
  18259. Precharge-sel Row H/L
  18260.  
  18261. Address Row c1
  18262.  
  18263. CSn
  18264.  
  18265. RD/WR
  18266.  
  18267. RAS
  18268.  
  18269. CASS
  18270.  
  18271. DQMn
  18272.  
  18273.  
  18274.  
  18275. D63–D0
  18276. c1 c2 c3 c4
  18277. (read)
  18278.  
  18279. BS
  18280.  
  18281. CKE
  18282.  
  18283. DACKn
  18284. (SA: IO → memory)
  18285.  
  18286. Figure 13.33 Burst Write Timing
  18287.  
  18288. 362
  18289.  
  18290. ----------------------- Page 379-----------------------
  18291.  
  18292. Tncp*1 Tnop*2 Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  18293.  
  18294. CKIO
  18295.  
  18296. Bank Row
  18297.  
  18298. Precharge-sel H/L
  18299.  
  18300. Address c1
  18301.  
  18302. CSn
  18303.  
  18304. RD/WR
  18305.  
  18306. RAS
  18307.  
  18308. CASS
  18309.  
  18310. DQMn
  18311.  
  18312.  
  18313.  
  18314. D63–D0
  18315. c1 c2 c3 c4
  18316. (read)
  18317.  
  18318. BS
  18319.  
  18320. CKE
  18321.  
  18322. DACKn
  18323. (SA: IO → memory)
  18324.  
  18325. Notes: 1. Tncp: DACK output start cycle (inserted only in the case of DACK output)
  18326. 2. Tnop: Dummy cycle (always inserted)
  18327.  
  18328. Figure 13.34 Burst Write Timing (Same Row Address)
  18329.  
  18330. 363
  18331.  
  18332. ----------------------- Page 380-----------------------
  18333.  
  18334. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4
  18335.  
  18336. CKIO
  18337.  
  18338. Bank Row
  18339.  
  18340. Precharge-sel Row H/L
  18341.  
  18342. Address Row c1
  18343.  
  18344. CSn
  18345.  
  18346. RD/WR
  18347.  
  18348. RAS
  18349.  
  18350. CASS
  18351.  
  18352. DQMn
  18353.  
  18354. D63–D0
  18355. c1 c2 c3 c4
  18356. (read)
  18357.  
  18358. BS
  18359.  
  18360. CKE
  18361.  
  18362. DACKn
  18363. (SA: IO → memory)
  18364.  
  18365. Figure 13.35 Burst Write Timing (Different Row Addresses)
  18366.  
  18367. Pipelined Access: When the RASD bit is set to 1 in MCR, pipelined access is performed
  18368. between an access by the CPU and an access by the DMAC, or in the case of consecutive accesses
  18369. by the DMAC, to provide faster access to synchronous DRAM. As synchronous DRAM is
  18370. internally divided into two or four banks, after a READ or WRIT command is issued for one bank
  18371. it is possible to issue a PRE, ACTV, or other command during the CAS latency cycle or data
  18372. latch cycle, or during the data write cycle, and so shorten the access cycle.
  18373.  
  18374. When a read access is followed by another read access to the same row address, after a READ
  18375. command has been issued, another READ command is issued before the end of the data latch cycle,
  18376. so that there is read data on the data bus continuously. When an access is made to another row
  18377. address and the bank is different, the PRE command or ACTV command can be issued during the
  18378. CAS latency cycle or data latch cycle. If there are consecutive access requests for different row
  18379. addresses in the same bank, the PRE command cannot be issued until the last-but-one data latch
  18380.  
  18381. 364
  18382.  
  18383. ----------------------- Page 381-----------------------
  18384.  
  18385. cycle. If a read access is followed by a write access, it may be possible to issue a PRE or ACT
  18386. command, depending on the bank and row address, but since the write data is output at the same
  18387. time as the WRIT command, the PRE, ACTV, and WRIT commands are issued in such a way that
  18388. one or two empty cycles occur automatically on the data bus. Similarly, with a read access
  18389. following a write access, or a write access following a write access, the PRE, ACTV, READ, or
  18390. WRIT command is issued during the data write cycle for the preceding access; however, in the case
  18391. of different row addresses in the same bank, a PRE command cannot be issued, and so in this case
  18392. the PRE command is issued following the number of Trwl cycles specified by the TRWL bits in
  18393. MCR, after the end of the last data write cycle.
  18394.  
  18395. Figure 13.36 shows a burst read cycle for a different bank and row address following a preceding
  18396. burst read cycle.
  18397.  
  18398. Pipelined access is enabled only for consecutive access to area 3, and will be discontinued in the
  18399. event of an access to another area. Pipelined access is also discontinued in the event of a refresh
  18400. cycle, or bus release due to bus arbitration. The cases in which pipelined access is available are
  18401. shown in table 13.16. In this table, “DMAC dual” indicates transfer in DMAC dual address mode,
  18402. and “DMAC single”, transfer in DMAC single address mode.
  18403.  
  18404. Table 13.16 Cycles in Which Pipelined Access Can Be Used
  18405.  
  18406. Preceding Access Following Access
  18407.  
  18408. CPU DMAC Dual DMAC Single
  18409.  
  18410. Read Write Read Write Read Write
  18411.  
  18412. CPU Read X X O X O O
  18413.  
  18414. Write X X O X O O
  18415.  
  18416. DMAC dual Read X X X X X X
  18417.  
  18418. Write O O O X O O
  18419.  
  18420. DMAC single Read O O X X O O
  18421.  
  18422. Write O O O X O O
  18423.  
  18424. O: Pipelined access possible
  18425. X: Pipelined access not possible
  18426.  
  18427. 365
  18428.  
  18429. ----------------------- Page 382-----------------------
  18430.  
  18431. Tc1_A Tc1_B
  18432.  
  18433. CKIO
  18434.  
  18435. Bank
  18436.  
  18437. Precharge-sel H/L H/L
  18438.  
  18439. Address c_A c_B
  18440.  
  18441. CSn
  18442.  
  18443. RD/WR
  18444.  
  18445. RAS
  18446.  
  18447. CASS
  18448.  
  18449. DQMn
  18450.  
  18451. D63–D0
  18452. a1 a2 a3 a4 b1 b2
  18453. (read)
  18454.  
  18455. BS
  18456.  
  18457. CKE
  18458.  
  18459. Figure 13.36 Burst Read Cycle for Different Bank and Row Address
  18460. Following Preceding Burst Read Cycle
  18461.  
  18462. Refreshing: The bus state controller is provided with a function for controlling synchronous
  18463. DRAM refreshing. Auto-refreshing can be performed by clearing the RMODE bit to 0 and setting
  18464. the RFSH bit to 1 in MCR. If synchronous DRAM is not accessed for a long period, self-refresh
  18465. mode, in which the power consumption for data retention is low, can be activated by setting both
  18466. the RMODE bit and the RFSH bit to 1.
  18467.  
  18468. • Auto-Refreshing
  18469.  
  18470. Refreshing is performed at intervals determined by the input clock selected by bits CKS2–
  18471. CKS0 in RTCSR, and the value set in RTCOR. The value of bits CKS2–CKS0 in RTCOR
  18472. should be set so as to satisfy the refresh interval specification for the synchronous DRAM
  18473. used. First make the settings for RTCOR, RTCNT, and the RMODE and RFSH bits in MCR,
  18474. then make the CKS2–CKS0 setting last of all. When the clock is selected by CKS2–CKS0,
  18475. RTCNT starts counting up from the value at that time. The RTCNT value is constantly
  18476. compared with the RTCOR value, and if the two values are the same, a refresh request is
  18477. generated and an auto-refresh is performed. At the same time, RTCNT is cleared to zero and the
  18478. count-up is restarted. Figure 13.38 shows the auto-refresh cycle timing.
  18479.  
  18480. 366
  18481.  
  18482. ----------------------- Page 383-----------------------
  18483.  
  18484. First, an REF command is issued in the TRr cycle. After the TRr cycle, new command output
  18485. cannot be performed for the duration of the number of cycles specified by bits TRAS2–TRAS0
  18486. in MCR plus the number of cycles specified by bits TRC2–TRC0 in MCR. The TRAS2–
  18487. TRAS0 and TRC2–TRC0 bits must be set so as to satisfy the synchronous DRAM refresh
  18488. cycle time specification (active/active command delay time).
  18489.  
  18490. Auto-refreshing is performed in normal operation, in sleep mode, and in the case of a manual
  18491. reset.
  18492.  
  18493. RTCOR value RTCNT cleared to 0 when
  18494. RTCNT = RTCOR
  18495. RTCNT
  18496.  
  18497. H'00000000 Time
  18498.  
  18499. RTCSR.CKS2–0 = 000 ≠ 000
  18500.  
  18501. Refresh
  18502. request
  18503.  
  18504. Refresh request cleared
  18505.  
  18506. by start of refresh cycle
  18507. External bus
  18508.  
  18509. Auto-refresh cycle
  18510.  
  18511. Figure 13.37 Auto-Refresh Operation
  18512.  
  18513. 367
  18514.  
  18515. ----------------------- Page 384-----------------------
  18516.  
  18517. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  18518.  
  18519. CKIO
  18520.  
  18521. CSn
  18522.  
  18523. RD/WR
  18524.  
  18525. RAS
  18526.  
  18527. CASS
  18528.  
  18529. DQMn
  18530.  
  18531. D63–D0
  18532.  
  18533. BS
  18534.  
  18535. CKE
  18536.  
  18537. Figure 13.38 Synchronous DRAM Auto-Refresh Timing
  18538.  
  18539. • Self-Refreshing
  18540.  
  18541. Self-refresh mode is a kind of standby mode in which the refresh timing and refresh addresses
  18542. are generated within the synchronous DRAM. Self-refreshing is activated by setting both the
  18543. RMODE bit and the RFSH bit to 1. The self-refresh state is maintained while the CKE signal
  18544. is low. Synchronous DRAM cannot be accessed while in the self-refresh state. Self-refresh
  18545. mode is cleared by clearing the RMODE bit to 0. After self-refresh mode has been cleared,
  18546. command issuance is disabled for the number of cycles specified by bits TRC2–TRC0 in
  18547. MCR. Self-refresh timing is shown in figure 13.39. Settings must be made so that self-refresh
  18548. clearing and data retention are performed correctly, and auto-refreshing is performed at the
  18549. correct intervals. When self-refreshing is activated from the state in which auto-refreshing is
  18550. set, or when exiting standby mode other than through a power-on reset, auto-refreshing is
  18551. restarted if RFSH is set to 1 and RMODE is cleared to 0 when self-refresh mode is cleared. If
  18552. the transition from clearing of self-refresh mode to the start of auto-refreshing takes time, this
  18553. time should be taken into consideration when setting the initial value of RTCNT. Making the
  18554. RTCNT value 1 less than the RTCOR value will enable refreshing to be started immediately.
  18555.  
  18556. After self-refreshing has been set, the self-refresh state continues even if the chip standby state
  18557. is entered using the SH7750’s standby function, and is maintained even after recovery from
  18558. standby mode other than through a power-on reset.
  18559.  
  18560. 368
  18561.  
  18562. ----------------------- Page 385-----------------------
  18563.  
  18564. In the case of a power-on reset, the bus state controller’s registers are initialized, and therefore
  18565. the self-refresh state is cleared.
  18566.  
  18567. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the
  18568. case of a manual reset.
  18569.  
  18570. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  18571.  
  18572. CKIO
  18573.  
  18574. CSn
  18575.  
  18576. RD/WR
  18577.  
  18578. RAS
  18579.  
  18580. CASS
  18581.  
  18582. DQMn
  18583.  
  18584. D63–D0
  18585.  
  18586. BS
  18587.  
  18588. CKE
  18589.  
  18590. Figure 13.39 Synchronous DRAM Self-Refresh Timing
  18591.  
  18592. • Relationship between Refresh Requests and Bus Cycle Requests
  18593.  
  18594. If a refresh request is generated during execution of a bus cycle, execution of the refresh is
  18595. deferred until the bus cycle is completed. If a refresh request occurs when the bus has been
  18596. released by the bus arbiter, refresh execution is deferred until the bus is acquired. If a match
  18597. between RTCNT and RTCOR occurs while a refresh is waiting to be executed, so that a new
  18598. refresh request is generated, the previous refresh request is eliminated. In order for refreshing to
  18599. be performed normally, care must be taken to ensure that no bus cycle or bus mastership occurs
  18600. that is longer than the refresh interval. When a refresh request is generated, theBACK pin is
  18601. negated (driven high). Therefore, normal refreshing can be performed by having theBACK pin
  18602. monitored by a bus master other than the SH7750 requesting the bus, or the bus arbiter, and
  18603. returning the bus to the SH7750.
  18604.  
  18605. 369
  18606.  
  18607. ----------------------- Page 386-----------------------
  18608.  
  18609. Power-On Sequence: In order to use synchronous DRAM, mode setting must first be
  18610. performed after powering on. To perform synchronous DRAM initialization correctly, the bus state
  18611. controller registers must first be set, followed by a write to the synchronous DRAM mode register.
  18612. In synchronous DRAM mode register setting, the address signal value at that time is latched by a
  18613. combination of the RAS, CAS, and RD/WR signals. If the value to be set is X, the bus state
  18614. controller provides for value X to be written to the synchronous DRAM mode register by
  18615. performing a write to address H'FF900000 + X for area 2 synchronous DRAM, and to address
  18616. H'FF940000 + X for area 3 synchronous DRAM. In this operation the data is ignored, but the
  18617. mode write is performed as a byte-size access. To set burst read/write, CAS latency 1 to 3, wrap
  18618. type = sequential, and burst length 4 or 8, supported by the SH7750, arbitrary data is written by
  18619. byte-size access to the following addresses.
  18620.  
  18621. Bus Width CAS Latency Area 2 Area 3
  18622.  
  18623. 32 1 FF90004C FF94004C
  18624.  
  18625. 2 FF90008C FF94008C
  18626.  
  18627. 3 FF9000CC FF9400CC
  18628.  
  18629. 64 1 FF900090 FF940090
  18630.  
  18631. 2 FF900110 FF940110
  18632.  
  18633. 3 FF900190 FF940190
  18634.  
  18635. The value set in MCR.MRSET is used to select whether a precharge all banks command or a mode
  18636. register setting command is issued. The timing for the precharge all banks command is shown in
  18637. figure 13.40 (1), and the timing for the mode register setting command in figure 13.40 (2).
  18638.  
  18639. Before mode register, a 200 µs idle time (depending on the memory manufacturer) must be
  18640. guaranteed after the power required for the synchronous DRAM is turned on. If the reset signal
  18641. pulse width is greater than this idle time, there is no problem in making the precharge all banks
  18642. setting immediately.
  18643.  
  18644. First, a precharge all banks (PALL) command is issued in the TRp1 cycle by performing a write to
  18645. address H'FF900000 + X or H'FF940000 + X while MCR.MRSET = 0. Next, the number of
  18646. dummy auto-refresh cycles specified by the manufacturer (usually 8) or more must be executed.
  18647. This is achieved automatically while various kinds of initialization are being performed after auto-
  18648. refresh setting, but a way of carrying this out more dependably is to change the RTCOR register
  18649. value to set a short refresh request generation interval just while these dummy cycles are being
  18650. executed. With simple read or write access, the address counter in the synchronous DRAM used for
  18651. auto-refreshing is not initialized, and so the cycle must always be an auto-refresh cycle. After auto-
  18652. refreshing has been executed at least the prescribed number of times, a mode register setting
  18653. command is issued in the TMw1 cycle by setting MCR.MRSET to 1 and performing a write to
  18654. address H'FF900000 + X or H'FF940000 + X.
  18655.  
  18656. 370
  18657.  
  18658. ----------------------- Page 387-----------------------
  18659.  
  18660. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  18661.  
  18662. CKIO
  18663.  
  18664. Bank
  18665.  
  18666. Precharge-sel
  18667.  
  18668. Address
  18669.  
  18670. CSn
  18671.  
  18672. RD/WR
  18673.  
  18674. RAS
  18675.  
  18676. CASS
  18677.  
  18678. D31–D0
  18679.  
  18680. CKE
  18681. (High)
  18682.  
  18683. Figure 13.40 (1) Synchronous DRAM Mode Write Timing
  18684.  
  18685. 371
  18686.  
  18687. ----------------------- Page 388-----------------------
  18688.  
  18689. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  18690.  
  18691. CKIO
  18692.  
  18693. Bank
  18694.  
  18695. Precharge-sel
  18696.  
  18697. Address
  18698.  
  18699. CSn
  18700.  
  18701. RD/WR
  18702.  
  18703. RAS
  18704.  
  18705. CASS
  18706.  
  18707. D31–D0
  18708.  
  18709. CKE
  18710. (High)
  18711.  
  18712. Figure 13.40 (2) Synchronous DRAM Mode Write Timing
  18713.  
  18714. 372
  18715.  
  18716. ----------------------- Page 389-----------------------
  18717.  
  18718. 1 3 . 3 . 6 Burst ROM Interface
  18719.  
  18720. Setting bits A0BST2–A0BST0, A5BST2–A5BST0, and A6BST2–A6BST0 in BCR1 to a non-
  18721. zero value allows burst ROM to be connected to areas 0, 5, and 6. The burst ROM interface
  18722. provides high-speed access to ROM that has a burst access function. The timing for burst access to
  18723. burst ROM is shown in figure 13.41. Two wait cycles are set. Basically, access is performed in
  18724. the same way as for normal space, but when the first cycle ends, only the address is changed before
  18725. the next access is executed. When 8-bit ROM is connected, the number of consecutive accesses can
  18726. be set as 4, 8, 16, or 32 with bits A0BST2–A0BST0, A5BST2–A5BST0, or A6BST2–A6BST0.
  18727. When 16-bit ROM is connected, 4, 8, or 16 can be set in the same way. When 32-bit ROM is
  18728. connected, 4 or 8 can be set.
  18729.  
  18730. RDY pin sampling is always performed when one or more wait states are set.
  18731.  
  18732. The second and subsequent access cycles also comprise two cycles when a burst ROM setting is
  18733. made and the wait specification is 0. The timing in this case is shown in figure 13.42.
  18734.  
  18735. In a ROM write operation, a basic bus cycle (write) is performed.
  18736.  
  18737. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18738. according to the set bus width. The first access is performed on the data for which there was an
  18739. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  18740. bus is not released during this period.
  18741.  
  18742. Figure 13.43 shows the timing when a burst ROM setting is made, and setup/hold is specified in
  18743. WCR3.
  18744.  
  18745. 373
  18746.  
  18747. ----------------------- Page 390-----------------------
  18748.  
  18749. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  18750.  
  18751. CKIO
  18752.  
  18753. A25–A5
  18754.  
  18755. A4–A0
  18756.  
  18757. CSn
  18758.  
  18759. RD/WR
  18760.  
  18761. RD
  18762.  
  18763. D63–D0
  18764. (read)
  18765.  
  18766. BS
  18767.  
  18768. RDY
  18769.  
  18770. DACKn
  18771. (SA: IO ← memory)
  18772.  
  18773. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18774.  
  18775. Figure 13.41 Burst ROM Basic Access Timing
  18776.  
  18777. 374
  18778.  
  18779. ----------------------- Page 391-----------------------
  18780.  
  18781. T1 Tw Tw TB2 TB1 Tw TB2 TB1 Tw TB2 TB1 Tw T2
  18782.  
  18783. CKIO
  18784.  
  18785. A25–A5
  18786.  
  18787. A4–A0
  18788.  
  18789. CSn
  18790.  
  18791. RD/WR
  18792.  
  18793. RD
  18794.  
  18795. D63–D0
  18796. (read)
  18797.  
  18798. BS
  18799.  
  18800. RDY
  18801.  
  18802. DACKn
  18803. (SA: IO ← memory)
  18804.  
  18805. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18806.  
  18807. Figure 13.42 Burst ROM Wait Access Timing
  18808.  
  18809. 375
  18810.  
  18811. ----------------------- Page 392-----------------------
  18812.  
  18813. TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  18814.  
  18815. CKIO
  18816.  
  18817. A25–A5
  18818.  
  18819. A4–A0
  18820.  
  18821. CSn
  18822.  
  18823. RD/WR
  18824.  
  18825. RD
  18826.  
  18827. D63–D0
  18828. (read)
  18829.  
  18830. BS
  18831.  
  18832. RDY
  18833.  
  18834. DACKn
  18835. (SA: IO ← memory)
  18836.  
  18837. Figure 13.43 Burst ROM Wait Access Timing
  18838.  
  18839. 1 3 . 3 . 7 PCMCIA Interface
  18840.  
  18841. In the SH7750, setting the A56PCM bit in BCR1 to 1 makes the bus interface for external space
  18842. areas 5 and 6 an IC memory card interface or I/O card interface as stipulated in JEIDA specification
  18843. version 4.2 (PCMCIA2.1).
  18844.  
  18845. Figure 13.44 shows an example of PCMCIA card connection to the SH7750. To enable active
  18846. insertion of the PCMCIA cards (i.e. insertion or removal while system power is being supplied), a
  18847. 3-state buffer must be connected between the SH7750’s bus interface and the PCMCIA cards.
  18848.  
  18849. As operation in big-endian mode is not explicitly stipulated in the JEIDA/PCMCIA specifications,
  18850. the SH7750 supports only a little-endian mode PCMCIA interface.
  18851.  
  18852. The PCMCIA interface can only be accessed when the MMU is used. PCMCIA memory space can
  18853. be set in MMU page units, and there is a choice of 8-bit common memory, 16-bit common
  18854. memory, 8-bit attribute memory, 16-bit attribute memory, 8-bit I/O space, 16-bit I/O space, or
  18855. dynamic bus sizing. The setting is made with bits SA2–SA0 in PTEA.
  18856.  
  18857. 376
  18858.  
  18859. ----------------------- Page 393-----------------------
  18860.  
  18861. SA2 SA1 SA0 Description
  18862.  
  18863. 0 0 0 Reserved (Setting prohibited)
  18864.  
  18865. 1 Dynamic I/O bus sizing
  18866.  
  18867. 1 0 8-bit I/O space
  18868.  
  18869. 1 16-bit I/O space
  18870.  
  18871. 1 0 0 8-bit common memory
  18872.  
  18873. 1 16-bit common memory
  18874.  
  18875. 1 0 8-bit attribute memory
  18876.  
  18877. 1 16-bit attribute memory
  18878.  
  18879. Wait cycles in a bus access can be selected with the TC bit in PTEA. When TC is cleared to 0,
  18880. bits A5W2–A5W0 in wait control register 2 (WCR2) and bits A5PCW1–A5PCW0, A5TED2–
  18881. A5TED0, and A5TEH2–A5TEH0 in the PCMCIA control register (PCR) are selected. When TC
  18882. is set to 1, bits A6W2–A6W0 in WCR2 and bits A6PCW1–A6PCW0, A6TED2–A6TED0, and
  18883. A6TEH2–A6TEH0 in PCR are selected.
  18884.  
  18885. AnPCW1–AnPCW0 specify the number of wait states to be inserted in a low-speed bus cycle; a
  18886. value of 0, 15, 30, or 50 can be set, and this value is added to the number of wait states for
  18887. insertion specified by WCR2. AnTED2–AnTED0 can be set to a value from 0 to 15, enabling the
  18888. address, CS, CE2A, CE2B , and REG setup times with respect to the RD and WE1 signals to be
  18889. secured. AnTEH2–AnTEH0 can also be set to a value from 0 to 15, enabling the address, CS,
  18890. CE2A, CE2B , and REG write data hold times with respect to the RD and WE1 signals to be
  18891. secured.
  18892.  
  18893. Wait cycles between cycles are set with bits A5IW2–A5IW0 and A6IW2–A6IW0 in wait control
  18894. register 1 (WCR1). The inter-cycle write cycles selected depend only on the area accessed (area 5 or
  18895. 6): when area 5 is accessed, bits A5IW2–A5IW0 are selected, and when area 6 is accessed, bits
  18896. A6IW2–A6IW0 are selected.
  18897.  
  18898. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18899. according to the set bus width. The first access is performed on the data for which there was an
  18900. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  18901. bus is not released during this period.
  18902.  
  18903. 377
  18904.  
  18905. ----------------------- Page 394-----------------------
  18906.  
  18907. A25–A0 A25–A0
  18908. D15–D0 G
  18909. RD/WR D7–D0
  18910. CE1B/(CS6)
  18911. D15–D0
  18912. CE1A/(CS5) G
  18913. DIR
  18914. CE2B
  18915. CE2A D15–D8 PC card
  18916. (memory I/O)
  18917.  
  18918. G
  18919. SH7750 DIR
  18920.  
  18921. CE1
  18922. CE2
  18923.  
  18924. RD OE
  18925. WE1 WE/PGM
  18926. ICIORD (IORD)
  18927. ICIOWR G (IOWR)
  18928.  
  18929. REG REG
  18930. WAIT
  18931. RDY
  18932.  
  18933. IOIS16 (IOIS16)
  18934. Card
  18935. detection CD1, CD2
  18936. circuit
  18937.  
  18938. Output
  18939. Port A25–A0
  18940. G
  18941. D7–D0
  18942.  
  18943. D15–D0
  18944. G
  18945. DIR
  18946.  
  18947. D15–D8 PC card
  18948.  
  18949. (memory I/O)
  18950.  
  18951. G
  18952. DIR
  18953.  
  18954. CE1
  18955. CE2
  18956. OE
  18957. WE/PGM
  18958. G REG
  18959.  
  18960. WAIT
  18961.  
  18962. Card
  18963. detection CD1, CD2
  18964. circuit
  18965.  
  18966.  
  18967. Figure 13.44 Example of PCMCIA Interface
  18968.  
  18969. 378
  18970.  
  18971. ----------------------- Page 395-----------------------
  18972.  
  18973. Memory Card Interface Basic Timing: Figure 13.45 shows the basic timing for the
  18974. PCMCIA IC memory card interface, and figure 13.46 shows the PCMCIA memory bus wait
  18975. timing.
  18976.  
  18977. Tpcm1 Tpcm2
  18978.  
  18979. CKIO
  18980.  
  18981. A25–A0
  18982.  
  18983. CExx
  18984. REG
  18985.  
  18986. RD/WR
  18987.  
  18988. RD
  18989. (read)
  18990.  
  18991. D15–D0
  18992. (read)
  18993.  
  18994. WE1
  18995. (write)
  18996.  
  18997. D15–D0
  18998. (read)
  18999.  
  19000. BS
  19001.  
  19002. Figure 13.45 Basic Timing for PCMCIA Memory Card Interface
  19003.  
  19004. 379
  19005.  
  19006. ----------------------- Page 396-----------------------
  19007.  
  19008. Tpcm0 Tpcm0w Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  19009.  
  19010. CKIO
  19011.  
  19012. A25–A0
  19013.  
  19014.  
  19015.  
  19016. CExx
  19017. REG
  19018.  
  19019. RD/WR
  19020.  
  19021. RD
  19022. (read)
  19023.  
  19024. D15–D0
  19025. (read)
  19026.  
  19027. WE1
  19028. (write)
  19029.  
  19030. D15–D0
  19031. (write)
  19032.  
  19033. BS
  19034.  
  19035. RDY
  19036.  
  19037. Figure 13.46 Wait Timing for PCMCIA Memory Card Interface
  19038.  
  19039. 380
  19040.  
  19041. ----------------------- Page 397-----------------------
  19042.  
  19043. Common memory
  19044. (64 MB)
  19045. Access Physical
  19046. by CS5 wait address space
  19047. controller Physical I/O
  19048. addresses
  19049.  
  19050. 1 kB IO 1
  19051. Virtual Access page
  19052. address space by CS6 wait IO 1
  19053. controller
  19054. Common
  19055. IO 2
  19056. memory 1
  19057.  
  19058. Card 1 Common
  19059. on CS5 memory 2
  19060. Attribute memory Attribute memory IO 2
  19061. I/O space 1 (64 MB) 1 kB Different virtual pages
  19062. I/O space 2 page mapped to the same
  19063. . physical page
  19064. .
  19065. . Example of I/O spaces with different cycle times
  19066.  
  19067. (less than 1 kB)
  19068.  
  19069. I/O space
  19070. (64 MB)
  19071.  
  19072. Card 2
  19073. on CS6
  19074. .
  19075. .
  19076. .
  19077.  
  19078. The page size can be 1 kB, 4 kB, 64 kB, or 1 MB.
  19079.  
  19080. Example of PCMCIA interface mapping
  19081.  
  19082. Figure 13.47 PCMCIA Space Allocation
  19083.  
  19084. I/O Card Interface Timing: Figures 13.48 and 13.49 show the timing for the PCMCIA I/O
  19085. card interface.
  19086.  
  19087. When an I/O card interface access is made to a PCMCIA card in little-endian mode, dynamic sizing
  19088. of the I/O bus width is possible using the IOIS16 pin. When a 16-bit bus width is set, if the
  19089. IOIS16 signal is high during a word-size I/O bus cycle, the I/O port is recognized as being 8 bits
  19090. in width. In this case, a data access for only 8 bits is performed in the I/O bus cycle being
  19091. executed, followed automatically by a data access for the remaining 8 bits.
  19092.  
  19093. Figure 13.50 shows the basic timing for dynamic bus sizing.
  19094.  
  19095. 381
  19096.  
  19097. ----------------------- Page 398-----------------------
  19098.  
  19099. Tpci1 Tpci2
  19100.  
  19101. CKIO
  19102.  
  19103. A25–A0
  19104.  
  19105. CExx
  19106. REG
  19107.  
  19108. RD/WR
  19109.  
  19110. ICIORD
  19111. (read)
  19112.  
  19113. D15–D0
  19114. (read)
  19115.  
  19116. ICIOWR
  19117. (write)
  19118.  
  19119. D15–D0
  19120. (write)
  19121.  
  19122. BS
  19123.  
  19124. Figure 13.48 Basic Timing for PCMCIA I/O Card Interface
  19125.  
  19126. 382
  19127.  
  19128. ----------------------- Page 399-----------------------
  19129.  
  19130. Tpci0 Tpci0w Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  19131.  
  19132. CKIO
  19133.  
  19134. A25–A0
  19135.  
  19136. CExx
  19137. REG
  19138.  
  19139. RD/WR
  19140.  
  19141. ICIORD
  19142. (read)
  19143.  
  19144.  
  19145. D15–D0
  19146. (read)
  19147.  
  19148. ICIOWR
  19149. (write)
  19150.  
  19151. D15–D0
  19152. (write)
  19153.  
  19154. BS
  19155.  
  19156. RDY
  19157.  
  19158. IOIS16
  19159.  
  19160. Figure 13.49 Wait Timing for PCMCIA I/O Card Interface
  19161.  
  19162. 383
  19163.  
  19164. ----------------------- Page 400-----------------------
  19165.  
  19166. Tpci0 Tpci Tpci1w Tpci2 Tpci2w Tpci0 Tpci Tpci1w Tpci2 Tpci2w
  19167.  
  19168. CKIO
  19169.  
  19170.  
  19171.  
  19172.  
  19173. A25–A1
  19174.  
  19175.  
  19176. A0
  19177.  
  19178.  
  19179.  
  19180. CExx
  19181. REG (WE7)
  19182.  
  19183.  
  19184.  
  19185.  
  19186. RD/WR
  19187.  
  19188.  
  19189.  
  19190. IORD (WE2)
  19191. (read)
  19192.  
  19193.  
  19194. D15–D0
  19195. (read)
  19196.  
  19197.  
  19198.  
  19199. IOWR (WE3)
  19200. (write)
  19201.  
  19202.  
  19203.  
  19204.  
  19205.  
  19206. D15–D0
  19207. (write)
  19208.  
  19209.  
  19210.  
  19211. BS
  19212.  
  19213.  
  19214.  
  19215.  
  19216. RDY
  19217.  
  19218. IOIS16
  19219.  
  19220.  
  19221.  
  19222.  
  19223.  
  19224.  
  19225. Figure 13.50 Dynamic Bus Sizing Timing for PCMCIA I/O Card Interface
  19226.  
  19227. 384
  19228.  
  19229. ----------------------- Page 401-----------------------
  19230.  
  19231. 1 3 . 3 . 8 MPX Interface
  19232.  
  19233. If the MD6 pin is set to 0 in a power-on reset, the MPX interface for normal memory is selected
  19234. for area 0. The MPX interface is selected for areas 1 to 6 by means of the MPX bit in BCR1. The
  19235. MPX interface offers a multiplexed address/data type bus protocol, and permits easy connection to
  19236. an external memory controller chip that uses a single 32-bit multiplexed address/data bus. The
  19237. address is output to D25–D0, and the access size to D63–D61.
  19238.  
  19239. For details of access sizes and data alignment, see section 13.3.1, Endian/Access Size and Data
  19240. Alignment.
  19241.  
  19242. The address signals output at A25–A0 are undefined.
  19243.  
  19244. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  19245. according to the set bus width. The first access is performed on the data for which there was an
  19246. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  19247. bus is not released during this period.
  19248.  
  19249. D63 D62 D61 Access Size
  19250.  
  19251. 0 0 0 Byte
  19252.  
  19253. 1 Word
  19254.  
  19255. 1 0 Longword
  19256.  
  19257. 1 Quadword
  19258.  
  19259. 1 X X 32-byte burst
  19260.  
  19261. X: Don’t care
  19262.  
  19263. SH7750 MPX device
  19264.  
  19265. CKIO CLK
  19266. CSn CS
  19267. BS BS
  19268. RD FRAME
  19269. RD/WR WE
  19270. D63–D0 I/O63–I/O0
  19271. RDY RDY
  19272.  
  19273. Figure 13.51 Example of 64-Bit Data Width MPX Connection
  19274.  
  19275. The MPX interface timing is shown below.
  19276.  
  19277. When the MPX interface is used for areas 1 to 6, a bus size of 32 or 64 bits should be specified in
  19278. BCR2.
  19279.  
  19280. 385
  19281.  
  19282. ----------------------- Page 402-----------------------
  19283.  
  19284. For wait control, waits specified by WCR2 and wait insertion by means of the RDY pin can be
  19285. used.
  19286.  
  19287. Tm1
  19288. Tmd1w Tmd1
  19289.  
  19290. CKIO
  19291.  
  19292. RD/FRAME
  19293.  
  19294. D63–D0 A D0
  19295.  
  19296. CSn
  19297.  
  19298. RD/WR
  19299.  
  19300. RDY
  19301.  
  19302. BS
  19303.  
  19304. DACKn
  19305. (DA)
  19306.  
  19307. Figure 13.52 MPX Interface Timing 1 (Single Read Cycle, No Wait)
  19308.  
  19309. 386
  19310.  
  19311. ----------------------- Page 403-----------------------
  19312.  
  19313.  
  19314. Tm1 Tmd1w Tmd1w Tmd1
  19315.  
  19316. CKIO
  19317.  
  19318. RD/FRAME
  19319.  
  19320. D63–D0 A D0
  19321.  
  19322. CSn
  19323.  
  19324. RD/WR
  19325.  
  19326. RDY
  19327.  
  19328. BS
  19329.  
  19330. DACKn
  19331. (DA)
  19332.  
  19333. Figure 13.53 MPX Interface Timing 2 (Single Read, One Internal Wait
  19334. Inserted)
  19335.  
  19336. 387
  19337.  
  19338. ----------------------- Page 404-----------------------
  19339.  
  19340.  
  19341. Tm1 Tmd1
  19342.  
  19343. CKIO
  19344.  
  19345. RD/FRAME
  19346.  
  19347. D63–D0 A D0
  19348.  
  19349. CSn
  19350.  
  19351. RD/WR
  19352.  
  19353. RDY
  19354.  
  19355. BS
  19356.  
  19357. DACKn
  19358. (DA)
  19359.  
  19360. Figure 13.54 MPX Interface Timing 3 (Single Write Cycle, No Wait)
  19361.  
  19362. 388
  19363.  
  19364. ----------------------- Page 405-----------------------
  19365.  
  19366.  
  19367. Tm1 Tmd1w Tmd1w Tmd1
  19368.  
  19369. CKIO
  19370.  
  19371. RD/FRAME
  19372.  
  19373. D63–D0 A D0
  19374.  
  19375. CSn
  19376.  
  19377. RD/WR
  19378.  
  19379. RDY
  19380.  
  19381. BS
  19382.  
  19383. DACKn
  19384. (DA)
  19385.  
  19386. Figure 13.55 MPX Interface Timing 4 (Single Write, One Internal Wait
  19387. Inserted)
  19388.  
  19389. 389
  19390.  
  19391. ----------------------- Page 406-----------------------
  19392.  
  19393. Tm1 Tmd3 Tmd4
  19394. Tmd1w Tmd1 Tmd2
  19395.  
  19396. CKIO
  19397.  
  19398. RD/FRAME
  19399.  
  19400. D63–D0 A D0 D1 D2 D3
  19401.  
  19402. CSn
  19403.  
  19404. RD/WR
  19405.  
  19406. RDY
  19407.  
  19408. BS
  19409.  
  19410. DACKn
  19411. (DA)
  19412.  
  19413. Figure 13.56 MPX Interface Timing 5 (Burst Read Cycle, No Wait)
  19414.  
  19415.  
  19416. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  19417.  
  19418. CKIO
  19419.  
  19420. RD/FRAME
  19421.  
  19422. D63–D0 A D0 D1 D2 D3
  19423.  
  19424. CSn
  19425.  
  19426. RD/WR
  19427.  
  19428. RDY
  19429.  
  19430. BS
  19431.  
  19432. DACKn
  19433. (DA)
  19434.  
  19435. Figure 13.57 MPX Interface Timing 6 (Burst Read Cycle, One Internal Wait
  19436. Inserted)
  19437.  
  19438. 390
  19439.  
  19440. ----------------------- Page 407-----------------------
  19441.  
  19442. Tm1 Tmd4
  19443. Tmd1 Tmd2 Tmd3
  19444.  
  19445. CKIO
  19446.  
  19447. RD/FRAME
  19448.  
  19449. D63–D0 A D0 D1 D2 D3
  19450.  
  19451. CSn
  19452.  
  19453. RD/WR
  19454.  
  19455. RDY
  19456.  
  19457. BS
  19458.  
  19459. DACKn
  19460. (DA)
  19461.  
  19462. Figure 13.58 MPX Interface Timing 7 (Burst Write Cycle, No Wait)
  19463.  
  19464.  
  19465. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  19466.  
  19467. CKIO
  19468.  
  19469. RD/FRAME
  19470.  
  19471. D63–D0 A D0 D1 D2 D3
  19472.  
  19473. CSn
  19474.  
  19475. RD/WR
  19476.  
  19477. RDY
  19478.  
  19479. BS
  19480.  
  19481. DACKn
  19482. (DA)
  19483.  
  19484. Figure 13.59 MPX Interface Timing 8 (Burst Write Cycle, One Internal Wait
  19485. Inserted for First Data Only)
  19486.  
  19487. 391
  19488.  
  19489. ----------------------- Page 408-----------------------
  19490.  
  19491. 1 3 . 3 . 9 Byte Control SRAM
  19492.  
  19493. The byte control SRAM interface is a memory interface that outputs a byte select strobe (WEn ) in
  19494. both read and write bus cycles. It has 16 bit data pins, and can be directly connected to SRAM
  19495. which has an upper byte select strobe and lower byte select strobe function such as UB and LB.
  19496.  
  19497. Areas 1 and 4 can be designated as byte control SRAM. However, when these areas are set to MPX
  19498. mode, MPX mode has priority.
  19499.  
  19500. The byte control SRAM write timing is the same as for the normal SRAM interface.
  19501.  
  19502. In read operations, the WEn pin timing is different. In a read access, only the WE signal for the
  19503. byte being read is asserted. Assertion is synchronized with the fall of the CKIO clock, as for the
  19504. WE signal, while negation is synchronized with the rise of the CKIO clock, using the same
  19505. timing as the RD signal.
  19506.  
  19507. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  19508. according to the set bus width. The first access is performed on the data for which there was an
  19509. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  19510. bus is not released during this period.
  19511.  
  19512. Figure 13.60 shows an example of byte control SRAM connection to the SH7750, and figures
  19513. 13.61 to 13.63 show examples of byte control SRAM bus timing.
  19514.  
  19515. 392
  19516.  
  19517. ----------------------- Page 409-----------------------
  19518.  
  19519. 64K × 16-bit
  19520. SH7750 SRAM
  19521.  
  19522. A18–A3 A15–A0
  19523. CSn CS
  19524. RD OE
  19525. RD/WR WE
  19526. D63–D48 I/O15–I/O0
  19527. WE7 UB
  19528. WE6 LB
  19529.  
  19530. A15–A0
  19531. CS
  19532. OE
  19533. WE
  19534. D47–D32 I/O15–I/O0
  19535. WE5 UB
  19536. WE4 LB
  19537.  
  19538. A15–A0
  19539. CS
  19540. OE
  19541. WE
  19542. D31–D16 I/O15–I/O0
  19543. WE3 UB
  19544. WE2 LB
  19545.  
  19546. A15–A0
  19547. CS
  19548. OE
  19549. WE
  19550. D15–D0 I/O15–I/O0
  19551. WE1 UB
  19552. WE0 LB
  19553.  
  19554. Figure 13.60 Example of 64-Bit Data Width Byte Control SRAM
  19555.  
  19556. 393
  19557.  
  19558. ----------------------- Page 410-----------------------
  19559.  
  19560. T1 T2
  19561.  
  19562. CKIO
  19563.  
  19564.  
  19565.  
  19566.  
  19567. A25–A0
  19568.  
  19569.  
  19570.  
  19571.  
  19572. CSn
  19573.  
  19574.  
  19575.  
  19576. RD/WR
  19577.  
  19578.  
  19579.  
  19580. RD
  19581.  
  19582. D63–D0
  19583.  
  19584. (read)
  19585.  
  19586.  
  19587.  
  19588.  
  19589.  
  19590. WEn
  19591.  
  19592.  
  19593.  
  19594. BS
  19595.  
  19596. RDY
  19597.  
  19598.  
  19599.  
  19600. DACKn
  19601. (SA: IO ← memory)
  19602.  
  19603.  
  19604. DACKn
  19605. (DA)
  19606.  
  19607. Figure 13.61 Byte Control SRAM Basic Read Cycle (No Wait)
  19608.  
  19609. 394
  19610.  
  19611. ----------------------- Page 411-----------------------
  19612.  
  19613. T1 Tw T2
  19614.  
  19615. CKIO
  19616.  
  19617. A25–A0
  19618.  
  19619. CSn
  19620.  
  19621. RD/WR
  19622.  
  19623. RD
  19624.  
  19625. D63–D0
  19626. (read)
  19627.  
  19628. WEn
  19629.  
  19630. BS
  19631.  
  19632. RDY
  19633.  
  19634. DACKn
  19635. (SA: IO ← memory)
  19636.  
  19637. DACKn
  19638. (DA)
  19639.  
  19640. Figure 13.62 Byte Control SRAM Basic Read Cycle (One Internal Wait
  19641. Cycle)
  19642.  
  19643. 395
  19644.  
  19645. ----------------------- Page 412-----------------------
  19646.  
  19647. T1 Tw Twe T2
  19648.  
  19649. CKIO
  19650.  
  19651. A25–A0
  19652.  
  19653. CSn
  19654.  
  19655. RD/WR
  19656.  
  19657. RD
  19658.  
  19659. D63–D0
  19660. (read)
  19661.  
  19662. WEn
  19663.  
  19664. BS
  19665.  
  19666. RDY
  19667.  
  19668. DACKn
  19669. (SA: IO ← memory)
  19670.  
  19671. DACKn
  19672. (DA)
  19673.  
  19674. Figure 13.63 Byte Control SRAM Basic Read Cycle (One Internal Wait + One
  19675. External Wait)
  19676.  
  19677. 396
  19678.  
  19679. ----------------------- Page 413-----------------------
  19680.  
  19681. 1 3 . 3 . 1 0 Waits between Access Cycles
  19682.  
  19683. A problem associated with higher external memory bus operating frequencies is that data buffer
  19684. turn-off on completion of a read from a low-speed device may be too slow, causing a collision
  19685. with the data in the next access, and so resulting in lower reliability or incorrect operation. To
  19686. avoid this problem, a data collision prevention feature has been provided. This memorizes the
  19687. preceding access area and the kind of read/write, and if there is a possibility of a bus collision when
  19688. the next access is started, inserts a wait cycle before the access cycle to prevent a data collision.
  19689. Wait cycle insertion consists of inserting idle cycles between access cycles, as shown in section
  19690. 13.2.3, Wait Control Register (WCR1). When the SH7750 performs consecutive write cycles, the
  19691. data transfer direction is fixed (from the SH7750 to other memory) and there is no problem. With
  19692. read accesses to the same area, also, in principle data is output from the same data buffer, and wait
  19693. cycle insertion is not performed. If there is originally space between accesses, according to the
  19694. setting of bits AnIW2–AnIW0 (n = 0 to 6) in WCR1, the number of idle cycles inserted is the
  19695. specified number of idle cycles minus the number of empty cycles.
  19696.  
  19697. When bus arbitration is performed, the bus is released after waits are inserted between cycles.
  19698.  
  19699. In single address mode DMA transfer, when data transfer is performed from an I/O device to
  19700. memory the data on the bus is determined by the speed of the I/O device. With a low-speed I/O
  19701. device, an inter-cycle idle wait equivalent to the output buffer turn-off time must be inserted. Even
  19702. with high-speed memory, when DMA transfer is considered, it may be necessary to insert an inter-
  19703. cycle wait to adjust to the speed of a low-speed device, preventing the memory from being used at
  19704. full speed.
  19705.  
  19706. Bits DMAIW2–DMAIW0 in wait control register 1 (WCR1) allow an inter-cycle wait setting to
  19707. be made when transferring data from an I/O device to memory using single address mode DMA
  19708. transfer. From 0 to 15 waits can be inserted. The number of waits specified by DMAIW2–
  19709. DMAIW0 are inserted in single address DMA transfers to all areas.
  19710.  
  19711. In dual address mode DMA transfer, the normal inter-cycle wait specified by AnIW2–AnIW0 (n = 0
  19712. to 6) is inserted.
  19713.  
  19714. 397
  19715.  
  19716. ----------------------- Page 414-----------------------
  19717.  
  19718. T1 T2 Twait T1 T2 Twait T1 T2
  19719.  
  19720. CKIO
  19721.  
  19722. A25–A0
  19723.  
  19724. CSm
  19725.  
  19726. CSn
  19727.  
  19728. BS
  19729.  
  19730. RD/WR
  19731.  
  19732. RD
  19733.  
  19734. D63–D0
  19735.  
  19736. Area m space read Area n space read Area n space write
  19737.  
  19738. Area m inter-access wait specification Area n inter-access wait specification
  19739.  
  19740. Figure 13.64 Waits between Access Cycles
  19741.  
  19742. 1 3 . 3 . 1 1 Bus Arbitration
  19743.  
  19744. The SH7750 is provided with a bus arbitration function that grants the bus to an external device
  19745. when it makes a bus request. Also provided is a bus arbitration function to support the connection
  19746. of two processors. The purpose of this function is to enable a multiprocessor system to be
  19747. implemented with a minimum of hardware by connecting the processors in a bus arbitration master
  19748. and slave arrangement.
  19749.  
  19750. There are three bus arbitration modes: master mode, partial-sharing master mode, and slave mode.
  19751. In master mode the bus is held on a constant basis, and is released to another device in response to
  19752. a bus request. In slave mode the bus is not held on a constant basis; a bus request is issued each
  19753. time an external bus cycle occurs, and the bus is released again at the end of the access. In partial-
  19754. sharing master mode, only area 2 is shared with external devices; slave mode is in effect for area 2,
  19755. while for other spaces, bus arbitration is not performed and the bus is held constantly. The area in
  19756. the master mode chip to which area 2 in the partial-sharing master mode chip is allocated is
  19757. determined by an external circuit.
  19758.  
  19759. 398
  19760.  
  19761. ----------------------- Page 415-----------------------
  19762.  
  19763. Master mode and slave mode can be specified by the external mode pins. Partial-sharing master
  19764. mode is entered from master mode by means of a software setting. See Appendix C, Mode Pin
  19765. Settings, for the external mode pin settings. In master mode and slave mode, the bus goes to the
  19766. high-impedance state when not being held, so that it is possible to directly connect the master
  19767. mode and slave mode chips. In partial-sharing master mode, the bus is constantly driven, and
  19768. therefore an external buffer is necessary for connection to the master bus. In master mode, it is
  19769. possible to connect an external device that issues bus requests instead of a slave mode chip. In the
  19770. following description, an external device that issues bus requests is also referred to as a slave.
  19771.  
  19772. The SH7750 has two internal bus masters: the CPU and the DMAC. When synchronous DRAM
  19773. or DRAM is connected and refresh control is performed, refresh requests constitute a third bus
  19774. master. In addition to these are bus requests from external devices in master mode. If requests occur
  19775. simultaneously, priority is given, in high-to-low order, to a bus request from an external device, a
  19776. refresh request, the DMAC, and the CPU.
  19777.  
  19778. To prevent incorrect operation of connected devices when the bus is transferred between master and
  19779. slave, all bus control signals are negated before the bus is released. When mastership of the bus is
  19780. received, also, bus control signals begin driving the bus from the negated state. Since signals are
  19781. driven to the same value by the master and slave exchanging the bus, output buffer collisions can
  19782. be avoided. By turning off the output buffer on the side releasing the bus, and turning on the
  19783. output buffer on the side receiving the bus, simultaneously with respect to the bus control signals,
  19784. it is possible to eliminate the signal high-impedance period. It is not necessary to provide the pull-
  19785. up resistors usually inserted in these control signal lines to prevent incorrect operation due to
  19786. external noise in the high-impedance state.
  19787.  
  19788. Bus transfer is executed between bus cycles.
  19789.  
  19790. When the bus release request signal (BREQ ) is asserted, the SH7750 releases the bus as soon as
  19791. the currently executing bus cycle ends, and outputs the bus use permission signal (BACK ).
  19792. However, bus release is not performed during a burst transfer for cache fill or write-back, or
  19793. between a read cycle and write cycle during execution of a TAS instruction. Also, bus arbitration is
  19794. not performed between bus cycles generated due to the fact that the data bus width is smaller than
  19795. the access size, such as when a longword access is made to 8-bit memory. When BREQ is negated,
  19796. BACK is negated and use of the bus is resumed. See Appendix E, Pin Functions, for the pin states
  19797. when the bus is released.
  19798.  
  19799. As the CPU in the SH7750 is connected to cache memory by a dedicated internal bus, reading from
  19800. cache memory can still be carried out when the bus is being used by another bus master inside or
  19801. outside the SH7750. When writing from the CPU, an external write cycle is generated when write-
  19802. through has been set for the cache in the SH7750, or when an access is made to a cache-off area.
  19803. There is consequently a delay until the bus is returned.
  19804.  
  19805. 399
  19806.  
  19807. ----------------------- Page 416-----------------------
  19808.  
  19809. When the SH7750 wants to take back the bus in response to an internal memory refresh request, it
  19810. negates BACK . On receiving the BACK negation, the device that asserted the external bus release
  19811. request negates BREQ to release the bus. The bus is thereby returned to the SH7750, which then
  19812. carries out the necessary processing.
  19813.  
  19814. CKIO
  19815.  
  19816. BREQ
  19817. BACK Asserted for at least 2 cyc
  19818.  
  19819. Negated within 2 cyc
  19820. HiZ
  19821. A25–A0
  19822.  
  19823. HiZ
  19824. CSn
  19825.  
  19826. RD/WR HiZ
  19827.  
  19828. HiZ
  19829. RD
  19830.  
  19831. HiZ
  19832. WEn
  19833.  
  19834. HiZ HiZ
  19835. D63–D0 (write)
  19836.  
  19837. HiZ
  19838. BS
  19839.  
  19840. Master mode device access
  19841.  
  19842. Must be asserted for
  19843. at least 2 cyc Must be negated within 2 cyc
  19844.  
  19845. BREQ/BSACK
  19846.  
  19847. BACK/BSREQ
  19848.  
  19849. HiZ HiZ
  19850. A25–A0
  19851.  
  19852. HiZ HiZ
  19853. CSn
  19854.  
  19855. HiZ HiZ
  19856. RD/WR
  19857.  
  19858. HiZ HiZ
  19859. RD
  19860.  
  19861. HiZ HiZ
  19862. WEn
  19863.  
  19864. HiZ HiZ
  19865. D63–D0 (write)
  19866.  
  19867. HiZ HiZ
  19868. BS
  19869.  
  19870. Slave mode device access
  19871.  
  19872. Master access Slave access Master access
  19873.  
  19874. Figure 13.65 Arbitration Sequence
  19875. 400
  19876.  
  19877. ----------------------- Page 417-----------------------
  19878.  
  19879. 1 3 . 3 . 1 2 Master Mode
  19880.  
  19881. The master mode processor holds the bus itself unless it receives a bus request.
  19882.  
  19883. On receiving an assertion (low level) of the bus request signal (BREQ ) from off-chip, the master
  19884. mode processor releases the bus and asserts (drives low) the bus use permission signal (BACK ) as
  19885. soon as the currently executing bus cycle ends. If a bus release request due to a refresh request has
  19886. not been issued, on receiving the BREQ negation (high level) indicating that the slave has released
  19887. the bus, the processor negates (drives high) the BACK signal and resumes use of the bus.
  19888.  
  19889. If a bus request is issued due to a memory refresh request in the bus-released state, the processor
  19890. negates the bus use permission signal (BACK ), and on receiving the BREQ negation indicating
  19891. that the slave has released the bus, resumes use of the bus.
  19892.  
  19893. When the bus is released, all bus interface related output signals and input/output signals go to the
  19894. high-impedance state, except for the synchronous DRAM interface CKE signal and bus arbitration
  19895. BACK signal, and DACK0 and DACK1 which control DMA transfers.
  19896.  
  19897. With DRAM, the bus is released after precharging is completed. With synchronous DRAM, also,
  19898. a precharge command is issued for the active bank and the bus is released after precharging is
  19899. completed.
  19900.  
  19901. The actual bus release sequence is as follows.
  19902.  
  19903. First, the bus use permission signal is asserted in synchronization with the rising edge of the
  19904. clock. The address bus and data bus go to the high-impedance state in synchronization with the
  19905. next rising edge of the clock after this BACK assertion. At the same time, the bus control signals
  19906. (BS, CSn, RAS1, RAS2, WEn , RD , RD/WR, RD2 , RD/WR2, CE2A, and CE2B ) go to the
  19907. high-impedance state. These bus control signals are negated no later than one cycle before going to
  19908. high-impedance. Bus request signal sampling is performed on the rising edge of the clock.
  19909.  
  19910. The sequence for re-acquiring the bus from the slave is as follows.
  19911.  
  19912. As soon as BREQ negation is detected on the rising edge of the clock, BACK is negated and bus
  19913. control signal driving is started. Driving of the address bus and data bus starts at the next rising
  19914. edge of an in-phase clock. The bus control signals are asserted and the bus cycle is actually started,
  19915. at the earliest, at the clock rising edge at which the address and data signals are driven.
  19916.  
  19917. In order to reacquire the bus and start execution of a refresh operation or bus access, theBREQ
  19918. signal must be negated for at least two cycles.
  19919.  
  19920. If a refresh request is generated when BACK has been asserted and the bus has been released, the
  19921. BACK signal is negated even while the BREQ signal is asserted to request the slave to relinquish
  19922. the bus. When the SH7750 is used in master mode, consecutive bus accesses may be attempted to
  19923. reduce the overhead due to arbitration in the case of a slave designed independently by the user.
  19924.  
  19925. 401
  19926.  
  19927. ----------------------- Page 418-----------------------
  19928.  
  19929. When connecting a slave for which the total duration of consecutive accesses exceeds the refresh
  19930. cycle, the design should provide for the bus to be released as soon as possible after negation of the
  19931. BACK signal is detected.
  19932.  
  19933. 1 3 . 3 . 1 3 Slave Mode
  19934.  
  19935. In slave mode, the bus is normally in the released state, and an external device cannot be accessed
  19936. unless the bus is acquired through execution of the bus arbitration sequence. In a reset, also, the
  19937. bus-released state is established and the bus arbitration sequence is started from the reset vector
  19938. fetch.
  19939.  
  19940. To acquire the bus, the slave device asserts (drives low) the BSREQ signal in synchronization with
  19941. the rising edge of the clock. The bus use permission BSACK signal is sampled for assertion (low
  19942. level) in synchronization with the rising edge of the clock. When BSACK assertion is detected, the
  19943. bus control signals and address bus are immediately driven at the negated level. The bus cycle is
  19944. started at the next rising edge of the clock. The last signal negated at the end of the access cycle is
  19945. synchronized with the rising edge of the clock. When the bus cycle ends, the BSREQ signal is
  19946. negated and the release of the bus is reported to the master. On the next rising edge of the clock,
  19947. the control signals are set to high-impedance.
  19948.  
  19949. In order for the slave mode processor to begin access, theBSACK signal must be asserted for at
  19950. least two cycles.
  19951.  
  19952. For a slave access cycle in DRAM or synchronous DRAM, the bus is released on completion of
  19953. precharging, as in the case of the master.
  19954.  
  19955. Refresh control is left to the master mode device, and any refresh control settings made in slave
  19956. mode are ignored.
  19957.  
  19958. Do not use DRAM/synchronous DRAM RAS down mode in slave mode.
  19959.  
  19960. Synchronous DRAM mode register settings should be made by the master mode device. Do not
  19961. use the DMAC’s DDT mode in slave mode.
  19962.  
  19963. 402
  19964.  
  19965. ----------------------- Page 419-----------------------
  19966.  
  19967. 1 3 . 3 . 1 4 Partial-Sharing Master Mode
  19968.  
  19969. In partial-sharing master mode, area 2 only is shared with other devices, and other areas can be
  19970. accessed at all times. Partial-sharing master mode can be set by setting master mode with the
  19971. external mode pins, and setting the PSHR bit to 1 in BCR1 in the initialization procedure in a
  19972. power-on reset. In a manual reset the bus state controller setting register values are retained, and so
  19973. need not be set again.
  19974.  
  19975. Partial-sharing master mode is designed for use in conjunction with a master mode chip. The
  19976. partial-sharing master can access a device on the master side via area 2, but the master cannot
  19977. access a device on the partial-sharing master side.
  19978.  
  19979. An address and control signal buffer and a data buffer must be located between the partial-sharing
  19980. master and the master, and controlled by a buffer control circuit.
  19981.  
  19982. The partial-sharing master mode processor uses the following procedure to access area 2. It asserts
  19983. the BSREQ signal on the rising edge of the clock, and issues a bus request to the master. It
  19984. samples BSACK on each rising edge of the clock, and on receiving BSACK assertion, starts the
  19985. access cycle on the next rising edge of the clock. At the end of the access, it negates BSREQ on
  19986. the rising edge of the clock. Buffer control in an access to an area 2 device by the partial-sharing
  19987. master is carried out by referencing the CS2 signal or BSREQ and BSACK signals on the partial-
  19988. sharing master side. Permission to use the bus is reported by the BSACK line connected to the
  19989. partial-sharing master, but the master may also negate the BSACK signal even while the bus is
  19990. being used, if it needs the bus urgently in order to service a refresh, for example. Consequently, the
  19991. partial-sharing master has to monitor the BSREQ signal to see whether it can continue to use the
  19992. bus after detecting BSACK assertion. In the case of the address buffer, after the address buffer is
  19993. turned on when BSACK assertion is detected, the buffer is kept on until BSREQ is negated, at
  19994. which point it is turned off. If the turning-off of the buffer used is late, resulting in a collision
  19995. with the start of an access cycle on the master side, the BSREQ signal output from the partial-
  19996. sharing master must be routed through a delay circuit as part of the buffer control circuit, and input
  19997. to the master BREQ signal.
  19998.  
  19999. In order for a partial-sharing master mode processor to begin area 2 access, theBSACK signal
  20000. must be asserted for at least two cycles.
  20001.  
  20002. When the bus is released after area 2 has been accessed in partial-sharing master mode, if area 2 is
  20003. synchronous DRAM, there is a wait of the period required for auto-precharge before bus release is
  20004. performed.
  20005.  
  20006. In partial-sharing master mode, refreshing is not performed for area 2 (refresh requests are ignored).
  20007.  
  20008. Do not use DRAM/synchronous DRAM RAS down mode in partial-sharing master mode.
  20009.  
  20010. 403
  20011.  
  20012. ----------------------- Page 420-----------------------
  20013.  
  20014. Area 2 synchronous DRAM mode register settings should be made by the master mode device. Set
  20015. partial-sharing master mode (by setting the PSHR bit to 1 in BCR1) after completion of the area 3
  20016. synchronous DRAM mode register settings.
  20017.  
  20018. In partial-sharing master mode, DMA transfer should not be performed on area 2, and the DMAC’s
  20019. DDT mode should not be used.
  20020.  
  20021. 1 3 . 3 . 1 5 Cooperation between Master and Slave
  20022.  
  20023. To enable system resources to be controlled in a harmonious fashion by master and slave, their
  20024. respective roles must be clearly defined. Before DRAM or synchronous DRAM is used,
  20025. initialization operations must be carried out. Responsibility must also be assigned when a standby
  20026. operation is performed to implement the power-down state.
  20027.  
  20028. The design of the SH7750 provides for all control, including initialization, refreshing, and standby
  20029. control, to be carried out by the master mode device. In a dual-processor configuration using direct
  20030. master/slave connection, all processing except direct access to memory is handled by the master. In
  20031. a combination of master mode and partial-sharing master mode, the partial-sharing master mode
  20032. processor performs initialization, refreshing, and standby control for the areas connected to it, with
  20033. the exception of area 2, while the master performs initialization of the memory connected to it.
  20034.  
  20035. If the SH7750 is specified as the master in a power-on reset, it will not accept bus requests from
  20036. the slave until the BREQ enable bit (BCR1.BREQEN) is set to 1.
  20037.  
  20038. To ensure that the slave processor does not access memory requiring initialization before use, such
  20039. as DRAM and synchronous DRAM, until initialization is completed, write 1 to the BREQ enable
  20040. bit after initialization ends.
  20041.  
  20042. Before setting self-refresh mode in standby mode, etc., write 0 to the BREQ enable bit to
  20043. invalidate the BREQ signal from the slave. Write 1 to the BREQ enable bit only after the master
  20044. has performed the necessary processing (refresh settings, etc.) for exiting self-refresh mode.
  20045.  
  20046. 404
  20047.  
  20048. ----------------------- Page 421-----------------------
  20049.  
  20050. Section 14 Direct Memory Access Controller (DMAC)
  20051.  
  20052. 1 4 . 1 Overview
  20053.  
  20054. The SH7750 includes an on-chip four-channel direct memory access controller (DMAC). The
  20055. DMAC can be used in place of the CPU to perform high-speed data transfers among external
  20056. devices equipped with DACK (DMA transfer end notification), external memories, memory-
  20057. mapped external devices, and on-chip peripheral modules (except the DMAC, BSC, and UBC).
  20058. Using the DMAC reduces the burden on the CPU and increases the operating efficiency of the
  20059. chip.
  20060.  
  20061. 1 4 . 1 . 1 Features
  20062.  
  20063. The DMAC has the following features.
  20064.  
  20065. • Four channels
  20066.  
  20067. • Physical address space
  20068.  
  20069. • Choice of 8-bit, 16-bit, 32-bit, 64-bit, or 32-byte transfer data length
  20070.  
  20071. • Maximum of 16 M (16,777,216) transfers
  20072.  
  20073. • Choice of single or dual address mode
  20074.  
  20075.  Single address mode: Either the transfer source or the transfer destination (peripheral device)
  20076. is accessed by a DACK signal while the other is accessed by address. One data transfer is
  20077. completed in one bus cycle.
  20078.  
  20079.  Dual address mode: Both the transfer source and transfer destination are accessed by address.
  20080. Values set in DMAC internal registers indicate the accessed address for both the transfer
  20081. source and the transfer destination. Two bus cycles are required for one data transfer.
  20082.  
  20083. • Channel functions: Transfer modes that can be set are different for each channel.
  20084.  
  20085.  Channel 0: Single or dual address mode. External requests are accepted.
  20086.  
  20087.  Channel 1: Single or dual address mode. External requests are accepted.
  20088.  
  20089.  Channel 2: Dual address mode only.
  20090.  
  20091.  Channel 3: Dual address mode only.
  20092.  
  20093. • Transfer requests: The following three DMAC transfer activation requests are supported.
  20094.  
  20095.  External request: From two DREQ pins. Either low level detection or falling edge detection
  20096. can be specified. External requests can be accepted on channels 0 and 1 only.
  20097.  
  20098.  Requests from on-chip peripheral modules: Transfer requests from modules such as the SCI
  20099. and TMU. These can be accepted on all channels.
  20100.  
  20101.  Auto-request: The transfer request is generated automatically within the DMAC.
  20102.  
  20103. • Choice of bus mode: Cycle steal mode or burst mode
  20104.  
  20105. • Two types of DMAC channel priority ranking:
  20106.  
  20107. 405
  20108.  
  20109. ----------------------- Page 422-----------------------
  20110.  
  20111.  Fixed priority mode: Channel priorities are permanently fixed.
  20112.  
  20113.  Round robin mode: Sets the lowest priority for the channel for which an execution request
  20114. was last accepted.
  20115.  
  20116. • An interrupt request can be sent to the CPU on completion of the specified number of transfers.
  20117.  
  20118. • On-demand data transfer mode (DDT mode)
  20119.  
  20120. In this mode, interfacing between an external device and the DMAC is performed using the
  20121. DBREQ , BAVL, TR , TDACK, and ID [1:0] pins. External requests can be accepted on all four
  20122. channels.
  20123.  
  20124. For channel 0, data transfer can be carried out with the transfer mode, number of transfers,
  20125. transfer address (single only), etc., specified by the external device.
  20126.  
  20127. For channels 1 to 3, when transfer is performed by means of an on-chip peripheral module
  20128. request or auto-request, the operation is the same as in the normal mode. On these channels,
  20129. data transfer can be initiated by an external request.
  20130.  
  20131.  Channel 0: Single address mode. External requests are accepted
  20132.  
  20133.  Channel 1: Single or dual address mode. External requests are accepted.
  20134.  
  20135.  Channel 2: Single or dual address mode. External requests are accepted.
  20136.  
  20137.  Channel 3: Single or dual address mode. External requests are accepted.
  20138.  
  20139. In DDT mode, data transfer is carried out using the DBREQ , BAVL, TR , TDACK, and ID
  20140. [1:0] signals to perform handshaking between the external device and the DMAC.
  20141.  
  20142. 406
  20143.  
  20144. ----------------------- Page 423-----------------------
  20145.  
  20146. 1 4 . 1 . 2 Block Diagram
  20147.  
  20148. Figure 14.1 shows a block diagram of the DMAC.
  20149.  
  20150. DMAC module
  20151.  
  20152. Count
  20153. control SARn
  20154.  
  20155. Register DARn
  20156. control
  20157.  
  20158. s DMATCRn
  20159. u s
  20160. b u Activation
  20161.  
  20162. On-chip l b
  20163. a l control
  20164. r a
  20165. peripheral e n CHCRn
  20166. h r
  20167. module p e
  20168. i t
  20169. r n
  20170. e I
  20171. P
  20172. DMAOR
  20173. Request
  20174. TMU
  20175. priority
  20176. SCI, SCIF
  20177. control
  20178.  
  20179. DACK0, DACK1
  20180. DRAK0, DRAK1
  20181.  
  20182. Bus
  20183. interface
  20184.  
  20185. s
  20186. p s
  20187. i e
  20188. h r
  20189. c- d SAR0, DAR0, DMATCR0,
  20190. n d
  20191. o a dreq0-3 CHCR0 only
  20192. / e
  20193. s l
  20194. s u
  20195. e d
  20196. r o
  20197. d
  20198. d m DDT module
  20199. a l
  20200.  
  20201. l a
  20202. DREQ0, DREQ1 a r
  20203. n e DTR command buffer
  20204. r h
  20205. e p
  20206. t i
  20207. x r
  20208. E e
  20209. BAVL p
  20210. 32B data CH0 CH1 CH2 CH3
  20211. buffer DBREQ
  20212. External bus
  20213. Bus state DDTMODE Request controller
  20214. ID[1:0]
  20215. controller BAVL
  20216. TDACK DDTD
  20217. 48 bits
  20218. DMAOR: DMAC operation register id[1:0] TR DBREQ
  20219. SARn: DMAC source address
  20220. tdack
  20221. register
  20222. DARn: DMAC destination address register
  20223. DMATCRn: DMAC transfer count register
  20224. CHCRn: DMAC channel control register
  20225. (n: 0 to 3)
  20226.  
  20227. Figure 14.1 Block Diagram of DMAC
  20228.  
  20229. 407
  20230.  
  20231. ----------------------- Page 424-----------------------
  20232.  
  20233. 1 4 . 1 . 3 Pin Configuration
  20234.  
  20235. Tables 14.1 and 14.2 show the DMAC pins.
  20236.  
  20237. Table 14.1DMAC Pins
  20238.  
  20239. Channel Pin Name Abbreviation I / O Function
  20240.  
  20241. 0 DMA transfer DREQ0 Input DMA transfer request input from
  20242. request external device to channel 0
  20243.  
  20244. DREQ acceptance DRAK0 Output Acceptance of request for DMA
  20245. confirmation transfer from channel 0 to external
  20246. device
  20247.  
  20248. Notification to external device of start
  20249. of execution
  20250.  
  20251. DMA transfer end DACK0 Output Strobe output to external device of
  20252. notification DMA transfer request from channel 0
  20253. to external device
  20254.  
  20255. 1 DMA transfer DREQ1 Input DMA transfer request input from
  20256. request external device to channel 1
  20257.  
  20258. DREQ acceptance DRAK1 Output Acceptance of request for DMA
  20259. confirmation transfer from channel 1 to external
  20260. device
  20261.  
  20262. Notification to external device of start
  20263. of execution
  20264.  
  20265. DMA transfer end DACK1 Output Strobe output to external device of
  20266. notification DMA transfer request from channel 1
  20267. to external device
  20268.  
  20269. 408
  20270.  
  20271. ----------------------- Page 425-----------------------
  20272.  
  20273. Table 14.2DMAC Pins in DDT Mode
  20274.  
  20275. Pin Name Abbreviation I / O Function
  20276.  
  20277. Data bus request DBREQ Input Data bus release request from external
  20278. (DREQ0 ) device for DTR format input
  20279.  
  20280. Data bus available BAVL Output Data bus release notification
  20281. (DRAK0) Data bus can be used 2 cycles after
  20282.  
  20283. BAVL is asserted
  20284.  
  20285. Transfer request signal TR Input If asserted 2 cycles after BAVL
  20286. (DREQ1 ) assertion, DTR format is sent
  20287.  
  20288. Only TR asserted: DMA request
  20289.  
  20290. DBREQ and TR asserted
  20291. simultaneously: Direct request to
  20292. channel 2
  20293.  
  20294. DMAC strobe TDACK Output Reply strobe signal for external device
  20295. (DACK0) from DMAC
  20296.  
  20297. Channel number ID [1:0] Output Notification of channel number to
  20298. notification (DRAK1, DACK1) external device at same time as TDACK
  20299. output
  20300.  
  20301. (ID [1] = DRAK1, ID [0] = DACK1)
  20302.  
  20303. 1 4 . 1 . 4 Register Configuration
  20304.  
  20305. Table 14.3 summarizes the DMAC registers. The DMAC has a total of 17 registers: four registers
  20306. are allocated to each channel, and an additional control register is shared by all four channels.
  20307.  
  20308. Table 14.3DMAC Registers
  20309.  
  20310. Chan Abbre- Read/ Area 7 Acces
  20311. nel Name viation Write Initial P 4 Address s Size
  20312. Value Address
  20313. 0 DMA source SAR0 R/W*2 Undefined H'FFA00000 H'1FA00000 32
  20314.  
  20315. address register 0
  20316. DMA destination DAR0 R/W*2 Undefined H'FFA00004 H'1FA00004 32
  20317.  
  20318. address register 0
  20319. DMA transfer DMATCR0 R/W*2 Undefined H'FFA00008 H'1FA00008 32
  20320.  
  20321. count register 0
  20322.  
  20323. 1, 2
  20324. DMA channel CHCR0 R/W* * H'00000000 H'FFA0000C H'1FA0000C 32
  20325. control register 0
  20326.  
  20327. 409
  20328.  
  20329. ----------------------- Page 426-----------------------
  20330.  
  20331. Table 14.3DMAC Registers
  20332.  
  20333. Chan Abbre- Read/ Area 7 Acces
  20334. nel Name viation Write Initial P 4 Address s Size
  20335. Value Address
  20336.  
  20337. 1 DMA source SAR1 R/W Undefined H'FFA00010 H'1FA00010 32
  20338. address register 1
  20339.  
  20340. DMA destination DAR1 R/W Undefined H'FFA00014 H'1FA00014 32
  20341. address register 1
  20342.  
  20343. DMA transfer DMATCR1 R/W Undefined H'FFA00018 H'1FA00018 32
  20344. count register 1
  20345. DMA channel CHCR1 R/W*1 H'00000000 H'FFA0001C H'1FA0001C 32
  20346.  
  20347. control register 1
  20348.  
  20349. 2 DMA source SAR2 R/W Undefined H'FFA00020 H'1FA00020 32
  20350. address register 2
  20351.  
  20352. DMA destination DAR2 R/W Undefined H'FFA00024 H'1FA00024 32
  20353. address register 2
  20354.  
  20355. DMA transfer DMATCR2 R/W Undefined H'FFA00028 H'1FA00028 32
  20356. count register 2
  20357. DMA channel CHCR2 R/W*1 H'00000000 H'FFA0002C H'1FA0002C 32
  20358.  
  20359. control register 2
  20360.  
  20361. 3 DMA source SAR3 R/W Undefined H'FFA00030 H'1FA00030 32
  20362. address register 3
  20363.  
  20364. DMA destination DAR3 R/W Undefined H'FFA00034 H'1FA00034 32
  20365. address register 3
  20366.  
  20367. DMA transfer DMATCR3 R/W Undefined H'FFA00038 H'1FA00038 32
  20368. count register 3
  20369. DMA channel CHCR3 R/W*1 H'00000000 H'FFA0003C H'1FA0003C 32
  20370.  
  20371. control register 3
  20372. Com- DMA operation DMAOR R/W*1 H'00000000 H'FFA00040 H'1FA00040 32
  20373.  
  20374. mon register
  20375.  
  20376. Notes: Longword access should be used for all control registers. If a different access width is
  20377. used, reads will return all 0s and writes will not be possible.
  20378. 1. Bit 1 of CHCR0–CHCR3 and bits 2 and 1 of DMAOR can only be written with 0 after being
  20379. read as 1, to clear the flags.
  20380. 2. In DDT mode, writes from the CPU are masked. Writes from external devices using the
  20381. DTR format are possible.
  20382.  
  20383. 410
  20384.  
  20385. ----------------------- Page 427-----------------------
  20386.  
  20387. 1 4 . 2 Register Descriptions
  20388.  
  20389. 1 4 . 2 . 1 DMA Source Address Registers 0–3 (SAR0–SAR3)
  20390.  
  20391. Bit: 31 30 29 28 27 26 25 24
  20392.  
  20393. Initial value: — — — — — — — —
  20394.  
  20395. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20396.  
  20397. Bit: 23 0
  20398.  
  20399. · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · ·
  20400. ·· · ·
  20401.  
  20402. Initial value: — · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · —
  20403. ·· · ·
  20404.  
  20405. R/W: R/W · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · R/W
  20406. ·· · ·
  20407.  
  20408. DMA source address registers 0–3 (SAR0–SAR3) are 32-bit readable/writable registers that specify
  20409. the source address of a DMA transfer. These registers have a counter feedback function, and during
  20410. a DMA transfer they indicate the next source address. In single address mode, the SAR value is
  20411. ignored when a device with DACK has been specified as the transfer source.
  20412.  
  20413. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit, 64-
  20414. bit, or 32-byte data transfer, respectively. If a different address is specified, an address error will be
  20415. detected and the DMAC will halt.
  20416.  
  20417. The initial value of these registers after a power-on or manual reset is undefined. They retain their
  20418. values in standby mode and deep sleep mode.
  20419.  
  20420. When transfer is performed from memory to an external device in DDT mode, DTR format [31:0]
  20421. is set in SAR0 [31:0].
  20422.  
  20423. 411
  20424.  
  20425. ----------------------- Page 428-----------------------
  20426.  
  20427. 1 4 . 2 . 2 DMA Destination Address Registers 0–3 (DAR0–DAR3)
  20428.  
  20429. Bit: 31 30 29 28 27 26 25 24
  20430.  
  20431. Initial value: — — — — — — — —
  20432.  
  20433. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20434.  
  20435. Bit: 23 0
  20436.  
  20437. · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · ·
  20438. ·· · ·
  20439.  
  20440. Initial value: — · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · —
  20441. ·· · ·
  20442.  
  20443. R/W: R/W · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · R/W
  20444. ·· · ·
  20445.  
  20446. DMA destination address registers 0–3 (DAR0–DAR3) are 32-bit readable/writable registers that
  20447. specify the destination address of a DMA transfer. These registers have a counter feedback function,
  20448. and during a DMA transfer they indicate the next destination address. In single address mode, the
  20449. DAR value is ignored when a device with DACK has been specified as the transfer destination.
  20450.  
  20451. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit, 64-
  20452. bit, or 32-byte data transfer, respectively. If a different address is specified, an address error will be
  20453. detected and the DMAC will halt.
  20454.  
  20455. The initial value of these registers after a power-on or manual reset is undefined. They retain their
  20456. values in standby mode and deep sleep mode.
  20457.  
  20458. When transfer is performed from an external device to memory in DDT mode, DTR format [31:0]
  20459. is set in DAR0 [31:0].
  20460.  
  20461. Note: When a 16-bit, 32-bit, 64-bit, or 32-byte boundary address is specified, take care
  20462. with the setting of bit 0, bits 1–0, bits 2–0, or bits 4–0, respectively. If an address
  20463. specification that ignores boundary considerations is made, the DMAC will detect an
  20464. address error and halt operation on all channels (DMAOR: address error flag AE = 1). The
  20465. DMAC will also detect an address error and halt if an area 7 address is specified in an
  20466. external data bus transfer, or if the address of a nonexistent on-chip peripheral module is
  20467. specified.
  20468.  
  20469. 412
  20470.  
  20471. ----------------------- Page 429-----------------------
  20472.  
  20473. 1 4 . 2 . 3 DMA Transfer Count Registers 0–3 (DMATCR0–DMATCR3)
  20474.  
  20475. Bit: 31 30 29 28 27 26 25 24
  20476.  
  20477. Initial value: 0 0 0 0 0 0 0 0
  20478.  
  20479. R/W: R R R R R R R R
  20480.  
  20481. Bit: 23 22 21 20 19 18 17 16
  20482.  
  20483. Initial value: — — — — — — — —
  20484.  
  20485. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20486.  
  20487. Bit: 15 14 13 12 11 10 9 8
  20488.  
  20489. Initial value: — — — — — — — —
  20490.  
  20491. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20492.  
  20493. Bit: 7 6 5 4 3 2 1 0
  20494.  
  20495. Initial value: — — — — — — — —
  20496.  
  20497. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20498.  
  20499. DMA transfer count registers 0–3 (DMATCR0–DMATCR3) are 32-bit readable/writable registers
  20500. that specify the transfer count for the corresponding channel (byte count, word count, longword
  20501. count, quadword count, or 32-byte count). Specifying H'000001 gives a transfer count of 1, while
  20502. H'000000 gives the maximum setting, 16,777,216 (16M) transfers. During DMAC operation, the
  20503. remaining number of transfers is shown.
  20504.  
  20505. Bits 31–24 of these registers are reserved; they are always read as 0, and should only be written
  20506. with 0.
  20507.  
  20508. The initial value of these registers after a power-on or manual reset is undefined. They retain their
  20509. values in standby mode and deep sleep mode.
  20510.  
  20511. In DDT mode, DTR format [55:48] is set in DMATCR0 [7:0]
  20512.  
  20513. 413
  20514.  
  20515. ----------------------- Page 430-----------------------
  20516.  
  20517. 1 4 . 2 . 4 DMA Channel Control Registers 0–3 (CHCR0–CHCR3)
  20518.  
  20519. Bit: 31 30 29 28 27 26 25 24
  20520.  
  20521. SSA2 SSA1 SSA0 STC DSA2 DSA1 DSA0 DTC
  20522.  
  20523. Initial value: 0 0 0 0 0 0 0 0
  20524.  
  20525. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20526.  
  20527. Bit: 23 22 21 20 19 18 17 16
  20528.  
  20529. — — — — DS RL AM AL
  20530.  
  20531. Initial value: 0 0 0 0 — — — —
  20532.  
  20533. R/W: R R R R R/W (R/W) R/W (R/W)
  20534.  
  20535. Bit: 15 14 13 12 11 10 9 8
  20536.  
  20537. DM1 DM0 SM1 SM0 RS3 RS2 RS1 RS0
  20538.  
  20539. Initial value: 0 0 0 0 0 0 0 0
  20540.  
  20541. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20542.  
  20543. Bit: 7 6 5 4 3 2 1 0
  20544.  
  20545. TM TS2 TS1 TS0 — IE TE DE
  20546.  
  20547. Initial value: 0 0 0 0 0 0 0 0
  20548.  
  20549. R/W: R/W R/W R/W R/W R R/W R/(W) R/W
  20550.  
  20551. Note: The TE bit can only be written with 0 after being read as 1, to clear the flag.
  20552. The RL, AM, AL, and DS bits may be absent, depending on the channel.
  20553.  
  20554. DMA channel control registers 0–3 (CHCR0–CHCR3) are 32-bit readable/writable registers that
  20555. specify the operating mode, transfer method, etc., for each channel. Bits 31–28 and 27–24 indicate
  20556. the source address and destination address, respectively; these settings are only valid when the
  20557. transfer involves the CS5 or CS6 space and the relevant space has been specified as a PCMCIA
  20558. interface space. In other cases, these bits should be cleared to 0. For details of the PCMCIA
  20559. interface, see section 13.3.7, PCMCIA Interface, in section 13, Bus State Controller (BSC).
  20560.  
  20561. In DDT mode, CHCR0 is set according to the DTR format. (The following settings are fixed:
  20562. CHCR0 [31:24] = 0, [18:16] = 0, [2] = 0, [1] = 0, [0] = 1)
  20563.  
  20564. Bits 18 and 16 are not present in CHCR2 and CHCR3. In CHCR2 and CHCR3, these bits cannot
  20565. be modified (a write value of 0 should always be used) and are always read as 0.
  20566.  
  20567. These registers are initialized to H'00000000 by a power-on or manual reset. They retain their
  20568. values in standby mode and deep sleep mode.
  20569.  
  20570. 414
  20571.  
  20572. ----------------------- Page 431-----------------------
  20573.  
  20574. Bits 31 to 29—Source Address Space Attribute Specification (SSA2–SSA0):
  20575. These bits specify the space attribute for PCMCIA access. These bits are only valid in the case of
  20576. page mapping to PCMCIA connected to areas 5 and 6.
  20577.  
  20578. Bit 31: SSA2 Bit 30: SSA1 Bit 29: SSA0 Description
  20579.  
  20580. 0 0 0 Reserved in PCMCIA access (Initial value)
  20581.  
  20582. 1 Dynamic bus sizing I/O space
  20583.  
  20584. 1 0 8-bit I/O space
  20585.  
  20586. 1 16-bit I/O space
  20587.  
  20588. 1 0 0 8-bit common memory space
  20589.  
  20590. 1 16-bit common memory space
  20591.  
  20592. 1 0 8-bit attribute memory space
  20593.  
  20594. 1 16-bit attribute memory space
  20595.  
  20596. Bit 28—Source Address Wait Control Select (STC): Specifies CS5 or CS6 space wait
  20597. control for PCMCIA access. This bit selects the wait control register in the BSC that performs
  20598. area 5 and 6 wait cycle control.
  20599.  
  20600. Bit 28: STC Description
  20601.  
  20602. 0 C5 space wait cycle selection (Initial value)
  20603.  
  20604. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  20605. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  20606. PCMCIA control register (PCR), are selected
  20607.  
  20608. 1 C6 space wait cycle selection
  20609.  
  20610. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  20611. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  20612. PCMCIA control register (PCR), are selected
  20613.  
  20614. Note: For details, see section 13.3.7, PCMCIA Interface.
  20615.  
  20616. 415
  20617.  
  20618. ----------------------- Page 432-----------------------
  20619.  
  20620. Bits 27 to 25—Destination Address Space Attribute Specification (DSA2–
  20621. DSA0): These bits specify the space attribute for PCMCIA access. These bits are only valid in
  20622. the case of page mapping to PCMCIA connected to areas 5 and 6.
  20623.  
  20624. Bit 27: DSA2 Bit 26: DSA1 Bit 25: DSA0 Description
  20625.  
  20626. 0 0 0 Reserved in PCMCIA access (Initial value)
  20627.  
  20628. 1 Dynamic bus sizing I/O space
  20629.  
  20630. 1 0 8-bit I/O space
  20631.  
  20632. 1 16-bit I/O space
  20633.  
  20634. 1 0 0 8-bit common memory space
  20635.  
  20636. 1 16-bit common memory space
  20637.  
  20638. 1 0 8-bit attribute memory space
  20639.  
  20640. 1 16-bit attribute memory space
  20641.  
  20642. Bit 24—Destination Address Wait Control Select (DTC): Specifies CS5 or CS6
  20643. space wait cycle control for PCMCIA access. This bit selects the wait control register in the BSC
  20644. that performs area 5 and 6 wait cycle control.
  20645.  
  20646. Bit 24: DTC Description
  20647.  
  20648. 0 C5 space wait cycle selection (Initial value)
  20649.  
  20650. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  20651. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  20652. PCMCIA control register (PCR), are selected
  20653.  
  20654. 1 C6 space wait cycle selection
  20655.  
  20656. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  20657. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  20658. PCMCIA control register (PCR), are selected
  20659.  
  20660. Note: For details, see section 13.3.7, PCMCIA Interface.
  20661.  
  20662. Bits 23 to 20—Reserved: These bits are always read as 0, and should only be written with 0.
  20663.  
  20664. Bit 19—DREQ Select (DS): Specifies either low level detection or falling edge detection as
  20665. the sampling method for the DREQ pin used in external request mode.
  20666.  
  20667. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  20668. CHCR0–CHCR3.
  20669.  
  20670. Bit 19: DS Description
  20671.  
  20672. 0 Low level detection (Initial value)
  20673.  
  20674. 1 Falling edge detection
  20675.  
  20676. 416
  20677.  
  20678. ----------------------- Page 433-----------------------
  20679.  
  20680. Bit 18—Request Check Level (RL): Selects whether the DRAK signal (that notifies an
  20681. external device of the acceptance of DREQ) is an active-high or active-low output.
  20682.  
  20683. This bit is valid only in CHCR0 and CHCR1.
  20684.  
  20685. Bit 18: RL Description
  20686.  
  20687. 0 DRAK is an active-high output (Initial value)
  20688.  
  20689. 1 DRAK is an active-low output
  20690.  
  20691. Bit 17—Acknowledge Mode (AM): In dual address mode, selects whether DACK is output
  20692. in the data read cycle or write cycle. In single address mode, DACK is always output regardless of
  20693. the setting of this bit.
  20694.  
  20695. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  20696. CHCR1–CHCR3.
  20697.  
  20698. Bit 17: AM Description
  20699.  
  20700. 0 DACK is output in read cycle (Initial value)
  20701.  
  20702. 1 DACK is output in write cycle
  20703.  
  20704. Bit 16—Acknowledge Level (AL): Specifies the DACK (acknowledge) signal as active-
  20705. high or active-low.
  20706.  
  20707. This bit is valid only in CHCR0 and CHCR1.
  20708.  
  20709. Bit 16: AL Description
  20710.  
  20711. 0 Active-high output (Initial value)
  20712.  
  20713. 1 Active-low output
  20714.  
  20715. 417
  20716.  
  20717. ----------------------- Page 434-----------------------
  20718.  
  20719. Bits 15 and 14—Destination Address Mode 1 and 0 (DM1, DM0): These bits
  20720. specify incrementing/decrementing of the DMA transfer destination address. The specification of
  20721. these bits is ignored when data is transferred from external memory to an external device in single
  20722. address mode. For channel 0, in DDT mode, the settings are fixed at DM1 = 0 and DM0 = 1.
  20723.  
  20724. Bit 15: DM1 Bit 14: DM0 Description
  20725.  
  20726. 0 0 Destination address fixed (Initial value)
  20727.  
  20728. 1 Destination address incremented (+1 in 8-bit transfer, +2 in 16-
  20729. bit transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in 32-
  20730. byte burst transfer)
  20731.  
  20732. 1 0 Destination address decremented (–1 in 8-bit transfer, –2 in 16-
  20733. bit transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in 32-
  20734. byte burst transfer)
  20735.  
  20736. 1 Setting prohibited
  20737.  
  20738. Bits 13 and 12—Source Address Mode 1 and 0 (SM1, SM0): These bits specify
  20739. incrementing/decrementing of the DMA transfer source address. The specification of these bits is
  20740. ignored when data is transferred from an external device to external memory in single address mode.
  20741. For channel 0, in DDT mode the settings are fixed at SM1 = 0 and SM0 = 1.
  20742.  
  20743. Bit 13: SM1 Bit 12: SM0 Description
  20744.  
  20745. 0 0 Source address fixed (Initial value)
  20746.  
  20747. 1 Source address incremented (+1 in 8-bit transfer, +2 in 16-bit
  20748. transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in 32-
  20749. byte burst transfer)
  20750.  
  20751. 1 0 Source address decremented (–1 in 8-bit transfer, –2 in 16-bit
  20752. transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in 32-
  20753. byte burst transfer)
  20754.  
  20755. 1 Setting prohibited
  20756.  
  20757. 418
  20758.  
  20759. ----------------------- Page 435-----------------------
  20760.  
  20761. Bits 11 to 8—Resource Select 3 to 0 (RS3–RS0): These bits specify the transfer
  20762. request source.
  20763.  
  20764. Bit 11: Bit 10: Bit 9: Bit 8:
  20765. RS3 RS2 RS1 RS0 Description
  20766.  
  20767. 1
  20768. 0 0 0 0 External request, dual address mode* (external address space
  20769. → external address space) (Initial value)
  20770.  
  20771. 1 Setting prohibited
  20772.  
  20773. 1 0 External request, single address mode
  20774.  
  20775. 1, 3, 4
  20776. External address space → external device* * *
  20777.  
  20778. 1 External request, single address mode
  20779.  
  20780. 1, 3, 4
  20781. External device → external address space* * *
  20782.  
  20783. 1 0 0 Auto-request (external address space → external address
  20784. space)*2
  20785.  
  20786. 1 Auto-request (external address space → on-chip peripheral
  20787. module)*2
  20788.  
  20789. 1 0 Auto-request (on-chip peripheral module → external address
  20790. space)*2
  20791.  
  20792. 1 Setting prohibited
  20793.  
  20794. 1 0 0 0 SCI transmit-data-empty interrupt transfer request
  20795. (external address space → SCTDR1)*2
  20796.  
  20797. 1 SCI receive-data-full interrupt transfer request
  20798. (SCRDR1 → external address space)*2
  20799.  
  20800. 1 0 SCIF transmit-data-empty interrupt transfer request
  20801. (external address space → SCFTDR2)*2
  20802.  
  20803. 1 SCIF receive-data-full interrupt transfer request
  20804. (SCFRDR2 → external address space)*2
  20805.  
  20806. 1 0 0 TMU channel 2 (input capture interrupt, external address space
  20807. → external address space)*2
  20808.  
  20809. 1 TMU channel 2 (input capture interrupt)
  20810. (external address space → on-chip peripheral module)*2
  20811.  
  20812. 1 0 TMU channel 2 (input capture interrupt)
  20813. (on-chip peripheral module → external address space)*2
  20814.  
  20815. 1 Setting prohibited
  20816.  
  20817. Notes: 1. External request specifications are valid only for channels 0 and 1. Requests are not
  20818. accepted for channels 2 and 3 in normal DMA mode.
  20819. 2. Dual address mode
  20820. 3. In DDT mode, selection is possible with the DTR format [60] (R/W bit) specification for
  20821. channel 0 only.
  20822. 4. In DDT mode, an external request specification should be made for channels 1, 2, and
  20823. 3. Only DTR format setting is possible for channel 0.
  20824.  
  20825. 419
  20826.  
  20827. ----------------------- Page 436-----------------------
  20828.  
  20829. Bit 7—Transmit Mode (TM): Specifies the bus mode for transfer.
  20830.  
  20831. Bit 7: TM Description
  20832.  
  20833. 0 Cycle steal mode (Initial value)
  20834.  
  20835. 1 Burst mode
  20836.  
  20837. Setting possible with DTR format [57:55] (MD bits)
  20838.  
  20839. Bits 6 to 4—Transmit Size 2 to 0 (TS2–TS0): These bits specify the transfer data size.
  20840.  
  20841. Bit 6: TS2 Bit 5: TS1 Bit 4: TS0 Description
  20842.  
  20843. 0 0 0 Quadword size (64-bit) specification(Initial value)
  20844.  
  20845. 1 Byte size (8-bit) specification
  20846.  
  20847. 1 0 Word size (16-bit) specification
  20848.  
  20849. 1 Longword size (32-bit) specification
  20850.  
  20851. 1 0 0 32-byte block transfer specification
  20852.  
  20853. Setting possible with DTR format [63:61] (SZ bits)
  20854.  
  20855. Bit 3—Reserved: This bit is always read as 0, and should only be written with 0.
  20856.  
  20857. Bit 2—Interrupt Enable (IE): When this bit is set to 1, an interrupt request (DMTE) is
  20858. generated after the number of data transfers specified in DMATCR (when TE = 1).
  20859.  
  20860. Bit 2: IE Description
  20861.  
  20862. 0 Interrupt request not generated after number of transfers specified in
  20863. DMATCR (Initial value) (CHCR0 only fixed in DDT mode)
  20864.  
  20865. 1 Interrupt request generated after number of transfers specified in DMATCR
  20866.  
  20867. 420
  20868.  
  20869. ----------------------- Page 437-----------------------
  20870.  
  20871. Bit 1—Transfer End (TE): This bit is set to 1 after the number of transfers specified in
  20872. DMATCR. If the IE bit is set to 1 at this time, an interrupt request (DMTE) is generated.
  20873.  
  20874. If data transfer ends before TE is set to 1 (for example, due to an NMI interrupt, address error, or
  20875. clearing of the DE bit or the DME bit in DMAOR), the TE bit is not set to 1. When this bit is 1,
  20876. the transfer enabled state is not entered even if the DE bit is set to 1.
  20877.  
  20878. Bit 1: TE Description
  20879.  
  20880. 0 Number of transfers specified in DMATCR not completed (Initial value)
  20881.  
  20882. [Clearing conditions]
  20883.  
  20884. 〈 When 0 is written to TE after reading TE = 1
  20885.  
  20886. 〈 In a power-on or manual reset, and in standby mode
  20887.  
  20888. 1 Number of transfers specified in DMATCR completed
  20889.  
  20890. Bit 0—DMAC Enable (DE): Enables operation of the corresponding channel.
  20891.  
  20892. Bit 0: DE Description
  20893.  
  20894. 0 Operation of corresponding channel is disabled (Initial value)
  20895.  
  20896. 1 Operation of corresponding channel is enabled
  20897.  
  20898. When auto-request is specified (with RS3–RS0), transfer is begun when this bit is set to 1. In the
  20899. case of an external request or on-chip peripheral module request, transfer is begun when a transfer
  20900. request is issued after this bit is set to 1. Transfer can be suspended midway by clearing this bit to
  20901. 0.
  20902.  
  20903. Even if the DE bit has been set, transfer is not enabled when TE is 1, when DME in DMAOR is
  20904. 0, or when the NMIF or AE bit in DMAOR is 1.
  20905.  
  20906. For channel 0, in DDT mode this bit is set to 1 when a DTR format is received. DE remains set to
  20907. 1 even if TE is set to 1. When the mode is switched from DDT mode to normal DMA mode (DDT
  20908. bit = 0 in DMAOR), the DE bit must be cleared to 0.
  20909.  
  20910. 421
  20911.  
  20912. ----------------------- Page 438-----------------------
  20913.  
  20914. 1 4 . 2 . 5 DMA Operation Register (DMAOR)
  20915.  
  20916. Bit: 31 30 29 28 27 26 25 24
  20917.  
  20918. — — — — — — — —
  20919.  
  20920. Initial value: 0 0 0 0 0 0 0 0
  20921.  
  20922. R/W: R R R R R R R R
  20923.  
  20924. Bit: 23 22 21 20 19 18 17 16
  20925.  
  20926. — — — — — — — —
  20927.  
  20928. Initial value: 0 0 0 0 0 0 0 0
  20929.  
  20930. R/W: R R R R R R R R
  20931.  
  20932. Bit: 15 14 13 12 11 10 9 8
  20933.  
  20934. DDT — — — — — PR1 PR0
  20935.  
  20936. Initial value: 0 0 0 0 0 0 0 0
  20937.  
  20938. R/W: R/W R R R R R R/W R/W
  20939.  
  20940. Bit: 7 6 5 4 3 2 1 0
  20941.  
  20942. — — — — — AE NMIF DME
  20943.  
  20944. Initial value: 0 0 0 0 0 0 0 0
  20945.  
  20946. R/W: R R R R R R/(W) R/(W) R/W
  20947.  
  20948. Note: The AE and NMIF bits can only be written with 0 after being read as 1, to clear the
  20949. flags.
  20950.  
  20951. DMAOR is a 32-bit readable/writable register that specifies the DMAC transfer mode.
  20952.  
  20953. DMAOR is initialized to H'00000000 by a power-on or manual reset. They retain their values in
  20954. standby mode and deep sleep mode.
  20955.  
  20956. Bits 31 to 16—Reserved: These bits are always read as 0, and should only be written with 0.
  20957.  
  20958. Bit 15—On-Demand Data Transfer (DDT): Specifies on-demand data transfer mode. When
  20959. the DDT bit is set to 1, CPU writes to SAR0, DAR0, DMATCR0, and CHCR0 are masked.
  20960.  
  20961. Bit 15: DDT Description
  20962.  
  20963. 0 Normal DMA mode (Initial value)
  20964.  
  20965. 1 On-demand data transfer mode
  20966.  
  20967. Note: BAVL (DRAK0) is an active-high output in normal DMA mode. When the DDT bit is
  20968. set to 1, the BAVL pin function is enabled and this pin becomes an active-low output.
  20969.  
  20970. 422
  20971.  
  20972. ----------------------- Page 439-----------------------
  20973.  
  20974. Bits 14 to 10—Reserved: These bits are always read as 0, and should only be written with 0.
  20975.  
  20976. Bits 9 and 8—Priority Mode 1 and 0 (PR1, PR0): These bits determine the order of
  20977. priority for channel execution when transfer requests are made for a number of channels
  20978. simultaneously.
  20979.  
  20980. Bit 9: PR1 Bit 8: PR0 Description
  20981.  
  20982. 0 0 CH0 > CH1 > CH2 > CH3 (Initial value)
  20983.  
  20984. 1 CH0 > CH2 > CH3 > CH1
  20985.  
  20986. 1 0 CH2 > CH0 > CH1 > CH3
  20987.  
  20988. 1 Round robin mode
  20989.  
  20990. Bits 7 to 3—Reserved: These bits are always read as 0, and should only be written with 0.
  20991.  
  20992. Bit 2—Address Error Flag (AE): Indicates that an address error has occurred during DMA
  20993. transfer. If this bit is set during data transfer, transfers on all channels are suspended, and an
  20994. interrupt request (DMAE) is generated. The CPU cannot write 1 to AE. This bit can only be
  20995. cleared by writing 0 after reading 1.
  20996.  
  20997. Bit 2: AE Description
  20998.  
  20999. 0 No address error, DMA transfer enabled (Initial value)
  21000.  
  21001. [Clearing condition]
  21002. When 0 is written to AE after reading AE = 1
  21003.  
  21004. 1 Address error, DMA transfer disabled
  21005.  
  21006. [Setting condition]
  21007. When an address error is caused by the DMAC
  21008.  
  21009. Bit 1—NMI Flag (NMIF): Indicates that NMI has been input. This bit is set regardless of
  21010. whether or not the DMAC is operating. If this bit is set during data transfer, transfers on all
  21011. channels are suspended. The CPU cannot write 1 to NMIF. This bit can only be cleared by writing
  21012. 0 after reading 1.
  21013.  
  21014. Bit 1: NMIF Description
  21015.  
  21016. 0 No NMI input, DMA transfer enabled (Initial value)
  21017.  
  21018. [Clearing condition]
  21019. When 0 is written to NMIF after reading NMIF = 1
  21020.  
  21021. 1 NMI input, DMA transfer disabled
  21022.  
  21023. [Setting condition]
  21024. When an NMI interrupt is generated
  21025.  
  21026. 423
  21027.  
  21028. ----------------------- Page 440-----------------------
  21029.  
  21030. Bit 0—DMAC Master Enable (DME): Enables activation of the entire DMAC. When the
  21031. DME bit and the DE bit of the CHCR register for the corresponding channel are set to 1, that
  21032. channel is enabled for transfer. If this bit is cleared during data transfer, transfers on all channels are
  21033. suspended.
  21034.  
  21035. Even if the DME bit has been set, transfer is not enabled when TE is 1 or DE is 0 in CHCR, or
  21036. when the NMI or AE bit in DMAOR is 1.
  21037.  
  21038. Bit 0: DME Description
  21039.  
  21040. 0 Operation disabled on all channels (Initial value)
  21041.  
  21042. 1 Operation enabled on all channels
  21043.  
  21044. 1 4 . 3 Operation
  21045.  
  21046. When a DMA transfer request is issued, the DMAC starts the transfer according to the
  21047. predetermined channel priority order. It ends the transfer when the transfer end conditions are
  21048. satisfied. Transfers can be requested in three modes: auto-request, external request, and on-chip
  21049. peripheral module request. There are two modes for DMA transfer: single address mode and dual
  21050. address mode. Either burst mode or cycle steal mode can be selected as the bus mode.
  21051.  
  21052. 1 4 . 3 . 1 DMA Transfer Procedure
  21053.  
  21054. After the desired transfer conditions have been set in the DMA source address register (SAR), DMA
  21055. destination address register (DAR), DMA transfer count register (DMATCR), DMA channel
  21056. control register (CHCR), and DMA operation register (DMAOR), the DMAC transfers data
  21057. according to the following procedure:
  21058.  
  21059. 1. The DMAC checks to see if transfer is enabled (DE = 1, DME = 1, TE = 0, NMIF = 0, AE =
  21060. 0).
  21061.  
  21062. 2. When a transfer request is issued and transfer has been enabled, the DMAC transfers one transfer
  21063. unit of data (determined by the setting of TS2–TS0). In auto-request mode, the transfer begins
  21064. automatically when the DE bit and DME bit are set to 1. The DMATCR value is decremented
  21065. by 1 for each transfer. The actual transfer flow depends on the address mode and bus mode.
  21066.  
  21067. 3. When the specified number of transfers have been completed (when the DMATCR value
  21068. reaches 0), the transfer ends normally. If the IE bit in CHCR is set to 1 at this time, a DMTE
  21069. interrupt request is sent to the CPU.
  21070.  
  21071. 4. If a DMAC address error or NMI interrupt occurs, the transfer is suspended. Transfer is also
  21072. suspended when the DE bit in CHCR or the DME bit in DMAOR is cleared to 0. In the event
  21073. of an address error, a DMAE interrupt request is forcibly sent to the CPU.
  21074.  
  21075. Figure 14.2 shows a flowchart of this procedure.
  21076.  
  21077. 424
  21078.  
  21079. ----------------------- Page 441-----------------------
  21080.  
  21081. Start
  21082.  
  21083. Initial settings
  21084. (SAR, DAR, DMATCR,
  21085. CHCR, DMAOR)
  21086.  
  21087. No
  21088. DE, DME = 1?
  21089.  
  21090. Yes
  21091. Illegal address check *4
  21092. (reflected in AE bit)
  21093.  
  21094. No
  21095. NMIF, AE, TE = 0?
  21096.  
  21097. Yes
  21098. *2
  21099.  
  21100. Transfer No
  21101. request issued?
  21102. *1 Bus mode,
  21103. *3
  21104. Yes transfer request mode,
  21105. DREQ detection
  21106. method
  21107. Transfer (1 transfer unit)
  21108. DMATCR - 1 → DMATCR
  21109. Update SAR, DAR
  21110.  
  21111. No No NMIF or No
  21112. DMATCR = 0? AE = 1 or DE = 0 or
  21113.  
  21114. DME = 0?
  21115. Yes
  21116. Yes
  21117. DMTE interrupt request
  21118. Transfer suspended
  21119. (when IE = 1)
  21120.  
  21121. NMIF or
  21122. No
  21123. AE = 1 or DE = 0 or
  21124. DME = 0?
  21125.  
  21126. Yes
  21127.  
  21128. End of transfer Normal end
  21129.  
  21130. Notes: 1. In auto-request mode, transfer begins when the NMIF, AE, and TE bits are all 0, and the DE
  21131. and DME bits are set to 1.
  21132. 2. DREQ level detection (external request) in burst mode, or cycle steal mode.
  21133. 3. DREQ edge detection (external request) in burst mode, or auto-request mode in burst mode.
  21134. 4. An illegal address is detected by comparing bits TS2–TS0 in CHCRn with SARn and DARn.
  21135.  
  21136. Figure 14.2 DMAC Transfer Flowchart
  21137.  
  21138. 425
  21139.  
  21140. ----------------------- Page 442-----------------------
  21141.  
  21142. 1 4 . 3 . 2 DMA Transfer Requests
  21143.  
  21144. DMA transfer requests are basically generated at either the data transfer source or destination, but
  21145. they can also be issued by external devices or on-chip peripheral modules that are neither the source
  21146. nor the destination.
  21147.  
  21148. Transfers can be requested in three modes: auto-request, external request, and on-chip peripheral
  21149. module request. The transfer request mode is selected by means of bits RS3–RS0 in DMA channel
  21150. control registers 0–3 (CHCR0–CHCR3).
  21151.  
  21152. Auto Request Mode: When there is no transfer request signal from an external source, as in a
  21153. memory-to-memory transfer or a transfer between memory and an on-chip peripheral module
  21154. unable to request a transfer, the auto-request mode allows the DMAC to automatically generate a
  21155. transfer request signal internally. When the DE bit in CHCR0–CHCR3 and the DME bit in the
  21156. DMA operation register (DMAOR) are set to 1, the transfer begins (so long as the TE bit in
  21157. CHCR0–CHCR3 and the NMIF and AE bits in DMAOR are all 0).
  21158.  
  21159. External Request Mode: In this mode a transfer is performed in response to a transfer request
  21160. signal (DREQ) from an external device. One of the modes shown in table 14.4 should be chosen
  21161. according to the application system. If DMA transfer is enabled (DE = 1, DME = 1, TE = 0,
  21162. NMIF = 0, AE = 0), transfer starts when DREQ is input. The DS bit in CHCR0/CHCR1 is used
  21163. to select either falling edge detection or low level detection for theDREQ signal (level detection
  21164. when DS = 0, edge detection when DS = 1).
  21165.  
  21166. The source of the transfer request does not have to be the data transfer source or destination.
  21167.  
  21168. Table 14.4 Selecting External Request Mode with RS Bits
  21169.  
  21170. RS3 RS2 RS1 RS0 Address Mode Transfer Source Transfer
  21171. Destination
  21172.  
  21173. 0 0 0 0 Dual address External memory External memory
  21174. mode or memory-mapped or memory-mapped
  21175. external device external device
  21176.  
  21177. 1 0 Single address External memory External device
  21178. mode or memory-mapped with DACK
  21179. external device
  21180.  
  21181. 1 Single address External device with External memory
  21182. mode DACK or memory-mapped
  21183. external device
  21184.  
  21185. On-Chip Peripheral Module Request Mode: In this mode a transfer is performed in
  21186. response to a transfer request signal (interrupt request signal) from an on-chip peripheral module.
  21187. As shown in table 14.5, there are seven transfer request signals: input capture interrupts from the
  21188. timer unit (TMU), and receive-data-full interrupts (RXI) and transmit-data-empty interrupts (TXI)
  21189.  
  21190. 426
  21191.  
  21192. ----------------------- Page 443-----------------------
  21193.  
  21194. from the two serial communication interfaces (SCI, SCIF). If DMA transfer is enabled (DE = 1,
  21195. DME = 1, TE = 0, NMIF = 0, AE = 0), transfer starts when a transfer request signal is input.
  21196.  
  21197. The source of the transfer request does not have to be the data transfer source or destination.
  21198. However, when the transfer request is set to RXI (transfer request by SCI/SCIF receive-data-full
  21199. interrupt), the transfer source must be the SCI/SCIF’s receive data register (SCRDR1/SCFRDR2).
  21200. When the transfer request is set to TXI (transfer request by SCI/SCIF transmit-data-empty
  21201. interrupt), the transfer destination must be the SCI/SCIF’s transmit data register
  21202. (SCTDR1/SCFTDR2).
  21203.  
  21204. Table 14.5 Selecting On-Chip Peripheral Module Request Mode with RS Bits
  21205.  
  21206. DMAC Transfer DMAC Transfer Transfer Transfer
  21207. RS3 RS2 RS1 RS0 Request Request Signal Source Destinatio Bus
  21208. Source n Mode
  21209.  
  21210. 1 0 0 0 SCI transmitter SCTDR1 (SCI External* SCTDR1 Cycle steal
  21211. transmit-data- mode
  21212. empty transfer
  21213. request)
  21214.  
  21215. 1 SCI receiver SCRDR1 (SCI SCRDR1 External* Cycle steal
  21216. receive-data-full mode
  21217. transfer request)
  21218.  
  21219. 1 0 SCIF transmitter SCFTDR2 (SCIF External* SCFTDR2 Cycle steal
  21220. transmit-data- mode
  21221. empty transfer
  21222. request)
  21223.  
  21224. 1 SCIF receiver SCFRDR2 (SCIF SCFRDR2 External* Cycle steal
  21225. receive-data-full mode
  21226. transfer request)
  21227.  
  21228. 1 0 0 TMU channel 2 Input capture External* External* Burst/cycl
  21229. occurrence e steal
  21230. mode
  21231.  
  21232. 1 TMU channel 2 Input capture External* On-chip Burst/cycl
  21233. occurrence peripheral e steal
  21234. mode
  21235.  
  21236. 1 0 TMU channel 2 Input capture On-chip External* Burst/cycl
  21237. occurrence peripheral e steal
  21238. mode
  21239.  
  21240. TMU: Timer unit
  21241. SCI: Serial communication interface
  21242. SCIF: Serial communication interface with FIFO
  21243. Note: * External memory or memory-mapped external device
  21244. Note: SCI/SCIF burst transfer setting is prohibited.
  21245.  
  21246. 427
  21247.  
  21248. ----------------------- Page 444-----------------------
  21249.  
  21250. To output a transfer request from an on-chip peripheral module, set the DMA transfer request
  21251. enable bit for that module and output a transfer request signal.
  21252.  
  21253. For details, see sections 12, Timer Unit (TMU), 15, Serial Communication Interface (SCI), and
  21254. 16, Serial Communication Interface with FIFO (SCIF).
  21255.  
  21256. When a DMA transfer corresponding to a transfer request signal from an on-chip peripheral module
  21257. shown in table 14.5 is carried out, the signal is discontinued automatically. This occurs every
  21258. transfer in cycle steal mode, and in the last transfer in burst mode.
  21259.  
  21260. 1 4 . 3 . 3 Channel Priorities
  21261.  
  21262. If the DMAC receives simultaneous transfer requests on two or more channels, it selects a channel
  21263. according to a predetermined priority system, either in a fixed mode or round robin mode. The
  21264. mode is selected with priority bits PR1 and PR0 in the DMA operation register (DMAOR).
  21265.  
  21266. Fixed Mode: In this mode, the relative channel priorities remain fixed. The following priority
  21267. orders are available in fixed mode:
  21268.  
  21269. • CH0 > CH1 > CH2 > CH3
  21270.  
  21271. • CH0 > CH2 > CH3 > CH1
  21272.  
  21273. • CH2 > CH0 > CH1 > CH3
  21274.  
  21275. The priority order is selected with bits PR1 and PR0 in DMAOR.
  21276.  
  21277. Round Robin Mode: In round robin mode, each time the transfer of one transfer unit (byte,
  21278. word, longword, quadword, or 32 bytes) ends on a given channel, that channel is assigned the
  21279. lowest priority level. This is illustrated in figure 14.3. The order of priority in round robin mode
  21280. immediately after a reset is CH0 > CH1 > CH2 > CH3.
  21281.  
  21282. Note: In round robin mode, if no transfer request is accepted for any channel during DMA
  21283. transfer, the priority order becomes CH0 > CH1 > CH2 > CH3.
  21284.  
  21285. 428
  21286.  
  21287. ----------------------- Page 445-----------------------
  21288.  
  21289. Transfer on channel 0
  21290.  
  21291. Initial priority order CH0 > CH1 > CH2 > CH3 Channel 0 is given the lowest
  21292. priority.
  21293.  
  21294. Priority order after transfer CH1 > CH2 > CH3 > CH0
  21295.  
  21296. Transfer on channel 1
  21297.  
  21298. Initial priority order CH0 > CH1 > CH2 > CH3 When channel 1 is given the
  21299. lowest priority, the priority of
  21300. channel 0, which was higher
  21301. than channel 1, is also
  21302. Priority order after transfer CH2 > CH3 > CH0 > CH1 shifted simultaneously.
  21303.  
  21304. Transfer on channel 2
  21305. When channel 2 is given the
  21306. Initial priority order CH0 > CH1 > CH2 > CH3 lowest priority, the priorities of
  21307.  
  21308. channels 0 and 1, which were
  21309. higher than channel 2, are
  21310. also shifted simultaneously. If
  21311. there is a transfer request for
  21312. channel 1 only immediately
  21313. Priority order after transfer CH3 > CH0 > CH1 > CH2
  21314. afterward, channel 1 is given
  21315. the lowest priority and the
  21316. priorities of channels 3 and 0
  21317. are simultaneously shifted
  21318. down.
  21319. Priority after transfer due to
  21320. issuance of a transfer request CH2 > CH3 > CH0 > CH1
  21321. for channel 1 only.
  21322.  
  21323. Transfer on channel 3
  21324.  
  21325. Initial priority order CH0 > CH1 > CH2 > CH3 No change in priority order
  21326.  
  21327. Priority order after transfer CH0 > CH1 > CH2 > CH3
  21328.  
  21329. Figure 14.3 Round Robin Mode
  21330.  
  21331. Figure 14.4 shows the changes in priority levels when transfer requests are issued simultaneously
  21332. for channels 0 and 3, and channel 1 receives a transfer request during a transfer on channel 0. The
  21333. operation of the DMAC in this case is as follows.
  21334.  
  21335. 1. Transfer requests are issued simultaneously for channels 0 and 3.
  21336.  
  21337. 2. Since channel 0 has a higher priority level than channel 3, the channel 0 transfer is executed
  21338. first (channel 3 is on transfer standby).
  21339.  
  21340. 429
  21341.  
  21342. ----------------------- Page 446-----------------------
  21343.  
  21344. 3. A transfer request is issued for channel 1 during the channel 0 transfer (channels 1 and 3 are on
  21345. transfer standby).
  21346.  
  21347. 4. At the end of the channel 0 transfer, channel 0 shifts to the lowest priority level.
  21348.  
  21349. 5. At this point, channel 1 has a higher priority level than channel 3, so the channel 1 transfer is
  21350. started (channel 3 is on transfer standby).
  21351.  
  21352. 6. At the end of the channel 1 transfer, channel 1 shifts to the lowest priority level.
  21353.  
  21354. 7. The channel 3 transfer is started.
  21355.  
  21356. 8. At the end of the channel 3 transfer, the channel 3 and channel 2 priority levels are lowered,
  21357. giving channel 3 the lowest priority.
  21358.  
  21359. Transfer request Channel DMAC operation Channel priority
  21360. waiting order
  21361. 1. Issued for channels 0
  21362. and 3
  21363. 2. Start of channel 0 0 > 1 > 2 > 3
  21364. transfer
  21365. 3. Issued for channel 1 3
  21366.  
  21367. Change of
  21368. priority order
  21369. 4. End of channel 0 1 > 2 > 3 > 0
  21370. 1, 3
  21371. transfer
  21372.  
  21373. 5. Start of channel 1
  21374. transfer
  21375.  
  21376. Change of
  21377. priority order
  21378. 3 6. End of channel 1 2 > 3 > 0 > 1
  21379. transfer
  21380.  
  21381. 7. Start of channel 3
  21382. transfer
  21383.  
  21384. None
  21385. Change of
  21386. priority order
  21387. 8. End of channel 3 0 > 1 > 2 > 3
  21388. transfer
  21389.  
  21390. Figure 14.4 Example of Changes in Priority Order in Round Robin Mode
  21391.  
  21392. 430
  21393.  
  21394. ----------------------- Page 447-----------------------
  21395.  
  21396. 1 4 . 3 . 4 Types of DMA Transfer
  21397.  
  21398. The DMAC supports the transfers shown in table 14.6. It can operate in single address mode, in
  21399. which either the transfer source or the transfer destination is accessed using the acknowledge signal,
  21400. or in dual address mode, in which both the transfer source and transfer destination addresses are
  21401. output. The actual transfer operation timing depends on the bus mode, which can be either burst
  21402. mode or cycle steal mode.
  21403.  
  21404. Table 14.6 Supported DMA Transfers
  21405.  
  21406. Transfer Destination
  21407.  
  21408. External External Memory- On-Chip
  21409. Transfer Source Device with Memory Mapped Peripheral
  21410. DACK External Module
  21411. Device
  21412.  
  21413. External device Not available Single address Single address Not available
  21414. with DACK mode mode
  21415.  
  21416. External memory Single address Dual address Dual address mode Dual address mode
  21417. mode mode
  21418.  
  21419. Memory-mapped Single address Dual address Dual address mode Dual address mode
  21420. external device mode mode
  21421.  
  21422. On-chip peripheral Not available Dual address Dual address mode Not available
  21423. module mode
  21424.  
  21425. 431
  21426.  
  21427. ----------------------- Page 448-----------------------
  21428.  
  21429. Address Modes
  21430.  
  21431. Single Address Mode: In single address mode, both the transfer source and the transfer
  21432. destination are external; one is accessed by the DACK signal and the other by an address. In this
  21433. mode, the DMAC performs a DMA transfer in one bus cycle by simultaneously outputting the
  21434. external device strobe signal (DACK) to either the transfer source or transfer destination external
  21435. device to access it, while outputting an address to the other side of the transfer. Figure 14.5 shows
  21436. an example of a transfer between external memory and an external device with DACK in which the
  21437. external device outputs data to the data bus and that data is written to external memory in the same
  21438. bus cycle.
  21439.  
  21440. External External
  21441. address data bus
  21442. bus
  21443. SH7750
  21444. External
  21445. DMAC memory
  21446.  
  21447. External device
  21448. with DACK
  21449.  
  21450. DACK
  21451.  
  21452. DREQ
  21453.  
  21454. : Data flow
  21455.  
  21456. Figure 14.5 Data Flow in Single Address Mode
  21457.  
  21458. Two types of transfer are possible in single address mode: (1) transfer between an external device
  21459. with DACK and a memory-mapped external device, and (2) transfer between an external device with
  21460. DACK and external memory. Only the external request signal (DREQ) is used in both these cases.
  21461.  
  21462. Figure 14.6 shows the transfer timing for single address mode.
  21463.  
  21464. The access timing depends on the type of external memory. For details, see the descriptions of the
  21465. memory interfaces in section 13, Bus State Controller (BSC).
  21466.  
  21467. 432
  21468.  
  21469. ----------------------- Page 449-----------------------
  21470.  
  21471. CKIO
  21472.  
  21473. A28–A0 Address output to external memory
  21474. space
  21475.  
  21476. CSn
  21477.  
  21478. D63–D0 Data output from external device
  21479. with DACK
  21480.  
  21481. DACK DACK signal to external
  21482. device with DACK
  21483.  
  21484. WE WE signal to external memory space
  21485.  
  21486. (a) From external device with DACK to external memory space
  21487.  
  21488. CKIO
  21489.  
  21490. A28–A0 Address output to external memory
  21491. space
  21492.  
  21493. CSn
  21494.  
  21495. D63–D0 Data output from external memory
  21496. space
  21497.  
  21498. RD RD signal to external memory space
  21499.  
  21500. DACK DACK signal to external
  21501. device with DACK
  21502.  
  21503. (b) From external memory space to external device with DACK
  21504.  
  21505. Figure 14.6 DMA Transfer Timing in Single Address Mode
  21506.  
  21507. 433
  21508.  
  21509. ----------------------- Page 450-----------------------
  21510.  
  21511. Dual Address Mode: Dual address mode is used to access both the transfer source and the
  21512. transfer destination by address. The transfer source and destination can be accessed by either on-chip
  21513. peripheral module or external address.
  21514.  
  21515. In dual address mode, data is read from the transfer source in the data read cycle, and written to the
  21516. transfer destination in the data write cycle, so that the transfer is executed in two bus cycles. The
  21517. transfer data is temporarily stored in the data buffer in the bus state controller (BSC).
  21518.  
  21519. In a transfer between external memories such as that shown in figure 14.7, data is read from
  21520. external memory into the BSC’s data buffer in the read cycle, then written to the other external
  21521. memory in the write cycle. Figure 14.8 shows the timing for this operation.
  21522.  
  21523. SAR Memory
  21524. DMAC s
  21525. u
  21526. b s
  21527. DAR s u
  21528. b
  21529. s Transfer source
  21530. e a
  21531. t
  21532. r a module
  21533. d
  21534. d D
  21535. A
  21536.  
  21537. Transfer destination
  21538. BSC Data buffer
  21539. module
  21540.  
  21541. Taking the SAR value as the address, data is read from the transfer source module
  21542. and stored temporarily in the data buffer in the bus state controller (BSC).
  21543.  
  21544. 1st bus cycle
  21545.  
  21546. SAR Memory
  21547. DMAC
  21548. s
  21549. u
  21550. DAR b s
  21551. u
  21552. s b Transfer source
  21553. s
  21554. e a
  21555. r t module
  21556. d a
  21557. d D
  21558. A
  21559. Transfer destination
  21560. BSC Data buffer
  21561. module
  21562.  
  21563. Taking the DAR value as the address, the data stored in the BSC’s data buffer is
  21564. written to the transfer destination module.
  21565.  
  21566. 2nd bus cycle
  21567.  
  21568. Figure 14.7 Operation in Dual Address Mode
  21569.  
  21570. 434
  21571.  
  21572. ----------------------- Page 451-----------------------
  21573.  
  21574. CKIO
  21575.  
  21576. A28–A0 Transfer source Transfer destination
  21577. address address
  21578.  
  21579. CSn
  21580.  
  21581. D63–D0
  21582.  
  21583. RD
  21584.  
  21585. WE
  21586.  
  21587. DACK
  21588.  
  21589. Data read cycle Data write cycle
  21590. (1st cycle) (2nd cycle)
  21591.  
  21592. Transfer from external memory space to external memory space
  21593.  
  21594.  
  21595. Figure 14.8 Example of Transfer Timing in Dual Address Mode
  21596.  
  21597. Bus Modes
  21598.  
  21599. There are two bus modes, cycle steal mode and burst mode, selected with the TM bit in CHCR0–
  21600. CHCR3.
  21601.  
  21602. Cycle Steal Mode: In cycle steal mode, the DMAC releases the bus to the CPU at the end of
  21603. each transfer-unit (8-bit, 16-bit, 32-bit, 64-bit, or 32-byte) transfer. When the next transfer request
  21604. is issued, the DMAC reacquires the bus from the CPU and carries out another transfer-unit transfer.
  21605. At the end of this transfer, the bus is again given to the CPU. This is repeated until the transfer
  21606. end condition is satisfied.
  21607.  
  21608. Cycle steal mode can be used with all categories of transfer request source, transfer source, and
  21609. transfer destination.
  21610.  
  21611. Figure 14.9 shows an example of DMA transfer timing in cycle steal mode. The transfer
  21612. conditions in this example are dual address mode and DREQ level detection.
  21613.  
  21614. 435
  21615.  
  21616. ----------------------- Page 452-----------------------
  21617.  
  21618. DREQ
  21619.  
  21620. Bus returned to CPU
  21621.  
  21622. Bus cycle CPU CPU CPU DMAC DMAC CPU DMAC DMAC CPU CPU
  21623.  
  21624. Read, write Read, write
  21625.  
  21626. Figure 14.9 Example of DMA Transfer in Cycle Steal Mode
  21627.  
  21628. Burst Mode: In burst mode, once the DMAC has acquired the bus it holds the bus and transfers
  21629. data continuously until the transfer end condition is satisfied. With DREQ low level detection in
  21630. external request mode, however, when DREQ is driven high the bus passes to another bus master
  21631. after the end of the DMAC transfer request that has already been accepted, even if the transfer end
  21632. condition has not been satisfied.
  21633.  
  21634. Figure 14.10 shows an example of DMA transfer timing in burst mode. The transfer conditions in
  21635. this example are single address mode and DREQ level detection.
  21636.  
  21637. DREQ
  21638.  
  21639. Bus cycle CPU CPU CPU DMAC DMAC DMAC DMAC DMAC DMAC CPU
  21640.  
  21641. Figure 14.10 Example of DMA Transfer in Burst Mode
  21642.  
  21643. Note: Burst mode can be set regardless of the data size. A 32-byte block transfer burst mode
  21644. setting can also be made.
  21645.  
  21646. 436
  21647.  
  21648. ----------------------- Page 453-----------------------
  21649.  
  21650. Relationship between DMA Transfer Type, Request Mode, and Bus Mode
  21651.  
  21652. Table 14.7 shows the relationship between the type of DMA transfer, the request mode, and the
  21653. bus mode.
  21654.  
  21655. Table 14.7Relationship between DMA Transfer Type, Request Mode, and Bus
  21656. Mode
  21657.  
  21658. Address Request Bus Transfer Usable
  21659. Mode Type of Transfer Mode Mode Size (Bits) Channels
  21660. Single External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  21661.  
  21662. and external memory B
  21663. External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  21664.  
  21665. and memory-mapped external B
  21666. device
  21667.  
  21668. 1 5, 6
  21669. Dual External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  21670. external memory B
  21671.  
  21672. 1 5, 6
  21673. External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  21674. memory-mapped external B
  21675. device
  21676.  
  21677. 1 5, 6
  21678. Memory-mapped external Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  21679. device and memory-mapped B
  21680. external device
  21681.  
  21682. 2 3 4 5, 6
  21683. External memory and Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  21684. on-chip peripheral module
  21685.  
  21686. 2 3 4 5, 6
  21687. Memory-mapped external Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  21688. device and on-chip
  21689. peripheral module
  21690.  
  21691. 32B: 32-byte burst transfer
  21692. B: Burst
  21693. C: Cycle steal
  21694. Notes: 1. External request, auto-request, or on-chip peripheral module request (TMU input
  21695. capture interrupt request) possible. In the case of an on-chip peripheral module
  21696. request, it is not possible to specify external memory data transfer with the SCI (SCIF)
  21697. as the transfer request source.
  21698. 2. External request, auto-request, or on-chip peripheral module request possible. If the
  21699. transfer request source is the SCI (SCIF), either the transfer source must be SCRDR1
  21700. (SCFRDR2) or the transfer destination must be SCTDR1 (SCFTDR2).
  21701. 3. When the transfer request source is the SCI (SCIF), only cycle steal mode can be used.
  21702. 4. Access size permitted for the on-chip peripheral module register that is the transfer
  21703. source or transfer destination.
  21704. 5. When the transfer request is an external request, only channels 0 and 1 can be used.
  21705. 6. In DDT mode, transfer requests can be accepted for all channels from external devices
  21706. capable of DTR format output.
  21707.  
  21708. 437
  21709.  
  21710. ----------------------- Page 454-----------------------
  21711.  
  21712. Bus Mode and Channel Priority Order
  21713.  
  21714. When, for example, channel 1 is transferring data in burst mode, and a transfer request is issued to
  21715. channel 0, which has a higher priority, the channel 0 transfer is started immediately.
  21716.  
  21717. If fixed mode has been set for the priority levels (CH0 > CH1), transfer on channel 1 is continued
  21718. after transfer on channel 0 is completely finished, whether cycle steal mode or burst mode is set for
  21719. channel 0.
  21720.  
  21721. If round robin mode has been set for the priority levels, transfer on channel 1 is restarted after one
  21722. transfer unit of data is transferred on channel 0, whether cycle steal mode or burst mode is set for
  21723. channel 0. Channel execution alternates in the order: channel 1 → channel 0 → channel 1 →
  21724. channel 0.
  21725.  
  21726. An example of round robin mode operation is shown in figure 14.11.
  21727.  
  21728. Since channel 1 is in burst mode (in the case of edge sensing) regardless of whether fixed mode or
  21729. round robin mode is set for the priority order, the bus is not released to the CPU until channel 1
  21730. transfer ends.
  21731.  
  21732. CPU DMAC CH1 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH1 CPU
  21733.  
  21734. CH0 CH1 CH0
  21735.  
  21736. CPU DMAC channel 1 DMAC channel 0 and DMAC channel 1 CPU
  21737. burst mode channel 1 round robin burst mode
  21738. mode
  21739.  
  21740. Priority system: Round robin mode
  21741. Channel 0: Cycle steal mode
  21742. Channel 1: Burst mode (edge-sensing)
  21743.  
  21744. Figure 14.11 Bus Handling with Two DMAC Channels Operating
  21745.  
  21746. Note: When channel 1 is in level-sensing burst mode with the settings shown in figure 14.11,
  21747. the bus is passed to the CPU during a break in requests.
  21748.  
  21749. 438
  21750.  
  21751. ----------------------- Page 455-----------------------
  21752.  
  21753. 1 4 . 3 . 5 Number of Bus Cycle States and D R E Q Pin Sampling Timing
  21754.  
  21755. Number of States in Bus Cycle: The number of states in the bus cycle when the DMAC is
  21756. the bus master is controlled by the bus state controller (BSC) just as it is when the CPU is the
  21757. bus master. See section 13, Bus State Controller (BSC), for details.
  21758.  
  21759. DREQ Pin Sampling Timing: In external request mode, the DREQ pin is sampled at the
  21760. rising edge of CKIO clock pulses. When DREQ input is detected, a DMAC bus cycle is generated
  21761. and DMA transfer executed after four CKIO cycles at the earliest.
  21762.  
  21763. The second and subsequent DREQ sampling operations are performed one cycle after the start of
  21764. the first DMAC transfer bus cycle (in the case of single address mode).
  21765.  
  21766. DRAK is output for one cycle only, once each time DREQ is detected, regardless of the transfer
  21767. mode or DREQ detection method. In the case of burst mode edge detection, DREQ is sampled in
  21768. the first cycle only, and so DRAK is output in the first cycle only .
  21769.  
  21770. Operation: Figures 14.12 to 14.23 show the timing in each mode.
  21771.  
  21772. 1. Cycle Steal Mode
  21773.  
  21774. In cycle steal mode, The DREQ sampling timing differs for dual address mode and single
  21775. address mode, and for level detection and edge detection of DREQ.
  21776.  
  21777. For example, in figure 14.12 (cycle steal mode, dual address mode, level detection), DMAC
  21778. transfer begins, at the earliest, four CKIO cycles after the first sampling operation. The second
  21779. sampling operation is performed one cycle after the start of the first DMAC transfer write
  21780. cycle. If DREQ is not detected at this time, sampling is executed in every subsequent cycle.
  21781.  
  21782. In figure 14.13 (cycle steal mode, dual address mode, edge detection), DMAC transfer begins, at
  21783. the earliest, five CKIO cycles after the first sampling operation. The second sampling operation
  21784. begins from the cycle in which the first DMAC transfer read cycle ends. If DREQ is not
  21785. detected at this time, sampling is executed in every subsequent cycle.
  21786.  
  21787. In figure 14.16 (cycle steal mode, dual address mode, level detection), with SDRAM: row hit
  21788. read/write transfer using a 64-bit bus width and a 32-byte block as the data size, DMAC transfer
  21789. begins, at the earliest, four CKIO cycles after the first sampling operation. The second
  21790. sampling operation is performed in the cycle in which the first DMAC transfer write cycle is
  21791. begun.
  21792.  
  21793. For details of the timing for various kinds of memory access, see section 13, Bus State
  21794. Controller (BSC).
  21795.  
  21796. Figure 14.19 shows the case of cycle steal mode, single address mode, and level detection. In
  21797. this case, too, transfer is started, at the earliest, four CKIO cycles after the first DREQ
  21798. sampling operation. The second sampling operation is performed one cycle after the start of the
  21799. first DMAC transfer bus cycle.
  21800.  
  21801. 439
  21802.  
  21803. ----------------------- Page 456-----------------------
  21804.  
  21805. Figure 14.20 shows the case of cycle steal mode, single address mode, and edge detection. In
  21806. this case, transfer is started, at the earliest, five CKIO cycles after the first DREQ sampling
  21807. operation. The second sampling begins one cycle after the first assertion of DRAK.
  21808.  
  21809. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21810.  
  21811. 2. Burst Mode, Dual Address Mode, Level Detection
  21812.  
  21813. DREQ samplingtiming in burst mode using dual address mode and level detection is virtually
  21814. the same as for cycle steal mode.
  21815.  
  21816. For example, in figure 14.14, DMAC transfer begins, at the earliest, four CKIO cycles after
  21817. the first sampling operation. The second sampling operation is performed one cycle after the
  21818. start of the first DMAC transfer write cycle.
  21819.  
  21820. In the case of dual address mode transfer initiated by an external request, the DACK signal can
  21821. be output in either the read cycle or the write cycle of the DMAC transfer according to the
  21822. specification of the AM bit in CHCR.
  21823.  
  21824. 3. Burst Mode, Single Address Mode, Level Detection
  21825.  
  21826. DREQ samplingtiming in burst mode using single address mode and level detection is shown
  21827. in figure 14.21.
  21828.  
  21829. In the example shown in figure 14.21, DMAC transfer begins, at the earliest, four CKIO
  21830. cycles after the first sampling operation, and the second sampling operation begins one cycle
  21831. after the start of the first DMAC transfer bus cycle.
  21832.  
  21833. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21834.  
  21835. In figure 14.23, with a 32-byte data size, 64-bit bus width, and SDRAM: row hit write,
  21836. DMAC transfer begins, at the earliest, six CKIO cycles after the first sampling operation. The
  21837. second sampling operation begins one cycle after DACK is asserted for the first DMAC
  21838. transfer.
  21839.  
  21840. 4. Burst Mode, Dual Address Mode, Edge Detection
  21841.  
  21842. In burst mode using dual address mode and edge detection, DREQ sampling is performed in the
  21843. first cycle only.
  21844.  
  21845. For example, in the case shown in figure 14.15, DMAC transfer begins, at the earliest, five
  21846. CKIO cycles after the first sampling operation. DMAC transfer then continues until the end of
  21847. the number of data transfers set in DMATCR. DREQ is not sampled during this time, and
  21848. therefore DRAK is output in the first cycle only.
  21849. In the case of dual address mode transfer initiated by an external request, the DACK signal can
  21850. be output in either the read cycle or the write cycle of the DMAC transfer according to the
  21851. specification of the AM bit in CHCR.
  21852.  
  21853. 5. Burst Mode, Single Address Mode, Edge Detection
  21854.  
  21855. In burst mode using single address mode and edge detection, DREQ sampling is performed only
  21856. in the first cycle.
  21857.  
  21858. 440
  21859.  
  21860. ----------------------- Page 457-----------------------
  21861.  
  21862. For example, in the case shown in figure 14.22, DMAC transfer begins, at the earliest, five
  21863. cycles after the first sampling operation. DMAC transfer then continues until the end of the
  21864. number of data transfers set in DMATCR. DREQ is not sampled during this time, and
  21865. therefore DRAK is output in the first cycle only.
  21866.  
  21867. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21868.  
  21869. 441
  21870.  
  21871. ----------------------- Page 458-----------------------
  21872.  
  21873. 4
  21874. 4
  21875. 2 E
  21876. x
  21877. t
  21878. e
  21879. r
  21880. n CKIO
  21881. a
  21882. l
  21883. Bus locked Bus locked
  21884. B
  21885. u
  21886. s F
  21887. Source address Destination address Source address Destination address
  21888.  
  21889. i
  21890. → g A[25:0]
  21891. u
  21892. r
  21893. E e
  21894.  
  21895. x
  21896. t 1
  21897. e 4
  21898. r .
  21899. n 1 D[63:0] Read Write Read Write
  21900. a 2
  21901. l
  21902.  
  21903.  
  21904. B
  21905. u D
  21906. s DREQ0
  21907. / u
  21908. D a (level
  21909. R l detection) 1st 2nd
  21910. E A acceptance acceptance
  21911. Q d
  21912. d
  21913. r
  21914. ( e
  21915. L
  21916. DREQ1
  21917. s
  21918. e s
  21919. v
  21920. e M
  21921. l
  21922.  
  21923. o
  21924. D d DRAK0
  21925. e e
  21926. t /
  21927. e C
  21928. c y
  21929. t c
  21930. i
  21931. o l
  21932. e
  21933. n
  21934. ) Bus cycle
  21935. S
  21936. CPU DMAC CPU DMAC CPU
  21937. ,
  21938. t
  21939. D e
  21940. a
  21941. A l
  21942. C M
  21943. K o
  21944.  
  21945. d
  21946. DACK0
  21947. ( e
  21948. R
  21949. e
  21950. a
  21951. d
  21952.  
  21953. C
  21954. y : DREQ sampling and determination of channel priority
  21955. c
  21956. l
  21957. e
  21958. )
  21959.  
  21960. ----------------------- Page 459-----------------------
  21961.  
  21962. E
  21963. x
  21964. t
  21965. e
  21966. r
  21967. n CKIO
  21968. a
  21969. l Bus locked Bus locked
  21970.  
  21971. B
  21972. u
  21973. F
  21974. Source address Destination address Source address Destination address Source address
  21975. s
  21976. i
  21977. → g A[25:0]
  21978. u
  21979. r
  21980. E e
  21981. x 1
  21982. t
  21983. e 4
  21984. r .
  21985. n 1 D[63:0] Read Write Read Write Read
  21986. 3
  21987. a
  21988. l
  21989.  
  21990. B
  21991. u D
  21992. s
  21993. DREQ0
  21994. / u
  21995. D a
  21996. (edge
  21997. l
  21998. R
  21999. detection) 1st 2nd 3rd 4th
  22000.  
  22001. E A acceptance acceptance acceptance accep-
  22002. Q d tance
  22003. d
  22004. r
  22005. ( e DREQ1
  22006. E s
  22007. s
  22008. d
  22009. g M
  22010. e
  22011.  
  22012. o
  22013. D d DRAK0
  22014. e e
  22015. t /
  22016. e C
  22017. c y
  22018. t
  22019. i c
  22020. o l
  22021. n e
  22022. ) Bus cycle CPU DMAC CPU DMAC CPU DMAC
  22023. , S
  22024. t
  22025. D e
  22026. a
  22027. A l
  22028. C M
  22029. K
  22030. o DACK0
  22031. ( d
  22032. R e
  22033. e
  22034. a
  22035. d
  22036.  
  22037. C
  22038. y : DREQ sampling and determination of channel priority
  22039. c
  22040. l
  22041. e
  22042. 4 )
  22043. 4
  22044. 3
  22045.  
  22046. ----------------------- Page 460-----------------------
  22047.  
  22048. 4
  22049. 4
  22050. 4 E
  22051. x
  22052. t
  22053. e
  22054. r
  22055. n
  22056. a
  22057. CKIO
  22058. l
  22059. Bus locked Bus locked
  22060. B
  22061. u
  22062. s Source address Destination address Source address Destination address
  22063. → A[25:0]
  22064. F
  22065. i
  22066. E g
  22067. x u
  22068. t r
  22069. e e
  22070. r
  22071. n 1 D[63:0] Read Write Read Write
  22072. a 4
  22073. l
  22074. .
  22075.  
  22076. 1
  22077. B 4
  22078. u
  22079. s
  22080. /
  22081. DREQ0
  22082.  
  22083. D
  22084. D
  22085. (level
  22086. R u detection) 1st 2nd
  22087. E a acceptance acceptance
  22088. l
  22089. Q
  22090. A
  22091. ( d
  22092. L d DREQ1
  22093. e r
  22094. v e
  22095. e s
  22096. l s
  22097.  
  22098. D M DRAK0
  22099. e o
  22100. t
  22101. e d
  22102. c e
  22103. t /
  22104. i B
  22105. o u
  22106. n r
  22107. ) s Bus cycle
  22108. ,
  22109. CPU DMAC-1 DMAC-2 CPU
  22110. t
  22111.  
  22112. D M
  22113. A o
  22114. C d
  22115. K e
  22116. DACK0
  22117. (
  22118. R
  22119. e
  22120. a
  22121. d
  22122.  
  22123. C
  22124. y
  22125. : DREQ sampling and determination of channel priority
  22126. c
  22127. l
  22128. e
  22129. )
  22130.  
  22131. ----------------------- Page 461-----------------------
  22132.  
  22133. E
  22134. x
  22135. t
  22136. e
  22137. r
  22138. n CKIO
  22139. a
  22140. l
  22141.  
  22142. Bus locked Bus locked
  22143. B
  22144. u
  22145. s
  22146. Source address Destination address Source address Destination address
  22147.  
  22148. → F A[25:0]
  22149. i
  22150. E g
  22151. x u
  22152. t r
  22153. e e
  22154. r
  22155. n 1
  22156. D[63:0] Read Write Read Write
  22157. a 4
  22158. l .
  22159. 1
  22160. B 5
  22161. u
  22162. s DREQ0
  22163. /
  22164. D D (edge
  22165. R u detection) 1st
  22166. E a
  22167. acceptance TE bit: transfer end
  22168. l
  22169. Q
  22170. A
  22171. ( d
  22172. E d DREQ1
  22173. d r
  22174. e
  22175. g s
  22176. e s
  22177.  
  22178. D M DRAK0
  22179. e o
  22180. t
  22181. e d
  22182. c e
  22183. t /
  22184. i B
  22185. o
  22186. n u
  22187. ) r Bus cycle
  22188. , s
  22189. CPU DMAC-1 DMAC-2 CPU
  22190. t
  22191.  
  22192. D M
  22193. A
  22194. C o
  22195. d
  22196. K e
  22197. DACK0
  22198. (
  22199. R
  22200. e
  22201. a
  22202. d
  22203.  
  22204. C
  22205. y : DREQ sampling and determination of channel priority
  22206. c
  22207. l
  22208. e
  22209. 4 )
  22210. 4
  22211. 5
  22212.  
  22213. ----------------------- Page 462-----------------------
  22214.  
  22215. 4
  22216. 4 E
  22217. 6 ( x
  22218. B t
  22219. e
  22220. u r
  22221. s n
  22222. a
  22223. W l
  22224. CKIO
  22225.  
  22226. i B
  22227. d u
  22228. t
  22229. Destination
  22230. s
  22231. h
  22232. Source address Source address
  22233.  
  22234. F
  22235. address
  22236. : → i
  22237. 6 g A[25:0]
  22238. 4 E u
  22239. r
  22240. x e
  22241. B t
  22242. i e 1
  22243. t r
  22244. s n 4
  22245. , .
  22246. a 1 D[63:0] Read Read Read Read Write Write Write Write Read Read
  22247. S l 6
  22248. D B
  22249. R u
  22250. A s D
  22251. /
  22252. D
  22253. DREQ0
  22254. M u
  22255. R
  22256. (level
  22257. : a
  22258. l detection)
  22259. E
  22260. R
  22261. 1st 2nd
  22262. o Q A acceptance acceptance
  22263. d
  22264. w ( d
  22265. L r
  22266. H e
  22267. DREQ1
  22268. e s
  22269. i v s
  22270. t
  22271. e
  22272. R l M
  22273. e D o
  22274. a e d DRAK0
  22275. d t e
  22276. / e /
  22277. W c C
  22278. t y
  22279. r i
  22280. i o c
  22281. t n l
  22282. e ) e
  22283. ) / Bus cycle
  22284. ,
  22285. CPU DMAC-1 DMAC-2
  22286. 3 S
  22287. D 2 t
  22288. - e
  22289. A B a
  22290. l
  22291. C y
  22292. K t M
  22293. e
  22294.  
  22295. o
  22296. B
  22297. DACK0
  22298. ( d
  22299. R l e
  22300. o
  22301. e c
  22302. a k
  22303. d
  22304.  
  22305. C T
  22306. r
  22307. y a
  22308. c : DREQ sampling and determination of channel priority
  22309. l n
  22310. e s
  22311. ) f
  22312. e
  22313. r
  22314.  
  22315. ----------------------- Page 463-----------------------
  22316.  
  22317.  
  22318.  
  22319. CKIO
  22320.  
  22321. F
  22322. i
  22323. g
  22324. O u On-chip Source address Source address Source address
  22325. n r
  22326. e
  22327. peripheral
  22328. -
  22329. C address bus
  22330. h 1
  22331. i 4
  22332. p .
  22333. 1 On-chip
  22334. 7
  22335. S
  22336. Read Read Read
  22337. peripheral
  22338. C data bus
  22339. I
  22340. ( D
  22341. L u
  22342. Destination address Destination address Destination address
  22343. e a
  22344. l A[31:0]
  22345. v
  22346. e A
  22347. l
  22348.  
  22349. d
  22350. D d
  22351. e r
  22352. t e D[63:0]
  22353. e
  22354. Write Write Write
  22355. s
  22356. c s
  22357. t
  22358. i
  22359. o M
  22360. n o
  22361. )
  22362. d
  22363. → e
  22364. /
  22365. C Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU
  22366. y
  22367. E c
  22368. x l
  22369. t e
  22370. e
  22371. r S
  22372. n t
  22373. a e
  22374. l a
  22375. l
  22376.  
  22377. B
  22378. u M
  22379. s o
  22380. d
  22381. e
  22382.  
  22383. 4
  22384. 4
  22385. 7
  22386.  
  22387. ----------------------- Page 464-----------------------
  22388.  
  22389. 4
  22390. 4
  22391. 8
  22392.  
  22393.  
  22394.  
  22395. CKIO
  22396.  
  22397. F
  22398. i
  22399. g
  22400. E u Source address Source address Source address
  22401. x r
  22402. t e
  22403. A[31:0]
  22404. e
  22405. r
  22406. n 1
  22407. 4
  22408. a .
  22409. l 1
  22410. 8 D[63:0]
  22411. B
  22412. Read Read Read
  22413.  
  22414. u
  22415. s
  22416.  
  22417. → D
  22418. u
  22419. Destination address Destination address Destination address
  22420. On-chip
  22421. a
  22422. l peripheral
  22423. O
  22424. A
  22425. address bus
  22426. n
  22427. - d
  22428. C d
  22429. h r
  22430. On-chip
  22431. i e peripheral
  22432. p
  22433. Write Write Write
  22434. s
  22435. s
  22436. data bus
  22437.  
  22438. S
  22439. C M T1 T2 T1 T2 T1 T2
  22440. I o
  22441. d
  22442. ( e
  22443. L /
  22444. e C Bus cycle CPU DMAC CPU DMAC CPU DMAC
  22445. v y
  22446. e c
  22447. l l
  22448. e
  22449. D
  22450. e S
  22451. t t
  22452. e e
  22453. c a
  22454. t l
  22455.  
  22456. i
  22457. o M
  22458. n
  22459. ) o
  22460. d
  22461. e
  22462.  
  22463. ----------------------- Page 465-----------------------
  22464.  
  22465.  
  22466.  
  22467. CKIO
  22468.  
  22469. E F Source address Source address Source address Source address
  22470. i
  22471. x g
  22472. t
  22473. u
  22474. A[25:0]
  22475. e
  22476. r r
  22477. n e
  22478.  
  22479. a
  22480. l 1
  22481. 4
  22482. B .
  22483. u 1
  22484. 9
  22485. D[63:0] Read Read Read Read
  22486. s
  22487.  
  22488.  
  22489. S
  22490. E i
  22491. n
  22492. DREQ0
  22493. x
  22494. t g (level
  22495. e l
  22496. r e detection) 1st 2nd 3rd 4th
  22497. n acceptance acceptance acceptance acceptance
  22498. a A
  22499. l
  22500. d
  22501. B d
  22502. u r DREQ1
  22503. s e
  22504. / s
  22505. D s
  22506. R M
  22507. E o
  22508. Q d
  22509. DRAK0
  22510. e
  22511. /
  22512. ( C
  22513. L y
  22514. e c
  22515. v l
  22516. e e
  22517. l Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU DMAC CPU
  22518.  
  22519. S
  22520. D t
  22521. e
  22522. e a
  22523. t
  22524. e l
  22525. c
  22526. t M
  22527. i
  22528. o o DACK0
  22529. n d
  22530. ) e
  22531.  
  22532. : DREQ sampling and determination of channel priority
  22533.  
  22534. 4
  22535. 4
  22536. 9
  22537.  
  22538. ----------------------- Page 466-----------------------
  22539.  
  22540. 4
  22541. 5
  22542. 0
  22543.  
  22544.  
  22545.  
  22546. CKIO
  22547.  
  22548. E F
  22549. i
  22550. Source address Source address Source address
  22551. x g
  22552. t u A[25:0]
  22553. e r
  22554. r
  22555. e
  22556. n
  22557. a
  22558. l 1
  22559. 4
  22560. B .
  22561. 2
  22562. u 0 D[63:0] Read Read Read
  22563. s
  22564.  
  22565.  
  22566. S
  22567. E i
  22568. n
  22569. x
  22570. DREQ0
  22571. t g (edge
  22572. e l
  22573. r e detection) 1st 2nd 3rd
  22574. n
  22575. A
  22576. acceptance acceptance acceptance
  22577. a
  22578. l d
  22579. B d
  22580. r
  22581. u e DREQ1
  22582. s s
  22583. /
  22584. D s
  22585. R M
  22586. E o
  22587. Q d
  22588. DRAK0
  22589. e
  22590.  
  22591. /
  22592. ( C
  22593. E y
  22594. d c
  22595. g l
  22596. e
  22597. e CPU DMAC CPU DMAC CPU DMAC CPU
  22598. Bus cycle
  22599. S
  22600. D t
  22601. e e
  22602. t a
  22603. e l
  22604.  
  22605. c
  22606. t M
  22607. i
  22608. o
  22609. n o DACK0
  22610. ) d
  22611. e
  22612.  
  22613. : DREQ sampling and determination of channel priority
  22614.  
  22615. ----------------------- Page 467-----------------------
  22616.  
  22617.  
  22618.  
  22619. CKIO
  22620.  
  22621. E
  22622. x
  22623. t
  22624. Source address Source address Source address Source address
  22625. e F
  22626. r i
  22627. A[25:0]
  22628. n g
  22629. a u
  22630. l r
  22631. e
  22632. B
  22633. u 1
  22634. s 4 D[63:0] Read Read Read Read
  22635. .
  22636. → 2
  22637. 1
  22638.  
  22639.  
  22640. E
  22641. x DREQ0
  22642. t S
  22643. e i (level
  22644. r n
  22645. n
  22646. detection) 1st 2nd 3rd 4th
  22647. g
  22648. a l acceptance acceptance acceptance acceptance
  22649. l e
  22650.  
  22651. B A
  22652. u d
  22653. s
  22654. DREQ1
  22655. / d
  22656. D r
  22657. e
  22658. R s
  22659. s
  22660. E
  22661. Q M
  22662. DRAK0
  22663. o
  22664. ( d
  22665. L e
  22666. e /
  22667. v B
  22668. e u Bus cycle CPU DMAC-1 DMAC-2 DMAC-3 CPU DMAC-4
  22669. l r
  22670.  
  22671. s
  22672. D t
  22673. e M
  22674. t
  22675. e o
  22676. c d
  22677. t
  22678. i e
  22679. DACK0
  22680. o
  22681. n
  22682. )
  22683.  
  22684. : DREQ sampling and determination of channel priority
  22685.  
  22686. 4
  22687. 5
  22688. 1
  22689.  
  22690. ----------------------- Page 468-----------------------
  22691.  
  22692. 4
  22693. 5
  22694. 2
  22695.  
  22696.  
  22697.  
  22698. CKIO
  22699.  
  22700. E Source address Source address Source address Source address
  22701. x
  22702. t F
  22703. A[25:0]
  22704. e i
  22705. r g
  22706. n u
  22707. a r
  22708. l
  22709. e
  22710.  
  22711. B
  22712. u 1
  22713. 4
  22714. D[63:0] Read Read Read Read
  22715. s .
  22716. 2
  22717. → 2
  22718.  
  22719.  
  22720. E DREQ0
  22721. x S (edge
  22722. t
  22723. e i
  22724. n
  22725. detection)
  22726. r
  22727. 1st
  22728. n g acceptance
  22729. l
  22730. a e
  22731. l
  22732.  
  22733. B A TE bit: transfer end
  22734. u d
  22735. s d
  22736. / r
  22737. D e
  22738. R s
  22739. s
  22740. E
  22741. Q M DRAK0
  22742. o
  22743. ( d
  22744. E e
  22745. /
  22746. d B
  22747. g u
  22748. e
  22749. r
  22750. Bus cycle CPU DMAC-1 DMAC-2 DMAC-3 DMAC-4 CPU
  22751.  
  22752. s
  22753. D t
  22754. e M
  22755. t
  22756. e
  22757. c o
  22758. t d
  22759. i e
  22760. o DACK0
  22761. n
  22762. )
  22763.  
  22764. : DREQ sampling and determination of channel priority
  22765.  
  22766. ----------------------- Page 469-----------------------
  22767.  
  22768. E
  22769. x
  22770. t
  22771. e
  22772. r
  22773. n
  22774. a
  22775. l
  22776. CKIO
  22777. B
  22778. u
  22779. s
  22780. Destination Destination Destination
  22781. → address address address
  22782. ( F
  22783. B E i A[25:0]
  22784. g
  22785. u x u
  22786. s t r
  22787. e e
  22788. W r
  22789. n
  22790. i a 1
  22791. d l 4 D[63:0] Write Write Write Write Write Write Write Write Write Write Write Write
  22792. .
  22793. t B 2
  22794. h 3
  22795. : u
  22796. s
  22797. 6 /
  22798. 4 D DREQ0
  22799. R S
  22800. i (level
  22801. B E n detection)
  22802. i
  22803. 1st 2nd 3rd
  22804. t g
  22805. s Q l acceptance acceptance acceptance
  22806. , e
  22807.  
  22808. S ( A
  22809. D L d
  22810. e DREQ1
  22811. R v d
  22812. A e r
  22813. l e
  22814. M s
  22815. s
  22816. : D
  22817. e M DRAK0
  22818. R t
  22819. e o
  22820. o c d
  22821. w t e
  22822. i
  22823. o
  22824. DMAC-1 DMAC-2 DMAC-3
  22825. /
  22826. H n B
  22827. i ) u Bus cycle CPU CPU
  22828. /
  22829. t 3 r
  22830. s
  22831. 2 t
  22832. W B- Asserted 2 cycles before Asserted 2 cycles before Asserted 2 cycles before
  22833. r y M start of bus cycle start of bus cycle start of bus cycle
  22834. i
  22835. t t o
  22836. e e d
  22837. )
  22838. e DACK0
  22839. B
  22840. l
  22841. o
  22842. c
  22843. k
  22844.  
  22845. T
  22846. r : DREQ sampling and determination of channel priority
  22847. a
  22848. n
  22849. s
  22850. f
  22851. 4 e
  22852. 5 r
  22853. 3
  22854.  
  22855. ----------------------- Page 470-----------------------
  22856.  
  22857. 1 4 . 3 . 6 Ending DMA Transfer
  22858.  
  22859. The conditions for ending DMA transfer are different for ending on individual channels and for
  22860. ending on all channels together. Except for the case where transfer ends when the value in the
  22861. DMA transfer count register (DMATCR) reaches 0, the following conditions apply to ending
  22862. transfer.
  22863.  
  22864. 1. Cycle Steal Mode (External Request, On-Chip Peripheral Module Request, Auto-Request)
  22865.  
  22866. When a transfer end condition is satisfied, acceptance of DMAC transfer requests is suspended.
  22867. The DMAC completes transfer for the transfer requests accepted up to the point at which the
  22868. transfer end condition was satisfied, then stops.
  22869.  
  22870. In cycle steal mode, the operation is the same for both edge and level transfer request detection.
  22871.  
  22872. 2. Burst Mode, Edge Detection (External Request, On-Chip Peripheral Module Request, Auto-
  22873. Request)
  22874.  
  22875. The delay between the point at which a transfer end condition is satisfied and the point at which
  22876. the DMAC actually stops is the same as in cycle steal mode. In burst mode with edge
  22877. detection, only the first transfer request activates the DMAC, but the timing of stop request
  22878. (DE = 0 in CHCR, DME = 0 in DMAOR) sampling is the same as the transfer request
  22879. sampling timing shown in 4 and 5 under Operation in section 14.3.5. Therefore, a transfer
  22880. request is regarded as having been issued until a stop request is detected, and the corresponding
  22881. processing is executed before the DMAC stops.
  22882.  
  22883. 3. Burst Mode, Level Detection (External Request)
  22884.  
  22885. The delay between the point at which a transfer end condition is satisfied and the point at which
  22886. the DMAC actually stops is the same as in cycle steal mode. As in the case of burst mode with
  22887. edge detection, the timing of stop request (DE = 0 in CHCR, DME = 0 in DMAOR) sampling
  22888. is the same as the transfer request sampling timing shown in 2 and 3 under Operation in
  22889. section 14.3.5. Therefore, a transfer request is regarded as having been issued until a stop
  22890. request is detected, and the corresponding processing is executed before the DMAC stops.
  22891.  
  22892. 4. Transfer Suspension Bus Timing
  22893.  
  22894. Transfer suspension is executed on completion of processing for one transfer unit. In dual
  22895. address mode transfer, write cycle processing is executed even if a transfer end condition is
  22896. satisfied during the read cycle, and the transfers covered in 1, 2, and 3 above are also executed
  22897. before operation is suspended.
  22898.  
  22899. Conditions for Ending Transfer on Individual Channels: Transfer ends on the
  22900. corresponding channel when either of the following conditions is satisfied:
  22901.  
  22902. • The value in the DMA transfer count register (DMATCR) reaches 0.
  22903.  
  22904. • The DE bit in the DMA channel control register (CHCR) is cleared to 0.
  22905.  
  22906. 1. End of transfer when DMATCR = 0
  22907. 454
  22908.  
  22909. ----------------------- Page 471-----------------------
  22910.  
  22911. When the DMATCR value reaches 0, DMA transfer ends on the corresponding channel and the
  22912. transfer end flag (TE) in CHCR is set. If the interrupt enable bit (IE) is set at this time, an
  22913. interrupt (DMTE) request is sent to the CPU.
  22914.  
  22915. Transfer ending when DMATCR = 0 does not follow the procedures described in 1, 2, 3, and 4
  22916. in section 14.3.6.
  22917.  
  22918. 2. End of transfer when DE = 0 in CHCR
  22919.  
  22920. When the DMA enable bit (DE) in CHCR is cleared, DMA transfer is suspended on the
  22921. corresponding channel. The TE bit is not set in this case. Transfer ending in this case follows
  22922. the procedures described in 1, 2, 3, and 4 in section 14.3.6.
  22923.  
  22924. Conditions for Ending Transfer Simultaneously on All Channels: Transfer ends on
  22925. all channels simultaneously when either of the following conditions is satisfied:
  22926.  
  22927. • The address error bit (AE) or NMI flag (NMIF) in the DMA operation register (DMAOR) is
  22928. set.
  22929.  
  22930. • The DMA master enable bit (DME) in DMAOR is cleared to 0.
  22931.  
  22932. 1. End of transfer when AE = 1 in DMAOR
  22933.  
  22934. If the AE bit in DMAOR is set to 1 due to an address error, DMA transfer is suspended on all
  22935. channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is
  22936. passed to the CPU. Therefore, when AE is set to 1, the values in the DMA source address
  22937. register (SAR), DMA destination address register (DAR), and DMA transfer count register
  22938. (DMATCR) indicate the addresses for the DMA transfer to be performed next and the remaining
  22939. number of transfers. The TE bit is not set in this case. Before resuming transfer, it is necessary
  22940. to make a new setting for the channel that caused the address error, then write 0 to the AE bit
  22941. after first reading 1 from it. Acceptance of external requests is suspended while AE is set to 1,
  22942. so a DMA transfer request must be reissued when resuming transfer. Acceptance of internal
  22943. requests is also suspended, so when resuming transfer, the DMA transfer request enable bit for
  22944. the relevant on-chip peripheral module must be cleared to 0 before the new setting is made.
  22945.  
  22946. 455
  22947.  
  22948. ----------------------- Page 472-----------------------
  22949.  
  22950. 2. End of transfer when NMIF = 1 in DMAOR
  22951.  
  22952. If the NMIF bit in DMAOR is set to 1 due to an NMI interrupt, DMA transfer is suspended on
  22953. all channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is
  22954. passed to the CPU. Therefore, when NMIF is set to 1, the values in the DMA source address
  22955. register (SAR), DMA destination address register (DAR), and DMA transfer count register
  22956. (DMATCR) indicate the addresses for the DMA transfer to be performed next and the remaining
  22957. number of transfers. The TE bit is not set in this case. Before resuming transfer after NMI
  22958. interrupt handling is completed, 0 must be written to the NMIF bit after first reading 1 from it.
  22959. As in the case of AE being set to 1, acceptance of external requests is suspended while NMIF is
  22960. set to 1, so a DMA transfer request must be reissued when resuming transfer. Acceptance of
  22961. internal requests is also suspended, so when resuming transfer, the DMA transfer request enable
  22962. bit for the relevant on-chip peripheral module must be cleared to 0 before the new setting is
  22963. made.
  22964.  
  22965. 3. End of transfer when DME = 0 in DMAOR
  22966.  
  22967. If the DME bit in DMAOR is cleared to 0, DMA transfer is suspended on all channels in
  22968. accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is passed to the
  22969. CPU. The TE bit is not set in this case. When DME is cleared to 0, the values in the DMA
  22970. source address register (SAR), DMA destination address register (DAR), and DMA transfer
  22971. count register (DMATCR) indicate the addresses for the DMA transfer to be performed next and
  22972. the remaining number of transfers. When resuming transfer, DME must be set to 1. Operation
  22973. will then be resumed from the next transfer.
  22974.  
  22975. 456
  22976.  
  22977. ----------------------- Page 473-----------------------
  22978.  
  22979. 1 4 . 4 Examples of Use
  22980.  
  22981. 1 4 . 4 . 1 Examples of Transfer between External Memory and an External Device
  22982.  
  22983. with DACK
  22984.  
  22985. Examples of transfer of data in external memory to an external device with DACK using DMAC
  22986. channel 1 are considered here.
  22987.  
  22988. Table 14.8 shows the transfer conditions and the corresponding register settings.
  22989.  
  22990. Table 14.8 Conditions for Transfer between External Memory and an External
  22991. Device with DACK, and Corresponding Register Settings
  22992.  
  22993. Transfer Conditions Register Set Value
  22994.  
  22995. Transfer source: external memory SAR1 H'0C000000
  22996.  
  22997. Transfer source: external device with DACK DAR1 (Accessed by DACK)
  22998.  
  22999. Number of transfers: 32 DMATCR1 H'00000020
  23000.  
  23001. Transfer source address: decremented CHCR1 H'000022A5
  23002.  
  23003. Transfer destination address: (setting invalid)
  23004.  
  23005. Transfer request source: external pin (DREQ1 )
  23006. edge detection
  23007.  
  23008. Bus mode: burst
  23009.  
  23010. Transfer unit: word
  23011.  
  23012. No interrupt request at end of transfer
  23013.  
  23014. Channel priority order: 2 > 0 > 1 > 3 DMAOR H'00000201
  23015.  
  23016. 457
  23017.  
  23018. ----------------------- Page 474-----------------------
  23019.  
  23020. 1 4 . 5 On-Demand Data Transfer Mode
  23021.  
  23022. 1 4 . 5 . 1 Operation
  23023.  
  23024. Setting the DDT bit to 1 in DMAOR causes a transition to on-demand data transfer mode (DDT
  23025. mode). In DDT mode, it is possible to specify direct single address mode transfer to channel 0 via
  23026. the data bus and DDT module, and simultaneously issue a transfer request, using the DBREQ ,
  23027. BAVL, TR , TDACK, and ID [1:0] signals between an external device and the DMAC. Figure
  23028. 14.24 shows a block diagram of the DMAC, DDT, BU, and an external device (withDBREQ ,
  23029. BAVL, TR , TDACK, and ID [1:0] pins).
  23030.  
  23031. DMAC DDT
  23032. SAR0 Memory
  23033.  
  23034. DAR0
  23035. Data
  23036. DMATCR0 buffer
  23037.  
  23038. CHCR0
  23039. s
  23040. s u
  23041. Request u b
  23042. DREQ0–3 controller b a
  23043. ddtmode s t
  23044. s a
  23045. e D
  23046. r
  23047. d
  23048. bavl TR d External
  23049. ddtmode tdack id[1:0] A device (with
  23050.  
  23051. DTR DBREQ, BAVL,
  23052. BAVL TR, TDACK,
  23053. BSC
  23054. DBREQ
  23055. and ID [1:0])
  23056.  
  23057. Data buffer
  23058. TDACK FIFO or
  23059. ID[1:0] memory
  23060.  
  23061. Figure 14.24 On-Demand Transfer Mode Block Diagram
  23062.  
  23063. For channels 1 to 3, after making the settings for normal DMA transfer using the CPU, a transfer
  23064. request can be issued from an external device using the DBREQ , BAVL, TR , TDACK, and ID
  23065. [1:0] signals (handshake protocol using the data bus). A transfer request can also be issued simply
  23066. by asserting TR , without using the external bus (handshake protocol without use of the data bus).
  23067. For channel 2, after making the DMA transfer settings in the normal way, a transfer request can be
  23068. issued directly from an external device (with DBREQ , BAVL, TR , TDACK, and ID [1:0] pins) by
  23069. asserting DBREQ and TR simultaneously .
  23070.  
  23071. In DDT mode, there is a choice of five modes for performing DMA transfer.
  23072.  
  23073. 458
  23074.  
  23075. ----------------------- Page 475-----------------------
  23076.  
  23077. 1. Normal data transfer mode (channel 0)
  23078.  
  23079. BAVL (the data bus available signal) is asserted in response to DBREQ (the data bus request
  23080. signal) from an external device. Two CKIO-synchronous cycles afterBAVL is asserted, the
  23081. external data bus drives the data transfer setting command (DTR command) in synchronization
  23082. with TR (the transfer request signal). The initial settings are then made in the DMAC channel
  23083. 0 control register, and the DMA transfer is processed.
  23084.  
  23085. 2. Normal data transfer mode (except channel 0)
  23086.  
  23087. In this mode, the data transfer settings are made in the DMAC from the CPU, and DMA
  23088. transfer requests only are performed from the external device.
  23089.  
  23090. As in 1 above, DBREQ is asserted from the external device and the external bus is secured,
  23091. then the DTR command is driven.
  23092.  
  23093. The transfer request channel can be specified by means of the two ID bits in the DTR
  23094. command.
  23095.  
  23096. 3. Handshake protocol using the data bus (valid for channel 0 only)
  23097.  
  23098. This mode is only valid for channel 0.
  23099.  
  23100. After the initial settings have been made in the DMAC channel 0 control register, the DDT
  23101. module asserts a data transfer request for the DMAC by setting the DTR command ID = 00 and
  23102. MD = 00, and driving the DTR command.
  23103.  
  23104. 4. Handshake protocol without use of the data bus
  23105.  
  23106. The DDT module includes a function for recording the previously asserted request channel. By
  23107. using this function, it is possible to assert a transfer request for the channel for which a request
  23108. was asserted immediately before, by asserting TR only from an external device after a transfer
  23109. request has once been made to the channel for which an initial setting has been made in the
  23110. DMAC control register (DTR command and data transfer setting by the CPU in the DMAC).
  23111. 5. Direct data transfer mode (valid for channel 2 only)
  23112.  
  23113. A data transfer request can be asserted for channel 2 by asserting DREQ and TR simultaneously
  23114. from an external device after the initial settings have been made in the DMAC channel 2
  23115. control register.
  23116.  
  23117. Note: For details of the DTR format setting procedure, see Appendix G, SH7750 On-Demand
  23118. Data Transfer Mode.
  23119.  
  23120. 459
  23121.  
  23122. ----------------------- Page 476-----------------------
  23123.  
  23124. 1 4 . 5 . 2 Notes on Use of DDT Module
  23125.  
  23126. 1. The handshake protocol without use of the data bus is always used, except in the case where
  23127. TR is asserted two cycles after BAVL is asserted (and excluding requests to channel 2 by means
  23128. of simultaneous assertion of DBREQ and TR ).
  23129.  
  23130. 2. If a request to channel 2 is asserted by simultaneous assertion of DBREQ and TR during
  23131. execution with the handshake protocol without use of the data bus, it is accepted if there is
  23132. space in the channel 2 request queue.
  23133.  
  23134. 3. With the handshake protocol without use of the data bus, a DMA transfer request can be
  23135. asserted again for the channel for which transfer was requested immediately before by asserting
  23136. TR only.
  23137.  
  23138. 4. When channel 0 is operated using the handshake protocol without use of the data bus, MD ≠
  23139. 00 should always be transferred as initialization data*. Operation is not guaranteed if the
  23140. handshake protocol is executed without transferring initialization data.
  23141.  
  23142. Note: * Initialization data: MD ≠ 00, ID = 00, SZ, R/W, COUNT, ADDRESS.
  23143.  
  23144. 5. If only TR is asserted when operating other than with the handshake protocol without use of
  23145. the data bus, this is ignored by the DDT module (which does not operate).
  23146.  
  23147. 6. Operation is not guaranteed if the handshake protocol using the data bus is executed for channel
  23148. 0 without transferring initialization data. (A request only is asserted for the DMAC.)
  23149.  
  23150. 7. The DDT module is provided with four request queues for each of channels 1 to 3. If a request
  23151. from an external device is asserted when these request queues are full, it will be ignored.
  23152. (Channel 0 has a request flag; requests asserted while this flag is set are ignored.)
  23153.  
  23154. 8. The DDT module uses the following procedure to process ID, MD, and SZ:
  23155.  
  23156. When ID = 00
  23157.  
  23158. a. MD = 00: ID, MD select (handshake with data bus)
  23159.  
  23160. b. MD ≠ 00, SZ = 111: DMAC (CHCR0 DE bit) setting (transfer end request)
  23161.  
  23162. c. MD ≠ 00: ADDRESS, COUNT, MD, RW, SZ, ID select (data transfer to DMAC)
  23163.  
  23164. When ID ≠ 00
  23165.  
  23166. a. Request to channels 1–3 (items other than ID ignored)
  23167.  
  23168. 9. A data transfer end request (ID = 00, MD ≠ 00, SZ = 111) is not accepted when the channel 0
  23169. request flag in the DDT module is set (is not accepted during the bus cycle). Therefore, if the
  23170. DTR command initialization data settings are ID = 00 and MD = 01 (edge sensing and burst
  23171. transfer), transfer cannot be halted midway. (Set MD to a value other than 01.)
  23172.  
  23173. 10.The handshake protocol using the data bus applies only to channel 0 (MD = 00).
  23174.  
  23175. 11.Except when DTR.ID = 00, data other than DTR.ID is ignored.
  23176.  
  23177. 460
  23178.  
  23179. ----------------------- Page 477-----------------------
  23180.  
  23181. 12.A channel 0 DMA transfer halt request can be implemented by settings of DTR.ID = 00,
  23182. DTR.MD ≠ 00, and DTR.SZ = 111. Values set in DMAC control registers, etc., are retained.
  23183. DMAC register reads are possible, but an execution restart from an external device is not
  23184. possible.
  23185.  
  23186. 13.If a request is asserted for a channel other than channel 0 during execution with the handshake
  23187. protocol using the data bus, and settings of DTR.ID = 00 and DTR.MD = 00 are sent by an
  23188. external device with the handshake protocol using the data bus after DMA transfer has been
  23189. executed on that channel, a request to channel 0 is asserted. (Initialization data need not be set
  23190. when continuing in this way.)
  23191.  
  23192. 14.DBREQ is already used as a bus arbitration signal, but when a request to channel 2 is asserted
  23193. by means of simultaneous assertion of DBREQ and TR , DBREQ is not interpreted as a bus
  23194. arbitration signal (i.e., BAVL is not asserted by this signal).
  23195.  
  23196. 15.It takes one cycle for DBREQ to be accepted by the DDT module after being asserted by an
  23197. external device, but if BAVL is asserted from the BSC at this time, BAVL is not asserted
  23198. since the DBREQ assertion by the external device is not reported to the BSC.
  23199.  
  23200. 16.When settings of ID = 00, MD = 10, and SZ = 110 are transferred to the DDT module, the
  23201. DDT channel 0 request flag and channel 1 to 3 request queues are cleared. (If a transfer request to
  23202. a particular channel is followed by another request to the same channel while the TE bit in
  23203. CHCR remains set to 1, request queue clearance is necessary since the DMAC is halted.)
  23204.  
  23205. 17.When TR only is asserted in the handshake protocol using the data bus while the channel 0 TE
  23206. flag is set after the end of the last DMA transfer, the TE flag must be cleared.
  23207.  
  23208. If a transfer request is sent by asserting TR only for channel 0 when the channel 0 TE flag is
  23209. set, the DMAC will freeze. In this case, the flag can be cleared as described in 16 above.
  23210.  
  23211. 18.After DBREQ is asserted, do not assert DBREQ again until BAVL is asserted, as this will
  23212. result in a discrepancy between the number of DBREQ and BAVL assertions.
  23213.  
  23214. 19.Check that DMA transfer is not in progress before modifying the DDT bit in DMAOR. If
  23215. DMAOR.DDT is cleared to 0 during DMA transfer in DDT mode, the DMAC will freeze. In
  23216. this case, the flag can be cleared as described in 16 above.
  23217.  
  23218. 461
  23219.  
  23220. ----------------------- Page 478-----------------------
  23221.  
  23222. 1 4 . 6 Usage Notes
  23223.  
  23224. 1. When modifying SAR0–SAR3, DAR0–DAR3, DMATCR0–DMATCR3, and CHCR0–
  23225. CHCR3, first clear the DE bit for the relevant channel to 0.
  23226.  
  23227. 2. The NMIF bit in DMAOR is set when an NMI interrupt is input even if the DMAC is not
  23228. operating.
  23229.  
  23230. Confirmation method when DMA transfer is not executed correctly:
  23231.  
  23232. Read the NMIF, AE, and DME bits in DMAOR, the DE and TE bits in CHCR0–CHCR3, and
  23233. DMATCR0–DMATCR3. If NMIF was set before the transfer, the DMATCR transfer count
  23234. will remain at the set value. If NMIF was set during the transfer, when the DE bit is 1 and the
  23235. TE bit is 0 in CHCR0–CHCR3, the DMATCR value will indicate the remaining number of
  23236. transfers.
  23237.  
  23238. Also, the next addresses to be accessed can be found by reading SAR0–SAR3 and DAR0–
  23239. DAR3. If the AE bit has been set, an address error has occurred. Check the set values in
  23240. CHCR, SAR, and DAR.
  23241.  
  23242. 3. Check that DMA transfer is not in progress before making a transition to the module standby
  23243. state, standby mode, or deep sleep mode.
  23244.  
  23245. Either check that TE = 1 in CHCR0–CHCR3, or clear DME to 0 in DMAOR to terminate
  23246. DMA transfer. When DME is cleared to 0 in DMAOR, transfer halts at the end of the currently
  23247. executing DMA bus cycle. Note, therefore, that transfer may not end immediately, depending
  23248. on the transfer data size. DMA operation is not guaranteed if the module standby state, standby
  23249. mode, or deep sleep mode is entered without confirming that DMA transfer has ended.
  23250.  
  23251. 4. Do not specify a DMAC, CCN, BIST, BSC, or UBC control register as the DMAC transfer
  23252. source or destination.
  23253.  
  23254. 5. When activating the DMAC, make the SAR, DAR, and DMATCR register settings for the
  23255. relevant channel before setting DE to 1 in CHCR, or make the register settings with DE
  23256. cleared to 0 in CHCR, then set DE to 1. It does not matter whether setting of the DME bit to
  23257. 1 in DMAOR is carried out first or last. To operate the relevant channel, DME and DE must
  23258. both be set to 1. The DMAC may not operate normally if the SAR, DAR, and DMATCR
  23259. settings are not made (with the exception of the unused register in single address mode).
  23260.  
  23261. 6. After the DMATCR count reaches 0 and DMA transfer ends normally, always write 0 to
  23262. DMATCR even when executing the maximum number of transfers on the same channel.
  23263.  
  23264. 7. When falling edge detection is used for external requests, keep the external request pin high
  23265. when making DMAC settings.
  23266.  
  23267. 8. When using the DMAC in single address mode, set an external address as the address. All
  23268. channels will halt due to an address error if an on-chip peripheral module address is set.
  23269.  
  23270. 462
  23271.  
  23272. ----------------------- Page 479-----------------------
  23273.  
  23274. Section 15 Serial Communication Interface (SCI)
  23275.  
  23276. 1 5 . 1 Overview
  23277.  
  23278. The SH7750 is equipped with a single-channel serial communication interface (SCI) and a single-
  23279. channel serial communication interface with built-in FIFO registers (SCI with FIFO: SCIF).
  23280.  
  23281. The SCI can handle both asynchronous and synchronous serial communication. A function is also
  23282. provided for serial communication between processors (multiprocessor communication function).
  23283.  
  23284. The SCI supports a smart card interface conforming to ISO/IEC 7816-3 (Identification Card) as a
  23285. serial communication interface function for IC card interface use. For details, see section 17, Smart
  23286. Card Interface.
  23287.  
  23288. The SCIF is a dedicated asynchronous communication serial interface with built-in 16-stage FIFO
  23289. registers for both transmission and reception. For details, see section 16, Serial Communication
  23290. Interface with FIFO.
  23291.  
  23292. 1 5 . 1 . 1 Features
  23293.  
  23294. SCI features are listed below.
  23295.  
  23296. • Choice of synchronous or asynchronous serial communication mode
  23297.  
  23298.  Asynchronous mode
  23299.  
  23300. Serial data communication is executed using an asynchronous system in which
  23301. synchronization is achieved character by character. Serial data communication can be carried
  23302. out with standard asynchronous communication chips such as a Universal Asynchronous
  23303. Receiver/Transmitter (UART) or Asynchronous Communication Interface Adapter (ACIA).
  23304. A multiprocessor communication function is also provided that enables serial data
  23305. communication with a number of processors.
  23306. There is a choice of 12 serial data transfer formats.
  23307.  
  23308. Data length: 7 or 8 bits
  23309.  
  23310. Stop bit length: 1 or 2 bits
  23311.  
  23312. Parity: Even/odd/none
  23313.  
  23314. Multiprocessor bit: 1 or 0
  23315.  
  23316. Receive error detection: Parity, overrun, and framing errors
  23317.  
  23318. Break detection: A break can be detected by reading the RxD
  23319. pin level directly from the serial port register (SCSPTR1) when
  23320. a framing error occurs.
  23321.  
  23322.  Synchronous mode
  23323.  
  23324. 463
  23325.  
  23326. ----------------------- Page 480-----------------------
  23327.  
  23328. Serial data communication is synchronized with a clock. Serial data communication can be
  23329. carried out with other chips that have a synchronous communication function.
  23330.  
  23331. There is a single serial data transfer format.
  23332.  
  23333. Data length: 8 bits
  23334.  
  23335. Receive error detection: Overrun errors
  23336.  
  23337. • Full-duplex communication capability
  23338.  
  23339. The transmitter and receiver are mutually independent, enabling transmission and reception to
  23340. be executed simultaneously. Double-buffering is used in both the transmitter and the receiver,
  23341. enabling continuous transmission and continuous reception of serial data.
  23342.  
  23343. • On-chip baud rate generator allows any bit rate to be selected.
  23344.  
  23345. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  23346. SCK pin
  23347.  
  23348. • Four interrupt sources
  23349.  
  23350. There are four interrupt sources—transmit-data-empty, transmit-end, receive-data-full, and
  23351. receive-error—that can issue requests independently. The transmit-data-empty interrupt and
  23352. receive-data-full interrupt can activate the DMA controller (DMAC) to execute a data transfer.
  23353.  
  23354. • When not in use, the SCI can be stopped by halting its clock supply to reduce power
  23355. consumption.
  23356.  
  23357. 464
  23358.  
  23359. ----------------------- Page 481-----------------------
  23360.  
  23361. 1 5 . 1 . 2 Block Diagram
  23362.  
  23363. Figure 15.1 shows a block diagram of the SCI.
  23364.  
  23365. e
  23366. c Internal
  23367. a
  23368. Module data bus f data bus
  23369. r
  23370. e
  23371. t
  23372. n
  23373. i
  23374.  
  23375. s
  23376. u
  23377. B
  23378.  
  23379. SCRDR1 SCTDR1 SCSSR1 SCBRR1
  23380. SCSCR1
  23381. SCSMR1
  23382. RxD SCRSR1 SCTSR1
  23383. SCSPTR1 Baud rate Pφ/4
  23384. generator
  23385. Transmission/
  23386. Pφ/16
  23387. reception
  23388. control
  23389. TxD Pφ/64
  23390. Parity generation Clock
  23391.  
  23392. Parity check
  23393. External clock
  23394. SCK
  23395. TEI
  23396. TXI
  23397. RXI
  23398. ERI
  23399.  
  23400. SCI
  23401.  
  23402. SCRSR1: Receive shift register
  23403. SCRDR1: Receive data register
  23404. SCTSR1: Transmit shift register
  23405. SCTDR1: Transmit data register
  23406. SCSMR1: Serial mode register
  23407. SCSCR1: Serial control register
  23408. SCSSR1: Serial status register
  23409. SCBRR1: Bit rate register
  23410. SCSPTR1: Serial port register
  23411.  
  23412. Figure 15.1 Block Diagram of SCI
  23413.  
  23414. 465
  23415.  
  23416. ----------------------- Page 482-----------------------
  23417.  
  23418. 1 5 . 1 . 3 Pin Configuration
  23419.  
  23420. Table 15.1 shows the SCI pin configuration.
  23421.  
  23422. Table 15.1SCI Pins
  23423.  
  23424. Pin Name Abbreviation I / O Function
  23425.  
  23426. Serial clock pin MD0/SCK I/O Clock input/output
  23427.  
  23428. Receive data pin RxD Input Receive data input
  23429.  
  23430. Transmit data pin MD7/TxD Output Transmit data output
  23431.  
  23432. Note: The serial clock pin and transmit data pin function as mode input pins MD0 and
  23433. MD7 after a power-on reset. They are made to function as serial pins by performing SCI
  23434. operation settings with the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/A bit in
  23435. SCSMR1. Break state transmission and detection, can be set in the SCI’s SCSPTR1
  23436. register.
  23437.  
  23438. 1 5 . 1 . 4 Register Configuration
  23439.  
  23440. The SCI has the internal registers shown in table 15.2. These registers are used to specify
  23441. asynchronous mode or synchronous mode, the data format, and the bit rate, and to perform
  23442. transmitter/receiver control.
  23443.  
  23444. With the exception of the serial port register, the SCI registers are initialized in standby mode and
  23445. in the module standby state as well as after a power-on reset or manual reset. When recovering
  23446. from standby mode or the module standby state, the registers must be set again.
  23447.  
  23448. Table 15.2SCI Registers
  23449.  
  23450. Initial Area 7 Acces
  23451. Name Abbreviation R/ W Value P4 Address Address s Size
  23452.  
  23453. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  23454.  
  23455. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  23456.  
  23457. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  23458.  
  23459. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  23460. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  23461.  
  23462. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  23463. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  23464.  
  23465. Notes: 1. Only 0 can be written, to clear flags.
  23466. 2. The value of bits 2 and 0 is undefined.
  23467.  
  23468. 466
  23469.  
  23470. ----------------------- Page 483-----------------------
  23471.  
  23472. 1 5 . 2 Register Descriptions
  23473.  
  23474. 1 5 . 2 . 1 Receive Shift Register (SCRSR1)
  23475.  
  23476. Bit: 7 6 5 4 3 2 1 0
  23477.  
  23478. R/W: — — — — — — — —
  23479.  
  23480. SCRSR1 is the register used to receive serial data.
  23481.  
  23482. The SCI sets serial data input from the RxD pin in SCRSR1 in the order received, starting with
  23483. the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it is
  23484. transferred to SCRDR1 automatically.
  23485.  
  23486. SCRSR1 cannot be directly read or written to by the CPU.
  23487.  
  23488. 1 5 . 2 . 2 Receive Data Register (SCRDR1)
  23489.  
  23490. Bit: 7 6 5 4 3 2 1 0
  23491.  
  23492. Initial value: 0 0 0 0 0 0 0 0
  23493.  
  23494. R/W: R R R R R R R R
  23495.  
  23496. SCRDR1 is the register that stores received serial data.
  23497.  
  23498. When the SCI has received one byte of serial data, it transfers the received data from SCRSR1 to
  23499. SCRDR1 where it is stored, and completes the receive operation. SCRSR1 is then enabled for
  23500. reception.
  23501.  
  23502. Since SCRSR1 and SCRDR1 function as a double buffer in this way, it is possible to receive data
  23503. continuously.
  23504.  
  23505. SCRDR1 is a read-only register, and cannot be written to by the CPU.
  23506.  
  23507. SCRDR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  23508. module standby state.
  23509.  
  23510. 467
  23511.  
  23512. ----------------------- Page 484-----------------------
  23513.  
  23514. 1 5 . 2 . 3 Transmit Shift Register (SCTSR1)
  23515.  
  23516. Bit: 7 6 5 4 3 2 1 0
  23517.  
  23518. R/W: — — — — — — — —
  23519.  
  23520. SCTSR1 is the register used to transmit serial data.
  23521.  
  23522. To perform serial data transmission, the SCI first transfers transmit data from SCTDR1 to
  23523. SCTSR1, then sends the data to the TxD pin starting with the LSB (bit 0).
  23524.  
  23525. When transmission of one byte is completed, the next transmit data is transferred from SCTDR1
  23526. to SCTSR1, and transmission started, automatically. However, data transfer from SCTDR1 to
  23527. SCTSR1 is not performed if the TDRE flag in the serial status register (SCSSR1) is set to 1.
  23528.  
  23529. SCTSR1 cannot be directly read or written to by the CPU.
  23530.  
  23531. 1 5 . 2 . 4 Transmit Data Register (SCTDR1)
  23532.  
  23533. Bit: 7 6 5 4 3 2 1 0
  23534.  
  23535. Initial value: 1 1 1 1 1 1 1 1
  23536.  
  23537. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23538.  
  23539. SCTDR1 is an 8-bit register that stores data for serial transmission.
  23540.  
  23541. When the SCI detects that SCTSR1 is empty, it transfers the transmit data written in SCTDR1 to
  23542. SCTSR1 and starts serial transmission. Continuous serial transmission can be carried out by
  23543. writing the next transmit data to SCTDR1 during serial transmission of the data in SCTSR1.
  23544.  
  23545. SCTDR1 can be read or written to by the CPU at all times.
  23546.  
  23547. SCTDR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  23548. module standby state.
  23549.  
  23550. 468
  23551.  
  23552. ----------------------- Page 485-----------------------
  23553.  
  23554. 1 5 . 2 . 5 Serial Mode Register (SCSMR1)
  23555.  
  23556. Bit: 7 6 5 4 3 2 1 0
  23557.  
  23558. C/A CHR PE O/E STOP MP CKS1 CKS0
  23559.  
  23560. Initial value: 0 0 0 0 0 0 0 0
  23561.  
  23562. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23563.  
  23564. SCSMR1 is an 8-bit register used to set the SCI’s serial transfer format and select the baud rate
  23565. generator clock source.
  23566.  
  23567. SCSMR1 can be read or written to by the CPU at all times.
  23568.  
  23569. SCSMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  23570. module standby state.
  23571.  
  23572. Bit 7—Communication Mode (C/A): Selects asynchronous mode or synchronous mode as
  23573. the SCI operating mode.
  23574.  
  23575. Bit 7: C/A Description
  23576.  
  23577. 0 Asynchronous mode (Initial value)
  23578.  
  23579. 1 Synchronous mode
  23580.  
  23581. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the data length in asynchronous
  23582. mode. In synchronous mode, a fixed data length of 8 bits is used regardless of the CHR setting,
  23583.  
  23584. Bit 6: CHR Description
  23585.  
  23586. 0 8-bit data (Initial value)
  23587.  
  23588. 1 7-bit data*
  23589.  
  23590. Note: * When 7-bit data is selected, the MSB (bit 7) of SCTDR1 is not transmitted.
  23591.  
  23592. Bit 5—Parity Enable (PE): In asynchronous mode, selects whether or not parity bit addition
  23593. is performed in transmission, and parity bit checking in reception. In synchronous mode, parity bit
  23594. addition and checking is not performed, regardless of the PE bit setting.
  23595.  
  23596. Bit 5: PE Description
  23597.  
  23598. 0 Parity bit addition and checking disabled (Initial value)
  23599.  
  23600. 1 Parity bit addition and checking enabled*
  23601.  
  23602. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/E bit is added to
  23603. transmit data before transmission. In reception, the parity bit is checked for the parity
  23604. (even or odd) specified by the O/E bit.
  23605.  
  23606. 469
  23607.  
  23608. ----------------------- Page 486-----------------------
  23609.  
  23610. Bit 4—Parity Mode (O/E ): Selects either even or odd parity for use in parity addition and
  23611. checking. The O/E bit setting is only valid when the PE bit is set to 1, enabling parity bit
  23612. addition and checking, in asynchronous mode. The O/E bit setting is invalid in synchronous mode,
  23613. and when parity addition and checking is disabled in asynchronous mode.
  23614.  
  23615. Bit 4: O/E Description
  23616. 0 Even parity*1 (Initial value)
  23617.  
  23618. 1 Odd parity*2
  23619.  
  23620. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the total
  23621. number of 1-bits in the transmit character plus the parity bit is even. In reception, a
  23622. check is performed to see if the total number of 1-bits in the receive character plus the
  23623. parity bit is even.
  23624. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  23625. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  23626. check is performed to see if the total number of 1-bits in the receive character plus the
  23627. parity bit is odd.
  23628.  
  23629. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length in asynchronous
  23630. mode. The STOP bit setting is only valid in asynchronous mode. If synchronous mode is set, the
  23631. STOP bit setting is invalid since stop bits are not added.
  23632.  
  23633. Bit 3: STOP Description
  23634. 0 1 stop bit*1 (Initial value)
  23635.  
  23636. 1 2 stop bits*2
  23637.  
  23638. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  23639. before it is sent.
  23640. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  23641. before it is sent.
  23642.  
  23643. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  23644. 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
  23645. character.
  23646.  
  23647. 470
  23648.  
  23649. ----------------------- Page 487-----------------------
  23650.  
  23651. Bit 2—Multiprocessor Mode (MP): Selects a multiprocessor format. When a
  23652. multiprocessor format is selected, the PE bit and O/E bit parity settings are invalid. The MP bit
  23653. setting is only valid in asynchronous mode; it is invalid in synchronous mode.
  23654.  
  23655. For details of the multiprocessor communication function, see section 15.3.3, Multiprocessor
  23656. Communication Function.
  23657.  
  23658. Bit 2: MP Description
  23659.  
  23660. 0 Multiprocessor function disabled (Initial value)
  23661.  
  23662. 1 Multiprocessor format selected
  23663.  
  23664. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source
  23665. for the on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and
  23666. Pφ/64, according to the setting of bits CKS1 and CKS0.
  23667.  
  23668. For the relation between the clock source, the bit rate register setting, and the baud rate, see section
  23669. 15.2.9, Bit Rate Register (SCBRR1).
  23670.  
  23671. Bit 1: CKS1 Bit 0: CKS0 Description
  23672.  
  23673. 0 0 Pφ clock (Initial value)
  23674.  
  23675. 1 Pφ/4 clock
  23676.  
  23677. 1 0 Pφ/16 clock
  23678.  
  23679. 1 Pφ/64 clock
  23680.  
  23681. Note: Pφ: Peripheral clock
  23682.  
  23683. 1 5 . 2 . 6 Serial Control Register (SCSCR1)
  23684.  
  23685. Bit: 7 6 5 4 3 2 1 0
  23686.  
  23687. TIE RIE TE RE MPIE TEIE CKE1 CKE0
  23688.  
  23689. Initial value: 0 0 0 0 0 0 0 0
  23690.  
  23691. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23692.  
  23693. The SCSCR1 register performs enabling or disabling of SCI transfer operations, serial clock
  23694. output in asynchronous mode, and interrupt requests, and selection of the serial clock source.
  23695.  
  23696. SCSCR1 can be read or written to by the CPU at all times.
  23697.  
  23698. SCSCR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  23699. module standby state.
  23700.  
  23701. 471
  23702.  
  23703. ----------------------- Page 488-----------------------
  23704.  
  23705. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-data-empty
  23706. interrupt (TXI) request generation when serial transmit data is transferred from SCTDR1 to
  23707. SCTSR1 and the TDRE flag in SCSSR1 is set to 1.
  23708.  
  23709. Bit 7: TIE Description
  23710.  
  23711. 0 Transmit-data-empty interrupt (TXI) request disabled* (Initial value)
  23712.  
  23713. 1 Transmit-data-empty interrupt (TXI) request enabled
  23714.  
  23715. Note: * TXI interrupt requests can be cleared by reading 1 from the TDRE flag, then clearing it to 0,
  23716. or by clearing the TIE bit to 0.
  23717.  
  23718. Bit 6—Receive Interrupt Enable (RIE): Enables or disables receive-data-full interrupt
  23719. (RXI) request and receive-error interrupt (ERI) request generation when serial receive data is
  23720. transferred from SCRSR1 to SCRDR1 and the RDRF flag in SCSSR1 is set to 1.
  23721.  
  23722. Bit 6: RIE Description
  23723.  
  23724. 0 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  23725. request disabled* (Initial value)
  23726.  
  23727. 1 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  23728. request enabled
  23729.  
  23730. Note: * RXI and ERI interrupt requests can be cleared by reading 1 from the RDRF flag, or the FER,
  23731. PER, or ORER flag, then clearing the flag to 0, or by clearing the RIE bit to 0.
  23732.  
  23733. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the
  23734. SCI.
  23735.  
  23736. Bit 5: TE Description
  23737. 0 Transmission disabled*1 (Initial value)
  23738.  
  23739. 1 Transmission enabled*2
  23740.  
  23741. Notes: 1. The TDRE flag in SCSSR1 is fixed at 1.
  23742. 2. In this state, serial transmission is started when transmit data is written to SCTDR1 and
  23743. the TDRE flag in SCSSR1 is cleared to 0.
  23744. SCSMR1 setting must be performed to decide the transmit format before setting the TE
  23745. bit to 1.
  23746.  
  23747. 472
  23748.  
  23749. ----------------------- Page 489-----------------------
  23750.  
  23751. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCI.
  23752.  
  23753. Bit 4: RE Description
  23754. 0 Reception disabled*1 (Initial value)
  23755.  
  23756. 1 Reception enabled*2
  23757.  
  23758. Notes: 1. Clearing the RE bit to 0 does not affect the RDRF, FER, PER, and ORER flags, which
  23759. retain their states.
  23760. 2. Serial reception is started in this state when a start bit is detected in asynchronous
  23761. mode or serial clock input is detected in synchronous mode.
  23762. SCSMR1 setting must be performed to decide the receive format before setting
  23763. the RE bit to 1.
  23764.  
  23765. Bit 3—Multiprocessor Interrupt Enable (MPIE): Enables or disables multiprocessor
  23766. interrupts. The MPIE bit setting is only valid in asynchronous mode when the MP bit in
  23767. SCSMR1 is set to 1.
  23768.  
  23769. The MPIE bit setting is invalid in synchronous mode or when the MP bit is cleared to 0.
  23770.  
  23771. Bit 3: MPIE Description
  23772.  
  23773. 0 Multiprocessor interrupts disabled (normal reception performed) (Initial value)
  23774.  
  23775. [Clearing conditions]
  23776.  
  23777. When the MPIE bit is cleared to 0
  23778.  
  23779. When data with MPB = 1 is received
  23780.  
  23781. 1 Multiprocessor interrupts enabled*
  23782.  
  23783. Receive interrupt (RXI) requests, receive-error interrupt (ERI) requests, and
  23784. setting of the RDRF, FER, and ORER flags in SCSSR1 are disabled until data
  23785. with the multiprocessor bit set to 1 is received.
  23786.  
  23787. Note: * Receive data transfer from SCRSR1 to SCRDR1, receive error detection, and setting of the
  23788. RDRF, FER, and ORER flags in SCSSR1, is not performed. When receive data including
  23789. MPB = 1 is received, the MPB bit in SCSSR1 is set to 1, the MPIE bit is cleared to 0
  23790. automatically, and generation of RXI and ERI interrupts (when the TIE and RIE bits in
  23791. SCSCR1 are set to 1) and FER and ORER flag setting is enabled.
  23792.  
  23793. Bit 2—Transmit-End interrupt Enable (TEIE): Enables or disables transmit-end interrupt
  23794. (TEI) request generation when there is no valid transmit data in SCTDR1 at the time for MSB data
  23795. transmission.
  23796.  
  23797. 473
  23798.  
  23799. ----------------------- Page 490-----------------------
  23800.  
  23801. Bit 2: TEIE Description
  23802.  
  23803. 0 Transmit-end interrupt (TEI) request disabled* (Initial value)
  23804.  
  23805. 1 Transmit-end interrupt (TEI) request enabled*
  23806.  
  23807. Note: * TEI interrupt requests can be cleared by reading 1 from the TDRE flag in SCSSR1, then
  23808. clearing it to 0 and clearing the TEND flag to 0, or by clearing the TEIE bit to 0.
  23809.  
  23810. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits are used to select the
  23811. SCI clock source and enable or disable clock output from the SCK pin. The combination of the
  23812. CKE1 and CKE0 bits determines whether the SCK pin functions as the serial clock output pin or
  23813. the serial clock input pin.
  23814.  
  23815. The setting of the CKE0 bit, however, is only valid for internal clock operation (CKE1 = 0) in
  23816. asynchronous mode. The CKE0 bit setting is invalid in synchronous mode and in the case of
  23817. external clock operation (CKE1 = 1). The CKE1 and CKE0 bits must be set before determining
  23818. the SCI’s operating mode with SCSMR1.
  23819.  
  23820. For details of clock source selection, see table 15.9 in section 15.3, Operation.
  23821.  
  23822. Bit 1: CKE1 Bit 0: CKE0 Description
  23823.  
  23824. 0 0 Asynchronous mode Internal clock/SCK pin functions as
  23825. input pin (input signal ignored)*1
  23826.  
  23827. Synchronous mode Internal clock/SCK pin functions as
  23828. serial clock output*1
  23829.  
  23830. 1 Asynchronous mode Internal clock/SCK pin functions as
  23831. clock output*2
  23832.  
  23833. Synchronous mode Internal clock/SCK pin functions as
  23834. serial clock output
  23835.  
  23836. 1 0 Asynchronous mode External clock/SCK pin functions as
  23837. clock input*3
  23838.  
  23839. Synchronous mode External clock/SCK pin functions as
  23840. serial clock input
  23841.  
  23842. 1 Asynchronous mode External clock/SCK pin functions as
  23843. clock input*3
  23844.  
  23845. Synchronous mode External clock/SCK pin functions as
  23846. serial clock input
  23847.  
  23848. Notes: 1. Initial value
  23849. 2. Outputs a clock of the same frequency as the bit rate.
  23850. 3. Inputs a clock with a frequency 16 times the bit rate.
  23851.  
  23852. 474
  23853.  
  23854. ----------------------- Page 491-----------------------
  23855.  
  23856. 1 5 . 2 . 7 Serial Status Register (SCSSR1)
  23857.  
  23858. Bit: 7 6 5 4 3 2 1 0
  23859.  
  23860. TDRE RDRF ORER FER PER TEND MPB MPBT
  23861.  
  23862. Initial value: 1 0 0 0 0 1 0 0
  23863.  
  23864. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  23865.  
  23866. Note: * Only 0 can be written, to clear the flag.
  23867.  
  23868. SCSSR1 is an 8-bit register containing status flags that indicate the operating status of the SCI,
  23869. and multiprocessor bits.
  23870.  
  23871. SCSSR1 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  23872. TDRE, RDRF, ORER, PER, and FER. Also note that in order to clear these flags they must be
  23873. read as 1 beforehand. The TEND flag and MPB flag are read-only flags and cannot be modified.
  23874.  
  23875. SCSSR1 is initialized to H'84 by a power-on reset or manual reset, in standby mode, and in the
  23876. module standby state.
  23877.  
  23878. Bit 7—Transmit Data Register Empty (TDRE): Indicates that data has been transferred
  23879. from SCTDR1 to SCTSR1 and the next serial transmit data can be written to SCTDR1.
  23880.  
  23881. Bit 7: TDRE Description
  23882.  
  23883. 0 Valid transmit data has been written to SCTDR1
  23884.  
  23885. [Clearing conditions]
  23886.  
  23887. When 0 is written to TDRE after reading TDRE = 1
  23888.  
  23889. When data is written to SCTDR1 by the DMAC
  23890.  
  23891. 1 There is no valid transmit data in SCTDR1 (Initial value)
  23892.  
  23893. [Setting conditions]
  23894.  
  23895. Power-on reset, manual reset, standby mode, or module standby
  23896.  
  23897. When the TE bit in SCSCR1 is 0
  23898.  
  23899. When data is transferred from SCTDR1 to SCTSR1 and data can be written
  23900. to SCTDR1
  23901.  
  23902. 475
  23903.  
  23904. ----------------------- Page 492-----------------------
  23905.  
  23906. Bit 6—Receive Data Register Full (RDRF): Indicates that the received data has been
  23907. stored in SCRDR1.
  23908.  
  23909. Bit 6: RDRF Description
  23910.  
  23911. 0 There is no valid receive data in SCRDR1 (Initial value)
  23912.  
  23913. [Clearing conditions]
  23914.  
  23915. Power-on reset, manual reset, standby mode, or module standby
  23916.  
  23917. When 0 is written to RDRF after reading RDRF = 1
  23918.  
  23919. When data in SCRDR1 is read by the DMAC
  23920.  
  23921. 1 There is valid receive data in SCRDR1
  23922.  
  23923. [Setting condition]
  23924.  
  23925. When serial reception ends normally and receive data is transferred from
  23926. SCRSR1 to SCRDR1
  23927.  
  23928. Note: SCRDR1 and the RDRF flag are not affected and retain their previous values when an error
  23929. is detected during reception or when the RE bit in SCSCR1 is cleared to 0.
  23930. If reception of the next data is completed while the RDRF flag is still set to 1, an overrun
  23931. error will occur and the receive data will be lost.
  23932.  
  23933. Bit 5—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  23934. causing abnormal termination.
  23935.  
  23936. Bit 5: ORER Description
  23937. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23938.  
  23939. [Clearing conditions]
  23940.  
  23941. Power-on reset, manual reset, standby mode, or module standby
  23942.  
  23943. When 0 is written to ORER after reading ORER = 1
  23944.  
  23945. 2
  23946. 1 An overrun error occurred during reception*
  23947.  
  23948. [Setting condition]
  23949.  
  23950. When the next serial reception is completed while RDRF = 1
  23951.  
  23952. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in SCSCR1
  23953. is cleared to 0.
  23954. 2. The receive data prior to the overrun error is retained in SCRDR1, and the data received
  23955. subsequently is lost. Serial reception cannot be continued while the ORER flag is set to
  23956. 1. In synchronous mode, serial transmission cannot be continued either.
  23957.  
  23958. 476
  23959.  
  23960. ----------------------- Page 493-----------------------
  23961.  
  23962. Bit 4—Framing Error (FER): Indicates that a framing error occurred during reception in
  23963. asynchronous mode, causing abnormal termination.
  23964.  
  23965. Bit 4: FER Description
  23966. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23967.  
  23968. [Clearing conditions]
  23969.  
  23970. Power-on reset, manual reset, standby mode, or module standby
  23971.  
  23972. When 0 is written to FER after reading FER = 1
  23973.  
  23974. 1 A framing error occurred during reception
  23975.  
  23976. [Setting condition]
  23977.  
  23978. When the SCI checks whether the stop bit at the end of the receive data is 1
  23979. when reception ends, and the stop bit is 0*2
  23980.  
  23981. Notes: 1. The FER flag is not affected and retains its previous state when the RE bit in SCSCR1 is
  23982. cleared to 0.
  23983. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop bit
  23984. is not checked. If a framing error occurs, the receive data is transferred to SCRDR1 but
  23985. the RDRF flag is not set. Serial reception cannot be continued while the FER flag is set
  23986. to 1.
  23987.  
  23988. Bit 3—Parity Error (PER): Indicates that a parity error occurred during reception with parity
  23989. addition in asynchronous mode, causing abnormal termination.
  23990.  
  23991. Bit 3: PER Description
  23992. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  23993.  
  23994. [Clearing conditions]
  23995.  
  23996. Power-on reset, manual reset, standby mode, or module standby
  23997.  
  23998. When 0 is written to PER after reading PER = 1
  23999.  
  24000. 1 A parity error occurred during reception*2
  24001.  
  24002. [Setting condition]
  24003.  
  24004. When, in reception, the number of 1-bits in the receive data plus the parity
  24005. bit does not match the parity setting (even or odd) specified by the O/E bit in
  24006. SCSMR1
  24007.  
  24008. Notes: 1. The PER flag is not affected and retains its previous state when the RE bit in SCSCR1 is
  24009. cleared to 0.
  24010. 2. If a parity error occurs, the receive data is transferred to SCRDR1 but the RDRF flag is
  24011. not set. Serial reception cannot be continued while the PER flag is set to 1.
  24012.  
  24013. 477
  24014.  
  24015. ----------------------- Page 494-----------------------
  24016.  
  24017. Bit 2—Transmit End (TEND): Indicates that there is no valid data in SCTDR1 when the
  24018. last bit of the transmit character is sent, and transmission has been ended.
  24019.  
  24020. The TEND flag is read-only and cannot be modified.
  24021.  
  24022. Bit 2: TEND Description
  24023.  
  24024. 0 Transmission is in progress
  24025.  
  24026. [Clearing conditions]
  24027.  
  24028. When 0 is written to TDRE after reading TDRE = 1
  24029.  
  24030. When data is written to SCTDR1 by the DMAC
  24031.  
  24032. 1 Transmission has been ended (Initial value)
  24033.  
  24034. [Setting conditions]
  24035.  
  24036. Power-on reset, manual reset, standby mode, or module standby
  24037.  
  24038. When the TE bit in SCSCR1 is 0
  24039.  
  24040. When TDRE = 1 on transmission of the last bit of a 1-byte serial transmit
  24041. character
  24042.  
  24043. Bit 1—Multiprocessor Bit (MPB): When reception is performed using a multiprocessor
  24044. format in asynchronous mode, MPB stores the multiprocessor bit in the receive data.
  24045.  
  24046. The MPB flag is read-only and cannot be modified.
  24047.  
  24048. Bit 1: MPB Description
  24049.  
  24050. 0 Data with a 0 multiprocessor bit has been received* (Initial value)
  24051.  
  24052. 1 Data with a 1 multiprocessor bit has been received
  24053.  
  24054. Note: * Retains its previous state when the RE bit in SCSCR1 is cleared to 0 while using a
  24055. multiprocessor format.
  24056.  
  24057. 478
  24058.  
  24059. ----------------------- Page 495-----------------------
  24060.  
  24061. Bit 0—Multiprocessor Bit Transfer (MPBT): When transmission is performed using a
  24062. multiprocessor format in asynchronous mode, MPBT stores the multiprocessor bit to be added to
  24063. the transmit data.
  24064.  
  24065. The MPBT bit setting is invalid in synchronous mode, when a multiprocessor format is not used,
  24066. and when the operation is not transmission.
  24067.  
  24068. Unlike transmit data, the MPBT bit is not double-buffered, so it is necessary to check whether
  24069. transmission has been completed before changing its value.
  24070.  
  24071. Bit 0: MPBT Description
  24072.  
  24073. 0 Data with a 0 multiprocessor bit is transmitted (Initial value)
  24074.  
  24075. 1 Data with a 1 multiprocessor bit is transmitted
  24076.  
  24077. 1 5 . 2 . 8 Serial Port Register (SCSPTR1)
  24078.  
  24079. Bit: 7 6 5 4 3 2 1 0
  24080.  
  24081. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  24082.  
  24083. Initial value: 0 0 0 0 0 — 0 —
  24084.  
  24085. R/W: R/W — — — R/W R/W R/W R/W
  24086.  
  24087. SCSPTR1 is an 8-bit readable/writable register that controls input/output and data for the port pins
  24088. multiplexed with the serial communication interface (SCI) pins. Input data can be read from the
  24089. RxD pin, output data written to the TxD pin, and breaks in serial transmission/reception
  24090. controlled, by means of bits 1 and 0. SCK pin data reading and output data writing can be
  24091. performed by means of bits 3 and 2. Bit 7 controls enabling and disabling of the RXI interrupt.
  24092.  
  24093. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2 and
  24094. 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is undefined.
  24095. SCSPTR1 is not initialized in the module standby state or standby mode.
  24096.  
  24097. Bit 7—Error Interrupt Only (EIO): When the EIO bit is 1, an RXI interrupt request is not
  24098. sent to the CPU even if the RIE bit is set to 1. When the DMAC is used, this setting means that
  24099. only ERI interrupts are handled by the CPU. The DMAC transfers read data to memory or another
  24100. peripheral module. This bit specifies enabling or disabling of the RXI interrupt.
  24101.  
  24102. Bit 7: EIO Description
  24103.  
  24104. 0 The RIE bit enables/disables RXI and ERI interrupts
  24105.  
  24106. When the RIE bit is 1, RXI and ERI interrupts are sent to INTC (Initial value)
  24107.  
  24108. 1 When the RIE bit is 1, only ERI interrupts are sent to INTC
  24109.  
  24110. 479
  24111.  
  24112. ----------------------- Page 496-----------------------
  24113.  
  24114. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  24115.  
  24116. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin
  24117. input/output. When the SCK pin is actually set as a port output pin and outputs the value set by
  24118. the SPB1DT bit, the C/A bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be
  24119. cleared to 0.
  24120.  
  24121. Bit 3: SPB1IO Description
  24122.  
  24123. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  24124.  
  24125. 1 SPB1DT bit value is output to the SCK pin
  24126.  
  24127. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin
  24128. input/output data. Input or output is specified by the SPB1IO bit (see the description of bit 3,
  24129. SPB1IO, for details). When output is specified, the value of the SPB1DT bit is output to the SCK
  24130. pin. The SCK pin value is read from the SPB1DT bit regardless of the value of the SPB1IO bit.
  24131. The initial value of this bit after a power-on or manual reset is undefined.
  24132.  
  24133. Bit 2: SPB1DT Description
  24134.  
  24135. 0 Input/output data is low-level
  24136.  
  24137. 1 Input/output data is high-level
  24138.  
  24139. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output
  24140. condition. When the TxD pin is actually set as a port output pin and outputs the value set by the
  24141. SPB0DT bit, the TE bit in SCSCR1 should be cleared to 0.
  24142.  
  24143. Bit 1: SPB0IO Description
  24144.  
  24145. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  24146.  
  24147. 1 SPB0DT bit value is output to the TxD pin
  24148.  
  24149. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data
  24150. and TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  24151. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the value
  24152. of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the SPB0DT bit
  24153. regardless of the value of the SPB0IO bit. The initial value of this bit after a power-on or manual
  24154. reset is undefined.
  24155.  
  24156. Bit 0: SPB0DT Description
  24157.  
  24158. 0 Input/output data is low-level
  24159.  
  24160. 1 Input/output data is high-level
  24161.  
  24162. SCI I/O port block diagrams are shown in figures 15.2 to 15.4.
  24163. 480
  24164.  
  24165. ----------------------- Page 497-----------------------
  24166.  
  24167. Reset
  24168.  
  24169. R
  24170. Q D
  24171. SPB1IO
  24172. C
  24173.  
  24174. Internal data bus
  24175. SPTRW
  24176.  
  24177. Reset
  24178. MD0/SCK
  24179. R
  24180. Q D
  24181.  
  24182. SPB1DT
  24183. C SCI
  24184.  
  24185. SPTRW Clock output enable signal
  24186.  
  24187. Mode setting Serial clock output signal *
  24188. register
  24189. Serial clock input signal
  24190.  
  24191. Clock input enable signal
  24192.  
  24193. SPTRR
  24194.  
  24195. SPTRW: Write to SPTR
  24196. SPTRR: Read SPTR
  24197.  
  24198. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  24199. the CKE0 and CKE1 bits in SCSCR1 and the C/A bit in SCSMR1.
  24200.  
  24201.  
  24202. Figure 15.2 MD0/SCK Pin
  24203.  
  24204. 481
  24205.  
  24206. ----------------------- Page 498-----------------------
  24207.  
  24208. Reset
  24209.  
  24210. R
  24211. Q D
  24212. SPB0IO
  24213. C Internal data bus
  24214.  
  24215. SPTRW
  24216.  
  24217. Reset
  24218. MD7/TxD
  24219. R
  24220. Q D
  24221. SPB0DT
  24222. C SCI
  24223.  
  24224. SPTRW Transmit enable signal
  24225.  
  24226. Mode setting register
  24227.  
  24228. Serial transmit data
  24229.  
  24230. SPTRW: Write to SPTR
  24231.  
  24232. Figure 15.3 MD7/TxD Pin
  24233.  
  24234. SCI
  24235. RxD
  24236.  
  24237. Serial receive data
  24238.  
  24239. Internal data bus
  24240.  
  24241. SPTRR
  24242.  
  24243. SPTRR: Read SPTR
  24244.  
  24245. Figure 15.4 RxD Pin
  24246.  
  24247. 482
  24248.  
  24249. ----------------------- Page 499-----------------------
  24250.  
  24251. 1 5 . 2 . 9 Bit Rate Register (SCBRR1)
  24252.  
  24253. Bit: 7 6 5 4 3 2 1 0
  24254.  
  24255. Initial value: 1 1 1 1 1 1 1 1
  24256.  
  24257. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  24258.  
  24259. SCBRR1 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  24260. generator operating clock selected by bits CKS1 and CKS0 in SCSMR1.
  24261.  
  24262. SCBRR1 can be read or written to by the CPU at all times.
  24263.  
  24264. SCBRR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  24265. module standby state.
  24266.  
  24267. The SCBRR1 setting is found from the following equations.
  24268.  
  24269. Asynchronous mode:
  24270.  
  24271.  
  24272. P
  24273. φ 6
  24274. N = × 10 – 1
  24275. 64 × 22n–1 × B
  24276.  
  24277. Synchronous mode:
  24278.  
  24279.  
  24280. P
  24281. φ 6
  24282. N = × 10 – 1
  24283. 8 × 22n–1 × B
  24284.  
  24285. Where B: Bit rate (bits/s)
  24286. N: SCBRR1 setting for baud rate generator (0 ≤ N ≤ 255)
  24287. Pφ : Peripheral module operating frequency (MHz)
  24288. n: Baud rate generator input clock (n = 0 to 3)
  24289. (See the table below for the relation between n and the clock.)
  24290.  
  24291. SCSMR1 Setting
  24292.  
  24293. n Clock CKS1 CKS0
  24294.  
  24295. 0 Pφ 0 0
  24296.  
  24297. 1 Pφ/4 0 1
  24298.  
  24299. 2 Pφ/16 1 0
  24300.  
  24301. 3 Pφ/64 1 1
  24302.  
  24303. 483
  24304.  
  24305. ----------------------- Page 500-----------------------
  24306.  
  24307. The bit rate error in asynchronous mode is found from the following equation:
  24308.  
  24309. P × 106
  24310. φ
  24311. Error (%) = 2n–1 – 1 × 100
  24312. (N + 1) × B × 64 × 2
  24313.  
  24314. Table 15.3 shows sample SCBRR1 settings in asynchronous mode, and table 15.4 shows sample
  24315. SCBRR1 settings in synchronous mode.
  24316.  
  24317. 484
  24318.  
  24319. ----------------------- Page 501-----------------------
  24320.  
  24321. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  24322.  
  24323. Pφ (MHz)
  24324.  
  24325. 2 2.097152 2.4576 3
  24326.  
  24327. Bit Rate Error Error Error Error
  24328. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24329.  
  24330. 110 1 141 0.03 1 148 –0.04 1 174 –0.26 1 212 0.03
  24331.  
  24332. 150 1 103 0.16 1 108 0.21 1 127 0.00 1 155 0.16
  24333.  
  24334. 300 0 207 0.16 0 217 0.21 0 255 0.00 1 77 0.16
  24335.  
  24336. 600 0 103 0.16 0 108 0.21 0 127 0.00 0 155 0.16
  24337.  
  24338. 1200 0 51 0.16 0 54 –0.70 0 63 0.00 0 77 0.16
  24339.  
  24340. 2400 0 25 0.16 0 26 1.14 0 31 0.00 0 38 0.16
  24341.  
  24342. 4800 0 12 0.16 0 13 –2.48 0 15 0.00 0 19 –2.34
  24343.  
  24344. 9600 0 6 –6.99 0 6 –2.48 0 7 0.00 0 9 –2.34
  24345.  
  24346. 19200 0 2 8.51 0 2 13.78 0 3 0.00 0 4 –2.34
  24347.  
  24348. 31250 0 1 0.00 0 1 4.86 0 1 22.88 0 2 0.00
  24349.  
  24350. 38400 0 1 –18.62 0 1 –14.67 0 1 0.00
  24351.  
  24352. Pφ (MHz)
  24353.  
  24354. 3 . 6 8 6 4 4 4 . 9 1 5 2 5
  24355.  
  24356. Bit Rate Error Error Error Error
  24357. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24358.  
  24359. 110 2 64 0.70 2 70 0.03 2 86 0.31 2 88 –0.25
  24360.  
  24361. 150 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  24362.  
  24363. 300 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  24364.  
  24365. 600 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  24366.  
  24367. 1200 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  24368.  
  24369. 2400 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  24370.  
  24371. 4800 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  24372.  
  24373. 9600 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  24374.  
  24375. 19200 0 5 0.00 0 6 –6.99 0 7 0.00 0 7 1.73
  24376.  
  24377. 31250 — — — 0 3 0.00 0 4 –1.70 0 4 0.00
  24378.  
  24379. 38400 0 2 0.00 0 2 8.51 0 3 0.00 0 3 1.73
  24380.  
  24381. Legend
  24382. Blank: No setting is available.
  24383. —: A setting is available but error occurs.
  24384.  
  24385. 485
  24386.  
  24387. ----------------------- Page 502-----------------------
  24388.  
  24389. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  24390. (cont)
  24391.  
  24392. Pφ (MHz)
  24393.  
  24394. 6 6 . 1 4 4 7.37288 8
  24395.  
  24396. Bit Rate Error Error Error Error
  24397. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24398.  
  24399. 110 2 106 –0.44 2 108 0.08 2 130 –0.07 2 141 0.03
  24400.  
  24401. 150 2 77 0.16 2 79 0.00 2 95 0.00 2 103 0.16
  24402.  
  24403. 300 1 155 0.16 1 159 0.00 1 191 0.00 1 207 0.16
  24404.  
  24405. 600 1 77 0.16 1 79 0.00 1 95 0.00 1 103 0.16
  24406.  
  24407. 1200 0 155 0.16 0 159 0.00 0 191 0.00 0 207 0.16
  24408.  
  24409. 2400 0 77 0.16 0 79 0.00 0 95 0.00 0 103 0.16
  24410.  
  24411. 4800 0 38 0.16 0 39 0.00 0 47 0.00 0 51 0.16
  24412.  
  24413. 9600 0 19 –2.34 0 19 0.00 0 23 0.00 0 25 0.16
  24414.  
  24415. 19200 0 9 –2.34 0 9 0.00 0 11 0.00 0 12 0.16
  24416.  
  24417. 31250 0 5 0.00 0 5 2.40 0 6 5.33 0 7 0.00
  24418.  
  24419. 38400 0 4 –2.34 0 4 0.00 0 5 0.00 0 6 –6.99
  24420.  
  24421. Pφ (MHz)
  24422.  
  24423. 9 . 8 3 0 4 1 0 1 2 1 2 . 2 8 8
  24424.  
  24425. Bit Rate Error Error Error Error
  24426. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24427.  
  24428. 110 2 174 –0.26 2 177 –0.25 2 212 0.03 2 217 0.08
  24429.  
  24430. 150 2 127 0.00 2 129 0.16 2 155 0.16 2 159 0.00
  24431.  
  24432. 300 1 255 0.00 2 64 0.16 2 77 0.16 2 79 0.00
  24433.  
  24434. 600 1 127 0.00 1 129 0.16 1 155 0.16 1 159 0.00
  24435.  
  24436. 1200 0 255 0.00 1 64 0.16 1 77 0.16 1 79 0.00
  24437.  
  24438. 2400 0 127 0.00 0 129 0.16 0 155 0.16 0 159 0.00
  24439.  
  24440. 4800 0 63 0.00 0 64 0.16 0 77 0.16 0 79 0.00
  24441.  
  24442. 9600 0 31 0.00 0 32 –1.36 0 38 0.16 0 39 0.00
  24443.  
  24444. 19200 0 15 0.00 0 15 1.73 0 19 0.16 0 19 0.00
  24445.  
  24446. 31250 0 9 –1.70 0 9 0.00 0 11 0.00 0 11 2.40
  24447.  
  24448. 38400 0 7 0.00 0 7 1.73 0 9 –2.34 0 9 0.00
  24449.  
  24450. 486
  24451.  
  24452. ----------------------- Page 503-----------------------
  24453.  
  24454. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  24455. (cont)
  24456.  
  24457. Pφ (MHz)
  24458.  
  24459. 14.7456 1 6 19.6608 2 0
  24460.  
  24461. Bit Rate Error Error Error Error
  24462. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24463.  
  24464. 110 3 64 0.70 3 70 0.03 3 86 0.31 3 88 –0.25
  24465.  
  24466. 150 2 191 0.00 2 207 0.16 2 255 0.00 3 64 0.16
  24467.  
  24468. 300 2 95 0.00 2 103 0.16 2 127 0.00 2 129 0.16
  24469.  
  24470. 600 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  24471.  
  24472. 1200 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  24473.  
  24474. 2400 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  24475.  
  24476. 4800 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  24477.  
  24478. 9600 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  24479.  
  24480. 19200 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  24481.  
  24482. 31250 0 14 –1.70 0 15 0.00 0 19 –1.70 0 19 0.00
  24483.  
  24484. 38400 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  24485.  
  24486. Pφ (MHz)
  24487.  
  24488. 2 4 2 4 . 5 7 6 2 8 . 7 3 0
  24489.  
  24490. Bit Rate Error Error Error Error
  24491. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24492.  
  24493. 110 3 106 –0.44 3 108 0.08 3 126 0.31 3 132 0.13
  24494.  
  24495. 150 3 77 0.16 3 79 0.00 3 92 0.46 3 97 –0.35
  24496.  
  24497. 300 2 155 0.16 2 159 0.00 2 186 –0.08 2 194 0.16
  24498.  
  24499. 600 2 77 0.16 2 79 0.00 2 92 0.46 2 97 –0.35
  24500.  
  24501. 1200 1 155 0.16 1 159 0.00 1 186 –0.08 1 194 0.16
  24502.  
  24503. 2400 1 77 0.16 1 79 0.00 1 92 0.46 1 97 –0.35
  24504.  
  24505. 4800 0 155 0.16 0 159 0.00 0 186 –0.08 0 194 –1.36
  24506.  
  24507. 9600 0 77 0.16 0 79 0.00 0 92 0.46 0 97 –0.35
  24508.  
  24509. 19200 0 38 0.16 0 39 0.00 0 46 –0.61 0 48 –0.35
  24510.  
  24511. 31250 0 23 0.00 0 24 –1.70 0 28 –1.03 0 29 0.00
  24512.  
  24513. 38400 0 19 –2.34 0 19 0.00 0 22 1.55 0 23 1.73
  24514.  
  24515. 487
  24516.  
  24517. ----------------------- Page 504-----------------------
  24518.  
  24519. Table 15.4 Examples of Bit Rates and SCBRR1 Settings in Synchronous Mode
  24520.  
  24521. Pφ (MHz)
  24522.  
  24523. 4 8 1 6 2 8 . 7 3 0
  24524.  
  24525. Bit Rate n N n N n N n N n N
  24526. (bits/s)
  24527.  
  24528. 10 — — — — — — — — — —
  24529.  
  24530. 250 2 249 3 124 3 249 — — — —
  24531.  
  24532. 500 2 124 2 249 3 124 3 223 3 233
  24533.  
  24534. 1k 1 249 2 124 2 249 3 111 3 116
  24535.  
  24536. 2.5k 1 99 1 199 2 99 2 178 2 187
  24537.  
  24538. 5k 0 199 1 99 1 199 2 89 2 93
  24539.  
  24540. 10k 0 99 0 199 1 99 1 178 1 187
  24541.  
  24542. 25k 0 39 0 79 0 159 1 71 1 74
  24543.  
  24544. 50k 0 19 0 39 0 79 0 143 0 149
  24545.  
  24546. 100k 0 9 0 19 0 39 0 71 0 74
  24547.  
  24548. 250k 0 3 0 7 0 15 — — 0 29
  24549.  
  24550. 500k 0 1 0 3 0 7 — — 0 14
  24551.  
  24552. 1M 0 0* 0 1 0 3 — — — —
  24553.  
  24554. 2M 0 0* 0 1 — — — —
  24555.  
  24556. Note: As far as possible, the setting should be made so that the error is within 1%.
  24557. Legend
  24558. Blank: No setting is available.
  24559. —: A setting is available but error occurs.
  24560. * Continuous transmission/reception is not possible.
  24561.  
  24562. 488
  24563.  
  24564. ----------------------- Page 505-----------------------
  24565.  
  24566. Table 15.5 shows the maximum bit rate for various frequencies in asynchronous mode. Tables
  24567. 15.6 and 15.7 show the maximum bit rates with external clock input.
  24568.  
  24569. Table 15.5 Maximum Bit Rate for Various Frequencies with Baud Rate
  24570. Generator (Asynchronous Mode)
  24571.  
  24572. Settings
  24573.  
  24574. Pφ (MHz) Maximum Bit Rate n N
  24575. (bits/s)
  24576.  
  24577. 2 62500 0 0
  24578.  
  24579. 2.097152 65536 0 0
  24580.  
  24581. 2.4576 76800 0 0
  24582.  
  24583. 3 93750 0 0
  24584.  
  24585. 3.6864 115200 0 0
  24586.  
  24587. 4 125000 0 0
  24588.  
  24589. 4.9152 153600 0 0
  24590.  
  24591. 8 250000 0 0
  24592.  
  24593. 9.8304 307200 0 0
  24594.  
  24595. 12 375000 0 0
  24596.  
  24597. 14.7456 460800 0 0
  24598.  
  24599. 16 500000 0 0
  24600.  
  24601. 19.6608 614400 0 0
  24602.  
  24603. 20 625000 0 0
  24604.  
  24605. 24 750000 0 0
  24606.  
  24607. 24.576 768000 0 0
  24608.  
  24609. 28.7 896875 0 0
  24610.  
  24611. 30 937500 0 0
  24612.  
  24613. 489
  24614.  
  24615. ----------------------- Page 506-----------------------
  24616.  
  24617. Table 15.6 Maximum Bit Rate with External Clock Input (Asynchronous Mode)
  24618.  
  24619. Pφ (MHz) External Input Clock (MHz)Maximum Bit Rate (bits/s)
  24620.  
  24621. 2 0.5000 31250
  24622.  
  24623. 2.097152 0.5243 32768
  24624.  
  24625. 2.4576 0.6144 38400
  24626.  
  24627. 3 0.7500 46875
  24628.  
  24629. 3.6864 0.9216 57600
  24630.  
  24631. 4 1.0000 62500
  24632.  
  24633. 4.9152 1.2288 76800
  24634.  
  24635. 8 2.0000 125000
  24636.  
  24637. 9.8304 2.4576 153600
  24638.  
  24639. 12 3.0000 187500
  24640.  
  24641. 14.7456 3.6864 230400
  24642.  
  24643. 16 4.0000 250000
  24644.  
  24645. 19.6608 4.9152 307200
  24646.  
  24647. 20 5.0000 312500
  24648.  
  24649. 24 6.0000 375000
  24650.  
  24651. 24.576 6.1440 384000
  24652.  
  24653. 28.7 7.1750 448436
  24654.  
  24655. 30 7.5000 468750
  24656.  
  24657. Table 15.7 Maximum Bit Rate with External Clock Input (Synchronous Mode)
  24658.  
  24659. Pφ (MHz) External Input Clock (MHz)Maximum Bit Rate (bits/s)
  24660.  
  24661. 8 1.3333 1333333.3
  24662.  
  24663. 16 2.6667 2666666.7
  24664.  
  24665. 24 4.0000 4000000.0
  24666.  
  24667. 28.7 4.7833 4783333.3
  24668.  
  24669. 30 5.0000 5000000.0
  24670.  
  24671. 490
  24672.  
  24673. ----------------------- Page 507-----------------------
  24674.  
  24675. 1 5 . 3 Operation
  24676.  
  24677. 1 5 . 3 . 1 Overview
  24678.  
  24679. The SCI can carry out serial communication in two modes: asynchronous mode in which
  24680. synchronization is achieved character by character, and synchronous mode in which synchronization
  24681. is achieved with clock pulses.
  24682.  
  24683. Selection of asynchronous or synchronous mode and the transmission format is made using
  24684. SCSMR1 as shown in table 15.8. The SCI clock source is determined by a combination of the
  24685. C/A bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1, as shown in table 15.9.
  24686.  
  24687. • Asynchronous mode
  24688.  
  24689.  Data length: Choice of 7 or 8 bits
  24690.  
  24691.  Choice of parity addition, multiprocessor bit addition, and addition of 1 or 2 stop bits (the
  24692. combination of these parameters determines the transfer format and character length)
  24693.  
  24694.  Detection of framing, parity, and overrun errors, and breaks, during reception
  24695.  
  24696.  Choice of internal or external clock as SCI clock source
  24697.  
  24698. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  24699. clock with the same frequency as the bit rate can be output.
  24700.  
  24701. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  24702. input (the on-chip baud rate generator is not used).
  24703.  
  24704. • Synchronous mode
  24705.  
  24706.  Transfer format: Fixed 8-bit data
  24707.  
  24708.  Detection of overrun errors during reception
  24709.  
  24710.  Choice of internal or external clock as SCI clock source
  24711.  
  24712. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  24713. serial clock is output off-chip.
  24714.  
  24715. When external clock is selected: The on-chip baud rate generator is not used, and the SCI
  24716. operates on the input serial clock.
  24717.  
  24718. 491
  24719.  
  24720. ----------------------- Page 508-----------------------
  24721.  
  24722. Table 15.8SCSMR1 Settings for Serial Transfer Format Selection
  24723.  
  24724. SCSMR1 Settings SCI Transfer Format
  24725.  
  24726. Multi-
  24727. Bit 7: Bit 6: Bit 2: Bit 5: Bit 3: Data processo Parity Stop
  24728. C/A CHR M P P E S TO Mode Length r Bit Bit Bit
  24729. P Length
  24730.  
  24731. 0 0 0 0 0 Asynchronous 8-bit data No No 1 bit
  24732. mode
  24733.  
  24734. 1 2 bits
  24735.  
  24736. 1 0 Yes 1 bit
  24737.  
  24738. 1 2 bits
  24739.  
  24740. 1 0 0 7-bit data No 1 bit
  24741.  
  24742. 1 2 bits
  24743.  
  24744. 1 0 Yes 1 bit
  24745.  
  24746. 1 2 bits
  24747.  
  24748. 0 1 * 0 Asynchronous 8-bit data Yes No 1 bit
  24749. mode
  24750. (multiprocessor
  24751. format)
  24752.  
  24753. 1 2 bits
  24754.  
  24755. 1 0 7-bit data 1 bit
  24756.  
  24757. 1 2 bits
  24758.  
  24759. 1 * * * * Synchronous 8-bit data No None
  24760. mode
  24761.  
  24762. Note: An asterisk in the table means “Don’t care.”
  24763.  
  24764. 492
  24765.  
  24766. ----------------------- Page 509-----------------------
  24767.  
  24768. Table 15.9SCSMR1 and SCSCR1 Settings for SCI Clock Source Selection
  24769.  
  24770. SCSMR1 SCSCR1 Setting SCI Transmit/Receive Clock
  24771.  
  24772. Bit 7: Bit 1: Bit 0: Clock
  24773. C/A CKE1 CKE0 Mode Source SCK Pin Function
  24774.  
  24775. 0 0 0 Asynchronous Internal SCI does not use SCK pin
  24776. mode
  24777.  
  24778. 1 Outputs clock with same
  24779. frequency as bit rate
  24780.  
  24781. 1 0 External Inputs clock with frequency
  24782. of 16 times the bit rate
  24783.  
  24784. 1
  24785.  
  24786. 1 0 0 Synchronous Internal Outputs serial clock
  24787. mode
  24788.  
  24789. 1
  24790.  
  24791. 1 0 External Inputs serial clock
  24792.  
  24793. 1
  24794.  
  24795. 1 5 . 3 . 2 Operation in Asynchronous Mode
  24796.  
  24797. In asynchronous mode, characters are sent or received, each preceded by a start bit indicating the
  24798. start of communication and followed by one or two stop bits indicating the end of communication.
  24799. Serial communication is thus carried out with synchronization established on a character-by-
  24800. character basis.
  24801.  
  24802. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  24803. communication. Both the transmitter and the receiver also have a double-buffered structure, so that
  24804. data can be read or written during transmission or reception, enabling continuous data transfer.
  24805.  
  24806. Figure 15.5 shows the general format for asynchronous serial communication.
  24807.  
  24808. In asynchronous serial communication, the transmission line is usually held in the mark state
  24809. (high level). The SCI monitors the transmission line, and when it goes to the space state (low
  24810. level), recognizes a start bit and starts serial communication.
  24811.  
  24812. One serial communication character consists of a start bit (low level), followed by data (in LSB-
  24813. first order), a parity bit (high or low level), and finally one or two stop bits (high level).
  24814.  
  24815. In asynchronous mode, the SCI performs synchronization at the falling edge of the start bit in
  24816. reception. The SCI samples the data on the eighth pulse of a clock with a frequency of 16 times
  24817. the length of one bit, so that the transfer data is latched at the center of each bit.
  24818.  
  24819. 493
  24820.  
  24821. ----------------------- Page 510-----------------------
  24822.  
  24823. Idle state (mark state)
  24824.  
  24825. 1 (LSB) (MSB) 1
  24826.  
  24827. Serial 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  24828. data
  24829.  
  24830. Start Parity Stop
  24831. bit bit bit(s)
  24832. Transmit/receive data
  24833.  
  24834. 1 bit 7 or 8 bits 1 bit, 1 or
  24835. or none 2 bits
  24836.  
  24837. One unit of transfer data (character or frame)
  24838.  
  24839. Figure 15.5 Data Format in Asynchronous Communication (Example with 8-
  24840. Bit Data, Parity, Two Stop Bits)
  24841.  
  24842. Data Transfer Format
  24843.  
  24844. Table 15.10 shows the data transfer formats that can be used in asynchronous mode. Any of 12
  24845. transfer formats can be selected according to the SCSMR1 setting.
  24846.  
  24847. 494
  24848.  
  24849. ----------------------- Page 511-----------------------
  24850.  
  24851. Table 15.10 Serial Transfer Formats (Asynchronous Mode)
  24852.  
  24853. SCSMR1 Serial Transfer Format and Frame Length
  24854. Settings
  24855.  
  24856. CHR PE MP STOP 1 2 3 4 5 6 7 8 9 10 11 12
  24857.  
  24858. 0 0 0 0 S 8-bit data STOP
  24859.  
  24860. 0 0 0 1 S 8-bit data STOP STOP
  24861.  
  24862. 0 1 0 0 S 8-bit data P STOP
  24863.  
  24864. 0 1 0 1 S 8-bit data P STOP STOP
  24865.  
  24866. 1 0 0 0 S 7-bit data STOP
  24867.  
  24868. 1 0 0 1 S 7-bit data STOP STOP
  24869.  
  24870. 1 1 0 0 S 7-bit data P STOP
  24871.  
  24872. 1 1 0 1 S 7-bit data P STOP STOP
  24873.  
  24874. 0 * 1 0 S 8-bit data MPB STOP
  24875.  
  24876. 0 * 1 1 S 8-bit data MPB STOP STOP
  24877.  
  24878. 1 * 1 0 S 7-bit data MPB STOP
  24879.  
  24880. 1 * 1 1 S 7-bit data MPB STOP STOP
  24881.  
  24882. S: Start bit
  24883. STOP: Stop bit
  24884. P: Parity bit
  24885. MPB: Multiprocessor bit
  24886. Note: An asterisk in the table means “Don’t care.”
  24887.  
  24888. 495
  24889.  
  24890. ----------------------- Page 512-----------------------
  24891.  
  24892. Clock
  24893.  
  24894. Either an internal clock generated by the on-chip baud rate generator or an external clock input at
  24895. the SCK pin can be selected as the SCI’s serial clock, according to the setting of the C/A bit in
  24896. SCSMR1 and the CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection,
  24897. see table 15.9.
  24898.  
  24899. When an external clock is input at the SCK pin, the clock frequency should be 16 times the bit
  24900. rate used.
  24901.  
  24902. When the SCI is operated on an internal clock, the clock can be output from the SCK pin. The
  24903. frequency of the clock output in this case is equal to the bit rate, and the phase is such that the
  24904. rising edge of the clock is at the center of each transmit data bit, as shown in figure 15.6.
  24905.  
  24906. 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  24907.  
  24908. One frame
  24909.  
  24910. Figure 15.6 Relation between Output Clock and Transfer Data Phase
  24911. (Asynchronous Mode)
  24912.  
  24913. Data Transfer Operations
  24914.  
  24915. SCI Initialization (Asynchronous Mode): Before transmitting and receiving data, it is
  24916. necessary to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  24917.  
  24918. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared to
  24919. 0 before making the change using the following procedure. When the TE bit is cleared to 0, the
  24920. TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  24921. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  24922.  
  24923. When an external clock is used the clock should not be stopped during operation, including
  24924. initialization, since operation will be unreliable in this case.
  24925.  
  24926. Figure 15.7 shows a sample SCI initialization flowchart.
  24927.  
  24928. 496
  24929.  
  24930. ----------------------- Page 513-----------------------
  24931.  
  24932. 1. Set the clock selection in SCSCR1.
  24933. Initialization
  24934. Be sure to clear bits RIE, TIE, TEIE,
  24935. and MPIE, and bits TE and RE, to 0.
  24936. Clear TE and RE bits
  24937. in SCSCR1 to 0 When clock output is selected in
  24938. asynchronous mode, it is output
  24939. immediately after SCSCR1 settings
  24940. Set CKE1 and CKE0 bits are made.
  24941. in SCSCR1 (leaving TE and 2. Set the data transfer format in
  24942. RE bits cleared to 0) SCSMR1.
  24943.  
  24944. 3. Write a value corresponding to the
  24945. Set data transfer format bit rate into SCBRR1. (Not
  24946. in SCSMR1 necessary if an external clock is
  24947.  
  24948. used.)
  24949.  
  24950. Set value in SCBRR1 4. Wait at least one bit interval, then set
  24951. the TE bit or RE bit in SCSCR1 to 1.
  24952. Wait Also set the RIE, TIE, TEIE, and
  24953. MPIE bits.
  24954.  
  24955. No Setting the TE and RE bits enables
  24956. 1-bit interval elapsed?
  24957. the TxD and RxD pins to be used.
  24958. When transmitting, the SCI will go to
  24959. Yes the mark state; when receiving, it will
  24960. go to the idle state, waiting for a start
  24961. Set TE and RE bits in SCSCR1
  24962. bit.
  24963. to 1, and set RIE, TIE, TEIE,
  24964. and MPIE bits
  24965.  
  24966. End
  24967.  
  24968. Figure 15.7 Sample SCI Initialization Flowchart
  24969.  
  24970. Serial Data Transmission (Asynchronous Mode): Figure 15.8 shows a sample
  24971. flowchart for serial transmission.
  24972.  
  24973. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  24974.  
  24975. 497
  24976.  
  24977. ----------------------- Page 514-----------------------
  24978.  
  24979. Start of transmission 1. SCI status check and transmit data
  24980. write: Read SCSSR1 and check that
  24981. the TDRE flag is set to 1, then write
  24982. transmit data to SCTDR1 and clear
  24983. Read TDRE flag in SCSSR1
  24984. the TDRE flag to 0.
  24985.  
  24986. 2. Serial transmission continuation
  24987. No
  24988. TDRE = 1? procedure: To continue serial
  24989. transmission, read 1 from the TDRE
  24990. Yes flag to confirm that writing is possible,
  24991. then write data to SCTDR1, and then
  24992. Write transmit data to SCTDR1 clear the TDRE flag to 0. (Checking
  24993. and clear TDRE flag and clearing of the TDRE flag is
  24994. in SCSSR1 to 0 automatic when the direct memory
  24995. access controller (DMAC) is activated
  24996. by a transmit-data-empty interrupt
  24997. No (TXI) request, and data is written to
  24998. All data transmitted?
  24999. SCTDR1.)
  25000.  
  25001. Yes 3. Break output at the end of serial
  25002. transmission: To output a break in
  25003. serial transmission, clear the SPB0DT
  25004. Read TEND flag in SCSSR1 bit to 0 and set the SPB0IO bit to 1 in
  25005. SCSPTR, then clear the TE bit in
  25006. SCSCR1 to 0.
  25007. No
  25008. TEND = 1?
  25009.  
  25010.  
  25011. Yes
  25012.  
  25013. No
  25014. Break output?
  25015.  
  25016. Yes
  25017.  
  25018. Clear SPB0DT to 0 and
  25019. set SPB0IO to 1
  25020.  
  25021. Clear TE bit in SCSCR1 to 0
  25022.  
  25023. End of transmission
  25024.  
  25025. Figure 15.8 Sample Serial Transmission Flowchart
  25026.  
  25027. In serial transmission, the SCI operates as described below.
  25028.  
  25029. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  25030. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  25031. SCTSR1.
  25032.  
  25033. 498
  25034.  
  25035. ----------------------- Page 515-----------------------
  25036.  
  25037. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25038. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI) is
  25039. generated.
  25040.  
  25041. The serial transmit data is sent from the TxD pin in the following order.
  25042.  
  25043. a. Start bit: One 0-bit is output.
  25044.  
  25045. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  25046.  
  25047. c. Parity bit or multiprocessor bit: One parity bit (even or odd parity), or one multiprocessor
  25048. bit is output. (A format in which neither a parity bit nor a multiprocessor bit is output can
  25049. also be selected.)
  25050.  
  25051. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  25052.  
  25053. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  25054. sent.
  25055.  
  25056. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is
  25057. cleared to 0, data is transferred from SCTDR1 to SCTSR1, the stop bit is sent, and then serial
  25058. transmission of the next frame is started.
  25059.  
  25060. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and
  25061. then the line goes to the mark state in which 1 is output continuously. If the TEIE bit in
  25062. SCSCR1 is set to 1 at this time, a TEI interrupt request is generated.
  25063.  
  25064. Figure 15.9 shows an example of the operation for transmission in asynchronous mode.
  25065.  
  25066. Start Data Parity Stop Start Data Parity Stop
  25067. 1 bit bit bit bit bit bit 1
  25068.  
  25069. Serial Idle state
  25070. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  25071. data (mark state)
  25072.  
  25073. TDRE
  25074.  
  25075. TEND
  25076.  
  25077. TXI interrupt TXI interrupt
  25078. request request
  25079. Data written to SCTDR1 TEI interrupt
  25080. and TDRE flag cleared to request
  25081. 0 by TXI interrupt handler
  25082.  
  25083. One frame
  25084.  
  25085. Figure 15.9 Example of Transmit Operation in Asynchronous Mode
  25086. (Example with 8-Bit Data, Parity, One Stop Bit)
  25087.  
  25088. Serial Data Reception (Asynchronous Mode): Figure 15.10 shows a sample flowchart
  25089. for serial reception.
  25090. 499
  25091.  
  25092. ----------------------- Page 516-----------------------
  25093.  
  25094. Use the following procedure for serial data reception after enabling the SCI for reception.
  25095.  
  25096. Start of reception 1. Receive error handling and
  25097. break detection: If a receive
  25098. error occurs, read the ORER,
  25099. PER, and FER flags in
  25100. Read ORER, PER, and FER flags SCSSR1 to identify the error.
  25101. in SCSSR1 After performing the
  25102. appropriate error handling,
  25103. ensure that the ORER, PER,
  25104. PER or FER Yes
  25105. and FER flags are all cleared to
  25106. or ORER = 1?
  25107. 0. Reception cannot be
  25108. No Error handling resumed if any of these flags
  25109. are set to 1. In the case of a
  25110. framing error, a break can be
  25111. Read RDRF flag in SCSSR1
  25112. detected by reading the value
  25113. of the RxD pin.
  25114.  
  25115. No 2. SCI status check and receive
  25116. RDRF = 1?
  25117. data read : Read SCSSR1 and
  25118. check that RDRF = 1, then read
  25119. Yes
  25120. the receive data in SCRDR1
  25121. and clear the RDRF flag to 0.
  25122. Read receive data in SCRDR1,
  25123. and clear RDRF flag 3. Serial reception continuation
  25124. in SCSSR1 to 0 procedure: To continue serial
  25125. reception, complete zero-
  25126. clearing of the RDRF flag
  25127. No All data received? before the stop bit for the
  25128. current frame is received. (The
  25129. RDRF flag is cleared
  25130. Yes automatically when the direct
  25131.  
  25132. memory access controller
  25133. Clear RE bit in SCSCR1 to 0
  25134. (DMAC) is activated by an RXI
  25135. interrupt and the SCRDR1
  25136.  
  25137. value is read.)
  25138. End of reception
  25139.  
  25140. Figure 15.10 Sample Serial Reception Flowchart (1)
  25141.  
  25142. 500
  25143.  
  25144. ----------------------- Page 517-----------------------
  25145.  
  25146. Error handling
  25147.  
  25148. No
  25149. ORER = 1?
  25150.  
  25151. Yes
  25152.  
  25153. Overrun error handling
  25154.  
  25155. No
  25156. FER = 1?
  25157.  
  25158. Yes
  25159.  
  25160. Yes
  25161. Break?
  25162.  
  25163. No
  25164.  
  25165. Framing error handling Clear RE bit in SCSCR1 to 0
  25166.  
  25167. No
  25168. PER = 1?
  25169.  
  25170. Yes
  25171.  
  25172. Parity error handling
  25173.  
  25174. Clear ORER, PER, and FER flags
  25175. in SCSSR1 to 0
  25176.  
  25177. End
  25178.  
  25179.  
  25180. Figure 15.10 Sample Serial Reception Flowchart (2)
  25181.  
  25182. In serial reception, the SCI operates as described below.
  25183.  
  25184. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  25185. synchronization and starts reception.
  25186.  
  25187. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25188.  
  25189. 3. The parity bit and stop bit are received.
  25190.  
  25191. 501
  25192.  
  25193. ----------------------- Page 518-----------------------
  25194.  
  25195. After receiving these bits, the SCI carries out the following checks.
  25196.  
  25197. a. Parity check: The SCI checks whether the number of 1-bits in the receive data agrees with
  25198. the parity (even or odd) set in the O/E bit in SCSMR1.
  25199.  
  25200. b. Stop bit check: The SCI checks whether the stop bit is 1. If there are two stop bits, only
  25201. the first is checked.
  25202.  
  25203. c. Status check: The SCI checks whether the RDRF flag is 0, indicating that the receive data
  25204. can be transferred from SCRSR1 to SCRDR1.
  25205.  
  25206. If all the above checks are passed, the RDRF flag is set to 1, and the receive data is stored in
  25207. SCRDR1.
  25208.  
  25209. If a receive error is detected in the error check, the operation is as shown in table 15.11.
  25210.  
  25211. Note: No further receive operations can be performed when a receive error has occurred. Also note
  25212. that the RDRF flag is not set to 1 in reception, and so the error flags must be cleared to 0.
  25213.  
  25214. 4. If the EIO bit in SCSPTR1 is cleared to 0 and the RIE bit in SCSCR1 is set to 1 when the
  25215. RDRF flag changes to 1, a receive-data-full interrupt (RXI) request is generated.
  25216.  
  25217. If the RIE bit in SCSCR1 is set to 1 when the ORER, PER, or FER flag changes to 1, a
  25218. receive-error interrupt (ERI) request is generated. A receive-data-full request is always output to
  25219. the DMAC when the RDRF flag changes to 1.
  25220.  
  25221. Table 15.11 Receive Error Conditions
  25222.  
  25223. Receive Error Abbreviation Condition Data Transfer
  25224.  
  25225. Overrun error ORER Reception of next data is Receive data is not transferred
  25226. completed while RDRF flag from SCRSR1 to SCRDR1
  25227. in SCSSR1 is set to 1
  25228.  
  25229. Framing error FER Stop bit is 0 Receive data is transferred
  25230. from SCRSR1 to SCRDR1
  25231.  
  25232. Parity error PER Received data parity differs Receive data is transferred
  25233. from that (even or odd) set from SCRSR1 to SCRDR1
  25234. in SCSMR1
  25235.  
  25236. Figure 15.11 shows an example of the operation for reception in asynchronous mode.
  25237.  
  25238. 502
  25239.  
  25240. ----------------------- Page 519-----------------------
  25241.  
  25242. Start Data Parity Stop Start Data Parity Stop
  25243. 1 bit bit bit bit bit bit
  25244.  
  25245. Serial
  25246. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  25247. data
  25248.  
  25249. RDRF
  25250.  
  25251. FER
  25252.  
  25253. RXI interrupt
  25254. request SCRDR1 data read and ERI interrupt request
  25255. RDRF flag cleared to 0 generated by framing
  25256. One frame by RXI interrupt handler error
  25257.  
  25258. Figure 15.11 Example of SCI Receive Operation
  25259. (Example with 8-Bit Data, Parity, One Stop Bit)
  25260.  
  25261. 1 5 . 3 . 3 Multiprocessor Communication Function
  25262.  
  25263. The multiprocessor communication function performs serial communication using a
  25264. multiprocessor format, in which a multiprocessor bit is added to the transfer data, in asynchronous
  25265. mode. Use of this function enables data transfer to be performed among a number of processors
  25266. sharing a serial transmission line.
  25267.  
  25268. When multiprocessor communication is carried out, each receiving station is addressed by a unique
  25269. ID code.
  25270.  
  25271. The serial communication cycle consists of two cycles: an ID transmission cycle which specifies
  25272. the receiving station , and a data transmission cycle. The multiprocessor bit is used to differentiate
  25273. between the ID transmission cycle and the data transmission cycle.
  25274.  
  25275. The transmitting station first sends the ID of the receiving station with which it wants to perform
  25276. serial communication as data with a 1 multiprocessor bit added. It then sends transmit data as data
  25277. with a 0 multiprocessor bit added.
  25278.  
  25279. The receiving station skips the data until data with a 1 multiprocessor bit is sent.
  25280.  
  25281. When data with a 1 multiprocessor bit is received, the receiving station compares that data with its
  25282. own ID. The station whose ID matches then receives the data sent next. Stations whose ID does
  25283. not match continue to skip the data until data with a 1 multiprocessor bit is again received. In this
  25284. way, data communication is carried out among a number of processors.
  25285.  
  25286. Figure 15.12 shows an example of inter-processor communication using a multiprocessor format.
  25287.  
  25288. 503
  25289.  
  25290. ----------------------- Page 520-----------------------
  25291.  
  25292. Transmitting
  25293. station
  25294.  
  25295. Serial transmission line
  25296.  
  25297. Receiving Receiving Receiving Receiving
  25298. station A station B station C station D
  25299.  
  25300. (ID = 01) (ID = 02) (ID = 03) (ID = 04)
  25301.  
  25302. Serial
  25303. H'01 H'AA
  25304. data
  25305. (MPB = 1) (MPB = 0)
  25306.  
  25307. ID transmission cycle: Data transmission cycle:
  25308. Receiving station Data transmission to
  25309. specification receiving station specified
  25310. by ID
  25311.  
  25312. MPB: Multiprocessor bit
  25313.  
  25314. Figure 15.12 Example of Inter-Processor Communication Using
  25315. Multiprocessor Format (Transmission of Data H'AA to Receiving Station A)
  25316.  
  25317. Data Transfer Formats
  25318.  
  25319. There are four data transfer formats. When the multiprocessor format is specified, the parity bit
  25320. specification is invalid. For details, see table 15.10.
  25321.  
  25322. Clock
  25323.  
  25324. See the description under Clock in section 15.3.2.
  25325.  
  25326. Data Transfer Operations
  25327.  
  25328. Multiprocessor Serial Data Transmission: Figure 15.13 shows a sample flowchart for
  25329. multiprocessor serial data transmission.
  25330.  
  25331. Use the following procedure for multiprocessor serial data transmission after enabling the SCI for
  25332. transmission.
  25333.  
  25334. 504
  25335.  
  25336. ----------------------- Page 521-----------------------
  25337.  
  25338. Start of transmission
  25339. 1. SCI status check and ID data write:
  25340. Read SCSSR1 and check that the
  25341. Read TEND flag in SCSSR1 TEND flag is set to 1, then set the
  25342. MPBT bit in SCSSR1 to 1 and write
  25343. ID data to SCTDR1. Finally, clear the
  25344. No
  25345. TEND = 1? TDRE flag to 0.
  25346.  
  25347. 2. Preparation for data transfer: Read
  25348. Yes SCSSR1 and check that the TEND
  25349. flag is set to 1, then set the MPBT bit
  25350. Set MPBT bit in SCSSR1 to 1 and
  25351. in SCSSR1 to 1.
  25352. write ID data to SCTDR1
  25353. 3. Serial data transmission: Write the
  25354. first transmit data to SCTDR1, then
  25355. Clear TDRE flag to 0
  25356. clear the TDRE flag to 0.
  25357.  
  25358. To continue data transmission, be
  25359. Read TEND flag in SCSSR1 sure to read 1 from the TDRE flag to
  25360. confirm that writing is possible, then
  25361. write data to SCTDR1, and then clear
  25362. No the TDRE flag to 0. (Checking and
  25363. TEND = 1?
  25364. clearing of the TDRE flag is
  25365. automatic when the direct memory
  25366. Yes
  25367. access controller (DMAC) is
  25368. Clear MPBT bit in SCSSR1 to 0 activated by a transmit-data-empty
  25369. interrupt (TXI) request, and data is
  25370. written to SCTDR1.)
  25371.  
  25372. Write data to SCTDR1
  25373.  
  25374. Clear TDRE flag to 0
  25375.  
  25376. Read TDRE flag in SCSSR1
  25377.  
  25378. No
  25379. TDRE = 1?
  25380.  
  25381. Yes
  25382.  
  25383. No
  25384. All data transmitted?
  25385.  
  25386. Yes
  25387.  
  25388. End of transmission
  25389.  
  25390. Figure 15.13 Sample Multiprocessor Serial Transmission Flowchart
  25391.  
  25392. 505
  25393.  
  25394. ----------------------- Page 522-----------------------
  25395.  
  25396. In serial transmission, the SCI operates as described below.
  25397.  
  25398. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  25399. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  25400. SCTSR1.
  25401.  
  25402. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25403. transmission.
  25404.  
  25405. The serial transmit data is sent from the TxD pin in the following order.
  25406.  
  25407. a. Start bit: One 0-bit is output.
  25408.  
  25409. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  25410.  
  25411. c. Multiprocessor bit: One multiprocessor bit (MPBT value) is output.
  25412.  
  25413. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  25414.  
  25415. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  25416. sent.
  25417.  
  25418. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is set
  25419. to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and then the line goes to the
  25420. mark state in which 1 is output. If the TEIE bit in SCSCR1 is set to 1 at this time, a
  25421. transmit-end interrupt (TEI) request is generated.
  25422.  
  25423. 4. The SCI monitors the TDRE flag. When TDRE is cleared to 0, the SCI recognizes that data
  25424. has been written to SCTDR1, and transfers the data from SCTDR1 to SCTSR1.
  25425.  
  25426. 5. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25427. transmitting. If the transmit-data-empty interrupt enable bit (TIE bit) in SCSCR1 is set to 1 at
  25428. this time, a transmit-data-empty interrupt (TXI) request is generated.
  25429.  
  25430. The order of transmission is the same as in step 2.
  25431.  
  25432. Figure 15.14 shows an example of SCI operation for transmission using a multiprocessor format.
  25433.  
  25434. 506
  25435.  
  25436. ----------------------- Page 523-----------------------
  25437.  
  25438. Multi- Multi- Multi-
  25439. Start Data proces- Stop Start Data proces- Stop Start Data proces- Stop
  25440. 1 bit sor bit bit bit sor bit bit bit sor bit bit 1
  25441.  
  25442. Serial Idle state
  25443. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 0 D0 D1 D7 0
  25444. data (mark state)
  25445.  
  25446. TDRE
  25447.  
  25448. TEND
  25449.  
  25450. One frame Data written to SCTDR1 TXI interrupt
  25451. and TDRE flag cleared request TEI interrupt
  25452. to 0 by TXI interrupt request
  25453. handler
  25454.  
  25455. MPBT bit cleared to 0, data
  25456. written to SCTDR1, and
  25457. TDRE flag cleared to 0 by
  25458. TEI interrupt handler
  25459.  
  25460. Figure 15.14 Example of SCI Transmit Operation (Example with 8-Bit Data,
  25461. Multiprocessor Bit, One Stop Bit)
  25462.  
  25463. Multiprocessor Serial Data Reception: Figure 15.15 shows a sample flowchart for
  25464. multiprocessor serial reception.
  25465.  
  25466. Use the following procedure for multiprocessor serial data reception after enabling the SCI for
  25467. reception.
  25468.  
  25469. 507
  25470.  
  25471. ----------------------- Page 524-----------------------
  25472.  
  25473. Start of reception 1. ID reception cycle: Set the MPIE
  25474. bit in SCSCR1 to 1.
  25475.  
  25476. Set MPIE bit in SCSCR1 to 1 2. SCI status check, ID reception
  25477. and comparison: Read SCSSR1
  25478. and check that the RDRF flag is
  25479. Read ORER and FER flags set to 1, then read the receive
  25480. in SCSSR1 data in SCRDR1 and compare it
  25481. with this station’s ID.
  25482. Yes
  25483. FER = 1? or ORER = 1? If the data is not this station’s ID,
  25484. set the MPIE bit to 1 again, and
  25485. No clear the RDRF flag to 0. If the
  25486.  
  25487. Read RDRF flag in SCSSR1 data is this station’s ID, clear the
  25488. RDRF flag to 0.
  25489.  
  25490. No 3. SCI status check and data
  25491. RDRF = 1?
  25492. reception: Read SCSSR1 and
  25493. Yes check that the RDRF flag is set to
  25494. Read receive data in SCRDR1 1, then read the data in SCRDR1.
  25495.  
  25496. 4. Receive error handling and break
  25497. No detection: If a receive error
  25498. This station’s ID?
  25499. occurs, read the ORER and FER
  25500. Yes flags in SCSSR1 to identify the
  25501.  
  25502. error. After performing the
  25503. Read ORER and FER flags
  25504. appropriate error handling,
  25505. in SCSSR1
  25506. ensure that the ORER and FER
  25507. flags are all cleared to 0.
  25508. Yes
  25509. FER = 1? or ORER = 1? Reception cannot be resumed if
  25510. either of these flags is set to 1. In
  25511. No the case of a framing error, a
  25512. Read RDRF flag in SCSSR1 break can be detected by reading
  25513. the RxD pin value.
  25514. No
  25515. RDRF = 1?
  25516.  
  25517. Yes
  25518. Read receive data in SCRDR1
  25519.  
  25520. No
  25521. All data received?
  25522.  
  25523. Yes Error handling
  25524.  
  25525. End of reception
  25526.  
  25527. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (1)
  25528.  
  25529. 508
  25530.  
  25531. ----------------------- Page 525-----------------------
  25532.  
  25533. Error handling
  25534.  
  25535. No
  25536. ORER = 1?
  25537.  
  25538. Yes
  25539.  
  25540. Overrun error handling
  25541.  
  25542. No
  25543. FER = 1?
  25544.  
  25545. Yes
  25546.  
  25547. Yes
  25548. Break?
  25549.  
  25550. No
  25551.  
  25552. Framing error handling Clear RE bit in SCSCR1 to 0
  25553.  
  25554. Clear ORER and FER flags
  25555. in SCSSR1 to 0
  25556.  
  25557. End
  25558.  
  25559. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (2)
  25560.  
  25561. 509
  25562.  
  25563. ----------------------- Page 526-----------------------
  25564.  
  25565. Figure 15.16 shows an example of SCI operation for multiprocessor format reception.
  25566.  
  25567. Start Stop Start Data Stop
  25568. 1 bit Data (ID1) MPB bit bit (Data1) MPB bit 1
  25569.  
  25570. Serial 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 Idle state
  25571. data (mark state)
  25572.  
  25573. MPIE
  25574.  
  25575. RDRF
  25576.  
  25577. SCRDR1
  25578. ID1
  25579. value
  25580.  
  25581. RXI interrupt request SCRDR1 data read As data is not this RXI interrupt request
  25582. (multiprocessor and RDRF flag station’s ID, MPIE is not generated, and
  25583. interrupt) cleared to 0 by RXI bit is set to 1 again SCRDR1 retains its
  25584. MPIE = 0 interrupt handler state
  25585.  
  25586. (a) Data does not match station’s ID
  25587.  
  25588. Start Stop Start Data Stop
  25589. 1 bit Data (ID2) MPB bit bit (Data2) MPB bit 1
  25590.  
  25591. Serial Idle state
  25592. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1
  25593. data (mark state)
  25594.  
  25595. MPIE
  25596.  
  25597. RDRF
  25598.  
  25599. SCRDR1
  25600. value ID1 ID2 Data2
  25601.  
  25602. RXI interrupt request SCRDR1 data read As data matches this MPIE bit set
  25603. (multiprocessor interrupt) and RDRF flag station’s ID, reception to 1 again
  25604. MPIE = 0 cleared to 0 by RXI continues and data is
  25605. interrupt handler received by RXI
  25606. interrupt handler
  25607.  
  25608. (b) Data matches station’s ID
  25609.  
  25610. Figure 15.16 Example of SCI Receive Operation (Example with 8-Bit Data,
  25611. Multiprocessor Bit, One Stop Bit)
  25612.  
  25613. 510
  25614.  
  25615. ----------------------- Page 527-----------------------
  25616.  
  25617. In multiprocessor mode serial reception, the SCI operates as described below.
  25618.  
  25619. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  25620. synchronization and starts reception.
  25621.  
  25622. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25623.  
  25624. 3. If the MPIE bit is 1, MPIE is cleared to 0 when a 1 is received in the multiprocessor bit
  25625. position. If the multiprocessor bit is 0, the MPIE bit is not changed. The value of the
  25626. multiprocessor bit is transferred to the MPB bit in SCSSR1.
  25627.  
  25628. 4. If the MPIE bit is 0, RDRF is checked at the stop bit position, and if RDRF is 1 the overrun
  25629. error bit is set. If the stop bit is not 0, the framing error bit is set. If RDRF is 0, the value in
  25630. SCRSR1 is transferred to SCRDR1, and if the stop bit is 0, RDRF is set to 1.
  25631.  
  25632. If MPIE remains set to 1, the SCI ignores the received data.
  25633.  
  25634. 1 5 . 3 . 4 Operation in Synchronous Mode
  25635.  
  25636. In synchronous mode, data is transmitted or received in synchronization with clock pulses, making
  25637. it suitable for high-speed serial communication.
  25638.  
  25639. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  25640. communication. Both the transmitter and the receiver also have a double-buffered structure, so that
  25641. data can be read or written during transmission or reception, enabling continuous data transfer.
  25642.  
  25643. Figure 15.17 shows the general format for synchronous serial communication.
  25644.  
  25645. One unit of transfer data (character or frame)
  25646.  
  25647. * *
  25648.  
  25649. Serial clock
  25650.  
  25651. LSB MSB
  25652.  
  25653. Serial data Don’t care Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Don’t care
  25654.  
  25655. Note: * High except in continuous transfer
  25656.  
  25657.  
  25658. Figure 15.17 Data Format in Synchronous Communication
  25659.  
  25660. 511
  25661.  
  25662. ----------------------- Page 528-----------------------
  25663.  
  25664. In synchronous serial communication, data on the transmission line is output from one falling
  25665. edge of the serial clock to the next. Data confirmation is guaranteed at the rising edge of the serial
  25666. clock.
  25667.  
  25668. In serial communication, one character consists of data output starting with the LSB and ending
  25669. with the MSB. After the MSB is output, the transmission line holds the MSB state.
  25670.  
  25671. In synchronous mode, the SCI receives data in synchronization with the falling edge of the serial
  25672. clock.
  25673.  
  25674. Data Transfer Format
  25675.  
  25676. A fixed 8-bit data format is used. No parity or multiprocessor bits are added.
  25677.  
  25678. Clock
  25679.  
  25680. Either an internal clock generated by the on-chip baud rate generator or an external serial clock
  25681. input at the SCK pin can be selected, according to the setting of the C/A bit in SCSMR1 and the
  25682. CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection, see table 15.9.
  25683.  
  25684. When the SCI is operated on an internal clock, the serial clock is output from the SCK pin.
  25685.  
  25686. Eight serial clock pulses are output in the transfer of one character, and when no transfer is
  25687. performed the clock is fixed high. In reception only, if an on-chip clock source is selected, clock
  25688. pulses are output while RE = 1. When the last data is received, RE should be cleared to 0 before
  25689. the end of bit 7.
  25690.  
  25691. Data Transfer Operations
  25692.  
  25693. SCI Initialization (Synchronous Mode): Before transmitting and receiving data, it is
  25694. necessary to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  25695.  
  25696. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared to
  25697. 0 before making the change using the following procedure. When the TE bit is cleared to 0, the
  25698. TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  25699. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  25700.  
  25701. Figure 15.18 shows a sample SCI initialization flowchart.
  25702.  
  25703. 512
  25704.  
  25705. ----------------------- Page 529-----------------------
  25706.  
  25707. 1. Set the clock selection in SCSCR1.
  25708. Initialization
  25709. Be sure to clear bits RIE, TIE, TEIE,
  25710. and MPIE, TE and RE, to 0.
  25711.  
  25712. Clear TE and RE bits 2. Set the data transfer format in
  25713. in SCSCR1 to 0 SCSMR1.
  25714.  
  25715. 3. Write a value corresponding to the bit
  25716. Set RIE, TIE, TEIE, MPIE, CKE1 rate into SCBRR1. (Not necessary if
  25717. and CKE0 bits in SCSCR1 an external clock is used.)
  25718. (leaving TE and RE bits 4. Wait at least one bit interval, then set
  25719. cleared to 0) the TE bit or RE bit in SCSCR1 to 1.
  25720.  
  25721. Also set the RIE, TIE, TEIE, and MPIE
  25722. Set data transfer format
  25723. bits. Setting the TE and RE bits
  25724. in SCSMR1
  25725. enables the TxD and RxD pins to be
  25726. used.
  25727.  
  25728. Set value in SCBRR1
  25729.  
  25730.  
  25731. Wait
  25732.  
  25733. No
  25734. 1-bit interval elapsed?
  25735.  
  25736. Yes
  25737.  
  25738. Set TE and RE bits in SCSCR1
  25739. to 1, and set RIE, TIE, TEIE,
  25740. and MPIE bits
  25741.  
  25742. End
  25743.  
  25744. Figure 15.18 Sample SCI Initialization Flowchart
  25745.  
  25746. 513
  25747.  
  25748. ----------------------- Page 530-----------------------
  25749.  
  25750. Serial Data Transmission (Synchronous Mode): Figure 15.19 shows a sample flowchart
  25751. for serial transmission.
  25752.  
  25753. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  25754.  
  25755. 1. SCI status check and transmit
  25756. Start of transmission
  25757. data write: Read SCSSR1 and
  25758. check that the TDRE flag is set to
  25759. 1, then write transmit data to
  25760. Read TDRE flag in SCSSR1
  25761. SCTDR1 and clear the TDRE flag
  25762. to 0.
  25763.  
  25764. No 2. To continue serial transmission,
  25765. TDRE = 1?
  25766. be sure to read 1 from the TDRE
  25767. flag to confirm that writing is
  25768. Yes possible, then write data to
  25769. SCTDR1, and then clear the
  25770. Write transmit data to SCTDR1 TDRE flag to 0. (Checking and
  25771. and clear TDRE flag clearing of the TDRE flag is
  25772. in SCSSR1 to 0 automatic when the direct
  25773. memory access controller
  25774. (DMAC) is activated by a
  25775. All data transmitted? No transmit-data-empty interrupt
  25776.  
  25777. (TXI) request, and data is written
  25778. to SCTDR1.)
  25779. Yes
  25780.  
  25781.  
  25782. Read TEND flag in SCSSR1
  25783.  
  25784. No
  25785. TEND = 1?
  25786.  
  25787. Yes
  25788.  
  25789. Clear TE bit in SCSCR1 to 0
  25790.  
  25791. End
  25792.  
  25793. Figure 15.19 Sample Serial Transmission Flowchart
  25794.  
  25795. In serial transmission, the SCI operates as described below.
  25796.  
  25797. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  25798. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  25799. SCTSR1.
  25800.  
  25801. 514
  25802.  
  25803. ----------------------- Page 531-----------------------
  25804.  
  25805. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25806. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI)
  25807. request is generated.
  25808.  
  25809. When clock output mode has been set, the SCI outputs 8 serial clock pulses. When use of an
  25810. external clock has been specified, data is output synchronized with the input clock.
  25811.  
  25812. The serial transmit data is sent from the TxD pin starting with the LSB (bit 0) and ending with
  25813. the MSB (bit 7).
  25814.  
  25815. 3. The SCI checks the TDRE flag at the timing for sending the MSB (bit 7).
  25816.  
  25817. If the TDRE flag is cleared to 0, data is transferred from SCTDR1 to SCTSR1, and serial
  25818. transmission of the next frame is started.
  25819.  
  25820. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the MSB (bit 7) is sent,
  25821. and the TxD pin maintains its state.
  25822.  
  25823. If the TEIE bit in SCSCR1 is set to 1 at this time, a transmit-end interrupt (TEI) request is
  25824. generated.
  25825.  
  25826. 4. After completion of serial transmission, the SCK pin is fixed high.
  25827.  
  25828. Figure 15.20 shows an example of SCI operation in transmission.
  25829.  
  25830. Transfer
  25831. direction
  25832.  
  25833. Serial clock
  25834.  
  25835. LSB MSB
  25836.  
  25837. Serial data Bit 0 Bit 1 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  25838.  
  25839. TDRE
  25840.  
  25841. TEND
  25842.  
  25843. Data written to SCTDR1 TXI interrupt TEI interrupt
  25844. and TDRE flag cleared to request request
  25845. TXI interrupt 0 in TXI interrupt handler
  25846.  
  25847. request One frame
  25848.  
  25849. Figure 15.20 Example of SCI Transmit Operation
  25850.  
  25851. Serial Data Reception (Synchronous Mode): Figure 15.21 shows a sample flowchart for
  25852. serial reception.
  25853.  
  25854. Use the following procedure for serial data reception after enabling the SCI for reception.
  25855.  
  25856. 515
  25857.  
  25858. ----------------------- Page 532-----------------------
  25859.  
  25860. When changing the operating mode from asynchronous to synchronous, be sure to check that the
  25861. ORER, PER, and FER flags are all cleared to 0. The RDRF flag will not be set if the FER or
  25862. PER flag is set to 1, and neither transmit nor receive operations will be possible.
  25863.  
  25864. Start of reception 1. Receive error handling: If a
  25865. receive error occurs, read the
  25866. ORER flag in SCSSR1 , and
  25867. after performing the appropriate
  25868. Read ORER flag in SCSSR1
  25869. error handling, clear the ORER
  25870. flag to 0. Transfer cannot be
  25871. resumed if the ORER flag is set
  25872. Yes
  25873. ORER = 1? to 1.
  25874.  
  25875. 2. SCI status check and receive
  25876. No Error handling data read: Read SCSSR1 and
  25877. check that the RDRF flag is set
  25878. to 1, then read the receive data
  25879. Read RDRF flag in SCSSR1
  25880. in SCRDR1 and clear the RDRF
  25881. flag to 0. Transition of the RDRF
  25882. No flag from 0 to 1 can also be
  25883. RDRF = 1?
  25884. identified by an RXI interrupt.
  25885.  
  25886. Yes 3. Serial reception continuation
  25887. procedure: To continue serial
  25888. Read receive data in SCRDR1, reception, finish reading the
  25889. and clear RDRF flag RDRF flag, reading SCRDR1,
  25890. in SCSSR1 to 0 and clearing the RDRF flag to 0,
  25891. before the MSB (bit 7) of the
  25892. No current frame is received. (The
  25893. All data received? RDRF flag is cleared
  25894. automatically when the direct
  25895. Yes memory access controller
  25896. (DMAC) is activated by a
  25897. Clear RE bit in SCSCR1 to 0 receive-data-full interrupt (RXI)
  25898.  
  25899. request and the SCRDR1 value
  25900. End of reception is read.)
  25901.  
  25902. Figure 15.21 Sample Serial Reception Flowchart (1)
  25903.  
  25904. 516
  25905.  
  25906. ----------------------- Page 533-----------------------
  25907.  
  25908. Error handling
  25909.  
  25910. No
  25911. ORER = 1?
  25912.  
  25913. Yes
  25914.  
  25915. Overrun error handling
  25916.  
  25917. Clear ORER flag in SCSSR1 to 0
  25918.  
  25919. End
  25920.  
  25921. Figure 15.21 Sample Serial Reception Flowchart (2)
  25922.  
  25923. In serial reception, the SCI operates as described below.
  25924.  
  25925. 1. The SCI performs internal initialization in synchronization with serial clock input or output.
  25926.  
  25927. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25928.  
  25929. After reception, the SCI checks whether the RDRF flag is 0, indicating that the receive data can
  25930. be transferred from SCRSR1 to SCRDR1.
  25931.  
  25932. If this check is passed, the RDRF flag is set to 1, and the receive data is stored in SCRDR1. If
  25933. a receive error is detected in the error check, the operation is as shown in table 15.11.
  25934.  
  25935. Neither transmit nor receive operations can be performed subsequently when a receive error has
  25936. been found in the error check.
  25937.  
  25938. Also, as the RDRF flag is not set to 1 when receiving, the flag must be cleared to 0.
  25939.  
  25940. 3. If the RIE bit in SCRSR1 is set to 1 when the RDRF flag changes to 1, a receive-data-full
  25941. interrupt (RXI) request is generated. If the RIE bit in SCRSR1 is set to 1 when the ORER flag
  25942. changes to 1, a receive-error interrupt (ERI) request is generated.
  25943.  
  25944. Figure 15.22 shows an example of SCI operation in reception.
  25945.  
  25946. 517
  25947.  
  25948. ----------------------- Page 534-----------------------
  25949.  
  25950. Transfer
  25951. direction
  25952.  
  25953. Serial clock
  25954.  
  25955. Serial data Bit 7 Bit 0 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  25956.  
  25957. RDRF
  25958.  
  25959. ORER
  25960.  
  25961. RXI interrupt Data read from RXI interrupt ERI interrupt
  25962. request SCRDR1 and RDRF request request due to
  25963. flag cleared to 0 in RXI overrun error
  25964. interrupt handler
  25965.  
  25966. One frame
  25967.  
  25968. Figure 15.22 Example of SCI Receive Operation
  25969.  
  25970. Simultaneous Serial Data Transmission and Reception (Synchronous Mode):
  25971. Figure 15.23 shows a sample flowchart for simultaneous serial transmit and receive operations.
  25972.  
  25973. Use the following procedure for simultaneous serial data transmit and receive operations after
  25974. enabling the SCI for transmission and reception.
  25975.  
  25976. 518
  25977.  
  25978. ----------------------- Page 535-----------------------
  25979.  
  25980. 1. SCI status check and transmit data
  25981. Start of transmission/reception
  25982. write:
  25983. Read SCSSR1 and check that the
  25984. TDRE flag is set to 1, then write
  25985. transmit data to SCTDR1 and clear
  25986. Read TDRE flag in SCSSR1
  25987. the TDRE flag to 0. Transition of the
  25988. TDRE flag from 0 to 1 can also be
  25989. No identified by a TXI interrupt.
  25990. TDRE = 1?
  25991. 2. Receive error handling:
  25992. Yes If a receive error occurs, read the
  25993. ORER flag in SCSSR1 , and after
  25994. Write transmit data performing the appropriate error
  25995. to SCTDR1 and clear TDRE flag handling, clear the ORER flag to 0.
  25996. in SCSSR1 to 0 Transmission/reception cannot be
  25997. resumed if the ORER flag is set to 1.
  25998.  
  25999. 3. SCI status check and receive data
  26000. read:
  26001. Read ORER flag in SCSSR1 Read SCSSR1 and check that the
  26002.  
  26003. RDRF flag is set to 1, then read the
  26004. Yes receive data in SCRDR1 and clear the
  26005. ORER = 1? RDRF flag to 0. Transition of the
  26006. RDRF flag from 0 to 1 can also be
  26007. No Error handling identified by an RXI interrupt.
  26008.  
  26009. 4. Serial transmission/reception
  26010. Read RDRF flag in SCSSR1 continuation procedure:
  26011. To continue serial transmission/
  26012. No reception, finish reading the RDRF
  26013. RDRF = 1? flag, reading SCRDR1, and clearing
  26014. the RDRF flag to 0, before the MSB
  26015. Yes (bit 7) of the current frame is received.
  26016. Also, before the MSB (bit 7) of the
  26017. Read receive data in SCRDR1, current frame is transmitted, read 1
  26018. and clear RDRF flag from the TDRE flag to confirm that
  26019. in SCSSR1 to 0 writing is possible, then write data to
  26020. SCTDR1 and clear the TDRE flag to
  26021. 0.
  26022. No
  26023. All data transferred? (Checking and clearing of the TDRE
  26024. flag is automatic when the DMAC is
  26025. Yes activated by a transmit-data-empty
  26026. interrupt (TXI) request, and data is
  26027. Clear TE and RE bits written to SCTDR1. Similarly, the
  26028. in SCRSR1 to 0 RDRF flag is cleared automatically
  26029. when the DMAC is activated by a
  26030. receive-data-full interrupt (RXI)
  26031. End of transmission/reception request and the SCRDR1 value is
  26032. read.)
  26033.  
  26034. Note: When switching from transmit or receive operation to simultaneous transmit and receive
  26035. operations, first clear the TE bit and RE bit to 0, then set both these bits to 1.
  26036.  
  26037. Figure 15.23 Sample Flowchart for Serial Data Transmission and Reception
  26038.  
  26039. 519
  26040.  
  26041. ----------------------- Page 536-----------------------
  26042.  
  26043. 1 5 . 4 SCI Interrupt Sources and DMAC
  26044.  
  26045. The SCI has four interrupt sources: the transmit-end interrupt (TEI) request, receive-error interrupt
  26046. (ERI) request, receive-data-full interrupt (RXI) request, and transmit-data-empty interrupt (TXI)
  26047. request.
  26048.  
  26049. Table 15.12 shows the interrupt sources and their relative priorities. Individual interrupt sources
  26050. can be enabled or disabled with the TIE, RIE, and TEIE bits in SCRSR1, and the EIO bit in
  26051. SCSPTR1. Each kind of interrupt request is sent to the interrupt controller independently.
  26052.  
  26053. When the TDRE flag in the serial status register (SCSSR1) is set to 1, a TDR-empty request is
  26054. generated separately from the interrupt request. A TDR-empty request can activate the direct
  26055. memory access controller (DMAC) to perform data transfer. The TDRE flag is cleared to 0
  26056. automatically when a write to the transmit data register (SCTDR1) is performed by the DMAC.
  26057.  
  26058. When the RDRF flag in SCSSR1 is set to 1, an RDR-full request is generated separately from the
  26059. interrupt request. An RDR-full request can activate the DMAC to perform data transfer.
  26060.  
  26061. The RDRF flag is cleared to 0 automatically when a receive data register (SCRDR1) read is
  26062. performed by the DMAC.
  26063.  
  26064. When the ORER, FER, or PER flag in SCSSR1 is set to 1, an ERI interrupt request is generated.
  26065. The DMAC cannot be activated by an ERI interrupt request. When receive data processing is to be
  26066. carried out by the DMAC and receive error handling is to be performed by means of an interrupt to
  26067. the CPU, set the RIE bit to 1 and also set the EIO bit in SCSPTR1 to 1 so that an interrupt error
  26068. occurs only for a receive error. If the EIO bit is cleared to 0, interrupts to the CPU will be
  26069. generated even during normal data reception.
  26070.  
  26071. When the TEND flag in SCSSR1 is set to 1, a TEI interrupt request is generated. The DMAC
  26072. cannot be activated by a TEI interrupt request.
  26073.  
  26074. A TXI interrupt indicates that transmit data can be written, and a TEI interrupt indicates that the
  26075. transmit operation has ended.
  26076.  
  26077. Table 15.12 SCI Interrupt Sources
  26078.  
  26079. Interrupt DMAC Priority on
  26080. Source Description Activation Reset Release
  26081.  
  26082. ERI Receive error (ORER, FER, or PER) Not possible High
  26083.  
  26084. RXI Receive data register full (RDRF) Possible ↑
  26085.  
  26086. TXI Transmit data register empty (TDRE) Possible ↓
  26087.  
  26088. TEI Transmit end (TEND) Not possible Low
  26089.  
  26090. See section 5, Exceptions, for the priority order and relation to non-SCI interrupts.
  26091.  
  26092. 520
  26093.  
  26094. ----------------------- Page 537-----------------------
  26095.  
  26096. 1 5 . 5 Usage Notes
  26097.  
  26098. The following points should be noted when using the SCI.
  26099.  
  26100. SCTDR1 Writing and the TDRE Flag: The TDRE flag in SCSSR1 is a status flag that
  26101. indicates that transmit data has been transferred from SCTDR1 to SCTSR1. When the SCI
  26102. transfers data from SCTDR1 to SCTSR1, the TDRE flag is set to 1.
  26103.  
  26104. Data can be written to SCTDR1 regardless of the state of the TDRE flag. However, if new data is
  26105. written to SCTDR1 when the TDRE flag is cleared to 0, the data stored in SCTDR1 will be lost
  26106. since it has not yet been transferred to SCTSR1. It is therefore essential to check that the TDRE
  26107. flag is set to 1 before writing transmit data to SCTDR1.
  26108.  
  26109. Simultaneous Multiple Receive Errors: If a number of receive errors occur at the same
  26110. time, the state of the status flags in SCSSR1 is as shown in table 15.13. If there is an overrun
  26111. error, data is not transferred from SCRSR1 to SCRDR1, and the receive data is lost.
  26112.  
  26113. Table 15.13 SCSSR1 Status Flags and Transfer of Receive Data
  26114.  
  26115. SCSSR1 Status Flags Receive Data
  26116. Transfer
  26117. SCRSR1 → SCRDR1
  26118.  
  26119. Receive Errors RDRF ORER FER PER
  26120.  
  26121. Overrun error 1 1 0 0 X
  26122.  
  26123. Framing error 0 0 1 0 O
  26124.  
  26125. Parity error 0 0 0 1 O
  26126.  
  26127. Overrun error + framing error 1 1 1 0 X
  26128.  
  26129. Overrun error + parity error 1 1 0 1 X
  26130.  
  26131. Framing error + parity error 0 0 1 1 O
  26132.  
  26133. Overrun error + framing error + 1 1 1 1 X
  26134. parity error
  26135.  
  26136. O: Receive data is transferred from SCRSR1 to SCRDR1.
  26137. X: Receive data is not transferred from SCRSR1 to SCRDR1.
  26138.  
  26139. Break Detection and Processing: Break signals can be detected by reading the RxD pin
  26140. directly when a framing error (FER) is detected. In the break state the input from the RxD pin
  26141. consists of all 0s, so the FER flag is set and the parity error flag (PER) may also be set. Note that
  26142. the SCI receiver continues to operate in the break state, so if the FER flag is cleared to 0 it will be
  26143. set to 1 again.
  26144.  
  26145. 521
  26146.  
  26147. ----------------------- Page 538-----------------------
  26148.  
  26149. Sending a Break Signal: The input/output condition and level of the TxD pin are determined
  26150. by bits SPB0IO and SPB0DT in the serial port register (SCSPTR1). This feature can be used to
  26151. send a break signal.
  26152.  
  26153. After the serial transmitter is initialized, the TxD pin function is not selected and the value of the
  26154. SPB0DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  26155. enabled). The SPB0IO and SPB0DT bits should therefore be set to 1 (designating output and high
  26156. level) beforehand.
  26157.  
  26158. To send a break signal during serial transmission, clear the SPB0DT bit to 0 (designating low
  26159. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  26160. transmitter is initialized regardless of its current state, and the TxD pin becomes an output port
  26161. outputting the value 0.
  26162.  
  26163. Receive Error Flags and Transmit Operations (Synchronous Mode Only):
  26164. Transmission cannot be started when a receive error flag (ORER, PER, or FER) is set to 1, even if
  26165. the TDRE flag is set to 1. Be sure to clear the receive error flags to 0 before starting transmission.
  26166.  
  26167. Note also that the receive error flags are not cleared to 0 by clearing the RE bit to 0.
  26168.  
  26169. Receive Data Sampling Timing and Receive Margin in Asynchronous Mode: The
  26170. SCI operates on a base clock with a frequency of 16 times the bit rate. In reception, the SCI
  26171. synchronizes internally with the fall of the start bit, which it samples on the base clock. Receive
  26172. data is latched at the rising edge of the eighth base clock pulse. The timing is shown in figure
  26173. 15.24.
  26174.  
  26175. 522
  26176.  
  26177. ----------------------- Page 539-----------------------
  26178.  
  26179. 16 clocks
  26180.  
  26181. 8 clocks
  26182.  
  26183. 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
  26184.  
  26185. Base clock
  26186.  
  26187. –7.5 clocks +7.5 clocks
  26188.  
  26189. Receive data Start bit D0 D1
  26190. (RxD)
  26191.  
  26192. Synchronization
  26193. sampling timing
  26194.  
  26195. Data sampling
  26196. timing
  26197.  
  26198. Figure 15.24 Receive Data Sampling Timing in Asynchronous Mode
  26199.  
  26200. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  26201.  
  26202. 1 | D – 0.5 |
  26203. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100% .............. (1)
  26204. 2N N
  26205.  
  26206. M: Receive margin (%)
  26207. N: Ratio of clock frequency to bit rate (N = 16)
  26208. D: Clock duty cycle (D = 0 to 1.0)
  26209. L: Frame length (L = 9 to 12)
  26210. F: Absolute deviation of clock frequency
  26211.  
  26212. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation (2).
  26213.  
  26214. When D = 0.5 and F = 0:
  26215.  
  26216. M = (0.5 – 1/(2 × 16)) × 100% = 46.875% ....................................... (2)
  26217.  
  26218. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  26219.  
  26220. 523
  26221.  
  26222. ----------------------- Page 540-----------------------
  26223.  
  26224. When Using the DMAC: When an external clock source is used as the serial clock, the
  26225. transmit clock should not be input until at least 5 peripheral operating clock cycles after SCTDR1
  26226. is updated by the DMAC. Incorrect operation may result if the transmit clock is input within 4
  26227. cycles after SCTDR1 is updated. (See figure 15.25)
  26228.  
  26229. SCK
  26230. t
  26231.  
  26232. TDRE
  26233.  
  26234. TxD D0 D1 D2 D3 D4 D5 D6 D7
  26235.  
  26236. Note: When operating on an external clock, set t > 4.
  26237.  
  26238. Figure 15.25 Example of Synchronous Transmission by DMAC
  26239.  
  26240. When SCRDR1 is read by the DMAC, be sure to set the SCI receive-data-full interrupt (RXI) as
  26241. the activation source with bits RS3 to RS0 in CHCR.
  26242.  
  26243. When Using Synchronous External Clock Mode:
  26244. • Do not set TE or RE to 1 until at least 4 peripheral operating clock cycles after external clock
  26245. SCK has changed from 0 to 1.
  26246.  
  26247. • Only set both TE and RE to 1 when external clock SCK is 1.
  26248.  
  26249. • In reception, note that if RE is cleared to 0 from 2.5 to 3.5 peripheral operating clock cycles
  26250. after the rising edge of the RxD D7 bit SCK input, RDRF will be set to 1 but copying to
  26251. SCRDR1 will not be possible.
  26252.  
  26253. When Using Synchronous Internal Clock Mode: In reception, note that if RE is cleared
  26254. to zero 1.5 peripheral operating clock cycles after the rising edge of the RxD D7 bit SCK output,
  26255. RDRF will be set to 1 but copying to SCRDR1 will not be possible.
  26256.  
  26257. 524
  26258.  
  26259. ----------------------- Page 541-----------------------
  26260.  
  26261. Section 16 Serial Communication Interface with FIFO (SCIF)
  26262.  
  26263. 1 6 . 1 Overview
  26264.  
  26265. The SH7750 is equipped with a single-channel serial communication interface with built-in FIFO
  26266. buffers (Serial Communication Interface with FIFO: SCIF). The SCIF can perform asynchronous
  26267. serial communication.
  26268.  
  26269. Sixteen-stage FIFO registers are provided for both transmission and reception, enabling fast,
  26270. efficient, and continuous communication.
  26271.  
  26272. 1 6 . 1 . 1 Features
  26273.  
  26274. SCIF features are listed below.
  26275.  
  26276. • Asynchronous serial communication
  26277.  
  26278. Serial data communication is executed using an asynchronous system in which synchronization
  26279. is achieved character by character. Serial data communication can be carried out with standard
  26280. asynchronous communication chips such as a Universal Asynchronous Receiver/Transmitter
  26281. (UART) or Asynchronous Communication Interface Adapter (ACIA).
  26282.  
  26283. There is a choice of 8 serial data transfer formats.
  26284.  
  26285.  Data length: 7 or 8 bits
  26286.  
  26287.  Stop bit length: 1 or 2 bits
  26288.  
  26289.  Parity: Even/odd/none
  26290.  
  26291.  Receive error detection: Parity, framing, and overrun errors
  26292.  
  26293.  Break detection: If the receive data following that in which a framing error occurred is also
  26294. at the space “0” level, and there is a frame error, a break is detected. When a framing error
  26295. occurs, a break can also be detected by reading the RxD2 pin level directly from the serial
  26296. port register (SCSPTR2).
  26297.  
  26298. • Full-duplex communication capability
  26299.  
  26300. The transmitter and receiver are independent units, enabling transmission and reception to be
  26301. performed simultaneously.
  26302.  
  26303. The transmitter and receiver both have a 16-stage FIFO buffer structure, enabling fast and
  26304. continuous serial data transmission and reception.
  26305.  
  26306. • On-chip baud rate generator allows any bit rate to be selected.
  26307.  
  26308. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  26309. SCK2 pin
  26310.  
  26311. • Four interrupt sources
  26312.  
  26313. There are four interrupt sources—transmit-FIFO-data-empty, break, receive-FIFO-data-full, and
  26314. receive-error—that can issue requests independently.
  26315.  
  26316. 525
  26317.  
  26318. ----------------------- Page 542-----------------------
  26319.  
  26320. • The DMA controller (DMAC) can be activated to execute a data transfer by issuing a DMA
  26321. transfer request in the event of a transmit-FIFO-data-empty or receive-FIFO-data-full interrupt.
  26322.  
  26323. • When not in use, the SCIF can be stopped by halting its clock supply to reduce power
  26324. consumption.
  26325.  
  26326. • Modem control functions (RTS2 and CTS2) are provided.
  26327.  
  26328. • The amount of data in the transmit/receive FIFO registers, and the number of receive errors in
  26329. the receive data in the receive FIFO register, can be ascertained.
  26330.  
  26331. • A timeout error (DR) can be detected during reception.
  26332.  
  26333. 526
  26334.  
  26335. ----------------------- Page 543-----------------------
  26336.  
  26337. 1 6 . 1 . 2 Block Diagram
  26338.  
  26339. Figure 16.1 shows a block diagram of the SCIF.
  26340.  
  26341. e
  26342. c Internal
  26343. a
  26344. Module data bus f data bus
  26345. r
  26346. e
  26347. t
  26348. n
  26349. i
  26350.  
  26351. s
  26352. u
  26353. B
  26354.  
  26355. SCFRDR2 SCFTDR2 SCSMR2 SCBRR2
  26356. (16-stage) (16-stage) SCLSR2
  26357.  
  26358. SCFDR2
  26359. SCFCR2
  26360. RxD2 SCRSR2 SCTSR2
  26361. SCFSR2 Baud rate Pφ/4
  26362. SCSCR2 generator
  26363.  
  26364. SCSPTR2 Pφ/16
  26365.  
  26366. Transmission/
  26367. reception Pφ/64
  26368. control
  26369. TxD2
  26370. Parity generation Clock
  26371.  
  26372. Parity check
  26373.  
  26374. External clock
  26375. SCK2
  26376. TXI
  26377. CTS2 RXI
  26378. ERI
  26379. RTS2 BRI
  26380.  
  26381. SCIF
  26382.  
  26383. SCRSR2: Receive shift register SCFSR2: Serial status register
  26384. SCFRDR2: Receive FIFO data register SCBRR2: Bit rate register
  26385. SCTSR2: Transmit shift register SCSPTR2: Serial port register
  26386. SCFTDR2: Transmit FIFO data register SCFCR2: FIFO control register
  26387. SCSMR2: Serial mode register SCFDR2: FIFO data count register
  26388. SCSCR2: Serial control register SCLSR2: Line status register
  26389.  
  26390. Figure 16.1 Block Diagram of SCIF
  26391.  
  26392. 527
  26393.  
  26394. ----------------------- Page 544-----------------------
  26395.  
  26396. 1 6 . 1 . 3 Pin Configuration
  26397.  
  26398. Table 16.1 shows the SCIF pin configuration.
  26399.  
  26400. Table 16.1SCIF Pins
  26401.  
  26402. Pin Name Abbreviation I / O Function
  26403.  
  26404. Serial clock pin MRESET/SCK2 Input Clock input
  26405.  
  26406. Receive data pin MD2/RxD2 Input Receive data input
  26407.  
  26408. Transmit data pin MD1/TxD2 Output Transmit data output
  26409.  
  26410. Modem control pin CTS2 I/O Transmission enabled
  26411.  
  26412. Modem control pin MD8/RTS2 I/O Transmission request
  26413.  
  26414. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset is
  26415. executed. The MD1/TxD2, MD2/RxD2, and MD8/RTS2 pins function as the MD1, MD2, and
  26416. MD8 mode input pins after a power-on reset. These pins are made to function as serial pins
  26417. by performing SCIF operation settings with the TE and RE bits in SCSCR2 and the MCE bit in
  26418. SCFCR2. Break state transmission and detection can be set in the SCIF’s SCSPTR2
  26419. register.
  26420.  
  26421. 528
  26422.  
  26423. ----------------------- Page 545-----------------------
  26424.  
  26425. 1 6 . 1 . 4 Register Configuration
  26426.  
  26427. The SCIF has the internal registers shown in table 16.2. These registers are used to specify the
  26428. data format and bit rate, and to perform transmitter/receiver control.
  26429.  
  26430. Table 16.2SCIF Registers
  26431.  
  26432. Abbrevia- Initial P 4 Area 7 Acces
  26433. Name tion R/ W Value Address Address s Size
  26434.  
  26435. Serial mode register SCSMR2 R/W H'0000 H'FFE80000 H'IFE80000 16
  26436.  
  26437. Bit rate register SCBRR2 R/W H'FF H'FFE80004 H'IFE80004 8
  26438.  
  26439. Serial control register SCSCR2 R/W H'0000 H'FFE80008 H'IFE80008 16
  26440.  
  26441. Transmit FIFO data register SCFTDR2 W Undefined H'FFE8000C H'IFE8000C 8
  26442. Serial status register SCFSR2 R/(W)*1 H'0060 H'FFE80010 H'IFE80010 16
  26443.  
  26444. Receive FIFO data register SCFRDR2 R Undefined H'FFE80014 H'IFE80014 8
  26445.  
  26446. FIFO control register SCFCR2 R/W H'0000 H'FFE80018 H'IFE80018 16
  26447.  
  26448. FIFO data count register SCFDR2 R H'0000 H'FFE8001C H'IFE8001C 16
  26449. Serial port register SCSPTR2 R/W H'0000*2 H'FFE80020 H'IFE80020 16
  26450.  
  26451. Line status register SCLSR2 R/(W)*3 H'0000 H'FFE80024 H'IFE80024 16
  26452.  
  26453. Notes: 1. Only 0 can be written, to clear flags. Bits 15 to 8, 3, and 2 are read-only, and cannot be
  26454. modified.
  26455. 2. The value of bits 6, 4, and 0 is undefined.
  26456. 3. Only 0 can be written, to clear flags. Bits 15 to 1 are read-only, and cannot be modified.
  26457.  
  26458. 1 6 . 2 Register Descriptions
  26459.  
  26460. 1 6 . 2 . 1 Receive Shift Register (SCRSR2)
  26461.  
  26462. Bit: 7 6 5 4 3 2 1 0
  26463.  
  26464. R/W: — — — — — — — —
  26465.  
  26466. SCRSR2 is the register used to receive serial data.
  26467.  
  26468. The SCIF sets serial data input from the RxD2 pin in SCRSR2 in the order received, starting with
  26469. the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it is
  26470. transferred to the receive FIFO register, SCFRDR2, automatically.
  26471.  
  26472. SCRSR2 cannot be directly read or written to by the CPU.
  26473.  
  26474. 529
  26475.  
  26476. ----------------------- Page 546-----------------------
  26477.  
  26478. 1 6 . 2 . 2 Receive FIFO Data Register (SCFRDR2)
  26479.  
  26480. Bit: 7 6 5 4 3 2 1 0
  26481.  
  26482. R/W: R R R R R R R R
  26483.  
  26484. SCFRDR2 is a 16-stage FIFO register that stores received serial data.
  26485.  
  26486. When the SCIF has received one byte of serial data, it transfers the received data from SCRSR2 to
  26487. SCFRDR2 where it is stored, and completes the receive operation. SCRSR2 is then enabled for
  26488. reception, and consecutive receive operations can be performed until the receive FIFO register is
  26489. full (16 data bytes).
  26490.  
  26491. SCFRDR2 is a read-only register, and cannot be written to by the CPU.
  26492.  
  26493. If a read is performed when there is no receive data in the receive FIFO register, an undefined value
  26494. will be returned. When the receive FIFO register is full of receive data, subsequent serial data is
  26495. lost.
  26496.  
  26497. The contents of SCFRDR2 are undefined after a power-on reset or manual reset.
  26498.  
  26499. 1 6 . 2 . 3 Transmit Shift Register (SCTSR2)
  26500.  
  26501. Bit: 7 6 5 4 3 2 1 0
  26502.  
  26503. R/W: — — — — — — — —
  26504.  
  26505. SCTSR2 is the register used to transmit serial data.
  26506.  
  26507. To perform serial data transmission, the SCIF first transfers transmit data from SCFTDR2 to
  26508. SCTSR2, then sends the data to the TxD2 pin starting with the LSB (bit 0).
  26509.  
  26510. When transmission of one byte is completed, the next transmit data is transferred from SCFTDR2
  26511. to SCTSR2, and transmission started, automatically.
  26512.  
  26513. SCTSR2 cannot be directly read or written to by the CPU.
  26514.  
  26515. 530
  26516.  
  26517. ----------------------- Page 547-----------------------
  26518.  
  26519. 1 6 . 2 . 4 Transmit FIFO Data Register (SCFTDR2)
  26520.  
  26521. Bit: 7 6 5 4 3 2 1 0
  26522.  
  26523. R/W: W W W W W W W W
  26524.  
  26525. SCFTDR2 is a 16-stage FIFO register that stores data for serial transmission.
  26526.  
  26527. If SCTSR2 is empty when transmit data has been written to SCFTDR2, the SCIF transfers the
  26528. transmit data written in SCFTDR2 to SCTSR2 and starts serial transmission.
  26529.  
  26530. SCFTDR2 is a write-only register, and cannot be read by the CPU.
  26531.  
  26532. The next data cannot be written when SCFTDR2 is filled with 16 bytes of transmit data. Data
  26533. written in this case is ignored.
  26534.  
  26535. The contents of SCFTDR2 are undefined after a power-on reset or manual reset.
  26536.  
  26537. 1 6 . 2 . 5 Serial Mode Register (SCSMR2)
  26538.  
  26539. Bit: 15 14 13 12 11 10 9 8
  26540.  
  26541. — — — — — — — —
  26542.  
  26543. Initial value: 0 0 0 0 0 0 0 0
  26544.  
  26545. R/W: R R R R R R R R
  26546.  
  26547. Bit: 7 6 5 4 3 2 1 0
  26548.  
  26549. — CHR PE O/E STOP — CKS1 CKS0
  26550.  
  26551. Initial value: 0 0 0 0 0 0 0 0
  26552.  
  26553. R/W: R R/W R/W R/W R/W R R/W R/W
  26554.  
  26555. SCSMR2 is a 16-bit register used to set the SCIF’s serial transfer format and select the baud rate
  26556. generator clock source.
  26557.  
  26558. SCSMR2 can be read or written to by the CPU at all times.
  26559.  
  26560. SCSMR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  26561. standby mode or in the module standby state.
  26562.  
  26563. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  26564.  
  26565. 531
  26566.  
  26567. ----------------------- Page 548-----------------------
  26568.  
  26569. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the asynchronous mode data length.
  26570.  
  26571. Bit 6: CHR Description
  26572.  
  26573. 0 8-bit data (Initial value)
  26574.  
  26575. 1 7-bit data*
  26576.  
  26577. Note: * When 7-bit data is selected, the MSB (bit 7) of SCFTDR2 is not transmitted.
  26578.  
  26579. Bit 5—Parity Enable (PE): Selects whether or not parity bit addition is performed in
  26580. transmission, and parity bit checking in reception.
  26581.  
  26582. Bit 5: PE Description
  26583.  
  26584. 0 Parity bit addition and checking disabled (Initial value)
  26585.  
  26586. 1 Parity bit addition and checking enabled*
  26587.  
  26588. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/E bit is added to
  26589. transmit data before transmission. In reception, the parity bit is checked for the parity
  26590. (even or odd) specified by the O/E bit.
  26591.  
  26592. Bit 4—Parity Mode (O/E ): Selects either even or odd parity for use in parity addition and
  26593. checking. The O/E bit setting is only valid when the PE bit is set to 1, enabling parity bit
  26594. addition and checking. The O/E bit setting is invalid when parity addition and checking is disabled.
  26595.  
  26596. Bit 4: O/E Description
  26597. 0 Even parity*1 (Initial value)
  26598.  
  26599. 1 Odd parity*2
  26600.  
  26601. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the total
  26602. number of 1-bits in the transmit character plus the parity bit is even. In reception, a
  26603. check is performed to see if the total number of 1-bits in the receive character plus the
  26604. parity bit is even.
  26605. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  26606. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  26607. check is performed to see if the total number of 1-bits in the receive character plus the
  26608. parity bit is odd.
  26609.  
  26610. 532
  26611.  
  26612. ----------------------- Page 549-----------------------
  26613.  
  26614. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length.
  26615.  
  26616. Bit 3: STOP Description
  26617. 0 1 stop bit*1 (Initial value)
  26618.  
  26619. 1 2 stop bits*2
  26620.  
  26621. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  26622. before it is sent.
  26623. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  26624. before it is sent.
  26625.  
  26626. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  26627. 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
  26628. character.
  26629.  
  26630. Bit 2—Reserved: This bit is always read as 0, and should only be written with 0.
  26631.  
  26632. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source
  26633. for the on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and
  26634. Pφ/64, according to the setting of bits CKS1 and CKS0.
  26635.  
  26636. For the relation between the clock source, the bit rate register setting, and the baud rate, see section
  26637. 16.2.8, Bit Rate Register (SCBRR2).
  26638.  
  26639. Bit 1: CKS1 Bit 0: CKS0 Description
  26640.  
  26641. 0 0 Pφ clock (Initial value)
  26642.  
  26643. 1 Pφ/4 clock
  26644.  
  26645. 1 0 Pφ/16 clock
  26646.  
  26647. 1 Pφ/64 clock
  26648.  
  26649. Note: Pφ: Peripheral clock
  26650.  
  26651. 1 6 . 2 . 6 Serial Control Register (SCSCR2)
  26652.  
  26653. Bit: 15 14 13 12 11 10 9 8
  26654.  
  26655. — — — — — — — —
  26656.  
  26657. Initial value: 0 0 0 0 0 0 0 0
  26658.  
  26659. R/W: R R R R R R R R
  26660.  
  26661. Bit: 7 6 5 4 3 2 1 0
  26662.  
  26663. TIE RIE TE RE REIE — CKE1 —
  26664.  
  26665. Initial value: 0 0 0 0 0 0 0 0
  26666.  
  26667. R/W: R/W R/W R/W R/W R/W R R/W R
  26668.  
  26669. 533
  26670.  
  26671. ----------------------- Page 550-----------------------
  26672.  
  26673. The SCSCR2 register performs enabling or disabling of SCIF transfer operations, and interrupt
  26674. requests, and selection of the serial clock source.
  26675.  
  26676. SCSCR2 can be read or written to by the CPU at all times.
  26677.  
  26678. SCSCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  26679. standby mode or in the module standby state.
  26680.  
  26681. Bits 15 to 8, 2, and 0—Reserved: These bits are always read as 0, and should only be
  26682. written with 0.
  26683.  
  26684. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-FIFO-data-empty
  26685. interrupt (TXI) request generation when serial transmit data is transferred from SCFTDR2 to
  26686. SCTSR2, the number of data bytes in the transmit FIFO register falls to or below the transmit
  26687. trigger set number, and the TDFE flag in the serial status register (SCFSR2) is set to 1.
  26688.  
  26689. Bit 7: TIE Description
  26690.  
  26691. 0 Transmit-FIFO-data-empty interrupt (TXI) request disabled* (Initial value)
  26692.  
  26693. 1 Transmit-FIFO-data-empty interrupt (TXI) request enabled
  26694.  
  26695. Note: * TXI interrupt requests can be cleared by writing transmit data exceeding the transmit trigger
  26696. set number to SCFTDR2, reading 1 from the TDFE flag, then clearing it to 0, or by clearing
  26697. the TIE bit to 0.
  26698.  
  26699. Bit 6—Receive Interrupt Enable (RIE): Enables or disables generation of a receive-data-
  26700. full interrupt (RXI) request when the RDF flag or DR flag in SCFSR2 is set to 1, a receive-error
  26701. interrupt (ERI) request when the ER flag in SCFSR2 is set to 1, and a break interrupt (BRI)
  26702. request when the BRK flag in SCFSR2 or the ORER flag in SCLSR2 is set to 1.
  26703.  
  26704. Bit 6: RIE Description
  26705.  
  26706. 0 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  26707. request, and break interrupt (BRI) request disabled* (Initial value)
  26708.  
  26709. 1 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  26710. request, and break interrupt (BRI) request enabled
  26711.  
  26712. Note: * An RXI interrupt request can be cleared by reading 1 from the RDF or DR flag, then clearing
  26713. the flag to 0, or by clearing the RIE bit to 0. ERI and BRI interrupt requests can be cleared
  26714. by reading 1 from the ER, BRK, or ORER flag, then clearing the flag to 0, or by clearing the
  26715. RIE and REIE bits to 0.
  26716.  
  26717. 534
  26718.  
  26719. ----------------------- Page 551-----------------------
  26720.  
  26721. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the
  26722. SCIF.
  26723.  
  26724. Bit 5: TE Description
  26725.  
  26726. 0 Transmission disabled (Initial value)
  26727.  
  26728. 1 Transmission enabled*
  26729.  
  26730. Note: * Serial transmission is started when transmit data is written to SCFTDR2 in this state.
  26731. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be made,
  26732. the transmission format decided, and the transmit FIFO reset, before the TE bit is set to 1.
  26733.  
  26734. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCIF.
  26735.  
  26736. Bit 4: RE Description
  26737. 0 Reception disabled*1 (Initial value)
  26738.  
  26739. 1 Reception enabled*2
  26740.  
  26741. Notes: 1. Clearing the RE bit to 0 does not affect the DR, ER, BRK, RDF, FER, PER, and ORER
  26742. flags, which retain their states.
  26743. 2. Serial transmission is started when a start bit is detected in this state.
  26744. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be
  26745. made, the reception format decided, and the receive FIFO reset, before the RE bit is set
  26746. to 1.
  26747.  
  26748. Bit 3—Receive Error Interrupt Enable (REIE): Enables or disables generation of
  26749. receive-error interrupt (ERI) and break interrupt (BRI) requests. The REIE bit setting is valid only
  26750. when the RIE bit is 0.
  26751.  
  26752. Bit 3: REIE Description
  26753.  
  26754. 0 Receive-error interrupt (ERI) and break interrupt (BRI) requests disabled*
  26755. (Initial value)
  26756.  
  26757. 1 Receive-error interrupt (ERI) and break interrupt (BRI) requests enabled
  26758.  
  26759. Note: * Receive-error interrupt (ERI) and break interrupt (BRI) requests can be cleared by reading 1
  26760. from the ER, BRK, or ORER flag, then clearing the flag to 0, or by clearing the RIE and REIE
  26761. bits to 0. When REIE is set to 1, ERI and BRI interrupt requests will be generated even if
  26762. RIE is cleared to 0. In DMAC transfer, this setting is made if the interrupt controller is to be
  26763. notified of ERI and BRI interrupt requests.
  26764.  
  26765. 535
  26766.  
  26767. ----------------------- Page 552-----------------------
  26768.  
  26769. Bit 1—Clock Enable 1 (CKE1): Selects the SCIF clock source. The CKE1 bit must be set
  26770. before determining the SCIF’s operating mode with SCSMR2.
  26771.  
  26772. Bit 1: CKE1 Description
  26773. 0 Internal clock/SCK2 pin functions as input pin (input signal ignored)*1
  26774.  
  26775. 1 External clock/SCK2 pin functions as clock input*2
  26776.  
  26777. Notes: 1. Initial value
  26778. 2. Inputs a clock with a frequency 16 times the bit rate.
  26779.  
  26780. 1 6 . 2 . 7 Serial Status Register (SCFSR2)
  26781.  
  26782. Bit: 15 14 13 12 11 10 9 8
  26783.  
  26784. PER3 PER2 PER1 PER0 FER3 FER2 FER1 FER0
  26785.  
  26786. Initial value: 0 0 0 0 0 0 0 0
  26787.  
  26788. R/W: R R R R R R R R
  26789.  
  26790. Bit: 7 6 5 4 3 2 1 0
  26791.  
  26792. ER TEND TDFE BRK FER PER RDF DR
  26793.  
  26794. Initial value: 0 1 1 0 0 0 0 0
  26795.  
  26796. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R R R/(W)* R/(W)*
  26797.  
  26798. Note: * Only 0 can be written, to clear the flag.
  26799.  
  26800. SCFSR2 is a 16-bit register. The lower 8 bits consist of status flags that indicate the operating
  26801. status of the SCIF, and the upper 8 bits indicate the number of receive errors in the data in the
  26802. receive FIFO register.
  26803.  
  26804. SCFSR2 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  26805. ER, TEND, TDFE, BRK, RDF, and DR. Also note that in order to clear these flags they must be
  26806. read as 1 beforehand. The FER flag and PER flag are read-only flags and cannot be modified.
  26807.  
  26808. SCFSR2 is initialized to H'0060 by a power-on reset or manual reset. It is not initialized in
  26809. standby mode or in the module standby state.
  26810.  
  26811. Bits 15 to 12—Number of Parity Errors (PER3–PER0): These bits indicate the
  26812. number of data bytes in which a parity error occurred in the receive data stored in SCFRDR2.
  26813.  
  26814. After the ER bit in SCFSR2 is set, the value indicated by bits 15 to 12 is the number of data
  26815. bytes in which a parity error occurred.
  26816.  
  26817. If all 16 bytes of receive data in SCFRDR2 have parity errors, the value indicated by bits PER3 to
  26818. PER0 will be 0.
  26819.  
  26820. 536
  26821.  
  26822. ----------------------- Page 553-----------------------
  26823.  
  26824. Bits 11 to 8—Number of Framing Errors (FER3–FER0): These bits indicate the
  26825. number of data bytes in which a framing error occurred in the receive data stored in SCFRDR2.
  26826.  
  26827. After the ER bit in SCFSR2 is set, the value indicated by bits 11 to 8 is the number of data bytes
  26828. in which a framing error occurred.
  26829.  
  26830. If all 16 bytes of receive data in SCFRDR2 have framing errors, the value indicated by bits FER3
  26831. to FER0 will be 0.
  26832.  
  26833. Bit 7—Receive Error (ER): Indicates that a framing error or parity error occurred during
  26834. reception.*1
  26835.  
  26836. Bit 7: ER Description
  26837.  
  26838. 0 No framing error or parity error occurred during reception (Initial value)
  26839.  
  26840. [Clearing conditions]
  26841.  
  26842. Power-on reset or manual reset
  26843.  
  26844. When 0 is written to ER after reading ER = 1
  26845.  
  26846. 1 A framing error or parity error occurred during reception
  26847.  
  26848. [Setting conditions]
  26849.  
  26850. When the SCIF checks whether the stop bit at the end of the receive data is
  26851. 2
  26852. 1 when reception ends, and the stop bit is 0*
  26853.  
  26854. When, in reception, the number of 1-bits in the receive data plus the parity
  26855. bit does not match the parity setting (even or odd) specified by the O/E bit in
  26856. SCSMR2
  26857.  
  26858. Notes: 1. The ER flag is not affected and retains its previous state when the RE bit in SCSCR2 is
  26859. cleared to 0. When a receive error occurs, the receive data is still transferred to
  26860. SCFRDR2, and reception continues.
  26861. The FER and PER bits in SCFSR2 can be used to determine whether there is a receive
  26862. error in the data read from SCFRDR2.
  26863. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop bit
  26864. is not checked.
  26865.  
  26866. 537
  26867.  
  26868. ----------------------- Page 554-----------------------
  26869.  
  26870. Bit 6—Transmit End (TEND): Indicates that there is no valid data in SCFTDR2 when the
  26871. last bit of the transmit character is sent, and transmission has been ended.
  26872.  
  26873. Bit 6: TEND Description
  26874.  
  26875. 0 Transmission is in progress
  26876.  
  26877. [Clearing conditions]
  26878.  
  26879. When transmit data is written to SCFTDR2, and 0 is written to TEND after
  26880. reading TEND = 1
  26881.  
  26882. When data is written to SCFTDR2 by the DMAC
  26883.  
  26884. 1 Transmission has been ended (Initial value)
  26885.  
  26886. [Setting conditions]
  26887.  
  26888. Power-on reset or manual reset
  26889.  
  26890. When the TE bit in SCSCR2 is 0
  26891.  
  26892. When there is no transmit data in SCFTDR2 on transmission of the last bit of
  26893. a 1-byte serial transmit character
  26894.  
  26895. Bit 5—Transmit FIFO Data Empty (TDFE): Indicates that data has been transferred from
  26896. SCFTDR2 to SCTSR2, the number of data bytes in SCFTDR2 has fallen to or below the
  26897. transmit trigger data number set by bits TTRG1 and TTRG0 in the FIFO control register
  26898. (SCFCR2), and new transmit data can be written to SCFTDR2.
  26899.  
  26900. Bit 5: TDFE Description
  26901.  
  26902. 0 A number of transmit data bytes exceeding the transmit trigger set number
  26903. have been written to SCFTDR2
  26904.  
  26905. [Clearing conditions]
  26906.  
  26907. When transmit data exceeding the transmit trigger set number is written to
  26908. SCFTDR2, and 0 is written to TDFE after reading TDFE = 1
  26909.  
  26910. When transmit data exceeding the transmit trigger set number is written to
  26911. SCFTDR2 by the DMAC
  26912.  
  26913. 1 The number of transmit data bytes in SCFTDR2 does not exceed the
  26914. transmit trigger set number (Initial value)
  26915.  
  26916. [Setting conditions]
  26917.  
  26918. Power-on reset or manual reset
  26919.  
  26920. When the number of SCFTDR2 transmit data bytes falls to or below the
  26921. transmit trigger set number as the result of a transmit operation*
  26922.  
  26923. Note: * As SCFTDR2 is a 16-byte FIFO register, the maximum number of bytes that can be written
  26924. when TDFE = 1 is 16 - (transmit trigger set number). Data written in excess of this will be
  26925. ignored.
  26926. The number of data bytes in SCFTDR2 is indicated by the upper bits of SCFDR2.
  26927.  
  26928. Bit 4—Break Detect (BRK): Indicates that a receive data break signal has been detected.
  26929.  
  26930. 538
  26931.  
  26932. ----------------------- Page 555-----------------------
  26933.  
  26934. Bit 4: BRK Description
  26935.  
  26936. 0 A break signal has not been received (Initial value)
  26937.  
  26938. [Clearing conditions]
  26939.  
  26940. Power-on reset or manual reset
  26941.  
  26942. When 0 is written to BRK after reading BRK = 1
  26943.  
  26944. 1 A break signal has been received*
  26945.  
  26946. [Setting condition]
  26947.  
  26948. When data with a framing error is received, followed by the space “0” level
  26949. (low level ) for at least one frame length
  26950.  
  26951. Note: * When a break is detected, the receive data (H'00) following detection is not transferred to
  26952. SCFRDR2. When the break ends and the receive signal returns to mark “1”, receive data
  26953. transfer is resumed.
  26954.  
  26955. Bit 3—Framing Error (FER): Indicates a framing error in the data read from SCFRDR2.
  26956.  
  26957. Bit 3: FER Description
  26958.  
  26959. 0 There is no framing error in the receive data read from SCFRDR2
  26960. (Initial value)
  26961.  
  26962. [Clearing conditions]
  26963.  
  26964. Power-on reset or manual reset
  26965.  
  26966. When there is no framing error in SCFRDR2 read data
  26967.  
  26968. 1 There is a framing error in the receive data read from SCFRDR2
  26969.  
  26970. [Setting condition]
  26971.  
  26972. When there is a framing error in SCFRDR2 read data
  26973.  
  26974. Bit 2—Parity Error (PER): Indicates a parity error in the data read from SCFRDR2.
  26975.  
  26976. 539
  26977.  
  26978. ----------------------- Page 556-----------------------
  26979.  
  26980. Bit 2: PER Description
  26981.  
  26982. 0 There is no parity error in the receive data read from SCFRDR2
  26983. (Initial value)
  26984.  
  26985. [Clearing conditions]
  26986.  
  26987. Power-on reset or manual reset
  26988.  
  26989. When there is no parity error in SCFRDR2 read data
  26990.  
  26991. 1 There is a parity error in the receive data read from SCFRDR2
  26992.  
  26993. [Setting condition]
  26994.  
  26995. When there is a parity error in SCFRDR2 read data
  26996.  
  26997. Bit 1—Receive FIFO Data Full (RDF): Indicates that the received data has been
  26998. transferred from SCRSR2 to SCFRDR2, and the number of receive data bytes in SCFRDR2 is
  26999. equal to or greater than the receive trigger number set by bits RTRG1 and RTRG0 in the FIFO
  27000. control register (SCFCR2).
  27001.  
  27002. Bit 1: RDF Description
  27003.  
  27004. 0 The number of receive data bytes in SCFRDR2 is less than the receive
  27005. trigger set number (Initial value)
  27006.  
  27007. [Clearing conditions]
  27008.  
  27009. Power-on reset or manual reset
  27010.  
  27011. When SCFRDR2 is read until the number of receive data bytes in SCFRDR2
  27012. falls below the receive trigger set number, and 0 is written to RDF after
  27013. reading RDF = 1
  27014.  
  27015. When SCFRDR2 is read by the DMAC until the number of receive data bytes
  27016. in SCFRDR2 falls below the receive trigger set number
  27017.  
  27018. 1 The number of receive data bytes in SCFRDR2 is equal to or greater than the
  27019. receive trigger set number
  27020.  
  27021. [Setting condition]
  27022.  
  27023. When SCFRDR2 contains at least the receive trigger set number of receive
  27024. data bytes*
  27025.  
  27026. Note: * SCFRDR2 is a 16-byte FIFO register. When RDF = 1, at least the receive trigger set number
  27027. of data bytes can be read. If all the data in SCFRDR2 is read and another read is performed,
  27028. the data value will be undefined. The number of receive data bytes in SCFRDR2 is indicated
  27029. by the lower bits of SCFDR2.
  27030.  
  27031. 540
  27032.  
  27033. ----------------------- Page 557-----------------------
  27034.  
  27035. Bit 0—Receive Data Ready (DR): Indicates that there are fewer than the receive trigger set
  27036. number of data bytes in SCFRDR2, and no further data has arrived for at least 15 etu after the stop
  27037. bit of the last data received.
  27038.  
  27039. Bit 0: DR Description
  27040.  
  27041. 0 Reception is in progress or has ended normally and there is no receive data
  27042. left in SCFRDR2 (Initial value)
  27043.  
  27044. [Clearing conditions]
  27045.  
  27046. Power-on reset or manual reset
  27047.  
  27048. When all the receive data in SCFRDR2 has been read, and 0 is written to DR
  27049. after reading DR = 1
  27050.  
  27051. When all the receive data in SCFRDR2 has been read by the DMAC
  27052.  
  27053. 1 No further receive data has arrived
  27054.  
  27055. [Setting condition]
  27056.  
  27057. When SCFRDR2 contains fewer than the receive trigger set number of
  27058. receive data bytes, and no further data has arrived for at least 15 etu after
  27059. the stop bit of the last data received*
  27060.  
  27061. Note: * Equivalent to 1.5 frames with an 8-bit, 1-stop-bit format.
  27062. etu: Elementary time unit (time for transfer of 1 bit)
  27063.  
  27064. 541
  27065.  
  27066. ----------------------- Page 558-----------------------
  27067.  
  27068. 1 6 . 2 . 8 Bit Rate Register (SCBRR2)
  27069.  
  27070. Bit: 7 6 5 4 3 2 1 0
  27071.  
  27072. Initial value: 1 1 1 1 1 1 1 1
  27073.  
  27074. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27075.  
  27076. SCBRR2 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  27077. generator operating clock selected by bits CKS1 and CKS0 in SCSMR2.
  27078.  
  27079. SCBRR2 can be read or written to by the CPU at all times.
  27080.  
  27081. SCBRR2 is initialized to H'FF by a power-on reset or manual reset. It is not initialized in standby
  27082. mode or in the module standby state.
  27083.  
  27084. The SCBRR2 setting is found from the following equation.
  27085.  
  27086. Asynchronous mode:
  27087.  
  27088.  
  27089. P
  27090. N = φ × 106 – 1
  27091. 64 × 22n–1 × B
  27092.  
  27093. Where B: Bit rate (bits/s)
  27094. N: SCBRR2 setting for baud rate generator (0 ≤ N ≤ 255)
  27095. Pφ : Peripheral module operating frequency (MHz)
  27096. n: Baud rate generator input clock (n = 0 to 3)
  27097. (See the table below for the relation between n and the clock.)
  27098.  
  27099. SCSMR2 Setting
  27100.  
  27101. n Clock CKS1 CKS0
  27102.  
  27103. 0 Pφ 0 0
  27104.  
  27105. 1 Pφ/4 0 1
  27106.  
  27107. 2 Pφ/16 1 0
  27108.  
  27109. 3 Pφ/64 1 1
  27110.  
  27111. The bit rate error in asynchronous mode is found from the following equation:
  27112.  
  27113. 6
  27114. P × 10
  27115. φ
  27116. Error (%) = 2n–1 – 1 × 100
  27117. (N + 1) × B × 64 × 2
  27118.  
  27119. 542
  27120.  
  27121. ----------------------- Page 559-----------------------
  27122.  
  27123. 1 6 . 2 . 9 FIFO Control Register (SCFCR2)
  27124.  
  27125. Bit: 15 14 13 12 11 10 9 8
  27126.  
  27127. — — — — — — — —
  27128.  
  27129. Initial value: 0 0 0 0 0 0 0 0
  27130.  
  27131. R/W: R R R R R R R R
  27132.  
  27133. Bit: 7 6 5 4 3 2 1 0
  27134.  
  27135. RTRG1 RTRG0 TTRG1 TTRG0 MCE TFRST RFRST LOOP
  27136.  
  27137. Initial value: 0 0 0 0 0 0 0 0
  27138.  
  27139. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27140.  
  27141. SCFCR2 performs data count resetting and trigger data number setting for the transmit and receive
  27142. FIFO registers, and also contains a loopback test enable bit.
  27143.  
  27144. SCFCR2 can be read or written to by the CPU at all times.
  27145.  
  27146. SCFCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  27147. standby mode or in the module standby state.
  27148.  
  27149. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  27150.  
  27151. Bits 7 and 6—Receive FIFO Data Number Trigger (RTRG1, RTRG0): These bits
  27152. are used to set the number of receive data bytes that sets the receive data full (RDF) flag in the
  27153. serial status register (SCFSR2).
  27154.  
  27155. 543
  27156.  
  27157. ----------------------- Page 560-----------------------
  27158.  
  27159. The RDF flag is set when the number of receive data bytes in SCFRDR2 is equal to or greater
  27160. than the trigger set number shown in the following table.
  27161.  
  27162. Bit 7: RTRG1 Bit 6: RTRG0 Receive Trigger Number
  27163.  
  27164. 0 0 1*
  27165.  
  27166. 1 4
  27167.  
  27168. 1 0 8
  27169.  
  27170. 1 14
  27171.  
  27172. Note: * Initial value
  27173.  
  27174. Bits 5 and 4—Transmit FIFO Data Number Trigger (TTRG1, TTRG0): These bits
  27175. are used to set the number of remaining transmit data bytes that sets the transmit FIFO data
  27176. register empty (TDFE) flag in the serial status register (SCFSR2). The TDFE flag is set when the
  27177. number of transmit data bytes in SCFTDR2 is equal to or less than the trigger set number shown
  27178. in the following table.
  27179.  
  27180. Bit 5: TTRG1 Bit 4: TTRG0 Transmit Trigger Number
  27181.  
  27182. 0 0 8 (8) *
  27183.  
  27184. 1 4 (12)
  27185.  
  27186. 1 0 2 (14)
  27187.  
  27188. 1 1 (15)
  27189.  
  27190. Note: * Initial value. Figures in parentheses are the number of empty bytes in SCFTDR2 when the
  27191. flag is set.
  27192.  
  27193. Bit 3—Modem Control Enable (MCE): Enables the CTS2 and RTS2 modem control
  27194. signals.
  27195.  
  27196. Bit 3: MCE Description
  27197.  
  27198. 0 Modem signals disabled* (Initial value)
  27199.  
  27200. 1 Modem signals enabled
  27201.  
  27202. Note: * CTS2 is fixed at active-0 regardless of the input value, and RTS2 output is also fixed at 0.
  27203.  
  27204. 544
  27205.  
  27206. ----------------------- Page 561-----------------------
  27207.  
  27208. Bit 2—Transmit FIFO Data Register Reset (TFRST): Invalidates the transmit data in
  27209. the transmit FIFO data register and resets it to the empty state.
  27210.  
  27211. Bit 2: TFRST Description
  27212.  
  27213. 0 Reset operation disabled* (Initial value)
  27214.  
  27215. 1 Reset operation enabled
  27216.  
  27217. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  27218.  
  27219. Bit 1—Receive FIFO Data Register Reset (RFRST): Invalidates the receive data in the
  27220. receive FIFO data register and resets it to the empty state.
  27221.  
  27222. Bit 1: RFRST Description
  27223.  
  27224. 0 Reset operation disabled* (Initial value)
  27225.  
  27226. 1 Reset operation enabled
  27227.  
  27228. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  27229.  
  27230. Bit 0—Loopback Test (LOOP): Internally connects the transmit output pin (TxD2) and
  27231. receive input pin (RxD2), and the RTS2 pin and CTS2 pin, enabling loopback testing.
  27232.  
  27233. Bit 0: LOOP Description
  27234.  
  27235. 0 Loopback test disabled (Initial value)
  27236.  
  27237. 1 Loopback test enabled
  27238.  
  27239. 545
  27240.  
  27241. ----------------------- Page 562-----------------------
  27242.  
  27243. 1 6 . 2 . 1 0 FIFO Data Count Register (SCFDR2)
  27244.  
  27245. SCFDR2 is a 16-bit register that indicates the number of data bytes stored in SCFTDR2 and
  27246. SCFRDR2.
  27247.  
  27248. The upper 8 bits show the number of transmit data bytes in SCFTDR2, and the lower 8 bits show
  27249. the number of receive data bytes in SCFRDR2.
  27250.  
  27251. SCFDR2 can be read by the CPU at all times.
  27252.  
  27253. Bit: 15 14 13 12 11 10 9 8
  27254.  
  27255. — — — T4 T3 T2 T1 T0
  27256.  
  27257. Initial value: 0 0 0 0 0 0 0 0
  27258.  
  27259. R/W: R R R R R R R R
  27260.  
  27261. These bits show the number of untransmitted data bytes in SCFTDR2. A value of H'00 indicates
  27262. that there is no transmit data, and a value of H'10 indicates that SCFTDR2 is full of transmit data.
  27263.  
  27264. Bit: 7 6 5 4 3 2 1 0
  27265.  
  27266. — — — R4 R3 R2 R1 R0
  27267.  
  27268. Initial value: 0 0 0 0 0 0 0 0
  27269.  
  27270. R/W: R R R R R R R R
  27271.  
  27272. These bits show the number of receive data bytes in SCFRDR2. A value of H'00 indicates that
  27273. there is no receive data, and a value of H'10 indicates that SCFRDR2 is full of receive data.
  27274.  
  27275. 1 6 . 2 . 1 1 Serial Port Register (SCSPTR2)
  27276.  
  27277. Bit: 15 14 13 12 11 10 9 8
  27278.  
  27279. — — — — — — — —
  27280.  
  27281. Initial value: 0 0 0 0 0 0 0 0
  27282.  
  27283. R/W: R R R R R R R R
  27284.  
  27285. Bit: 7 6 5 4 3 2 1 0
  27286.  
  27287. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  27288.  
  27289. Initial value: 0 — 0 — 0 0 0 —
  27290.  
  27291. R/W: R/W R/W R/W R/W R R R/W R/W
  27292.  
  27293. SCSPTR2 is a 16-bit readable/writable register that controls input/output and data for the port pins
  27294. multiplexed with the serial communication interface (SCIF) pins. Input data can be read from the
  27295. 546
  27296.  
  27297. ----------------------- Page 563-----------------------
  27298.  
  27299. RxD2 pin, output data written to the TxD2 pin, and breaks in serial transmission/reception
  27300. controlled, by means of bits 1 and 0. Data can be read from, and output data written to, the CTS2
  27301. pin by means of bits 5 and 4. Data can be read from, and output data written to, the RTS2 pin by
  27302. means of bits 6 and 7.
  27303.  
  27304. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6, 4,
  27305. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0 is
  27306. undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  27307.  
  27308. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  27309.  
  27310. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies the serial port RTS2 pin
  27311. input/output condition. When the RTS2 pin is actually set as a port output pin and outputs the
  27312. value set by the RTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  27313.  
  27314. Bit 7: RTSIO Description
  27315.  
  27316. 0 RTSDT bit value is not output to RTS2 pin (Initial value)
  27317.  
  27318. 1 RTSDT bit value is output to RTS2 pin
  27319.  
  27320. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port RTS2 pin
  27321. input/output data. Input or output is specified by the RTSIO bit (see the description of bit 7,
  27322. RTSIO, for details). In output mode, the RTSDT bit value is output to the RTS2 pin. The RTS2
  27323. pin value is read from the RTSDT bit regardless of the value of the RTSIO bit. The initial value
  27324. of this bit after a power-on reset or manual reset is undefined.
  27325.  
  27326. Bit 6: RTSDT Description
  27327.  
  27328. 0 Input/output data is low-level
  27329.  
  27330. 1 Input/output data is high-level
  27331.  
  27332. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies the serial port CTS2 pin
  27333. input/output condition. When the CTS2 pin is actually set as a port output pin and outputs the
  27334. value set by the CTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  27335.  
  27336. Bit 5: CTSIO Description
  27337.  
  27338. 0 CTSDT bit value is not output to CTS2 pin (Initial value)
  27339.  
  27340. 1 CTSDT bit value is output to CTS2 pin
  27341.  
  27342. 547
  27343.  
  27344. ----------------------- Page 564-----------------------
  27345.  
  27346. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port CTS2 pin
  27347. input/output data. Input or output is specified by the CTSIO bit (see the description of bit 5,
  27348. CTSIO, for details). In output mode, the CTSDT bit value is output to the CTS2 pin. The CTS2
  27349. pin value is read from the CTSDT bit regardless of the value of the CTSIO bit. The initial value
  27350. of this bit after a power-on reset or manual reset is undefined.
  27351.  
  27352. Bit 4: CTSDT Description
  27353.  
  27354. 0 Input/output data is low-level
  27355.  
  27356. 1 Input/output data is high-level
  27357.  
  27358. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  27359.  
  27360. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output
  27361. condition. When the TxD2 pin is actually set as a port output pin and outputs the value set by the
  27362. SPB2DT bit, the TE bit in SCSCR2 should be cleared to 0.
  27363.  
  27364. Bit 1: SPB2IO Description
  27365.  
  27366. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  27367.  
  27368. 1 SPB2DT bit value is output to the TxD2 pin
  27369.  
  27370. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data
  27371. and TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  27372. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the value
  27373. of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the SPB2DT bit
  27374. regardless of the value of the SPB2IO bit. The initial value of this bit after a power-on reset or
  27375. manual reset is undefined.
  27376.  
  27377. Bit 0: SPB2DT Description
  27378.  
  27379. 0 Input/output data is low-level
  27380.  
  27381. 1 Input/output data is high-level
  27382.  
  27383. SCIF I/O port block diagrams are shown in figures 16.2 to 16.5.
  27384.  
  27385. 548
  27386.  
  27387. ----------------------- Page 565-----------------------
  27388.  
  27389. Reset
  27390.  
  27391. R D7
  27392. Q D
  27393. RTSIO
  27394. C Internal data bus
  27395.  
  27396. SPTRW
  27397.  
  27398. Reset
  27399. MD8/RTS2
  27400. R D6
  27401. Q D
  27402. RTSDT
  27403. C SCIF
  27404.  
  27405. Modem control
  27406. SPTRW
  27407. enable signal*
  27408.  
  27409. Mode setting RTS2 signal
  27410. register
  27411.  
  27412. SPTRR
  27413.  
  27414. SPTRW: Write to SPTR
  27415. SPTRR: Read SPTR
  27416.  
  27417. Note: * The RTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  27418.  
  27419. Figure 16.2 MD8/RTS2 Pin
  27420.  
  27421. 549
  27422.  
  27423. ----------------------- Page 566-----------------------
  27424.  
  27425. Reset
  27426. R D5
  27427.  
  27428. Q D
  27429. CTSIO
  27430. C Internal data bus
  27431.  
  27432. SPTRW
  27433.  
  27434. Reset
  27435. CTS2
  27436. R
  27437. D4
  27438. Q D
  27439. CTSDT
  27440. C SCIF
  27441.  
  27442. SPTRW
  27443.  
  27444. CTS2 signal
  27445.  
  27446. Modem control enable signal*
  27447.  
  27448. SPTRR
  27449.  
  27450. SPTRW: Write to SPTR
  27451. SPTRR: Read SPTR
  27452.  
  27453. Note: * The CTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  27454.  
  27455.  
  27456. Figure 16.3 CTS2 Pin
  27457.  
  27458. 550
  27459.  
  27460. ----------------------- Page 567-----------------------
  27461.  
  27462. Reset
  27463.  
  27464. R
  27465. D1
  27466. Q D
  27467. SPB2IO
  27468. C Internal data bus
  27469.  
  27470. SPTRW
  27471.  
  27472. Reset
  27473. MD1/TxD2
  27474. R D0
  27475. Q D
  27476. SPB2DT
  27477. C SCIF
  27478.  
  27479. Transmit enable
  27480. SPTRW
  27481. signal
  27482.  
  27483. Mode setting
  27484. register Serial transmit data
  27485.  
  27486. SPTRW: Write to SPTR
  27487.  
  27488. Figure 16.4 MD1/TxD2 Pin
  27489.  
  27490. SCIF
  27491. MD2/RxD2
  27492.  
  27493. Serial receive
  27494. Mode setting data
  27495. register
  27496.  
  27497. D0
  27498.  
  27499. Internal data bus
  27500.  
  27501.  
  27502. SPTRR
  27503.  
  27504. SPTRR: Read SPTR
  27505.  
  27506. Figure 16.5 MD2/RxD2 Pin
  27507.  
  27508. 551
  27509.  
  27510. ----------------------- Page 568-----------------------
  27511.  
  27512. 1 6 . 2 . 1 2 Line Status Register (SCLSR2)
  27513.  
  27514. Bit: 15 14 13 12 11 10 9 8
  27515.  
  27516. — — — — — — — —
  27517.  
  27518. Initial value: 0 0 0 0 0 0 0 0
  27519.  
  27520. R/W: R R R R R R R R
  27521.  
  27522. Bit: 7 6 5 4 3 2 1 0
  27523.  
  27524. — — — — — — — ORER
  27525.  
  27526. Initial value: 0 0 0 0 0 0 0 0
  27527.  
  27528. R/W: R R R R R R R (R/W)*
  27529.  
  27530. Note: * Only 0 can be written, to clear the flag.
  27531.  
  27532. Bits 15 to 1—Reserved: These bits are always read as 0, and should only be written with 0.
  27533.  
  27534. Bit 0—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  27535. causing abnormal termination.
  27536.  
  27537. Bit 0: ORER Description
  27538. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  27539.  
  27540. [Clearing conditions]
  27541.  
  27542. Power-on reset or manual reset
  27543.  
  27544. When 0 is written to ORER after reading ORER = 1
  27545.  
  27546. 1 An overrun error occurred during reception*2
  27547.  
  27548. [Setting condition]
  27549.  
  27550. When the next serial reception is completed while the receive FIFO is full
  27551.  
  27552. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in SCSCR2
  27553. is cleared to 0.
  27554. 2. The receive data prior to the overrun error is retained in SCFRDR2, and the data
  27555. received subsequently is lost. Serial reception cannot be continued while the ORER
  27556. flag is set to 1.
  27557.  
  27558. 552
  27559.  
  27560. ----------------------- Page 569-----------------------
  27561.  
  27562. 1 6 . 3 Operation
  27563.  
  27564. 1 6 . 3 . 1 Overview
  27565.  
  27566. The SCIF can carry out serial communication in asynchronous mode, in which synchronization is
  27567. achieved character by character. See section 15.3.2, Operation in Asynchronous Mode, for details.
  27568.  
  27569. Sixteen-stage FIFO buffers are provided for both transmission and reception, reducing the CPU
  27570. overhead and enabling fast, continuous communication to be performed.RTS2 and CTS2 signals
  27571. are also provided as modem control signals.
  27572.  
  27573. The transmission format is selected using the serial mode register (SCSMR2), as shown in table
  27574. 16.3. The SCIF clock source is determined by the CKE1 bit in the serial control register
  27575. (SCSCR2), as shown in table 16.4.
  27576.  
  27577. • Data length: Choice of 7 or 8 bits
  27578.  
  27579. • Choice of parity addition and addition of 1 or 2 stop bits (the combination of these parameters
  27580. determines the transfer format and character length)
  27581.  
  27582. • Detection of framing errors, parity errors, receive-FIFO-data-full state, overrun errors, receive-
  27583. data-ready state, and breaks, during reception
  27584.  
  27585. • Indication of the number of data bytes stored in the transmit and receive FIFO registers
  27586.  
  27587. • Choice of internal or external clock as SCIF clock source
  27588.  
  27589. When internal clock is selected: The SCIF operates on the baud rate generator clock.
  27590.  
  27591. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  27592. input (the on-chip baud rate generator is not used).
  27593.  
  27594. Table 16.3SCSMR2 Settings for Serial Transfer Format Selection
  27595.  
  27596. SCSMR2 Settings SCIF Transfer Format
  27597.  
  27598. Bit 6: Bit 5: Bit 3: Data Multi- Parity Stop
  27599. CHR P E STOP Mode Length processor Bit Bit Bit
  27600. Length
  27601.  
  27602. 0 0 0 Asynchronous mode 8-bit data No No 1 bit
  27603.  
  27604. 1 2 bits
  27605.  
  27606. 1 0 Yes 1 bit
  27607.  
  27608. 1 2 bits
  27609.  
  27610. 1 0 0 7-bit data No 1 bit
  27611.  
  27612. 1 2 bits
  27613.  
  27614. 1 0 Yes 1 bit
  27615.  
  27616. 1 2 bits
  27617.  
  27618. 553
  27619.  
  27620. ----------------------- Page 570-----------------------
  27621.  
  27622. Table 16.4SCSCR2 Settings for SCIF Clock Source Selection
  27623.  
  27624. SCSCR2 SCIF Transmit/Receive Clock
  27625. Setting
  27626.  
  27627. Bit 1: CKE1 Mode Clock Source SCK2 Pin Function
  27628.  
  27629. 0 Asynchronous mode Internal SCIF does not use SCK2 pin
  27630.  
  27631. 1 External Inputs clock with frequency of 16
  27632. times the bit rate
  27633.  
  27634. 1 6 . 3 . 2 Serial Operation
  27635.  
  27636. Data Transfer Format
  27637.  
  27638. Table 16.5 shows the data transfer formats that can be used. Any of 8 transfer formats can be
  27639. selected according to the SCSMR2 settings.
  27640.  
  27641. 554
  27642.  
  27643. ----------------------- Page 571-----------------------
  27644.  
  27645. Table 16.5 Serial Transfer Formats
  27646.  
  27647. SCSMR2
  27648. Settings Serial Transfer Format and Frame Length
  27649.  
  27650. CHR PE STOP 1 2 3 4 5 6 7 8 9 10 11 12
  27651.  
  27652. 0 0 0 S 8-bit data STOP
  27653.  
  27654. 0 0 1 S 8-bit data STOP STOP
  27655.  
  27656. 0 1 0 S 8-bit data P STOP
  27657.  
  27658. 0 1 1 S 8-bit data P STOP STOP
  27659.  
  27660. 1 0 0 S 7-bit data STOP
  27661.  
  27662. 1 0 1 S 7-bit data STOP STOP
  27663.  
  27664. 1 1 0 S 7-bit data P STOP
  27665.  
  27666. 1 1 1 S 7-bit data P STOP STOP
  27667.  
  27668. S: Start bit
  27669. STOP: Stop bit
  27670. P: Parity bit
  27671.  
  27672. Clock
  27673.  
  27674. Either an internal clock generated by the on-chip baud rate generator or an external clock input at
  27675. the SCK2 pin can be selected as the SCIF’s serial clock, according to the setting of the CKE1 bit
  27676. in SCSCR2. For details of SCIF clock source selection, see table 16.4.
  27677.  
  27678. When an external clock is input at the SCK2 pin, the clock frequency should be 16 times the bit
  27679. rate used.
  27680.  
  27681. 555
  27682.  
  27683. ----------------------- Page 572-----------------------
  27684.  
  27685. Data Transfer Operations
  27686.  
  27687. SCIF Initialization: Before transmitting and receiving data, it is necessary to clear the TE and
  27688. RE bits in SCSCR2 to 0, then initialize the SCIF as described below.
  27689.  
  27690. When the transfer format, etc., is changed, the TE and RE bits must be cleared to 0 before making
  27691. the change using the following procedure. When the TE bit is cleared to 0, SCTSR2 is initialized.
  27692. Note that clearing the TE and RE bits to 0 does not change the contents of SCFSR2, SCFTDR2,
  27693. or SCFRDR2. The TE bit should be cleared to 0 after all transmit data has been sent and the
  27694. TEND flag in SCFSR2 has been set. TEND can also be cleared to 0 during transmission, but the
  27695. data being transmitted will go to the mark state after the clearance. Before setting TE again to start
  27696. transmission, the TFRST bit in SCFCR2 should first be set to 1 to reset SCFTDR2.
  27697.  
  27698. When an external clock is used the clock should not be stopped during operation, including
  27699. initialization, since operation will be unreliable in this case.
  27700.  
  27701. Figure 16.6 shows a sample SCIF initialization flowchart.
  27702.  
  27703. 556
  27704.  
  27705. ----------------------- Page 573-----------------------
  27706.  
  27707. Initialization 1. Set the clock selection in SCSCR2.
  27708.  
  27709. Be sure to clear bits RIE and TIE,
  27710. and bits TE and RE, to 0.
  27711. Clear TE and RE bits
  27712. 2. Set the data transfer format in
  27713. in SCSCR2 to 0
  27714. SCSMR2.
  27715.  
  27716. 3. Write a value corresponding to the
  27717. Set TFRST and RFRST bits
  27718. bit rate into SCBRR2. (Not
  27719. in SCFCR2 to 1
  27720. necessary if an external clock is
  27721. used.)
  27722. Set CKE1 bit in SCSCR2 4. Wait at least one bit interval, then
  27723. (leaving TE and RE bits set the TE bit or RE bit in SCSCR2
  27724. cleared to 0) to 1. Also set the RIE, REIE, and
  27725.  
  27726. TIE bits.
  27727.  
  27728. Set data transfer format Setting the TE and RE bits enables
  27729. in SCSMR2 the TxD2 and RxD2 pins to be
  27730. used. When transmitting, the SCIF
  27731. will go to the mark state; when
  27732. Set value in SCBRR2 receiving, it will go to the idle state,
  27733.  
  27734. Wait waiting for a start bit.
  27735.  
  27736. No
  27737. 1-bit interval elapsed?
  27738.  
  27739. Yes
  27740.  
  27741. Set RTRG1–0, TTRG1–0,
  27742. and MCE bits in SCFCR2
  27743. Clear TFRST and RFRST bits to 0
  27744.  
  27745. Set TE and RE bits
  27746. in SCSCR2 to 1,
  27747. and set RIE, TIE, and REIE bits
  27748.  
  27749. End
  27750.  
  27751. Figure 16.6 Sample SCIF Initialization Flowchart
  27752.  
  27753. 557
  27754.  
  27755. ----------------------- Page 574-----------------------
  27756.  
  27757. Serial Data Transmission: Figure 16.7 shows a sample flowchart for serial transmission.
  27758.  
  27759. Use the following procedure for serial data transmission after enabling the SCIF for transmission.
  27760.  
  27761.  
  27762. Start of transmission 1. SCIF status check and transmit data
  27763. write:
  27764.  
  27765. Read SCFSR2 and check that the
  27766. Read TDFE flag in SCFSR2 TDFE flag is set to 1, then write
  27767. transmit data to SCFTDR2, read 1
  27768. No from the TDFE and TEND flags, then
  27769. TDFE = 1? clear these flags to 0.
  27770.  
  27771. The number of transmit data bytes
  27772. Yes
  27773. that can be written is 16 - (transmit
  27774. Write transmit data (16 - transmit trigger set number).
  27775.  
  27776. trigger set number) to SCFTDR2, 2. Serial transmission continuation
  27777. read 1 from TDFE flag and TEND procedure:
  27778. flag in SCFSR2, then clear to 0
  27779. To continue serial transmission, read
  27780. 1 from the TDFE flag to confirm that
  27781. All data transmitted? No writing is possible, then write data to
  27782.  
  27783. SCFTDR2, and then clear the TDFE
  27784. Yes flag to 0.
  27785.  
  27786. 3. Break output at the end of serial
  27787. Read TEND flag in SCFSR2 transmission:
  27788.  
  27789. To output a break in serial
  27790. No transmission, clear the SPB2DT bit to
  27791. TEND = 1? 0 and set the SPB2IO bit to 1 in
  27792. SCSPTR2, then clear the TE bit in
  27793. Yes SCSCR2 to 0.
  27794.  
  27795. No In steps 1 and 2, it is possible to
  27796. Break output? ascertain the number of data bytes
  27797.  
  27798. that can be written from the number
  27799. Yes of transmit data bytes in SCFTDR2
  27800.  
  27801. Clear SPB2DT to 0 and indicated by the upper 8 bits of
  27802. SCFDR2.
  27803. set SPB2IO to 1
  27804.  
  27805. Clear TE bit in SCSCR2 to 0
  27806.  
  27807. End of transmission
  27808.  
  27809. Figure 16.7 Sample Serial Transmission Flowchart
  27810.  
  27811. 558
  27812.  
  27813. ----------------------- Page 575-----------------------
  27814.  
  27815. In serial transmission, the SCIF operates as described below.
  27816.  
  27817. 1. When data is written into SCFTDR2, the SCIF transfers the data from SCFTDR2 to SCTSR2
  27818. and starts transmitting. Confirm that the TDFE flag in the serial status register (SCFSR2) is
  27819. set to 1 before writing transmit data to SCFTDR2. The number of data bytes that can be
  27820. written is at least (16 - transmit trigger setting).
  27821.  
  27822. 2. When data is transferred from SCFTDR2 to SCTSR2 and transmission is started, consecutive
  27823. transmit operations are performed until there is no transmit data left in SCFTDR2. When the
  27824. number of transmit data bytes in SCFTDR2 falls to or below the transmit trigger number set
  27825. in the FIFO control register (SCFCR2), the TDFE flag is set. If the TIE bit in SCSCR2 is set
  27826. to 1 at this time, a transmit-FIFO-data-empty interrupt (TXI) request is generated.
  27827.  
  27828. The serial transmit data is sent from the TxD2 pin in the following order.
  27829.  
  27830. a. Start bit: One 0-bit is output.
  27831.  
  27832. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  27833.  
  27834. c. Parity bit: One parity bit (even or odd parity) is output. (A format in which a parity bit is
  27835. not output can also be selected.)
  27836.  
  27837. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  27838.  
  27839. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  27840. sent.
  27841.  
  27842. 3. The SCIF checks the SCFTDR2 transmit data at the timing for sending the stop bit. If data is
  27843. present, the data is transferred from SCFTDR2 to SCTSR2, the stop bit is sent, and then serial
  27844. transmission of the next frame is started.
  27845.  
  27846. If there is no transmit data, the TEND flag in SCFSR2 is set to 1, the stop bit is sent, and
  27847. then the line goes to the mark state in which 1 is output.
  27848.  
  27849. Figure 16.8 shows an example of the operation for transmission in asynchronous mode.
  27850.  
  27851. 559
  27852.  
  27853. ----------------------- Page 576-----------------------
  27854.  
  27855. Start Data Parity Stop Start Data Parity Stop
  27856. 1 bit bit bit bit bit bit 1
  27857.  
  27858. Serial Idle state
  27859. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  27860. data (mark state)
  27861.  
  27862. TDFE
  27863.  
  27864. TEND
  27865.  
  27866. TXI interrupt TXI interrupt
  27867. request request
  27868. Data written to SCFTDR2
  27869. and TDFE flag read as 1
  27870. then cleared to 0 by TXI
  27871. interrupt handler
  27872.  
  27873. One frame
  27874.  
  27875. Figure 16.8 Example of Transmit Operation
  27876. (Example with 8-Bit Data, Parity, One Stop Bit)
  27877.  
  27878. 4. When modem control is enabled, transmission can be stopped and restarted in accordance with
  27879. the CTS2 input value. When CTS2 is set to 1, if transmission is in progress, the line goes to
  27880. the mark state after transmission of one frame. When CTS2 is set to 0, the next transmit data
  27881. is output starting from the start bit.
  27882.  
  27883. Figure 16.9 shows an example of the operation when modem control is used.
  27884.  
  27885. Start Parity Stop Start
  27886. bit bit bit bit
  27887.  
  27888. Serial data
  27889. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1
  27890. TxD2
  27891.  
  27892. CTS2
  27893.  
  27894. Drive high before stop bit
  27895.  
  27896. Figure 16.9 Example of Operation Using Modem Control (CTS2 )
  27897.  
  27898. 560
  27899.  
  27900. ----------------------- Page 577-----------------------
  27901.  
  27902. Serial Data Reception: Figure 16.10 shows a sample flowchart for serial reception.
  27903.  
  27904. Use the following procedure for serial data reception after enabling the SCIF for reception.
  27905.  
  27906. Start of reception 1. Receive error handling and
  27907. break detection: Read the DR,
  27908. ER, and BRK flags in
  27909. Read ER, DR, BRK flags in SCFSR2, and the ORER flag
  27910. SCFSR2 and ORER in SCLSR2, to identify any
  27911. flag in SCLSR2 error, perform the appropriate
  27912. error handling, then clear the
  27913. DR, ER, BRK, and ORER
  27914. flags to 0. In the case of a
  27915. ER or DR or BRK or ORER Yes framing error, a break can also
  27916.  
  27917. = 1? be detected by reading the
  27918. value of the RxD2 pin.
  27919. No Error handling
  27920. 2. SCIF status check and receive
  27921. data read : Read SCFSR2 and
  27922. Read RDF flag in SCFSR2 check that RDF = 1, then read
  27923. the receive data in SCFRDR2,
  27924. read 1 from the RDF flag, and
  27925. No
  27926. RDF = 1? then clear the RDF flag to 0.
  27927. The transition of the RDF flag
  27928. Yes from 0 to 1 can also be
  27929. identified by an RXI interrupt.
  27930. Read receive data in
  27931. 3. Serial reception continuation
  27932. SCFRDR2, and clear RDF
  27933. procedure: To continue serial
  27934. flag in SCFSR2 to 0
  27935. reception, read at least the
  27936. receive trigger set number of
  27937. No receive data bytes from
  27938. All data received?
  27939. SCFRDR2, read 1 from the
  27940. RDF flag, then clear the RDF
  27941. Yes
  27942. flag to 0. The number of
  27943. Clear RE bit in SCSCR2 to 0 receive data bytes in
  27944. SCFRDR2 can be ascertained
  27945. by reading the lower bits of
  27946. End of reception SCFDR2.
  27947.  
  27948. Figure 16.10 Sample Serial Reception Flowchart (1)
  27949.  
  27950. 561
  27951.  
  27952. ----------------------- Page 578-----------------------
  27953.  
  27954. 1. Whether a framing error or parity error
  27955. Error handling
  27956. has occurred in the receive data read
  27957. from SCFRDR2 can be ascertained
  27958. No from the FER and PER bits in
  27959. ORER = 1? SCFSR2.
  27960.  
  27961. Yes 2. When a break signal is received,
  27962. receive data is not transferred to
  27963. Overrun error handling SCFRDR2 while the BRK flag is set.
  27964. However, note that the last data in
  27965. SCFRDR2 is H'00 (the break data in
  27966. which a framing error occurred is
  27967. No
  27968. ER = 1? stored).
  27969.  
  27970.  
  27971. Yes
  27972.  
  27973. Receive error handling
  27974.  
  27975. No
  27976. BRK = 1?
  27977.  
  27978. Yes
  27979.  
  27980. Break handling
  27981.  
  27982. No
  27983. DR = 1?
  27984.  
  27985. Yes
  27986.  
  27987. Read receive data in SCFRDR2
  27988.  
  27989. Clear DR, ER, BRK flags
  27990. in SCFSR2,
  27991. and ORER flag in SCLSR2, to 0
  27992.  
  27993. End
  27994.  
  27995. Figure 16.10 Sample Serial Reception Flowchart (2)
  27996.  
  27997. 562
  27998.  
  27999. ----------------------- Page 579-----------------------
  28000.  
  28001. In serial reception, the SCIF operates as described below.
  28002.  
  28003. 1. The SCIF monitors the transmission line, and if a 0 start bit is detected, performs internal
  28004. synchronization and starts reception.
  28005.  
  28006. 2. The received data is stored in SCRSR2 in LSB-to-MSB order.
  28007.  
  28008. 3. The parity bit and stop bit are received.
  28009.  
  28010. After receiving these bits, the SCIF carries out the following checks.
  28011.  
  28012. a. Stop bit check: The SCIF checks whether the stop bit is 1. If there are two stop bits, only
  28013. the first is checked.
  28014.  
  28015. b. The SCIF checks whether receive data can be transferred from the receive shift register
  28016. (SCRSR2) to SCFRDR2.
  28017.  
  28018. c. Overrun error check: The SCIF checks that the ORER flag is 0, indicating that no overrun
  28019. error has occurred.
  28020.  
  28021. d. Break check: The SCIF checks that the BRK flag is 0, indicating that the break state is not
  28022. set.
  28023.  
  28024. If all the above checks are passed, the receive data is stored in SCFRDR2.
  28025.  
  28026. Note: Reception continues when parity error, framing error occurs.
  28027.  
  28028. 4. If the RIE bit in SCSCR2 is set to 1 when the RDF or DR flag changes to 1, a receive-FIFO-
  28029. data-full interrupt (RXI) request is generated.
  28030.  
  28031. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the ER flag changes to 1, a receive-
  28032. error interrupt (ERI) request is generated.
  28033.  
  28034. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the BRK or ORER flag changes to 1,
  28035. a break reception interrupt (BRI) request is generated.
  28036.  
  28037. Figure 16.11 shows an example of the operation for reception.
  28038.  
  28039. 563
  28040.  
  28041. ----------------------- Page 580-----------------------
  28042.  
  28043. Start Data Parity Stop Start Data Parity Stop
  28044. 1 bit bit bit bit bit bit
  28045.  
  28046. Serial
  28047. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  28048. data
  28049.  
  28050. RDF
  28051.  
  28052. FER
  28053.  
  28054. RXI interrupt
  28055. request Data read and RDF flag ERI interrupt request
  28056.  
  28057. One frame read as 1 then cleared to generated by receive
  28058. 0 by RXI interrupt handler error
  28059.  
  28060. Figure 16.11 Example of SCIF Receive Operation
  28061. (Example with 8-Bit Data, Parity, One Stop Bit)
  28062.  
  28063. 5. When modem control is enabled, the RTS2 signal is output when SCFRDR2 is empty. When
  28064. RTS2 is 0, reception is possible. When RTS2 is 1, this indicates that SCFRDR2 contains 15
  28065. or more bytes of data, and there is no free space, reception is not possible.
  28066.  
  28067. Figure 16.12 shows an example of the operation when modem control is used.
  28068.  
  28069. Start Parity Stop Start
  28070. bit bit bit bit
  28071. Serial data
  28072. 0 D0 D1 D2 D7 0/1 1 0
  28073. RxD2
  28074.  
  28075. RTS2
  28076.  
  28077. Figure 16.12 Example of Operation Using Modem Control (RTS2 )
  28078.  
  28079. 564
  28080.  
  28081. ----------------------- Page 581-----------------------
  28082.  
  28083. 1 6 . 4 SCIF Interrupt Sources and the DMAC
  28084.  
  28085. The SCIF has four interrupt sources: transmit-FIFO-data-empty interrupt (TXI) request, receive-
  28086. error interrupt (ERI) request, receive-FIFO-data-full interrupt (RXI) request, and break interrupt
  28087. (BRI) request.
  28088.  
  28089. Table 16.6 shows the interrupt sources and their order of priority. The interrupt sources are enabled
  28090. or disabled by means of the TIE, RIE, and REIE bits in SCSCR2. A separate interrupt request is
  28091. sent to the interrupt controller for each of these interrupt sources.
  28092.  
  28093. When transmission/reception is carried out using the DMAC, output of interrupt requests to the
  28094. interrupt controller can be inhibited by clearing the RIE bit in SCSCR2 to 0. By setting the REIE
  28095. bit to 1 while the RIE bit is cleared to 0, it is possible to output ERI and BRI interrupt requests,
  28096. but not RXI interrupt requests.
  28097.  
  28098. When the TDFE flag in the serial status register (SCFSR2) is set to 1, a transmit-FIFO-data-
  28099. empty request is generated separately from the interrupt request. A transmit-FIFO-data-empty
  28100. request can activate the DMAC to perform data transfer.
  28101.  
  28102. When the RDF flag or DR flag in SCFSR2 is set to 1, a receive-FIFO-data-full request is
  28103. generated separately from the interrupt request. A receive-FIFO-data-full request can activate the
  28104. DMAC to perform data transfer.
  28105.  
  28106. When using the DMAC for transmission/reception, set and enable the DMAC before making the
  28107. SCIF settings. See section 14, Direct Memory Access Controller (DMAC), for details of the
  28108. DMAC setting procedure.
  28109.  
  28110. When the BRK flag in SCFSR2 or the ORER flag in the line status register (SCLSR2) is set to
  28111. 1, a BRI interrupt request is generated.
  28112.  
  28113. The TXI interrupt indicates that transmit data can be written, and the RXI interrupt indicates that
  28114. there is receive data in SCFRDR2.
  28115.  
  28116. 565
  28117.  
  28118. ----------------------- Page 582-----------------------
  28119.  
  28120. Table 16.6 SCIF Interrupt Sources
  28121.  
  28122. Interrupt DMAC Priority on
  28123. Source Description Activation Reset
  28124. Release
  28125.  
  28126. ERI Interrupt initiated by receive error flag (ER) Not possible High
  28127.  
  28128. RXI Interrupt initiated by receive FIFO data full flag Possible ↑
  28129. (RDF) or receive data ready flag (DR)
  28130.  
  28131. BRI Interrupt initiated by break flag (BRK) or overrun Not possible
  28132. error flag (ORER) ↓
  28133.  
  28134. TXI Interrupt initiated by transmit FIFO data empty Possible Low
  28135. flag (TDFE)
  28136.  
  28137. See section 5, Exceptions, for priorities and the relationship with non-SCIF interrupts.
  28138.  
  28139. 1 6 . 5 Usage Notes
  28140.  
  28141. Note the following when using the SCIF.
  28142.  
  28143. SCFTDR2 Writing and the TDFE Flag: The TDFE flag in the serial status register
  28144. (SCFSR2) is set when the number of transmit data bytes written in the transmit FIFO data register
  28145. (SCFTDR2) has fallen to or below the transmit trigger number set by bits TTRG1 and TTRG0 in
  28146. the FIFO control register (SCFCR2). After TDFE is set, transmit data up to the number of empty
  28147. bytes in SCFTDR2 can be written, allowing efficient continuous transmission.
  28148.  
  28149. However, if the number of data bytes written in SCFTDR2 is equal to or less than the transmit
  28150. trigger number, the TDFE flag will be set to 1 again after being read as 1 and cleared to 0. TDFE
  28151. clearing should therefore be carried out when SCFTDR2 contains more than the transmit trigger
  28152. number of transmit data bytes.
  28153.  
  28154. The number of transmit data bytes in SCFTDR2 can be found from the upper 8 bits of the FIFO
  28155. data count register (SCFDR2).
  28156.  
  28157. SCFRDR2 Reading and the RDF Flag: The RDF flag in the serial status register
  28158. (SCFSR2) is set when the number of receive data bytes in the receive FIFO data register
  28159. (SCFRDR2) has become equal to or greater than the receive trigger number set by bits RTRG1
  28160. and RTRG0 in the FIFO control register (SCFCR2). After RDF is set, receive data equivalent to
  28161. the trigger number can be read from SCFRDR2, allowing efficient continuous reception.
  28162.  
  28163. However, if the number of data bytes in SCFRDR2 is equal to or greater than the trigger number,
  28164. the RDF flag will be set to 1 again if it is cleared to 0. RDF should therefore be cleared to 0 after
  28165. being read as 1 after all the receive data has been read.
  28166.  
  28167. 566
  28168.  
  28169. ----------------------- Page 583-----------------------
  28170.  
  28171. The number of receive data bytes in SCFRDR2 can be found from the lower 8 bits of the FIFO
  28172. data count register (SCFDR2).
  28173.  
  28174. Break Detection and Processing: Break signals can be detected by reading the RxD2 pin
  28175. directly when a framing error (FER) is detected. In the break state the input from the RxD2 pin
  28176. consists of all 0s, so the FER flag is set and the parity error flag (PER) may also be set.
  28177.  
  28178. Although the SCIF stops transferring receive data to SCFRDR2 after receiving a break, the receive
  28179. operation continues.
  28180.  
  28181. Sending a Break Signal: The input/output condition and level of the TxD2 pin are determined
  28182. by bits SPB2IO and SPB2DT in the serial port register (SCSPTR2). This feature can be used to
  28183. send a break signal.
  28184.  
  28185. After the serial transmitter is initialized, the TxD2 pin function is not selected and the value of the
  28186. SPB2DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  28187. enabled). The SPB2IO and SPB2DT bits should therefore be set to 1 (designating output and high
  28188. level) beforehand.
  28189.  
  28190. To send a break signal during serial transmission, clear the SPB2DT bit to 0 (designating low
  28191. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  28192. transmitter is initialized, regardless of its current state, and 0 is output from the TxD2 pin.
  28193.  
  28194. Receive Data Sampling Timing and Receive Margin: The SCIF operates on a base
  28195. clock with a frequency of 16 times the bit rate. In reception, the SCIF synchronizes internally with
  28196. the fall of the start bit, which it samples on the base clock. Receive data is latched at the rising
  28197. edge of the eighth base clock pulse. The timing is shown in figure 16.13.
  28198.  
  28199. 567
  28200.  
  28201. ----------------------- Page 584-----------------------
  28202.  
  28203. 16 clocks
  28204.  
  28205. 8 clocks
  28206.  
  28207. 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
  28208.  
  28209. Base clock
  28210.  
  28211. –7.5 clocks +7.5 clocks
  28212.  
  28213. Receive data Start bit D0 D1
  28214. (RxD2)
  28215.  
  28216. Synchronization
  28217. sampling timing
  28218.  
  28219. Data sampling
  28220. timing
  28221.  
  28222. Figure 16.13 Receive Data Sampling Timing in Asynchronous Mode
  28223.  
  28224. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  28225.  
  28226. 1 | D – 0.5 |
  28227. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100% ................... (1)
  28228. 2N N
  28229.  
  28230. M: Receive margin (%)
  28231. N: Ratio of clock frequency to bit rate (N = 16)
  28232. D: Clock duty cycle (D = 0 to 1.0)
  28233. L: Frame length (L = 9 to 12)
  28234. F: Absolute deviation of clock frequency
  28235.  
  28236. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation (2).
  28237.  
  28238. When D = 0.5 and F = 0:
  28239.  
  28240. M = (0.5 – 1 / (2 × 16) ) × 100% = 46.875% .......................................... (2)
  28241.  
  28242. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  28243.  
  28244. 568
  28245.  
  28246. ----------------------- Page 585-----------------------
  28247.  
  28248. SCK2/MRESET: As the manual reset pin is multiplexed with the SCK2 pin, a manual reset
  28249. must not be executed while the SCIF is operating in external clock mode.
  28250.  
  28251. When Using the DMAC: When using the DMAC for transmission/reception, inhibit output
  28252. of RXI and TXI interrupt requests to the interrupt controller. If interrupt request output is enabled,
  28253. interrupt requests to the interrupt controller will be cleared by the DMAC without regard to the
  28254. interrupt handler.
  28255.  
  28256. Serial Ports: Note that, when the SCIF pin value is read using a serial port, the value read will
  28257. be the value two peripheral clock cycles earlier.
  28258.  
  28259. Overrun error flag: SCIF overrun error flag is not set in the case that overrun error and
  28260. flaming error occurred simultaneously in receiving data, that means 17th byte data which overrun
  28261. was accompanying with flaming error. In such case, only SCFSR2. ER flag which shows
  28262. occurrence of flaming error is set. RxFIFO stores data received before the overrun and does not
  28263. store (i. e. lose) overrun data. SCIF has no bit which corresponds to SCFSR2. FER for the lost
  28264. data.
  28265.  
  28266. In addition to the overrun error handling software routine, exception handler should check co-
  28267. occurrence of overrun error when a flaming error is occurred and when a co-occurrence is found, it
  28268. should handle also overrun error (When (i) a overrun error solely occurred without accompanying
  28269. with other receive error and (ii) when a parity error is accompanied with overrun error, usual
  28270. overrun error handling can be used. Overrun error handling should rather be done primarily).
  28271.  
  28272. 569
  28273.  
  28274. ----------------------- Page 586-----------------------
  28275.  
  28276. Flow chart:
  28277. Framing error occurrence
  28278. When flaming error (SCFSR. ER=1) is occurred, bit7 to
  28279.  
  28280. bit0 should be read out from SCFDR2. If bit7 to bit0
  28281. Bits 7 to 0 No
  28282. in SCFDR2 = H'10? equals H'10, contents of the RxFIFO should be read.
  28283.  
  28284. When the data received last is not accompanied with
  28285. Yes
  28286. flaming error (SCFSR2. FER=0) both overrun error
  28287. Normal error handling
  28288. handling and flaming error handling shoud be
  28289.  
  28290. PER or FER bit Yes conducted.
  28291. in SCFSR2 set to 1?
  28292.  
  28293.  
  28294. No
  28295. Error handling
  28296.  
  28297. Read receive FIFO
  28298.  
  28299. No
  28300. Last data?
  28301.  
  28302. Yes
  28303.  
  28304. Overrun error handling
  28305. +
  28306. framing error handling
  28307.  
  28308. Figure 16.14 Overrun Error Flag
  28309.  
  28310. 570
  28311.  
  28312. ----------------------- Page 587-----------------------
  28313.  
  28314. Section 17 Smart Card Interface
  28315.  
  28316. 1 7 . 1 Overview
  28317.  
  28318. An IC card (smart card) interface conforming to ISO/IEC 7816-3 (Identification Card) is supported
  28319. as a serial communication interface (SCI) extension function.
  28320.  
  28321. Switching between the normal serial communication interface and the smart card interface is carried
  28322. out by means of a register setting.
  28323.  
  28324. 1 7 . 1 . 1 Features
  28325.  
  28326. Features of the smart card interface are listed below.
  28327.  
  28328. • Asynchronous mode
  28329.  
  28330.  Data length: 8 bits
  28331.  
  28332.  Parity bit generation and checking
  28333.  
  28334.  Transmission of error signal (parity error) in receive mode
  28335.  
  28336.  Error signal detection and automatic data retransmission in transmit mode
  28337.  
  28338.  Direct convention and inverse convention both supported
  28339.  
  28340. • On-chip baud rate generator allows any bit rate to be selected
  28341.  
  28342. • Three interrupt sources
  28343.  
  28344. There are three interrupt sources—transmit-data-empty, receive-data-full, and transmit/receive
  28345. error—that can issue requests independently.
  28346.  
  28347. The transmit-data-empty interrupt and receive-data-full interrupt can activate the DMA
  28348. controller (DMAC) to execute data transfer.
  28349.  
  28350. 571
  28351.  
  28352. ----------------------- Page 588-----------------------
  28353.  
  28354. 1 7 . 1 . 2 Block Diagram
  28355.  
  28356. Figure 17.1 shows a block diagram of the smart card interface.
  28357.  
  28358. e
  28359. c Internal
  28360. a
  28361. Module data bus f data bus
  28362. r
  28363. e
  28364. t
  28365. n
  28366. i
  28367.  
  28368. s
  28369. u
  28370. B
  28371.  
  28372. SCRDR1 SCTDR1 SCSCMR1 SCBRR1
  28373. SCSSR1
  28374. SCSCR1
  28375. RxD SCRSR1 SCTSR1
  28376. Baud rate
  28377. SCSMR1 Pφ/4
  28378. generator
  28379. SCSPTR1
  28380. Transmission/ Pφ/16
  28381. reception
  28382. control Pφ/64
  28383. TxD
  28384. Parity generation Clock
  28385.  
  28386. Parity check
  28387.  
  28388. External clock
  28389. SCK
  28390.  
  28391. TXI
  28392. RXI
  28393. ERI
  28394.  
  28395. SCI
  28396.  
  28397. SCSCMR1: Smart card mode register
  28398. SCRSR1: Receive shift register
  28399. SCRDR1: Receive data register
  28400. SCTSR1: Transmit shift register
  28401. SCTDR1: Transmit data register
  28402. SCSMR1: Serial mode register
  28403. SCSCR1: Serial control register
  28404. SCSSR1: Serial status register
  28405. SCBRR1: Bit rate register
  28406. SCSPTR1: Serial port register
  28407.  
  28408. Figure 17.1 Block Diagram of Smart Card Interface
  28409.  
  28410. 572
  28411.  
  28412. ----------------------- Page 589-----------------------
  28413.  
  28414. 1 7 . 1 . 3 Pin Configuration
  28415.  
  28416. Table 17.1 shows the smart card interface pin configuration.
  28417.  
  28418. Table 17.1 Smart Card Interface Pins
  28419.  
  28420. Pin Name Abbreviation I / O Function
  28421.  
  28422. Serial clock pin MD0/SCK I/O Clock input/output
  28423.  
  28424. Receive data pin RxD Input Receive data input
  28425.  
  28426. Transmit data pin MD7/TxD Output Transmit data output
  28427.  
  28428. 1 7 . 1 . 4 Register Configuration
  28429.  
  28430. The smart card interface has the internal registers shown in table 17.2. Details of the SCBRR1,
  28431. SCTDR1, SCRDR1, and SCSPTR1 registers are the same as for the normal SCI function: see the
  28432. register descriptions in section 15, Serial Communication Interface.
  28433.  
  28434. With the exception of the serial port register, the smart card interface registers are initialized in
  28435. standby mode and in the module standby state as well as by a power-on reset or manual reset.
  28436. When recovering from standby mode or the module standby state, the registers must be set again.
  28437.  
  28438. Table 17.2 Smart Card Interface Registers
  28439.  
  28440. Initial Area 7 Acces
  28441. Name Abbreviation R/ W Value P4 Address Address s Size
  28442.  
  28443. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  28444.  
  28445. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  28446.  
  28447. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  28448.  
  28449. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  28450. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  28451.  
  28452. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  28453.  
  28454. Smart card mode SCSCMR1 R/W H'00 H'FFE00018 H'1FE00018 8
  28455. register
  28456. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  28457.  
  28458. Notes: 1. Only 0 can be written, to clear flags.
  28459. 2. The value of bits 2 and 0 is undefined.
  28460.  
  28461. 573
  28462.  
  28463. ----------------------- Page 590-----------------------
  28464.  
  28465. 1 7 . 2 Register Descriptions
  28466.  
  28467. Only registers that have been added, and bit functions that have been modified, for the smart card
  28468. interface are described here.
  28469.  
  28470. 1 7 . 2 . 1 Smart Card Mode Register (SCSCMR1)
  28471.  
  28472. SCSCMR1 is an 8-bit readable/writable register that selects the smart card interface function.
  28473. SCSCMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  28474. module standby state.
  28475.  
  28476. Bit: 7 6 5 4 3 2 1 0
  28477.  
  28478. — — — — SDIR SINV — SMIF
  28479.  
  28480. Initial value: — — — — 0 0 — 0
  28481.  
  28482. R/W: — — — — R/W R/W — R/W
  28483.  
  28484. Bits 7 to 4 and 1—Reserved: These bits are always read as 0, and should only be written
  28485. with 0.
  28486.  
  28487. Bit 3—Smart Card Data Transfer Direction (SDIR): Selects the serial/parallel
  28488. conversion format.
  28489.  
  28490. Bit 3: SDIR Description
  28491.  
  28492. 0 SCTDR1 contents are transmitted LSB-first (Initial value)
  28493.  
  28494. Receive data is stored in SCRDR1 LSB-first
  28495.  
  28496. 1 SCTDR1 contents are transmitted MSB-first
  28497.  
  28498. Receive data is stored in SCRDR1 MSB-first
  28499.  
  28500. Bit 2—Smart Card Data Invert (SINV): Specifies inversion of the data logic level. This
  28501. function is used together with the bit 3 function for communication with an inverse convention
  28502. card. The SINV bit does not affect the logic level of the parity bit. For parity-related setting
  28503. procedures, see section 17.3.4, Register Settings.
  28504.  
  28505. Bit 2: SINV Description
  28506.  
  28507. 0 SCTDR1 contents are transmitted as they are (Initial value)
  28508.  
  28509. Receive data is stored in SCRDR1 as it is
  28510.  
  28511. 1 SCTDR1 contents are inverted before being transmitted
  28512.  
  28513. Receive data is stored in SCRDR1 in inverted form
  28514.  
  28515. 574
  28516.  
  28517. ----------------------- Page 591-----------------------
  28518.  
  28519. Bit 0—Smart Card Interface Mode Select (SMIF): Enables or disables the smart card
  28520. interface function.
  28521.  
  28522. Bit 0: SMIF Description
  28523.  
  28524. 0 Smart card interface function is disabled (Initial value)
  28525.  
  28526. 1 Smart card interface function is enabled
  28527.  
  28528. 1 7 . 2 . 2 Serial Mode Register (SCSMR1)
  28529.  
  28530. Bit 7 of SCSMR1 has a different function in smart card interface mode.
  28531.  
  28532. Bit: 7 6 5 4 3 2 1 0
  28533.  
  28534. GM(C/A) CHR PE O/E STOP MP CKS1 CKS0
  28535.  
  28536. Initial value: 0 0 0 0 0 0 0 0
  28537.  
  28538. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  28539.  
  28540. Bit 7—GSM Mode (GM): Sets the smart card interface function to GSM mode.
  28541.  
  28542. With the normal smart card interface, this bit is cleared to 0. Setting this bit to 1 selects GSM
  28543. mode, an additional mode for controlling the timing for setting the TEND flag that indicates
  28544. completion of transmission, and the type of clock output used. The details of the additional clock
  28545. output control mode are specified by the CKE1 and CKE0 bits in the serial control register
  28546. (SCSCR1). In GSM mode, the pulse width is guaranteed when SCK start/stop specifications are
  28547. made by CKE1 and CKE0.
  28548.  
  28549. Bit 7: GM Description
  28550.  
  28551. 0 Normal smart card interface mode operation (Initial value)
  28552.  
  28553. The TEND flag is set 12.5 etu after the beginning of the start bit
  28554.  
  28555. Clock output on/off control only
  28556.  
  28557. 1 GSM mode smart card interface mode operation
  28558.  
  28559. The TEND flag is set 11.0 etu after the beginning of the start bit
  28560.  
  28561. Clock output on/off and fixed-high/fixed-low control (set in SCSCR1)
  28562.  
  28563. Note: etu: Elementary time unit (time for transfer of 1 bit)
  28564.  
  28565. 575
  28566.  
  28567. ----------------------- Page 592-----------------------
  28568.  
  28569. Bits 6 to 0: Operate in the same way as for the normal SCI. See section 15, Serial
  28570. Communication Interface, for details. With the smart card interface, the following settings should
  28571. be used: CHR = 0, PE = 1, STOP = 1, MP = 0.
  28572.  
  28573. 1 7 . 2 . 3 Serial Control Register (SCSCR1)
  28574.  
  28575. Bits 1 and 0 of SCSCR1 have a different function in smart card interface mode.
  28576.  
  28577. Bit: 7 6 5 4 3 2 1 0
  28578.  
  28579. TIE RIE TE RE — — CKE1 CKE0
  28580.  
  28581. Initial value: 0 0 0 0 0 0 0 0
  28582.  
  28583. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  28584.  
  28585. Bits 7 to 4: Operate in the same way as for the normal SCI. See section 15, Serial
  28586. Communication Interface, for details.
  28587.  
  28588. Bits 3 and 2: Not used with the smart card interface.
  28589.  
  28590. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits specify the function of
  28591. the SCK pin. In smart card interface mode, an internal clock is always used as the clock source. In
  28592. smart card interface mode, it is possible to specify a fixed high level or fixed low level for the
  28593. clock output, in addition to the usual switching between enabling and disabling of the clock
  28594. output.
  28595.  
  28596. G M CKE1 CKE0 SCK Pin Function
  28597.  
  28598. 0 0 0 Port I/O pin
  28599.  
  28600. 1 Clock output as SCK output pin
  28601.  
  28602. 1 0 Invalid setting: must not be used
  28603.  
  28604. 1 Invalid setting: must not be used
  28605.  
  28606. 1 0 0 Output pin with output fixed low
  28607.  
  28608. 1 Clock output as output pin
  28609.  
  28610. 1 0 Output pin with output fixed high
  28611.  
  28612. 1 Clock output as output pin
  28613.  
  28614. 576
  28615.  
  28616. ----------------------- Page 593-----------------------
  28617.  
  28618. 1 7 . 2 . 4 Serial Status Register (SCSSR1)
  28619.  
  28620. Bit 4 of SCSSR1 has a different function in smart card interface mode. Coupled with this, the
  28621. setting conditions for bit 2 (TEND) are also different.
  28622.  
  28623. Bit: 7 6 5 4 3 2 1 0
  28624.  
  28625. TDRE RDRF ORER FER/ PER TEND — —
  28626. ERS
  28627.  
  28628. Initial value: 1 0 0 0 0 1 0 0
  28629.  
  28630. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  28631.  
  28632. Note: * Only 0 can be written, to clear the flag.
  28633.  
  28634. Bits 7 to 5: Operate in the same way as for the normal SCI. See section 15, Serial
  28635. Communication Interface, for details.
  28636.  
  28637. Bit 4—Error Signal Status (ERS): In smart card interface mode, bit 4 indicates the status
  28638. of the error signal sent back from the receiving side during transmission. Framing errors are not
  28639. detected in smart card interface mode.
  28640.  
  28641. Bit 4: ERS Description
  28642.  
  28643. 0 Normal reception, no error signal (Initial value)
  28644.  
  28645. [Clearing conditions]
  28646.  
  28647. Power-on reset, manual reset, standby mode, or module standby
  28648.  
  28649. When 0 is written to ERS after reading ERS = 1
  28650.  
  28651. 1 An error signal has been sent from the receiving side indicating detection of
  28652. a parity error
  28653.  
  28654. [Setting condition]
  28655.  
  28656. When the low level of the error signal is detected
  28657.  
  28658. Note: Clearing the TE bit in SCSCR1 to 0 does not affect the ERS flag, which retains its previous
  28659. state.
  28660.  
  28661. Bit 3—Parity Error (PER): Operates in the same way as for the normal SCI. See section 15,
  28662. Serial Communication Interface, for details.
  28663.  
  28664. 577
  28665.  
  28666. ----------------------- Page 594-----------------------
  28667.  
  28668. Bit 2—Transmit End (TEND): The setting conditions for the TEND flag are as follows.
  28669.  
  28670. Bit 2: TEND Description
  28671.  
  28672. 0 Transmission in progress
  28673.  
  28674. [Clearing condition]
  28675.  
  28676. When 0 is written to TDRE after reading TDRE = 1
  28677.  
  28678. 1 Transmission has been ended (Initial value)
  28679.  
  28680. [Setting conditions]
  28681.  
  28682. Power-on reset, manual reset, standby mode, or module standby
  28683.  
  28684. When the TE bit in SCSCR1 is 0 and the FER/ERS bit is also 0
  28685.  
  28686. When the GM bit in SCSMR1 is 0, and TDRE = 1 and FER/ERS = 0 (normal
  28687. transmission) 2.5 etu after transmission of a 1-byte serial character
  28688.  
  28689. When the GM bit in SCSMR1 is 1, and TDRE = 1 and FER/ERS = 0 (normal
  28690. transmission) 1.0 etu after transmission of a 1-byte serial character
  28691.  
  28692. etu: Elementary Time Unit
  28693.  
  28694. Bits 1 and 0: Not used with the smart card interface.
  28695.  
  28696. 1 7 . 3 Operation
  28697.  
  28698. 1 7 . 3 . 1 Overview
  28699.  
  28700. The main functions of the smart card interface are as follows.
  28701.  
  28702. • One frame consists of 8-bit data plus a parity bit.
  28703.  
  28704. • In transmission, a guard time of at least 2 etu (elementary time unit: the time for transfer of
  28705. one bit) is left between the end of the parity bit and the start of the next frame.
  28706.  
  28707. • If a parity error is detected during reception, a low error signal level is output for a 1-etu period
  28708. 10.5 etu after the start bit.
  28709.  
  28710. • If an error signal is detected during transmission, the same data is transmitted automatically
  28711. after the elapse of 2 etu or longer.
  28712.  
  28713. • Only asynchronous communication is supported; there is no synchronous communication
  28714. function.
  28715.  
  28716. 578
  28717.  
  28718. ----------------------- Page 595-----------------------
  28719.  
  28720. 1 7 . 3 . 2 Pin Connections
  28721.  
  28722. Figure 17.2 shows a schematic diagram of smart card interface related pin connections.
  28723.  
  28724. In communication with an IC card, since both transmission and reception are carried out on a
  28725. single data transmission line, the TxD pin and RxD pin should be connected outside the chip. The
  28726. data transmission line should be pulled up on the VCC power supply side with a resistor. The
  28727. TxD pin is multiplexed with MD7, so caution is required in a reset.
  28728.  
  28729. When the clock generated on the smart card interface is used by an IC card, the SCK pin output is
  28730. input to the CLK pin of the IC card. No connection is needed if the IC card uses an internal clock.
  28731.  
  28732. Chip port output is used as the reset signal.
  28733.  
  28734. Other pins must normally be connected to the power supply or ground.
  28735.  
  28736. Note: If an IC card is not connected, and both TE and RE are set to 1, closed
  28737. transmission/reception is possible, enabling self-diagnosis to be carried out.
  28738.  
  28739. VCC
  28740.  
  28741.  
  28742. TxD
  28743. IO
  28744. Data line
  28745. RxD
  28746.  
  28747. SCK Clock line
  28748. CLK
  28749.  
  28750. SH7750 Px (port) Reset line RST
  28751.  
  28752. Connected equipment IC card
  28753.  
  28754. Figure 17.2 Schematic Diagram of Smart Card Interface Pin Connections
  28755.  
  28756. 579
  28757.  
  28758. ----------------------- Page 596-----------------------
  28759.  
  28760. 1 7 . 3 . 3 Data Format
  28761.  
  28762. Figure 17.3 shows the smart card interface data format. In reception in this mode, a parity check is
  28763. carried out on each frame, and if an error is detected an error signal is sent back to the transmitting
  28764. side to request retransmission of the data. If an error signal is detected during transmission, the
  28765. same data is retransmitted.
  28766.  
  28767. When there is no parity error
  28768.  
  28769. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  28770.  
  28771. Transmitting station output
  28772.  
  28773. When a parity error occurs
  28774.  
  28775. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp DE
  28776.  
  28777. Transmitting station output
  28778.  
  28779. Receiving
  28780. station
  28781. Ds: Start bit output
  28782. D0–D7: Data bits
  28783. Dp: Parity bit
  28784. DE: Error signal
  28785.  
  28786.  
  28787. Figure 17.3 Smart Card Interface Data Format
  28788.  
  28789. The operation sequence is as follows.
  28790.  
  28791. 1. When the data line is not in use it is in the high-impedance state, and is fixed high with a pull-
  28792. up resistor.
  28793.  
  28794. 2. The transmitting station starts transmission of one frame of data. The data frame starts with a
  28795. start bit (Ds, low-level), followed by 8 data bits (D0 to D7) and a parity bit (Dp).
  28796.  
  28797. 3. With the smart card interface, the data line then returns to the high-impedance state. The data
  28798. line is pulled high with a pull-up resistor.
  28799.  
  28800. 4. The receiving station carries out a parity check.
  28801.  
  28802. If there is no parity error and the data is received normally, the receiving station waits for
  28803. reception of the next data.
  28804.  
  28805. 580
  28806.  
  28807. ----------------------- Page 597-----------------------
  28808.  
  28809. If a parity error occurs, however, the receiving station outputs an error signal (DE, low-level)
  28810. to request retransmission of the data. After outputting the error signal for the prescribed length
  28811. of time, the receiving station places the signal line in the high-impedance state again. The
  28812. signal line is pulled high again by a pull-up resistor.
  28813.  
  28814. 5. If the transmitting station does not receive an error signal, it proceeds to transmit the next data
  28815. frame.
  28816.  
  28817. If it receives an error signal, however, it returns to step 2 and retransmits the erroneous data.
  28818.  
  28819. 1 7 . 3 . 4 Register Settings
  28820.  
  28821. Table 17.3 shows a bit map of the registers used by the smart card interface. Bits indicated as 0 or
  28822. 1 must be set to the value shown. The setting of other bits is described below.
  28823.  
  28824. Table 17.3 Smart Card Interface Register Settings
  28825.  
  28826. Bit
  28827.  
  28828. Register Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
  28829.  
  28830. SCSMR1 GM 0 1 O/E 1 0 CKS1 CKS0
  28831.  
  28832. SCBRR1 BRR7 BRR6 BRR5 BRR4 BRR3 BRR2 BRR1 BRR0
  28833.  
  28834. SCSCR1 TIE RIE TE RE 0 0 CKE1 CKE0
  28835.  
  28836. SCTDR1 TDR7 TDR6 TDR5 TDR4 TDR3 TDR2 TDR1 TDR0
  28837.  
  28838. SCSSR1 TDRE RDRF ORER FER/ERS PER TEND 0 0
  28839.  
  28840. SCRDR1 RDR7 RDR6 RDR5 RDR4 RDR3 RDR2 RDR1 RDR0
  28841.  
  28842. SCSCMR1 — — — — SDIR SINV — SMIF
  28843.  
  28844. SCSPTR1 EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  28845.  
  28846. Note: A dash indicates an unused bit.
  28847.  
  28848. Serial Mode Register (SCSMR1) Settings: The GM bit is used to select the timing of
  28849. TEND flag setting, and, together with the CKE1 and CKE0 bits in the serial control register
  28850. (SCSCR1), to select the clock output state.
  28851.  
  28852. The O/E bit is cleared to 0 if the IC card is of the direct convention type, and set to 1 if of the
  28853. inverse convention type.
  28854.  
  28855. Bits CKS1 and CKS0 select the clock source of the on-chip baud rate generator. See section
  28856. 17.3.5, Clock.
  28857.  
  28858. 581
  28859.  
  28860. ----------------------- Page 598-----------------------
  28861.  
  28862. I/O data Ds Da Db Dc Dd De Df Dg Dh Dp DE
  28863.  
  28864. Guard
  28865. time
  28866.  
  28867. 12.5 etu
  28868. TXI
  28869. GM = 0
  28870. (TEND interrupt)
  28871.  
  28872. 11.0 etu
  28873. GM = 1
  28874.  
  28875. Figure 17.4 TEND Generation Timing
  28876.  
  28877. Bit Rate Register (SCBRR1) Setting: SCBRR1 is used to set the bit rate. See section
  28878. 17.3.5, Clock, for the method of calculating the value to be set.
  28879.  
  28880. Serial Control Register (SCSCR1) Settings: The function of the TIE, RIE, TE, and RE
  28881. bits is the same as for the normal SCI. See section 15, Serial Communication Interface, for
  28882. details.
  28883.  
  28884. The CKE1 and CKE0 bits specify the clock output state. See section 17.3.5, Clock, for details.
  28885.  
  28886. Smart Card Mode Register (SCSCMR1) Settings: The SDIR bit and SINV bit are both
  28887. cleared to 0 if the IC card is of the direct convention type, and both set to 1 if of the inverse
  28888. convention type.
  28889.  
  28890. The SMIF bit is set to 1 when the smart card interface is used.
  28891.  
  28892. Figure 17.5 shows examples of register settings and the waveform of the start character for the two
  28893. types of IC card (direct convention and inverse convention).
  28894.  
  28895. With the direct convention type, the logic 1 level corresponds to state Z and the logic 0 level to
  28896. state A, and transfer is performed in LSB-first order. The start character data in this case is H'3B.
  28897. The parity bit is 1 since even parity is stipulated for the smart card.
  28898.  
  28899. With the inverse convention type, the logic 1 level corresponds to state A and the logic 0 level to
  28900. state Z, and transfer is performed in MSB-first order. The start character data in this case is H'3F.
  28901. The parity bit is 0, corresponding to state Z, since even parity is stipulated for the smart card.
  28902.  
  28903. Inversion specified by the SINV bit applies only to the data bits, D7 to D0. For parity bit
  28904. inversion, the O/E bit in SCSMR1 is set to odd parity mode. (This applies to both transmission
  28905. and reception).
  28906.  
  28907. 582
  28908.  
  28909. ----------------------- Page 599-----------------------
  28910.  
  28911. (Z) A Z Z A Z Z Z A A Z (Z) State
  28912.  
  28913. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  28914.  
  28915. (a) Direct convention (SDIR = SINV = O/E = 0)
  28916.  
  28917. (Z) A Z Z A A A A A A Z (Z) State
  28918.  
  28919. Ds D7 D6 D5 D4 D3 D2 D1 D0 Dp
  28920.  
  28921. (b) Inverse convention (SDIR = SINV = O/E = 1)
  28922.  
  28923. Figure 17.5 Sample Start Character Waveforms
  28924.  
  28925. 1 7 . 3 . 5 Clock
  28926.  
  28927. Only an internal clock generated by the on-chip baud rate generator can be used as the
  28928. transmit/receive clock for the smart card interface. The bit rate is set with the bit rate register
  28929. (SCBRR1) and the CKS1 and CKS0 bits in the serial mode register (SCSMR1). The equation for
  28930. calculating the bit rate is shown below. Table 17.5 shows some sample bit rates.
  28931.  
  28932. If clock output is selected with CKE0 set to 1, a clock with a frequency of 372 times the bit rate is
  28933. output from the SCK pin.
  28934.  
  28935.  
  28936. P
  28937. B = φ × 106
  28938. 1488 × 22n–1 × (N + 1)
  28939.  
  28940. Where: N = Value set in SCBRR1 (0 ≤ N ≤ 255)
  28941. B = Bit rate (bits/s)
  28942. Pφ = Peripheral module operating frequency (MHz)
  28943. n = 0 to 3 (See table 17.4)
  28944.  
  28945. Table 17.4Values of n and Corresponding CKS1 and CKS0 Settings
  28946.  
  28947. n CKS1 CKS0
  28948.  
  28949. 0 0 0
  28950.  
  28951. 1 0 1
  28952.  
  28953. 2 1 0
  28954.  
  28955. 3 1 1
  28956.  
  28957. 583
  28958.  
  28959. ----------------------- Page 600-----------------------
  28960.  
  28961. Table 17.5 Examples of Bit Rate B (bits/s) for Various SCBRR1 Settings
  28962. (When n = 0)
  28963.  
  28964. Pφ (MHz)
  28965.  
  28966. N 7 . 1 4 2 4 1 0 . 0 0 10.7136 14.2848 2 5 . 0 3 3 . 0 5 0 . 0
  28967.  
  28968. 0 9600.0 13440.9 14400.0 19200.0 33602.2 44354.8 67204.3
  28969.  
  28970. 1 4800.0 6720.4 7200.0 9600.0 16801.1 22177.4 33602.2
  28971.  
  28972. 2 3200.0 4480.3 4800.0 6400.0 11200.7 14784.9 22401.4
  28973.  
  28974. Note: Bit rates are rounded to one decimal place.
  28975.  
  28976. The method of calculating the value to be set in the bit rate register (SCBRR1) from the peripheral
  28977. module operating frequency and bit rate is shown below. Here, N is an integer in the range 0 ≤ N
  28978. ≤ 255, and the smaller error is specified.
  28979.  
  28980.  
  28981. P
  28982. φ 6
  28983. N = × 10 – 1
  28984. 1488 × 22n–1 × B
  28985.  
  28986. Table 17.6 Examples of SCBRR1 Settings for Bit Rate B (bits/s) (When n = 0)
  28987.  
  28988. Pφ (MHz)
  28989.  
  28990. 7 . 1 4 2 4 1 0 . 0 0 10.7136 14.2848 2 5 . 0 0 3 3 . 0 0 5 0 . 0 0
  28991.  
  28992. Bits/s N Error N Error N Error N Error N Error N Error N Error
  28993.  
  28994. 9600 0 0.00 1 30.00 1 25.00 1 8.99 3 14.27 4 8.22 6 0.01
  28995.  
  28996. Table 17.7 Maximum Bit Rate at Various Frequencies (Smart Card Interface
  28997. Mode)
  28998.  
  28999. Pφ (MHz) Maximum Bit Rate (bits/s) N n
  29000.  
  29001. 7.1424 19200 0 0
  29002.  
  29003. 10.00 26882 0 0
  29004.  
  29005. 10.7136 28800 0 0
  29006.  
  29007. 16.00 43010 0 0
  29008.  
  29009. 20.00 53763 0 0
  29010.  
  29011. 25.0 67204 0 0
  29012.  
  29013. 30.0 80645 0 0
  29014.  
  29015. 33.0 88710 0 0
  29016.  
  29017. 50.0 67204 0 0
  29018.  
  29019. 584
  29020.  
  29021. ----------------------- Page 601-----------------------
  29022.  
  29023. The bit rate error is given by the following equation:
  29024.  
  29025. φ
  29026. P
  29027. Error (%) = 1488 × 22n–1 × B × (N + 1) × 106 – 1 × 100
  29028.  
  29029. Table 17.8 shows the relationship between the smart card interface transmit/receive clock register
  29030. settings and the output state.
  29031.  
  29032. Table 17.8Register Settings and SCK Pin State
  29033.  
  29034. Register Values SCK Pin
  29035.  
  29036. Setting SMIF G M CKE1 CKE0 Output S t ate
  29037. 1*1 1 0 0 0 Port Determined by setting of SPB1IO
  29038.  
  29039. and SPB1DT bits in SCSPTR1
  29040.  
  29041. 1 0 0 1 SCK (serial clock) output state
  29042. 2*2 1 1 0 0 Low output Low-level output state
  29043.  
  29044. 1 1 0 1 SCK (serial clock) output state
  29045. 3*2 1 1 1 0 High output High-level output state
  29046.  
  29047. 1 1 1 1 SCK (serial clock) output state
  29048.  
  29049. Notes: 1. The SCK output state changes as soon as the CKE0 bit setting is changed.
  29050. Clear the CKE1 bit to 0.
  29051. 2. Stopping and starting the clock by changing the CKE0 bit setting does not affect the
  29052. clock duty cycle.
  29053.  
  29054. Width is Width is
  29055. Port value
  29056. undefined undefined Port value
  29057.  
  29058. SCK
  29059.  
  29060. (a) When GM = 0
  29061.  
  29062. CKE1 value Specified Specified
  29063. width width CKE1 value
  29064.  
  29065. SCK
  29066.  
  29067. (b) When GM = 1
  29068.  
  29069. Figure 17.6 Difference in Clock Output According to GM Bit Setting
  29070.  
  29071. 585
  29072.  
  29073. ----------------------- Page 602-----------------------
  29074.  
  29075. 1 7 . 3 . 6 Data Transfer Operations
  29076.  
  29077. Initialization: Before transmitting and receiving data, the smart card interface must be
  29078. initialized as described below. Initialization is also necessary when switching from transmit mode
  29079. to receive mode, or vice versa. Figure 17.7 shows a sample initialization processing flowchart.
  29080.  
  29081. 1. Clear the TE and RE bits in the serial control register (SCSCR1) to 0.
  29082.  
  29083. 2. Clear error flags FER/ERS, PER, and ORER in the serial status register (SCSSR1) to 0.
  29084.  
  29085. 3. Set the GM bit, parity bit (O/E), and baud rate generator select bits (CKS1 and CKS0) in the
  29086. serial mode register (SCSMR1). Clear the CHR and MP bits to 0, and set the STOP and PE
  29087. bits to 1.
  29088.  
  29089. 4. Set the SMIF, SDIR, and SINV bits in the smart card mode register (SCSCMR1).
  29090.  
  29091. When the SMIF bit is set to 1, the TxD pin and RxD pin both go to the high-impedance state.
  29092.  
  29093. 5. Set the value corresponding to the bit rate in the bit rate register (SCBRR1).
  29094.  
  29095. 6. Set the clock source select bits (CKE1 and CKE0) in SCSCR1. Clear the TIE, RIE, TE, RE,
  29096. MPIE, and TEIE bits to 0.
  29097.  
  29098. If the CKE0 bit is set to 1, the clock is output from the SCK pin.
  29099.  
  29100. 7. Wait at least one bit interval, then set the TIE, RIE, TE, and RE bits in SCSCR1. Do not set
  29101. the TE bit and RE bit at the same time, except for self-diagnosis.
  29102.  
  29103. 586
  29104.  
  29105. ----------------------- Page 603-----------------------
  29106.  
  29107. Initialization
  29108.  
  29109. Clear TE and RE bits
  29110. 1
  29111. in SCSCR1 to 0
  29112.  
  29113. Clear FER/ERS, PER, and
  29114. 2
  29115. ORER flags in SCSCR1 to 0
  29116.  
  29117. In SCSMR1, set parity in O/E bit,
  29118. clock in CKS1 and CKS0 bits, 3
  29119. and set GM
  29120.  
  29121. Set SMIF, SDIR, and SINV bits
  29122. 4
  29123. in SCSCMR1
  29124.  
  29125. Set value in SCBRR1 5
  29126.  
  29127. In SCSCR1, set clock in CKE1
  29128. and CKE0 bits, and clear TIE, 6
  29129. RIE, TE, RE, MPIE, and
  29130. TEIE bits to 0.
  29131.  
  29132. Wait
  29133.  
  29134. No
  29135. 1-bit interval elapsed?
  29136.  
  29137. Yes
  29138.  
  29139. Set TIE, RIE, TE, and RE bits
  29140. 7
  29141. in SCSCR1
  29142.  
  29143. End
  29144.  
  29145. Figure 17.7 Sample Initialization Flowchart
  29146.  
  29147. Serial Data Transmission: As data transmission in smart card mode involves error signal
  29148. sampling and retransmission processing, the processing procedure is different from that for the
  29149. normal SCI. Figure 17.8 shows a sample transmission processing flowchart.
  29150.  
  29151. 1. Perform smart card interface mode initialization as described in Initialization above.
  29152.  
  29153. 2. Check that the FER/ERS error flag in SCSSR1 is cleared to 0.
  29154.  
  29155. 3. Repeat steps 2 and 3 until it can be confirmed that the TEND flag in SCSSR1 is set to 1.
  29156. 587
  29157.  
  29158. ----------------------- Page 604-----------------------
  29159.  
  29160. 4. Write the transmit data to SCTDR1, clear the TDRE flag to 0, and perform the transmit
  29161. operation. The TEND flag is cleared to 0.
  29162.  
  29163. 5. To continue transmitting data, go back to step 2.
  29164.  
  29165. 6. To end transmission, clear the TE bit to 0.
  29166.  
  29167. With the above processing, interrupt handling is possible.
  29168.  
  29169. If transmission ends and the TEND flag is set to 1 while the TIE bit is set to 1 and interrupt
  29170. requests are enabled, a transmit-data-empty interrupt (TXI) request will be generated. If an error
  29171. occurs in transmission and the ERS flag is set to 1 while the RIE bit is set to 1 and interrupt
  29172. requests are enabled, a transmit/receive-error interrupt (ERI) request will be generated. See Interrupt
  29173. Operation below for details.
  29174.  
  29175. 588
  29176.  
  29177. ----------------------- Page 605-----------------------
  29178.  
  29179. Start
  29180.  
  29181. Initialization 1
  29182.  
  29183. Start of transmission
  29184.  
  29185. 2
  29186. No
  29187. FER/ERS = 0?
  29188.  
  29189. Yes
  29190. Error handling
  29191.  
  29192. No
  29193. TEND = 1? 3
  29194.  
  29195. Yes
  29196.  
  29197. Write transmit data to SCTDR1,
  29198. and clear TDRE flag 4
  29199. in SCSSR1 to 0
  29200.  
  29201. No
  29202. All data transmitted? 5
  29203.  
  29204. Yes
  29205.  
  29206. No
  29207. FER/ERS = 0?
  29208.  
  29209. Yes
  29210. Error handling
  29211.  
  29212. No
  29213. TEND = 1?
  29214.  
  29215. Yes
  29216.  
  29217. Clear TE bit in SCSCR1 to 0 6
  29218.  
  29219. End of transmission
  29220.  
  29221. Figure 17.8 Sample Transmission Processing Flowchart
  29222.  
  29223. Serial Data Reception: Data reception in smart card mode uses the same processing procedure
  29224. as for the normal SCI. Figure 17.9 shows a sample reception processing flowchart.
  29225.  
  29226. 1. Perform smart card interface mode initialization as described in Initialization above.
  29227.  
  29228. 2. Check that the ORER flag and PER flag in SCSSR1 are cleared to 0. If either is set, perform
  29229. the appropriate receive error handling, then clear both the ORER and the PER flag to 0.
  29230.  
  29231. 589
  29232.  
  29233. ----------------------- Page 606-----------------------
  29234.  
  29235. 3. Repeat steps 2 and 3 until it can be confirmed that the RDRF flag is set to 1.
  29236.  
  29237. 4. Read the receive data from SCRDR1.
  29238.  
  29239. 5. To continue receiving data, clear the RDRF flag to 0 and go back to step 2.
  29240.  
  29241. 6. To end reception, clear the RE bit to 0.
  29242.  
  29243. With the above processing, interrupt handling is possible.
  29244.  
  29245. If reception ends and the RDRF flag is set to 1 while the RIE bit is set to 1 and interrupt requests
  29246. are enabled, a receive-data-full interrupt (RXI) request will be generated. If an error occurs in
  29247. reception and either the ORER flag or the PER flag is set to 1, a transmit/receive-error interrupt
  29248. (ERI) request will be generated.
  29249.  
  29250. See Interrupt Operation below for details.
  29251.  
  29252. If a parity error occurs during reception and the PER flag is set to 1, the received data is still
  29253. transferred to SCRDR1, and therefore this data can be read.
  29254.  
  29255. 590
  29256.  
  29257. ----------------------- Page 607-----------------------
  29258.  
  29259. Start
  29260.  
  29261. Initialization 1
  29262.  
  29263. Start of reception
  29264.  
  29265. 2
  29266. No
  29267. ORER = 0 and PER = 0?
  29268.  
  29269. Yes
  29270. Error handling
  29271.  
  29272. No
  29273. RDRF = 1? 3
  29274.  
  29275. Yes
  29276.  
  29277. Read receive data from
  29278. SCRDR1 and clear RDRF flag 4
  29279. in SCSSR1 to 0
  29280.  
  29281. No All data received? 5
  29282.  
  29283. Yes
  29284.  
  29285. Clear RE bit in SCSCR1 to 0 6
  29286.  
  29287. End of reception
  29288.  
  29289. Figure 17.9 Sample Reception Processing Flowchart
  29290.  
  29291. Mode Switching Operation: When switching from receive mode to transmit mode, first
  29292. confirm that the receive operation has been completed, then start from initialization, clearing RE
  29293. to 0 and setting TE to 1. The RDRF flag or the PER and ORER flags can be used to check that
  29294. the receive operation has been completed.
  29295.  
  29296. When switching from transmit mode to receive mode, first confirm that the transmit operation has
  29297. been completed, then start from initialization, clearing TE to 0 and setting RE to 1. The TEND
  29298. flag can be used to check that the transmit operation has been completed.
  29299.  
  29300. 591
  29301.  
  29302. ----------------------- Page 608-----------------------
  29303.  
  29304. Interrupt Operation: There are three interrupt sources in smart card interface mode, generating
  29305. transmit-data-empty interrupt (TXI) requests, transmit/receive-error interrupt (ERI) requests, and
  29306. receive-data-full interrupt (RXI) requests. The transmit-end interrupt (TEI) request cannot be used in
  29307. this mode.
  29308.  
  29309. When the TEND flag in SCSSR1 is set to 1, a TXI interrupt request is generated.
  29310.  
  29311. When the RDRF flag in SCSSR1 is set to 1, an RXI interrupt request is generated.
  29312.  
  29313. When any of flags ORER, PER, and FER/ERS in SCSSR1 is set to 1, an ERI interrupt request is
  29314. generated. The relationship between the operating states and interrupt sources is shown in table
  29315. 17.9.
  29316.  
  29317. Table 17.9 Smart Card Mode Operating States and Interrupt Sources
  29318.  
  29319. Operating State Flag Mask Bit Interrupt Source
  29320.  
  29321. Transmit mode Normal operation TEND TIE TXI
  29322.  
  29323. Error FER/ERS RIE ERI
  29324.  
  29325. Receive mode Normal operation RDRF RIE RXI
  29326.  
  29327. Error PER, ORER RIE ERI
  29328.  
  29329. Data Transfer Operation by DMAC: In smart card mode, as with the normal SCI, transfer
  29330. can be carried out using the DMAC. In a transmit operation, when the TEND flag in SCSSR1 is
  29331. set to 1, a TXI interrupt is requested. If the TXI request is designated beforehand as a DMAC
  29332. activation source, the DMAC will be activated by the TXI request, and transfer of the transmit data
  29333. will be carried out. The TEND flag is automatically cleared to 0 when data transfer is performed by
  29334. the DMAC. In the event of an error, the SCI retransmits the same data automatically. The TEND
  29335. flag remains cleared to 0 during this time, and the DMAC is not activated. Thus, the number of
  29336. bytes specified by the SCI and DMAC are transmitted automatically, including retransmission
  29337. following an error. However, the ERS flag is not cleared automatically when an error occurs, and
  29338. therefore the RIE bit should be set to 1 beforehand so that an ERI request will be generated in the
  29339. event of an error, and the ERS flag will be cleared.
  29340.  
  29341. In a receive operation, an RXI interrupt request is generated when the RDRF flag in SCSSR1 is
  29342. set to 1. If the RXI request is designated beforehand as a DMAC activation source, the DMAC will
  29343. be activated by the RXI request, and transfer of the receive data will be carried out.. The RDRF flag
  29344. is cleared to 0 automatically when data transfer is performed by the DMAC. If an error occurs, an
  29345. error flag is set but the RDRF flag is not. The DMAC is not activated, but instead, an ERI
  29346. interrupt request is sent to the CPU. The error flag must therefore be cleared.
  29347.  
  29348. When performing data transfer using the DMAC, it is essential to set and enable the DMAC before
  29349. carrying out SCI settings. For details of the DMAC setting procedures, see section 14, Direct
  29350. Memory Access Controller (DMAC).
  29351.  
  29352. 592
  29353.  
  29354. ----------------------- Page 609-----------------------
  29355.  
  29356. 1 7 . 4 Usage Notes
  29357.  
  29358. The following points should be noted when using the SCI as a smart card interface.
  29359.  
  29360. (1) Receive Data Sampling Timing and Receive Margin
  29361.  
  29362. In asynchronous mode, the SCI operates on a base clock with a frequency of 372 times the transfer
  29363. rate. In reception, the SCI synchronizes internally with the fall of the start bit, which it samples
  29364. on the base clock. Receive data is latched at the rising edge of the 186th base clock pulse. The
  29365. timing is shown in figure 17.10.
  29366.  
  29367. 372 clocks
  29368.  
  29369. 186 clocks
  29370.  
  29371. 0 185 371 0 185 371 0
  29372. Base clock
  29373.  
  29374. Start
  29375. Receive data
  29376. bit D0 D1
  29377. (RxD)
  29378.  
  29379. Synchronization
  29380. sampling timing
  29381.  
  29382. Data sampling
  29383. timing
  29384.  
  29385. Figure 17.10 Receive Data Sampling Timing in Smart Card Mode
  29386.  
  29387. The receive margin in smart card mode can therefore be expressed as shown in the following
  29388. equation.
  29389.  
  29390. 1 | D – 0.5 |
  29391. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100%
  29392. 2N N
  29393.  
  29394. M: Receive margin (%)
  29395. N: Ratio of clock frequency to bit rate (N = 372)
  29396. D: Clock duty cycle (D = 0 to 1.0)
  29397. L: Frame length (L =10)
  29398. F: Absolute deviation of clock frequency
  29399.  
  29400. 593
  29401.  
  29402. ----------------------- Page 610-----------------------
  29403.  
  29404. From the above equation, if F = 0 and D = 0.5, the receive margin is 49.866%, as given by the
  29405. following equation.
  29406.  
  29407. When D = 0.5 and F = 0:
  29408.  
  29409. M = (0.5 – 1/2 × 372) × 100% = 49.866%
  29410.  
  29411. (2) Retransfer Operations
  29412.  
  29413. Retransfer operations are performed by the SCI in receive mode and transmit mode as described
  29414. below.
  29415.  
  29416. Retransfer Operation when SCI is in Receive Mode
  29417.  
  29418. 1. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is
  29419. automatically set to 1. If the RIE bit in SCSCR1 is enabled at this time, an ERI interrupt
  29420. request is generated. The PER bit in SCSSR1 should be cleared to 0 before the next parity bit
  29421. is sampled.
  29422.  
  29423. 2. The RDRF bit in SCSSR1 is not set for a frame in which an error has occurred.
  29424.  
  29425. 3. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is not set
  29426. to 1.
  29427.  
  29428. 4. If no error is found when the received parity bit is checked, the receive operation is judged to
  29429. have been completed normally, and the RDRF bit in SCSSR1 is automatically set to 1. If the
  29430. RIE bit in SCSCR1 is enabled at this time, an RXI interrupt request is generated.
  29431.  
  29432. 5. When a normal frame is received, the pin retains the high-impedance state at the timing for
  29433. error signal transmission.
  29434.  
  29435. Retransfer Operation when SCI is in Transmit Mode
  29436.  
  29437. 1. If an error signal is sent back from the receiving side after transmission of one frame is
  29438. completed, the FER/ERS bit in SCSSR1 is set to 1. If the RIE bit in SCSCR1 is enabled at
  29439. this time, an ERI interrupt request is generated. The FER/ERS bit in SCSSR1 should be
  29440. cleared to 0 before the next parity bit is sampled.
  29441.  
  29442. 2. The TEND bit in SCSSR1 is not set for a frame for which an error signal indicating an error is
  29443. received.
  29444.  
  29445. 3. If an error signal is not sent back from the receiving side, the FER/ERS bit in SCSSR1 is not
  29446. set.
  29447.  
  29448. 4. If an error signal is not sent back from the receiving side, transmission of one frame, including
  29449. a retransfer, is judged to have been completed, and the TEND bit in SCSSR1 is set to 1. If the
  29450. TIE bit in SCSCR1 is enabled at this time, a TXI interrupt request is generated.
  29451.  
  29452. 594
  29453.  
  29454. ----------------------- Page 611-----------------------
  29455.  
  29456. (3) Standby Mode and Clock
  29457.  
  29458. When switching between smart card interface mode and standby mode, the following procedures
  29459. should be used to maintain the clock duty cycle.
  29460.  
  29461. Switching from Smart Card Interface Mode to Standby Mode:
  29462. 1. Set the SBP1IO and SBP1DT bits in SCSPTR1 to the values for the fixed output state in
  29463. standby mode.
  29464.  
  29465. 2. Write 0 to the TE and RE bits in the serial control register (SCSCR1) to stop transmit/receive
  29466. operations. At the same time, set the CKE1 bit to the value for the fixed output state in
  29467. standby mode.
  29468.  
  29469. 3. Write 0 to the CKE0 bit in SCSCR1 to stop the clock.
  29470.  
  29471. 4. Wait for one serial clock cycle. During this period, the duty cycle is preserved and clock output
  29472. is fixed at the specified level.
  29473.  
  29474. 5. Write H'00 to the serial mode register (SCSMR1) and smart card mode register (SCSMR1).
  29475.  
  29476. 6. Make the transition to the standby state.
  29477.  
  29478. Returning from Standby Mode to Smart Card Interface Mode:
  29479. 7. Clear the standby state.
  29480.  
  29481. 8. Set the CKE1 bit in SCSCR1 to the value for the fixed output state at the start of standby (the
  29482. current SCK pin state).
  29483.  
  29484. 9. Set smart card interface mode and output the clock. Clock signal generation is started with the
  29485. normal duty cycle.
  29486.  
  29487. 595
  29488.  
  29489. ----------------------- Page 612-----------------------
  29490.  
  29491. (4) Power-On and Clock
  29492.  
  29493. The following procedure should be used to secure the clock duty cycle after powering on.
  29494.  
  29495. 1. The initial state is port input and high impedance. Use pull-up or pull-down resistors to fix the
  29496. potential.
  29497.  
  29498. 2. Fix at the output specified by the CKE1 bit in the serial control register (SCSCR1).
  29499.  
  29500. 3. Set the serial mode register (SCSMR1) and smart card mode register (SCSCMR1), and switch
  29501. to smart card mode operation.
  29502.  
  29503. 4. Set the CKE0 bit in SCSCR1 to 1 to start clock output.
  29504.  
  29505. 596
  29506.  
  29507. ----------------------- Page 613-----------------------
  29508.  
  29509. Section 18 I/O Ports
  29510.  
  29511. 18.1 Overview
  29512.  
  29513. The SH7750 has a 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port.
  29514.  
  29515. 18.1.1 Features
  29516.  
  29517. The features of the general-purpose I/O port are as follows:
  29518.  
  29519. • 20-bit I/O port with input/output direction independently specifiable for each bit
  29520.  
  29521. • Pull-up can be specified independently for each bit.
  29522.  
  29523. • Interrupt input is possible for 16 of the 20 I/O port bits.
  29524.  
  29525. • Use or non-use of the I/O port can be selected with the PORTEN bit in bus control register
  29526. 2 (BCR2).
  29527.  
  29528. The features of the SCI I/O port are as follows:
  29529.  
  29530. • Data can be output when the I/O port is designated for output and SCI enabling has not
  29531. been set. This allows break function transmission.
  29532.  
  29533. • The RxD pin value can be read at all times, allowing break state detection.
  29534.  
  29535. • SCK pin control is possible when the I/O port is designated for output and SCI enabling
  29536. has not been set.
  29537.  
  29538. • The SCK pin value can be read at all times.
  29539.  
  29540. The features of the SCIF I/O port are as follows:
  29541.  
  29542. • Data can be output when the I/O port is designated for output and SCIF enabling has not
  29543. been set. This allows break function transmission.
  29544.  
  29545. • The RxD2 pin value can be read at all times, allowing break state detection.
  29546.  
  29547. • and pin control is possible when the I/O port is designated for output and
  29548. SCIF enabling has not been set.
  29549.  
  29550. • The and pin values can be read at all times.
  29551.  
  29552. 597
  29553.  
  29554. ----------------------- Page 614-----------------------
  29555.  
  29556. 18.1.2 Block Diagrams
  29557.  
  29558. Figure 18.1 shows a block diagram of the 16-bit general-purpose I/O port.
  29559.  
  29560. PBnPUP
  29561. PORTEN Pull-up resistor
  29562.  
  29563. Internal bus
  29564. 0 Port 15 (input/
  29565. Dn output data X output)/D47
  29566. P to
  29567. D Q 1 M Port 0 (input/
  29568.  
  29569. PDTRW C output)/D32
  29570.  
  29571. BCK
  29572.  
  29573. 0
  29574. DnDIR
  29575. X
  29576. P
  29577. 1 M
  29578. PBnIO
  29579.  
  29580. 0 Data input strobe
  29581. X
  29582. P
  29583. M 1 C
  29584. Q
  29585. D
  29586.  
  29587. Interrupt PTIRENn BCK
  29588. controller Dn input data
  29589.  
  29590. PORTEN 0: Port not available 1: Port available
  29591. PBnPuP 0: Pull-up 1: Pull-up off
  29592. DnDIR 0: Input 1: Output
  29593. PBnIO 0: Input 1: Output
  29594. PTIRENn 0: Interrupt input disabled 1: Interrupt input enabled
  29595.  
  29596. Figure 18.1 16-Bit Port
  29597.  
  29598. 598
  29599.  
  29600. ----------------------- Page 615-----------------------
  29601.  
  29602. Figure 18.2 shows a block diagram of the 4-bit general-purpose I/O port.
  29603.  
  29604. PBnPUP
  29605. Pull-up resistor
  29606. PORTEN
  29607.  
  29608. Internal bus
  29609. 0 Port 19 (input/
  29610. Dn output data X output)/D51
  29611. P to
  29612. D Q 1 M Port 16 (input/
  29613.  
  29614. PDTRW C output)/D48
  29615.  
  29616. BCK
  29617.  
  29618. 0
  29619. DnDIR
  29620. X
  29621. P
  29622. 1 M
  29623. PBnIO
  29624.  
  29625. 0 Data input strobe
  29626.  
  29627. X
  29628. P
  29629. M 1 C
  29630. Q D
  29631.  
  29632. BCK
  29633. Dn input data
  29634.  
  29635. PORTEN 0: Port not available 1: Port available
  29636. PBnPuP 0: Pull-up 1: Pull-up off
  29637. DnDIR 0: Input 1: Output
  29638. PBnIO 0: Input 1: Output
  29639.  
  29640. Figure 18.2 4-Bit Port
  29641.  
  29642. 599
  29643.  
  29644. ----------------------- Page 616-----------------------
  29645.  
  29646. SCI I/O port block diagrams are shown in figures 18.3 to 18.5.
  29647.  
  29648. Reset
  29649.  
  29650. R
  29651. Q D
  29652. SPB1IO
  29653. C
  29654.  
  29655. Internal data bus
  29656. SPTRW
  29657.  
  29658. Reset
  29659.  
  29660. MD0/SCK
  29661. R
  29662. Q D
  29663.  
  29664. SPB1DT
  29665. C SCI
  29666.  
  29667. SPTRW Clock output enable signal
  29668.  
  29669. Mode setting Serial clock output signal *
  29670. register
  29671. Serial clock input signal
  29672.  
  29673. Clock input enable signal
  29674.  
  29675. SPTRR
  29676.  
  29677. SPTRW: Write to SPTR
  29678. SPTRR: Read SPTR
  29679.  
  29680. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  29681. the CKE0 and CKE1 bits in SCSCR1 and the C/ bit in SCSMR1.
  29682.  
  29683. Figure 18.3 MD0/SCK Pin
  29684.  
  29685. 600
  29686.  
  29687. ----------------------- Page 617-----------------------
  29688.  
  29689. Reset
  29690.  
  29691. R
  29692. Q D
  29693. SPB0IO
  29694. C Internal data bus
  29695.  
  29696. SPTRW
  29697.  
  29698. Reset
  29699. MD7/TxD
  29700. R
  29701. Q D
  29702. SPB0DT
  29703. C SCI
  29704.  
  29705. SPTRW Transmit enable signal
  29706.  
  29707. Mode setting register
  29708.  
  29709. Serial transmit data
  29710.  
  29711. SPTRW: Write to SPTR
  29712.  
  29713. Figure 18.4 MD7/TxD Pin
  29714.  
  29715. SCI
  29716. RxD
  29717.  
  29718. Serial receive data
  29719.  
  29720. Internal data bus
  29721.  
  29722. SPTRR
  29723.  
  29724. SPTRR: Read SPTR
  29725.  
  29726. Figure 18.5 RxD Pin
  29727.  
  29728. 601
  29729.  
  29730. ----------------------- Page 618-----------------------
  29731.  
  29732. SCIF I/O port block diagrams are shown in figures 18.6 to 18.9.
  29733.  
  29734. Reset
  29735.  
  29736. R
  29737. Q D
  29738. SPB2IO
  29739. C Internal data bus
  29740.  
  29741. SPTRW
  29742.  
  29743. Reset
  29744. MD1/TxD2
  29745. R
  29746. Q D
  29747. SPB2DT
  29748. C SCIF
  29749.  
  29750. Transmit enable
  29751. SPTRW
  29752. signal
  29753.  
  29754. Mode setting
  29755. register Serial transmit data
  29756.  
  29757. SPTRW: Write to SPTR
  29758.  
  29759. Figure 18.6 MD1/TxD2 Pin
  29760.  
  29761. SCIF
  29762. MD2/RxD2
  29763.  
  29764. Serial receive
  29765. Mode setting data
  29766. register
  29767.  
  29768. Internal data bus
  29769.  
  29770. SPTRR
  29771.  
  29772. SPTRR: Read SPTR
  29773.  
  29774. Figure 18.7 MD2/RxD2 Pin
  29775.  
  29776. 602
  29777.  
  29778. ----------------------- Page 619-----------------------
  29779.  
  29780. Reset
  29781.  
  29782. R
  29783. Q D
  29784. CTSIO
  29785. C Internal data bus
  29786.  
  29787. SPTRW
  29788.  
  29789. Reset
  29790.  
  29791. R
  29792. Q D
  29793. CTSDT
  29794. C SCIF
  29795.  
  29796. SPTRW
  29797.  
  29798. signal
  29799.  
  29800. Modem control enable
  29801. signal*
  29802.  
  29803. SPTRR
  29804.  
  29805. SPTRW: Write to SPTR
  29806. SPTRR: Read SPTR
  29807.  
  29808. Note: * MCE bit in SCFCR2: signal that designates modem control as the pin function.
  29809.  
  29810. Figure 18.8 Pin
  29811.  
  29812. 603
  29813.  
  29814. ----------------------- Page 620-----------------------
  29815.  
  29816. Reset
  29817.  
  29818. R
  29819. Q D
  29820. RTSIO
  29821. C Internal data bus
  29822.  
  29823. SPTRW
  29824.  
  29825. Reset
  29826. MD8/
  29827. R
  29828. Q D
  29829. RTSDT
  29830. C SCIF
  29831.  
  29832. Modem control
  29833. SPTRW
  29834. enable signal*
  29835.  
  29836. Mode setting
  29837. register signal
  29838.  
  29839. SPTRR
  29840.  
  29841. SPTRW: Write to SPTR
  29842. SPTRR: Read SPTR
  29843.  
  29844. Note: * MCE bit in SCFCR2: signal that designates modem control as the pin function.
  29845.  
  29846. Figure 18.9 MD8/ Pin
  29847.  
  29848. 604
  29849.  
  29850. ----------------------- Page 621-----------------------
  29851.  
  29852. 18.1.3 Pin Configuration
  29853.  
  29854. Table 18.1 shows the 20-bit general-purpose I/O port pin configuration.
  29855.  
  29856. Table 18.1 20-Bit General-Purpose I/O Port Pins
  29857.  
  29858. Pin Name Signal I / O Function
  29859.  
  29860. Port 19 pin PORT19 I/O I/O port
  29861.  
  29862. Port 18 pin PORT18 I/O I/O port
  29863.  
  29864. Port 17 pin PORT17 I/O I/O port
  29865.  
  29866. Port 16 pin PORT16 I/O I/O port
  29867.  
  29868. Port 15 pin PORT15 I/O* I/O port / GPIO interrupt
  29869.  
  29870. Port 14 pin PORT14 I/O* I/O port / GPIO interrupt
  29871.  
  29872. Port 13 pin PORT13 I/O* I/O port / GPIO interrupt
  29873.  
  29874. Port 12 pin PORT12 I/O* I/O port / GPIO interrupt
  29875.  
  29876. Port 11 pin PORT11 I/O* I/O port / GPIO interrupt
  29877.  
  29878. Port 10 pin PORT10 I/O* I/O port / GPIO interrupt
  29879.  
  29880. Port 9 pin PORT9 I/O* I/O port / GPIO interrupt
  29881.  
  29882. Port 8 pin PORT8 I/O* I/O port / GPIO interrupt
  29883.  
  29884. Port 7 pin PORT7 I/O* I/O port / GPIO interrupt
  29885.  
  29886. Port 6 pin PORT6 I/O* I/O port / GPIO interrupt
  29887.  
  29888. Port 5 pin PORT5 I/O* I/O port / GPIO interrupt
  29889.  
  29890. Port 4 pin PORT4 I/O* I/O port / GPIO interrupt
  29891.  
  29892. Port 3 pin PORT3 I/O* I/O port / GPIO interrupt
  29893.  
  29894. Port 2 pin PORT2 I/O* I/O port / GPIO interrupt
  29895.  
  29896. Port 1 pin PORT1 I/O* I/O port / GPIO interrupt
  29897.  
  29898. Port 0 pin PORT0 I/O* I/O port / GPIO interrupt
  29899.  
  29900. Note: * When port pins are used as GPIO interrupts, they must be set to input mode. The input
  29901. setting can be made in the PCTRA register.
  29902.  
  29903. 605
  29904.  
  29905. ----------------------- Page 622-----------------------
  29906.  
  29907. Table 18.2 shows the SCI I/O port pin configuration.
  29908.  
  29909. Table 18.2 SCI I/O Port Pins
  29910.  
  29911. Pin Name Abbreviation I / O Function
  29912.  
  29913. Serial clock pin MD0/SCK I/O Clock input/output
  29914.  
  29915. Receive data pin RxD Input Receive data input
  29916.  
  29917. Transmit data pin MD7/TxD Output Transmit data output
  29918.  
  29919. Note: Pins MD0/SCK and MD7/TxD function as mode input pins MD0 and MD7 after a power-on
  29920. reset. They are made to function as serial pins by performing SCI operation settings with
  29921. the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/ bit in SCSMR1. Break state
  29922. transmission and detection can be performed by means of a setting in the SCI’s SCSPTR1
  29923. register.
  29924.  
  29925. Table 18.3 shows the SCIF I/O port pin configuration.
  29926.  
  29927. Table 18.3 SCIF I/O Port Pins
  29928.  
  29929. Pin Name Abbreviation I / O Function
  29930.  
  29931. Serial clock pin MRESET/SCK2 Input Clock input
  29932.  
  29933. Receive data pin MD2/RxD2 Input Receive data input
  29934.  
  29935. Transmit data pin MD1/TxD2 Output Transmit data output
  29936.  
  29937. Modem control pin I/O Transmission enabled
  29938.  
  29939. Modem control pin MD8/ I/O Transmission request
  29940.  
  29941. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset is
  29942. executed. The MD1/TxD2, MD2/RxD2, and MD8/ pins function as the MD1, MD2, and
  29943. MD8 mode input pins after a power-on reset. These pins are made to function as serial pins
  29944. by performing SCIF operation settings with the TE and RE bits in SCSCR2 and the MCE bit in
  29945. SCFCR2. Break state transmission and detection can be set in the SCIF’s SCSPTR2
  29946. register.
  29947.  
  29948. 606
  29949.  
  29950. ----------------------- Page 623-----------------------
  29951.  
  29952. 18.1.4 Register Configuration
  29953.  
  29954. The 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port have seven registers, as
  29955. shown in table 18.4.
  29956.  
  29957. Table 18.4 I/O Port Registers
  29958.  
  29959. Area 7 Acces
  29960. Name Abbreviatio R/ W Initial P4 Address Address s Size
  29961. n Value*
  29962.  
  29963. Port control register A PCTRA R/W H'00000000 H'FF80002C H'1F80002C 32
  29964.  
  29965. Port data register A PDTRA R/W Undefined H'FF800030 H'1F800030 16
  29966.  
  29967. Port control register B PCTRB R/W H'00000000 H'FF800040 H'1F800040 32
  29968.  
  29969. Port data register B PDTRB R/W Undefined H'FF800044 H'1F800044 16
  29970.  
  29971. GPIO interrupt control GPIOIC R/W H'00000000 H'FF800048 H'1F800048 16
  29972. register
  29973.  
  29974. Serial port register SCSPTR1 R/W Undefined H'FFE0001C H'1FE0001C 8
  29975.  
  29976. Serial port register SCSPTR2 R/W Undefined H'FFE80020 H'1FE80020 16
  29977.  
  29978. Note: * Initialized by a power-on reset.
  29979.  
  29980. 607
  29981.  
  29982. ----------------------- Page 624-----------------------
  29983.  
  29984. 18.2 Register Descriptions
  29985.  
  29986. 18.2.1 Port Control Register A (PCTRA)
  29987.  
  29988. Port control register A (PCTRA) is a 32-bit readable/writable register that controls the
  29989. input/output direction and pull-up for each bit in the 16-bit port (port 15 pin to port 0 pin). As
  29990. the initial value of port data register A (PDTRA) is undefined, all the bits in the 16-bit port
  29991. should be set to output with PCTRA after writing a value to the PDTRA register.
  29992.  
  29993. PCTRA is initialized to H'00000000 by a power-on reset. It is not initialized by a manual
  29994. reset or in standby mode, and retains its contents.
  29995.  
  29996. Bit: 31 30 29 28 27 26 25 24
  29997.  
  29998. PB15PUP PB15IO PB14PUP PB14IO PB13PUP PB13IO PB12PUP PB12IO
  29999.  
  30000. Initial value: 0 0 0 0 0 0 0 0
  30001.  
  30002. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30003.  
  30004. Bit: 23 22 21 20 19 18 17 16
  30005.  
  30006. PB11PUP PB11IO PB10PUP PB10IO PB9PUP PB9IO PB8PUP PB8IO
  30007.  
  30008. Initial value: 0 0 0 0 0 0 0 0
  30009.  
  30010. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30011.  
  30012. Bit: 15 14 13 12 11 10 9 8
  30013.  
  30014. PB7PUP PB7IO PB6PUP PB6IO PB5PUP PB5IO PB4PUP PB4IO
  30015.  
  30016. Initial value: 0 0 0 0 0 0 0 0
  30017.  
  30018. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30019.  
  30020. Bit: 7 6 5 4 3 2 1 0
  30021.  
  30022. PB3PUP PB3IO PB2PUP PB2IO PB1PUP PB1IO PB0PUP PB0IO
  30023.  
  30024. Initial value: 0 0 0 0 0 0 0 0
  30025.  
  30026. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30027.  
  30028. 608
  30029.  
  30030. ----------------------- Page 625-----------------------
  30031.  
  30032. Bit 2n + 1 (n = 0–15)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the
  30033. 16-bit port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a
  30034. port pin set to output by bit PBnIO.
  30035.  
  30036. Bit 2n + 1: PBnPUP Description
  30037.  
  30038. 0 Bit m (m = 0–15) of 16-bit port is pulled up (Initial value)
  30039.  
  30040. 1 Bit m (m = 0–15) of 16-bit port is not pulled up
  30041.  
  30042. Bit 2n (n = 0–15)—Port I/O Control (PBnIO): Specifies whether each bit in the 16-bit port
  30043. is an input or an output.
  30044.  
  30045. Bit 2n: PBnIO Description
  30046.  
  30047. 0 Bit m (m = 0–15) of 16-bit port is an input (Initial value)
  30048.  
  30049. 1 Bit m (m = 0–15) of 16-bit port is an output
  30050.  
  30051. 18.2.2 Port Data Register A (PDTRA)
  30052.  
  30053. Port data register A (PDTRA) is a 16-bit readable/writable register used as a data latch for
  30054. each bit in the 16-bit port. When a bit is set as an output, the value written to the PDTRA
  30055. register is output from the external pin. When a value is read from the PDTRA register while
  30056. a bit is set as an input, the external pin value sampled on the external bus clock is read.
  30057. When a bit is set as an output, the value written to the PDTRA register is read.
  30058.  
  30059. PDTR is not initialized by a power-on or manual reset, or in standby mode, and retains its
  30060. contents.
  30061.  
  30062. Bit: 15 14 13 12 11 10 9 8
  30063.  
  30064. PB15DT PB14DT PB13DT PB12DT PB11DT PB10DT PB9DT PB8DT
  30065.  
  30066. Initial value: — — — — — — — —
  30067.  
  30068. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30069.  
  30070. Bit: 7 6 5 4 3 2 1 0
  30071.  
  30072. PB7DT PB6DT PB5DT PB4DT PB3DT PB2DT PB1DT PB0DT
  30073.  
  30074. Initial value: — — — — — — — —
  30075.  
  30076. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30077.  
  30078. 609
  30079.  
  30080. ----------------------- Page 626-----------------------
  30081.  
  30082. 18.2.3 Port Control Register B (PCTRB)
  30083.  
  30084. Port control register B (PCTRB) is a 32-bit readable/writable register that controls the
  30085. input/output direction and pull-up for each bit in the 4-bit port (port 19 pin to port 16 pin). As
  30086. the initial value of port data register B (PDTRB) is undefined, each bit in the 4-bit port
  30087. should be set to output with PCTRB after writing a value to the PDTRB register.
  30088.  
  30089. PCTRB is initialized to H'00000000 by a power-on reset. It is not initialized by a manual
  30090. reset or in standby mode, and retains its contents.
  30091.  
  30092. Bit: 31 30 29 28 27 26 25 24
  30093.  
  30094. — — — — — — — —
  30095.  
  30096. Initial value: 0 0 0 0 0 0 0 0
  30097.  
  30098. R/W: R R R R R R R R
  30099.  
  30100. Bit: 23 22 21 20 19 18 17 16
  30101.  
  30102. — — — — — — — —
  30103.  
  30104. Initial value: 0 0 0 0 0 0 0 0
  30105.  
  30106. R/W: R R R R R R R R
  30107.  
  30108. Bit: 15 14 13 12 11 10 9 8
  30109.  
  30110. — — — — — — — —
  30111.  
  30112. Initial value: 0 0 0 0 0 0 0 0
  30113.  
  30114. R/W: R R R R R R R R
  30115.  
  30116. Bit: 7 6 5 4 3 2 1 0
  30117.  
  30118. PB19PUP PB19IO PB18PUP PB18IO PB17PUP PB17IO PB16PUP PB16IO
  30119.  
  30120. Initial value: 0 0 0 0 0 0 0 0
  30121.  
  30122. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30123.  
  30124. Bit 2n + 1 (n = 0–3)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the 4-
  30125. bit port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a port
  30126. pin set to output by bit PBnIO.
  30127.  
  30128. Bit 2n + 1: PBnPUP Description
  30129.  
  30130. 0 Bit m (m = 16–19) of 4-bit port is pulled up (Initial value)
  30131.  
  30132. 1 Bit m (m = 16–19) of 4-bit port is not pulled up
  30133.  
  30134. 610
  30135.  
  30136. ----------------------- Page 627-----------------------
  30137.  
  30138. Bit 2n (n = 0–3)—Port I/O Control (PBnIO): Specifies whether each bit in the 4-bit port is
  30139. an input or an output.
  30140.  
  30141. Bit 2n: PBnIO Description
  30142.  
  30143. 0 Bit m (m = 16–19) of 4-bit port is an input (Initial value)
  30144.  
  30145. 1 Bit m (m = 16–19) of 4-bit port is an output
  30146.  
  30147. 18.2.4 Port Data Register B (PDTRB)
  30148.  
  30149. Port data register B (PDTRB) is a 16-bit readable/writable register used as a data latch for
  30150. each bit in the 4-bit port. When a bit is set as an output, the value written to the PDTRB
  30151. register is output from the external pin. When a value is read from the PDTRB register while
  30152. a bit is set as an input, the external pin value sampled on the external bus clock is read.
  30153. When a bit is set as an output, the value written to the PDTRB register is read.
  30154.  
  30155. PDTRB is not initialized by a power-on or manual reset, or in standby mode, and retains its
  30156. contents.
  30157.  
  30158. Bit: 15 14 13 12 11 10 9 8
  30159.  
  30160. — — — — — — — —
  30161.  
  30162. Initial value: 0 0 0 0 0 0 0 0
  30163.  
  30164. R/W: R R R R R R R R
  30165.  
  30166. Bit: 7 6 5 4 3 2 1 0
  30167.  
  30168. — — — — PB19DT PB18DT PB17DT PB16DT
  30169.  
  30170. Initial value: 0 0 0 0 — — — —
  30171.  
  30172. R/W: R R R R R/W R/W R/W R/W
  30173.  
  30174. 18.2.5 GPIO Interrupt Control Register (GPIOIC)
  30175.  
  30176. The GPIO interrupt control register (GPIOIC) is a 16-bit readable/writable register that
  30177. performs 16-bit interrupt input control.
  30178.  
  30179. GPIOIC is initialized to H'0000 by a power-on reset. It is not initialized by a manual reset or
  30180. in standby mode, and retains its contents.
  30181.  
  30182. GPIO interrupts are active-low level interrupts. Bit-by-bit masking is possible, and the OR of
  30183. all the bits set as GPIO interrupts is used for interrupt detection. Which bits interrupts are
  30184. input to can be identified by reading the PDTRA register.
  30185.  
  30186. 611
  30187.  
  30188. ----------------------- Page 628-----------------------
  30189.  
  30190. Bit: 15 14 13 12 11 10 9 8
  30191.  
  30192. PTIREN15 PTIREN14 PTIREN13 PTIREN12 PTIREN11 PTIREN10 PTIREN9 PTIREN8
  30193.  
  30194. Initial value: 0 0 0 0 0 0 0 0
  30195.  
  30196. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30197.  
  30198. Bit: 7 6 5 4 3 2 1 0
  30199.  
  30200. PTIREN7 PTIREN6 PTIREN5 PTIREN4 PTIREN3 PTIREN2 PTIREN1 PTIREN0
  30201.  
  30202. Initial value: 0 0 0 0 0 0 0 0
  30203.  
  30204. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30205.  
  30206. Bit n (n = 0–15)—Port Interrupt Enable (PTIRENn): Specifies whether interrupt input is
  30207. performed for each bit.
  30208.  
  30209. Bit n: PTIRENn Description
  30210.  
  30211. 0 Port m (m = 0–15) of 16-bit port is used as a normal I/O port (Initial value)
  30212.  
  30213. 1 Port m (m = 0–15) of 16-bit port is used as a GPIO interrupt*
  30214.  
  30215. Note: * When using an interrupt, set the corresponding port to input in the PCTRA register before
  30216. making the PTIRENn setting.
  30217.  
  30218. 18.2.6 Serial Port Register (SCSPTR1)
  30219.  
  30220. Bit: 7 6 5 4 3 2 1 0
  30221.  
  30222. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  30223.  
  30224. Initial value: 0 0 0 0 0 — 0 —
  30225.  
  30226. R/W: R/W — — — R/W R/W R/W R/W
  30227.  
  30228. The serial port register (SCSPTR1) is an 8-bit readable/writable register that controls
  30229. input/output and data for the port pins multiplexed with the serial communication interface
  30230. (SCI) pins. Input data can be read from the RxD pin, output data written to the TxD pin, and
  30231. breaks in serial transmission/reception controlled, by means of bits 1 and 0. SCK pin data
  30232. reading and output data writing can be performed by means of bits 3 and 2. Bit 7 controls
  30233. enabling and disabling of the RXI interrupt.
  30234.  
  30235. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2
  30236. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is
  30237. undefined. SCSPTR1 is not initialized in the module standby state or standby mode.
  30238.  
  30239. Bit 7—Error Interrupt Only (EIO): See section 15.2.8, Serial Port Register (SCSPTR1).
  30240.  
  30241. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  30242.  
  30243. 612
  30244.  
  30245. ----------------------- Page 629-----------------------
  30246.  
  30247. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin input/output.
  30248. When the SCK pin is actually set as a port output pin and outputs the value set by the
  30249. SPB1DT bit, the C/ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be
  30250. cleared to 0.
  30251.  
  30252. Bit 3: SPB1IO Description
  30253.  
  30254. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  30255.  
  30256. 1 SPB1DT bit value is output to the SCK pin
  30257.  
  30258. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin
  30259. input/output data. Input or output is specified by the SPB1IO bit (see the description of bit 3,
  30260. SPB1IO, for details). When output is specified, the value of the SPB1DT bit is output to the
  30261. SCK pin. The SCK pin value is read from the SPB1DT bit regardless of the value of the
  30262. SPB1IO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  30263.  
  30264. Bit 2: SPB1DT Description
  30265.  
  30266. 0 Input/output data is low-level
  30267.  
  30268. 1 Input/output data is high-level
  30269.  
  30270. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output condition.
  30271. When the TxD pin is actually set as a port output pin and outputs the value set by the
  30272. SPB0DT bit, the TE bit in SCSCR1 should be cleared to 0.
  30273.  
  30274. Bit 1: SPB0IO Description
  30275.  
  30276. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  30277.  
  30278. 1 SPB0DT bit value is output to the TxD pin
  30279.  
  30280. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data and
  30281. TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  30282. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the
  30283. value of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the
  30284. SPB0DT bit regardless of the value of the SPB0IO bit. The initial value of this bit after a
  30285. power-on reset or manual reset is undefined.
  30286.  
  30287. Bit 0: SPB0DT Description
  30288.  
  30289. 0 Input/output data is low-level
  30290.  
  30291. 1 Input/output data is high-level
  30292.  
  30293. 613
  30294.  
  30295. ----------------------- Page 630-----------------------
  30296.  
  30297. 18.2.7 Serial Port Register (SCSPTR2)
  30298.  
  30299. Bit: 15 14 13 12 11 10 9 8
  30300.  
  30301. — — — — — — — —
  30302.  
  30303. Initial value: 0 0 0 0 0 0 0 0
  30304.  
  30305. R/W: R R R R R R R R
  30306.  
  30307. Bit: 7 6 5 4 3 2 1 0
  30308.  
  30309. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  30310.  
  30311. Initial value: 0 — 0 — 0 0 0 —
  30312.  
  30313. R/W: R/W R/W R/W R/W R R R/W R/W
  30314.  
  30315. The serial port register (SCSPTR2) is a 16-bit readable/writable register that controls
  30316. input/output and data for the port pins multiplexed with the serial communication interface
  30317. (SCIF) pins. Input data can be read from the RxD2 pin, output data written to the TxD2 pin,
  30318. and breaks in serial transmission/reception controlled, by means of bits 1 and 0. pin
  30319. data reading and output data writing can be performed by means of bits 5 and 4, and
  30320. pin data reading and output data writing by means of bits 7 and 6.
  30321.  
  30322. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6,
  30323. 4, and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0
  30324. is undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  30325.  
  30326. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  30327.  
  30328. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies serial port pin input/output.
  30329. When the pin is actually set as a port output pin and outputs the value set by the
  30330. RTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  30331.  
  30332. Bit 7: RTSIO Description
  30333.  
  30334. 0 RTSDT bit value is not output to the pin (Initial value)
  30335.  
  30336. 1 RTSDT bit value is output to the pin
  30337.  
  30338. 614
  30339.  
  30340. ----------------------- Page 631-----------------------
  30341.  
  30342. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port pin input/output
  30343. data. Input or output is specified by the RTSIO pin (see the description of bit 7, RTSIO, for
  30344. details). When the pin is designated as an output, the value of the RTSDT bit is output
  30345. to the pin. The pin value is read from the RTSDT bit regardless of the value of
  30346. the RTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  30347.  
  30348. Bit 6: RTSDT Description
  30349.  
  30350. 0 Input/output data is low-level
  30351.  
  30352. 1 Input/output data is high-level
  30353.  
  30354. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies serial port pin input/output.
  30355. When the pin is actually set as a port output pin and outputs the value set by the
  30356. CTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  30357.  
  30358. Bit 5: CTSIO Description
  30359.  
  30360. 0 CTSDT bit value is not output to the pin (Initial value)
  30361.  
  30362. 1 CTSDT bit value is output to the pin
  30363.  
  30364. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port pin input/output
  30365. data. Input or output is specified by the CTSIO pin (see the description of bit 5, CTSIO, for
  30366. details). When the pin is designated as an output, the value of the CTSDT bit is output
  30367. to the pin. The pin value is read from the CTSDT bit regardless of the value of
  30368. the CTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  30369.  
  30370. Bit 4: CTSDT Description
  30371.  
  30372. 0 Input/output data is low-level
  30373.  
  30374. 1 Input/output data is high-level
  30375.  
  30376. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  30377.  
  30378. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output condition.
  30379. When the TxD2 pin is actually set as a port output pin and outputs the value set by the
  30380. SPB2DT bit, the TE bit in SCSCR2 should be cleared to 0.
  30381.  
  30382. Bit 1: SPB2IO Description
  30383.  
  30384. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  30385.  
  30386. 1 SPB2DT bit value is output to the TxD2 pin
  30387.  
  30388. 615
  30389.  
  30390. ----------------------- Page 632-----------------------
  30391.  
  30392. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data and
  30393. TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  30394. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the
  30395. value of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the
  30396. SPB2DT bit regardless of the value of the SPB2IO bit. The initial value of this bit after a
  30397. power-on reset or manual reset is undefined.
  30398.  
  30399. Bit 0: SPB2DT Description
  30400.  
  30401. 0 Input/output data is low-level
  30402.  
  30403. 1 Input/output data is high-level
  30404.  
  30405. 616
  30406.  
  30407. ----------------------- Page 633-----------------------
  30408.  
  30409. Section 19 Interrupt Controller (INTC)
  30410.  
  30411. 19.1 Overview
  30412.  
  30413. The interrupt controller (INTC) ascertains the priority of interrupt sources and controls
  30414. interrupt requests to the CPU. The INTC registers set the order of priority of each interrupt,
  30415. allowing the user to handle interrupt requests according to user-set priority.
  30416.  
  30417. 19.1.1 Features
  30418.  
  30419. The INTC has the following features.
  30420.  
  30421. • Fifteen interrupt priority levels can be set
  30422.  
  30423. By setting the three interrupt priority registers, the priorities of on-chip peripheral module
  30424. interrupts can be selected from 15 levels for different request sources.
  30425.  
  30426. • NMI noise canceler function
  30427.  
  30428. The NMI input level bit indicates the NMI pin state. The pin state can be checked by
  30429. reading this bit in the interrupt exception handler, enabling it to be used as a noise
  30430. canceler.
  30431.  
  30432. • NMI request masking when SR.BL bit is set
  30433.  
  30434. It is possible to select whether or not NMI requests are to be masked when the SR.BL bit
  30435. is set.
  30436.  
  30437. 19.1.2 Block Diagram
  30438.  
  30439. Figure 19.1 shows a block diagram of the INTC.
  30440.  
  30441. 617
  30442.  
  30443. ----------------------- Page 634-----------------------
  30444.  
  30445. NMI
  30446. Input control
  30447.  
  30448. 4 4
  30449.  
  30450. TMU (Interrupt request)
  30451. Com- Interrupt
  30452. RTC (Interrupt request) Priority
  30453. identifier parator request
  30454. SCI (Interrupt request)
  30455.  
  30456. SCIF (Interrupt request) SR
  30457.  
  30458. WDT (Interrupt request) I3 I2 I1 I0
  30459.  
  30460. REF (Interrupt request) CPU
  30461.  
  30462. DMAC (Interrupt request)
  30463.  
  30464. Hitachi- (Interrupt request)
  30465. UDI
  30466. GPIO (Interrupt request)
  30467.  
  30468. IPR
  30469. ICR
  30470.  
  30471. IPRA–IPRC
  30472.  
  30473. s
  30474. u
  30475. b
  30476.  
  30477. l
  30478. a
  30479. Bus interface n
  30480. r
  30481. e
  30482. t
  30483. n
  30484. I
  30485.  
  30486. INTC
  30487.  
  30488. TMU: Timer unit
  30489. RTC: Realtime clock unit
  30490. SCI: Serial communication interface
  30491. SCIF: Serial communication interface with FIFO
  30492. WDT: Watchdog timer
  30493. REF: Memory refresh controller section of the bus state controller
  30494. DMAC: Direct memory access controller
  30495. Hitachi-UDI: Hitachi-UDI unit
  30496. GPIO: I/O port
  30497. ICR: Interrupt control register
  30498. IPRA–IPRC: Interrupt priority registers A–C
  30499. SR: Status register
  30500.  
  30501. Figure 19.1 Block Diagram of INTC
  30502.  
  30503. 618
  30504.  
  30505. ----------------------- Page 635-----------------------
  30506.  
  30507. 19.1.3 Pin Configuration
  30508.  
  30509. Table 19.1 shows the INTC pin configuration.
  30510.  
  30511. Table 191 INTC Pins
  30512.  
  30513. Pin Name Abbreviation I / O Function
  30514.  
  30515. Nonmaskable interrupt NMI Input Input of nonmaskable interrupt request
  30516. input pin signal
  30517.  
  30518. Interrupt input pins – Input Input of interrupt request signals
  30519. (maskable by I3–I0 in SR)
  30520.  
  30521. 19.1.4 Register Configuration
  30522.  
  30523. The INTC has the registers shown in table 19.2.
  30524.  
  30525. Table 19.2 INTC Registers
  30526.  
  30527. Initial Area 7 Access
  30528. Name Abbreviation R/ W Value* 1 P4 Address Address S i z e
  30529.  
  30530. Interrupt control ICR R/W *2 H'FFD00000 H'1FD00000 16
  30531.  
  30532. register
  30533.  
  30534. Interrupt priority IPRA R/W H'0000 H'FFD00004 H'1FD00004 16
  30535. register A
  30536.  
  30537. Interrupt priority IPRB R/W H'0000 H'FFD00008 H'1FD00008 16
  30538. register B
  30539.  
  30540. Interrupt priority IPRC R/W H'0000 H'FFD0000C H'1FD0000C 16
  30541. register C
  30542.  
  30543. Notes: 1. Initialized by a power-on reset or manual reset.
  30544. 2. H'8000 when the NMI pin is high, H'0000 when the NMI pin is low.
  30545.  
  30546. 619
  30547.  
  30548. ----------------------- Page 636-----------------------
  30549.  
  30550. 19.2 Interrupt Sources
  30551.  
  30552. There are three types of interrupt sources: NMI, RL, and on-chip peripheral modules. Each
  30553. interrupt has a priority level (16–0), with level 16 as the highest and level 1 as the lowest.
  30554. When level 0 is set, the interrupt is masked and interrupt requests are ignored.
  30555.  
  30556. 19.2.1 NMI Interrupt
  30557.  
  30558. The NMI interrupt has the highest priority level of 16. It is always accepted unless the BL bit
  30559. in the status register in the CPU is set to 1. In sleep or standby mode, the interrupt is
  30560. accepted even if the BL bit is set to 1.
  30561.  
  30562. A setting can also be made to have the NMI interrupt accepted even if the BL bit is set to 1.
  30563.  
  30564. Input from the NMI pin is edge-detected. The NMI edge select bit (NMIE) in the interrupt
  30565. control register (ICR) is used to select either rising or falling edge. When the NMIE bit in the
  30566. ICR register is modified, the NMI interrupt is not detected for a maximum of 6 bus clock
  30567. cycles after the modification.
  30568.  
  30569. NMI interrupt exception handling does not affect the interrupt mask level bits (I3–I0) in the
  30570. status register (SR).
  30571.  
  30572. 620
  30573.  
  30574. ----------------------- Page 637-----------------------
  30575.  
  30576. 19.2.2 IRL Interrupts
  30577.  
  30578. IRL interrupts are input by level at pins – . The priority level is the level indicated
  30579. by pins – . An – value of 0 (0000) indicates the highest-level interrupt
  30580. request (interrupt priority level 15). A value of 15 (1111) indicates no interrupt request
  30581. (interrupt priority level 0).
  30582.  
  30583. SH7750
  30584.  
  30585. Interrupt Priority 4 to
  30586. requests encoder
  30587. to
  30588.  
  30589. Figure 19.2 Example of IRL Interrupt Connection
  30590.  
  30591. 621
  30592.  
  30593. ----------------------- Page 638-----------------------
  30594.  
  30595. Table 19.3 – Pins and Interrupt Levels
  30596.  
  30597. Interrupt Priority LevelInterrupt Request
  30598.  
  30599. 0 0 0 0 15 Level 15 interrupt request
  30600.  
  30601. 1 14 Level 14 interrupt request
  30602.  
  30603. 1 0 13 Level 13 interrupt request
  30604.  
  30605. 1 12 Level 12 interrupt request
  30606.  
  30607. 1 0 0 11 Level 11 interrupt request
  30608.  
  30609. 1 10 Level 10 interrupt request
  30610.  
  30611. 1 0 9 Level 9 interrupt request
  30612.  
  30613. 1 8 Level 8 interrupt request
  30614.  
  30615. 1 0 0 0 7 Level 7 interrupt request
  30616.  
  30617. 1 6 Level 6 interrupt request
  30618.  
  30619. 1 0 5 Level 5 interrupt request
  30620.  
  30621. 1 4 Level 4 interrupt request
  30622.  
  30623. 1 0 0 3 Level 3 interrupt request
  30624.  
  30625. 1 2 Level 2 interrupt request
  30626.  
  30627. 1 0 1 Level 1 interrupt request
  30628.  
  30629. 1 0 No interrupt request
  30630.  
  30631. A noise-cancellation feature is built in, and the IRL interrupt is not detected unless the levels
  30632. sampled at every bus clock cycle remain unchanged for three consecutive cycles, so that no
  30633. transient level on the IRL pin change is detected. In standby mode, as the bus clock is
  30634. stopped, noise cancellation is performed using the 32.768 kHz clock for the RTC instead.
  30635. When the RTC is not used, therefore, interruption by means of IRL interrupts cannot be
  30636. performed in standby mode.
  30637.  
  30638. The priority level of the IRL interrupt must not be lowered unless the interrupt is accepted
  30639. and the interrupt handling starts. However, the priority level can be changed to a higher one.
  30640.  
  30641. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by IRL interrupt
  30642. handling.
  30643.  
  30644. Pins – can be used for four independent interrupt requests by setting the IRLM bit
  30645. to 1 in the ICR register.
  30646.  
  30647. 622
  30648.  
  30649. ----------------------- Page 639-----------------------
  30650.  
  30651. Table 19.4 – Pins and Interrupt Levels (When IRLM = 1)
  30652.  
  30653. Interrupt Priority Level Interrupt Request
  30654.  
  30655. 1/0 1/0 1/0 0 13 IRL0
  30656.  
  30657. 1/0 1/0 0 1 10 IRL1
  30658.  
  30659. 1/0 0 1 1 7 IRL2
  30660.  
  30661. 0 1 1 1 4 IRL3
  30662.  
  30663. 19.2.3 On-Chip Peripheral Module Interrupts
  30664.  
  30665. On-chip peripheral module interrupts are generated by the following nine modules:
  30666.  
  30667. • Hitachi-UDI unit (Hitachi-UDI)
  30668.  
  30669. • Direct memory access controller (DMAC)
  30670.  
  30671. • Timer unit (TMU)
  30672.  
  30673. • Realtime clock (RTC)
  30674.  
  30675. • Serial communication interface (SCI)
  30676.  
  30677. • Serial communication interface with FIFO (SCIF)
  30678.  
  30679. • Bus state controller (BSC)
  30680.  
  30681. • Watchdog timer (WDT)
  30682.  
  30683. • I/O port (GPIO)
  30684.  
  30685. Not every interrupt source is assigned a different interrupt vector, bus sources are reflected in
  30686. the interrupt event register (INTEVT), so it is easy to identify sources by using the INTEVT
  30687. register value as a branch offset in the exception handling routine.
  30688.  
  30689. A priority level from 15 to 0 can be set for each module by means of interrupt priority
  30690. registers A to C (IPRA–IPRC).
  30691.  
  30692. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by on-chip
  30693. peripheral module interrupt handling.
  30694.  
  30695. On-chip peripheral module interrupt source flag and interrupt enable flag updating should only
  30696. be carried out when the BL bit in the status register (SR) is set to 1. To prevent acceptance
  30697. of an erroneous interrupt from an interrupt source that should have been updated, first read the
  30698. on-chip peripheral register containing the relevant flag, then clear the BL bit to 0. This will
  30699. secure the necessary timing internally. When updating a number of flags, there is no problem
  30700. if only the register containing the last flag updated is read.
  30701.  
  30702. 623
  30703.  
  30704. ----------------------- Page 640-----------------------
  30705.  
  30706. If flag updating is performed while the BL bit is cleared to 0, the program may jump to the
  30707. interrupt handling routine when the INTEVT register value is 0. In this case, interrupt handling
  30708. is initiated due to the timing relationship between the flag update and interrupt request
  30709. recognition within the chip. Processing can be continued without any problem by executing
  30710. an RTE instruction.
  30711.  
  30712. 19.2.4 Interrupt Exception Handling and Priority
  30713.  
  30714. Table 19.5 lists the codes for the interrupt event register (INTEVT), and the order of interrupt
  30715. priority. Each interrupt source is assigned a unique INTEVT code. The start address of the
  30716. interrupt handler is common to each interrupt source. This is why, for instance, the value of
  30717. INTEVT is used as an offset at the start of the interrupt handler and branched to in order to
  30718. identify the interrupt source.
  30719.  
  30720. The order of priority of the on-chip peripheral modules is specified as desired by setting
  30721. priority levels from 0 to 15 in interrupt priority registers A to C (IPRA–IPRC). The order of
  30722. priority of the on-chip peripheral modules is set to 0 by a reset.
  30723.  
  30724. When the priorities for multiple interrupt sources are set to the same level and such interrupts
  30725. are generated simultaneously, they are handled according to the default priority order shown
  30726. in table 19.5.
  30727.  
  30728. Updating of interrupt priority registers A to C should only be carried out when the BL bit in
  30729. the status register (SR) is set to 1. To prevent erroneous interrupt acceptance, first read one of
  30730. the interrupt priority registers, then clear the BL bit to 0. This will secure the necessary
  30731. timing internally.
  30732.  
  30733. 624
  30734.  
  30735. ----------------------- Page 641-----------------------
  30736.  
  30737. Table 19.5 Interrupt Exception Handling Sources and Priority Order
  30738.  
  30739. INTEV Interrupt Priority IPR (Bit Priority within Default
  30740. Interrupt Source T Code (Initial Value) Numbers) IPR Setting Unit Priority
  30741.  
  30742. NMI H'1C0 16 — — High
  30743. IRL – = 0 H'200 15 — — ↑
  30744. – = 1 H'220 14 — —
  30745.  
  30746. – = 2 H'240 13 — —
  30747.  
  30748. – = 3 H'260 12 — —
  30749.  
  30750. – = 4 H'280 11 — —
  30751.  
  30752. – = 5 H'2A0 10 — —
  30753.  
  30754. – = 6 H'2C0 9 — —
  30755.  
  30756. – = 7 H'2E0 8 — —
  30757.  
  30758. – = 8 H'300 7 — —
  30759.  
  30760. – = 9 H'320 6 — —
  30761.  
  30762. – = A H'340 5 — —
  30763.  
  30764. – = B H'360 4 — —
  30765.  
  30766. – = C H'380 3 — —
  30767.  
  30768. – = D H'3A0 2 — —
  30769.  
  30770. – = E H'3C0 1 — —
  30771.  
  30772. IRL0 H'240 13 — —
  30773.  
  30774. IRL1 H'2A0 10 — —
  30775.  
  30776. IRL2 H'300 7 — —
  30777.  
  30778. IRL3 H'360 4 — —
  30779.  
  30780. Hitachi- Hitachi-UDI H'600 15–0 (0) IPRC (3–0) —
  30781. UDI
  30782.  
  30783. GPIO GPIOI H'620 15–0 (0) IPRC (15–12)—
  30784.  
  30785. DMAC DMTE0 H'640 15–0 (0) IPRC (11–8) High
  30786. DMTE1 H'660 ↑
  30787. DMTE2 H'680
  30788.  
  30789. DMTE3 H'6A0
  30790.  
  30791. DMAE H'6C0 Low
  30792.  
  30793. TMU0 TUNI0 H'400 15–0 (0) IPRA (15–12)—
  30794.  
  30795. TMU1 TUNI1 H'420 15–0 (0) IPRA (11–8) —
  30796.  
  30797. TMU2 TUNI2 H'440 15–0 (0) IPRA (7–4) High
  30798.  
  30799. TICPI2 H'460 Low Low
  30800.  
  30801. 625
  30802.  
  30803. ----------------------- Page 642-----------------------
  30804.  
  30805. Table 19.5 Interrupt Exception Handling Sources and Priority Order (cont)
  30806.  
  30807. INTEV Interrupt Priority IPR (Bit Priority within Default
  30808. Interrupt Source T Code (Initial Value) Numbers) IPR Setting Unit Priority
  30809.  
  30810. RTC ATI H'480 15–0 (0) IPRA (3–0) High High
  30811.  ↓
  30812. Low
  30813. PRI H'4A0 ↑
  30814. CUI H'4C0
  30815.  
  30816. SCI1 ERI H'4E0 15–0 (0) IPRB (7–4) High
  30817. RXI H'500 ↑
  30818.  
  30819. TXI H'520
  30820.  
  30821. TEI H'540 Low
  30822.  
  30823. SCIF ERI H'700 15–0 (0) IPRC (7–4) High
  30824. RXI H'720 ↑
  30825. 
  30826. BRI H'740
  30827.  
  30828. TXI H'760 Low
  30829.  
  30830. WDT ITI H'560 15–0 (0) IPRB (15–12) —
  30831.  
  30832. REF RCMI H'580 15–0 (0) IPRB (11–8) High
  30833.  
  30834. ROVI H'5A0 Low Low
  30835.  
  30836. Note: TUNI0–TUNI2: Underflow interrupts
  30837. TICPI2: Input capture interrupt
  30838. ATI: Alarm interrupt
  30839. PRI: Periodic interrupt
  30840. CUI: Carry-up interrupt
  30841. ERI: Receive-error interrupt
  30842. RXI: Receive-data-full interrupt
  30843. TXI: Transmit-data-empty interrupt
  30844. TEI: Transmit-end interrupt
  30845. BRI: Break interrupt request
  30846. ITI: Interval timer interrupt
  30847. RCMI: Compare-match interrupt
  30848. ROVI: Refresh counter overflow interrupt
  30849. Hitachi-UDI: Hitachi-UDI interrupt
  30850. GPIOI: I/O port interrupt
  30851. DMTE0–DMTE3: DMAC transfer end interrupts
  30852. DMAE: DMAC address error interrupt
  30853.  
  30854. 626
  30855.  
  30856. ----------------------- Page 643-----------------------
  30857.  
  30858. 19.3 Register Descriptions
  30859.  
  30860. 19.3.1 Interrupt Priority Registers A to C (IPRA–IPRC)
  30861.  
  30862. Interrupt priority registers A to C (IPRA–IPRC) are 16-bit readable/writable registers that set
  30863. priority levels from 0 to 15 for on-chip peripheral module interrupts. These registers are
  30864. initialized to H'0000 by a reset. They are not initialized in standby mode.
  30865.  
  30866. Bit: 15 14 13 12 11 10 9 8
  30867.  
  30868. Bit name:
  30869.  
  30870. Initial value: 0 0 0 0 0 0 0 0
  30871.  
  30872. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30873.  
  30874. Bit: 7 6 5 4 3 2 1 0
  30875.  
  30876. Bit name:
  30877.  
  30878. Initial value: 0 0 0 0 0 0 0 0
  30879.  
  30880. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30881.  
  30882. Table 19.6 shows the relationship between the interrupt request sources and the IPRA–IPRC
  30883. register bits.
  30884.  
  30885. Table 19.6 Interrupt Request Sources and IPRA–IPRC Registers
  30886.  
  30887. Bits
  30888.  
  30889. Register 15–12 1 1 – 8 7 – 4 3 – 0
  30890.  
  30891. Interrupt priority register A TMU0 TMU1 TMU2 RTC
  30892. Interrupt priority register B WDT REF*1 SCI1 Reserved*2
  30893.  
  30894. Interrupt priority register C GPIO DMAC SCIF Hitachi-UDI
  30895.  
  30896. Notes: 1. REF is the memory refresh unit in the bus state controller
  30897. (BSC). See section 13, Bus State Controller (BSC), for details.
  30898. 2. Reserved bits: These bits are always read as 0 and should always be
  30899. written with 0.
  30900.  
  30901. As shown in table 19.6, four on-chip peripheral modules are assigned to each register.
  30902. Interrupt priority levels are established by setting a value from H'F (1111) to H'0 (0000) in
  30903. each of the four-bit groups: 15–12, 11–8, 7–4, and 3–0. Setting H'F designates priority level
  30904. 15 (the highest level), and setting H'0 designates priority level 0 (requests are masked).
  30905.  
  30906. 627
  30907.  
  30908. ----------------------- Page 644-----------------------
  30909.  
  30910. 19.3.2 Interrupt Control Register (ICR)
  30911.  
  30912. The interrupt control register (ICR) is a 16-bit register that sets the input signal detection
  30913. mode for external interrupt input pin NMI and indicates the input signal level at the NMI pin.
  30914. This register is initialized by a power-on reset or manual reset. It is not initialized in standby
  30915. mode.
  30916.  
  30917. Bit: 15 14 13 12 11 10 9 8
  30918.  
  30919. Bit name: NMIL MAI — — — — NMIB NMIE
  30920.  
  30921. Initial value: 0/1* 0 0 0 0 0 0 0
  30922.  
  30923. R/W: R R/W — — — — R/W R/W
  30924.  
  30925. Bit: 7 6 5 4 3 2 1 0
  30926.  
  30927. Bit name: IRLM — — — — — — —
  30928.  
  30929. Initial value: 0 0 0 0 0 0 0 0
  30930.  
  30931. R/W: R/W — — — — — — —
  30932.  
  30933. Note: * 1 when NMI pin input is high, 0 when low.
  30934.  
  30935. Bit 15—NMI Input Level (NMIL): Sets the level of the signal input at the NMI pin. This bit
  30936. can be read to determine the NMI pin level. It cannot be modified.
  30937.  
  30938. Bit 15: NMIL Description
  30939.  
  30940. 0 NMI pin input level is low
  30941.  
  30942. 1 NMI pin input level is high
  30943.  
  30944. Bit 14—NMI Interrupt Mask (MAI): Specifies whether or not all interrupts are to be
  30945. masked while the NMI pin input level is low, irrespective of the CPU’s SR.BL bit.
  30946.  
  30947. Bit 14: MAI Description
  30948.  
  30949. 0 Interrupts enabled even while NMI pin is low (Initial value)
  30950.  
  30951. 1 Interrupts disabled while NMI pin is low*
  30952.  
  30953. Note: * NMI interrupts are accepted in normal operation and in sleep mode.
  30954. In standby mode, all interrupts are masked, and standby is not cleared, while the NMI pin is
  30955. low.
  30956.  
  30957. 628
  30958.  
  30959. ----------------------- Page 645-----------------------
  30960.  
  30961. Bit 9—NMI Block Mode (NMIB): Specifies whether an NMI request is to be held pending
  30962. or detected immediately while the SR.BL bit is set to 1.
  30963.  
  30964. Bit 9: NMIB Description
  30965.  
  30966. 0 NMI interrupt requests held pending while SR.BL bit is set to 1
  30967. (Initial value)
  30968.  
  30969. 1 NMI interrupt requests detected while SR.BL bit is set to 1
  30970.  
  30971. Notes: 1. If interrupt requests are enabled while SR.BL = 1, the previous
  30972. exception information will be lost, and so must be saved beforehand.
  30973. 2. This bit is cleared automatically by NMI acceptance.
  30974.  
  30975. Bit 8—NMI Edge Select (NMIE): Specifies whether the falling or rising edge of the
  30976. interrupt request signal to the NMI pin is detected.
  30977.  
  30978. Bit 8: NMIE Description
  30979.  
  30980. 0 Interrupt request detected on falling edge of NMI input (Initial value)
  30981.  
  30982. 1 Interrupt request detected on rising edge of NMI input
  30983.  
  30984. Bit 7—IRL Pin Mode (IRLM): Specifies whether pins – are to be used as level-
  30985. encoded interrupt requests or as four independent interrupt requests.
  30986.  
  30987. Bit 7: IRLM Description
  30988.  
  30989. 0 pins used as level-encoded interrupt requests (Initial value)
  30990.  
  30991. 1 pins used as four independent interrupt requests
  30992.  
  30993. Bits 13 to 10 and 6 to 0—Reserved: These bits are always read as 0, and should only be
  30994. written with 0.
  30995.  
  30996. 629
  30997.  
  30998. ----------------------- Page 646-----------------------
  30999.  
  31000. 19.4 INTC Operation
  31001.  
  31002. 19.4.1 Interrupt Operation Sequence
  31003.  
  31004. The sequence of operations when an interrupt is generated is described below. Figure 19.3
  31005. shows a flowchart of the operations.
  31006.  
  31007. 1. The interrupt request sources send interrupt request signals to the interrupt controller.
  31008.  
  31009. 2. The interrupt controller selects the highest-priority interrupt from the interrupt requests
  31010. sent, according to the priority levels set in interrupt priority registers A to C (IPRA–IPRC).
  31011. Lower-priority interrupts are held pending. If two of these interrupts have the same priority
  31012. level, or if multiple interrupts occur within a single module, the interrupt with the highest
  31013. priority according to table 19.5, Interrupt Exception Handling Sources and Priority Order,
  31014. is selected.
  31015.  
  31016. 3. The priority level of the interrupt selected by the interrupt controller is compared with the
  31017. interrupt mask bits (I3–I0) in the status register (SR) of the CPU. If the request priority
  31018. level is higher that the level in bits I3–I0, the interrupt controller accepts the interrupt and
  31019. sends an interrupt request signal to the CPU.
  31020.  
  31021. 4. The CPU accepts an interrupt at a break between instructions.
  31022.  
  31023. 5. The interrupt source code is set in the interrupt event register (INTEVT).
  31024.  
  31025. 6. The status register (SR) and program counter (PC) are saved to SSR and SPC,
  31026. respectively.
  31027.  
  31028. 7. The block bit (BL), mode bit (MD), and register bank bit (RB) in SR are set to 1.
  31029.  
  31030. 8. The CPU jumps to the start address of the interrupt handler (the sum of the value set in
  31031. the vector base register (VBR) and H'00000600).
  31032.  
  31033. The interrupt handler may branch with the INTEVT register value as its offset in order to
  31034. identify the interrupt source. This enables it to branch to the handling routine for the particular
  31035. interrupt source.
  31036.  
  31037. Notes: 1. The interrupt mask bits (I3–I0) in the status register (SR) are not changed by
  31038. acceptance of an interrupt in the SH7750.
  31039.  
  31040. 2. The interrupt source flag should be cleared in the interrupt handler. To ensure that
  31041. an interrupt request that should have been cleared is not inadvertently accepted
  31042. again, read the interrupt source flag after it has been cleared, then wait for the
  31043. interval shown in table 19.7 (Time for priority decision and SR mask bit
  31044. comparison) before clearing the BL bit or executing an RTE instruction.
  31045.  
  31046. 630
  31047.  
  31048. ----------------------- Page 647-----------------------
  31049.  
  31050. Program
  31051. execution state
  31052.  
  31053. Interrupt No
  31054. generated?
  31055.  
  31056. Yes
  31057.  
  31058. (BL bit
  31059. in SR = 0) or No
  31060. (sleep or standby
  31061. mode)?
  31062. NMIB in No
  31063. ICR = 1 and
  31064. Yes
  31065. NMI?
  31066. No
  31067. NMI? Yes
  31068.  
  31069. Yes
  31070.  
  31071. Level 15 No
  31072.  
  31073. interrupt?
  31074.  
  31075. Yes
  31076. Level 14 No
  31077. I3–I0* = interrupt?
  31078. Yes
  31079. level 14 or
  31080. lower? Yes
  31081. Level 1 No
  31082. No I3–I0 = interrupt?
  31083. Yes
  31084. Set interrupt source level 13 or Yes
  31085. in INTEVT lower?
  31086.  
  31087. No
  31088. Yes I3–I0 =
  31089. Save SR to SSR; level 0?
  31090. save PC to SPC
  31091. No
  31092.  
  31093. Set BL, MD, RB bits
  31094. in SR to 1
  31095.  
  31096. Branch to exception
  31097. handler
  31098.  
  31099. Note: * I3–I0: Interrupt mask bits in status register (SR)
  31100.  
  31101. Figure 19.3 Interrupt Operation Flowchart
  31102.  
  31103. 631
  31104.  
  31105. ----------------------- Page 648-----------------------
  31106.  
  31107. 19.4.2 Multiple Interrupts
  31108.  
  31109. When handling multiple interrupts, interrupt handling should include the following
  31110. procedures:
  31111.  
  31112. 1. Branch to a specific interrupt handler corresponding to a code set in the INTEVT register.
  31113. The code in INTEVT can be used as a branch-offset for branching to the specific handler.
  31114.  
  31115. 2. Clear the interrupt source in the corresponding interrupt handler.
  31116.  
  31117. 3. Save SPC and SSR to the stack.
  31118.  
  31119. 4. Clear the BL bit in SR, and set the accepted interrupt level in the interrupt mask bits in
  31120. SR.
  31121.  
  31122. 5. Handle the interrupt.
  31123.  
  31124. 6. Set the BL bit in SR to 1.
  31125.  
  31126. 7. Restore SSR and SPC from memory.
  31127.  
  31128. 8. Execute the RTE instruction.
  31129.  
  31130. When these procedures are followed in order, an interrupt of higher priority than the one being
  31131. handled can be accepted after clearing BL in step 4. This enables the interrupt response time
  31132. to be shortened for urgent processing.
  31133.  
  31134. 19.4.3 Interrupt Masking with MAI Bit
  31135.  
  31136. By setting the MAI bit to 1 in the ICR register, it is possible to mask interrupts while the NMI
  31137. pin is low, irrespective of the BL and IMASK bits in the SR register.
  31138.  
  31139. • In normal operation and sleep mode
  31140.  
  31141. All interrupts are masked while the NMI pin is low. However, an NMI interrupt only is
  31142. generated by a transition at the NMI pin.
  31143.  
  31144. • In standby mode
  31145.  
  31146. All interrupts are masked while the NMI pin is low, and an NMI interrupt is not generated
  31147. by a transition at the NMI pin. Therefore, standby cannot be cleared by an NMI interrupt
  31148. while the MAI bit is set to 1.
  31149.  
  31150. 632
  31151.  
  31152. ----------------------- Page 649-----------------------
  31153.  
  31154. 19.5 Interrupt Response Time
  31155.  
  31156. The time from generation of an interrupt request until interrupt exception handling is
  31157. performed and fetching of the first instruction of the exception handler is started (the interrupt
  31158. response time) is shown in table 19.7.
  31159.  
  31160. Table 19.7 Interrupt Response Time
  31161.  
  31162. Number of States
  31163.  
  31164. Peripheral
  31165. Item N MI RL Modules Notes
  31166.  
  31167. Time for priority decision and 1Icyc + 4Bcyc 1Icyc + 7Bcyc 1Icyc + 2Bcyc
  31168. SR mask bit comparison
  31169.  
  31170. Wait time until end of S – 1 (≥ 0) × S – 1 (≥ 0) × S – 1 (≥ 0) ×
  31171. sequence being executed by Icyc Icyc Icyc
  31172. CPU
  31173.  
  31174. Time from interrupt exception 4 × Icyc 4 × Icyc 4 × Icyc
  31175. handling (save of SR and PC)
  31176. until fetch of first instruction
  31177. of exception handler is started
  31178.  
  31179. Response Total 5Icyc + 4Bcyc 5Icyc + 7Bcyc 5Icyc + 2Bcyc
  31180. time + (S – 1)Icyc + (S – 1)Icyc + (S – 1)Icyc
  31181.  
  31182. Minimum case 13Icyc 19Icyc 9Icyc When Icyc:
  31183. Bcyc = 2:1
  31184.  
  31185. Maximum 36 + S Icyc 60 + S Icyc 20 + S Icyc When Icyc:
  31186. case Bcyc = 8:1
  31187.  
  31188. Icyc: One cycle of internal clock supplied to CPU, etc.
  31189. Bcyc: One CKIO cycle
  31190. S: Latency of instruction
  31191.  
  31192. 633
  31193.  
  31194. ----------------------- Page 650-----------------------
  31195.  
  31196. 634
  31197.  
  31198. ----------------------- Page 651-----------------------
  31199.  
  31200. Section 20 User Break Controller (UBC)
  31201.  
  31202. 20.1 Overview
  31203.  
  31204. The user break controller (UBC) provides functions that simplify program debugging. When
  31205. break conditions are set in the UBC, a user break interrupt is generated according to the
  31206. contents of the bus cycle generated by the CPU. This function makes it easy to design an
  31207. effective self-monitoring debugger, enabling programs to be debugged with the chip alone,
  31208. without using an in-circuit emulator.
  31209.  
  31210. 20.1.1 Features
  31211.  
  31212. The UBC has the following features.
  31213.  
  31214. • Two break channels (A and B)
  31215.  
  31216. User break interrupts can be generated on independent conditions for channels A and B, or
  31217. on sequential conditions (sequential break setting: channel A → channel B).
  31218.  
  31219. • The following can be set as break compare conditions:
  31220.  
  31221.  Address (selection of 32-bit virtual address and ASID for comparison):
  31222.  
  31223. Address: All bits compared/lower 10 bits masked/lower 12 bits masked/lower 16 bits
  31224. masked/lower 20 bits masked/all bits masked
  31225.  
  31226. ASID: All bits compared/all bits masked
  31227.  
  31228.  Data (channel B only, 32-bit mask capability)
  31229.  
  31230.  Bus cycle: Instruction access/operand access
  31231.  
  31232.  Read/write
  31233.  
  31234.  Operand size: Byte/word/longword/quadword
  31235.  
  31236. • An instruction access cycle break can be effected before or after the instruction is
  31237. executed.
  31238.  
  31239. 635
  31240.  
  31241. ----------------------- Page 652-----------------------
  31242.  
  31243. 20.1.2 Block Diagram
  31244.  
  31245. Figure 20.1 shows a block diagram of the UBC.
  31246.  
  31247. Access Address Data
  31248. control bus bus
  31249.  
  31250. Channel A
  31251.  
  31252. Access BBRA
  31253. comparator
  31254.  
  31255. BARA
  31256.  
  31257. Address
  31258. comparator BASRA
  31259.  
  31260. BAMRA
  31261.  
  31262. Channel B
  31263.  
  31264. Access
  31265. BBRB
  31266. comparator
  31267.  
  31268. BARB
  31269.  
  31270. Address
  31271. comparator BASRB
  31272.  
  31273. BAMRB
  31274.  
  31275. Data BDRB
  31276.  
  31277. comparator
  31278.  
  31279. BDMRB
  31280.  
  31281. BBRA: Break bus cycle register A
  31282. BARA: Break address register A
  31283. BASRA: Break ASID register A
  31284. BAMRA: Break address mask register A
  31285. BBRB: Break bus cycle register B
  31286. BARB: Break address register B Control BRCR
  31287. BASRB: Break ASID register B
  31288. BAMRB: Break address mask register B
  31289. BDRB: Break data register B
  31290. User break trap request
  31291. BDMRB: Break data mask register B
  31292. BRCR: Break control register
  31293.  
  31294. Figure 20.1 Block Diagram of User Break Controller
  31295.  
  31296. 636
  31297.  
  31298. ----------------------- Page 653-----------------------
  31299.  
  31300. Table 20.1 shows the UBC registers.
  31301.  
  31302. Table 20.1 UBC Registers
  31303.  
  31304. Area 7 Access
  31305. Name Abbreviation R/ W Initial ValueP4 Address Address S i z e
  31306.  
  31307. Break address BARA R/W Undefined H'FF200000 H'1F200000 32
  31308. register A
  31309.  
  31310. Break address BAMRA R/W Undefined H'FF200004 H'1F200004 8
  31311. mask
  31312. register A
  31313.  
  31314. Break bus BBRA R/W H'0000 H'FF200008 H'1F200008 16
  31315. cycle register A
  31316.  
  31317. Break ASID BASRA R/W Undefined H'FF000014 H'1F000014 8
  31318. register A
  31319.  
  31320. Break address BARB R/W Undefined H'FF20000C H'1F20000C 32
  31321. register B
  31322.  
  31323. Break address BAMRB R/W Undefined H'FF200010 H'1F200010 8
  31324. mask
  31325. register B
  31326.  
  31327. Break bus BBRB R/W H'0000 H'FF200014 H'1F200014 16
  31328. cycle register B
  31329.  
  31330. Break ASID BASRB R/W Undefined H'FF000018 H'1F000018 8
  31331. register B
  31332.  
  31333. Break data BDRB R/W Undefined H'FF200018 H'1F200018 32
  31334. register B
  31335.  
  31336. Break data BDMRB R/W Undefined H'FF20001C H'1F20001C 32
  31337. mask register B
  31338.  
  31339. Break control BRCR R/W H'0000* H'FF200020 H'1F200020 16
  31340. register
  31341.  
  31342. Note: * Some bits are not initialized. See section 20.2.12, Break Control Register (BRCR), for
  31343. details.
  31344.  
  31345. 637
  31346.  
  31347. ----------------------- Page 654-----------------------
  31348.  
  31349. 20.2 Register Descriptions
  31350.  
  31351. 20.2.1 Access to UBC Control Registers
  31352.  
  31353. The access size must be the same as the control register size. If the sizes are different, a
  31354. write will not be effected in a UBC register write operation, and a read operation will return
  31355. an undefined value. UBC control register contents cannot be transferred to a floating-point
  31356. register using a floating-point memory load instruction.
  31357.  
  31358. When a UBC control register is updated, use either of the following methods to make the
  31359. updated value valid:
  31360.  
  31361. 1. Execute an RTE instruction after the memory store instruction that updated the register.
  31362. The updated value will be valid from the RTE instruction jump destination onward.
  31363.  
  31364. 2. Execute instructions requiring 5 states for execution after the memory store instruction that
  31365. updated the register. As the SH7750 executes two instructions in parallel and a minimum
  31366. of 0.5 state is required for execution of one instruction, 11 instructions must be inserted.
  31367. The updated value will be valid from the 6th state onward.
  31368.  
  31369. 638
  31370.  
  31371. ----------------------- Page 655-----------------------
  31372.  
  31373. 20.2.2 Break Address Register A (BARA)
  31374.  
  31375. Bit: 31 30 29 28 27 26 25 24
  31376.  
  31377. BAA31 BAA30 BAA29 BAA28 BAA27 BAA26 BAA25 BAA24
  31378.  
  31379. Initial value: * * * * * * * *
  31380.  
  31381. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31382.  
  31383. Bit: 23 22 21 20 19 18 17 16
  31384.  
  31385. BAA23 BAA22 BAA21 BAA20 BAA19 BAA18 BAA17 BAA16
  31386.  
  31387. Initial value: * * * * * * * *
  31388.  
  31389. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31390.  
  31391. Bit: 15 14 13 12 11 10 9 8
  31392.  
  31393. BAA15 BAA14 BAA13 BAA12 BAA11 BAA10 BAA9 BAA8
  31394.  
  31395. Initial value: * * * * * * * *
  31396.  
  31397. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31398.  
  31399. Bit: 7 6 5 4 3 2 1 0
  31400.  
  31401. BAA7 BAA6 BAA5 BAA4 BAA3 BAA2 BAA1 BAA0
  31402.  
  31403. Initial value: * * * * * * * *
  31404.  
  31405. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31406.  
  31407. Note: *: Undefined
  31408.  
  31409. Break address register A (BARA) is a 32-bit readable/writable register that specifies the
  31410. virtual address used in the channel A break conditions. BARA is not initialized by a power-on
  31411. reset or manual reset.
  31412.  
  31413. Bits 31 to 0—Break Address A31 to A0 (BAA31–BAA0): These bits hold the virtual address
  31414. (bits 31–0) used in the channel A break conditions.
  31415.  
  31416. 639
  31417.  
  31418. ----------------------- Page 656-----------------------
  31419.  
  31420. 20.2.3 Break ASID Register A (BASRA)
  31421.  
  31422. Bit: 7 6 5 4 3 2 1 0
  31423.  
  31424. BASA7 BASA6 BASA5 BASA4 BASA3 BASA2 BASA1 BASA0
  31425.  
  31426. Initial value: * * * * * * * *
  31427.  
  31428. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31429.  
  31430. Note: *: Undefined
  31431.  
  31432. Break ASID register A (BASRA) is an 8-bit readable/writable register that specifies the ASID
  31433. used in the channel A break conditions. BASRA is not initialized by a power-on reset or
  31434. manual reset.
  31435.  
  31436. Bits 7 to 0—Break ASID A7 to A0 (BASA7–BASA0): These bits hold the ASID (bits 7–0)
  31437. used in the channel A break conditions.
  31438.  
  31439. 20.2.4 Break Address Mask Register A (BAMRA)
  31440.  
  31441. Bit: 7 6 5 4 3 2 1 0
  31442.  
  31443. — — — — BAMA2 BASMA BAMA1 BAMA0
  31444.  
  31445. Initial value: 0 0 0 0 * * * *
  31446.  
  31447. R/W: R R R R R/W R/W R/W R/W
  31448.  
  31449. Note: *: Undefined
  31450.  
  31451. Break address mask register A (BAMRA) is an 8-bit readable/writable register that specifies
  31452. which bits are to be masked in the break ASID set in BASRA and the break address set in
  31453. BARA. BAMRA is not initialized by a power-on reset or manual reset.
  31454.  
  31455. Bits 7 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  31456.  
  31457. Bit 2—Break ASID Mask A (BASMA): Specifies whether all bits of the channel A break
  31458. ASID (BASA7–BASA0) are to be masked.
  31459.  
  31460. Bit 2: BASMA Description
  31461.  
  31462. 0 All BASRA bits are included in break conditions
  31463.  
  31464. 1 No BASRA bits are included in break conditions
  31465.  
  31466. 640
  31467.  
  31468. ----------------------- Page 657-----------------------
  31469.  
  31470. Bits 3, 1, and 0—Break Address Mask A2 to A0 (BAMA2–BAMA0): These bits specify
  31471. which bits of the channel A break address (BAA31–BAA0) set in BARA are to be masked.
  31472.  
  31473. Bit 3: BAMA2 Bit 1: BAMA1 Bit 0: BAMA0 Description
  31474.  
  31475. 0 0 0 All BARA bits are included in break conditions
  31476.  
  31477. 1 Lower 10 bits of BARA are masked, and not
  31478. included in break conditions
  31479.  
  31480. 1 0 Lower 12 bits of BARA are masked, and not
  31481. included in break conditions
  31482.  
  31483. 1 All BARA bits are masked, and not included in
  31484. break conditions
  31485.  
  31486. 1 0 0 Lower 16 bits of BARA are masked, and not
  31487. included in break conditions
  31488.  
  31489. 1 Lower 20 bits of BARA are masked, and not
  31490. included in break conditions
  31491.  
  31492. 1 * Reserved (cannot be set)
  31493.  
  31494. Note: *: Don’t care
  31495.  
  31496. 20.2.5 Break Bus Cycle Register A (BBRA)
  31497.  
  31498. Bit: 15 14 13 12 11 10 9 8
  31499.  
  31500. — — — — — — — —
  31501.  
  31502. Initial value: 0 0 0 0 0 0 0 0
  31503.  
  31504. R/W: R R R R R R R R
  31505.  
  31506. Bit: 7 6 5 4 3 2 1 0
  31507.  
  31508. — SZA2 IDA1 IDA0 RWA1 RWA0 SZA1 SZA0
  31509.  
  31510. Initial value: 0 0 0 0 0 0 0 0
  31511.  
  31512. R/W: R R/W R/W R/W R/W R/W R/W R/W
  31513.  
  31514. Break bus cycle register A (BBRA) is a 16-bit readable/writable register that sets three
  31515. conditions—(1) instruction access/operand access, (2) read/write, and (3) operand size—
  31516. from among the channel A break conditions.
  31517.  
  31518. BBRA is initialized to H'0000 by a power-on reset. It retains its value in standby mode.
  31519.  
  31520. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  31521.  
  31522. 641
  31523.  
  31524. ----------------------- Page 658-----------------------
  31525.  
  31526. Bits 5 and 4—Instruction Access/Operand Access Select A (IDA1, IDA0): These bits
  31527. specify whether an instruction access cycle or an operand access cycle is used as the bus
  31528. cycle in the channel A break conditions.
  31529.  
  31530. Bit 5: IDA1 Bit 4: IDA0 Description
  31531.  
  31532. 0 0 Condition comparison is not performed (Initial value)
  31533.  
  31534. 1 Instruction access cycle is used as break condition
  31535.  
  31536. 1 0 Operand access cycle is used as break condition
  31537.  
  31538. 1 Instruction access cycle or operand access cycle is used as
  31539. break condition
  31540.  
  31541. Bits 3 and 2—Read/Write Select A (RWA1, RWA0): These bits specify whether a read
  31542. cycle or write cycle is used as the bus cycle in the channel A break conditions.
  31543.  
  31544. Bit 3: RWA1 Bit 2: RWA0 Description
  31545.  
  31546. 0 0 Condition comparison is not performed (Initial value)
  31547.  
  31548. 1 Read cycle is used as break condition
  31549.  
  31550. 1 0 Write cycle is used as break condition
  31551.  
  31552. 1 Read cycle or write cycle is used as break condition
  31553.  
  31554. Bits 6, 1, and 0—Operand Size Select A (SZA2–SZA0): These bits select the operand size
  31555. of the bus cycle used as a channel A break condition.
  31556.  
  31557. Bit 6: SZA2 Bit 1: SZA1 Bit 0: SZA0 Description
  31558.  
  31559. 0 0 0 Operand size is not included in break conditions
  31560. (Initial value)
  31561.  
  31562. 1 Byte access is used as break condition
  31563.  
  31564. 1 0 Word access is used as break condition
  31565.  
  31566. 1 Longword access is used as break condition
  31567.  
  31568. 1 0 0 Quadword access is used as break condition
  31569.  
  31570. 1 Reserved (cannot be set)
  31571.  
  31572. 1 * Reserved (cannot be set)
  31573.  
  31574. Note: *: Don’t care
  31575.  
  31576. 642
  31577.  
  31578. ----------------------- Page 659-----------------------
  31579.  
  31580. 20.2.6 Break Address Register B (BARB)
  31581.  
  31582. BARB is the channel B break address register. The bit configuration is the same as for
  31583. BARA.
  31584.  
  31585. 20.2.7 Break ASID Register B (BASRB)
  31586.  
  31587. BASRB is the channel B break ASID register. The bit configuration is the same as for
  31588. BASRA.
  31589.  
  31590. 20.2.8 Break Address Mask Register B (BAMRB)
  31591.  
  31592. BAMRB is the channel B break address mask register. The bit configuration is the same as
  31593. for BAMRA.
  31594.  
  31595. 20.2.9 Break Data Register B (BDRB)
  31596.  
  31597. Bit: 31 30 29 28 27 26 25 24
  31598.  
  31599. BDB31 BDB30 BDB29 BDB28 BDB27 BDB26 BDB25 BDB24
  31600.  
  31601. Initial value: * * * * * * * *
  31602.  
  31603. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31604.  
  31605. Bit: 23 22 21 20 19 18 17 16
  31606.  
  31607. BDB23 BDB22 BDB21 BDB20 BDB19 BDB18 BDB17 BDB16
  31608.  
  31609. Initial value: * * * * * * * *
  31610.  
  31611. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31612.  
  31613. Bit: 15 14 13 12 11 10 9 8
  31614.  
  31615. BDB15 BDB14 BDB13 BDB12 BDB11 BDB10 BDB9 BDB8
  31616.  
  31617. Initial value: * * * * * * * *
  31618.  
  31619. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31620.  
  31621. Bit: 7 6 5 4 3 2 1 0
  31622.  
  31623. BDB7 BDB6 BDB5 BDB4 BDB3 BDB2 BDB1 BDB0
  31624.  
  31625. Initial value: * * * * * * * *
  31626.  
  31627. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31628.  
  31629. Note: *: Undefined
  31630.  
  31631. 643
  31632.  
  31633. ----------------------- Page 660-----------------------
  31634.  
  31635. Break data register B (BDRB) is a 32-bit readable/writable register that specifies the data
  31636. (bits 31–0) to be used in the channel B break conditions. BDRB is not initialized by a power-
  31637. on reset or manual reset.
  31638.  
  31639. Bits 31 to 0—Break Data B31 to B0 (BDB31–BDB0): These bits hold the data (bits 31–0) to
  31640. be used in the channel B break conditions.
  31641.  
  31642. 20.2.10 Break Data Mask Register B (BDMRB)
  31643.  
  31644. Bit: 31 30 29 28 27 26 25 24
  31645.  
  31646. BDMB31 BDMB30 BDMB29 BDMB28 BDMB27 BDMB26 BDMB25 BDMB24
  31647.  
  31648. Initial value: * * * * * * * *
  31649.  
  31650. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31651.  
  31652. Bit: 23 22 21 20 19 18 17 16
  31653.  
  31654. BDMB23 BDMB22 BDMB21 BDMB20 BDMB19 BDMB18 BDMB17 BDMB16
  31655.  
  31656. Initial value: * * * * * * * *
  31657.  
  31658. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31659.  
  31660. Bit: 15 14 13 12 11 10 9 8
  31661.  
  31662. BDMB15 BDMB14 BDMB13 BDMB12 BDMB11 BDMB10 BDMB9 BDMB8
  31663.  
  31664. Initial value: * * * * * * * *
  31665.  
  31666. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31667.  
  31668. Bit: 7 6 5 4 3 2 1 0
  31669.  
  31670. BDMB7 BDMB6 BDMB5 BDMB4 BDMB3 BDMB2 BDMB1 BDMB0
  31671.  
  31672. Initial value: * * * * * * * *
  31673.  
  31674. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31675.  
  31676. Note: *: Undefined
  31677.  
  31678. Break data mask register B (BDMRB) is a 32-bit readable/writable register that specifies
  31679. which bits of the break data set in BDRB are to be masked. BDMRB is not initialized by a
  31680. power-on reset or manual reset.
  31681.  
  31682. 644
  31683.  
  31684. ----------------------- Page 661-----------------------
  31685.  
  31686. Bits 31 to 0—Break Data Mask B31 to B0 (BDMB31–BDMB0): These bits specify whether
  31687. the corresponding bit of the channel B break data (BDB31–BDB0) set in BDRB is to be
  31688. masked.
  31689.  
  31690. Bit 31–0: BDMBn Description
  31691.  
  31692. 0 Channel B break data bit BDBn is included in break conditions
  31693.  
  31694. 1 Channel B break data bit BDBn is masked, and not included in break
  31695. conditions
  31696.  
  31697. n = 31 to 0
  31698. Note: When the data bus value is included in the break conditions, the operand size should be
  31699. specified. When byte size is specified, set the same data in bits 15–8 and 7–0 of BDRB and
  31700. BDMRB.
  31701.  
  31702. 20.2.11 Break Bus Cycle Register B (BBRB)
  31703.  
  31704. BBRB is the channel B bus break register. The bit configuration is the same as for BBRA.
  31705.  
  31706. 20.2.12 Break Control Register (BRCR)
  31707.  
  31708. Bit: 15 14 13 12 11 10 9 8
  31709.  
  31710. CMFA CMFB — — — PCBA — —
  31711.  
  31712. Initial value: 0 0 0 0 0 * 0 0
  31713.  
  31714. R/W: R/W R/W R R R R/W R R
  31715.  
  31716. Bit: 7 6 5 4 3 2 1 0
  31717.  
  31718. DBEB PCBB — — SEQ — — UBDE
  31719.  
  31720. Initial value: * * 0 0 * 0 0 0
  31721.  
  31722. R/W: R/W R/W R R R/W R R R/W
  31723.  
  31724. Note: *: Undefined
  31725.  
  31726. The break control register (BRCR) is a 16-bit readable/writable register that specifies (1)
  31727. whether channels A and B are to be used as two independent channels or in a sequential
  31728. condition, (2) whether the break is to be effected before or after instruction execution, (3)
  31729. whether the BDRB register is to be included in the channel B break conditions, and (4)
  31730. whether the user break debug function is to be used. BRCR also contains condition match
  31731. flags. The CMFA, CMFB, and UBDE bits in BRCR are initialized to 0 by a power-on reset,
  31732. but retain their value in standby mode. The value of the PCBA, DBEB, PCBB, and SEQ bits
  31733. is undefined after a power-on reset or manual reset, so these bits should be initialized by
  31734. software as necessary.
  31735.  
  31736. 645
  31737.  
  31738. ----------------------- Page 662-----------------------
  31739.  
  31740. Bit 15—Condition Match Flag A (CMFA): Set to 1 when a break condition set for channel
  31741. A is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once
  31742. being set, it should be cleared with a write.)
  31743.  
  31744. Bit 15: CMFA Description
  31745.  
  31746. 0 Channel A break condition is not matched (Initial value)
  31747.  
  31748. 1 Channel A break condition match has occurred
  31749.  
  31750. Bit 14—Condition Match Flag B (CMFB): Set to 1 when a break condition set for channel
  31751. B is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once
  31752. being set, it should be cleared with a write.)
  31753.  
  31754. Bit 14: CMFB Description
  31755.  
  31756. 0 Channel B break condition is not matched (Initial value)
  31757.  
  31758. 1 Channel B break condition match has occurred
  31759.  
  31760. Bits 13 to 11—Reserved: These bits are always read as 0, and should only be written with 0.
  31761.  
  31762. Bit 10—Instruction Access Break Select A (PCBA): Specifies whether a channel A
  31763. instruction access cycle break is to be effected before or after the instruction is executed.
  31764. This bit is not initialized by a power-on reset or manual reset.
  31765.  
  31766. Bit 10: PCBA Description
  31767.  
  31768. 0 Channel A PC break is effected before instruction execution
  31769.  
  31770. 1 Channel A PC break is effected after instruction execution
  31771.  
  31772. Bits 9 and 8—Reserved: These bits are always read as 0, and should only be written with 0.
  31773.  
  31774. Bit 7—Data Break Enable B (DBEB): Specifies whether the data bus condition is to be
  31775. included in the channel B break conditions. This bit is not initialized by a power-on reset or
  31776. manual reset.
  31777.  
  31778. Bit 7: DBEB Description
  31779.  
  31780. 0 Data bus condition is not included in channel B conditions
  31781.  
  31782. 1 Data bus condition is included in channel B conditions
  31783.  
  31784. Note: When the data bus is included in the break conditions, bits IDB1–0 in break bus cycle
  31785. register B (BBRB) should be set to 10 or 11.
  31786.  
  31787. 646
  31788.  
  31789. ----------------------- Page 663-----------------------
  31790.  
  31791. Bit 6—PC Break Select B (PCBB): Specifies whether a channel B instruction access cycle
  31792. break is to be effected before or after the instruction is executed. This bit is not initialized by
  31793. a power-on reset or manual reset.
  31794.  
  31795. Bit 6: PCBB Description
  31796.  
  31797. 0 Channel B PC break is effected before instruction execution
  31798.  
  31799. 1 Channel B PC break is effected after instruction execution
  31800.  
  31801. Bits 5 and 4—Reserved: These bits are always read as 0, and should only be written with 0.
  31802.  
  31803. Bit 3—Sequence Condition Select (SEQ): Specifies whether the conditions for channels A
  31804. and B are to be independent or sequential. This bit is not initialized by a power-on reset or
  31805. manual reset.
  31806.  
  31807. Bit 3: SEQ Description
  31808.  
  31809. 0 Channel A and B comparisons are performed as independent conditions
  31810.  
  31811. 1 Channel A and B comparisons are performed as sequential conditions
  31812. (channel A → channel B)
  31813.  
  31814. Bits 2 and 1—Reserved: These bits are always read as 0, and should only be written with 0.
  31815.  
  31816. Bit 0—User Break Debug Enable (UBDE): Specifies whether the user break debug function
  31817. (see section 20.4, User Break Debug Support Function) is to be used.
  31818.  
  31819. Bit 0: UBDE Description
  31820.  
  31821. 0 User break debug function is not used (Initial value)
  31822.  
  31823. 1 User break debug function is used
  31824.  
  31825. 20.3 Operation
  31826.  
  31827. 20.3.1 Explanation of Terms Relating to Accesses
  31828.  
  31829. An instruction access is an access that obtains an instruction. An operand access is any
  31830. memory access for the purpose of instruction execution. For example, the access to address
  31831. PC+disp×2+4 in the instruction MOV.W @(disp,PC), Rn (an access very close to the
  31832. program counter) is an operand access. The fetching of an instruction from the branch
  31833. destination when a branch instruction is executed is also an instruction access. As the term
  31834. “data” is used to distinguish data from an address, the term “operand access” is used in this
  31835. section.
  31836.  
  31837. 647
  31838.  
  31839. ----------------------- Page 664-----------------------
  31840.  
  31841. In the SH7750, all operand accesses are treated as either read accesses or write accesses.
  31842. The following instructions require special attention:
  31843.  
  31844. • PREF, OCBP, and OCBWB instructions: Treated as read accesses.
  31845.  
  31846. • MOVCA and OCBI instructions: Treated as write accesses.
  31847.  
  31848. • TAS instruction: Treated as one read access and one write access.
  31849.  
  31850. The operand accesses for the PREF, OCBP, OCBWB, and OCBI instructions are accesses
  31851. with no access data.
  31852.  
  31853. The SH7750 handles all operand accesses as having a data size. The data size can be byte,
  31854. word, longword, or quadword. The operand data size for the PREF, OCBP, OCBWB,
  31855. MOVCA, and OCBI instructions is treated as longword.
  31856.  
  31857. 20.3.2 Explanation of Terms Relating to Instruction Intervals
  31858.  
  31859. In this section, “1 (2, 3, ...) instruction(s) after...”, as a measure of the distance between two
  31860. instructions, is defined as follows. A branch is counted as an interval of two instructions.
  31861.  
  31862. • Example of sequence of instructions with no branch:
  31863.  
  31864. 100 Instruction A (0 instructions after instruction A)
  31865.  
  31866. 102 Instruction B (1 instruction after instruction A)
  31867.  
  31868. 104 Instruction C (2 instructions after instruction A)
  31869.  
  31870. 106 Instruction D (3 instructions after instruction A)
  31871.  
  31872. • Example of sequence of instructions with a branch (however, the example of a sequence
  31873. of instructions with no branch should be applied when the branch destination of a delayed
  31874. branch instruction is the instruction itself + 4):
  31875.  
  31876. 100 Instruction A: BT/S L200 (0 instructions after instruction A)
  31877.  
  31878. 102 Instruction B (1 instruction after instruction A, 0 instructions after
  31879. instruction B)
  31880.  
  31881. L200 200 Instruction C (3 instructions after instruction A, 2
  31882. instructions after instruction B)
  31883.  
  31884. 202 Instruction D (4 instructions after instruction A, 3 instructions after
  31885. instruction B)
  31886.  
  31887. 648
  31888.  
  31889. ----------------------- Page 665-----------------------
  31890.  
  31891. 20.3.3 User Break Operation Sequence
  31892.  
  31893. The sequence of operations from setting of break conditions to user break exception handling
  31894. is described below.
  31895.  
  31896. 1. Specify pre- or post-execution breaking in the case of an instruction access, inclusion or
  31897. exclusion of the data bus value in the break conditions in the case of an operand access,
  31898. and use of independent or sequential channel A and B break conditions, in the break
  31899. control register (BRCR). Set the break addresses in the break address registers for each
  31900. channel (BARA, BARB), the ASIDs corresponding to the break space in the break ASID
  31901. registers (BASRA, BASRB), and the address and ASID masking methods in the break
  31902. address mask registers (BAMRA, BAMRB). If the data bus value is to be included in the
  31903. break conditions, also set the break data in the break data register (BDRB) and the data
  31904. mask in the break data mask register (BDMRB).
  31905.  
  31906. 2. Set the break bus conditions in the break bus cycle registers (BBRA, BBRB). If even one
  31907. of the BBRA/BBRB instruction access/operand access select (ID bit) and read/write
  31908. select groups (RW bit) is set to 00, a user break interrupt will not be generated on the
  31909. corresponding channel. Make the BBRA and BBRB settings after all other break-related
  31910. register settings have been completed. If breaks are enabled with BBRA/BBRB while the
  31911. break address, data, or mask register, or the break control register is in the initial state
  31912. after a reset, a break may be generated inadvertently.
  31913.  
  31914. 3. The operation when a break condition is satisfied depends on the BL bit (in the CPU’s SR
  31915. register). When the BL bit is 0, exception handling is started and the condition match flag
  31916. (CMFA/CMFB) for the respective channel is set for the matched condition. When the BL
  31917. bit is 1, the condition match flag (CMFA/CMFB) for the respective channel is set for the
  31918. matched condition but exception handling is not started.
  31919.  
  31920. The condition match flags (CMFA, CMFB) are set by a branch condition match, but are
  31921. not reset. Therefore, a memory store instruction should be used on the BRCR register to
  31922. clear the flags to 0. See section 20.3.6, Condition Match Flag Setting, for the exact setting
  31923. conditions for the condition match flags.
  31924.  
  31925. 4. When sequential condition mode has been selected, and the channel B condition is
  31926. matched after the channel A condition has been matched, a break is effected at the
  31927. instruction at which the channel B condition was matched. See section 20.3.8, Contiguous
  31928. A and B Settings for Sequential Conditions, for the operation when the channel A
  31929. condition match and channel B condition match occur close together. With sequential
  31930. conditions, only the channel B condition match flag is set. When sequential condition
  31931. mode has been selected, if it is wished to clear the channel A match when the channel A
  31932. condition has been matched but the channel B condition has not yet been matched, this
  31933. can be done by writing 0 to the SEQ bit in the BRCR register.
  31934.  
  31935. 649
  31936.  
  31937. ----------------------- Page 666-----------------------
  31938.  
  31939. 20.3.4 Instruction Access Cycle Break
  31940.  
  31941. 1. When an instruction access/read/word setting is made in the break bus cycle register
  31942. (BBRA/BBRB), an instruction access cycle can be used as a break condition. In this
  31943. case, breaking before or after execution of the relevant instruction can be selected with
  31944. the PCBA/PCBB bit in the break control register (BRCR). When an instruction access
  31945. cycle is used as a break condition, clear the LSB of the break address registers (BARA,
  31946. BARB) to 0. A break will not be generated if this bit is set to 1.
  31947.  
  31948. 2. When a pre-execution break is specified, the break is effected when it is confirmed that
  31949. the instruction is to be fetched and executed. Therefore, an overrun-fetched instruction (an
  31950. instruction that is fetched but not executed when a branch or exception occurs) cannot be
  31951. used in a break. However, if a TLB miss or TLB protection violation exception occurs at
  31952. the time of the fetch of an instruction subject to a break, the break exception handling is
  31953. carried out first. The instruction TLB exception handling is performed when the instruction
  31954. is re-executed (see section 5.4, Exception Types and Priorities). Also, since a delayed
  31955. branch instruction and the delay slot instruction are executed as a single instruction, if a
  31956. pre-execution break is specified for a delay slot instruction, the break will be effected
  31957. before execution of the delayed branch instruction. However, a pre-execution break cannot
  31958. be specified for the delay slot instruction for an RTE instruction.
  31959.  
  31960. 3. With a pre-execution break, the instruction set as a break condition is executed, then a
  31961. break interrupt is generated before the next instruction is executed. When a post-execution
  31962. break is set for a delayed branch instruction, the delay slot is executed and the break is
  31963. effected before execution of the instruction at the branch destination (when the branch is
  31964. made) or the instruction two instructions ahead of the branch instruction (when the branch
  31965. is not made).
  31966.  
  31967. 4. When an instruction access cycle is set for channel B, break data register B (BDRB) is
  31968. ignored in judging whether there is an instruction access match. Therefore, a break
  31969. condition specified by the DBEB bit in BRCR is not executed.
  31970.  
  31971. 650
  31972.  
  31973. ----------------------- Page 667-----------------------
  31974.  
  31975. 20.3.5 Operand Access Cycle Break
  31976.  
  31977. 1. In the case of an operand access cycle break, the bits included in address bus comparison
  31978. vary as shown below according to the data size specification in the break bus cycle
  31979. register (BBRA/BBRB).
  31980.  
  31981. Data Size Address Bits Compared
  31982.  
  31983. Quadword (100) Address bits A31–A3
  31984.  
  31985. Longword (011) Address bits A31–A2
  31986.  
  31987. Word (010) Address bits A31–A1
  31988.  
  31989. Byte (001) Address bits A31–A0
  31990.  
  31991. Not included in condition (000) In quadword access, address bits A31–A3
  31992.  
  31993. In longword access, address bits A31–A2
  31994.  
  31995. In word access, address bits A31–A1
  31996.  
  31997. In byte access, address bits A31–A0
  31998.  
  31999. 2. When data value is included in break conditions in channel B
  32000.  
  32001. When a data value is included in the break conditions, set the DBEB bit in the break
  32002. control register (BRCR) to 1. In this case, break data register B (BDRB) and break data
  32003. mask register B (BDMRB) settings are necessary in addition to the address condition. A
  32004. user break interrupt is generated when all three conditions—address, ASID, and data—are
  32005. matched. When a quadword access occurs, the 64-bit access data is divided into an upper
  32006. 32 bits and lower 32 bits, and interpreted as two 32-bit data units. A break is generated if
  32007. either of the 32-bit data units satisfies the data match condition.
  32008.  
  32009. Set the IDB1–0 bits in break bus cycle register B (BBRB) to 10 or 11. When byte data is
  32010. specified, the same data should be set in the two bytes comprising bits 15–8 and bits 7–0
  32011. in break data register B (BDRB) and break data mask register B (BDMRB). When word
  32012. or byte is set, bits 31–16 of BDRB and BDMRB are ignored.
  32013.  
  32014. 3. When the DBEB bit in the break control register (BRCR) is set to 1, a break is not
  32015. generated by an operand access with no access data (an operand access in a PREF,
  32016. OCBP, OCBWB, or OCBI instruction).
  32017.  
  32018. 651
  32019.  
  32020. ----------------------- Page 668-----------------------
  32021.  
  32022. 20.3.6 Condition Match Flag Setting
  32023.  
  32024. 1. Instruction access with post-execution condition, or operand access
  32025.  
  32026. The flag is set when execution of the instruction that causes the break is completed. As an
  32027. exception to this, however, in the case of an instruction with more than one operand
  32028. access the flag may be set on detection of the match condition alone, without waiting for
  32029. execution of the instruction to be completed.
  32030.  
  32031. Example 1:
  32032.  
  32033. 100 BT L200 (branch performed)
  32034.  
  32035. 102 Instruction (operand access break on channel A) → flag not set
  32036.  
  32037. Example 2:
  32038.  
  32039. 110 FADD (FPU exception)
  32040.  
  32041. 112 Instruction (operand access break on channel A) → flag not set
  32042.  
  32043. 2. Instruction access with pre-execution condition
  32044.  
  32045. The flag is set when the break match condition is detected.
  32046.  
  32047. Example 1:
  32048.  
  32049. 110 Instruction (pre-execution break on channel A) → flag set
  32050.  
  32051. 112 Instruction (pre-execution break on channel B) → flag not set
  32052.  
  32053. Example 2:
  32054.  
  32055. 110 Instruction (pre-execution break on channel B, instruction access TLB miss) → flag
  32056. set
  32057.  
  32058. 20.3.7 Program Counter (PC) Value Saved
  32059.  
  32060. 1. When instruction access (pre-execution) is set as a break condition, the program counter
  32061. (PC) value saved to SPC in user break interrupt handling is the address of the instruction
  32062. at which the break condition match occurred. In this case, a user break interrupt is
  32063. generated and the fetched instruction is not executed.
  32064.  
  32065. 2. When instruction access (post-execution) is set as a break condition, the program counter
  32066. (PC) value saved to SPC in user break interrupt handling is the address of the instruction
  32067. to be executed after the instruction at which the break condition match occurred. In this
  32068. case, the fetched instruction is executed, and a user break interrupt is generated before
  32069. execution of the next instruction.
  32070.  
  32071. 3. When an instruction access (post-execution) break condition is set for a delayed branch
  32072. instruction, the delay slot instruction is executed and a user break is effected before
  32073. execution of the instruction at the branch destination (when the branch is made) or the
  32074. instruction two instructions ahead of the branch instruction (when the branch is not made).
  32075. In this case, the PC value saved to SPC is the address of the branch destination (when the
  32076. branch is made) or the instruction following the delay slot instruction (when the branch is
  32077. not made).
  32078.  
  32079. 652
  32080.  
  32081. ----------------------- Page 669-----------------------
  32082.  
  32083. 4. When operand access (address only) is set as a break condition, the address of the
  32084. instruction to be executed after the instruction at which the condition match occurred is
  32085. saved to SPC.
  32086.  
  32087. 5. When operand access (address + data) is set as a break condition, execution of the
  32088. instruction at which the condition match occurred is completed. A user break interrupt is
  32089. generated before execution of instructions from one instruction later to four instructions
  32090. later. It is not possible to specify at which instruction, from one later to four later, the
  32091. interrupt will be generated. The start address of the instruction after the instruction for
  32092. which execution is completed at the point at which user break interrupt handling is started
  32093. is saved to SPC. If an instruction between one instruction later and four instructions later
  32094. causes another exception, control is performed as follows. Designating the exception
  32095. caused by the break as exception 1, and the exception caused by an instruction between
  32096. one instruction later and four instructions later as exception 2, the fact that memory
  32097. updating and register updating that essentially cannot be performed by exception 2 cannot
  32098. be performed is guaranteed irrespective of the existence of exception 1. The program
  32099. counter value saved is the address of the first instruction for which execution is
  32100. suppressed. Whether exception 1 or exception 2 is used for the exception jump destination
  32101. and the value written to the exception register (EXPEVT/INTEVT) is not guaranteed.
  32102. However, if exception 2 is from a source not synchronized with an instruction (external
  32103. interrupt or peripheral module interrupt), exception 1 is used for the exception jump
  32104. destination and the value written to the exception register (EXPEVT/INTEVT).
  32105.  
  32106. 20.3.8 Contiguous A and B Settings for Sequential Conditions
  32107.  
  32108. When channel A match and channel B match timings are close together, a sequential break
  32109. may not be guaranteed. Rules relating to the guaranteed range are given below.
  32110.  
  32111. 1. Instruction access matches on both channel A and channel B
  32112.  
  32113. Instruction B is 0 instructions after Equivalent to setting the same address. Do not use
  32114. instruction A this setting.
  32115.  
  32116. Instruction B is 1 instruction after Sequential operation is not guaranteed.
  32117. instruction A
  32118.  
  32119. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  32120. after instruction A
  32121.  
  32122. 2. Instruction access match on channel A, operand access match on channel B
  32123.  
  32124. Instruction B is 0 or 1 instruction after Sequential operation is not guaranteed.
  32125. instruction A
  32126.  
  32127. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  32128. after instruction A
  32129.  
  32130. 3. Operand access match on channel A, instruction access match on channel B
  32131.  
  32132. 653
  32133.  
  32134. ----------------------- Page 670-----------------------
  32135.  
  32136. Instruction B is 0 to 3 instructions after Sequential operation is not guaranteed.
  32137. instruction A
  32138.  
  32139. Instruction B is 4 or more instructions Sequential operation is guaranteed.
  32140. after instruction A
  32141.  
  32142. 4. Operand access matches on both channel A and channel B
  32143.  
  32144. Do not make a setting such that a single operand access will match the break conditions
  32145. of both channel A and channel B. There are no other restrictions. For example, sequential
  32146. operation is guaranteed even if two accesses within a single instruction match channel A
  32147. and channel B conditions in turn.
  32148.  
  32149. 20.3.9 Usage Notes
  32150.  
  32151. 1. Do not execute a post-execution instruction access break for the SLEEP instruction.
  32152.  
  32153. 2. Do not make an operand access break setting between 1 and 3 instructions before a
  32154. SLEEP instruction.
  32155.  
  32156. 3. The value of the BL bit referenced in a user break exception depends on the break setting,
  32157. as follows.
  32158.  
  32159. a.Pre-execution instruction access break: The BL bit value before the executed
  32160. instruction is referenced.
  32161.  
  32162. b.Post-execution instruction access break: The OR of the BL bit values before and
  32163. after the executed instruction is referenced.
  32164.  
  32165. c.Operand access break (address/data): The BL bit value after the executed instruction
  32166. is referenced.
  32167.  
  32168. d.In the case of an instruction that modifies the BL bit
  32169.  
  32170. SL.BL Pre- Post- Pre- Post- Operand
  32171. Execution Execution Execution Execution Access
  32172. Instruction Instruction Instruction Instruction (Address/Data
  32173. Access Access Access Access )
  32174.  
  32175. 0 → 0 A A A A A
  32176.  
  32177. 1 → 0 M M M M A
  32178.  
  32179. 0 → 1 A M A M M
  32180.  
  32181. 1 → 1 M M M M M
  32182.  
  32183. A: Accepted
  32184. M: Masked
  32185.  
  32186. 654
  32187.  
  32188. ----------------------- Page 671-----------------------
  32189.  
  32190. e.In the case of an RTE delay slot
  32191.  
  32192. The BL bit value before execution of a delay slot instruction is the same as the BL bit
  32193. value before execution of an RTE instruction. The BL bit value after execution of a
  32194. delay slot instruction is the same as the first BL bit value for the first instruction
  32195. executed on returning by means of an RTE instruction (the same as the value of the
  32196. BL bit in SSR before execution of the RTE instruction).
  32197.  
  32198. f. If an interrupt or exception is accepted with the BL bit cleared to 0, the value of the
  32199. BL bit before execution of the first instruction of the exception handling routine is 1.
  32200.  
  32201. 4. If channels A and B both match independently at virtually the same time, and, as a result,
  32202. the SPC value is the same for both user break interrupts, only one user break interrupt is
  32203. generated, but both the CMFA bit and the CMFB bit are set. For example:
  32204.  
  32205. 110 Instruction (post-execution instruction break on channel A) → SPC = 112, CMFA =
  32206. 1
  32207.  
  32208. 112 Instruction (pre-execution instruction break on channel B) → SPC = 112, CMFB = 1
  32209.  
  32210. 5. The PCBA or PCBB bit in BRCR is invalid for an instruction access break setting.
  32211.  
  32212. 6. When the SEQ bit in BRCR is 1, the internal sequential break state is initialized by a
  32213. channel B condition match. For example: A → A → B (user break generated) → B (no
  32214. break generated)
  32215.  
  32216. 7. In the event of contention between a re-execution type exception and a post-execution
  32217. break in a multistep instruction, the re-execution type exception is generated. In this case,
  32218. the CMF bit may or may not be set to 1 when the break condition occurs.
  32219.  
  32220. 8. A post-execution break is classified as a completion type exception. Consequently, in the
  32221. event of contention between a completion type exception and a post-execution break, the
  32222. post-execution break is suppressed in accordance with the priorities of the two events. For
  32223. example, in the case of contention between a TRAPA instruction and a post-execution
  32224. break, the user break is suppressed. However, in this case, the CMF bit is set by the
  32225. occurrence of the break condition.
  32226.  
  32227. 20.4 User Break Debug Support Function
  32228.  
  32229. The user break debug support function enables the processing used in the event of a user
  32230. break exception to be changed. When a user break exception occurs, if the UBDE bit is set to
  32231. 1 in the BRCR register, the DBR register value will be used as the branch destination address
  32232. instead of [VBR + offset]. The value of R15 is saved in the SGR register regardless of the
  32233. value of the UBDE bit in the BRCR register or the kind of exception event. A flowchart of the
  32234. user break debug support function is shown in figure 20.2.
  32235.  
  32236. 655
  32237.  
  32238. ----------------------- Page 672-----------------------
  32239.  
  32240. Exception/interrupt
  32241. generation
  32242.  
  32243. Hardware operation
  32244. SPC ← PC
  32245. SSR ← SR
  32246. SR.BL ← B'1
  32247.  
  32248. SR.MD ← B'1
  32249.  
  32250. SR.RB ← B'1
  32251.  
  32252. Exception Exception/ Trap
  32253. interrupt/trap?
  32254.  
  32255. Interrupt
  32256.  
  32257. EXPEVT ← exception code INTEVT ← interrupt code TRA ← TRAPA (imm)
  32258.  
  32259. SGR ← R15
  32260.  
  32261. No Yes
  32262. Reset exception?
  32263.  
  32264. Yes (BRCR.UBDE == 1) && No
  32265. (user break exception)?
  32266.  
  32267. PC ← DBR PC ← VBR + vector offset PC ← H'A0000000
  32268.  
  32269. Debug program Exception handler
  32270.  
  32271. R15 ← SGR
  32272. (STC instruction)
  32273.  
  32274. Execute RTE instruction
  32275. PC ← SPC
  32276. SR ← SSR
  32277.  
  32278. End of exception
  32279. operations
  32280.  
  32281. Figure 20.2 User Break Debug Support Function Flowchart
  32282.  
  32283. 656
  32284.  
  32285. ----------------------- Page 673-----------------------
  32286.  
  32287. 20.5 Examples of Use
  32288.  
  32289. Instruction Access Cycle Break Condition Settings
  32290.  
  32291. • Register settings: BASRA = H'80 / BARA = H'00000404 / BAMRA = H'00 /
  32292. BBRA = H'0014 / BASRB = H'70 / BARB = H'00008010 / BAMRB = H'01 /
  32293. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0400
  32294.  
  32295. Conditions set: Independent channel A/channel B mode
  32296.  
  32297.  Channel A: ASID: H'80 / address: H'00000404 / address mask: H'00
  32298.  
  32299. Bus cycle: instruction access (post-instruction-execution), read (operand size not
  32300. included in conditions)
  32301.  
  32302.  Channel B: ASID: H'70 / address: H'00008010 / address mask: H'01
  32303.  
  32304. Data: H'00000000 / data mask: H'00000000
  32305.  
  32306. Bus cycle: instruction access (pre-instruction-execution), read (operand size not
  32307. included in conditions)
  32308.  
  32309. A user break is generated after execution of the instruction at address H'00000404 with
  32310. ASID = H'80, or before execution of an instruction at addresses H'00008000–H'000083FE
  32311. with ASID = H'70.
  32312.  
  32313. • Register settings: BASRA = H'80 / BARA = H'00037226 / BAMRA = H'00 /
  32314. BBRA = H'0016 / BASRB = H'70 / BARB = H'0003722E / BAMRB = H'00 /
  32315. BBRB = H'0016 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0008
  32316.  
  32317. Conditions set: Channel A → channel B sequential mode
  32318.  
  32319.  Channel A: ASID: H'80 / address: H'00037226 / address mask: H'00
  32320.  
  32321. Bus cycle: instruction access (pre-instruction-execution), read, word
  32322.  
  32323.  Channel B: ASID: H'70 / address: H'0003722E / address mask: H'00
  32324.  
  32325. Data: H'00000000 / data mask: H'00000000
  32326.  
  32327. Bus cycle: instruction access (pre-instruction-execution), read, word
  32328.  
  32329. The instruction at address H'00037266 with ASID = H'80 is executed, then a user break is
  32330. generated before execution of the instruction at address H'0003722E with ASID = H'70.
  32331.  
  32332. • Register settings: BASRA = H'80 / BARA = H'00027128 / BAMRA = H'00 /
  32333. BBRA = H'001A / BASRB = H'70 / BARB = H'00031415 / BAMRB = H'00 /
  32334. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0000
  32335.  
  32336. Conditions set: Independent channel A/channel B mode
  32337.  
  32338.  Channel A: ASID: H'80 / address: H'00027128 / address mask: H'00
  32339.  
  32340. Bus cycle: CPU, instruction access (pre-instruction-execution), write, word
  32341.  
  32342.  Channel B: ASID: H'70 / address: H'00031415 / address mask: H'00
  32343.  
  32344. Data: H'00000000 / data mask: H'00000000
  32345.  
  32346. 657
  32347.  
  32348. ----------------------- Page 674-----------------------
  32349.  
  32350. Bus cycle: CPU, instruction access (pre-instruction-execution), read (operand size not
  32351. included in conditions)
  32352.  
  32353. A user break interrupt is not generated on channel A since the instruction access is not a
  32354. write cycle.
  32355.  
  32356. A user break interrupt is not generated on channel B since instruction access is performed
  32357. on an even address.
  32358.  
  32359. Operand Access Cycle Break Condition Settings
  32360.  
  32361. • Register settings: BASRA = H'80 / BARA = H'00123456 / BAMRA = H'00 /
  32362. BBRA = H'0024 / BASRB = H'70/ BARB = H'000ABCDE / BAMRB = H'02 /
  32363. BBRB = H'002A / BDRB = H'0000A512 / BDMRB = H'00000000 / BRCR = H'0080
  32364.  
  32365. Conditions set: Independent channel A/channel B mode
  32366.  
  32367.  Channel A: ASID: H'80 / address: H'00123456 / address mask: H'00
  32368.  
  32369. Bus cycle: operand access, read (operand size not included in conditions)
  32370.  
  32371.  Channel B: ASID: H'70 / address: H'000ABCDE / address mask: H'02
  32372.  
  32373. Data: H'0000A512 / data mask: H'00000000
  32374.  
  32375. Bus cycle: operand access, write, word
  32376.  
  32377. Data break enabled
  32378.  
  32379. On channel A, a user break interrupt is generated in the event of a longword read at
  32380. address H'00123454, a word read at address H'00123456, or a byte read at address
  32381. H'00123456, with ASID = H'80.
  32382.  
  32383. On channel B, a user break interrupt is generated when H'A512 is written by word access
  32384. to any address from H'000AB000 to H'000ABFFE with ASID = H'70.
  32385.  
  32386. 658
  32387.  
  32388. ----------------------- Page 675-----------------------
  32389.  
  32390. Section 21 Hitachi User Debug Interface (Hitachi-UDI)
  32391.  
  32392. 21.1 Overview
  32393.  
  32394. 21.1.1 Features
  32395.  
  32396. The Hitachi user debug interface (Hitachi-UDI) is a serial input/output interface conforming
  32397. to JTAG, IEEE 1149.1, and IEEE Standard Test Access Port and Boundary-Scan Architecture.
  32398. The SH7750’s Hitachi-UDI does not support boundary-scan, but is used for emulator
  32399. connection. The functions of this interface should not be used when using an emulator. Refer
  32400. to the emulator manual for the method of connecting the emulator. The Hitachi-UDI uses six
  32401. pins (TCK, TMS, TD, TDO, , and /BRKACK). The pin functions and serial
  32402. transfer protocol conform to the JTAG specifications.
  32403.  
  32404. 21.1.2 Block Diagram
  32405.  
  32406. Figure 21.1 shows a block diagram of the Hitachi-UDI. The TAP (test access port) controller
  32407. and control registers are reset independently of the chip reset pin by driving the pin low
  32408. or setting TMS to 1 and applying TCK for at least five clock cycles. The other circuits are
  32409. reset and initialized in an ordinary reset. The Hitachi-UDI circuit has four internal registers:
  32410. SDBPR, SDIR, SDDRH, and SDDRL (these last two together designated SDDR). The
  32411. SDBPR register supports the JTAG bypass mode, SDIR is the command register, and SDDR
  32412. is the data register. SDIR can be accessed directly from the TDI and TDO pins.
  32413.  
  32414. 659
  32415.  
  32416. ----------------------- Page 676-----------------------
  32417.  
  32418. Interrupt/reset
  32419. Break etc.
  32420. /BRKACK
  32421. control
  32422.  
  32423. TCK
  32424.  
  32425. TAP
  32426. TMS Decoder
  32427. controller
  32428.  
  32429.  
  32430.  
  32431. TDI
  32432. s
  32433. u
  32434. SDIR b
  32435. e
  32436. r l
  32437. e u
  32438. t d
  32439. s
  32440. i o
  32441. g m
  32442. SDBPR e l
  32443. r
  32444. t a
  32445. f r
  32446. i SDDRH e
  32447. h
  32448. S h
  32449. p
  32450. i
  32451. SDDRL r
  32452. e
  32453. P
  32454. TDO MUX
  32455.  
  32456. Figure 21.1 Block Diagram of Hitachi-UDI Circuit
  32457.  
  32458. 660
  32459.  
  32460. ----------------------- Page 677-----------------------
  32461.  
  32462. 21.1.3 Pin Configuration
  32463.  
  32464. Table 21.1 shows the Hitachi-UDI pin configuration.
  32465.  
  32466. Table 21.1 Hitachi-UDI Pins
  32467.  
  32468. Pin Name Abbreviatio I / O Function When Not
  32469. n Used
  32470. Clock pin TCK Input Same as the JTAG serial clock input Open*1
  32471.  
  32472. pin. Data is transferred from data
  32473. input pin TDI to the Hitachi-UDI
  32474. circuit, and data is read from data
  32475. output pin TDO, in synchronization
  32476. with this signal.
  32477. Mode pin TMS Input The mode select input pin. Changing Open*1
  32478.  
  32479. this signal in synchronization with
  32480. TCK determines the meaning of the
  32481. data input from TDI. The protocol
  32482. conforms to the JTAG (IEEE Std
  32483. 1149.1) specification.
  32484. Reset pin Input The input pin that resets the Hitachi- Fix at ground*2
  32485.  
  32486. UDI. This signal is received
  32487. asynchronously with respect to TCK,
  32488. and effects a reset of the JTAG
  32489. interface circuit when low.
  32490. must be driven low for a certain period
  32491. when powering on, regardless of
  32492. whether or not JTAG is used. This
  32493. differs from the IEEE specification.
  32494. Data input TDI Input The data input pin. Data is sent to the Open*1
  32495.  
  32496. pin Hitachi-UDI circuit by changing this
  32497. signal in synchronization with TCK.
  32498.  
  32499. Data output TDO Output The data output pin. Data is sent to Open
  32500. pin the Hitachi-UDI circuit by reading this
  32501. signal in synchronization with TCK.
  32502. Emulator pin / Input/ Dedicated emulator pin Open*1
  32503.  
  32504. BRKACK output
  32505.  
  32506. Notes: 1. Pulled up inside the chip. When designing a board that allows use of an emulator, or
  32507. when using interrupts and resets via the Hitachi-UDI, there is no problem in connecting
  32508. a pullup resistance externally.
  32509. 2. When designing a board that enables the use of an emulator, or when using interrupts
  32510. and resets via the Hitachi-UDI, drive low for a period overlapping at
  32511. power-on, and also provide for control by alone.
  32512.  
  32513. 661
  32514.  
  32515. ----------------------- Page 678-----------------------
  32516.  
  32517. The maximum frequency of TCK (TMS, TDI, TDO) is 20 MHz. Make the TCK or SH7750
  32518. CPG setting so that the TCK frequency is lower than that of the SH7750’s on-chip peripheral
  32519. module clock.
  32520.  
  32521. 21.1.4 Register Configuration
  32522.  
  32523. Table 21.2 shows the Hitachi-UDI registers. Except for SDBPR, these registers are mapped in
  32524. the control register space and can be referenced by the CPU.
  32525.  
  32526. Table 21.2 Hitachi-UDI Registers
  32527.  
  32528. Hitachi-UDI
  32529. CPU Side Side
  32530.  
  32531. Abbre- P 4 Area 7 Acces Acces Initial
  32532. Name viation R/W Address Address s Size R/W s Size Value*
  32533.  
  32534. Instruction SDIR R H'FFF00000 H'1FF00000 16 R/W 16 H'FFFF
  32535. register
  32536.  
  32537. Data register H SDDR/ R/W H'FFF00008 H'1FF00008 32/16 — 32 Undefined
  32538. SDDRH
  32539.  
  32540. Data register L SDDRL R/W H'FFF0000A H'1FF0000A 16 — — Undefined
  32541.  
  32542. Bypass register SDBPR — — — — R/W 1 Undefined
  32543.  
  32544. Note: * Initialized when the pin goes low or when the TAP is in the Test-Logic-Reset state.
  32545.  
  32546. 21.2 Register Descriptions
  32547.  
  32548. 21.2.1 Instruction Register (SDIR)
  32549.  
  32550. The instruction register (SDIR) is a 16-bit register that can only be read by the CPU. In the
  32551. initial state, bypass mode is set. The value (command) is set from the serial input pin (TDI).
  32552. SDIR is initialized by the pin or in the TAP Test-Logic-Reset state. When this register
  32553. is written to from the Hitachi-UDI, writing is possible regardless of the CPU mode. However,
  32554. if a read is performed by the CPU while writing is in progress, it may not be possible to read
  32555. the correct value. In this case, SDIR should be read twice, and then read again if the read
  32556. values do not match. Operation is undefined if a reserved command is set in this register.
  32557.  
  32558. 662
  32559.  
  32560. ----------------------- Page 679-----------------------
  32561.  
  32562. Bit: 15 14 13 12 11 10 9 8
  32563.  
  32564. TI3 TI2 TI1 TI0 — — — —
  32565.  
  32566. Initial value: 1 1 1 1 1 1 1 1
  32567.  
  32568. R/W: R R R R R R R R
  32569.  
  32570. Bit: 7 6 5 4 3 2 1 0
  32571.  
  32572. — — — — — — — —
  32573.  
  32574. Initial value: 1 1 1 1 1 1 1 1
  32575.  
  32576. R/W: R R R R R R R R
  32577.  
  32578. Bits 15 to 12—Test Instruction Bits (TI3–TI0)
  32579.  
  32580. Bit 15: TI3 Bit 14: TI2 Bit 13: TI1 Bit 12: TI0 Description
  32581.  
  32582. 0 0 — — Reserved
  32583.  
  32584. 1 0 — Reserved
  32585.  
  32586. 1 0 Hitachi-UDI reset negate
  32587.  
  32588. 1 Hitachi-UDI reset assert
  32589.  
  32590. 1 0 0 — Reserved
  32591.  
  32592. 1 — Hitachi-UDI interrupt
  32593.  
  32594. 1 0 — Reserved
  32595.  
  32596. 1 0 Reserved
  32597.  
  32598. 1 Bypass mode (Initial value)
  32599.  
  32600. Bits 11 to 0—Reserved: These bits are always read as 1, and should only be written with 1.
  32601.  
  32602. 663
  32603.  
  32604. ----------------------- Page 680-----------------------
  32605.  
  32606. 21.2.2 Data Register (SDDR)
  32607.  
  32608. The data register (SDDR) is a 32-bit register, comprising the two 16-bit registers SDDRH and
  32609. SDDRL, that can be read and written to by the CPU. The value in this register is not
  32610. initialized by a or CPU reset.
  32611.  
  32612. Bit: 31 30 29 28 27 26 25 24
  32613.  
  32614. Initial value: * * * * * * * *
  32615.  
  32616. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32617.  
  32618. Bit: 23 22 21 20 19 18 17 16
  32619.  
  32620. Initial value: * * * * * * * *
  32621.  
  32622. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32623.  
  32624. Bit: 15 14 13 12 11 10 9 8
  32625.  
  32626. Initial value: * * * * * * * *
  32627.  
  32628. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32629.  
  32630. Bit: 7 6 5 4 3 2 1 0
  32631.  
  32632. Initial value: * * * * * * * *
  32633.  
  32634. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32635.  
  32636. Note: *: Undefined
  32637.  
  32638. Bits 31 to 0—DR Data: These bits store the SDDR value.
  32639.  
  32640. 21.2.3 Bypass Register (SDBPR)
  32641.  
  32642. The bypass register (SDBPR) is a one-bit register that cannot be accessed by the CPU. When
  32643. bypass mode is set in SDIR, SDBPR is connected between the TDI pin and TDO pin of the
  32644. Hitachi-UDI.
  32645.  
  32646. 664
  32647.  
  32648. ----------------------- Page 681-----------------------
  32649.  
  32650. 21.3 Operation
  32651.  
  32652. 21.3.1 TAP Control
  32653.  
  32654. Figure 21.2 shows the internal states of the TAP control circuit. These conform to the state
  32655. transitions specified by JTAG.
  32656.  
  32657. • The transition condition is the TMS value at the rising edge of TCK.
  32658.  
  32659. • The TDI value is sampled at the rising edge of TCK, and shifted at the falling edge.
  32660.  
  32661. • The TDO value changes at the falling edge of TCK. When not in the Shift-DR or Shift-IR
  32662. state, TDO is in the high-impedance state.
  32663.  
  32664. • In a transition to = 0, a transition is made to the Test-Logic-Reset state
  32665. asynchronously with respect to TCK.
  32666.  
  32667. 665
  32668.  
  32669. ----------------------- Page 682-----------------------
  32670.  
  32671. 21.3.2 Hitachi-UDI Reset
  32672.  
  32673. A power-on reset is effected by an SDIR command. A reset is effected by sending a Hitachi-
  32674. UDI reset assert command, and then sending a Hitachi-UDI reset negate command, from the
  32675. Hitachi-UDI pin (see figure 21.3). The interval required between the Hitachi-UDI reset assert
  32676. command and the Hitachi-UDI reset negate command is the same as the length of time the
  32677. reset pin is held low in order to effect a power-on reset.
  32678.  
  32679. Hitachi-UDI Hitachi-UDI
  32680. Hitachi-UDI pin reset assert reset negate
  32681.  
  32682. Chip internal reset
  32683.  
  32684. CPU state Normal Reset Reset processing
  32685.  
  32686. Figure 21.3 Hitachi-UDI Reset
  32687.  
  32688. 21.3.3 Hitachi-UDI Interrupt
  32689.  
  32690. The Hitachi-UDI interrupt function generates an interrupt by setting a command value in
  32691. SDIR from the Hitachi-UDI. The Hitachi-UDI interrupt is of general exception/interrupt
  32692. operation type, with a branch to an address based on VBR and return effected by means of an
  32693. RTE instruction. The exception code stored in control register INTEVT in this case is H'600.
  32694. The priority of the Hitachi-UDI interrupt can be controlled with bits 3 to 0 of control register
  32695. IPRC.
  32696.  
  32697. The Hitachi-UDI interrupt request signal is asserted for about eight SH7750 on-chip peripheral
  32698. clock cycles after the command is set. The number of assertion cycles is determined by the
  32699. ratio of TCK to the on-chip peripheral clock frequency. As the assertion period is limited, the
  32700. CPU may sometimes miss a request. The Hitachi-UDI interrupt command automatically
  32701. changes to the bypass command immediately after being set.
  32702.  
  32703. 21.3.4 Bypass
  32704.  
  32705. The Hitachi-UDI pins can be set to the bypass mode specified by JTAG by setting a
  32706. command in SDIR from the Hitachi-UDI.
  32707.  
  32708. ----------------------- Page 683-----------------------
  32709.  
  32710. 21.4 Usage Notes
  32711.  
  32712. 1. SDIR Command
  32713.  
  32714. Once an SDIR command has been set, it remains unchanged until initialization by
  32715. asserting or placing the TAP in the Test-Logic-Reset state, or until another
  32716. command (other than a Hitachi-UDI interrupt command) is written from the Hitachi-UDI.
  32717.  
  32718. 2. SDIR Commands in Sleep Mode
  32719.  
  32720. Sleep mode is cleared by a Hitachi-UDI interrupt or Hitachi-UDI reset, and these
  32721. exception requests are accepted in this mode. In standby mode, neither a Hitachi-UDI
  32722. interrupt nor a Hitachi-UDI reset is accepted..
  32723.  
  32724. 3. The Hitachi-UDI is used for emulator connection. Therefore, Hitachi-UDI functions cannot
  32725. be used when an emulator is used.
  32726.  
  32727. 4. The SH7750’s Hitachi-UDI pins must not be connected to a boundary-scan signal loop on
  32728. the board.
  32729.  
  32730. 667
  32731.  
  32732. ----------------------- Page 684-----------------------
  32733.  
  32734. 668
  32735.  
  32736. ----------------------- Page 685-----------------------
  32737.  
  32738. Section 22 Pin Description
  32739.  
  32740. 22.1 Pin Arrangement
  32741.  
  32742. K
  32743. ) ) ) C )
  32744. V V V A V
  32745. 3 3. 3. K 3
  32746. 3. 3 3 R 3.
  32747. ( (
  32748. ( 1 2 B (
  32749. G G L L / 1 0 D C C
  32750. P P L L S S 1 0 X T T 2
  32751. L C P P U U / R L 2
  32752. C T R
  32753. A L - - - - / T T K K / / / / 2 / K - - A L
  32754. T A S D D D I K S O 6 A A C C 5 4 3 5 4 3 2 1 0 9 8 7 K 8 L D S T A
  32755. X T S D D D D C M D D T T A A D D D 2 2 2 2 2 2 1 1 D C D C D S X T
  32756. E X V V V V T T T T M S S D D M M M A A A A A A A A M S M T V V E X
  32757.  
  32758. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  32759. NMI
  32760. A
  32761.  
  32762.  
  32763. B
  32764.  
  32765. 
  32766.  
  32767. C 1 2
  32768. L L MD1/TXD2
  32769. L L
  32770. P P
  32771. - - MD0/SCK
  32772. D S S
  32773. D47 S S D63
  32774. V V
  32775. 
  32776.  
  32777. D32 E D48
  32778. D46 D62
  32779.  
  32780. D33 1 0 D49
  32781. F A A
  32782.  Reserved 
  32783. D45 D61
  32784.  
  32785. D34 MD2/RXD2 D50
  32786. G
  32787. D44 RD/ D60
  32788.  
  32789. D35 H  D51
  32790. D43 D59
  32791.  
  32792. D36 D52
  32793. J
  32794. D42 D58
  32795.  BGA256 
  32796. D37 D53
  32797. K
  32798.  
  32799. (Top view)
  32800. D41 D57
  32801. L
  32802. D38 D54
  32803.  
  32804.  
  32805. D40 D56
  32806. M
  32807. D39 D55
  32808. D15 D31
  32809. N  
  32810. D0 D16
  32811. D14 P 1 0 D30
  32812. K K
  32813. D1 A A D17
  32814. D13  R R 
  32815. R / D D D29
  32816.  
  32817. D2 / D18
  32818. RXD
  32819. D12 D28
  32820. T
  32821. D3 D19
  32822.  
  32823.  
  32824.  
  32825. D11 D27
  32826. U
  32827. D4 D20
  32828. D10 D26
  32829. D5 V  D21
  32830.  
  32831. D9 D25
  32832. W
  32833.  
  32834. D6
  32835. Y
  32836.  
  32837. 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 6 3 4 2
  32838. 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 M 2 2 2
  32839. A A A A A A A A K I D D D
  32840. C Q Q Q Q C K / Q
  32841. D D D D C D D /
  32842. 7
  32843. / / / / R /
  32844.  
  32845. / / M
  32846. 2 / VDDQ (IO, 3.3 V)
  32847. 3 Q
  32848. M M D
  32849. Q /
  32850. / / / / Q / VSSQ (IO, 0 V)
  32851. / D D
  32852. /
  32853. /
  32854. 
  32855.  
  32856.  
  32857. / VDD (internal, 1.8 V)
  32858.  
  32859.  
  32860. /
  32861. /
  32862. VSS (internal, 0 V)
  32863.  
  32864.  
  32865. NC
  32866.  
  32867. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  32868. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  32869. and RTC are used.
  32870.  
  32871. Figure 22.1 Pin Arrangement (256-Pin BGA)
  32872.  
  32873. 669
  32874.  
  32875. ----------------------- Page 686-----------------------
  32876.  
  32877. K
  32878. ) ) ) C )
  32879. V V V A V
  32880. 3 3. 3. K 3
  32881. 3. 3 3 R 3.
  32882. ( ( D
  32883. ( 1 1 2 2 B E (
  32884. G G L L L L / 1 0 D C C
  32885. P P L L L L S S 1 0 X V T T 2
  32886. L C P P U U / R R L 2
  32887. C P P T R
  32888. A L - - - - - - / T T K K / / / 2 / / K E - - A L
  32889. T A S D S D S D I K S O 6 A A C C 5 4 3 5 4 3 2 1 0 9 8 K 7 8 L S D S T A
  32890. X T S D S D S D D C M D D T T 1 0 A A D D D 2 2 2 2 2 2 1 1 C D D C E D S X T
  32891. E X V V V V V V T T T T M S S A A D D M M M A A A A A A A A S M M T R V V E X
  32892.  
  32893.  
  32894.  
  32895. 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
  32896. 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
  32897. 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
  32898. 1 156 NMI
  32899. 2 155
  32900. 3 154
  32901. 4 153
  32902. 5 152
  32903. 6 151 MD2/RXD2
  32904. 7 150 MD1/TXD2
  32905. 8 149 MD0/SCK
  32906. 9 148
  32907.  
  32908.  
  32909.  
  32910. 10 147
  32911.  
  32912.  
  32913.  
  32914. D47 11 146 D63
  32915. D32 12 145 D48
  32916. 13 144
  32917. 14 143
  32918. D46 15 142 D62
  32919. D33 16 141 D49
  32920. D45 17 140 D61
  32921. D34 18 139 D50
  32922. D44 19 138 D60
  32923. D35 20 137 D51
  32924. 21 QFP208 136
  32925. 22 135
  32926.  
  32927.  
  32928. D43 23 134 D59
  32929. D36 24 Top view 133 D52
  32930. D42 25 132 D58
  32931. D37 26 131 D53
  32932. D41 27 130 D57
  32933. D38 28 129 D54
  32934. D40 29 128 D56
  32935. D39 30 127 D55
  32936. 31 126
  32937.  
  32938.  
  32939.  
  32940. 32 125
  32941.  
  32942.  
  32943.  
  32944. D15 33 124 D31
  32945. D0 34 123 D16
  32946. D14 35 122 D30
  32947. D1 36 121 D17
  32948. D13 37 120 D29
  32949. D2 38 119 D18
  32950. 39 VDD (internal, 1.8 V) 118
  32951. 40 117
  32952. D12 41 116 D28
  32953. D3 42 VSS (internal, 0 V) 115 D19
  32954. 43 114
  32955. 44 113
  32956. VDDQ (IO, 3.3 V)
  32957. D11 45 112 D27
  32958. D4 46 111 D20
  32959. D10 47 VSSQ (IO, 0 V) 110 D26
  32960. D5 48 109 D21
  32961. D9 49 108 D25
  32962. D6 50 107
  32963. / 51 106
  32964. / 52 105 RXD
  32965. 0 1 2 3 4
  32966. 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
  32967. 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
  32968.  
  32969.  
  32970.  
  32971. 8 7 5 4 1 0 6
  32972. E 7 6 5 4 3 2 1 0 9 8 7 O 6 5 4 3 2 1 0 3 4 2
  32973. 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 M 2 2 2
  32974. C Q Q Q Q A A A A A A A A K A A / Q D D D
  32975. D D D D C R R D D /
  32976. 7
  32977. / / / / D D R /
  32978.  
  32979. / / M
  32980. 2 /
  32981. 3 Q
  32982. M M D
  32983. Q /
  32984. / / / / Q /
  32985. / D D
  32986. /
  32987. /
  32988.  
  32989.  
  32990. /
  32991.  
  32992.  
  32993. /
  32994. /
  32995.  
  32996.  
  32997.  
  32998.  
  32999. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  33000. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  33001. and RTC are used.
  33002.  
  33003. Figure 22.2 Pin Arrangement (208-Pin QFP)
  33004.  
  33005. 670
  33006.  
  33007. ----------------------- Page 687-----------------------
  33008.  
  33009. 22.2 Pin Functions
  33010.  
  33011. 22.2.1 Pin Functions (256-Pin BGA)
  33012.  
  33013. Table 22.1 Pin Functions
  33014.  
  33015. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33016.  
  33017. SRAM DRAM SDRAM PCMCIAMPX
  33018.  
  33019. 1 B2 I Bus ready
  33020.  
  33021. 2 B1 I Reset
  33022.  
  33023. 3 C2 O Chip select 0
  33024.  
  33025. 4 C1 O Chip select 1
  33026.  
  33027. 5 D4 O Chip select 4
  33028.  
  33029. 6 D3 O Chip select 5
  33030.  
  33031. 7 D2 O Chip select 6
  33032.  
  33033. 8 D1 O Bust start ( ) ( ) ( ) ( ) ( )
  33034.  
  33035. 9 E4 VSSQ Power IO GND (0 V)
  33036.  
  33037. 10 E3 O = / /
  33038.  
  33039.  
  33040. 11 F3 VDDQ Power IO VDD (3.3 V)
  33041.  
  33042. 12 F4 VSSQ Power IO GND (0 V)
  33043.  
  33044. 13 E2 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33045.  
  33046. 14 E1 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33047.  
  33048. 15 G3 VDD Power Internal VDD (1.8
  33049. V)
  33050.  
  33051. 16 G4 VSS Power Internal GND (0 V)
  33052.  
  33053. 17 F2 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33054.  
  33055. 18 F1 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33056.  
  33057. 19 H3 VDDQ Power IO VDD (3.3 V)
  33058.  
  33059. 20 H4 VSSQ Power IO GND (0 V)
  33060.  
  33061. 21 G2 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33062.  
  33063. 22 G1 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33064.  
  33065. 23 H2 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33066.  
  33067. 24 H1 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33068.  
  33069. 25 J3 VDDQ Power IO VDD (3.3 V)
  33070.  
  33071. 26 J4 VSSQ Power IO GND (0 V)
  33072.  
  33073. 27 J2 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33074.  
  33075. 28 J1 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33076.  
  33077. 671
  33078.  
  33079. ----------------------- Page 688-----------------------
  33080.  
  33081. Table 22.1 Pin Functions (cont)
  33082.  
  33083. No. Pin Pin Name I / O Function Reset Memory Interface
  33084. No.
  33085.  
  33086. SRAM DRAM SDRAM PCMCIA MPX
  33087.  
  33088. 29 K2 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33089.  
  33090. 30 K1 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33091.  
  33092. 31 K3 VDDQ Power IO VDD (3.3 V)
  33093.  
  33094. 32 K4 VSSQ Power IO GND (0 V)
  33095.  
  33096. 33 L1 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33097.  
  33098. 34 L2 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33099.  
  33100. 35 M1 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33101.  
  33102. 36 M2 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33103.  
  33104. 37 L3 VDDQ Power IO VDD (3.3 V)
  33105.  
  33106. 38 L4 VSSQ Power IO GND (0 V)
  33107.  
  33108. 39 N1 D15 I/O Data A15
  33109.  
  33110. 40 N2 D0 I/O Data A0
  33111.  
  33112. 41 P1 D14 I/O Data A14
  33113.  
  33114. 42 P2 D1 I/O Data A1
  33115.  
  33116. 43 M3 VDDQ Power IO VDD (3.3 V)
  33117.  
  33118. 44 M4 VSSQ Power IO GND (0 V)
  33119.  
  33120. 45 R1 D13 I/O Data A13
  33121.  
  33122. 46 R2 D2 I/O Data A2
  33123.  
  33124. 47 P3 VDD Power Internal VDD
  33125. (1.8 V)
  33126.  
  33127. 48 P4 VSS Power Internal GND
  33128. (0 V)
  33129.  
  33130. 49 T1 D12 I/O Data A12
  33131.  
  33132. 50 T2 D3 I/O Data A3
  33133.  
  33134. 51 R3 VDDQ Power IO VDD (3.3 V)
  33135.  
  33136. 52 R4 VSSQ Power IO GND (0 V)
  33137.  
  33138. 53 U1 D11 I/O Data A11
  33139.  
  33140. 54 U2 D4 I/O Data A4
  33141.  
  33142. 55 V1 D10 I/O Data A10
  33143.  
  33144. 56 V2 D5 I/O Data A5
  33145.  
  33146. 57 T3 VDDQ Power IO VDD (3.3 V)
  33147.  
  33148. 58 T4 VSSQ Power IO GND (0 V)
  33149.  
  33150. 59 W1 D9 I/O Data A9
  33151.  
  33152. 60 Y1 D6 I/O Data A6
  33153.  
  33154. 672
  33155.  
  33156. ----------------------- Page 689-----------------------
  33157.  
  33158. Table 22.1 Pin Functions (cont)
  33159.  
  33160. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33161.  
  33162. SRAM DRAM SDRAM PCMCIAMPX
  33163.  
  33164. 61 U3 / O Bus
  33165. acknowledge/
  33166. bus request
  33167.  
  33168. 62 V3 / I Bus
  33169. request/bus
  33170. acknowledge
  33171.  
  33172. 63 W2 D8 I/O Data A8
  33173.  
  33174. 64 Y2 D7 I/O Data A7
  33175.  
  33176. 65 W3 CKE O Clock output CKE
  33177. enable
  33178.  
  33179. 66 V5 VDDQ Power IO VDD (3.3 V)
  33180.  
  33181. 67 U5 VSSQ Power IO GND (0 V)
  33182.  
  33183. 68 Y3 / / O D47–D40 DQM5
  33184. DQM5 select signal
  33185.  
  33186. 69 W4 / / O D39–D32 DQM4
  33187. DQM4 select signal
  33188.  
  33189. 70 Y4 / / O D15–D8 select DQM1
  33190. DQM1 signal
  33191.  
  33192. 71 W5 / / O D7–D0 select DQM0
  33193. DQM0 signal
  33194.  
  33195. 72 Y5 A17 O Address
  33196.  
  33197. 73 V6 VDDQ Power IO VDD (3.3 V)
  33198.  
  33199. 74 U6 VSSQ Power IO GND (0 V)
  33200.  
  33201. 75 W6 A16 O Address
  33202.  
  33203. 76 Y6 A15 O Address
  33204.  
  33205. 77 V7 VDD Power Internal VDD
  33206. (1.8 V)
  33207.  
  33208. 78 U7 VSS Power Internal GND
  33209. (0 V)
  33210.  
  33211. 79 W7 A14 O Address
  33212.  
  33213. 80 Y7 A13 O Address
  33214.  
  33215. 81 V8 VDDQ Power IO VDD (3.3 V)
  33216.  
  33217. 82 U8 VSSQ Power IO GND (0 V)
  33218.  
  33219. 83 V4 NC
  33220.  
  33221. 84 W8 A12 O Address
  33222.  
  33223. 85 Y8 A11 O Address
  33224.  
  33225. 86 W9 A10 O Address
  33226.  
  33227. 673
  33228.  
  33229. ----------------------- Page 690-----------------------
  33230.  
  33231. Table 22.1 Pin Functions (cont)
  33232.  
  33233. No. Pin No. Pin Name I / O Function Reset Memory Interface
  33234.  
  33235. SRAM DRAM SDRAM PCMCIAMPX
  33236.  
  33237. 87 V9 VDDQ Power IO VDD (3.3 V)
  33238.  
  33239. 88 U9 VSSQ Power IO GND (0 V)
  33240.  
  33241. 89 Y9 A9 O Address
  33242.  
  33243. 90 W10 A8 O Address
  33244.  
  33245. 91 Y10 A7 O Address
  33246.  
  33247. 92 Y11 CKIO O Clock output CKIO
  33248.  
  33249. 93 V10 VDDQ Power IO VDD (3.3 V)
  33250.  
  33251. 94 U10 VSSQ Power IO GND (0 V)
  33252.  
  33253. 95 W11 CKIO2 O = CKIO* CKIO
  33254.  
  33255. 96 Y12 A6 O Address
  33256.  
  33257. 97 W12 A5 O Address
  33258.  
  33259. 98 Y13 A4 O Address
  33260.  
  33261. 99 V11 VDDQ Power IO VDD (3.3 V)
  33262.  
  33263. 100 U11 VSSQ Power IO GND (0 V)
  33264.  
  33265. 101 W13 A3 O Address
  33266.  
  33267. 102 Y14 A2 O Address
  33268.  
  33269. 103 V12 DRAK1 O DMAC1
  33270. request
  33271. acknowledge
  33272.  
  33273. 104 U13 DRAK0 O DMAC0
  33274. request
  33275. acknowledge
  33276.  
  33277. 105 V13 VDDQ Power IO VDD (3.3 V)
  33278.  
  33279. 106 U12 VSSQ Power IO GND (0 V)
  33280.  
  33281. 107 W14 O Chip select 3 ()
  33282.  
  33283. 108 Y15 O Chip select 2 ()
  33284.  
  33285. 109 V14 VDD Power Internal VDD
  33286. (1.8 V)
  33287.  
  33288. 110 U14 VSS Power Internal GND
  33289. (0 V)
  33290.  
  33291. 111 W15 O
  33292.  
  33293. 112 Y16 / / O Read//
  33294.  
  33295.  
  33296. 113 V15 VDDQ Power IO VDD (3.3 V)
  33297.  
  33298. 114 U15 VSSQ Power IO GND (0 V)
  33299.  
  33300. Note: * CKIO2 is not connected to PLL2.
  33301.  
  33302. 674
  33303.  
  33304. ----------------------- Page 691-----------------------
  33305.  
  33306. Table 22.1 Pin Functions (cont)
  33307.  
  33308. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33309.  
  33310. SRAM DRAM SDRAMPCMCIA MPX
  33311.  
  33312. 115 W16 RD/ O Read/write RD/ RD/ RD/
  33313.  
  33314. 116 Y17 / / O D23–D16 select DQM2
  33315. DQM2/ signal
  33316.  
  33317.  
  33318. 117 W17 / / O D31–D24 select DQM3
  33319. DQM3/ signal
  33320.  
  33321.  
  33322. 118 Y18 / / O D55–D48 select DQM6
  33323. DQM6 signal
  33324.  
  33325. 119 V16 VDDQ Power IO VDD (3.3 V)
  33326.  
  33327. 120 U16 VSSQ Power IO GND (0 V)
  33328.  
  33329. 121 W18 / / O D63–D56 select DQM7
  33330. DQM7/ signal
  33331.  
  33332. 122 Y19 D23 I/O Data A23
  33333.  
  33334. 123 W19 D24 I/O Data A24
  33335.  
  33336. 124 Y20 D22 I/O Data A22
  33337.  
  33338. 125 V17 RXD I SCI data input
  33339.  
  33340. 126 U17 I Request from
  33341. DMAC0
  33342.  
  33343. 127 U18 I Request from
  33344. DMAC1
  33345.  
  33346. 128 W20 D25 I/O Data A25
  33347.  
  33348. 129 T18 VDDQ Power IO VDD (3.3 V)
  33349.  
  33350. 130 T17 VSSQ Power IO GND (0 V)
  33351.  
  33352. 131 V19 D21 I/O Data A21
  33353.  
  33354. 132 V20 D26 I/O Data
  33355.  
  33356. 133 U19 D20 I/O Data A20
  33357.  
  33358. 134 U20 D27 I/O Data
  33359.  
  33360. 135 R18 VDDQ Power IO VDD (3.3 V)
  33361.  
  33362. 136 R17 VSSQ Power IO GND (0 V)
  33363.  
  33364. 137 T19 D19 I/O Data A19
  33365.  
  33366. 138 T20 D28 I/O Data
  33367.  
  33368. 139 P18 VDD Power Internal VDD (1.8
  33369. V)
  33370.  
  33371. 140 P17 VSS Power Internal GND (0
  33372. V)
  33373.  
  33374. 141 R19 D18 I/O Data A18
  33375.  
  33376. 675
  33377.  
  33378. ----------------------- Page 692-----------------------
  33379.  
  33380. Table 22.1 Pin Functions (cont)
  33381.  
  33382. No. Pin No. Pin Name I / O Function Reset Memory Interface
  33383.  
  33384. SRAM DRAM SDRAMPCMCIA MPX
  33385.  
  33386. 142 R20 D29 I/O Data
  33387.  
  33388. 143 N18 VDDQ Power IO VDD (3.3 V)
  33389.  
  33390. 144 N17 VSSQ Power IO GND (0 V)
  33391.  
  33392. 145 P19 D17 I/O Data A17
  33393.  
  33394. 146 P20 D30 I/O Data
  33395.  
  33396. 147 N19 D16 I/O Data A16
  33397.  
  33398. 148 N20 D31 I/O Data
  33399.  
  33400. 149 M18 VDDQ Power IO VDD (3.3 V)
  33401.  
  33402. 150 M17 VSSQ Power IO GND (0 V)
  33403.  
  33404. 151 M19 D55 I/O Data
  33405.  
  33406. 152 M20 D56 I/O Data
  33407.  
  33408. 153 L19 D54 I/O Data
  33409.  
  33410. 154 L20 D57 I/O Data
  33411.  
  33412. 155 L18 VDDQ Power IO VDD (3.3 V)
  33413.  
  33414. 156 L17 VSSQ Power IO GND (0 V)
  33415.  
  33416. 157 K20 D53 I/O Data
  33417.  
  33418. 158 K19 D58 I/O Data
  33419.  
  33420. 159 J20 D52 I/O Data
  33421.  
  33422. 160 J19 D59 I/O Data
  33423.  
  33424. 161 K18 VDDQ Power IO VDD (3.3 V)
  33425.  
  33426. 162 K17 VSSQ Power IO GND (0 V)
  33427.  
  33428. 163 H20 D51 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33429.  
  33430. 164 H19 D60 I/O Data
  33431.  
  33432. 165 G20 D50 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33433.  
  33434. 166 G19 D61 I/O Data ACCSIZ
  33435. E0
  33436.  
  33437. 167 J18 VDDQ Power IO VDD (3.3 V)
  33438.  
  33439. 168 J17 VSSQ Power IO GND (0 V)
  33440.  
  33441. 169 F20 D49 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33442.  
  33443. 170 F19 D62 I/O Data ACCSIZ
  33444. E1
  33445.  
  33446. 171 G18 VDD Power Internal VDD (1.8
  33447. V)
  33448.  
  33449. 172 G17 VSS Power Internal GND (0 V)
  33450.  
  33451. 173 E20 D48 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33452.  
  33453. 676
  33454.  
  33455. ----------------------- Page 693-----------------------
  33456.  
  33457. Table 22.1 Pin Functions (cont)
  33458.  
  33459. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33460.  
  33461. SRAM DRAM SDRAM PCMCIAMPX
  33462.  
  33463. 174 E19 D63 I/O Data ACCSIZE2
  33464.  
  33465. 175 F18 VDDQ Power IO VDD (3.3 V)
  33466.  
  33467. 176 F17 VSSQ Power IO GND (0 V)
  33468.  
  33469. 177 E17 VSSQ Power IO GND (0 V)
  33470.  
  33471. 178 E18 RD/ O = RD/ RD/ RD/ RD/
  33472.  
  33473. 179 D20 MD0/SCK I/O Mode/SCI MD0 SCK SCK SCK SCK SCK
  33474. clock
  33475.  
  33476. 180 D19 MD1/TXD2 I/O Mode SCIF MD1 TXD2 TXD2 TXD2 TXD2 TXD2
  33477. data output
  33478.  
  33479. 181 D18 MD2/RXD2 I Mode/SCIF MD2 RXD2 RXD2 RXD2 RXD2 RXD2
  33480. data input
  33481.  
  33482. 182 C20 I Interrupt 0
  33483.  
  33484. 183 C19 I Interrupt 1
  33485.  
  33486. 184 B20 I Interrupt 2
  33487.  
  33488. 185 C18 I Interrupt 3
  33489.  
  33490. 186 A20 NMI I Nonmaskable
  33491. interrupt
  33492.  
  33493. 187 B19 XTAL2 O RTC crystal
  33494. resonator pin
  33495.  
  33496. 188 A19 EXTAL2 I RTC crystal
  33497. resonator pin
  33498.  
  33499. 189 B18 VSS-RTC Power RTC GND (0 V)
  33500.  
  33501. 190 A18 VDD-RTC Power RTC VDD
  33502. (3.3 V)
  33503.  
  33504. 191 D17 Reserved I Pull up to 3.3.
  33505. V
  33506.  
  33507. 192 C17 VSS Power Internal GND
  33508. (0 V)
  33509.  
  33510. 193 B17 VDDQ Power IO VDD (3.3 V)
  33511.  
  33512. 194 C16 I/O SCIF data
  33513. control (CTS)
  33514.  
  33515. 195 A17 TCLK I/O RTC/TMU
  33516. clock
  33517.  
  33518. 196 B16 MD8/ I/O Mode/SCIF MD8
  33519. data control
  33520. (RTS)
  33521.  
  33522. 197 C15 VDDQ Power IO VDD (3.3 V)
  33523.  
  33524. 677
  33525.  
  33526. ----------------------- Page 694-----------------------
  33527.  
  33528. Table 22.1 Pin Functions (cont)
  33529.  
  33530. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33531.  
  33532. SRAM DRAM SDRAM PCMCIAMPX
  33533.  
  33534. 198 D15 VSSQ Power IO GND (0 V)
  33535.  
  33536. 199 B15 MD7/TXD I/O Mode/SCI MD7 TXD TXD TXD TXD TXD
  33537. data output
  33538.  
  33539. 200 A16 SCK2/ I SCIF clock/ SCK2 SCK2 SCK2 SCK2 SCK2
  33540. manual reset
  33541.  
  33542. 201 C14 VDD Power Internal VDD
  33543. (1.8 V)
  33544.  
  33545. 202 D14 VSS Power Internal GND
  33546. (0 V)
  33547.  
  33548. 203 A15 A18 O Address
  33549.  
  33550. 204 B14 A19 O Address
  33551.  
  33552. 205 C13 VDDQ Power IO VDD (3.3 V)
  33553.  
  33554. 206 D13 VSSQ Power IO GND (0 V)
  33555.  
  33556. 207 A14 A20 O Address
  33557.  
  33558. 208 B13 A21 O Address
  33559.  
  33560. 209 A13 A22 O Address
  33561.  
  33562. 210 B12 A23 O Address
  33563.  
  33564. 211 C12 VDDQ Power IO VDD (3.3 V)
  33565.  
  33566. 212 D12 VSSQ Power IO GND (0 V)
  33567.  
  33568. 213 A12 A24 O Address
  33569.  
  33570. 214 B11 A25 O Address
  33571.  
  33572. 215 A11 MD3/ I/O Mode/ MD3
  33573. PCMCIA-CE
  33574.  
  33575. 216 A10 MD4/ I/O Mode/ MD4
  33576. PCMCIA-CE
  33577.  
  33578. 217 C11 VDDQ Power IO VDD (3.3 V)
  33579.  
  33580. 218 D11 VSSQ Power IO GND (0 V)
  33581.  
  33582. 219 B10 MD5/ I/O Mode/ MD5
  33583. (DRAM)
  33584.  
  33585. 220 A9 DACK0 O DMAC0 bus
  33586. acknowledge
  33587.  
  33588. 221 B9 DACK1 O DMAC1 bus
  33589. acknowledge
  33590.  
  33591. 222 C8 A0 O Address
  33592.  
  33593. 223 C10 VDDQ Power IO VDD (3.3 V)
  33594.  
  33595. 224 D10 VSSQ Power IO GND (0 V)
  33596.  
  33597. 678
  33598.  
  33599. ----------------------- Page 695-----------------------
  33600.  
  33601. Table 22.1 Pin Functions (cont)
  33602.  
  33603. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33604.  
  33605. SRAM DRAM SDRAM PCMCIAMPX
  33606.  
  33607. 225 D8 A1 O Address
  33608.  
  33609. 226 A8 STATUS0 O Status
  33610.  
  33611. 227 B8 STATUS1 O Status
  33612.  
  33613. 228 A7 MD6/ I Mode/ MD6
  33614. (PCMCIA)
  33615.  
  33616. 229 C9 VDDQ Power IO VDD (3.3 V)
  33617.  
  33618. 230 D9 VSSQ Power IO GND (0 V)
  33619.  
  33620. 231 B7 / I/O Pin break/
  33621. BRKACK acknowledge
  33622. (Hitachi-UDI)
  33623.  
  33624. 232 A6 TDO O Data out
  33625. (Hitachi-UDI)
  33626.  
  33627. 233 C7 VDD Power Internal VDD
  33628. (1.8 V)
  33629.  
  33630. 234 D7 VSS Power Internal GND
  33631. (0 V)
  33632.  
  33633. 235 B6 TMS I Mode
  33634. (Hitachi-UDI)
  33635.  
  33636. 236 A5 TCK I Clock
  33637. (Hitachi-UDI)
  33638.  
  33639. 237 B5 TDI I Data in
  33640. (Hitachi-UDI)
  33641.  
  33642. 238 C4 I Reset
  33643. (Hitachi-UDI)
  33644.  
  33645. 239 C3 I CKIO2, ,
  33646. RD/
  33647. enable
  33648.  
  33649. 240 C6 NC
  33650.  
  33651. 241 A4 VDD-PLL2 Power PLL2 VDD
  33652. (3.3V)
  33653.  
  33654. 242 D6 VSS-PLL2 Power PLL2 GND (0V)
  33655.  
  33656. 243 B4 VDD-PLL1 Power PLL1 VDD
  33657. (3.3V)
  33658.  
  33659. 244 D5 VSS-PLL1 Power PLL1 GND (0V)
  33660.  
  33661. 245 A3 VDD-CPG Power CPG VDD
  33662. (3.3V)
  33663.  
  33664. 246 B3 VSS-CPG Power CPG GND (0V)
  33665.  
  33666. 247 A2 XTAL O Crystal
  33667. resonator
  33668.  
  33669. 679
  33670.  
  33671. ----------------------- Page 696-----------------------
  33672.  
  33673. Table 22.1 Pin Functions (cont)
  33674.  
  33675. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33676.  
  33677. SRAM DRAM SDRAM PCMCIAMPX
  33678.  
  33679. 248 A1 EXTAL I External input
  33680. clock/crystal
  33681. resonator
  33682.  
  33683. 249 C5 NC
  33684.  
  33685. 250 D16 NC
  33686.  
  33687. 251 H17 NC
  33688.  
  33689. 252 H18 NC
  33690.  
  33691. 253 N3 NC
  33692.  
  33693. 254 N4 NC
  33694.  
  33695. 255 U4 NC
  33696.  
  33697. 256 V18 NC
  33698.  
  33699. I: Input
  33700. O: Output
  33701. I/O: Input/output
  33702. Power: Power supply
  33703. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  33704. system power supply, and power must be supplied continuously. Even if only the RTC is
  33705. operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD, and
  33706. VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  33707. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  33708. the on-chip PLL circuits are used.
  33709. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the on-
  33710. chip crystal resonator is used.
  33711. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the on-
  33712. chip RTC is used.
  33713. 5. VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are connected inside the package.
  33714.  
  33715. 680
  33716.  
  33717. ----------------------- Page 697-----------------------
  33718.  
  33719. 22.2.2 Pin Functions (208-Pin QFP)
  33720.  
  33721. Table 22.2 Pin Functions
  33722.  
  33723. Pin No. Pin Name I / O Function Reset Memory Interface
  33724.  
  33725. SRAM DRAM SDRAM PCMCIA MPX
  33726.  
  33727. 1 I Bus ready
  33728.  
  33729. 2 I Reset
  33730.  
  33731. 3 O Chip select 0
  33732.  
  33733. 4 O Chip select 1
  33734.  
  33735. 5 O Chip select 4
  33736.  
  33737. 6 O Chip select 5
  33738.  
  33739. 7 O Chip select 6
  33740.  
  33741. 8 O Bust start ( ) ( ) ( ) ( ) ( )
  33742.  
  33743. 9 VDDQ Power IO VDD (3.3 V)
  33744.  
  33745. 10 VSSQ Power IO GND (0 V)
  33746.  
  33747. 11 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33748.  
  33749. 12 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33750.  
  33751. 13 VDD Power Internal VDD
  33752. (1.8 V)
  33753.  
  33754. 14 VSS Power Internal GND
  33755. (0 V)
  33756.  
  33757. 15 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33758.  
  33759. 16 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33760.  
  33761. 17 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33762.  
  33763. 18 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33764.  
  33765. 19 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33766.  
  33767. 20 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33768.  
  33769. 21 VDDQ Power IO VDD (3.3 V)
  33770.  
  33771. 22 VSSQ Power IO GND (0 V)
  33772.  
  33773. 23 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33774.  
  33775. 24 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33776.  
  33777. 25 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33778.  
  33779. 26 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33780.  
  33781. 27 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33782.  
  33783. 28 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33784.  
  33785. 29 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33786.  
  33787. 30 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33788.  
  33789. 681
  33790.  
  33791. ----------------------- Page 698-----------------------
  33792.  
  33793. Table 22.2 Pin Functions (cont)
  33794.  
  33795. Pin No. Pin Name I / O Function Reset Memory Interface
  33796.  
  33797. SRAM DRAM SDRAM PCMCIA MPX
  33798.  
  33799. 31 VDDQ Power IO VDD (3.3 V)
  33800.  
  33801. 32 VSSQ Power IO GND (0 V)
  33802.  
  33803. 33 D15 I/O Data A15
  33804.  
  33805. 34 D0 I/O Data A0
  33806.  
  33807. 35 D14 I/O Data A14
  33808.  
  33809. 36 D1 I/O Data A1
  33810.  
  33811. 37 D13 I/O Data A13
  33812.  
  33813. 38 D2 I/O Data A2
  33814.  
  33815. 39 VDD Power Internal VDD
  33816. (1.8 V)
  33817.  
  33818. 40 VSS Power Internal GND
  33819. (0 V)
  33820.  
  33821. 41 D12 I/O Data A12
  33822.  
  33823. 42 D3 I/O Data A3
  33824.  
  33825. 43 VDDQ Power IO VDD (3.3 V)
  33826.  
  33827. 44 VSSQ Power IO GND (0 V)
  33828.  
  33829. 45 D11 I/O Data A11
  33830.  
  33831. 46 D4 I/O Data A4
  33832.  
  33833. 47 D10 I/O Data A10
  33834.  
  33835. 48 D5 I/O Data A5
  33836.  
  33837. 49 D9 I/O Data A9
  33838.  
  33839. 50 D6 I/O Data A6
  33840.  
  33841. 51 / O Bus
  33842. acknowledge/
  33843. bus request
  33844.  
  33845. 52 / I Bus request/bus
  33846. acknowledge
  33847.  
  33848. 53 D8 I/O Data A8
  33849.  
  33850. 54 D7 I/O Data A7
  33851.  
  33852. 55 CKE O Clock output CKE
  33853. enable
  33854.  
  33855. 56 VDDQ Power IO VDD (3.3 V)
  33856.  
  33857. 57 VSSQ Power IO GND (0 V)
  33858.  
  33859. 58 / / O D47–D40 select DQM5
  33860. DQM5 signal
  33861.  
  33862. 682
  33863.  
  33864. ----------------------- Page 699-----------------------
  33865.  
  33866. Table 22.2 Pin Functions (cont)
  33867.  
  33868. Pin No. Pin Name I / O Function Reset Memory Interface
  33869.  
  33870. SRAM DRAM SDRAM PCMCIA MPX
  33871.  
  33872. 59 / / O D39–D32 select DQM4
  33873. DQM4 signal
  33874.  
  33875. 60 / / O D15–D8 select DQM1
  33876. DQM1 signal
  33877.  
  33878. 61 / / O D7–D0 select signal DQM0
  33879. DQM0
  33880.  
  33881. 62 A17 O Address
  33882.  
  33883. 63 A16 O Address
  33884.  
  33885. 64 A15 O Address
  33886.  
  33887. 65 VDD Power Internal VDD (1.8
  33888. V)
  33889.  
  33890. 66 VSS Power Internal GND
  33891. (0 V)
  33892.  
  33893. 67 A14 O Address
  33894.  
  33895. 68 A13 O Address
  33896.  
  33897. 69 VDDQ Power IO VDD (3.3 V)
  33898.  
  33899. 70 VSSQ Power IO GND (0 V)
  33900.  
  33901. 71 A12 O Address
  33902.  
  33903. 72 A11 O Address
  33904.  
  33905. 73 A10 O Address
  33906.  
  33907. 74 A9 O Address
  33908.  
  33909. 75 A8 O Address
  33910.  
  33911. 76 A7 O Address
  33912.  
  33913. 77 CKIO O Clock output CKIO
  33914.  
  33915. 78 VDDQ Power IO VDD (3.3 V)
  33916.  
  33917. 79 VSSQ Power IO GND (0 V)
  33918.  
  33919. 80 A6 O Address
  33920.  
  33921. 81 A5 O Address
  33922.  
  33923. 82 A4 O Address
  33924.  
  33925. 83 A3 O Address
  33926.  
  33927. 84 A2 O Address
  33928.  
  33929. 85 DRAK1 O DMAC1 request
  33930. acknowledge
  33931.  
  33932. 86 DRAK0 O DMAC0 request
  33933. acknowledge
  33934.  
  33935. 87 VDDQ Power IO VDD (3.3 V)
  33936.  
  33937. 683
  33938.  
  33939. ----------------------- Page 700-----------------------
  33940.  
  33941. Table 22.2 Pin Functions (cont)
  33942.  
  33943. Pin No. Pin Name I / O Function Reset Memory Interface
  33944.  
  33945. SRAM DRAM SDRAMPCMCIA MPX
  33946.  
  33947. 88 VSSQ Power IO GND (0 V)
  33948.  
  33949. 89 O Chip select 3 ()
  33950.  
  33951. 90 O Chip select 2 ()
  33952.  
  33953. 91 VDD Power Internal VDD
  33954. (1.8 V)
  33955.  
  33956. 92 VSS Power Internal GND
  33957. (0 V)
  33958.  
  33959. 93 O
  33960.  
  33961. 94 / / O Read//
  33962.  
  33963.  
  33964. 95 RD/ O Read/write RD/ RD/ RD/
  33965.  
  33966. 96 / / O D23–D16 select DQM2
  33967. DQM2/ signal
  33968.  
  33969.  
  33970. 97 / / O D31–D24 select DQM3
  33971. DQM3/ signal
  33972.  
  33973.  
  33974. 98 / / O D55–D48 select DQM6
  33975. DQM6 signal
  33976.  
  33977. 99 VDDQ Power IO VDD (3.3 V)
  33978.  
  33979. 100 VSSQ Power IO GND (0 V)
  33980.  
  33981. 101 / / O D63–D56 select DQM7
  33982. DQM7/ signal
  33983.  
  33984. 102 D23 I/O Data A23
  33985.  
  33986. 103 D24 I/O Data A24
  33987.  
  33988. 104 D22 I/O Data A22
  33989.  
  33990. 105 RXD I SCI data input
  33991.  
  33992. 106 I Request from
  33993. DMAC0
  33994.  
  33995. 107 I Request from
  33996. DMAC1
  33997.  
  33998. 108 D25 I/O Data A25
  33999.  
  34000. 109 D21 I/O Data A21
  34001.  
  34002. 110 D26 I/O Data
  34003.  
  34004. 111 D20 I/O Data A20
  34005.  
  34006. 112 D27 I/O Data
  34007.  
  34008. 113 VDDQ Power IO VDD (3.3 V)
  34009.  
  34010. 684
  34011.  
  34012. ----------------------- Page 701-----------------------
  34013.  
  34014. Table 22.2 Pin Functions (cont)
  34015.  
  34016. Pin No. Pin Name I / O Function Reset Memory Interface
  34017.  
  34018. SRAM DRAM SDRAM PCMCIA MPX
  34019.  
  34020. 114 VSSQ Power IO GND (0 V)
  34021.  
  34022. 115 D19 I/O Data A19
  34023.  
  34024. 116 D28 I/O Data
  34025.  
  34026. 117 VDD Power Internal VDD
  34027. (1.8 V)
  34028.  
  34029. 118 VSS Power Internal GND
  34030. (0 V)
  34031.  
  34032. 119 D18 I/O Data A18
  34033.  
  34034. 120 D29 I/O Data
  34035.  
  34036. 121 D17 I/O Data A17
  34037.  
  34038. 122 D30 I/O Data
  34039.  
  34040. 123 D16 I/O Data A16
  34041.  
  34042. 124 D31 I/O Data
  34043.  
  34044. 125 VDDQ Power IO VDD (3.3 V)
  34045.  
  34046. 126 VSSQ Power IO GND (0 V)
  34047.  
  34048. 127 D55 I/O Data
  34049.  
  34050. 128 D56 I/O Data
  34051.  
  34052. 129 D54 I/O Data
  34053.  
  34054. 130 D57 I/O Data
  34055.  
  34056. 131 D53 I/O Data
  34057.  
  34058. 132 D58 I/O Data
  34059.  
  34060. 133 D52 I/O Data
  34061.  
  34062. 134 D59 I/O Data
  34063.  
  34064. 135 VDDQ Power IO VDD (3.3 V)
  34065.  
  34066. 136 VSSQ Power IO GND (0 V)
  34067.  
  34068. 137 D51 I/O Data
  34069.  
  34070. 138 D60 I/O Data
  34071.  
  34072. 139 D50 I/O Data
  34073.  
  34074. 140 D61 I/O Data ACCSIZE0
  34075.  
  34076. 141 D49 I/O Data
  34077.  
  34078. 142 D62 I/O Data ACCSIZE1
  34079.  
  34080. 143 VDD Power Internal VDD (1.8
  34081. V)
  34082.  
  34083. 144 VSS Power Internal GND (0
  34084. V)
  34085.  
  34086. 685
  34087.  
  34088. ----------------------- Page 702-----------------------
  34089.  
  34090. Table 22.2 Pin Functions (cont)
  34091.  
  34092. Pin No. Pin Name I / O Function Reset Memory Interface
  34093.  
  34094. SRAM DRAM SDRAM PCMCIAMPX
  34095.  
  34096. 145 D48 I/O Data
  34097.  
  34098. 146 D63 I/O Data ACCSIZE2
  34099.  
  34100. 147 VDDQ Power IO VDD (3.3 V)
  34101.  
  34102. 148 VSSQ Power IO GND (0 V)
  34103.  
  34104. 149 MD0/SCK I/O Mode/SCI clock MD0 SCK SCK SCK SCK SCK
  34105.  
  34106. 150 MD1/TXD2 I/O Mode SCIF data MD1 TXD2 TXD2 TXD2 TXD2 TXD2
  34107. output
  34108.  
  34109. 151 MD2/RXD2 I Mode/SCIF data MD2 RXD2 RXD2 RXD2 RXD2 RXD2
  34110. input
  34111.  
  34112. 152 I Interrupt 0
  34113.  
  34114. 153 I Interrupt 1
  34115.  
  34116. 154 I Interrupt 2
  34117.  
  34118. 155 I Interrupt 3
  34119.  
  34120. 156 NMI I Nonmaskable
  34121. interrupt
  34122.  
  34123. 157 XTAL2 O RTC crystal
  34124. resonator pin
  34125.  
  34126. 158 EXTAL2 I RTC crystal
  34127. resonator pin
  34128.  
  34129. 159 VSS-RTC Power RTC GND
  34130. (0 V)
  34131.  
  34132. 160 VDD-RTC Power RTC VDD
  34133. (3.3 V)
  34134.  
  34135. 161 Reserved I Pull up to
  34136. 3.3. V
  34137.  
  34138. 162 VSS Power Internal GND
  34139. (0 V)
  34140.  
  34141. 163 VDDQ Power IO VDD (3.3 V)
  34142.  
  34143. 164 I/O SCIF data control
  34144. (CTS)
  34145.  
  34146. 165 TCLK I/O RTC/TMU
  34147. clock
  34148.  
  34149. 166 MD8/ I/O Mode/SCIF data MD8
  34150. control (RTS)
  34151.  
  34152. 167 MD7/TXD I/O Mode/SCI data MD7 TXD TXD TXD TXD TXD
  34153. output
  34154.  
  34155. 168 SCK2/ I SCIF clock/ SCK2 SCK2 SCK2 SCK2 SCK2
  34156. manual reset
  34157.  
  34158. 686
  34159.  
  34160. ----------------------- Page 703-----------------------
  34161.  
  34162. Table 22.2 Pin Functions (cont)
  34163.  
  34164. Pin No. Pin Name I / O Function Reset Memory Interface
  34165.  
  34166. SRAM DRAM SDRAMPCMCIA MPX
  34167.  
  34168. 169 VDD Power Internal VDD
  34169. (1.8 V)
  34170.  
  34171. 170 VSS Power Internal GND
  34172. (0 V)
  34173.  
  34174. 171 A18 O Address
  34175.  
  34176. 172 A19 O Address
  34177.  
  34178. 173 A20 O Address
  34179.  
  34180. 174 A21 O Address
  34181.  
  34182. 175 A22 O Address
  34183.  
  34184. 176 A23 O Address
  34185.  
  34186. 177 VDDQ Power IO VDD (3.3 V)
  34187.  
  34188. 178 VSSQ Power IO GND (0 V)
  34189.  
  34190. 179 A24 O Address
  34191.  
  34192. 180 A25 O Address
  34193.  
  34194. 181 MD3/ I/O Mode/ MD3
  34195. PCMCIA-CE
  34196.  
  34197. 182 MD4/ I/O Mode/ MD4
  34198. PCMCIA-CE
  34199.  
  34200. 183 MD5/ I/O Mode/ (DRAM) MD5
  34201.  
  34202. 184 DACK0 O DMAC0 bus
  34203. acknowledge
  34204.  
  34205. 185 DACK1 O DMAC1 bus
  34206. acknowledge
  34207.  
  34208. 186 A0 O Address
  34209.  
  34210. 187 VDDQ Power IO VDD (3.3 V)
  34211.  
  34212. 188 VSSQ Power IO GND (0 V)
  34213.  
  34214. 189 A1 O Address
  34215.  
  34216. 190 STATUS0 O Status
  34217.  
  34218. 191 STATUS1 O Status
  34219.  
  34220. 192 MD6/ I Mode/ MD6
  34221. (PCMCIA)
  34222.  
  34223. 193 / I/O Pin break/
  34224. BRKACK acknowledge
  34225. (Hitachi-UDI )
  34226.  
  34227. 194 TDO O Data out
  34228. (Hitachi-UDI)
  34229.  
  34230. 687
  34231.  
  34232. ----------------------- Page 704-----------------------
  34233.  
  34234. Table 22.2 Pin Functions (cont)
  34235.  
  34236. Pin No. Pin Name I / O Function Reset Memory Interface
  34237.  
  34238. SRAM DRAM SDRAMPCMCIA MPX
  34239.  
  34240. 195 VDD Power Internal VDD
  34241. (1.8 V)
  34242.  
  34243. 196 VSS Power Internal GND (0 V)
  34244.  
  34245. 197 TMS I Mode
  34246. (Hitachi-UDI)
  34247.  
  34248. 198 TCK I Clock
  34249. (Hitachi-UDI)
  34250.  
  34251. 199 TDI I Data in
  34252. (Hitachi-UDI)
  34253.  
  34254. 200 I Reset
  34255. (Hitachi-UDI)
  34256.  
  34257. 201 VDD-PLL2 Power PLL2 VDD (3.3V)
  34258.  
  34259. 202 VSS-PLL2 Power PLL2 GND (0V)
  34260.  
  34261. 203 VDD-PLL1 Power PLL1 VDD (3.3V)
  34262.  
  34263. 204 VSS-PLL1 Power PLL1 GND (0V)
  34264.  
  34265. 205 VDD-CPG Power CPG VDD (3.3V)
  34266.  
  34267. 206 VSS-CPG Power CPG GND (0V)
  34268.  
  34269. 207 XTAL O Crystal resonator
  34270.  
  34271. 208 EXTAL I External input
  34272. clock/crystal
  34273. resonator
  34274.  
  34275. I: Input
  34276. O: Output
  34277. I/O: Input/output
  34278. Power: Power supply
  34279. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  34280. system power supply, and power must be supplied continuously. Even if only the RTC is
  34281. operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD, and
  34282. VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  34283. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  34284. the on-chip PLL circuits are used.
  34285. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the on-
  34286. chip crystal resonator is used.
  34287. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the on-
  34288. chip RTC is used.
  34289. 5. With the QFP package, VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are not
  34290. connected inside the package.
  34291. 6. The , RD/ , CKIO2, and pins are not provided on the QFP package.
  34292. 7. With the QFP package, the maximum external bus operating frequency is 83 MHz.
  34293.  
  34294. 688
  34295.  
  34296. ----------------------- Page 705-----------------------
  34297.  
  34298. Section 23 Electrical Characteristics
  34299.  
  34300. 23.1 Absolute Maximum Ratings
  34301.  
  34302. Table 23.1 Absolute Maximum Ratings
  34303.  
  34304. Item Symbol Value Unit
  34305.  
  34306. I/O, PLL, RTC power supply voltage VDDQ –0.3 to 4.2 V
  34307. VDD-PLL1/2 ,
  34308. V
  34309. DD-RTC ,
  34310. V
  34311. DD-CPG
  34312.  
  34313. Internal power supply voltage VDD –0.3 to 2.5 V
  34314.  
  34315. Input voltage Vin –0.3 to VDDQ + 0.3 V
  34316.  
  34317. Operating temperature Topr –20 to 75 °C
  34318.  
  34319. Storage temperature Tstg –55 to 125 °C
  34320.  
  34321. Note: Permanent damage to the chip may result if the maximum ratings are exceeded.
  34322. VDD (1.8 V) should be input after input of VDDQ, VDD-PLL1/2 , VDD-RTC , and VDD-CPG (3.3 V).
  34323.  
  34324. 689
  34325.  
  34326. ----------------------- Page 706-----------------------
  34327.  
  34328. 23.2 DC Characteristics
  34329.  
  34330. Table 23.2 DC Characteristics (Ta = –20 to +75°C)
  34331.  
  34332. Item Symbol Min Typ Max Unit Test Conditions
  34333.  
  34334. Power supply voltage VDDQ 3.0 3.3 3.6 V Normal mode, sleep
  34335. VDD-PLL1/2 mode, standby mode
  34336. V
  34337. DD-CPG
  34338.  
  34339. V
  34340. DD-RTC
  34341.  
  34342. VDD 1.6 1.8 2.0 Normal mode, sleep
  34343. mode, standby mode
  34344.  
  34345. Current dissipation Normal operation IDD — 840 — mA VDDQ, VDD-PLL1/2 , VDD-RTC ,
  34346. V = 3.3 V
  34347. DD-CPG
  34348.  
  34349. V = 1.8 V
  34350. DD
  34351. 1
  34352. * f = 200 Mhz
  34353.  
  34354. 2
  34355. * f = 100 Mhz
  34356.  
  34357. 3
  34358. * f = 50 MHz
  34359.  
  34360. — 420 —
  34361.  
  34362. — 210 —
  34363.  
  34364. Sleep mode — 150* 1 —
  34365.  
  34366. — 80*2 —
  34367.  
  34368. — 40*3 —
  34369.  
  34370. Standby mode — TBD — µA Ta = 25 ° C (RTC on)
  34371.  
  34372. — TBD — Ta > 50 ° C (RTC on)
  34373.  
  34374. — TBD — Ta = 25 ° C (RTC off)
  34375.  
  34376. — TBD — Ta > 50 ° C (RTC off)
  34377.  
  34378. Current dissipation Normal operation IDDQ — 160* 1 — mA VDDQ, VDD-PLL1/2 , VDD-RTC ,
  34379.  
  34380. V = 3.3 V
  34381. DD-CPG
  34382.  
  34383. V = 1.8 V
  34384. DD
  34385. * 1 f = 200 MHz,
  34386.  
  34387. t = 100 Mhz
  34388. cyc
  34389. * 2 f = 100 MHz,
  34390.  
  34391. t = 50 Mhz
  34392. cyc
  34393. * 3 f = 50 MHz,
  34394.  
  34395. t = 25 MHz
  34396. cyc
  34397.  
  34398. — 80*2 —
  34399.  
  34400. — 40*3 —
  34401.  
  34402. Sleep mode — 40*1 —
  34403.  
  34404. — 20*2 —
  34405.  
  34406. — 10*3 —
  34407.  
  34408. Standby mode — TBD — µA Ta = 25 ° C (RTC on)
  34409.  
  34410. 690
  34411.  
  34412. ----------------------- Page 707-----------------------
  34413.  
  34414. — TBD — Ta > 50 ° C (RTC on)
  34415.  
  34416. — TBD — Ta = 25 ° C (RTC off)
  34417.  
  34418. — TBD — Ta > 50 ° C (RTC off)
  34419.  
  34420. Table 23.2 DC Characteristics (cont) (Ta = –20 to +75°C)
  34421.  
  34422. Item SymbolMin Typ Max Unit Test Conditions
  34423.  
  34424. Input voltage , VIH VDDQ × — VDDQ + V
  34425. NMI, , / 0.9 0.3
  34426. BRKACK
  34427.  
  34428. Other input pins 2.0 — VDDQ +
  34429. 0.3
  34430.  
  34431. , VIL –0.3 — VDDQ ×
  34432. NMI, , / 0.1
  34433. BRKACK
  34434.  
  34435. Other input pins –0.3 — VDDQ ×
  34436. 0.2
  34437.  
  34438. Output voltage All output pins VOH 2.4 — — V
  34439.  
  34440. V — — 0.55
  34441. OL
  34442.  
  34443. Pull-up resistance Port pins Rpull 20 60 180 kΩ
  34444.  
  34445. Pin capacitance All pins CL — — 10 pF
  34446.  
  34447. Notes: 1. Connect VDD-PLL1/2 , VDD-RTC , and VDD-CPG to VDDQ, and VSS-CPG , VSS-PLL1/2 , and VSSQ-RTC to GND,
  34448. regardless of whether or not the PLL circuits and RTC are used.
  34449. 2. The current dissipation values are for V min = V – 0.5 V and V max = 0.5 V with all
  34450. IH DDQ IL
  34451.  
  34452. output pins unloaded.
  34453. 3. To reduce the leakage current in standby mode, the RTC must be turned on.
  34454. 4. IDDQ is the sum of the VDDQ, VDD-PLL1/2 , VDD-RTC , and VDD-CPG 3.3 V system currents.
  34455.  
  34456. Table 23.3 Permissible Output Currents (Ta = –20 to +75°C)
  34457.  
  34458. Item Symbol Min Typ Ma x Unit
  34459.  
  34460. Permissible output low current IOL — — 2 mA
  34461. (per pin)
  34462.  
  34463. Permissible output low current Σ IOL — — 120
  34464. (total)
  34465.  
  34466. Permissible output high current –IOH — — 2
  34467. (per pin)
  34468.  
  34469. Permissible output high current Σ(–IOH ) — — 40
  34470. (total)
  34471.  
  34472. Note: To protect chip reliability, do not exceed the output current values in table 23.3.
  34473.  
  34474. 691
  34475.  
  34476. ----------------------- Page 708-----------------------
  34477.  
  34478. 23.3 AC Characteristics
  34479.  
  34480. In principle, SH7750 input should be synchronous. Unless specified otherwise, ensure that the
  34481. setup time and hold times for each input signal are observed.
  34482.  
  34483. Table 23.4 Clock Timing
  34484.  
  34485. Item Symbol Min Typ M ax Unit Notes
  34486.  
  34487. Operating CPU, FPU, cache, TLB f 1 — 200 MHz
  34488. frequency
  34489.  
  34490. External bus 1 — 100
  34491.  
  34492. Peripheral modules 1 — 50
  34493.  
  34494. 692
  34495.  
  34496. ----------------------- Page 709-----------------------
  34497.  
  34498. 23.3.1 Clock and Control Signal Timing
  34499.  
  34500. Table 23.5 Clock and Control Signal Timing (V = 3.0 to 3.6 V, V = typ. 1.8 V, T =
  34501. DDQ DD a
  34502.  
  34503. –20 to +75°C, C = 30 pF)
  34504. L
  34505.  
  34506. Item SymbolMin Max Unit Figure
  34507.  
  34508. EXTAL PLL1, 2 operating1/2 divider operating fEX 16 66.7 MHz
  34509. clock input
  34510. frequency
  34511.  
  34512. 1/2 divider not operating fEX 8 33.3
  34513.  
  34514. PLL1, 2 1/2 divider operating fEX 2 66.7
  34515. not operating
  34516.  
  34517. 1/2 divider not operating fEX 1 33.3
  34518.  
  34519. EXTAL clock input cycle time t EXcyc 15 1000 ns 23.1
  34520.  
  34521. EXTAL clock input low-level pulse width t EXL 3.5 ns 23.1
  34522.  
  34523. EXTAL clock input high-level pulse width t EXH 3.5 ns 23.1
  34524.  
  34525. EXTAL clock output rise time t EXr 4 ns 23.1
  34526.  
  34527. EXTAL clock input fall time t EXf 4 ns 23.1
  34528.  
  34529. CKIO clock PLL2 operating fOP 25 100 MHz
  34530. output
  34531.  
  34532. PLL2 not operating fOP 1 100 MHz
  34533.  
  34534. CKIO clock output cycle time tcyc 10 1000 ns 23.2
  34535.  
  34536. CKIO clock output low-level pulse width tCKOL 1 — ns 23.2
  34537.  
  34538. CKIO clock output high-level pulse width tCKOH 1 — ns 23.2
  34539.  
  34540. CKIO clock output rise time tCKOr — 4 ns 23.2
  34541.  
  34542. CKIO clock output fall time t CKOf — 4 ns 23.2
  34543.  
  34544. 693
  34545.  
  34546. ----------------------- Page 710-----------------------
  34547.  
  34548. Table 23.5 Clock and Control Signal Timing (cont) (VDDQ = 3.0 to 3.6 V, VDD = typ. 1.8
  34549. V, T = –20 to +75°C, C = 30 pF)
  34550. a L
  34551.  
  34552. Item Symbol Min Max Unit Figure
  34553.  
  34554. Power-on oscillation settling time tOSC1 10 — ms 23.3, 23.5
  34555.  
  34556. Power-on oscillation settling time/mode tOSCMD 10 — ms 23.3, 23.5
  34557. settling
  34558.  
  34559. SCK2 reset setup time tSCK2RS 20 — ns 23.11
  34560.  
  34561. SCK2 reset hold time tSCK2RH 20 — ns 23.3, 23.5, 23.11
  34562.  
  34563. MD reset setup time tMDRS 3 — tcyc 23.12
  34564.  
  34565. MD reset hold time tMDRH 20 — ns 23.3, 23.5, 23.12
  34566.  
  34567. assert time tRESW 20 — tcyc 23.3, 23.4, 23.5,
  34568. 23.6, 23.11
  34569.  
  34570. PLL synchronization settling time tPLL 200 — µs 23.9, 23.10
  34571.  
  34572. Standby return oscillation settling time 1 tOSC2 10 — ms 23.4, 23.6
  34573.  
  34574. Standby return oscillation settling time 2 tOSC3 5 — ms 23.7
  34575.  
  34576. Standby return oscillation settling time 3 tOSC4 5 — ms 23.8
  34577.  
  34578. IRL interrupt determination time tIRLSTB — 200 µs 23.10
  34579. (RTC used, standby mode)
  34580.  
  34581. reset hold time tTRSTRH 0 ns 23.3, 23.5
  34582.  
  34583. Note: When a crystal resonator is connected to EXTAL and XTAL, the maximum frequency is 33.3
  34584. MHz. When a 3rd overtone crystal resonator is used, an external tank circuit is necessary.
  34585.  
  34586. tEXcyc
  34587.  
  34588. tEXH tEXL
  34589.  
  34590. VIH VIH VIH
  34591. 1/2VDDQ 1/2VDDQ
  34592.  
  34593. VIL VIL
  34594.  
  34595. tEXf tEXr
  34596.  
  34597. Note: When the clock is input from the EXTAL pin
  34598.  
  34599. Figure 23.1 EXTAL Clock Input Timing
  34600.  
  34601. 694
  34602.  
  34603. ----------------------- Page 711-----------------------
  34604.  
  34605. t
  34606. cyc
  34607.  
  34608. tCKOH tCKOL
  34609.  
  34610. VOH VOH VOH
  34611. 1/2VDDQ 1/2VDDQ
  34612.  
  34613. VOL VOL
  34614.  
  34615. tCKOf tCKOr
  34616.  
  34617. Figure 23.2 CKIO Clock Output Timing
  34618.  
  34619. Stable oscillation
  34620.  
  34621. CKIO,
  34622. internal clock
  34623.  
  34624. VDD VDD min
  34625. tRESW
  34626. tOSC1
  34627.  
  34628.  
  34629.  
  34630. tSCK2RH
  34631.  
  34632. SCK2
  34633.  
  34634. tOSCMD tMDRH
  34635.  
  34636. MD8, MD7,
  34637. MD2–MD0
  34638.  
  34639. tTRSTRH
  34640.  
  34641.  
  34642.  
  34643. Notes: 1. Oscillation settling time when on-chip resonator is used
  34644. 2. PLL2 not operating
  34645.  
  34646. Figure 23.3 Power-On Oscillation Settling Time
  34647.  
  34648. 695
  34649.  
  34650. ----------------------- Page 712-----------------------
  34651.  
  34652. Standby Stable oscillation
  34653.  
  34654. CKIO,
  34655. internal clock
  34656.  
  34657. tRESW
  34658.  
  34659. tOSC2
  34660.  
  34661.  
  34662.  
  34663. Notes: 1. Oscillation settling time when on-chip resonator is used
  34664. 2. PLL2 not operating
  34665.  
  34666. Figure 23.4 Standby Return Oscillation Settling Time (Return by )
  34667.  
  34668. Stable oscillation
  34669.  
  34670. Internal clock
  34671.  
  34672. VDD min
  34673. VDD
  34674. tRESW
  34675. tOSC1
  34676.  
  34677.  
  34678.  
  34679. tSCK2RH
  34680.  
  34681. SCK2
  34682.  
  34683. tOSCMD tMDRH
  34684.  
  34685. MD8, MD7,
  34686. MD2–MD0
  34687. tTRSTRH
  34688.  
  34689.  
  34690.  
  34691. CKIO
  34692.  
  34693. Notes: 1. Oscillation settling time when on-chip resonator is used
  34694. 2. PLL2 operating
  34695.  
  34696. Figure 23.5 Power-On Oscillation Settling Time
  34697.  
  34698. 696
  34699.  
  34700. ----------------------- Page 713-----------------------
  34701.  
  34702. Standby Stable oscillation
  34703.  
  34704. Internal
  34705. clock
  34706. tRESW
  34707. tOSC2
  34708.  
  34709.  
  34710.  
  34711. CKIO
  34712.  
  34713. Notes: 1. Oscillation settling time when on-chip resonator is used
  34714. 2. PLL2 operating
  34715.  
  34716. Figure 23.6 Standby Return Oscillation Settling Time (Return by )
  34717.  
  34718. Standby Stable oscillation
  34719.  
  34720. CKIO,
  34721. internal clock
  34722.  
  34723. tOSC3
  34724.  
  34725. NMI
  34726.  
  34727. Note: Oscillation settling time when on-chip resonator is used
  34728.  
  34729. Figure 23.7 Standby Return Oscillation Settling Time (Return by NMI)
  34730.  
  34731. 697
  34732.  
  34733. ----------------------- Page 714-----------------------
  34734.  
  34735. Standby Stable oscillation
  34736.  
  34737. CKIO,
  34738. internal clock
  34739.  
  34740. tOSC4
  34741.  
  34742.  
  34743. Note: Oscillation settling time when on-chip resonator is used
  34744.  
  34745. Figure 23.8 Standby Return Oscillation Settling Time (Return by – )
  34746.  
  34747. Reset or NMI
  34748. interrupt request
  34749.  
  34750. Stable input clock Stable input clock
  34751.  
  34752. EXTAL input
  34753.  
  34754. PLL synchronization tPLL × 2 PLL synchronization
  34755.  
  34756. PLL output,
  34757. CKIO output
  34758.  
  34759. Internal clock
  34760.  
  34761. STATUS1–
  34762. Normal Standby Normal
  34763. STATUS0
  34764.  
  34765. Figure 23.9 PLL Synchronization Settling Time in Case of or NMI Interrupt
  34766.  
  34767. 698
  34768.  
  34769. ----------------------- Page 715-----------------------
  34770.  
  34771. interrupt request
  34772.  
  34773. Stable input clock Stable input clock
  34774.  
  34775. EXTAL input
  34776.  
  34777. PLL synchronization tIRLSTB tPLL × 2 PLL synchronization
  34778.  
  34779. PLL output,
  34780. CKIO output
  34781.  
  34782. Internal clock
  34783.  
  34784. STATUS1–
  34785. Normal Standby Normal
  34786. STATUS0
  34787.  
  34788. Figure 23.10 PLL Synchronization Settling Time in Case of IRL Interrupt
  34789.  
  34790. CKIO
  34791.  
  34792. tRESW
  34793.  
  34794.  
  34795.  
  34796. tSCK2RS tSCK2RH
  34797.  
  34798. SCK2
  34799.  
  34800. Figure 23.11 Manual Reset Input Timing
  34801.  
  34802.  
  34803.  
  34804. tMDRS
  34805. tMDRH
  34806.  
  34807. MD6–MD3
  34808.  
  34809. Figure 23.12 Mode Input Timing
  34810.  
  34811. 699
  34812.  
  34813. ----------------------- Page 716-----------------------
  34814.  
  34815. 23.3.2 Control Signal Timing
  34816.  
  34817. Table 23.6 Control Signal Timing (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to
  34818. DDQ DD a
  34819.  
  34820. +75°C, C = 30 pF, PLL2 on)
  34821. L
  34822.  
  34823. 66 MHz 83 MHz 100 MHz
  34824.  
  34825. Item Symbo Min Max Min Max Min M ax Unit Figure Note
  34826. l
  34827.  
  34828. setup time tBREQS 2 — 2 — 2 — ns BGA
  34829.  
  34830. 3.5 — 3.5 — — — ns QFP
  34831.  
  34832. hold time tBREQH 1.5 — 1.5 — 1.5 — ns
  34833.  
  34834. delay time tBACKD — 10 — 8 — 6 ns
  34835.  
  34836. Bus tri-state delay time tBOFF1 — 15 — 12 — 10 ns
  34837.  
  34838. Bus tri-state delay time tBOFF2 — 2 — 2 — 2 tcyc 23.13
  34839. to standby mode
  34840.  
  34841. Bus buffer on time t — 15 — 12 — 10 ns
  34842. BON1
  34843.  
  34844. Bus buffer on time from t — 1 — 1 — 1 t 23.13
  34845. BON2 cyc
  34846.  
  34847. standby
  34848.  
  34849. STATUS0/1 delay time tSTD1 — 11 — 9 — 7 ns 23.13
  34850.  
  34851. STATUS0/1 delay time tSTD2 — 2 — 2 — 2 tcyc 23.13
  34852. to standby
  34853.  
  34854. 700
  34855.  
  34856. ----------------------- Page 717-----------------------
  34857.  
  34858. Normal operation Standby mode Normal operation
  34859.  
  34860. CKIO
  34861.  
  34862. STATUS 0, STATUS 1 Normal Standby Normal
  34863.  
  34864. tSTD2 tSTD1
  34865.  
  34866. , , RD/,
  34867. , , , ,
  34868. , , , tBOFF2 tBON2
  34869. RD/
  34870.  
  34871. A25–A0, D63–D0
  34872.  
  34873. DACKn, DRAKn, SCK,
  34874. * TXD, TXD2, ,
  34875.  
  34876.  
  34877. Note: * When the PHZ bit in STBCR is set to 1, these pins go to the high-impedance state (except
  34878. for pins being used as port pins, which retain their port state).
  34879.  
  34880. Figure 23.13 Pin Drive Timing for Standby Mode
  34881.  
  34882. 701
  34883.  
  34884. ----------------------- Page 718-----------------------
  34885.  
  34886. 23.3.3. Bus Timing
  34887.  
  34888. Table 23.7 Bus Timing (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30
  34889. DDQ DD a L
  34890.  
  34891. pF, PLL2 on)
  34892.  
  34893. 66 MHz 83 MHz 100 MHz
  34894.  
  34895. Item Symbo Min Max Min Max Min M ax Unit Notes
  34896. l
  34897.  
  34898. Address delay time tAD — 10 — 8 — 6 ns
  34899.  
  34900. delay time tBSD — 10 — 8 — 6 ns
  34901.  
  34902. delay time tCSD — 10 — 8 — 6 ns
  34903.  
  34904. delay time tRWD — 10 — 8 — 6 ns
  34905.  
  34906. delay time tRSD — 10 — 8 — 6 ns
  34907.  
  34908. Read data setup time tRDS 2 — 2 — 2 — ns BGA
  34909.  
  34910. 3.5 — 3.5 — — — ns QFP
  34911.  
  34912. Read data hold time t 1.5 — 1.5 — 1.5 — ns
  34913. RDH
  34914.  
  34915. delay time (falling tWEDF — 10 — 8 — 6 ns Relative
  34916. edge) to CKIO
  34917. falling
  34918. edge
  34919.  
  34920. delay time tWED1 — 10 — 8 — 6 ns
  34921.  
  34922. Write data delay time tWDD — 10 — 8 — 6 ns
  34923.  
  34924. setup time tRDYS 2 — 2 — 2 — ns BGA
  34925.  
  34926. 3.5 — 3.5 — — — ns QFP
  34927.  
  34928. hold time t 1.5 — 1.5 — 1.5 — ns
  34929. RDYH
  34930.  
  34931. delay time tRASD — 10 — 8 — 6 ns
  34932.  
  34933. delay time 1 tCASD1 — 10 — 8 — 6 ns DRAM
  34934.  
  34935. delay time 2 tCASD2 — 10 — 8 — 6 ns SDRAM
  34936.  
  34937. CKE delay time tCKED — 10 — 8 — 6 ns SDRAM
  34938.  
  34939. DQM delay time tDQMD — 10 — 8 — 6 ns SDRAM
  34940.  
  34941. delay time tFMD — 10 — 8 — 6 ns MPX
  34942.  
  34943. setup time tIO16S 2 — 2 — 2 — ns BGA
  34944.  
  34945. 3.5 — 3.5 — — — ns QFP
  34946.  
  34947. hold time t 1.5 — 1.5 — 1.5 — ns PCMCIA
  34948. IO16H
  34949.  
  34950. delay time tICWSDF — 10 — 8 — 6 ns PCMCIA
  34951. (falling edge)
  34952.  
  34953. delay time tICRSD — 10 — 8 — 6 ns PCMCIA
  34954.  
  34955. DACK delay time tDACD — 10 — 8 — 6 ns
  34956.  
  34957. 702
  34958.  
  34959. ----------------------- Page 719-----------------------
  34960.  
  34961. Table 23.7 Bus Timing (cont)
  34962.  
  34963. 66 MHz 83 MHz 100 MHz
  34964.  
  34965. Item Symbo Min Max Min Max Min M ax Unit Notes
  34966. l
  34967.  
  34968. DACK delay time (falling tDACDF — 10 — 8 — 6 ns Relative
  34969. edge) to CKIO
  34970. falling
  34971. edge
  34972.  
  34973. 703
  34974.  
  34975. ----------------------- Page 720-----------------------
  34976.  
  34977. T1 T2
  34978.  
  34979. CKIO
  34980.  
  34981. tAD tAD
  34982.  
  34983. A25–A0
  34984.  
  34985. tCSD tCSD
  34986.  
  34987.  
  34988.  
  34989. tRWD tRWD
  34990.  
  34991. RD/
  34992.  
  34993. tRSD tRSD tRSD
  34994.  
  34995.  
  34996.  
  34997. D63–D0 tRDS tRDH
  34998.  
  34999. (read)
  35000.  
  35001. tWED1
  35002. tWEDF tWEDF
  35003.  
  35004.  
  35005.  
  35006. tWDD tWDD tWDD
  35007.  
  35008. D63–D0
  35009. (write)
  35010.  
  35011. tBSD tBSD
  35012.  
  35013.  
  35014.  
  35015.  
  35016.  
  35017. tDACD
  35018. tDACD tDACD
  35019. DACKn
  35020. (SA: IO ← memory)
  35021.  
  35022. tDACDF
  35023. tDACDF
  35024. DACKn
  35025. (SA: IO → memory)
  35026.  
  35027. tDACD tDACD
  35028. DACKn
  35029. (DA)
  35030.  
  35031. Note: IO: DACK device
  35032. SA: Single address DMA transfer
  35033. DA: Dual address DMA transfer
  35034. DACK set to active-high
  35035.  
  35036. Figure 23.14 SRAM Bus Cycle: Basic Bus Cycle (No Wait)
  35037.  
  35038. 704
  35039.  
  35040. ----------------------- Page 721-----------------------
  35041.  
  35042. T1 Tw T2
  35043.  
  35044. CKIO
  35045.  
  35046. tAD tAD
  35047.  
  35048. A25–A0
  35049.  
  35050. tCSD tCSD
  35051.  
  35052.  
  35053.  
  35054. tRWD tRWD
  35055.  
  35056. RD/
  35057.  
  35058. tRSD tRSD tRSD
  35059.  
  35060.  
  35061.  
  35062. D63–D0 tRDS tRDH
  35063.  
  35064. (read)
  35065.  
  35066. tWED1
  35067. tWEDF tWEDF
  35068.  
  35069.  
  35070.  
  35071. tWDD tWDD tWDD
  35072.  
  35073. D63–D0
  35074. (write)
  35075.  
  35076. tBSD tBSD
  35077.  
  35078.  
  35079.  
  35080. tRDYS tRDYH
  35081.  
  35082.  
  35083.  
  35084. tDACD
  35085. tDACD tDACD
  35086. DACKn
  35087. (SA: IO ← memory)
  35088.  
  35089. tDACDF
  35090. tDACDF
  35091. DACKn
  35092. (SA: IO → memory)
  35093.  
  35094. tDACD tDACD
  35095. DACKn
  35096. (DA)
  35097.  
  35098. Note: IO: DACK device
  35099. SA: Single address DMA transfer
  35100. DA: Dual address DMA transfer
  35101.  
  35102. Figure 23.15 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait)
  35103.  
  35104. 705
  35105.  
  35106. ----------------------- Page 722-----------------------
  35107.  
  35108. T1 Tw Twe T2
  35109.  
  35110. CKIO
  35111.  
  35112. tAD tAD
  35113.  
  35114. A25–A0
  35115.  
  35116. tCSD tCSD
  35117.  
  35118.  
  35119.  
  35120. tRWD tRWD
  35121.  
  35122. RD/
  35123.  
  35124. tRSD tRSD tRSD
  35125.  
  35126.  
  35127.  
  35128. D63–D0 tRDS tRDH
  35129.  
  35130. (read)
  35131.  
  35132. tWED1
  35133. tWEDF tWEDF
  35134.  
  35135.  
  35136.  
  35137. tWDD tWDD tWDD
  35138.  
  35139. D63–D0
  35140. (write)
  35141.  
  35142. tBSD tBSD
  35143.  
  35144.  
  35145.  
  35146. tRDYS tRDYH
  35147.  
  35148.  
  35149.  
  35150. tDACD tRDYS tRDYH
  35151.  
  35152. DACKn tDACD tDACD
  35153.  
  35154. (SA: IO ← memory)
  35155.  
  35156. tDACDF
  35157. tDACDF
  35158. DACKn
  35159. (SA: IO → memory)
  35160.  
  35161. tDACD tDACD
  35162. DACKn
  35163. (DA)
  35164.  
  35165. Note: IO: DACK device
  35166. SA: Single address DMA transfer
  35167. DA: Dual address DMA transfer
  35168.  
  35169. Figure 23.16 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait + One External
  35170. Wait)
  35171.  
  35172. 706
  35173.  
  35174. ----------------------- Page 723-----------------------
  35175.  
  35176. TS1 T1 T2 TH1
  35177.  
  35178. CKIO
  35179.  
  35180. tAD tAD
  35181. A25–A0
  35182.  
  35183. tCSD tCSD
  35184.  
  35185.  
  35186. tRWD tRWD
  35187.  
  35188. RD/
  35189.  
  35190. tRSD tRSD tRSD
  35191.  
  35192.  
  35193. D63–D0 tRDS tRDH
  35194. (read)
  35195.  
  35196. tWED1
  35197. tWEDF tWEDF
  35198.  
  35199.  
  35200. tWDD tWDD tWDD
  35201.  
  35202. D63–D0
  35203. (write)
  35204.  
  35205. tBSD tBSD
  35206.  
  35207.  
  35208.  
  35209.  
  35210.  
  35211. tDACD tDACD
  35212. DACKn tDACD
  35213. (SA: IO ← memory)
  35214.  
  35215. tDACDF
  35216. tDACDF
  35217. DACKn
  35218. (SA: IO → memory)
  35219.  
  35220. tDACD tDACD
  35221. DACKn
  35222. (DA)
  35223.  
  35224. Figure 23.17 SRAM Bus Cycle: Basic Bus Cycle (No Wait, Address Setup/Hold Time
  35225. Insertion, AnS = 1, AnH = 1)
  35226.  
  35227. 707
  35228.  
  35229. ----------------------- Page 724-----------------------
  35230.  
  35231. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  35232.  
  35233. CKIO
  35234. tAD tAD
  35235.  
  35236. A25–A5
  35237. tAD
  35238.  
  35239. A4–A0
  35240.  
  35241. tCSD tCSD
  35242.  
  35243.  
  35244. tRWD tRWD
  35245.  
  35246. RD/
  35247. tRSD
  35248. tRSD tRSD
  35249.  
  35250.  
  35251.  
  35252. D63–D0 tRDS tRDH tRDS tRDH
  35253.  
  35254. (read)
  35255.  
  35256. tBSD tBSD
  35257.  
  35258.  
  35259.  
  35260.  
  35261. tDACD tDACD
  35262. tDACD
  35263. DACKn
  35264. (SA: IO ← memory)
  35265. tDACD tDACD
  35266.  
  35267. DACKn
  35268. (DA)
  35269.  
  35270. Note: IO: DACK device
  35271. SA: Single address DMA transfer
  35272. DA: Dual address DMA transfer
  35273. DACK set to active-high
  35274.  
  35275. Figure 23.18 Burst ROM Bus Cycle (No Wait)
  35276.  
  35277. 708
  35278.  
  35279. ----------------------- Page 725-----------------------
  35280.  
  35281. (
  35282. 1
  35283. s
  35284. t
  35285.  
  35286. D
  35287. a
  35288. t
  35289. a
  35290. :
  35291.  
  35292. O T1 Tw Twe TB2 TB1 Twb TB2 TB1 Twb TB2 TB1 Twb T2
  35293. n
  35294. e
  35295.  
  35296. I
  35297. CKIO
  35298. n
  35299. t t
  35300. e
  35301. AD tAD
  35302. r
  35303. n
  35304. A25–A5
  35305. a
  35306. l
  35307. t
  35308. F
  35309. AD
  35310.  
  35311. W i
  35312. g
  35313. a u
  35314. A4–A0
  35315. i r
  35316. t
  35317. e tCSD
  35318.  
  35319. t
  35320. +
  35321. CSD
  35322. 2
  35323. O 3
  35324. .
  35325.  
  35326. n 1
  35327. e 9 t t
  35328.  
  35329. RWD RWD
  35330.  
  35331. E
  35332. x B
  35333. RD/
  35334. W t u
  35335. e
  35336. r
  35337. t
  35338. r
  35339. t RSD
  35340. a
  35341. RSD
  35342. i n s
  35343. t
  35344. t a
  35345.  
  35346. )
  35347. l R t
  35348. W O
  35349. tRDS tRDH tRDS RDH
  35350. M
  35351. D63–D0
  35352. a
  35353. i (read)
  35354. t
  35355. ; B
  35356. 2 u
  35357. tBSD
  35358. n s
  35359. d
  35360.  
  35361. / C t
  35362. 3 y
  35363. RDYH
  35364. r c
  35365. tRDYS tRDYS tRDYH
  35366. d l
  35367. / e
  35368. 4
  35369. t t
  35370. h
  35371. t RDYS tRDYH
  35372.  
  35373. DACD
  35374. D
  35375. DACKn
  35376. a
  35377. (SA: IO ← memory) tDACD
  35378. t
  35379. a
  35380. tDACD tDACD
  35381. :
  35382.  
  35383. O DACKn
  35384. n (DA)
  35385. e
  35386.  
  35387. I
  35388. n
  35389. t
  35390. e
  35391. r
  35392. n
  35393. a
  35394. 7 l
  35395. 0
  35396. 9
  35397.  
  35398. ----------------------- Page 726-----------------------
  35399.  
  35400. 7
  35401. 1
  35402. 0
  35403.  
  35404. (
  35405. N
  35406. o
  35407. TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  35408.  
  35409. W
  35410. a
  35411. CKIO
  35412. i
  35413. t t
  35414. ,
  35415. AD t
  35416.  
  35417. AD
  35418. A A25–A5
  35419. d
  35420. d
  35421. tAD
  35422. r F
  35423. e i
  35424. s g A4–A0
  35425. s u
  35426. S r t
  35427. e
  35428. tCSD CSD
  35429. e
  35430. t 2
  35431. u 3
  35432. p .
  35433. / 2 t t
  35434. H
  35435. RWD
  35436. 0
  35437. RWD
  35438.  
  35439. o RD/
  35440. l
  35441. d B
  35442. u
  35443. t t
  35444. T
  35445. RSD RSD
  35446. i r
  35447. s
  35448.  
  35449. m t
  35450. e R tRDS tRDH tRDS tRDH
  35451. I O D63–D0
  35452. n
  35453. M
  35454. (read)
  35455. s
  35456. e
  35457. tBSD
  35458. r t
  35459. B
  35460. BSD
  35461. t
  35462. i
  35463. o u
  35464.  
  35465. n s
  35466. ,
  35467. C
  35468. A y
  35469. n c
  35470.  
  35471. S l
  35472. e tDACD t
  35473. =
  35474. tDACD DACD
  35475.  
  35476. DACKn
  35477. 1 (SA: IO ← memory)
  35478. ,
  35479.  
  35480. A
  35481. n
  35482. tDACD tDACD
  35483. H
  35484. DACKn
  35485. (DA)
  35486.  
  35487. =
  35488.  
  35489. 1
  35490. )
  35491.  
  35492. ----------------------- Page 727-----------------------
  35493.  
  35494. F
  35495. i
  35496. g
  35497. u
  35498. r T1 Tw Twe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe T2
  35499. e
  35500.  
  35501. 2
  35502. 3
  35503. CKIO
  35504. .
  35505. 2
  35506. 1 t t
  35507.  
  35508. AD AD
  35509.  
  35510. A25 A5
  35511. B
  35512. u
  35513. r tAD
  35514. s
  35515. t
  35516. A4 A0
  35517.  
  35518. R
  35519. O
  35520. tCSD tCSD
  35521. M
  35522.  
  35523. B
  35524. u
  35525. tRWD tRWD
  35526. s
  35527. RD/
  35528. C
  35529. y
  35530. c t
  35531. l
  35532. tRSD tRSD RSD
  35533. e
  35534.  
  35535. (
  35536. O
  35537. n t t t t
  35538. e
  35539. RDS RDH RDS RDH
  35540.  
  35541. D63 D0
  35542. I
  35543. n
  35544. (read)
  35545. t
  35546. e
  35547. r
  35548. tBSD tBSD tBSD tBSD
  35549. n
  35550. a
  35551. l
  35552.  
  35553. W t t t t
  35554. a
  35555. RDYS RDYH RDYS RDYH
  35556. i
  35557. t
  35558.  
  35559. +
  35560. t t
  35561. O
  35562. tRDYS tRDYH RDYS RDYH
  35563. n
  35564. e
  35565. tDACD tDACD tDACD
  35566. DACKn
  35567. E
  35568. x
  35569. (SA: IO ← memory)
  35570. t
  35571. e
  35572. r t t
  35573. n
  35574. DACD DACD
  35575. a
  35576. DACKn
  35577. l
  35578. (DA)
  35579. W
  35580. a
  35581. i
  35582. t
  35583. )
  35584. 7
  35585. 1
  35586. 1
  35587.  
  35588. ----------------------- Page 728-----------------------
  35589.  
  35590. 7
  35591. 1 Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  35592. 2
  35593.  
  35594. CKIO
  35595.  
  35596. tAD tAD
  35597. F BANK Row
  35598. i
  35599. g
  35600. u
  35601. tAD
  35602. r
  35603. e Precharge-sel Row H/L
  35604.  
  35605. 2
  35606. 3
  35607. .
  35608. 2 Addr Row column
  35609. 2
  35610.  
  35611.  
  35612.  
  35613. tCSD tCSD
  35614. S
  35615. ( y
  35616.  
  35617. R n
  35618. C c
  35619. h
  35620. t t
  35621. D
  35622. RWD RWD
  35623. r
  35624. o
  35625. RD/
  35626. = n
  35627. 1 o t t
  35628. , u
  35629. RASD RASD
  35630.  
  35631. C s
  35632. A D t t
  35633. S R
  35634. tCASD2 CASD2 CASD2
  35635.  
  35636. L A
  35637. a M
  35638. t
  35639. e
  35640. n A t tDQMD
  35641. c
  35642. DQMD
  35643. u
  35644. y t DQMn
  35645. = o-
  35646. 3 P t t
  35647. r
  35648. RDS RDH
  35649. ,
  35650. e D63–D0
  35651. T c (read) d0
  35652. P h t
  35653. a
  35654. WDD
  35655. C r tWDD
  35656. = g D63–D0
  35657. e
  35658.  
  35659. (write)
  35660. 3
  35661. ) B
  35662. u t t
  35663. s
  35664. BSD BSD
  35665.  
  35666.  
  35667. C
  35668. y
  35669. c
  35670. l
  35671. e
  35672. :
  35673. CKE
  35674.  
  35675. S
  35676. i
  35677. n
  35678. tDACD tDACD tDACD
  35679. g
  35680. l
  35681. DACKn
  35682. e (SA: IO ← memory)
  35683.  
  35684. Note: IO: DACK device
  35685. SA: Single address DMA transfer
  35686. DA: Dual address DMA transfer
  35687. DACK set to active-high
  35688.  
  35689. ----------------------- Page 729-----------------------
  35690.  
  35691. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  35692.  
  35693. CKIO
  35694. F
  35695. i
  35696. g tAD t
  35697. u
  35698. AD
  35699. r BANK Row
  35700. e
  35701.  
  35702. 2
  35703. 3
  35704. tAD
  35705. .
  35706. 2 Precharge-sel Row H/L
  35707. 3
  35708.  
  35709.  
  35710.  
  35711. S
  35712. y
  35713. Addr Row c0
  35714. n
  35715. ( c t
  35716. R h
  35717. tCSD CSD
  35718. C r
  35719. o
  35720. D n
  35721. o
  35722. = u
  35723. tRWD tRWD
  35724. s
  35725. 1 RD/
  35726. , D
  35727. C R t
  35728. A
  35729. t RASD
  35730. A
  35731. RASD
  35732. S M
  35733. L t t
  35734. a A
  35735. CASD2 CASD2
  35736. t
  35737. tCASD2
  35738. e u
  35739. n t
  35740.  
  35741. c o
  35742. y P-
  35743. = r
  35744. t tDQMD
  35745. e
  35746. DQMD
  35747.  
  35748. 3 c DQMn
  35749. , h
  35750. T a
  35751. P r
  35752. g
  35753. t tRDH
  35754. C
  35755. RDS
  35756. e D63–D0
  35757.  
  35758. d0 d1 d2 d3
  35759. = R (read)
  35760. e
  35761. t
  35762. 3
  35763. WDD
  35764. ) a t
  35765. d
  35766. WDD
  35767. D63–D0
  35768.  
  35769. B (write)
  35770. u
  35771. s
  35772. t t
  35773. C
  35774. BSD BSD
  35775.  
  35776. y
  35777. c
  35778. l
  35779. e
  35780. :
  35781.  
  35782. CKE
  35783. B
  35784. u
  35785. r
  35786. s
  35787. t
  35788. tDACD tDACD tDACD
  35789.  
  35790. DACKn
  35791. (SA: IO ← memory)
  35792. 7
  35793. 1
  35794. 3
  35795.  
  35796. ----------------------- Page 730-----------------------
  35797.  
  35798. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35799.  
  35800. CKIO
  35801.  
  35802. tAD tAD
  35803.  
  35804. BANK Row
  35805.  
  35806. tRWD tAD
  35807.  
  35808. Precharge-sel Row H/L
  35809.  
  35810. tRWD
  35811.  
  35812. Addr Row c0
  35813.  
  35814. tCSD tCSD
  35815.  
  35816.  
  35817.  
  35818. tRWD tRWD
  35819.  
  35820. RD/
  35821.  
  35822. tRASD tRASD
  35823.  
  35824.  
  35825.  
  35826. tCASD2 tCASD2 tCASD2
  35827.  
  35828.  
  35829.  
  35830. tDQMD tDQMD
  35831.  
  35832. DQMn
  35833.  
  35834. D63–D0 tRDS tRDH
  35835. (read) d0 d1 d2 d3
  35836.  
  35837. tWDD tWDD
  35838. D63–D0
  35839. (write)
  35840.  
  35841. tBSD tBSD
  35842.  
  35843.  
  35844.  
  35845. CKE
  35846.  
  35847. tDACD tDACD tDACD
  35848.  
  35849. DACKn
  35850. (SA: IO ← memory)
  35851.  
  35852. Figure 23.24 Synchronous DRAM Normal Read Bus Cycle: ACT + READ Commands,
  35853. Burst (RCD = 1, CAS Latency = 3)
  35854.  
  35855. 714
  35856.  
  35857. ----------------------- Page 731-----------------------
  35858.  
  35859. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35860.  
  35861. CKIO
  35862.  
  35863. tAD tAD tAD
  35864.  
  35865. BANK Row
  35866.  
  35867. tAD
  35868.  
  35869. Precharge-sel Row H/L
  35870.  
  35871. Addr Row c0
  35872.  
  35873. tCSD tCSD
  35874.  
  35875.  
  35876. tRWD tRWD
  35877.  
  35878. RD/
  35879.  
  35880. tRASD tRASD tRASD tRASD
  35881.  
  35882.  
  35883.  
  35884. tCASD2 tCASD2 tCASD2
  35885.  
  35886.  
  35887.  
  35888. tDQMD tDQMD
  35889.  
  35890. DQMn
  35891.  
  35892. D63–D0 tRDS tRDH
  35893.  
  35894. (read) d0 d1 d2 d3
  35895.  
  35896. tWDD tWDD
  35897. D63–D0
  35898. (write)
  35899.  
  35900. tBSD tBSD
  35901.  
  35902.  
  35903.  
  35904. CKE
  35905.  
  35906. tDACD tDACD tDACD
  35907. DACKn
  35908. (SA: IO ← memory)
  35909.  
  35910. Figure 23.25 Synchronous DRAM Normal Read Bus Cycle: PRE + ACT + READ
  35911. Commands, Burst (TPC = 1, RCD = 1, CAS Latency = 3)
  35912.  
  35913. 715
  35914.  
  35915. ----------------------- Page 732-----------------------
  35916.  
  35917. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35918.  
  35919. CKIO
  35920.  
  35921. tAD tAD
  35922.  
  35923. BANK Row
  35924.  
  35925. Precharge-sel H/L
  35926.  
  35927. Addr
  35928. c0
  35929.  
  35930. tCSD tCSD
  35931.  
  35932.  
  35933.  
  35934. tRWD tRWD
  35935.  
  35936. RD/
  35937.  
  35938. tRASD tRASD
  35939.  
  35940.  
  35941.  
  35942. tCASD2 tCASD2
  35943.  
  35944.  
  35945.  
  35946. tDQMD tDQMD
  35947.  
  35948. DQMn
  35949.  
  35950. D63–D0 tRDS tRDH
  35951.  
  35952. (read) d0 d1 d2 d3
  35953.  
  35954. tWDD tWDD
  35955. D63–D0
  35956. (write)
  35957.  
  35958. tBSD tBSD
  35959.  
  35960.  
  35961.  
  35962. CKE
  35963.  
  35964. tDACD tDACD tDACD
  35965.  
  35966. DACKn
  35967. (SA: IO ← memory)
  35968.  
  35969. Figure 23.26 Synchronous DRAM Normal Read Bus Cycle: READ Command, Burst
  35970. (CAS Latency = 3)
  35971.  
  35972. 716
  35973.  
  35974. ----------------------- Page 733-----------------------
  35975.  
  35976. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  35977.  
  35978. CKIO
  35979.  
  35980. tAD tAD
  35981.  
  35982. BANK Row
  35983.  
  35984. tAD
  35985. Precharge-sel Row H/L
  35986.  
  35987. Addr Row column
  35988.  
  35989. tCSD tCSD
  35990.  
  35991.  
  35992.  
  35993. tRWD tRWD
  35994.  
  35995. RD/
  35996.  
  35997. tRASD tRASD
  35998.  
  35999.  
  36000.  
  36001. tCASD2 tCASD2
  36002. tCASD2
  36003.  
  36004.  
  36005.  
  36006. tDQMD tDQMD
  36007.  
  36008. DQMn
  36009.  
  36010. tWDD
  36011. tWDD tWDD
  36012. D63–D0
  36013. c0
  36014. (write)
  36015.  
  36016. tBSD tBSD
  36017.  
  36018.  
  36019. CKE
  36020. tDACD tDACD
  36021. DACKn
  36022. (SA: IO → memory)
  36023.  
  36024. Figure 23.27 Synchronous DRAM Auto-Precharge Write Bus Cycle: Single
  36025. (RCD = 1, TRWL = 2, TPC = 1)
  36026.  
  36027. 717
  36028.  
  36029. ----------------------- Page 734-----------------------
  36030.  
  36031. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  36032.  
  36033. CKIO
  36034.  
  36035. tAD tAD
  36036.  
  36037. BANK Row
  36038.  
  36039. tAD
  36040. Precharge-sel Row H/L
  36041.  
  36042. Addr Row c0
  36043.  
  36044. tCSD tCSD
  36045.  
  36046.  
  36047.  
  36048. tRWD tRWD
  36049.  
  36050. RD/
  36051.  
  36052. tRASD tRASD
  36053.  
  36054.  
  36055.  
  36056. tCASD2 tCASD2
  36057. tCASD2
  36058.  
  36059.  
  36060.  
  36061. tDQMD tDQMD
  36062.  
  36063. DQMn
  36064.  
  36065. tWDD
  36066. tWDD tWDD
  36067. D63–D0
  36068. d0 d1 d2 d3
  36069. (write)
  36070.  
  36071. tBSD tBSD
  36072.  
  36073.  
  36074. CKE
  36075. tDACD tDACD
  36076. DACKn
  36077. (SA: IO → memory)
  36078.  
  36079. Figure 23.28 Synchronous DRAM Auto-Precharge Write Bus Cycle: Burst
  36080. (RCD = 1, TRWL = 2, TPC = 1)
  36081.  
  36082. 718
  36083.  
  36084. ----------------------- Page 735-----------------------
  36085.  
  36086. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  36087.  
  36088. CKIO
  36089.  
  36090. tAD tAD
  36091.  
  36092. BANK Row
  36093.  
  36094. tAD
  36095.  
  36096. Precharge-sel Row H/L
  36097.  
  36098. Addr Row c0
  36099.  
  36100. tCSD tCSD
  36101.  
  36102.  
  36103.  
  36104. tRWD tRWD
  36105.  
  36106. RD/
  36107.  
  36108. tRASD tRASD
  36109.  
  36110.  
  36111.  
  36112. tCASD2 tCASD2
  36113. tCASD2
  36114.  
  36115.  
  36116.  
  36117. tDQMD tDQMD
  36118.  
  36119. DQMn
  36120.  
  36121. tWDD
  36122. tWDD tWDD
  36123. D63–D0
  36124. d0 d1 d2 d3
  36125. (write)
  36126.  
  36127. tBSD tBSD
  36128.  
  36129.  
  36130. CKE
  36131.  
  36132. tDACD tDACD
  36133.  
  36134. DACKn
  36135. (SA: IO → memory)
  36136.  
  36137. Figure 23.29 Synchronous DRAM Normal Write Bus Cycle: ACT + WRITE
  36138. Commands, Burst (RCD = 1, TRWL = 2)
  36139.  
  36140. 719
  36141.  
  36142. ----------------------- Page 736-----------------------
  36143.  
  36144. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  36145.  
  36146. CKIO
  36147.  
  36148. tAD tAD tAD
  36149.  
  36150. BANK Row Row
  36151.  
  36152. tAD
  36153. Precharge-sel H/L Row H/L
  36154.  
  36155. Addr Row c0
  36156.  
  36157. tCSD tCSD
  36158.  
  36159.  
  36160.  
  36161. tRWD tRWD tRWD tRWD
  36162.  
  36163. RD/
  36164.  
  36165. tRASD tRASD tRASD tRASD
  36166.  
  36167.  
  36168.  
  36169. tCASD2 tCASD2
  36170. tCASD2
  36171.  
  36172.  
  36173.  
  36174. tDQMD tDQMD
  36175.  
  36176. DQMn
  36177.  
  36178. tWDD
  36179. tWDD tWDD
  36180. D63–D0
  36181. (write) d0 d1 d2 d3
  36182.  
  36183. tBSD tBSD
  36184.  
  36185.  
  36186. CKE
  36187. tDACD tDACD tDACD
  36188.  
  36189. DACKn
  36190. (SA: IO → memory)
  36191.  
  36192. Figure 23.30 Synchronous DRAM Normal Write Bus Cycle: PRE + ACT + WRITE
  36193. Commands, Burst (TPC = 1, RCD = 1, TRWL = 2)
  36194.  
  36195. 720
  36196.  
  36197. ----------------------- Page 737-----------------------
  36198.  
  36199. Tnop (Tnop) Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  36200.  
  36201. CKIO
  36202.  
  36203. tAD tAD
  36204.  
  36205. BANK Row
  36206.  
  36207. Precharge-sel H/L
  36208.  
  36209. Addr c0
  36210.  
  36211. tCSD tCSD
  36212.  
  36213.  
  36214.  
  36215. tRWD tRWD
  36216.  
  36217. RD/
  36218.  
  36219.  
  36220.  
  36221. tCASD2 tCASD2
  36222.  
  36223.  
  36224.  
  36225. tDQMD tDQMD
  36226.  
  36227. DQMn
  36228.  
  36229. tWDD
  36230. tWDD tWDD
  36231. D63–D0
  36232. d0 d1 d2 d3
  36233. (write)
  36234.  
  36235. tBSD tBSD
  36236.  
  36237.  
  36238. CKE
  36239. tDACD SA-DMA tDACD
  36240.  
  36241. DACKn
  36242. (SA: IO → memory)
  36243.  
  36244. Normal write
  36245.  
  36246. Note: In the case of SA-DMA only, the (Tnop) cycle is inserted, and the DACKn signal is output as shown
  36247. by the solid line. In a normal write, the (Tnop) cycle is omitted and the DACKn signal is output as
  36248. shown by the dotted line.
  36249.  
  36250. Figure 23.31 Synchronous DRAM Normal Write Bus Cycle: WRITE Command, Burst
  36251. (TRWL = 2)
  36252.  
  36253. 721
  36254.  
  36255. ----------------------- Page 738-----------------------
  36256.  
  36257. Tpr Tpc
  36258.  
  36259. CKIO
  36260.  
  36261. tAD tAD
  36262.  
  36263. BANK Row
  36264.  
  36265. Precharge-sel H/L
  36266.  
  36267. Addr
  36268.  
  36269. tCSD tCSD
  36270.  
  36271.  
  36272.  
  36273. tRWD tRWD
  36274.  
  36275. RD/
  36276.  
  36277. tRASD tRASD
  36278.  
  36279.  
  36280.  
  36281. tCASD2 tCASD2
  36282.  
  36283.  
  36284.  
  36285. tDQMD tDQMD
  36286.  
  36287. DQMn
  36288.  
  36289. tWDD tWDD
  36290. D63–D0
  36291. (write)
  36292.  
  36293. tBSD
  36294.  
  36295.  
  36296. CKE
  36297.  
  36298. tDACD tDACD
  36299.  
  36300. DACKn
  36301.  
  36302. Figure 23.32 Synchronous DRAM Bus Cycle: Synchronous DRAM Precharge
  36303. Command (TPC = 1)
  36304.  
  36305. 722
  36306.  
  36307. ----------------------- Page 739-----------------------
  36308.  
  36309. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  36310.  
  36311. CKIO
  36312.  
  36313. tAD tAD
  36314.  
  36315. BANK
  36316.  
  36317. Precharge-sel
  36318.  
  36319. Addr
  36320.  
  36321. tCSD tCSD tCSD tCSD
  36322.  
  36323.  
  36324.  
  36325. tRWD tRWD
  36326.  
  36327. RD/
  36328.  
  36329. tRASD tRASD tRASD tRASD
  36330.  
  36331.  
  36332.  
  36333. tCASD2 tCASD2 tCASD2 tCASD2
  36334.  
  36335.  
  36336.  
  36337. tDQMD tDQMD
  36338. DQMn
  36339.  
  36340. tWDD tWDD
  36341. D63–D0
  36342. (write)
  36343.  
  36344. tBSD
  36345.  
  36346.  
  36347.  
  36348. CKE
  36349. tDACD tDACD
  36350.  
  36351. DACKn
  36352.  
  36353. Figure 23.33 Synchronous DRAM Bus Cycle: Synchronous DRAM Auto-Refresh
  36354. (TRAS = 1, TRC = 1)
  36355.  
  36356. 723
  36357.  
  36358. ----------------------- Page 740-----------------------
  36359.  
  36360. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  36361.  
  36362. CKIO
  36363.  
  36364. tAD tAD
  36365.  
  36366. BANK
  36367.  
  36368. Precharge-sel
  36369.  
  36370. Addr
  36371.  
  36372. tCSD
  36373. tCSD tCSD tCSD
  36374.  
  36375.  
  36376.  
  36377. tRWD tRWD
  36378.  
  36379. RD/
  36380.  
  36381. tRASD
  36382. tRASD tRASD tRASD
  36383.  
  36384.  
  36385.  
  36386. tCASD2
  36387. tCASD2 tCASD2 tCASD2
  36388.  
  36389.  
  36390.  
  36391. tDQMD tDQMD
  36392. DQMn
  36393.  
  36394. tWDD tWDD
  36395.  
  36396. D63–D0
  36397. (write)
  36398.  
  36399. tBSD
  36400.  
  36401.  
  36402.  
  36403. tCKED tCKED
  36404.  
  36405. CKE
  36406.  
  36407. tDACD tDACD
  36408.  
  36409. DACKn
  36410.  
  36411. Figure 23.34 Synchronous DRAM Bus Cycle: Synchronous DRAM Self-Refresh (TRC
  36412. = 1)
  36413.  
  36414. 724
  36415.  
  36416. ----------------------- Page 741-----------------------
  36417.  
  36418. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  36419.  
  36420. CKIO
  36421.  
  36422. tAD tAD tAD
  36423.  
  36424. BANK
  36425.  
  36426. Precharge-sel
  36427.  
  36428. Addr
  36429.  
  36430. tCSD tCSD tCSD
  36431.  
  36432.  
  36433.  
  36434. tRWD tRWD tRWD
  36435.  
  36436. RD/
  36437.  
  36438. tRASD tRASD tRASD
  36439.  
  36440.  
  36441.  
  36442. tCASD2 tCASD2 tCASD2 tCASD2
  36443.  
  36444.  
  36445.  
  36446. tDQMD tDQMD
  36447.  
  36448. DQMn
  36449.  
  36450. tWDD tWDD
  36451. D63–D0
  36452. (write)
  36453.  
  36454. tBSD
  36455.  
  36456.  
  36457.  
  36458. CKE
  36459.  
  36460. tDACD tDACD
  36461.  
  36462. DACKn
  36463.  
  36464. Figure 23.35 (a) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  36465. Setting (PALL)
  36466.  
  36467. 725
  36468.  
  36469. ----------------------- Page 742-----------------------
  36470.  
  36471. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  36472.  
  36473. CKIO
  36474.  
  36475. tAD tAD tAD
  36476.  
  36477. BANK
  36478.  
  36479. Precharge-sel
  36480.  
  36481. Addr
  36482.  
  36483. tCSD tCSD tCSD
  36484.  
  36485.  
  36486.  
  36487. tRWD tRWD tRWD
  36488.  
  36489. RD/
  36490.  
  36491. tRASD tRASD tRASD
  36492.  
  36493.  
  36494.  
  36495. tCASD2 tCASD2 tCASD2 tCASD2
  36496.  
  36497.  
  36498.  
  36499. tDQMD tDQMD
  36500.  
  36501. DQMn
  36502.  
  36503. tWDD tWDD
  36504. D63–D0
  36505. (write)
  36506.  
  36507. tBSD
  36508.  
  36509.  
  36510.  
  36511. CKE
  36512.  
  36513. tDACD tDACD
  36514.  
  36515. DACKn
  36516.  
  36517. Figure 23.35 (b) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  36518. Setting (SET)
  36519.  
  36520. 726
  36521.  
  36522. ----------------------- Page 743-----------------------
  36523.  
  36524. Tr1 Tr2 Tc1 Tc2 Tpc Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  36525.  
  36526. CKIO
  36527.  
  36528. t t t t t
  36529. (
  36530. AD AD AD AD tAD AD
  36531. (
  36532. 1 A25–A0 Row column Row column
  36533. )
  36534.  
  36535. R
  36536. C
  36537. tCSD tCSD tCSD tCSD
  36538. D
  36539.  
  36540. = t t
  36541.  
  36542. tRWD tRWD RWD RWD
  36543. 0
  36544. , RD/
  36545.  
  36546. A
  36547. n
  36548. F
  36549. t t t t t t
  36550. W
  36551. RASD RASD RASD RASD RASD RASD
  36552. i
  36553. g
  36554.  
  36555.  
  36556. = u
  36557. r
  36558. 0 e t t t t t t
  36559. ,
  36560. CASD1 CASD1 CASD1 CASD1 CASD1 CASD1
  36561. T 2
  36562. 3
  36563. P .
  36564. C 3
  36565. 6
  36566.  
  36567. =
  36568. t t t t
  36569. D63–D0 RDS RDH RDS RDH
  36570.  
  36571. 1 D (read)
  36572. ;
  36573. ( R t t
  36574. 2 A
  36575. WDD WDD
  36576. ) M
  36577. t t t t
  36578.  
  36579. WDD WDD WDD WDD
  36580. R D63–D0
  36581. C B (write)
  36582. D u
  36583. s
  36584. =
  36585. C
  36586. t t
  36587.  
  36588. tBSD tBSD BSD BSD
  36589. 1 y
  36590. ,
  36591. c
  36592. A l
  36593. e
  36594. n s
  36595. W DACKn tDACD tDACD tDACD tDACD tDACD tDACD
  36596.  
  36597. = (SA: IO ← memory)
  36598.  
  36599. 1
  36600. ,
  36601.  
  36602. T t t t t t t
  36603. P
  36604. DACD DACD DACD DACD DACD DACD
  36605. DACKn
  36606. C (SA: IO → memory)
  36607.  
  36608. =
  36609.  
  36610. 2
  36611. )
  36612.  
  36613. Note: IO: DACK device (1) (2)
  36614. SA: Single address DMA transfer
  36615. DA: Dual address DMA transfer
  36616. 7
  36617. DACK set to active-high
  36618. 2
  36619. 7
  36620.  
  36621. ----------------------- Page 744-----------------------
  36622.  
  36623. T1r Tr2 Tc1 Tc2 Tce Tpc
  36624.  
  36625. CKIO
  36626.  
  36627. tAD tAD tAD
  36628.  
  36629. A25–A0 Row column
  36630.  
  36631. tCSD tCSD
  36632.  
  36633.  
  36634.  
  36635. tRWD tRWD
  36636.  
  36637. RD/
  36638.  
  36639. tRASD tRASD tRASD
  36640.  
  36641.  
  36642. tCASD1 tCASD1 tCASD1
  36643.  
  36644.  
  36645. tRDS tRDH
  36646. D63–D0
  36647. (read)
  36648.  
  36649. tWDD
  36650. D63–D0
  36651. (write)
  36652.  
  36653. tBSD tBSD
  36654.  
  36655.  
  36656.  
  36657. tDACD tDACD
  36658. DACKn
  36659. (SA: IO ← memory)
  36660.  
  36661. Figure 23.37 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  36662.  
  36663. 728
  36664.  
  36665. ----------------------- Page 745-----------------------
  36666.  
  36667. F
  36668. i T1r Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  36669. g
  36670. u
  36671. r
  36672. e
  36673. CKIO
  36674.  
  36675. 2
  36676. 3 t t t t
  36677. . AD AD AD AD
  36678. 3
  36679. 8 A25–A0 Row c0 c1 c2 c3
  36680.  
  36681.  
  36682.  
  36683. D
  36684. R
  36685. tCSD tCSD
  36686. A
  36687. M
  36688.  
  36689. B
  36690. u t t
  36691. r
  36692. RWD RWD
  36693. s
  36694. t RD/
  36695.  
  36696. B
  36697. u
  36698. s t t t
  36699.  
  36700. RASD RASD RASD
  36701. C
  36702. y
  36703. c
  36704. l
  36705. e
  36706.  
  36707. (
  36708. E tRWD tCASD1 tCASD1 tCASD1 tCASD1
  36709. D
  36710. O
  36711.  
  36712. M
  36713. o
  36714. d
  36715. D63–D0 tRDS tRDH tRDS tRDH
  36716. e
  36717. , (read) d0 d1 d2 d3
  36718.  
  36719. R
  36720. C
  36721. tWDD
  36722. D
  36723.  
  36724. = D63–D0
  36725.  
  36726. 0 (write)
  36727. ,
  36728.  
  36729. A
  36730. n
  36731. W
  36732. tBSD tBSD tBSD tBSD
  36733.  
  36734. =
  36735.  
  36736. 0
  36737. ,
  36738.  
  36739. T
  36740. P t t t
  36741. C
  36742. DACD DACD DACD
  36743. DACKn
  36744.  
  36745. =
  36746. (SA: IO ← memory)
  36747.  
  36748. 1
  36749. )
  36750. 7
  36751. 2
  36752. 9
  36753.  
  36754. ----------------------- Page 746-----------------------
  36755.  
  36756. 7
  36757. 3
  36758. 0
  36759. F
  36760. i
  36761. g
  36762. u
  36763. r
  36764. e
  36765.  
  36766. 2
  36767. 3
  36768. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tce Tpc
  36769. .
  36770. 3
  36771. 9 CKIO
  36772.  
  36773.  
  36774.  
  36775. D
  36776. tAD tAD tAD
  36777. R A25–A0 Row c0 c1 c2 c3
  36778. A
  36779. M
  36780. tCSD tCSD
  36781.  
  36782. B
  36783. u
  36784. r
  36785. tRWD tRWD
  36786. s
  36787. t
  36788. RD/
  36789. B
  36790. u tRASD
  36791. s
  36792. t tRASD
  36793.  
  36794. RASD
  36795. C
  36796. y
  36797. c
  36798. l
  36799. e
  36800. tCASD1
  36801. t t t t t
  36802. (
  36803. CASD1 CASD1 CASD1 CASD1 CASD1
  36804. E
  36805. D
  36806. O
  36807.  
  36808. M D63–D0 tRDS tRDH tRDS tRDH
  36809. o
  36810. (read) d0 d1 d2 d3
  36811. d
  36812. e
  36813. , t
  36814. WDD
  36815. R D63–D0
  36816. C (write)
  36817. D
  36818.  
  36819. =
  36820. tBSD tBSD
  36821.  
  36822. 1
  36823.  
  36824. ,
  36825.  
  36826. A
  36827. n
  36828. tDACD tDACD
  36829. W
  36830. tDACD
  36831. DACKn
  36832.  
  36833. = (SA: IO ← memory)
  36834.  
  36835. 1
  36836. ,
  36837.  
  36838. T
  36839. P
  36840. C
  36841.  
  36842. =
  36843.  
  36844. 1
  36845. )
  36846.  
  36847. ----------------------- Page 747-----------------------
  36848.  
  36849. F
  36850. i
  36851. g
  36852. u
  36853. r
  36854. e
  36855.  
  36856. 2
  36857. 3
  36858. .
  36859. 4
  36860. 0
  36861.  
  36862.  
  36863.  
  36864. D Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tce Tpc
  36865. R CKIO
  36866. A
  36867. M tAD tAD tAD
  36868.  
  36869. B
  36870. A25–A0 row c0 c1 c2 c3
  36871. u
  36872. r
  36873. t tCSD
  36874. C s
  36875. CSD
  36876. t
  36877. y
  36878. c B
  36879. l u
  36880. e s tRWD tRWD
  36881.  
  36882. C C RD/
  36883. A y t
  36884. S c
  36885. RASD t
  36886. l
  36887. t RASD
  36888. e
  36889. RASD
  36890. N
  36891.  
  36892.  
  36893. (
  36894. e E
  36895. g
  36896. a D tCASD1 tCASD1 tCASD1 tCASD1 tCASD1
  36897. t O
  36898. e
  36899.  
  36900. P M
  36901. u
  36902. l o D63–D0 t t t t
  36903. s d
  36904. RDS RDH RDS RDH
  36905. e (read)
  36906. e
  36907. d0 d1 d2 d3
  36908.  
  36909. W ,
  36910. R
  36911. tWDD
  36912. i D63–D0
  36913. d C
  36914. t
  36915. (write)
  36916. h D
  36917. )
  36918. =
  36919. tBSD tBSD
  36920.  
  36921. 1
  36922. ,
  36923.  
  36924. A tDACD
  36925. n
  36926. tDACD t
  36927. W
  36928. DACKn DACD
  36929. (SA: IO ← memory)
  36930.  
  36931. =
  36932.  
  36933. 1
  36934. ,
  36935.  
  36936. T
  36937. P
  36938. C
  36939.  
  36940. =
  36941.  
  36942. 1
  36943. ,
  36944.  
  36945. 2
  36946. 7 -
  36947. 3
  36948. 1
  36949.  
  36950. ----------------------- Page 748-----------------------
  36951.  
  36952. 7
  36953. 3
  36954. 2
  36955.  
  36956. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  36957.  
  36958. F CKIO
  36959. i
  36960. g
  36961. u
  36962. r t t t t
  36963. e
  36964. AD AD AD AD
  36965.  
  36966. 2 A25–A0 Row c0 c1 c2 c3
  36967. 3
  36968. .
  36969. 4
  36970. tCSD
  36971. 1 t
  36972. CSD
  36973.  
  36974.  
  36975. ( D
  36976. E R
  36977. D A
  36978. O t t
  36979. M
  36980. RWD RWD
  36981.  
  36982. M B RD/
  36983. o u
  36984. d r
  36985. e s t t
  36986. ,
  36987. RASD RASD
  36988. t
  36989. R B
  36990. C u
  36991. D s t
  36992. C
  36993. t t t t CASD1
  36994. =
  36995. CASD1 CASD1 CASD1 CASD1
  36996. y
  36997. 0 c
  36998.  
  36999. , l
  37000. e
  37001. A :
  37002. n R
  37003. W
  37004. tRDS tRDH tRDS tRDH
  37005. A
  37006. D63–D0
  37007. S
  37008. (read) d0 d1 d2 d3
  37009. =
  37010. D
  37011. t
  37012. 0
  37013. WDD
  37014. ) o
  37015. w
  37016. D63–D0
  37017. (write)
  37018. n
  37019.  
  37020. M
  37021. tBSD tBSD tBSD tBSD
  37022. o
  37023. d
  37024.  
  37025. e
  37026.  
  37027. S
  37028. t
  37029. a t t t
  37030. t
  37031. DACD DACD DACD
  37032. e
  37033. DACKn
  37034. (SA: IO ← memory)
  37035.  
  37036. ----------------------- Page 749-----------------------
  37037.  
  37038. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  37039.  
  37040. F
  37041. i CKIO
  37042. g
  37043. u
  37044. r
  37045. e
  37046.  
  37047. tAD tAD tAD
  37048. 2
  37049. 3 A25–A0 c0 c1 c2 c3
  37050. .
  37051. 4
  37052. 2
  37053.  
  37054. tCSD
  37055.  
  37056.  
  37057. tCSD
  37058. D
  37059. R
  37060.  
  37061. ( A
  37062. E M
  37063. D t t
  37064. B
  37065. RWD RWD
  37066. O
  37067. u RD/
  37068. M r
  37069. s
  37070. o t RAS-down
  37071. d B mode ended
  37072. e u t
  37073. ,
  37074. RASD
  37075. s
  37076. R
  37077. C C
  37078. y
  37079. D
  37080. t
  37081. c
  37082. CASD1
  37083. l
  37084. e
  37085. t t t t
  37086. =
  37087. CASD1 CASD1 CASD1 CASD1
  37088. :
  37089.  
  37090. 0 R
  37091. ,
  37092. A A
  37093. n S
  37094. W D D63–D0 tRDS tRDH tRDS tRDH
  37095. o
  37096. = w (read) d0 d1 d2 d3
  37097. 0 n t
  37098. )
  37099. WDD
  37100. M
  37101. o
  37102. D63–D0
  37103. d (write)
  37104. e
  37105.  
  37106. C tBSD tBSD tBSD tBSD
  37107. o
  37108. n
  37109. t
  37110. i
  37111. n
  37112. u
  37113. a
  37114. t
  37115. i t t
  37116. o
  37117. DACD DACD
  37118. n DACKn
  37119.  
  37120. (SA: IO ← memory)
  37121.  
  37122. 7
  37123. 3
  37124. 3
  37125.  
  37126. ----------------------- Page 750-----------------------
  37127.  
  37128. 7
  37129. 3 F
  37130. 4 i
  37131. g
  37132. u
  37133. r Tc2 Tc1 Tc2 Tpc
  37134. e
  37135. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1
  37136.  
  37137. 2
  37138. 3 CKIO
  37139. .
  37140. 4
  37141. 3
  37142.  
  37143.  
  37144. tAD tAD tAD
  37145.  
  37146. D A25–A0 Row c0 c1 c2 c3
  37147. R
  37148. A
  37149. M
  37150. tCSD tCSD
  37151.  
  37152. B
  37153. u
  37154. r
  37155. s t
  37156. t
  37157. RWD tRWD
  37158.  
  37159. B
  37160. RD/
  37161. u
  37162. s
  37163.  
  37164. C tRASD tRASD tRASD
  37165. y
  37166. c
  37167. l
  37168. e
  37169.  
  37170. (
  37171. F tCASD1 t t t t
  37172. a
  37173. CASD1 CASD1 CASD1 CASD1
  37174. s
  37175. t
  37176.  
  37177.  
  37178. P
  37179. a
  37180. g
  37181. e
  37182. D63–D0 tRDS tRDH tRDS tRDH
  37183.  
  37184. M (read) d0 d1 d2 d3
  37185. o
  37186. tWDD
  37187. d
  37188. e
  37189. tWDD tWDD tWDD
  37190. ,
  37191. D63–D0
  37192. R
  37193. d0 d1 d2 d3
  37194. (write)
  37195. C
  37196. D
  37197.  
  37198. =
  37199. tBSD tBSD
  37200.  
  37201. 0
  37202. ,
  37203.  
  37204. A
  37205. n
  37206. W tDACD tDACD tDACD
  37207. DACKn
  37208. = (SA: IO ← memory)
  37209.  
  37210. 0
  37211. ,
  37212. t t
  37213. T
  37214. DACD DACD tDACD
  37215. P DACKn
  37216. C (SA: IO → memory)
  37217.  
  37218. =
  37219.  
  37220. 1
  37221. )
  37222.  
  37223. ----------------------- Page 751-----------------------
  37224.  
  37225. F
  37226. i
  37227. g
  37228. u
  37229. r
  37230. e
  37231.  
  37232. 2
  37233. 3
  37234. .
  37235. 4
  37236. 4
  37237.  
  37238. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tpc
  37239.  
  37240. D
  37241. R
  37242. CKIO
  37243. A t t
  37244. M
  37245. AD tAD AD
  37246. A25–A0 Row c0 c1 c2 c3
  37247.  
  37248. B
  37249. u t tCSD
  37250. r
  37251. CSD
  37252. s
  37253. t
  37254.  
  37255. B
  37256. u
  37257. tRWD tRWD
  37258. s RD/
  37259.  
  37260. C
  37261. y
  37262. tRASD t
  37263. c
  37264. tRASD RASD
  37265. l
  37266. e
  37267.  
  37268.  
  37269. (
  37270. F
  37271. a
  37272. tCASD1 tCASD1 tCASD1 tCASD1 tCASD1
  37273. s
  37274. t
  37275.  
  37276.  
  37277. P
  37278. a t
  37279. g
  37280. D63–D0 tRDS tRDH tRDS RDH
  37281. e
  37282. (read) d0 d1 d2 d3
  37283. M
  37284. tWDD
  37285. o
  37286. tWDD tWDD t
  37287. d
  37288. WDD
  37289. D63–D0
  37290. e
  37291. d0 d1 d2 d3
  37292. (write)
  37293. ,
  37294.  
  37295. R
  37296. C
  37297. tBSD tBSD
  37298. D
  37299.  
  37300. = tDACD
  37301.  
  37302. 1
  37303. tDACD tDACD
  37304. ,
  37305. DACKn
  37306. A (SA: IO ← memory)
  37307. n t
  37308. W
  37309. DACD tDACD tDACD
  37310.  
  37311. DACKn
  37312. = (SA: IO → memory)
  37313.  
  37314. 1
  37315. ,
  37316.  
  37317. T
  37318. P
  37319. C
  37320.  
  37321. =
  37322.  
  37323. 7 1
  37324. 3 )
  37325. 5
  37326.  
  37327. ----------------------- Page 752-----------------------
  37328.  
  37329. 7
  37330. 3
  37331. 6
  37332. (
  37333. F
  37334. a
  37335. s
  37336. t
  37337.  
  37338. P
  37339. a
  37340. g
  37341. e
  37342.  
  37343. M
  37344. o
  37345. d
  37346. e Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tpc
  37347. ,
  37348.  
  37349. R CKIO
  37350. C t t t
  37351. D
  37352. AD AD AD
  37353. F
  37354.  
  37355. A25–A0
  37356. i
  37357. Row c0 c1 c2 c3
  37358. = g
  37359. u t
  37360. 1
  37361. t CSD
  37362. r
  37363. CSD
  37364. ,
  37365. e
  37366.  
  37367.  
  37368. A 2
  37369. n 3
  37370. tRWD tRWD
  37371. W .
  37372. 4
  37373. RD/
  37374. 5
  37375. =
  37376. t
  37377. RASD t
  37378.  
  37379. RASD
  37380.  
  37381. t
  37382.  
  37383. RASD
  37384. 1 D
  37385. ,
  37386.  
  37387. T R t t t
  37388. A
  37389. CASD1 t CASD1 t CASD1
  37390. P
  37391. CASD1 CASD1
  37392.  
  37393. C M
  37394. =
  37395. B
  37396. D63–D0 t t t t
  37397.  
  37398. RDS RDH RDS RDH
  37399. 1 u (read) d0 d1 d2 d3
  37400. , r
  37401. t
  37402.  
  37403. WDD
  37404. 2 s
  37405. t t
  37406. t
  37407. WDD WDD t
  37408. -
  37409. WDD
  37410.  
  37411. D63–D0
  37412. C B (write) d0 d1 d2 d3
  37413. y u
  37414. c s
  37415. l
  37416. t t
  37417.  
  37418. BSD BSD
  37419. e C
  37420. C y t
  37421. A c
  37422. DACD
  37423. l t t
  37424. S e
  37425. DACD DACD
  37426. DACKn
  37427.  
  37428. N (SA: IO ← memory) t
  37429. e
  37430. DACD tDACD tDACD
  37431. g DACKn
  37432. a
  37433. t (SA: IO → memory)
  37434. e
  37435.  
  37436. P
  37437. u
  37438. l
  37439. s
  37440. e
  37441.  
  37442. W
  37443. i
  37444. d
  37445. t
  37446. h
  37447. )
  37448.  
  37449. ----------------------- Page 753-----------------------
  37450.  
  37451. F
  37452. i
  37453. g
  37454. u
  37455. r
  37456. e
  37457.  
  37458. 2
  37459. 3
  37460. .
  37461. 4 Tc1 Tc2 Tc1 Tc2
  37462. 6
  37463. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2
  37464.  
  37465.  
  37466. CKIO
  37467. D
  37468. R t t t t
  37469. A
  37470. AD AD AD AD
  37471. M A25–A0 Row c0 c1 c2 c3
  37472.  
  37473. B t t t
  37474. u
  37475. CSD CSD CSD
  37476. r
  37477. s
  37478. t
  37479.  
  37480. B t t t
  37481. u
  37482. RWD RWD RWD
  37483. s RD/
  37484.  
  37485. C
  37486. y
  37487. tRASD
  37488. c
  37489. tRASD
  37490. l
  37491. e
  37492. 0 :
  37493.  
  37494. ,
  37495. A R
  37496. A
  37497. t t t t t
  37498. n
  37499. CASD1 CASD1 CASD1 CASD1 CASD1
  37500. W S
  37501. D
  37502. = o
  37503. 0 w D63–D0 tRDS tRDH tRDS tRDH
  37504. ) n
  37505. (read) d0 d1 d2 d3
  37506. M
  37507. tWDD
  37508. o
  37509. tWDD tWDD tWDD
  37510. d D63–D0
  37511. e
  37512. d0 d1 d2 d3
  37513. (write)
  37514. S
  37515. t
  37516. a
  37517. t
  37518. tBSD tBSD
  37519. e
  37520.  
  37521. (
  37522.  
  37523. F
  37524. a
  37525. s
  37526. t
  37527. tDACD tDACD tDACD
  37528.  
  37529. P
  37530. DACKn
  37531. a (SA: IO ← memory)
  37532. g
  37533. e t t t
  37534. DACD DACD DACD
  37535. M DACKn
  37536. o (SA: IO → memory)
  37537. d
  37538. e
  37539. ,
  37540.  
  37541. R
  37542. C
  37543. 7 D
  37544. 3
  37545. 7 =
  37546.  
  37547. ----------------------- Page 754-----------------------
  37548.  
  37549. 7 F
  37550. 3 i
  37551. 8 g
  37552. u
  37553. r
  37554. e
  37555.  
  37556. 2
  37557. 3
  37558. .
  37559. 4
  37560. 7
  37561. Tnop Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  37562.  
  37563.  
  37564.  
  37565. D
  37566. CKIO
  37567. R
  37568. A
  37569. tAD tAD
  37570. M A25–A0 c0 c1 c2 c3
  37571.  
  37572. B
  37573. u
  37574. tCSD tCSD tCSD
  37575. r
  37576. s
  37577.  
  37578. t
  37579.  
  37580. B
  37581. u
  37582. tRWD tRWD tRWD
  37583. s RD/
  37584.  
  37585. C
  37586. R y
  37587. C c t
  37588. l
  37589. RAS down mode ended RASD
  37590. D e
  37591. :
  37592.  
  37593. = R t t t t
  37594. A
  37595. CASD1 CASD1 CASD1 CASD1
  37596. 0
  37597. tCASD1
  37598. , S
  37599. A
  37600.  
  37601. n D
  37602. W o
  37603. w t t tRDS tRDH
  37604.  
  37605. RDS
  37606. n
  37607. D63–D0 RDH
  37608. = (read) d0 d1 d2 d3
  37609. 0 M tWDD
  37610. )
  37611. o tWDD tWDD tWDD
  37612. d D63–D0
  37613. e d0 d1 d2 d3
  37614. (write)
  37615. C
  37616. o
  37617. n
  37618. tBSD tBSD
  37619. t
  37620. i
  37621. n
  37622. u
  37623. a
  37624. t
  37625. i
  37626. tDACD tDACD tDACD
  37627. o
  37628. n
  37629. DACKn
  37630. (SA: IO ← memory)
  37631. (
  37632. F
  37633. a
  37634. tDACD tDACD tDACD
  37635. s
  37636. t
  37637. DACKn
  37638.  
  37639. P
  37640. (SA: IO → memory)
  37641. a
  37642. g
  37643. e
  37644.  
  37645. M
  37646. o
  37647. d
  37648. e
  37649. ,
  37650.  
  37651. ----------------------- Page 755-----------------------
  37652.  
  37653. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  37654.  
  37655. CKIO
  37656.  
  37657. tAD
  37658.  
  37659. A25–A0
  37660.  
  37661. tCSD
  37662.  
  37663.  
  37664.  
  37665. tRWD
  37666.  
  37667. RD/
  37668.  
  37669. tRASD tRASD tRASD
  37670.  
  37671.  
  37672.  
  37673. tCASD1
  37674. tCASD1 tCASD1
  37675.  
  37676.  
  37677.  
  37678. tWDD
  37679.  
  37680. D63–D0
  37681. (write)
  37682.  
  37683.  
  37684.  
  37685. tDACD
  37686. DACKn
  37687. (SA: IO ← memory)
  37688.  
  37689. tDACD
  37690.  
  37691. DACKn
  37692. (SA: IO → memory)
  37693.  
  37694. Figure 23.48 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 0, TRC = 1)
  37695.  
  37696. 739
  37697.  
  37698. ----------------------- Page 756-----------------------
  37699.  
  37700. TRr1 TRr2 TRr3 TRr4 TRr4w TRr5 Trc Trc Trc
  37701.  
  37702. CKIO
  37703.  
  37704. tAD
  37705.  
  37706. A25–A0
  37707.  
  37708. tCSD
  37709.  
  37710.  
  37711.  
  37712. tRWD
  37713.  
  37714. RD/
  37715.  
  37716. tRASD tRASD tRASD
  37717.  
  37718.  
  37719. tCASD1
  37720. tCASD1 tCASD1
  37721.  
  37722.  
  37723.  
  37724. tWDD
  37725.  
  37726. D63–D0
  37727. (write)
  37728.  
  37729.  
  37730.  
  37731. tDACD
  37732. DACKn
  37733. (SA: IO ← memory)
  37734.  
  37735. tDACD
  37736.  
  37737. DACKn
  37738. (SA: IO → memory)
  37739.  
  37740. Figure 23.49 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 1, TRC = 1)
  37741.  
  37742. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  37743.  
  37744. CKIO
  37745.  
  37746. tAD
  37747.  
  37748. A25–A0
  37749.  
  37750. tCSD
  37751.  
  37752.  
  37753.  
  37754. tRWD
  37755.  
  37756. RD/
  37757.  
  37758. tRASD tRASD tRASD
  37759.  
  37760.  
  37761.  
  37762. tCASD1 tCASD1 tCASD1
  37763.  
  37764.  
  37765.  
  37766. tWDD
  37767.  
  37768. D63–D0
  37769. (write)
  37770.  
  37771.  
  37772.  
  37773. tDACD
  37774. DACKn
  37775. (SA: IO ← memory)
  37776.  
  37777. tDACD
  37778. DACKn
  37779. (SA: IO → memory)
  37780.  
  37781. Figure 23.50 DRAM Bus Cycle: DRAM Self-Refresh (TRC = 1)
  37782.  
  37783. 740
  37784.  
  37785. ----------------------- Page 757-----------------------
  37786.  
  37787. Tpcm1 Tpcm2 Tpcm0 Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  37788.  
  37789. F
  37790. CKIO
  37791. i
  37792. g
  37793. u tAD tAD tAD tAD
  37794. r
  37795. e A25–A0
  37796.  
  37797. 2
  37798. 3
  37799. .
  37800. 5
  37801. tCSD tCSD tCSD tCSD
  37802. ( 1
  37803. 2
  37804. ) ()
  37805. (
  37806. P 1
  37807. )
  37808. t t t t
  37809. C
  37810. RWD RWD RWD RWD
  37811.  
  37812. O M P RD/
  37813. n C
  37814. e C M
  37815. I
  37816. I A
  37817. t
  37818. C
  37819. tRSD tRSD RSD tRSD t t
  37820. n
  37821. RSD RSD
  37822. t I
  37823. e M A
  37824.  
  37825. r
  37826. n e M
  37827. m
  37828. t t
  37829. a
  37830. RDS RDH t t
  37831. l e
  37832. D15–D0 RDS RDH
  37833. o
  37834. W r m (read)
  37835. y o t
  37836. a
  37837. t
  37838. r
  37839. WED1 WED1
  37840. i B y t t t t
  37841. t
  37842. WEDF WEDF WEDF WEDF
  37843. u
  37844. + s B
  37845.  
  37846.  
  37847. O C u t
  37848. s
  37849. tWDD WDD
  37850. n y C t t t
  37851. c
  37852. WDD WDD tWDD WDD
  37853. e l
  37854. y
  37855. D15–D0
  37856. e
  37857. E ( c (write)
  37858. l
  37859. x T e
  37860. t
  37861. e E (
  37862. tBSD tBSD tBSD
  37863. r D T tBSD
  37864. n E
  37865. a
  37866.  
  37867. l = D
  37868.  
  37869. W 1 =
  37870. tRDYS tRDYH
  37871. ,
  37872.  
  37873. a T 0
  37874. i ,
  37875. t E
  37876. ) T t
  37877. H
  37878. RDYS tRDYH
  37879. E
  37880. t t t t
  37881.  
  37882. DACD DACD DACD DACD
  37883. = H DACKn
  37884.  
  37885. 1 = (DA)
  37886. ,
  37887.  
  37888. 0
  37889. ,
  37890.  
  37891. N
  37892. TED TEH
  37893. o
  37894.  
  37895. W (1) (2)
  37896. a
  37897. i
  37898. t
  37899. ) Note: IO: DACK device
  37900. SA: Single address DMA transfer
  37901. 7
  37902. DA: Dual address DMA transfer
  37903. 4 DACK set to active-high
  37904. 1
  37905.  
  37906. ----------------------- Page 758-----------------------
  37907.  
  37908. 7
  37909. 4
  37910. 2
  37911.  
  37912. Tpci1 Tpci2 Tpci0 Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  37913. F
  37914. i
  37915. g
  37916. CKIO
  37917. u
  37918. r t t t t
  37919. e
  37920. AD AD AD AD
  37921.  
  37922. 2
  37923. A25–A0
  37924. 3
  37925. .
  37926. 5
  37927. 2
  37928. tCSD tCSD tCSD tCSD
  37929. (
  37930. 2
  37931. )
  37932. ( ()
  37933. O P 1
  37934. n C ) t t t t
  37935. P
  37936. RWD RWD RWD RWD
  37937. e M C RD/
  37938. I C M
  37939. n
  37940. t I t t
  37941. e A C
  37942. ICRSD ICRSD
  37943. r
  37944. tICRSD t tICRSD
  37945. I
  37946. ICRSD
  37947. n I A
  37948. a / ()
  37949. l O I
  37950. W /
  37951. B O
  37952. tRDS tRDH t t
  37953. a u
  37954. D15–D0 RDS RDH
  37955. i s B (read)
  37956. t C u
  37957. + s
  37958. tICWSDF tICWSDF tICWSDF
  37959. y
  37960. C
  37961. t t
  37962. O c
  37963. ICWSDF ICWSDF
  37964. l y
  37965. n e
  37966. ()
  37967. c
  37968. e ( l
  37969. T e
  37970. t tWDD
  37971. E
  37972. WDD
  37973.  
  37974. E
  37975. t
  37976. (
  37977. WDD tWDD tWDD
  37978. x D T
  37979. t
  37980. D15–D0
  37981. e E (write)
  37982. r = D
  37983. n
  37984. a 1 =
  37985. tBSD tBSD tBSD
  37986. l ,
  37987.  
  37988. t
  37989. 0
  37990. BSD
  37991. W T ,
  37992. E
  37993. a H T
  37994. i
  37995. t t
  37996. E
  37997. RDYS RDYH
  37998. t
  37999.  
  38000. ) = H
  38001.  
  38002. 1 = t t t
  38003. ,
  38004. IO16S RDYS RDYH
  38005.  
  38006. tIO16H
  38007. 0
  38008. ,
  38009.  
  38010.  
  38011. N t t
  38012. o
  38013. tDACD tDACD tDACD IO16S IO16H tDACD
  38014.  
  38015. W
  38016. DACKn
  38017. (DA)
  38018. a
  38019. i
  38020. t
  38021. )
  38022.  
  38023. (1) (2)
  38024.  
  38025. ----------------------- Page 759-----------------------
  38026.  
  38027. F
  38028. i
  38029. g
  38030. u
  38031. r Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w
  38032. e
  38033.  
  38034. 2
  38035. 3
  38036. CKIO
  38037. .
  38038. 5 t t
  38039. 3
  38040. AD AD
  38041.  
  38042. A25–A1
  38043.  
  38044. P
  38045. C tAD
  38046. M A0
  38047. C
  38048. I
  38049. A
  38050. tCSD tCSD tCSD
  38051.  
  38052.  
  38053. I ()
  38054. /
  38055. O
  38056. t t
  38057. B
  38058. RWD RWD
  38059. u
  38060. RD/
  38061. s
  38062.  
  38063. C tICRSD tICRSD tICRSD
  38064. y
  38065. c ()
  38066. l
  38067. e
  38068. S t t
  38069. (
  38070. RDS RDH
  38071. i
  38072. T
  38073. D15–D0
  38074. z
  38075. i
  38076. E
  38077. (read)
  38078. n
  38079. g D
  38080. tICWSDF tICWSDF tICWSDF tICWSDF
  38081. ) t
  38082. =
  38083. ICWSDF
  38084.  
  38085. 1
  38086. ()
  38087. ,
  38088.  
  38089. T
  38090. tWDD tWDD tWDD
  38091. E
  38092. tWDD tWDD
  38093. H D15–D0
  38094. (write)
  38095. =
  38096.  
  38097. 1
  38098. tBSD tBSD
  38099. ,
  38100.  
  38101. O
  38102. n
  38103.  
  38104. e
  38105. tRDYS tRDYH tRDYS tRDYH
  38106.  
  38107. I
  38108. n
  38109. t
  38110. e
  38111.  
  38112. r
  38113. n
  38114. a
  38115. l
  38116.  
  38117. W t t
  38118. a
  38119. IO16S IO16H
  38120. i
  38121. t
  38122. ,
  38123.  
  38124. B
  38125. u
  38126. 7 s
  38127. 4
  38128. 3
  38129.  
  38130. ----------------------- Page 760-----------------------
  38131.  
  38132. 7
  38133. 4 Tm1 Tmd1w Tmd1 Tm0 Tmd1w Tmd1w Tmd1
  38134. 4 (
  38135. 2
  38136. )
  38137. CKIO
  38138. M F
  38139. i
  38140. P g
  38141. tFMD tFMD tFMD tFMD
  38142. X u
  38143. r /
  38144. B e tRDS tRDS
  38145. a 2 t t t t t t
  38146. s 3
  38147. WDD WDD RDH WDD WDD RDH
  38148. i .
  38149. c 5
  38150. D63–D0 A D0 A D0
  38151. 4
  38152. B
  38153. u
  38154. s ( t t t t
  38155. 1
  38156. CSD CSD CSD CSD
  38157. C )
  38158. y M
  38159.  
  38160. c
  38161. l P
  38162. e
  38163. tRWD tRWD tRWD tRWD
  38164. : X
  38165. R B
  38166. e
  38167. a
  38168. RD/
  38169. a
  38170. d s
  38171. i
  38172. c t t t t
  38173. (
  38174. WED1 WED1 WED1 WED1
  38175. 1 B
  38176. s
  38177. t u
  38178. s
  38179. D
  38180. t t
  38181.  
  38182. t t RDYS RDYH
  38183. C
  38184. RDYS RDYH
  38185. a
  38186. t y
  38187. a c
  38188. : l
  38189. t t
  38190. e
  38191. t RDYS RDYH
  38192. O :
  38193. BSD t t
  38194.  
  38195. t BSD BSD
  38196. n R
  38197. BSD
  38198. e e
  38199. a
  38200.  
  38201. I
  38202. n d
  38203. t
  38204. e (
  38205. t t
  38206. 1
  38207. DACD DACD t t
  38208. r
  38209. DACD DACD
  38210. n s
  38211. t
  38212. a
  38213. DACKn
  38214. l D (DA)
  38215. W a
  38216. t
  38217. a a
  38218. :
  38219. i
  38220. t O (1) (2)
  38221. + n
  38222. O e 1st data bus cycle information 1st data bus cycle information
  38223. n I D63–D61: Access size D63–D61: Access size
  38224. e n
  38225. t 000: Byte 000: Byte
  38226. E e
  38227. r 001: Word (2 bytes) 001: Word (2 bytes)
  38228. x n
  38229. t
  38230. a
  38231. 010: Long (4 bytes) 010: Long (4 bytes)
  38232. e
  38233. r l 011: Quad (8 bytes) 011: Quad (8 bytes)
  38234. n W 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38235. a
  38236. l a D25–D0: Address D25–D0: Address
  38237. W i
  38238. t
  38239. )
  38240. a Note: IO: DACK device
  38241. i
  38242. t SA: Single address DMA transfer
  38243. ) DA: Dual address DMA transfer
  38244.  
  38245. DACK set to active-high
  38246.  
  38247. ----------------------- Page 761-----------------------
  38248.  
  38249. (
  38250. 3
  38251. )
  38252.  
  38253. M
  38254. P
  38255. Tm1 Tmd1 Tm1 Tmd1w Tmd1 Tm1 Tmd1w Tmd1w Tmd1
  38256. X
  38257. B F CKIO
  38258. i
  38259. a ( g
  38260. 2
  38261. t t
  38262. s u
  38263. tFMD tFMD FMD FMD tFMD tFMD
  38264. i )
  38265. c r
  38266. M e
  38267. /
  38268.  
  38269. B P 2
  38270. u 3 t t t t t t t t t
  38271. X
  38272. WDD WDD WDD WDD WDD WDD WDD WDD WDD
  38273. s .
  38274. 5 D63–D0
  38275. C
  38276. A D0 A D0 A D0
  38277. B 5
  38278. y a
  38279. c s ( t t t t t t
  38280. l
  38281. CSD CSD CSD CSD CSD CSD
  38282. e i 1
  38283. c
  38284. : )
  38285.  
  38286.  
  38287. W B M
  38288. u
  38289. tRWD tRWD tRWD
  38290. r s P t t t
  38291. i
  38292. RWD RWD RWD
  38293. t C X
  38294. e
  38295. y B
  38296. RD/
  38297. ( c
  38298. 1 l a
  38299. e
  38300. t t t t t t
  38301. s s
  38302. WED1 WED1 WED1 WED1 WED1 WED1
  38303. t : i
  38304. c
  38305.  
  38306. D W B
  38307. a
  38308. t t
  38309. r u
  38310. RDYS RDYH
  38311. t
  38312. t t t t
  38313. i
  38314. RDYS RDYH RDYS RDYH
  38315. a t s
  38316. : e
  38317. C
  38318. O
  38319.  
  38320. (
  38321. t t
  38322. y
  38323. RDYS RDYH
  38324. 1
  38325. t tBSD tBSD
  38326. n c
  38327. BSD
  38328. s t t t
  38329. e t l
  38330. BSD BSD BSD
  38331. e
  38332. I D :
  38333. n a W
  38334. t t
  38335. e a r
  38336. tDACD tDACD t t tDACD t
  38337. r
  38338. DACD DACD DACD
  38339. : i
  38340. n t
  38341. a O e DACKn
  38342. l n ( (DA)
  38343. W e 1
  38344. s
  38345. I t
  38346. a n D
  38347. i
  38348. t t
  38349. e a
  38350. + r t (1) (2) (3)
  38351. n a
  38352. O a :
  38353. n l N 1st data bus cycle information 1st data bus cycle information 1st data bus cycle information
  38354. e W o D63–D61: Access size D63–D61: Access size D63–D61: Access size
  38355. E a W 000: Byte 000: Byte 000: Byte
  38356. x i
  38357. t t a 001: Word (2 bytes) 001: Word (2 bytes) 001: Word (2 bytes)
  38358. )
  38359. e i
  38360. r t 010: Long (4 bytes) 010: Long (4 bytes) 010: Long (4 bytes)
  38361. )
  38362. n 011: Quad (8 bytes) 011: Quad (8 bytes) 011: Quad (8 bytes)
  38363. a
  38364. l 1xx: Burst (32 bytes) 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38365.  
  38366. W D25–D0: Address D25–D0: Address D25–D0: Address
  38367. a
  38368. i
  38369. t
  38370. 7 )
  38371. 4
  38372. 5
  38373.  
  38374. ----------------------- Page 762-----------------------
  38375.  
  38376. 7
  38377. 4
  38378. 6
  38379.  
  38380. F
  38381. i
  38382. g
  38383. u
  38384. r Tm1 Tmd1w Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  38385. e
  38386.  
  38387. 2
  38388. (
  38389. CKIO
  38390. 2 3
  38391. .
  38392. ) 5 tFMD tFMD tFMD tFMD
  38393. M 6 /
  38394. P (
  38395. X 1 tWDD tWDD tRDS tRDH tWDD tWDD tRDS tRDH
  38396. )
  38397. B
  38398. D63–D0
  38399. 2
  38400. A D0 D1 D2 D3 A D0 D1 D2 D3
  38401. n u M
  38402. d s 2 P t t t t
  38403. /
  38404. CSD CSD CSD CSD
  38405. 3 C n X
  38406. r d
  38407. y
  38408.  
  38409. d / B
  38410. / c 3 t
  38411. l r u
  38412. RWD
  38413. 4 e t t t
  38414. d s
  38415. RWD RWD
  38416. t
  38417. RWD
  38418. :
  38419. h / C
  38420. B 4 RD/
  38421. D u t y
  38422. a r h c t t t t
  38423. l
  38424. WED1 WED1 WED1 WED1
  38425. t s D e
  38426. a t
  38427.  
  38428. : a :
  38429. R
  38430. t t
  38431. t B
  38432. RDYH RDYS
  38433. E e a u tRDYS tRDYH tRDYS tRDYH
  38434. x a : r
  38435. t d N s
  38436. e
  38437.  
  38438. t
  38439. r ( o
  38440. tBSD tBSD
  38441. n 1 I R t t
  38442. s
  38443. BSD BSD
  38444. a t n e
  38445. l t a
  38446. W D e d
  38447. a r
  38448. n (
  38449. t t t t
  38450. a t
  38451. DACD DACD DACD DACD
  38452. i a a 1
  38453. t : l s
  38454. t
  38455. DACKn
  38456.  
  38457. C N W D (DA)
  38458. o o a a
  38459. n I i t
  38460. t n t a
  38461. r ) :
  38462. o t
  38463. l e O (1) (2)
  38464. ) r
  38465. n n 1st data bus cycle information 1st data bus cycle information
  38466. a e
  38467. l D63–D61: Access size D63–D61: Access size
  38468. I
  38469. W n 000: Byte 000: Byte
  38470. t
  38471. a e 001: Word (2 bytes) 001: Word (2 bytes)
  38472. i r
  38473. t n
  38474. 010: Long (4 bytes) 010: Long (4 bytes)
  38475. ;
  38476. a 011: Quad (8 bytes) 011: Quad (8 bytes)
  38477. l
  38478. 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38479. W D25–D0: Address D25–D0: Address
  38480. a
  38481. i
  38482. t
  38483. ;
  38484.  
  38485. ----------------------- Page 763-----------------------
  38486.  
  38487. F
  38488. i
  38489. g
  38490. u
  38491. Tm1 Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  38492. r
  38493. e
  38494. CKIO
  38495. ( 2
  38496. 2 2 3
  38497. n )
  38498. t t t
  38499. .
  38500. FMD FMD tFMD FMD
  38501. d 5
  38502. / M 7 /
  38503. 3
  38504. r P
  38505. d X (
  38506. tWDD t tWDD t
  38507. 1
  38508. WDD WDD
  38509. /
  38510.  
  38511. 4 )
  38512. D63–D0
  38513. t B A D0 D1 D2 D3 A D0 D1 D2 D3
  38514. h u M
  38515. s
  38516. D P
  38517. t t t t
  38518. 2
  38519. CSD CSD CSD CSD
  38520. a C n X
  38521. t y d
  38522.  
  38523. a c / B
  38524. : l 3
  38525. t t
  38526. u
  38527. RWD
  38528. e
  38529. RWD
  38530.  
  38531. N : r s t t
  38532. d
  38533. RWD RWD
  38534.  
  38535. o B / C
  38536. 4
  38537. u
  38538. RD/
  38539. I t y
  38540. n r h c
  38541. t s l
  38542. tWED1 tWED1 tWED1 tWED1
  38543. e t D e
  38544. r :
  38545.  
  38546. n W a B
  38547. t
  38548. t t
  38549. a
  38550. RDYH
  38551. r a
  38552. RDYS
  38553. l i : u tRDYS tRDYH tRDYS tRDYH
  38554. t r
  38555. W e N s
  38556. t
  38557. ( o
  38558.  
  38559. a 1 W t t
  38560. i BSD BSD
  38561. t s I t t
  38562. t n r
  38563. BSD BSD
  38564. + t i
  38565. D e t
  38566. E a r e
  38567. x t n (
  38568. a a 1
  38569. t t t
  38570. t
  38571. DACD DACD tDACD DACD
  38572. e : l s
  38573. r O W t
  38574. n
  38575. DACKn
  38576. a n a D (DA)
  38577. l e i a
  38578. t
  38579. W I t a
  38580. )
  38581. n :
  38582. a t O
  38583. i e
  38584. t r n (1) (2)
  38585. C n e
  38586. a 1st data bus cycle information 1st data bus cycle information
  38587. o l I
  38588. n n D63–D61: Access size D63–D61: Access size
  38589. t W t
  38590. r e 000: Byte 000: Byte
  38591. o a r
  38592. i n
  38593. 001: Word (2 bytes) 001: Word (2 bytes)
  38594. l
  38595. ) t
  38596. ; a 010: Long (4 bytes) 010: Long (4 bytes)
  38597. l
  38598. 011: Quad (8 bytes) 011: Quad (8 bytes)
  38599. W 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38600. a
  38601. i
  38602. D25–D0: Address D25–D0: Address
  38603. t
  38604. ;
  38605.  
  38606. 7
  38607. 4
  38608. 7
  38609.  
  38610. ----------------------- Page 764-----------------------
  38611.  
  38612. 7
  38613. 4
  38614. 8
  38615. T1 T2 T1 Tw T2 T1 Tw Twe T2
  38616.  
  38617. CKIO
  38618.  
  38619. tAD tAD tAD tAD tAD tAD
  38620.  
  38621. A25–A0
  38622. (
  38623. 3
  38624. )
  38625. tCSD tCSD tCSD tCSD tCSD tCSD
  38626.  
  38627. B F
  38628. a i
  38629. s g
  38630. i u
  38631. c r tRWD tRWD tRWD tRWD tRWD tRWD
  38632. R e RD/
  38633. e ( 2
  38634. a 2 3
  38635. d ) . t t t t t t t t t
  38636. 5
  38637. RSD RSD RSD RSD RSD RSD RSD RSD RSD
  38638. B 8
  38639. C a (
  38640. y s 1
  38641. c i ) M
  38642. c
  38643. t t t t t t
  38644. l
  38645. RDS RDH RDS RDH RDS RDH
  38646. e B
  38647. D63–D0
  38648. ( R a e
  38649. m
  38650. (read) t
  38651. O e s
  38652. WED1 tWED1 tWED1
  38653. a i o
  38654. n d c
  38655. t t t t t t
  38656. r
  38657. WEDF WED1 WEDF WED1 WEDF WED1
  38658.  
  38659. e R y
  38660. C
  38661.  
  38662. I e
  38663. n y a B
  38664. t c d y
  38665. t t t
  38666. e l
  38667. BSD BSD BSD
  38668. t
  38669. r e C e
  38670. tBSD t t
  38671.  
  38672. BSD BSD
  38673. n (
  38674. a O y C
  38675. c
  38676.  
  38677. l n l o
  38678. W e e n t t t
  38679. t
  38680. RDYS RDYS RDYH
  38681. (
  38682. r
  38683. t
  38684. a I N
  38685. RDYH
  38686. i n o
  38687. t t o l
  38688. + e W S t t
  38689. r
  38690. RDYS RDYH
  38691. R
  38692. t t
  38693.  
  38694. t t t
  38695. n
  38696. DACD DACD DACD DACD DACD
  38697. O a a A tDACD tDACD tDACD tDACD
  38698. i
  38699. n l t M
  38700. )
  38701. DACKn
  38702. e W (SA: IO ← memory)
  38703. E a B
  38704. x i u
  38705. t t
  38706. s
  38707. t t
  38708. )
  38709. t
  38710. e
  38711. tDACD tDACD tDACD DACD DACD DACD
  38712.  
  38713. r C
  38714. n DACKn
  38715. a y (DA)
  38716. l c
  38717. l
  38718. W e
  38719. s
  38720. a
  38721. i
  38722. t
  38723. )
  38724.  
  38725. (1) (2) (3)
  38726.  
  38727. Note: IO: DACK device
  38728. SA: Single address DMA transfer
  38729. DA: Dual address DMA transfer
  38730. DACK set to active-high
  38731.  
  38732. ----------------------- Page 765-----------------------
  38733.  
  38734. TS1 T1 T2 TH1
  38735.  
  38736. CKIO
  38737.  
  38738. tAD tAD
  38739.  
  38740. A25–A0
  38741.  
  38742. tCSD tCSD
  38743.  
  38744.  
  38745.  
  38746. tRWD tRWD
  38747.  
  38748. RD/
  38749.  
  38750. tRSD tRSD tRSD
  38751.  
  38752.  
  38753.  
  38754. D63–D0 tRDS tRDH
  38755.  
  38756. (read)
  38757. tWED1
  38758. tWEDF tWED1
  38759.  
  38760.  
  38761.  
  38762. tBSD
  38763. tBSD
  38764.  
  38765.  
  38766.  
  38767.  
  38768.  
  38769. tDACD tDACD
  38770. DACKn
  38771. (SA: IO ← memory)
  38772.  
  38773. tDACD tDACD
  38774.  
  38775. DACKn
  38776. (DA)
  38777.  
  38778. Figure 23.59 Memory Byte Control SRAM Bus Cycle: Basic Read Cycle (No Wait,
  38779. Address Setup/Hold Time Insertion, AnS = 1, AnH = 1)
  38780.  
  38781. 749
  38782.  
  38783. ----------------------- Page 766-----------------------
  38784.  
  38785. 23.3.4 Peripheral Module Signal Timing
  38786.  
  38787. Table 23.8 Peripheral Module Signal Timing
  38788. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2
  38789. DDQ DD a L
  38790.  
  38791. on)
  38792.  
  38793. 66 MHz 83 MHz 100 MHz
  38794.  
  38795. Module Item Symbol Min Max Min M ax Min Ma x Unit Figure
  38796.  
  38797. TMU, Timer clock pulse tTCLKWH 4 — 4 — 4 — Pcyc* 23.60
  38798. RTC width (high)
  38799.  
  38800. Timer clock pulse tTCLKWL 4 — 4 — 4 — Pcyc* 23.60
  38801. width (low)
  38802.  
  38803. Timer clock rise tTCLKr — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38804. time
  38805.  
  38806. Timer clock fall tTCLKf — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38807. time
  38808.  
  38809. Oscillation settling tROSC — 3 — 3 — 3 s 23.61
  38810. time
  38811.  
  38812. SCI Input clock cycle tScyc 4 — 4 — 4 — Pcyc* 23.62
  38813. (asynchronous)
  38814.  
  38815. Input clock cycle tScyc 6 — 6 — 6 — Pcyc* 23.62
  38816. (synchronous)
  38817.  
  38818. Input clock pulse tSCKW 0.4 0.6 0.4 0.6 0.4 0.6 tScyc 23.62
  38819. width
  38820.  
  38821. Input clock rise tSCKr — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38822. time
  38823.  
  38824. Input clock fall tSCKf — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38825. time
  38826.  
  38827. Transfer data t — 30 — 30 — 30 ns 23.63
  38828. TXD
  38829.  
  38830. delay time
  38831.  
  38832. Receive data tRXS 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38833. setup time
  38834. (synchronous)
  38835.  
  38836. Receive data tRXH 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38837. hold time
  38838. (synchronous)
  38839.  
  38840. 750
  38841.  
  38842. ----------------------- Page 767-----------------------
  38843.  
  38844. Table 23.8 Peripheral Module Signal Timing (cont)
  38845. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2
  38846. DDQ DD a L
  38847.  
  38848. on)
  38849.  
  38850. 66 MHz 83 MHz 1 0 0
  38851. MH z
  38852.  
  38853. Module Item Symbo Min M a Min M a Min M a Unit Figure Note
  38854. l x x x
  38855.  
  38856. I/O ports Output data delay tPORTD — 10 — 8 — 6 ns 23.64
  38857. time
  38858.  
  38859. Input data setup tPORTS 2 — 2 — 2 — ns 23.64 BGABGA
  38860. time
  38861.  
  38862. 3.5 — 3.5 — — — ns QFPQFP
  38863.  
  38864. Input data hold tPORTH 1.5 — 1.5 — 1.5 — ns 23.64
  38865. time
  38866.  
  38867. DMAC setup time tDRQS 2 — 2 — 2 — ns 23.65 BGABGA
  38868.  
  38869. 3.5 — 3.5 — — — ns QFPQFP
  38870.  
  38871. hold time tDRQH 1.5 — 1.5 — 1.5 — ns 23.65
  38872.  
  38873. DRAKn delay time tDRAKD — 10 — 8 — 6 ns 23.65
  38874.  
  38875. Hitachi- Input clock cycle tTCKcyc 50 — 50 — 50 — ns 23.66
  38876. UDI
  38877.  
  38878. Input clock pulse tTCKH 15 — 15 — 15 — ns 23.66
  38879. width (high)
  38880.  
  38881. Input clock pulse tTCKL 15 — 15 — 15 — ns 23.66
  38882. width (low)
  38883.  
  38884. Input clock rise tTCKr — 10 — 10 — 10 ns 23.66
  38885. time
  38886.  
  38887. Input clock fall tTCKf — 10 — 10 — 10 ns 23.66
  38888. time
  38889.  
  38890. Hitachi- setup t 10 — 10 — 10 — t 23.67
  38891. ASEBRKS cyc
  38892.  
  38893. UDI time
  38894.  
  38895. hold time t 10 — 10 — 10 — t 23.67
  38896. ASEBRKH cyc
  38897.  
  38898. TDI/TMS setup tTDIS 15 — 15 — 15 — ns 23.68
  38899. time
  38900.  
  38901. TDI/TMS hold time t 15 — 15 — 15 — ns 23.68
  38902. TDIH
  38903.  
  38904. TDO delay time tTDO 0 10 0 10 0 10 ns 23.68
  38905.  
  38906. ASE-PINBRK tPINBRK 2 — 2 — 2 — Pcyc 23.69
  38907. pulse width *
  38908.  
  38909. Note: * Pcyc: P clock cycles
  38910.  
  38911. 751
  38912.  
  38913. ----------------------- Page 768-----------------------
  38914.  
  38915. TCLK
  38916.  
  38917. tTCLKWH tTCLKWL
  38918. tTCLKf tTCLKr
  38919.  
  38920. Figure 23.60 TCLK Input Timing
  38921.  
  38922. Stable oscillation
  38923.  
  38924. RTC internal clock
  38925.  
  38926. V
  38927. cc
  38928. V min
  38929. cc tROSC
  38930.  
  38931. Figure 23.61 RTC Oscillation Settling Time at Power-On
  38932.  
  38933. tSCKW
  38934.  
  38935. SCK, SCK2
  38936.  
  38937. t
  38938. Scyc
  38939. tSCKf tSCKr
  38940.  
  38941. Figure 23.62 SCK Input Clock Timing
  38942.  
  38943. 752
  38944.  
  38945. ----------------------- Page 769-----------------------
  38946.  
  38947. t
  38948. Scyc
  38949.  
  38950. SCK
  38951.  
  38952. tTXD tTXD
  38953.  
  38954. TXD
  38955.  
  38956. RXD
  38957.  
  38958. tRXS tRXH
  38959.  
  38960. Figure 23.63 SCI I/O Synchronous Mode Clock Timing
  38961.  
  38962. CKIO
  38963.  
  38964. Ports 19–0
  38965. (read)
  38966.  
  38967. tPORTS tPORTH
  38968.  
  38969. tPORTD tPORTD
  38970. Ports 19–0
  38971. (write)
  38972.  
  38973. Figure 23.64 I/O Port Input/Output Timing
  38974.  
  38975. CKIO
  38976.  
  38977. tDRQH tDRQH
  38978.  
  38979.  
  38980.  
  38981. tDRQS tDRQS
  38982.  
  38983. tDRAKD
  38984. DRAKn
  38985.  
  38986. Figure 23.65 /DRAK Timing
  38987.  
  38988. 753
  38989.  
  38990. ----------------------- Page 770-----------------------
  38991.  
  38992. tTCKcyc
  38993.  
  38994. tTCKH tTCKL
  38995.  
  38996. VIH VIH VIH
  38997. 1/2VDDQ 1/2VDDQ
  38998.  
  38999. VIL VIL
  39000.  
  39001. tTCKf tTCKr
  39002.  
  39003. Note: When clock is input from TCK pin
  39004.  
  39005. Figure 23.66 TCK Input Timing
  39006.  
  39007.  
  39008.  
  39009. SCK2/
  39010.  
  39011.  
  39012. tASEBRKS tASEBRKH tASEBRKS tASEBRKH
  39013.  
  39014. /
  39015. BRKACK
  39016.  
  39017. Figure 23.67 Reset Hold Timing
  39018.  
  39019. t
  39020. TCK TCKcyc
  39021.  
  39022. TDI tTDIS tTDIH
  39023. TMS
  39024.  
  39025. tTDO
  39026. TDO
  39027.  
  39028. Figure 23.68 Hitachi-UDI Data Transfer Timing
  39029.  
  39030. tPINBRK
  39031.  
  39032.  
  39033.  
  39034. Figure 23.69 Pin Break Timing
  39035.  
  39036. 754
  39037.  
  39038. ----------------------- Page 771-----------------------
  39039.  
  39040. 23.3.5 AC Characteristic Test Conditions
  39041.  
  39042. The AC characteristic test conditions are as follows:
  39043.  
  39044. • Input/output signal reference level: 1.5 V (VDDQ = 3.3 ±0.3 V)
  39045.  
  39046. • Input pulse level: VSSQ –3.0 V (VSSQ –VDDQ for , , NMI, and
  39047. /BRKACK)
  39048.  
  39049. • Input rise/fall time: 1 ns
  39050.  
  39051. The output load circuit is shown in figure 23.70.
  39052.  
  39053. IOL
  39054.  
  39055. LSI output pin DUT output
  39056.  
  39057. CL VREF
  39058.  
  39059. IOH
  39060.  
  39061. Notes: 1. C is the total value, including the capacitance of the test jig, etc.
  39062. L
  39063. The capacitance of each pin is set to 30 pF.
  39064. 2. IOL and IOH values are as shown in table 23.3, Permissible Output Currents.
  39065.  
  39066. Figure 23.70 Output Load Circuit
  39067.  
  39068. 755
  39069.  
  39070. ----------------------- Page 772-----------------------
  39071.  
  39072. 23.3.6 Delay Time Variation Due to Load Capacitance
  39073.  
  39074. A graph (reference data) of the variation in delay time when a load capacitance greater than
  39075. that stipulated (30 pF) is connected to the SH7750’s pins is shown below. The graph shown in
  39076. figure 23.71 should be taken into consideration if the stipulated capacitance is exceeded
  39077. when connecting an external device.
  39078.  
  39079. The graph will not be linear if the connected load capacitance exceeds the range shown in
  39080. figure 23.71.
  39081.  
  39082. +4.0 ns
  39083.  
  39084. +3.0 ns
  39085.  
  39086. e
  39087. m
  39088. i
  39089. T
  39090. +2.0 ns
  39091. y
  39092. a
  39093. l
  39094. e
  39095. D
  39096.  
  39097. +1.0 ns
  39098.  
  39099. +0.0 ns
  39100. +0 pF +25 pF +50 pF
  39101.  
  39102. Load Capacitance
  39103.  
  39104. Figure 23.71 Load Capacitance vs. Delay Time
  39105.  
  39106. 756
  39107.  
  39108. ----------------------- Page 773-----------------------
  39109.  
  39110. Appendix A Address List
  39111.  
  39112. Table A.1 Address List
  39113.  
  39114. Module Register P4 Address Area 7 Size Power-On Manual Sleep StandbySyncho-
  39115. Address* 1 Reset Reset nization
  39116.  
  39117. Clock
  39118.  
  39119. CCN PTEH H'FF00 0000 H'1F00 0000 32 Undefined Undefined Held Held Iclk
  39120.  
  39121. CCN PTEL H'FF00 0004 H'1F00 0004 32 Undefined Undefined Held Held Iclk
  39122.  
  39123. CCN TTB H'FF00 0008 H'1F00 0008 32 Undefined Undefined Held Held Iclk
  39124.  
  39125. CCN TEA H'FF00 000C H'1F00 000C 32 Undefined Held Held Held Iclk
  39126.  
  39127. CCN MMUCR H'FF00 0010 H'1F00 0010 32 H'0000 0000 H'0000 0000 Held Held Iclk
  39128.  
  39129. CCN BASRA H'FF00 0014 H'1F00 0014 8 Undefined Held Held Held Iclk
  39130.  
  39131. CCN BASRB H'FF00 0018 H'1F00 0018 8 Undefined Held Held Held Iclk
  39132.  
  39133. CCN CCR H'FF00 001C H'1F00 001C 32 H'0000 0000 H'0000 0000 Held Held Iclk
  39134.  
  39135. CCN TRA H'FF00 0020 H'1F00 0020 32 Undefined Undefined Held Held Iclk
  39136.  
  39137. CCN EXPEVT H'FF00 0024 H'1F00 0024 32 H'0000 0000 H'0000 0020 Held Held Iclk
  39138.  
  39139. CCN INTEVT H'FF00 0028 H'1F00 0028 32 Undefined Undefined Held Held Iclk
  39140.  
  39141. CCN PTEA H'FF00 0034 H'1F00 0034 32 Undefined Undefined Held Held Iclk
  39142.  
  39143. CCN QACR0 H'FF00 0038 H'1F00 0038 32 Undefined Undefined Held Held Iclk
  39144.  
  39145. CCN QACR1 H'FF00 003C H'1F00 003C 32 Undefined Undefined Held Held Iclk
  39146.  
  39147. UBC BARA H'FF20 0000 H'1F20 0000 32 Undefined Held Held Held Iclk
  39148.  
  39149. UBC BAMRA H'FF20 0004 H'1F20 0004 8 Undefined Held Held Held Iclk
  39150.  
  39151. UBC BBRA H'FF20 0008 H'1F20 0008 16 H'0000 Held Held Held Iclk
  39152.  
  39153. UBC BARB H'FF20 000C H'1F20 000C 32 Undefined Held Held Held Iclk
  39154.  
  39155. UBC BAMRB H'FF20 0010 H'1F20 0010 8 Undefined Held Held Held Iclk
  39156.  
  39157. UBC BBRB H'FF20 0014 H'1F20 0014 16 H'0000 Held Held Held Iclk
  39158.  
  39159. UBC BDRB H'FF20 0018 H'1F20 0018 32 Undefined Held Held Held Iclk
  39160.  
  39161. UBC BDMRB H'FF20 001C H'1F20 001C 32 Undefined Held Held Held Iclk
  39162.  
  39163. UBC BRCR H'FF20 0020 H'1F20 0020 16 H'0000*2 Held Held Held Iclk
  39164.  
  39165. BSC BCR1 H'FF80 0000 H'1F80 0000 32 H'0000 Held Held Held Bclk
  39166. 0000*2
  39167.  
  39168. BSC BCR2 H'FF80 0004 H'1F80 0004 16 H'3FFC*2 Held Held Held Bclk
  39169.  
  39170. BSC WCR1 H'FF80 0008 H'1F80 0008 32 H'7777 7777 Held Held Held Bclk
  39171.  
  39172. BSC WCR2 H'FF80 000C H'1F80 000C 32 H'FFFE EFFF Held Held Held Bclk
  39173.  
  39174. BSC WCR3 H'FF80 0010 H'1F80 0010 32 H'0777 7777 Held Held Held Bclk
  39175.  
  39176. 757
  39177.  
  39178. ----------------------- Page 774-----------------------
  39179.  
  39180. Table A.1 Address List (cont)
  39181.  
  39182. Module Register P4 Address Area 7 Size Power-On Manual Sleep StandbySynchro-
  39183. Address* 1 Reset Reset nization
  39184.  
  39185. Clock
  39186.  
  39187. BSC MCR H'FF80 0014 H'1F80 0014 32 H'0000 0000 Held Held Held Bclk
  39188.  
  39189. BSC PCR H'FF80 0018 H'1F80 0018 16 H'0000 Held Held Held Bclk
  39190.  
  39191. BSC RTCSR H'FF80 001C H'1F80 001C 16 H'0000 Held Held Held Bclk
  39192.  
  39193. BSC RTCNT H'FF80 0020 H'1F80 0020 16 H'0000 Held Held Held Bclk
  39194.  
  39195. BSC RTCOR H'FF80 0024 H'1F80 0024 16 H'0000 Held Held Held Bclk
  39196.  
  39197. BSC RFCR H'FF80 0028 H'1F80 0028 16 H'0000 Held Held Held Bclk
  39198.  
  39199. BSC PCTRA H'FF80 002C H'1F80 002C 32 H'0000 0000 Held Held Held Bclk
  39200.  
  39201. BSC PDTRA H'FF80 0030 H'1F80 0030 16 Undefined Held Held Held Bclk
  39202.  
  39203. BSC PCTRB H'FF80 0040 H'1F80 0040 32 H'0000 0000 Held Held Held Bclk
  39204.  
  39205. BSC PDTRB H'FF80 0044 H'1F80 0044 16 Undefined Held Held Held Bclk
  39206.  
  39207. BSC GPIOIC H'FF80 0048 H'1F80 0048 16 H'0000 0000 Held Held Held Bclk
  39208.  
  39209. BSC SDMR2 H'FF90 xxxx H'1F90 xxxx 8 Write-only Bclk
  39210.  
  39211. BSC SDMR3 H'FF94 xxxx H'1F94 xxxx 8 Bclk
  39212.  
  39213. DMAC SAR0 H'FFA0 0000 H'1FA0 0000 32 Undefined Undefined Held Held Bclk
  39214.  
  39215. DMAC DAR0 H'FFA0 0004 H'1FA0 0004 32 Undefined Undefined Held Held Bclk
  39216.  
  39217. DMAC DMATCR0 H'FFA0 0008 H'1FA0 0008 32 Undefined Undefined Held Held Bclk
  39218.  
  39219. DMAC CHCR0 H'FFA0 000C H'1FA0 000C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39220.  
  39221. DMAC SAR1 H'FFA0 0010 H'1FA0 0010 32 Undefined Undefined Held Held Bclk
  39222.  
  39223. DMAC DAR1 H'FFA0 0014 H'1FA0 0014 32 Undefined Undefined Held Held Bclk
  39224.  
  39225. DMAC DMATCR1 H'FFA0 0018 H'1FA0 0018 32 Undefined Undefined Held Held Bclk
  39226.  
  39227. DMAC CHCR1 H'FFA0 001C H'1FA0 001C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39228.  
  39229. DMAC SAR2 H'FFA0 0020 H'1FA0 0020 32 Undefined Undefined Held Held Bclk
  39230.  
  39231. DMAC DAR2 H'FFA0 0024 H'1FA0 0024 32 Undefined Undefined Held Held Bclk
  39232.  
  39233. DMAC DMATCR2 H'FFA0 0028 H'1FA0 0028 32 Undefined Undefined Held Held Bclk
  39234.  
  39235. DMAC CHCR2 H'FFA0 002C H'1FA0 002C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39236.  
  39237. DMAC SAR3 H'FFA0 0030 H'1FA0 0030 32 Undefined Undefined Held Held Bclk
  39238.  
  39239. DMAC DAR3 H'FFA0 0034 H'1FA0 0034 32 Undefined Undefined Held Held Bclk
  39240.  
  39241. DMAC DMATCR3 H'FFA0 0038 H'1FA0 0038 32 Undefined Undefined Held Held Bclk
  39242.  
  39243. DMAC CHCR3 H'FFA0 003C H'1FA0 003C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39244.  
  39245. DMAC DMAOR H'FFA0 0040 H'1FA0 0040 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39246.  
  39247. 758
  39248.  
  39249. ----------------------- Page 775-----------------------
  39250.  
  39251. Table A.1 Address List (cont)
  39252.  
  39253. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  39254. Address* 1 Reset Reset nization
  39255.  
  39256. Clock
  39257.  
  39258. CPG FRQCR H'FFC0 0000 H'1FC0 0000 16 *2 Held Held Held Pclk
  39259.  
  39260. CPG STBCR H'FFC0 0004 H'1FC0 0004 8 H'00 Held Held Held Pclk
  39261.  
  39262. CPG WTCNT H'FFC0 0008 H'1FC0 0008 8/16* 3 H'00 Held Held Held Pclk
  39263.  
  39264. CPG WTCSR H'FFC0 000C H'1FC0 000C 8/16* 3 H'00 Held Held Held Pclk
  39265.  
  39266. CPG STBCR2 H'FFC0 0010 H'1FC0 0010 8 H'00 Held Held Held Pclk
  39267.  
  39268. RTC R64CNT H'FFC8 0000 H'1FC8 0000 8 Held Held Held Held Pclk
  39269.  
  39270. RTC RSECCNT H'FFC8 0004 H'1FC8 0004 8 Held Held Held Held Pclk
  39271.  
  39272. RTC RMINCNT H'FFC8 0008 H'1FC8 0008 8 Held Held Held Held Pclk
  39273.  
  39274. RTC RHRCNT H'FFC8 000C H'1FC8 000C 8 Held Held Held Held Pclk
  39275.  
  39276. RTC RWKCNT H'FFC8 0010 H'1FC8 0010 8 Held Held Held Held Pclk
  39277.  
  39278. RTC RDAYCNT H'FFC8 0014 H'1FC8 0014 8 Held Held Held Held Pclk
  39279.  
  39280. RTC RMONCNT H'FFC8 0018 H'1FC8 0018 8 Held Held Held Held Pclk
  39281.  
  39282. RTC RYRCNT H'FFC8 001C H'1FC8 001C 16 Held Held Held Held Pclk
  39283.  
  39284. RTC RSECAR H'FFC8 0020 H'1FC8 0020 8 Held *2 Held Held Held Pclk
  39285.  
  39286. RTC RMINAR H'FFC8 0024 H'1FC8 0024 8 Held *2 Held Held Held Pclk
  39287.  
  39288. RTC RHRAR H'FFC8 0028 H'1FC8 0028 8 Held *2 Held Held Held Pclk
  39289.  
  39290. RTC RWKAR H'FFC8 002C H'1FC8 002C 8 Held *2 Held Held Held Pclk
  39291.  
  39292. RTC RDAYAR H'FFC8 0030 H'1FC8 0030 8 Held *2 Held Held Held Pclk
  39293.  
  39294. RTC RMONAR H'FFC8 0034 H'1FC8 0034 8 Held *2 Held Held Held Pclk
  39295.  
  39296. RTC RCR1 H'FFC8 0038 H'1FC8 0038 8 H'00*2 H'00*2 Held Held Pclk
  39297.  
  39298. RTC RCR2 H'FFC8 003C H'1FC8 003C 8 H'09*2 H'00*2 Held Held Pclk
  39299.  
  39300. INTC ICR H'FFD0 0000 H'1FD0 0000 16 H'0000*2 H'0000*2 Held Held Pclk
  39301.  
  39302. INTC IPRA H'FFD0 0004 H'1FD0 0004 16 H'0000 H'0000 Held Held Pclk
  39303.  
  39304. INTC IPRB H'FFD0 0008 H'1FD0 0008 16 H'0000 H'0000 Held Held Pclk
  39305.  
  39306. INTC IPRC H'FFD0 000C H'1FD0 000C 16 H'0000 H'0000 Held Held Pclk
  39307.  
  39308. TMU TOCR H'FFD8 0000 H'1FD8 0000 8 H'00 H'00 Held Held Pclk
  39309.  
  39310. TMU TSTR H'FFD8 0004 H'1FD8 0004 8 H'00 H'00 Held H'00*2 Pclk
  39311.  
  39312. TMU TCOR0 H'FFD8 0008 H'1FD8 0008 32 H'FFFF FFFFH'FFFF FFFF Held Held Pclk
  39313.  
  39314. TMU TCNT0 H'FFD8 000C H'1FD8 000C 32 H'FFFF FFFFH'FFFF FFFF Held Held Pclk
  39315.  
  39316. TMU TCR0 H'FFD8 0010 H'1FD8 0010 16 H'0000 H'0000 Held Held Pclk
  39317.  
  39318. 759
  39319.  
  39320. ----------------------- Page 776-----------------------
  39321.  
  39322. Table A.1 Address List (cont)
  39323.  
  39324. Module RegisterP4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  39325. Address* 1 Reset Reset nization
  39326.  
  39327. Clock
  39328.  
  39329. TMU TCOR1 H'FFD8 0014 H'1FD8 0014 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39330.  
  39331. TMU TCNT1 H'FFD8 0018 H'1FD8 0018 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39332.  
  39333. TMU TCR1 H'FFD8 001C H'1FD8 001C 16 H'0000 H'0000 Held Held Pclk
  39334.  
  39335. TMU TCOR2 H'FFD8 0020 H'1FD8 0020 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39336.  
  39337. TMU TCNT2 H'FFD8 0024 H'1FD8 0024 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39338.  
  39339. TMU TCR2 H'FFD8 0028 H'1FD8 0028 16 H'0000 H'0000 Held Held Pclk
  39340.  
  39341. TMU TCPR2 H'FFD8 002C H'1FD8 002C 32 Held Held Held Held Pclk
  39342.  
  39343. SCI SCSMR1 H'FFE0 0000 H'1FE0 0000 8 H'00 H'00 Held H'00 Pclk
  39344.  
  39345. SCI SCBRR1 H'FFE0 0004 H'1FE0 0004 8 H'FF H'FF Held H'FF Pclk
  39346.  
  39347. SCI SCSCR1 H'FFE0 0008 H'1FE0 0008 8 H'00 H'00 Held H'00 Pclk
  39348.  
  39349. SCI SCTDR1 H'FFE0 000C H'1FE0 000C 8 H'FF H'FF Held H'FF Pclk
  39350.  
  39351. SCI SCSSR1 H'FFE0 0010 H'1FE0 0010 8 H'84 H'84 Held H'84 Pclk
  39352.  
  39353. SCI SCRDR1 H'FFE0 0014 H'1FE0 0014 8 H'00 H'00 Held H'00 Pclk
  39354.  
  39355. SCI SCSCMR1 H'FFE0 0018 H'1FE0 0018 8 H'00 H'00 Held H'00 Pclk
  39356.  
  39357. SCI SCSPTR1 H'FFE0 001C H'1FE0 001C 8 H'00*2 H'00*2 Held H'00*2 Pclk
  39358.  
  39359. SCIF SCSMR2 H'FFE8 0000 H'1FE8 0000 16 H'0000 H'0000 Held Held Pclk
  39360.  
  39361. SCIF SCBRR2 H'FFE8 0004 H'1FE8 0004 8 H'FF H'FF Held Held Pclk
  39362.  
  39363. SCIF SCSCR2 H'FFE8 0008 H'1FE8 0008 16 H'0000 H'0000 Held Held Pclk
  39364.  
  39365. SCIF SCFTDR2 H'FFE8 000C H'1FE8 000C 8 Undefined Undefined Held Held Pclk
  39366.  
  39367. SCIF SCFSR2 H'FFE8 0010 H'1FE8 0010 16 H'0060 H'0060 Held Held Pclk
  39368.  
  39369. SCIF SCFRDR2 H'FFE8 0014 H'1FE8 0014 8 Undefined Undefined Held Held Pclk
  39370.  
  39371. SCIF SCFCR2 H'FFE8 0018 H'1FE8 0018 16 H'0000 H'0000 Held Held Pclk
  39372.  
  39373. SCIF SCFDR2 H'FFE8 001C H'1FE8 001C 16 H'0000 H'0000 Held Held Pclk
  39374.  
  39375. SCIF SCSPTR2 H'FFE8 0020 H'1FE8 0020 16 H'0000*2 H'0000*2 Held Held Pclk
  39376.  
  39377. SCIF SCLSR2 H'FFE8 0024 H'1FE8 0024 16 H'0000 H'0000 Held Held Pclk
  39378.  
  39379. Hitachi- SDIR H'FFF0 0000 H'1FF0 0000 16 H'FFFF*2 Held Held Held Pclk
  39380.  
  39381. UDI
  39382.  
  39383. Hitachi- SDDR H'FFF0 0008 H'1FF0 0008 32 Held Held Held Held Pclk
  39384. UDI
  39385.  
  39386. Notes: 1. With control registers, the above addresses in the physical page number field can be
  39387. accessed by means of a TLB setting. When these addresses are referenced directly
  39388. without using the TLB, operations are limited.
  39389.  
  39390. 760
  39391.  
  39392. ----------------------- Page 777-----------------------
  39393.  
  39394. 2. Includes undefined bits. See the descriptions of the individual modules.
  39395. 3. Use word-size access when writing. Perform the write with the upper byte set to H'5A or
  39396. H'A5, respectively. Byte- and longword-size writes cannot be used.
  39397. Use byte-size access when reading.
  39398.  
  39399. 761
  39400.  
  39401. ----------------------- Page 778-----------------------
  39402.  
  39403. Appendix B Package Dimensions
  39404.  
  39405. Unit :mm
  39406.  
  39407. 4× 0.20
  39408.  
  39409. 27.0
  39410. A 20 18 16 14 12 10 8 6 4 2
  39411. B 19 17 15 13 11 9 7 5 3 1
  39412.  
  39413. A
  39414. B
  39415. C
  39416. D
  39417. E
  39418. 5 F
  39419. 3 G
  39420. 6
  39421. 0. H
  39422. J
  39423. 0
  39424. . K
  39425. 7 L
  39426. 2
  39427. M
  39428. 7 N
  39429. 2
  39430. 1. P
  39431. R
  39432. T
  39433. U
  39434. V
  39435. W
  39436. Y
  39437.  
  39438. 1 0.635 1.27
  39439. .
  39440. 0.35 C 2
  39441.  
  39442. 0.15 C
  39443.  
  39444. A
  39445. 1
  39446. C .
  39447. 0
  39448.  
  39449. ±
  39450.  
  39451. 0
  39452. 6
  39453. .
  39454. 0
  39455.  
  39456. 256 × φ0.75 ± 0.15 Hitachi Code BP-256
  39457. 0.30 S C A S B S
  39458. 0.10 S C JEDEC Code MO-151
  39459. EIAJ Code –
  39460. Details of the part A Weight 3.0 g
  39461.  
  39462. Figure B.1 Package Dimensions (256-Pin BGA)
  39463.  
  39464. 762
  39465.  
  39466. ----------------------- Page 779-----------------------
  39467.  
  39468. 30.6 ± 0.2 Unit: mm
  39469.  
  39470. 28
  39471.  
  39472. 156 105
  39473.  
  39474. 157 104
  39475.  
  39476. 2
  39477. .
  39478. 0
  39479.  
  39480. ±
  39481.  
  39482. 6
  39483. . 5
  39484. 0 .
  39485. 3 0
  39486.  
  39487. 208 53
  39488. x
  39489. a
  39490. 1 52 M 5 4
  39491. 0.22 ± 0.05 0 0
  39492. 0.10 M 0 6 0 0. .
  39493. 0.20 ± 0.04 2. 5. ± ± 1.25 1.3
  39494. 3
  39495. 3 7 5
  39496. 1 1
  39497. . . 0° – 8°
  39498. 0 0
  39499.  
  39500. 0 5
  39501. 1. 1. 0.5 ± 0.1
  39502. 0 0
  39503. 0.10 + –
  39504. 5
  39505. 1 Hitachi Code FP-208E
  39506. .
  39507. 0 JEDEC —
  39508.  
  39509. Dimension including the plating thickness EIAJ Conforms
  39510. Base material dimension Weight (reference value) 5.3 g
  39511.  
  39512. Figure B.2 Package Dimensions (208-Pin QFP)
  39513.  
  39514. 763
  39515.  
  39516. ----------------------- Page 780-----------------------
  39517.  
  39518. Appendix C Mode Pin Settings
  39519.  
  39520. The MD8–MD0 pin values are input in the event of a power-on reset via the or
  39521. SCK2/ pin.
  39522.  
  39523. Clock Modes
  39524.  
  39525. Pin Values FrequencyPLL1 PLL2 Initial Clock Frequency
  39526. Divider 1 Ratio*2
  39527.  
  39528. Mode MD2 MD1 MD0 CPU Bus Periphera
  39529. Clock Clock l Module
  39530. Clock
  39531.  
  39532. 0 0 0 0 Off On On 6 3/2 3/2
  39533.  
  39534. 1 0 0 1 Off On On 6 1 1
  39535.  
  39536. 2 0 1 0 On On On 3 1 1/2
  39537.  
  39538. 3 0 1 1 Off On On 6 2 1
  39539.  
  39540. 4 1 0 0 On On On 3 3/2 3/4
  39541.  
  39542. 5 1 0 1 Off On On 6 3 3/2
  39543.  
  39544. Notes: 1. MD2–MD0 pin value combinations other than those shown above cannot be set.
  39545. 2. Taking the input clock (EXTAL or crystal resonator frequency) as 1.
  39546.  
  39547. Area 0 Bus Width
  39548.  
  39549. Pin Value
  39550.  
  39551. MD4 MD3 Bus Width
  39552.  
  39553. 0 0 64 bits
  39554.  
  39555. 1 8 bits
  39556.  
  39557. 1 0 16 bits
  39558.  
  39559. 1 32 bits
  39560.  
  39561. Endian
  39562.  
  39563. Pin Value
  39564.  
  39565. MD5 Endian
  39566.  
  39567. 0 Big endian
  39568.  
  39569. 1 Little endian
  39570.  
  39571. 764
  39572.  
  39573. ----------------------- Page 781-----------------------
  39574.  
  39575. Area 0 Memory Type
  39576.  
  39577. Pin Value
  39578.  
  39579. MD6 Memory Type
  39580.  
  39581. 0 MPX bus
  39582.  
  39583. 1 Normal memory
  39584.  
  39585. Master/Slave
  39586.  
  39587. Pin Value
  39588.  
  39589. MD7 Master/Slave
  39590.  
  39591. 0 Slave
  39592.  
  39593. 1 Master
  39594.  
  39595. Clock Input
  39596.  
  39597. Pin Value
  39598.  
  39599. MD8 Clock Input
  39600.  
  39601. 0 External input clock
  39602.  
  39603. 1 Crystal resonator
  39604.  
  39605. 765
  39606.  
  39607. ----------------------- Page 782-----------------------
  39608.  
  39609. Appendix D Pin Configuration
  39610.  
  39611. SH7750 VDDQ
  39612. rd_pullup_control
  39613.  
  39614. rd_dt_ //
  39615.  
  39616. rd_hiz_control VDDQ
  39617.  
  39618.  
  39619.  
  39620. VDDQ
  39621. rdwr_pullup_control
  39622.  
  39623. rdwr_dt_ RD/
  39624.  
  39625. rdwr_hiz_control VDDQ
  39626.  
  39627. RD/
  39628.  
  39629. PLL2
  39630. Bus clock CKIO
  39631.  
  39632. ckio_hiz_control
  39633.  
  39634. CKIO2
  39635.  
  39636. VDDQ
  39637.  
  39638. VSSQ
  39639.  
  39640.  
  39641.  
  39642. Figure D.1 Pin Configuration
  39643.  
  39644. 766
  39645.  
  39646. ----------------------- Page 783-----------------------
  39647.  
  39648. Description
  39649.  
  39650. 0 , RD/ , and CKIO2 have the same pin states as , RD/, and CKIO,
  39651. respectively
  39652.  
  39653. 1 , RD/ , and CKIO2 are in the high-impedance state
  39654.  
  39655. Note: CKIO is fed back to PLL2 to coordinate the external clock and internal clock phases.
  39656. However, CKIO2 is not fed back.
  39657.  
  39658. 767
  39659.  
  39660. ----------------------- Page 784-----------------------
  39661.  
  39662. Appendix E Pin Functions
  39663.  
  39664. E.1 Pin States
  39665.  
  39666. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State
  39667.  
  39668. Signal Name I / O Reset Reset Sleep Standb Bus Notes
  39669. (Power-On) (Manual) y Release
  39670. d
  39671.  
  39672. MasterSlave MasterSlave
  39673.  
  39674. D0–D7 I/O Z Z Z Z Z Z Z
  39675.  
  39676. D8–D15 I/O Z Z Z Z Z Z Z
  39677.  
  39678. D16–D23 I/O Z Z Z Z Z Z Z
  39679.  
  39680. D24–D31 I/O Z Z Z Z Z Z Z
  39681.  
  39682. D32–D39 I/O Z Z ZK ZK ZK ZK ZK Output
  39683. state held
  39684. when
  39685. used as
  39686. port
  39687.  
  39688. D40–D47 I/O Z Z ZK ZK ZK ZK ZK Output
  39689. state held
  39690. when
  39691. used as
  39692. port
  39693.  
  39694. D48–D55 I/O Z Z Z Z Z Z Z
  39695.  
  39696. D56–D63 I/O Z Z Z Z Z Z Z
  39697.  
  39698. A0, A1, A18–A25 O Z Z Z Z Z Z Z
  39699. A2–A17 O Z Z ZO*9 Z O ZO*7 Z
  39700.  
  39701. I I I I I I I I
  39702.  
  39703. / O H H H H O H O
  39704.  
  39705. / I I I I I I I I
  39706. O H Z H Z O*4 ZH*7 Z
  39707.  
  39708. CKE O H Z O*6 Z O*6 L O*6
  39709.  
  39710. – O H Z H Z O*4 ZH*7 Z
  39711.  
  39712. O H Z O*6 Z O*4 ZO*5 ZO*5
  39713.  
  39714. / O H Z O*6 Z O*4 ZO*5 ZO*5
  39715.  
  39716. RD/ O H Z H Z O*4 ZH*7 Z
  39717.  
  39718. I I I I I I I I
  39719.  
  39720. 768
  39721.  
  39722. ----------------------- Page 785-----------------------
  39723.  
  39724. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  39725.  
  39726. Signal Name I / O Reset Reset Sleep Standb Bus Notes
  39727. (Power-On) (Manual) y Release
  39728. d
  39729.  
  39730. MasterSlave MasterSlave
  39731. //DQM7 O H Z O*6 Z O*4 ZO*5 ZO*5
  39732.  
  39733. //DQM6 O H Z O*6 Z O*4 ZO*5 ZO*5
  39734.  
  39735. //DQM5 O H Z O*6 Z O*4 ZO*5 ZO*5
  39736.  
  39737. //DQM4 O H Z O*6 Z O*4 ZO*5 ZO*5
  39738.  
  39739. //DQM3 O H Z O*6 Z O*4 ZO*5 ZO*5
  39740.  
  39741. //DQM2 O H Z O*6 Z O*4 ZO*5 ZO*5
  39742.  
  39743. //DQM1 O H Z O*6 Z O*4 ZO*5 ZO*5
  39744.  
  39745. //DQM0 O H Z O*6 Z O*4 ZO*5 ZO*5
  39746.  
  39747. DACK1–DACK0 O L L L L O*4 ZO*8 O DMAC
  39748.  
  39749. MD7/TXD I/O I I I I IO ZO*8 IO SCI
  39750.  
  39751. MD6/ I I I I I I I I PCMCIA
  39752. (I/O)
  39753. MD5/ I/O*1 I I IO*6 I IO*4 IO*5 IO*5 DRAM2
  39754.  
  39755. MD4/ I/O*2 I I IH I IO*4 IH*7 I PCMCIA
  39756.  
  39757. MD3/ I/O*3 I I IH I IO*4 IH*7 I PCMCIA
  39758.  
  39759. CKIO O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39760.  
  39761. STATUS1– O O O O O O O O
  39762. STATUS0
  39763.  
  39764. – I I I I I I I I INTC
  39765.  
  39766. NMI I I I I I I I I INTC
  39767.  
  39768. – I I I I I I I I DMAC
  39769. DRAK1–DRAK0 O L L L L O*4 ZO*8 O DMAC
  39770.  
  39771. MD0/SCK I/O I I I I IO IO*8 IO SCI
  39772.  
  39773. RXD I I I I I I I I SCI
  39774.  
  39775. SCK2/ I I I I I I I I SCIF
  39776. MD1/TXD2 I/O I I I I IO IO*8 IO SCIF
  39777.  
  39778. MD2/RXD2 I I I I I I I I SCIF
  39779. I/O I I I I IO IO*8 IO SCIF
  39780.  
  39781. MD8/ I/O I I I I IO IO*8 IO SCIF
  39782.  
  39783. TCLK I/O I I I I IO IO IO TMU
  39784.  
  39785. 769
  39786.  
  39787. ----------------------- Page 786-----------------------
  39788.  
  39789. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  39790.  
  39791. Signal Name I / O Reset Reset Sleep Standb Bus Notes
  39792. (Power-On) (Manual) y Release
  39793. d
  39794.  
  39795. MasterSlave MasterSlave
  39796.  
  39797. TDO I/O O O O O O O O Hitachi-
  39798. UDI
  39799.  
  39800. TMS I I I I I I I I Hitachi-
  39801. UDI
  39802.  
  39803. TCK I I I I I I I I Hitachi-
  39804. UDI
  39805.  
  39806. TDI I I I I I I I I Hitachi-
  39807. UDI
  39808.  
  39809. I I I I I I I I Hitachi-
  39810. UDI
  39811. CKIO2*10 O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39812.  
  39813. *10 O H Z O*6 Z O*4 ZO*5 ZO*5
  39814.  
  39815. RD/ *10 O H Z H Z O*4 ZH*7 Z
  39816.  
  39817. I I I I I I I I
  39818.  
  39819. Notes: I: Input
  39820. O: Output
  39821. H: High-level output
  39822. L: Low-level output
  39823. Z: High-impedance
  39824. K: Output state held
  39825.  
  39826. 1. Output when area 2 DRAM is used.
  39827. 2. Output when area 5 PCMCIA is used.
  39828. 3. Output when area 6 PCMCIA is used.
  39829. 4. Depends on refresh and DMAC operations.
  39830. 5. Z (I) or O (refresh), depending on register setting (BCR1.HIZCNT).
  39831. 6. Depends on refresh operation.
  39832. 7. Z (I) or H (state held), depending on register setting (BCR1.HIZMEM).
  39833. 8. Z or O, depending on register setting (STBCR.PHZ).
  39834. 9. Output when refreshing is set.
  39835. 10.Operation in respective state when = 0; Z when = 1.
  39836. 11.Z or O, depending on register setting (FRQCR.CKOEN).
  39837.  
  39838. E.2 Handling of Unused Pins
  39839.  
  39840. • When RTC is not used
  39841. 770
  39842.  
  39843. ----------------------- Page 787-----------------------
  39844.  
  39845.  EXTAL2: Pull up to 3.3 V
  39846.  
  39847.  XTAL2: Leave unconnected
  39848.  
  39849.  VDD-RTC: Power supply (3.3 V)
  39850.  
  39851.  VSS-RTC: Power supply (0 V)
  39852.  
  39853. • When PLL1 is not used
  39854.  
  39855.  VDD-PLL1: Power supply (3.3 V)
  39856.  
  39857.  VSS-PLL1: Power supply (0 V)
  39858.  
  39859. • When PLL2 is not used
  39860.  
  39861.  VDD-PLL2: Power supply (3.3 V)
  39862.  
  39863.  VSS-PLL2: Power supply (0 V)
  39864.  
  39865. • When on-chip crystal oscillator is not used
  39866.  
  39867.  XTAL: Leave unconnected
  39868.  
  39869.  VDD-CPG: Power supply (3.3 V)
  39870.  
  39871.  VSS-CPG: Power supply (0 V)
  39872.  
  39873. 771
  39874.  
  39875. ----------------------- Page 788-----------------------
  39876.  
  39877. Appendix F Synchronous DRAM Address
  39878. Multiplexing Tables
  39879.  
  39880. (1) BUS 64 (16M: 512k x 16b x 2) x 4
  39881. AMX 0 AMXEXT 0 16M, column-addr-8bit 8MB
  39882.  
  39883. SH7750 Address Pins Synchronous Function
  39884. DRAM Address
  39885. Pins
  39886.  
  39887. RAS Cycle CAS Cycle
  39888.  
  39889. A14 A22 A22 A11 BANK selects bank address
  39890.  
  39891. A13 A21 H/L A10 Address precharge setting
  39892.  
  39893. A12 A20 0 A9 Address
  39894.  
  39895. A11 A19 0 A8
  39896.  
  39897. A10 A18 A10 A7
  39898.  
  39899. A9 A17 A9 A6
  39900.  
  39901. A8 A16 A8 A5
  39902.  
  39903. A7 A15 A7 A4
  39904.  
  39905. A6 A14 A6 A3
  39906.  
  39907. A5 A13 A5 A2
  39908.  
  39909. A4 A12 A4 A1
  39910.  
  39911. A3 A11 A3 A0
  39912.  
  39913. A2 Not used
  39914.  
  39915. A1 Not used
  39916.  
  39917. A0 Not used
  39918.  
  39919. 772
  39920.  
  39921. ----------------------- Page 789-----------------------
  39922.  
  39923. (2) BUS 32 (16M: 512k x 16b x 2) x 2
  39924. AMX 0 AMXEXT 0 16M, column-addr-8bit 4MB
  39925.  
  39926. SH7750 Address Pins Synchronous Function
  39927. DRAM Address
  39928. Pins
  39929.  
  39930. RAS Cycle CAS Cycle
  39931.  
  39932. A14
  39933.  
  39934. A13 A21 A21 A11 BANK selects bank address
  39935.  
  39936. A12 A20 H/L A10 Address precharge setting
  39937.  
  39938. A11 A19 0 A9 Address
  39939.  
  39940. A10 A18 0 A8
  39941.  
  39942. A9 A17 A9 A7
  39943.  
  39944. A8 A16 A8 A6
  39945.  
  39946. A7 A15 A7 A5
  39947.  
  39948. A6 A14 A6 A4
  39949.  
  39950. A5 A13 A5 A3
  39951.  
  39952. A4 A12 A4 A2
  39953.  
  39954. A3 A11 A3 A1
  39955.  
  39956. A2 A10 A2 A0
  39957.  
  39958. A1 Not used
  39959.  
  39960. A0 Not used
  39961.  
  39962. 773
  39963.  
  39964. ----------------------- Page 790-----------------------
  39965.  
  39966. (3) BUS 64 (16M: 512k x 16b x 2) x 4
  39967. AMX 0 AMXEXT 1 16M, column-addr-8bit 8MB
  39968.  
  39969. SH7750 Address Pins Synchronous Function
  39970. DRAM Address
  39971. Pins
  39972.  
  39973. RAS Cycle CAS Cycle
  39974.  
  39975. A14 A21 A21 A11 BANK selects bank address
  39976.  
  39977. A13 A22 H/L A10 Address precharge setting
  39978.  
  39979. A12 A20 0 A9 Address
  39980.  
  39981. A11 A19 0 A8
  39982.  
  39983. A10 A18 A10 A7
  39984.  
  39985. A9 A17 A9 A6
  39986.  
  39987. A8 A16 A8 A5
  39988.  
  39989. A7 A15 A7 A4
  39990.  
  39991. A6 A14 A6 A3
  39992.  
  39993. A5 A13 A5 A2
  39994.  
  39995. A4 A12 A4 A1
  39996.  
  39997. A3 A11 A3 A0
  39998.  
  39999. A2 Not used
  40000.  
  40001. A1 Not used
  40002.  
  40003. A0 Not used
  40004.  
  40005. 774
  40006.  
  40007. ----------------------- Page 791-----------------------
  40008.  
  40009. (4) BUS 32 (16M: 512k x 16b x 2) x 2
  40010. AMX 0 AMXEXT 1 16M, column-addr-8bit 4MB
  40011.  
  40012. SH7750 Address Pins Synchronous Function
  40013. DRAM Address
  40014. Pins
  40015.  
  40016. RAS Cycle CAS Cycle
  40017.  
  40018. A14
  40019.  
  40020. A13 A20 A20 A11 BANK selects bank address
  40021.  
  40022. A12 A21 H/L A10 Address precharge setting
  40023.  
  40024. A11 A19 0 A9 Address
  40025.  
  40026. A10 A18 0 A8
  40027.  
  40028. A9 A17 A9 A7
  40029.  
  40030. A8 A16 A8 A6
  40031.  
  40032. A7 A15 A7 A5
  40033.  
  40034. A6 A14 A6 A4
  40035.  
  40036. A5 A13 A5 A3
  40037.  
  40038. A4 A12 A4 A2
  40039.  
  40040. A3 A11 A3 A1
  40041.  
  40042. A2 A10 A2 A0
  40043.  
  40044. A1 Not used
  40045.  
  40046. A0 Not used
  40047.  
  40048. 775
  40049.  
  40050. ----------------------- Page 792-----------------------
  40051.  
  40052. (5) BUS 64 (16M: 1M x 8b x 2) x 8
  40053. AMX 1 AMXEXT 0 16M, column-addr-9bit 16MB
  40054.  
  40055. SH7750 Address Pins Synchronous Function
  40056. DRAM Address
  40057. Pins
  40058.  
  40059. RAS Cycle CAS Cycle
  40060.  
  40061. A14 A23 A23 A11 BANK selects bank address
  40062.  
  40063. A13 A22 H/L A10 Address precharge setting
  40064.  
  40065. A12 A21 0 A9 Address
  40066.  
  40067. A11 A20 A11 A8
  40068.  
  40069. A10 A19 A10 A7
  40070.  
  40071. A9 A18 A9 A6
  40072.  
  40073. A8 A17 A8 A5
  40074.  
  40075. A7 A16 A7 A4
  40076.  
  40077. A6 A15 A6 A3
  40078.  
  40079. A5 A14 A5 A2
  40080.  
  40081. A4 A13 A4 A1
  40082.  
  40083. A3 A12 A3 A0
  40084.  
  40085. A2 Not used
  40086.  
  40087. A1 Not used
  40088.  
  40089. A0 Not used
  40090.  
  40091. 776
  40092.  
  40093. ----------------------- Page 793-----------------------
  40094.  
  40095. (6) BUS 32 (16M: 1M x 8b x 2) x 4
  40096. AMX 1 AMXEXT 0 16M, column-addr-9bit 8MB
  40097.  
  40098. SH7750 Address Pins Synchronous Function
  40099. DRAM Address
  40100. Pins
  40101.  
  40102. RAS Cycle CAS Cycle
  40103.  
  40104. A14
  40105.  
  40106. A13 A22 A22 A11 BANK selects bank address
  40107.  
  40108. A12 A21 H/L A10 Address precharge setting
  40109.  
  40110. A11 A20 0 A9 Address
  40111.  
  40112. A10 A19 A10 A8
  40113.  
  40114. A9 A18 A9 A7
  40115.  
  40116. A8 A17 A8 A6
  40117.  
  40118. A7 A16 A7 A5
  40119.  
  40120. A6 A15 A6 A4
  40121.  
  40122. A5 A14 A5 A3
  40123.  
  40124. A4 A13 A4 A2
  40125.  
  40126. A3 A12 A3 A1
  40127.  
  40128. A2 A11 A2 A0
  40129.  
  40130. A1 Not used
  40131.  
  40132. A0 Not used
  40133.  
  40134. 777
  40135.  
  40136. ----------------------- Page 794-----------------------
  40137.  
  40138. (7) BUS 64 (16M: 1M x 8b x 2) x 8
  40139. AMX 1 AMXEXT 1 16M, column-addr-9bit 16MB
  40140.  
  40141. SH7750 Address Pins Synchronous Function
  40142. DRAM Address
  40143. Pins
  40144.  
  40145. RAS Cycle CAS Cycle
  40146.  
  40147. A14 A22 A22 A11 BANK selects bank address
  40148.  
  40149. A13 A23 H/L A10 Address precharge setting
  40150.  
  40151. A12 A21 0 A9 Address
  40152.  
  40153. A11 A20 A11 A8
  40154.  
  40155. A10 A19 A10 A7
  40156.  
  40157. A9 A18 A9 A6
  40158.  
  40159. A8 A17 A8 A5
  40160.  
  40161. A7 A16 A7 A4
  40162.  
  40163. A6 A15 A6 A3
  40164.  
  40165. A5 A14 A5 A2
  40166.  
  40167. A4 A13 A4 A1
  40168.  
  40169. A3 A12 A3 A0
  40170.  
  40171. A2 Not used
  40172.  
  40173. A1 Not used
  40174.  
  40175. A0 Not used
  40176.  
  40177. 778
  40178.  
  40179. ----------------------- Page 795-----------------------
  40180.  
  40181. (8) BUS 32 (16M: 1M x 8b x 2) x 4
  40182. AMX 1 AMXEXT 1 16M, column-addr-9bit 8MB
  40183.  
  40184. SH7750 Address Pins Synchronous Function
  40185. DRAM Address
  40186. Pins
  40187.  
  40188. RAS Cycle CAS Cycle
  40189.  
  40190. A14
  40191.  
  40192. A13 A21 A21 A11 BANK selects bank address
  40193.  
  40194. A12 A22 H/L A10 Address precharge setting
  40195.  
  40196. A11 A20 0 A9 Address
  40197.  
  40198. A10 A19 A10 A8
  40199.  
  40200. A9 A18 A9 A7
  40201.  
  40202. A8 A17 A8 A6
  40203.  
  40204. A7 A16 A7 A5
  40205.  
  40206. A6 A15 A6 A4
  40207.  
  40208. A5 A14 A5 A3
  40209.  
  40210. A4 A13 A4 A2
  40211.  
  40212. A3 A12 A3 A1
  40213.  
  40214. A2 A11 A2 A0
  40215.  
  40216. A1 Not used
  40217.  
  40218. A0 Not used
  40219.  
  40220. 779
  40221.  
  40222. ----------------------- Page 796-----------------------
  40223.  
  40224. (9) BUS 64 (64M: 1M x 16b x 4) x 4
  40225. AMX 2 64M, column-addr-8bit 32MB
  40226.  
  40227. SH7750 Address Pins Synchronous Function
  40228. DRAM Address
  40229. Pins
  40230.  
  40231. RAS Cycle CAS Cycle
  40232.  
  40233. A16 A24 A24 A13 BANK selects bank address
  40234.  
  40235. A15 A23 A23 A12
  40236.  
  40237. A14 A22 0 A11 Address precharge setting
  40238.  
  40239. A13 A21 H/L A10
  40240.  
  40241. A12 A20 0 A9 Address
  40242.  
  40243. A11 A19 0 A8
  40244.  
  40245. A10 A18 A10 A7
  40246.  
  40247. A9 A17 A9 A6
  40248.  
  40249. A8 A16 A8 A5
  40250.  
  40251. A7 A15 A7 A4
  40252.  
  40253. A6 A14 A6 A3
  40254.  
  40255. A5 A13 A5 A2
  40256.  
  40257. A4 A12 A4 A1
  40258.  
  40259. A3 A11 A3 A0
  40260.  
  40261. A2 Not used
  40262.  
  40263. A1 Not used
  40264.  
  40265. A0 Not used
  40266.  
  40267. 780
  40268.  
  40269. ----------------------- Page 797-----------------------
  40270.  
  40271. (10) BUS 32 (64M: 1M x 16b x 4) x 2
  40272. AMX 2 64M, column-addr-8bit 16MB
  40273.  
  40274. SH7750 Address Pins Synchronous Function
  40275. DRAM Address
  40276. Pins
  40277.  
  40278. RAS Cycle CAS Cycle
  40279.  
  40280. A16
  40281.  
  40282. A15 A23 A23 A13 BANK selects bank address
  40283.  
  40284. A14 A22 A22 A12
  40285.  
  40286. A13 A21 0 A11 Address precharge setting
  40287.  
  40288. A12 A20 H/L A10
  40289.  
  40290. A11 A19 0 A9 Address
  40291.  
  40292. A10 A18 0 A8
  40293.  
  40294. A9 A17 A9 A7
  40295.  
  40296. A8 A16 A8 A6
  40297.  
  40298. A7 A15 A7 A5
  40299.  
  40300. A6 A14 A6 A4
  40301.  
  40302. A5 A13 A5 A3
  40303.  
  40304. A4 A12 A4 A2
  40305.  
  40306. A3 A11 A3 A1
  40307.  
  40308. A2 A10 A2 A0
  40309.  
  40310. A1 Not used
  40311.  
  40312. A0 Not used
  40313.  
  40314. 781
  40315.  
  40316. ----------------------- Page 798-----------------------
  40317.  
  40318. (11) BUS 64 (64M: 2M x 8b x 4) x 8
  40319. AMX 3 64M, column-addr-9bit 64MB
  40320.  
  40321. SH7750 Address Pins Synchronous Function
  40322. DRAM Address
  40323. Pins
  40324.  
  40325. RAS Cycle CAS Cycle
  40326.  
  40327. A16 A25 A25 A13 BANK selects bank address
  40328.  
  40329. A15 A24 A24 A12
  40330.  
  40331. A14 A23 0 A11 Address precharge setting
  40332.  
  40333. A13 A22 H/L A10
  40334.  
  40335. A12 A21 0 A9 Address
  40336.  
  40337. A11 A20 A11 A8
  40338.  
  40339. A10 A19 A10 A7
  40340.  
  40341. A9 A18 A9 A6
  40342.  
  40343. A8 A17 A8 A5
  40344.  
  40345. A7 A16 A7 A4
  40346.  
  40347. A6 A15 A6 A3
  40348.  
  40349. A5 A14 A5 A2
  40350.  
  40351. A4 A13 A4 A1
  40352.  
  40353. A3 A12 A3 A0
  40354.  
  40355. A2 Not used
  40356.  
  40357. A1 Not used
  40358.  
  40359. A0 Not used
  40360.  
  40361. 782
  40362.  
  40363. ----------------------- Page 799-----------------------
  40364.  
  40365. (12) BUS 32 (64M: 2M x 8b x 4) x 4
  40366. AMX 3 64M, column-addr-9bit 32MB
  40367.  
  40368. SH7750 Address Pins Synchronous Function
  40369. DRAM Address
  40370. Pins
  40371.  
  40372. RAS Cycle CAS Cycle
  40373.  
  40374. A16
  40375.  
  40376. A15 A24 A24 A13 BANK selects bank address
  40377.  
  40378. A14 A23 A23 A12
  40379.  
  40380. A13 A22 0 A11 Address precharge setting
  40381.  
  40382. A12 A21 H/L A10
  40383.  
  40384. A11 A20 0 A9 Address
  40385.  
  40386. A10 A19 A10 A8
  40387.  
  40388. A9 A18 A9 A7
  40389.  
  40390. A8 A17 A8 A6
  40391.  
  40392. A7 A16 A7 A5
  40393.  
  40394. A6 A15 A6 A4
  40395.  
  40396. A5 A14 A5 A3
  40397.  
  40398. A4 A13 A4 A2
  40399.  
  40400. A3 A12 A3 A1
  40401.  
  40402. A2 A11 A2 A0
  40403.  
  40404. A1 Not used
  40405.  
  40406. A0 Not used
  40407.  
  40408. 783
  40409.  
  40410. ----------------------- Page 800-----------------------
  40411.  
  40412. (13) BUS 64 (64M: 512k x 32b x 4) x 2
  40413. AMX 4 64M, column-addr-8bit 16MB
  40414.  
  40415. SH7750 Address Pins Synchronous Function
  40416. DRAM Address
  40417. Pins
  40418.  
  40419. RAS Cycle CAS Cycle
  40420.  
  40421. A15 A23 A23 A12 BANK selects bank address
  40422.  
  40423. A14 A22 A22 A11
  40424.  
  40425. A13 A21 H/L A10 Address precharge setting
  40426.  
  40427. A12 A20 0 A9 Address
  40428.  
  40429. A11 A19 0 A8
  40430.  
  40431. A10 A18 A10 A7
  40432.  
  40433. A9 A17 A9 A6
  40434.  
  40435. A8 A16 A8 A5
  40436.  
  40437. A7 A15 A7 A4
  40438.  
  40439. A6 A14 A6 A3
  40440.  
  40441. A5 A13 A5 A2
  40442.  
  40443. A4 A12 A4 A1
  40444.  
  40445. A3 A11 A3 A0
  40446.  
  40447. A2 Not used
  40448.  
  40449. A1 Not used
  40450.  
  40451. A0 Not used
  40452.  
  40453. 784
  40454.  
  40455. ----------------------- Page 801-----------------------
  40456.  
  40457. (14) BUS 32 (64M: 512k x 32b x 4) x 1
  40458. AMX 4 64M, column-addr-8bit 8MB
  40459.  
  40460. SH7750 Address Pins Synchronous Function
  40461. DRAM Address
  40462. Pins
  40463.  
  40464. RAS Cycle CAS Cycle
  40465.  
  40466. A15
  40467.  
  40468. A14 A22 A22 A12 BANK selects bank address
  40469.  
  40470. A13 A21 A21 A11
  40471.  
  40472. A12 A20 H/L A10 Address precharge setting
  40473.  
  40474. A11 A19 0 A9 Address
  40475.  
  40476. A10 A18 0 A8
  40477.  
  40478. A9 A17 A9 A7
  40479.  
  40480. A8 A16 A8 A6
  40481.  
  40482. A7 A15 A7 A5
  40483.  
  40484. A6 A14 A6 A4
  40485.  
  40486. A5 A13 A5 A3
  40487.  
  40488. A4 A12 A4 A2
  40489.  
  40490. A3 A11 A3 A1
  40491.  
  40492. A2 A10 A2 A0
  40493.  
  40494. A1 Not used
  40495.  
  40496. A0 Not used
  40497.  
  40498. 785
  40499.  
  40500. ----------------------- Page 802-----------------------
  40501.  
  40502. (15) BUS 64 (64M: 1M x 32b x 2) x 2
  40503. AMX 5 64M, column-addr-8bit 16MB
  40504.  
  40505. SH7750 Address Pins Synchronous Function
  40506. DRAM Address
  40507. Pins
  40508.  
  40509. RAS Cycle CAS Cycle
  40510.  
  40511. A15 A23 A23 A12 BANK selects bank address
  40512.  
  40513. A14 A22 0 A11
  40514.  
  40515. A13 A21 H/L A10 Address precharge setting
  40516.  
  40517. A12 A20 0 A9 Address
  40518.  
  40519. A11 A19 0 A8
  40520.  
  40521. A10 A18 A10 A7
  40522.  
  40523. A9 A17 A9 A6
  40524.  
  40525. A8 A16 A8 A5
  40526.  
  40527. A7 A15 A7 A4
  40528.  
  40529. A6 A14 A6 A3
  40530.  
  40531. A5 A13 A5 A2
  40532.  
  40533. A4 A12 A4 A1
  40534.  
  40535. A3 A11 A3 A0
  40536.  
  40537. A2 Not used
  40538.  
  40539. A1 Not used
  40540.  
  40541. A0 Not used
  40542.  
  40543. 786
  40544.  
  40545. ----------------------- Page 803-----------------------
  40546.  
  40547. (16) BUS 32 (64M: 1M x 32b x 2) x 1
  40548. AMX 5 64M, column-addr-8bit 8MB
  40549.  
  40550. SH7750 Address Pins Synchronous Function
  40551. DRAM Address
  40552. Pins
  40553.  
  40554. RAS Cycle CAS Cycle
  40555.  
  40556. A15
  40557.  
  40558. A14 A22 A22 A12 BANK selects bank address
  40559.  
  40560. A13 A21 0 A11
  40561.  
  40562. A12 A20 H/L A10 Address precharge setting
  40563.  
  40564. A11 A19 0 A9 Address
  40565.  
  40566. A10 A18 0 A8
  40567.  
  40568. A9 A17 A9 A7
  40569.  
  40570. A8 A16 A8 A6
  40571.  
  40572. A7 A15 A7 A5
  40573.  
  40574. A6 A14 A6 A4
  40575.  
  40576. A5 A13 A5 A3
  40577.  
  40578. A4 A12 A4 A2
  40579.  
  40580. A3 A11 A3 A1
  40581.  
  40582. A2 A10 A2 A0
  40583.  
  40584. A1 Not used
  40585.  
  40586. A0 Not used
  40587.  
  40588. 787
  40589.  
  40590. ----------------------- Page 804-----------------------
  40591.  
  40592. (17) BUS 64 (16M: 256k x 32b x 2) x 2
  40593. AMX 7 16M, column-addr-8bit 4MB
  40594.  
  40595. SH7750 Address Pins Synchronous Function
  40596. DRAM Address
  40597. Pins
  40598.  
  40599. RAS Cycle CAS Cycle
  40600.  
  40601. A13 A21 A21 A10 BANK selects bank address
  40602.  
  40603. A12 A20 H/L A9 Address precharge setting
  40604.  
  40605. A11 A19 0 A8 Address
  40606.  
  40607. A10 A18 A10 A7
  40608.  
  40609. A9 A17 A9 A6
  40610.  
  40611. A8 A16 A8 A5
  40612.  
  40613. A7 A15 A7 A4
  40614.  
  40615. A6 A14 A6 A3
  40616.  
  40617. A5 A13 A5 A2
  40618.  
  40619. A4 A12 A4 A1
  40620.  
  40621. A3 A11 A3 A0
  40622.  
  40623. A2 Not used
  40624.  
  40625. A1 Not used
  40626.  
  40627. A0 Not used
  40628.  
  40629. 788
  40630.  
  40631. ----------------------- Page 805-----------------------
  40632.  
  40633. (18) BUS 32 (16M: 256k x 32b x 2) x 1
  40634. AMX 7 16M, column-addr-8bit 2MB
  40635.  
  40636. SH7750 Address Pins Synchronous Function
  40637. DRAM Address
  40638. Pins
  40639.  
  40640. RAS Cycle CAS Cycle
  40641.  
  40642. A13
  40643.  
  40644. A12 A20 A20 A10 BANK selects bank address
  40645.  
  40646. A11 A19 H/L A9 Address precharge setting
  40647.  
  40648. A10 A18 0 A8 Address
  40649.  
  40650. A9 A17 A9 A7
  40651.  
  40652. A8 A16 A8 A6
  40653.  
  40654. A7 A15 A7 A5
  40655.  
  40656. A6 A14 A6 A4
  40657.  
  40658. A5 A13 A5 A3
  40659.  
  40660. A4 A12 A4 A2
  40661.  
  40662. A3 A11 A3 A1
  40663.  
  40664. A2 A10 A2 A0
  40665.  
  40666. A1 Not used
  40667.  
  40668. A0 Not used
  40669.  
  40670. 789
  40671.  
  40672. ----------------------- Page 806-----------------------
  40673.  
  40674. Appendix G SH7750 On-Demand Data Transfer Mode
  40675.  
  40676. G.1 Pins in DDT Mode
  40677.  
  40678. Figure G.1 shows the system configuration in DDT mode.
  40679.  
  40680. /DREQ0
  40681.  
  40682. /DRACK0
  40683.  
  40684. /DREQ1
  40685.  
  40686. /DACK0
  40687.  
  40688. SH7750 ID1, ID0/DRAK1, DACK1 External device
  40689.  
  40690. CLK
  40691.  
  40692. D63–D0
  40693.  
  40694. A25–A0, RAS, CAS, WE, DQMn, CKE
  40695.  
  40696. Synchronous
  40697. DRAM
  40698.  
  40699. Figure G.1 System Configuration in On-Demand Data Transfer Mode
  40700.  
  40701. • : Data bus release request signal for transmitting the data transfer request format
  40702. (DTR format) or a DMA request from an external device to the DMAC
  40703.  
  40704. If there is a wait for release of the data bus, an external device can have the data bus
  40705. released by asserting . When is accepted, the BSC asserts .
  40706.  
  40707. • : Data bus D63–D0 release signal
  40708.  
  40709. Assertion of means that the data bus will be released two cycles later.
  40710.  
  40711. • : Transfer request signal
  40712.  
  40713. Assertion of has the following different meanings.
  40714.  
  40715.  In normal data transfer mode (except channel 0), is asserted, and at the same time
  40716. the DTR format is output, two cycles after is asserted.
  40717.  
  40718.  In the case of the handshake protocol without use of the data bus, asserting enables
  40719. a transfer request to be issued for the channel for which a transfer request was made
  40720. immediately before. This function can be used only when is not asserted two
  40721. cycles earlier.
  40722.  
  40723.  In the case of direct data transfer mode (valid only for channel 2), a direct transfer
  40724. request can be made to channel 2 by asserting and simultaneously.
  40725.  
  40726. • : Reply strobe signal for external device from DMAC
  40727.  
  40728. 790
  40729.  
  40730. ----------------------- Page 807-----------------------
  40731.  
  40732. In the case of a read cycle, the SH7750 asserts in the same cycle in which valid
  40733. read data is carried. In the case of a write cycle, the SH7750 asserts two cycles
  40734. before the valid write data output cycle.
  40735.  
  40736. • ID1, ID0: Channel number notification signals
  40737.  
  40738.  00: Channel 0 (means demand data transfer)
  40739.  
  40740.  01: Channel 1
  40741.  
  40742.  10: Channel 2
  40743.  
  40744.  11: Channel 3
  40745.  
  40746. Data Transfer Request Format
  40747.  
  40748. 63 61 60 59 57 55 48 31 0
  40749.  
  40750. SZ ID MD COUNT (Reserved) ADDRESS
  40751.  
  40752. R/W
  40753.  
  40754. Figure G.2 Data Transfer Request Format
  40755.  
  40756. The data transfer request format (DTR format) consists of 64 bits. In the case of normal data
  40757. transfer mode (channel 0, except channel 0) and the handshake protocol using the data bus,
  40758. the transfer data size, read/write access, channel number, transfer request mode, number of
  40759. transfers, and transfer source or transfer destination address are specified. A specification in
  40760. bits 47–32 is invalid.
  40761.  
  40762. In normal data transfer mode (channel 0), only single address mode can be set. With the DTR
  40763. format, DS = (0: MD = 10, 11, 1: MD = 01), RL = 0, AL = 0, DM[1:0] = 01, SM[1:0] = 01,
  40764. RS[3:0] = (0010: R/W = 0, 0011: R/W = 1), TM = (0: MD = 11, 1: MD = 01, 10), TS[2:0] =
  40765. (SZ), and IE = 0 settings are made in DMA channel control register 0, COUNT is set in
  40766. transfer count register 0, and ADDRESS is set in source/destination address register 0.
  40767. Therefore, in DDT mode, the above control registers cannot be written to by the CPU, but can
  40768. be read.
  40769.  
  40770. Bits 63 to 61: Transmit Size (SZ2–SZ0)
  40771. • 000: Byte size (8-bit) specification
  40772. • 001: Word size (16-bit) specification
  40773.  
  40774. • 010: Longword size (32-bit) specification
  40775.  
  40776. • 011: Quadword size (64-bit) specification
  40777.  
  40778. • 100: 32-byte block transfer specification
  40779.  
  40780. • 101: Reserved
  40781.  
  40782. • 110: Reserved
  40783.  
  40784. • 111: Transfer end specification
  40785.  
  40786. 791
  40787.  
  40788. ----------------------- Page 808-----------------------
  40789.  
  40790. Bit 60: Read/Write (R/W)
  40791. • 0: Memory read specification
  40792.  
  40793. • 1: Memory write specification
  40794.  
  40795. Bits 59 and 58: Channel Number (ID1, ID0)
  40796. • 00: Channel 0 (demand data transfer)
  40797.  
  40798. • 01: Channel 1
  40799.  
  40800. • 10: Channel 2
  40801.  
  40802. • 11: Channel 3
  40803.  
  40804. Bits 57 and 56: Transfer Request Mode (MD1, MD0)
  40805. • 00: Handshake protocol (data bus used)
  40806.  
  40807. • 01: Burst mode (edge detection) specification
  40808.  
  40809. • 10: Burst mode (level detection) specification
  40810.  
  40811. • 11: Cycle steal mode specification
  40812.  
  40813. Bits 55 to 48: Transfer Count (COUNT7–COUNT0)
  40814. • 00000000: Maximum number of transfers (16M)
  40815.  
  40816. Bits 47 to 32: Reserved
  40817.  
  40818. Bits 31 to 0: Address (ADDRESS31–ADDRESS0)
  40819. • R/W = 0: Transfer source address specification
  40820.  
  40821. • R/W = 1: Transfer destination address specification
  40822.  
  40823. Notes: 1. Only the ID field is valid for channels 1 to 3.
  40824.  
  40825. 2. To start data transfer on channel 0, the initial value of MD in the DTR format must
  40826. be 01, 10, or 11.
  40827.  
  40828. 3. The COUNT field is ignored if MD = 00.
  40829.  
  40830. 4. In edge-sense burst mode, DMA transfer is executed continuously. In level-sense
  40831. burst mode and cycle steal mode, a handshake protocol is used to transfer each
  40832. unit of data.
  40833.  
  40834. 5. The maximum number of transfers can be specified by setting COUNT = 0 as DTR
  40835. format initialization data. If the amount of data to be transferred is unknown, set
  40836. COUNT = 0, start DMA transfer, and transfer the DTR format (ID = 00, MD ≠ 00,
  40837. SZ = 111) when the required amount of data has been transferred. This will
  40838. terminate DMA transfer on channel 0.
  40839.  
  40840. In this case, the TE bit in DMA channel control register 0 is not set, but transfer
  40841. cannot be restarted.
  40842.  
  40843. 792
  40844.  
  40845. ----------------------- Page 809-----------------------
  40846.  
  40847. G.2 Transfer Request Acceptance on Each Channel
  40848.  
  40849. On channel 0, a DMA data transfer request can be made by means of the DTR format. No
  40850. further transfer requests are accepted between DTR format acceptance and the end of the
  40851. data transfer.
  40852.  
  40853. On channels 1 to 3, output a transfer request from an external device by means of the DTR
  40854. format (ID = 01, 10, or 11) after making DMAC control register settings in the same way as
  40855. in normal DMA mode. Each of channels 1 to 3 has a request queue that can accept up to four
  40856. transfer requests. When a request queue is full, the fifth and subsequent transfer requests will
  40857. be ignored, and so transfer requests must not be output.
  40858.  
  40859. CLK
  40860.  
  40861.  
  40862.  
  40863.  
  40864.  
  40865.  
  40866.  
  40867. A25–A0 RA CA
  40868.  
  40869. D63–D0 DTR D0 D1 D2 D3
  40870.  
  40871. RAS,
  40872. CAS, WE BA RD
  40873.  
  40874.  
  40875.  
  40876. ID1, ID0 00
  40877.  
  40878. Figure G.3 Single Address Mode/Burst Mode/External Bus → External Device 32-
  40879. Byte Block Transfer/Channel 0 On-Demand Data Transfer
  40880.  
  40881. 793
  40882.  
  40883. ----------------------- Page 810-----------------------
  40884.  
  40885. CLK
  40886.  
  40887.  
  40888.  
  40889.  
  40890.  
  40891.  
  40892.  
  40893. A25–A0 RA CA
  40894.  
  40895. D63–D0 DTR D0 D1 D2 D3
  40896.  
  40897. RAS,
  40898. BA WT
  40899. CAS, WE
  40900.  
  40901.  
  40902.  
  40903. ID1, ID0
  40904.  
  40905. Figure G.4 Single Address Mode/Burst Mode/External Device → External Bus 32-
  40906. Byte Block Transfer/Channel 0 On-Demand Data Transfer
  40907.  
  40908. CLK
  40909.  
  40910.  
  40911.  
  40912.  
  40913.  
  40914.  
  40915.  
  40916. A25–A0 RA CA CA CA
  40917.  
  40918. D63–D0 DTR D0 D1
  40919.  
  40920. RAS,
  40921. BA RD RD RD
  40922. CAS, WE
  40923.  
  40924. DQMn
  40925.  
  40926.  
  40927.  
  40928. ID1, ID0 00 00
  40929.  
  40930. Figure G.5 Single Address Mode/Burst Mode/External Bus → External Device 64-Bit
  40931. Transfer/Channel 0 On-Demand Data Transfer
  40932.  
  40933. 794
  40934.  
  40935. ----------------------- Page 811-----------------------
  40936.  
  40937. CLK
  40938.  
  40939.  
  40940.  
  40941.  
  40942.  
  40943.  
  40944.  
  40945. A25–A0 RA CA CA
  40946.  
  40947. D63–D0 DTR D0 D1
  40948.  
  40949. RAS,
  40950. BA WT WT
  40951. CAS, WE
  40952.  
  40953. DQMn
  40954.  
  40955.  
  40956.  
  40957. ID1, ID0
  40958.  
  40959. Figure G.6 Single Address Mode/Burst Mode/External Device → External Bus 64-Bit
  40960. Transfer/Channel 0 On-Demand Data Transfer
  40961.  
  40962. 795
  40963.  
  40964. ----------------------- Page 812-----------------------
  40965.  
  40966. CLK
  40967.  
  40968.  
  40969.  
  40970.  
  40971.  
  40972.  
  40973.  
  40974. A25–A0 CA CA
  40975.  
  40976. D63–D0 DTR D0 D1 D2 D3 DTR D0 D1
  40977. MD = 10 or 11 MD = 00
  40978.  
  40979. CMD WT WT
  40980.  
  40981.  
  40982.  
  40983. ID1, ID0
  40984.  
  40985. Start of data transfer Next transfer request
  40986.  
  40987. Figure G.7 Handshake Protocol Using Data Bus
  40988. (Channel 0 On-Demand Data Transfer)
  40989.  
  40990. 796
  40991.  
  40992. ----------------------- Page 813-----------------------
  40993.  
  40994. CLK
  40995.  
  40996.  
  40997.  
  40998.  
  40999.  
  41000.  
  41001.  
  41002. A25–A0 CA CA
  41003.  
  41004. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  41005. MD = 10 or 11
  41006.  
  41007. CMD WT WT
  41008.  
  41009.  
  41010.  
  41011. ID1, ID0
  41012.  
  41013. Start of data transfer Next transfer request
  41014.  
  41015. Figure G.8 Handshake Protocol without Use of Data Bus
  41016. (Channel 0 On-Demand Data Transfer)
  41017.  
  41018. CLK
  41019.  
  41020.  
  41021.  
  41022.  
  41023.  
  41024.  
  41025.  
  41026. A25–A0 RA CA
  41027.  
  41028. D63–D0 D0 D1 D2 D3
  41029.  
  41030. RAS, CAS,
  41031. BA RD
  41032. WE
  41033.  
  41034. Figure G.9 Read from Synchronous DRAM Precharge Bank
  41035.  
  41036. 797
  41037.  
  41038. ----------------------- Page 814-----------------------
  41039.  
  41040. CLK
  41041.  
  41042.  
  41043.  
  41044. Transfer requests can be accepted
  41045.  
  41046.  
  41047.  
  41048.  
  41049.  
  41050. A25–A0 RA CA
  41051.  
  41052. D63–D0 D0 D1 D2 D3
  41053.  
  41054. RAS, CAS,
  41055. PCH BA RD
  41056. WE
  41057.  
  41058. Figure G.10 Read from Synchronous DRAM Non-Precharge Bank (Row Miss)
  41059.  
  41060. CLK
  41061.  
  41062.  
  41063.  
  41064.  
  41065.  
  41066.  
  41067.  
  41068. A25–A0 CA
  41069.  
  41070. D63–D0 D0 D1 D2 D3
  41071.  
  41072. RAS, CAS,
  41073. RD
  41074. WE
  41075.  
  41076. Figure G.11 Read from Synchronous DRAM (Row Hit)
  41077.  
  41078. 798
  41079.  
  41080. ----------------------- Page 815-----------------------
  41081.  
  41082. CLK
  41083.  
  41084.  
  41085.  
  41086.  
  41087.  
  41088.  
  41089.  
  41090. A25–A0 RA CA
  41091.  
  41092. D63–D0 D0 D1 D2 D3
  41093.  
  41094. RAS, CAS,
  41095. BA WT
  41096. WE
  41097.  
  41098. Figure G.12 Write to Synchronous DRAM Precharge Bank
  41099.  
  41100. CLK
  41101.  
  41102.  
  41103.  
  41104. Transfer requests can be accepted
  41105.  
  41106.  
  41107.  
  41108.  
  41109.  
  41110. A25–A0 RA CA
  41111.  
  41112. D63–D0 D0 D1 D2 D3
  41113.  
  41114. RAS, CAS,
  41115. PCH BA WT
  41116. WE
  41117.  
  41118. Figure G.13 Write to Synchronous DRAM Non-Precharge Bank (Row Miss)
  41119.  
  41120. 799
  41121.  
  41122. ----------------------- Page 816-----------------------
  41123.  
  41124. CLK
  41125.  
  41126.  
  41127.  
  41128.  
  41129.  
  41130.  
  41131.  
  41132. A25–A0 CA
  41133.  
  41134. D63–D0 D0 D1 D2 D3
  41135.  
  41136. RAS, CAS,
  41137. WT
  41138. WE
  41139.  
  41140. Figure G.14 Write to Synchronous DRAM (Row Hit)
  41141.  
  41142. CLK
  41143.  
  41144.  
  41145.  
  41146.  
  41147.  
  41148.  
  41149.  
  41150. A25–A0 RA CA
  41151.  
  41152. D63–D0 DTR D0 D1 D2
  41153.  
  41154. RAS,
  41155. BA RD
  41156. CAS, WE
  41157.  
  41158.  
  41159.  
  41160. ID1, ID0 00
  41161.  
  41162. Figure G.15 Single Address Mode/Burst Mode/External Bus → External Device 32-
  41163. Byte Block Transfer/Channel 0 On-Demand Data Transfer
  41164.  
  41165. 800
  41166.  
  41167. ----------------------- Page 817-----------------------
  41168.  
  41169. DMA Operation Register (DMAOR)
  41170.  
  41171. 31 15 9 8 2 1 0
  41172.  
  41173. PR[1:0] AE
  41174. DDT NMIF
  41175.  
  41176. DDT: 0: Normal DMA mode DME
  41177. 1: On-demand data transfer mode
  41178.  
  41179. Figure G.16 DDT Mode Setting
  41180.  
  41181. CLK
  41182.  
  41183.  
  41184.  
  41185.  
  41186. No DMA request sampling
  41187.  
  41188.  
  41189.  
  41190. A25–A0 CA CA
  41191.  
  41192. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3 D1 D2 D3
  41193. MD = 01
  41194.  
  41195. CMD WT WT
  41196.  
  41197.  
  41198.  
  41199. ID1, ID0
  41200.  
  41201. Start of data transfer
  41202.  
  41203. Figure G.17 Single Address Mode/Burst Mode/Edge Detection/
  41204. External Device → External Bus Data Transfer
  41205.  
  41206. 801
  41207.  
  41208. ----------------------- Page 818-----------------------
  41209.  
  41210. CLK
  41211.  
  41212.  
  41213.  
  41214.  
  41215. Wait for next DMA request
  41216.  
  41217.  
  41218.  
  41219. A25–A0 CA CA
  41220.  
  41221. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  41222. MD = 10
  41223.  
  41224. CMD RD RD
  41225.  
  41226.  
  41227.  
  41228. ID1, ID0
  41229.  
  41230. Start of data transfer
  41231.  
  41232. Figure G.18 Single Address Mode/Burst Mode/Level Detection/
  41233. External Bus → External Device Data Transfer
  41234.  
  41235. CLK
  41236.  
  41237.  
  41238.  
  41239.  
  41240.  
  41241.  
  41242.  
  41243. A25–A0 CA CA CA
  41244.  
  41245. D63–D0 DTR D0 D2 D3
  41246. MD = 01 Idle cycle Idle cycle Idle cycle
  41247.  
  41248. CMD RD RD RD
  41249.  
  41250. DQMn
  41251.  
  41252.  
  41253.  
  41254. ID1, ID0
  41255.  
  41256. Figure G.19 Single Address Mode/Burst Mode/Edge Detection/Byte, Word,
  41257. Longword, Quadword/External Bus → External Device Data Transfer
  41258.  
  41259. 802
  41260.  
  41261. ----------------------- Page 819-----------------------
  41262.  
  41263. CLK
  41264.  
  41265.  
  41266.  
  41267.  
  41268.  
  41269.  
  41270.  
  41271. A25–A0 CA CA CA
  41272.  
  41273. D63–D0 DTR D0 D1 D3
  41274.  
  41275. MD = 01
  41276.  
  41277. CMD WT WT WT
  41278.  
  41279. DQMn
  41280. Idle cycle Idle cycle Idle cycle
  41281.  
  41282.  
  41283.  
  41284. ID1, ID0
  41285.  
  41286. Figure G.20 Single Address Mode/Burst Mode/Edge Detection/Byte, Word,
  41287. Longword, Quadword/External Device → External Bus Data Transfer
  41288.  
  41289. 803
  41290.  
  41291. ----------------------- Page 820-----------------------
  41292.  
  41293. CLK
  41294.  
  41295.  
  41296.  
  41297.  
  41298.  
  41299.  
  41300.  
  41301. A25–A0 RA CA
  41302.  
  41303. D63–D0 DTR D0 D1 D2 D3
  41304.  
  41305. ID = 1, 2, or 3
  41306. RAS,
  41307. BA RD
  41308. CAS, WE
  41309.  
  41310.  
  41311.  
  41312. ID1, ID0 01 or 10 or 11
  41313.  
  41314. Figure G.21 Single Address Mode/Burst Mode/32-Byte Block Transfer/DMA Transfer
  41315. Request to Channels 1–3 Using Data Bus
  41316.  
  41317. 804
  41318.  
  41319. ----------------------- Page 821-----------------------
  41320.  
  41321. CLK
  41322.  
  41323.  
  41324.  
  41325.  
  41326.  
  41327.  
  41328.  
  41329. A25–A0 RA CA
  41330.  
  41331. D63–D0 D0 D1 D2 D3
  41332.  
  41333. RAS,
  41334. BA RD
  41335. CAS, WE
  41336.  
  41337.  
  41338.  
  41339. ID1, ID0 10
  41340.  
  41341. No DTR cycle, so requests can be made at any time
  41342.  
  41343. Figure G.22 Single Address Mode/Burst Mode/32-Byte Block Transfer/
  41344. External Bus → External Device Data Transfer/
  41345. Direct Data Transfer Request to Channel 2 without Using Data Bus
  41346.  
  41347. 805
  41348.  
  41349. ----------------------- Page 822-----------------------
  41350.  
  41351. Four requests can be queued Handshaking is necessary
  41352.  
  41353. to send additional requests
  41354.  
  41355. CLK
  41356.  
  41357. 3rd 4th 5th
  41358.  
  41359.  
  41360.  
  41361.  
  41362.  
  41363. No more requests
  41364.  
  41365.  
  41366.  
  41367. A25–A0 RA CA CA CA
  41368.  
  41369. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  41370.  
  41371. RAS,
  41372. CAS, WE BA RD RD RD NOP
  41373.  
  41374.  
  41375.  
  41376. ID1, ID0
  41377.  
  41378. Must be ignored
  41379. (no request transmitted)
  41380.  
  41381. Figure G.23 Single Address Mode/Burst Mode/External Bus → External Device Data
  41382. Transfer/Direct Data Transfer Request to Channel 2
  41383.  
  41384. 806
  41385.  
  41386. ----------------------- Page 823-----------------------
  41387.  
  41388. Four requests can be queued Handshaking is necessary
  41389.  
  41390. to send additional requests
  41391.  
  41392. CLK
  41393.  
  41394. 3rd 4th 5th
  41395.  
  41396.  
  41397.  
  41398.  
  41399.  
  41400.  
  41401.  
  41402. A25–A0 RA CA CA CA
  41403.  
  41404. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  41405.  
  41406. RAS,
  41407. BA WT WT WT NOP
  41408. CAS, WE
  41409.  
  41410.  
  41411.  
  41412. ID1, ID0
  41413.  
  41414. Must be ignored
  41415. (no request transmitted)
  41416.  
  41417. Figure G.24 Single Address Mode/Burst Mode/External Device → External Bus Data
  41418. Transfer/Direct Data Transfer Request to Channel 2
  41419.  
  41420. 807
  41421.  
  41422. ----------------------- Page 824-----------------------
  41423.  
  41424. Four requests can be queued Handshaking is necessary
  41425. to send additional requests
  41426.  
  41427. CLK
  41428.  
  41429. 3rd 4th 5th
  41430.  
  41431.  
  41432.  
  41433.  
  41434.  
  41435.  
  41436.  
  41437. A25–A0 CA CA CA
  41438.  
  41439. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  41440.  
  41441. RAS,
  41442. RD RD RD NOP
  41443. CAS, WE
  41444.  
  41445.  
  41446.  
  41447. ID1, ID0
  41448.  
  41449. Must be ignored
  41450. (no request transmitted)
  41451.  
  41452. Figure G.25 Single Address Mode/Burst Mode/External Bus → External Device Data
  41453. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  41454.  
  41455. 808
  41456.  
  41457. ----------------------- Page 825-----------------------
  41458.  
  41459. Four requests can be queued
  41460. Handshaking is necessary
  41461. to send additional requests
  41462.  
  41463. CLK
  41464.  
  41465. 3rd 4th 5th
  41466.  
  41467.  
  41468.  
  41469.  
  41470.  
  41471.  
  41472.  
  41473. A25–A0 CA CA CA
  41474.  
  41475. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  41476.  
  41477. RAS,
  41478. WT WT WT NOP
  41479. CAS, WE
  41480.  
  41481.  
  41482.  
  41483. ID1, ID0
  41484.  
  41485. Must be ignored
  41486. (no request transmitted)
  41487.  
  41488. Figure G.26 Single Address Mode/Burst Mode/External Device → External Bus Data
  41489. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  41490.  
  41491. 809
  41492.  
  41493. ----------------------- Page 826-----------------------
  41494.  
  41495. SH7750 Hardware Manual
  41496.  
  41497. Publication Date:1st Edition, August 1998
  41498. 2nd Edition, March 1999
  41499. Published by: Electronic Devices Sales & Marketing Group
  41500. Hitachi, Ltd.
  41501. Edited by: Technical Documentation Group
  41502. UL Media Co., Ltd.
  41503. Copyright © Hitachi, Ltd., 1998. All rights reserved. Printed in
  41504. 810 Japan.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement