atreyu187

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

Jan 4th, 2013
605
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. Pφ
  12878.  
  12879. Internal clock
  12880.  
  12881. TCNT N + 1 N N – 1
  12882.  
  12883. Figure 12.4 Count Timing when Operating on Internal Clock
  12884.  
  12885. • Operating on external clock
  12886.  
  12887. External clock pin (TCLK) input can be selected as the timer clock by means of the TPSC2–
  12888. TPSC0 bits in TCR. The detected edge (rising, falling, or both edges) can be selected with the
  12889. CKEG1 and CKEG0 bits in TCR.
  12890.  
  12891. Figure 12.5 shows the timing for both-edge detection.
  12892.  
  12893. Pφ
  12894.  
  12895. External clock
  12896. input pin
  12897.  
  12898. TCNT N + 1 N N – 1
  12899.  
  12900. Figure 12.5 Count Timing when Operating on External Clock
  12901.  
  12902. • Operating on on-chip RTC output clock
  12903.  
  12904. The on-chip RTC output clock can be selected as the timer clock by means of the TPSC2–
  12905. TPSC0 bits in TCR. Figure 12.6 shows the timing in this case.
  12906.  
  12907. 253
  12908.  
  12909. ----------------------- Page 270-----------------------
  12910.  
  12911. RTC output clock
  12912.  
  12913. TCNT N + 1 N N – 1
  12914.  
  12915. Figure 12.6 Count Timing when Operating on On-Chip RTC Output Clock
  12916.  
  12917. 1 2 . 3 . 2 Input Capture Function
  12918.  
  12919. Channel 2 has an input capture function.
  12920.  
  12921. The procedure for using the input capture function is as follows:
  12922.  
  12923. 1. Use the TCOE bit in the timer output control register (TOCR) to set the TCLK pin to input
  12924. mode.
  12925.  
  12926. 2. Use bits TPSC2–TPSC0 in the timer control register (TCR) to set an internal clock or the on-
  12927. chip RTC output clock as the timer operating clock.
  12928.  
  12929. 3. Use bits IPCE1 and IPCE0 in TCR to specify use of the input capture function, and whether
  12930. interrupts are to generated when this function is used.
  12931.  
  12932. 4. Use bits CKEG1 and CKEG0 in TCR to specify whether the rising or falling edge of the
  12933. TCLK signal is to be used to set the timer counter (TCNT) value in the input capture register
  12934. (TCPR2).
  12935.  
  12936. This function cannot be used in standby mode.
  12937.  
  12938. When input capture occurs, the TCNT2 value is set in TCPR2 only when the ICPF bit in TCR2
  12939. is 0. Also, a new DMAC transfer request is not generated until processing of the previous request
  12940. is finished.
  12941.  
  12942. Figure 12.7 shows the operation timing when the input capture function is used (with TCLK
  12943. rising edge detection).
  12944.  
  12945. 254
  12946.  
  12947. ----------------------- Page 271-----------------------
  12948.  
  12949. TCOR value set in TCNT
  12950. TCNT value on underflow
  12951.  
  12952. TCOR
  12953.  
  12954. H'00000000 Time
  12955.  
  12956. TCLK
  12957.  
  12958. TCPR2 TCNT value set
  12959.  
  12960. TICPI2
  12961.  
  12962. Figure 12.7 Operation Timing when Using Input Capture Function
  12963.  
  12964. 1 2 . 4 Interrupts
  12965.  
  12966. There are four TMU interrupt sources, comprising underflow interrupts and the input capture
  12967. interrupt (when the input capture function is used). Underflow interrupts are generated on channels
  12968. 0 to 2, and input capture interrupts on channel 2 only.
  12969.  
  12970. An underflow interrupt request is generated (for each channel) according to the AND of UNF and
  12971. the interrupt enable bit (UNIE) in TCR.
  12972.  
  12973. When the input capture function is used and an input capture request is generated, an interrupt is
  12974. requested if the input capture input flag (ICPF) in TCR2 is 1 and the input capture control bits
  12975. (ICPE1, ICPE0) in TCR2 are 11.
  12976.  
  12977. The TMU interrupt sources are summarized in table 12.3.
  12978.  
  12979. Table 12.3 TMU Interrupt Sources
  12980.  
  12981. Channel Interrupt Source Description Priority
  12982.  
  12983. 0 TUNI0 Underflow interrupt 0 High
  12984.  
  12985. 1 TUNI1 Underflow interrupt 1 ↑
  12986.  
  12987. 2 TUNI2 Underflow interrupt 2 ↓
  12988.  
  12989. TICPI2 Input capture interrupt 2 Low
  12990.  
  12991. 255
  12992.  
  12993. ----------------------- Page 272-----------------------
  12994.  
  12995. 1 2 . 5 Usage Notes
  12996.  
  12997. 1 2 . 5 . 1 Register Writes
  12998.  
  12999. When performing a register write, timer count operation must be stopped by clearing the start bit
  13000. (STR0–STR2) for the relevant channel in the timer start register (TSTR).
  13001.  
  13002. 1 2 . 5 . 2 TCNT Register Reads
  13003.  
  13004. When performing a TCNT register read, processing for synchronization with the timer count
  13005. operation is performed. If a timer count operation and register read processing are performed
  13006. simultaneously, the TCNT counter value prior to the count-down operation is read by means of the
  13007. synchronization processing.
  13008.  
  13009. 1 2 . 5 . 3 Resetting the RTC Frequency Divider
  13010.  
  13011. When the on-chip RTC output clock is selected as the count clock, the RTC frequency divider
  13012. should be reset.
  13013.  
  13014. 1 2 . 5 . 4 External Clock Frequency
  13015.  
  13016. Ensure that the external clock frequency for any channel does not exceed Pφ/4.
  13017.  
  13018. 256
  13019.  
  13020. ----------------------- Page 273-----------------------
  13021.  
  13022. Section 13 Bus State Controller (BSC)
  13023.  
  13024. 1 3 . 1 Overview
  13025.  
  13026. The functions of the bus state controller (BSC) include division of the physical address space, and
  13027. output of control signals in accordance with various types of memory and bus interface
  13028. specifications. The BSC functions allow DRAM, synchronous DRAM, SRAM, ROM, etc., to be
  13029. connected directly to the SH7750 without the use of external circuitry, and also support the
  13030. PCMCIA interface protocol, enabling system design to be simplified and data transfers to be
  13031. carried out at high speed by a compact system.
  13032.  
  13033. 1 3 . 1 . 1 Features
  13034.  
  13035. The BSC has the following features:
  13036.  
  13037. • Physical address space is managed as 7 independent areas
  13038.  
  13039.  Maximum 64 Mbytes for each of areas 0 to 6
  13040.  
  13041.  Bus width of each area can be set in a register (except area 0, which uses an external pin
  13042. setting)
  13043.  
  13044.  Wait state insertion by RDY pin
  13045.  
  13046.  Wait state insertion can be controlled by program
  13047.  
  13048.  Specification of types of memory connectable to each area
  13049.  
  13050.  Output of control signals allowing direct connection of memory to each area
  13051.  
  13052.  Automatic wait cycle insertion to prevent data bus collisions in case of consecutive
  13053. memory accesses to different areas, or a read access followed by a write access to the same
  13054. area
  13055.  
  13056.  Write strobe setup time and hold time periods can be inserted in a write cycle to enable
  13057. connection to low-speed memory
  13058.  
  13059. • Normal memory (SRAM) interface
  13060.  
  13061.  Wait state insertion can be controlled by program
  13062.  
  13063.  Wait state insertion by RDY pin
  13064.  
  13065. Connectable areas: 0 to 6
  13066.  
  13067. Settable bus widths: 64, 32, 16, 8
  13068.  
  13069. • DRAM interface
  13070.  
  13071.  Row address/column address multiplexing according to DRAM capacity
  13072.  
  13073.  Burst operation (fast page mode, EDO mode)
  13074.  
  13075.  CAS-before-RAS refresh and self-refresh
  13076.  
  13077.  8-CAS byte control for power-down operation
  13078.  
  13079.  DRAM connection control signal timing can be controlled by register settings
  13080.  
  13081. 257
  13082.  
  13083. ----------------------- Page 274-----------------------
  13084.  
  13085.  Consecutive accesses to the same row address
  13086.  
  13087. Connectable areas: 2, 3
  13088.  
  13089. Settable bus widths: 64, 32, 16
  13090.  
  13091. • Synchronous DRAM interface
  13092.  
  13093.  Row address/column address multiplexing according to synchronous DRAM capacity
  13094.  
  13095.  Burst operation
  13096.  
  13097.  Auto-refresh and self-refresh
  13098.  
  13099.  Synchronous DRAM connection control signal timing can be controlled by register settings
  13100.  
  13101.  Consecutive accesses to the same row address
  13102.  
  13103. Connectable areas: 2, 3
  13104.  
  13105. Settable bus widths: 64, 32
  13106.  
  13107. • Burst ROM interface
  13108.  
  13109.  Wait state insertion can be controlled by program
  13110.  
  13111.  Burst operation, executing the number of transfers set in a register
  13112.  
  13113. Connectable areas: 0, 5, 6
  13114.  
  13115. Settable bus widths: 32, 16, 8
  13116.  
  13117. • MPX bus interface
  13118.  
  13119.  Address/data multiplexing
  13120.  
  13121. Connectable areas: 0 to 6
  13122.  
  13123. Settable bus widths: 64, 32
  13124.  
  13125. • Byte control SRAM interface
  13126.  
  13127.  SRAM interface with byte control
  13128.  
  13129. Connectable areas: 1, 4
  13130.  
  13131. Settable bus widths: 64, 32, 16
  13132.  
  13133. • PCMCIA interface
  13134.  
  13135.  Wait state insertion can be controlled by program
  13136.  
  13137.  Bus sizing function for I/O bus width
  13138.  
  13139. • Fine refreshing control
  13140.  
  13141.  Supports refresh operation immediately after self-refresh operation in low-power DRAM by
  13142. means of refresh counter overflow interrupt function
  13143.  
  13144. • Refresh counter can be used as interval timer
  13145.  
  13146.  Interrupt request generated by compare-match
  13147.  
  13148.  Interrupt request generated by refresh counter overflow
  13149.  
  13150. 258
  13151.  
  13152. ----------------------- Page 275-----------------------
  13153.  
  13154. 1 3 . 1 . 2 Block Diagram
  13155.  
  13156. Figure 13.1 shows a block diagram of the BSC.
  13157.  
  13158. s
  13159. u
  13160. b
  13161.  
  13162. l
  13163. a
  13164. n
  13165. r
  13166. e
  13167. Bus t
  13168. n
  13169. I
  13170. interface
  13171.  
  13172. WCR1
  13173. Wait
  13174. RDY
  13175. control unit WCR2
  13176.  
  13177. WCR3
  13178.  
  13179. CS6–CS0 Area BCR1
  13180. CE2A–CE2B control unit
  13181.  
  13182. BCR2
  13183. BS
  13184. RD
  13185. RD/WR MCR s
  13186. u
  13187. b
  13188. WE7–WE0
  13189. e
  13190. l
  13191. RAS u
  13192. d
  13193. CAS, CASxx Memory o
  13194. CKE control unit M
  13195. ICIORD, ICIOWR PCR
  13196.  
  13197. REG
  13198. IOIS16 RFCR
  13199.  
  13200. s
  13201. u
  13202. b RTCNT
  13203.  
  13204. l
  13205. a
  13206. r
  13207. e
  13208. Interrupt h Refresh
  13209. p Comparator
  13210. i
  13211. controller r control unit
  13212. e
  13213. P
  13214.  
  13215. RTCOR
  13216.  
  13217. RTCSR
  13218.  
  13219. BSC
  13220.  
  13221. WCR: Wait control register RFCR: Refresh count register
  13222. BCR: Bus control register RTCNT: Refresh timer count register
  13223. MCR: Memory control register RTCOR: Refresh time constant register
  13224. PCR: PCMCIA control register RTCSR: Refresh timer control/status register
  13225.  
  13226. Figure 13.1 Block Diagram of BSC
  13227.  
  13228. 259
  13229.  
  13230. ----------------------- Page 276-----------------------
  13231.  
  13232. 1 3 . 1 . 3 Pin Configuration
  13233.  
  13234. Table 13.1 shows the BSC pin configuration.
  13235.  
  13236. Table 13.1BSC Pins
  13237.  
  13238. Name Signals I / O Description
  13239.  
  13240. Address bus A25–A0 O Address output
  13241.  
  13242. Data bus D63–D52, I/O Data input/output
  13243. D51–D32
  13244. When port functions are used, D51–D32 cannot be
  13245. used. Leave open.
  13246.  
  13247. Data bus/port D51–D32/ I/O When port functions are not used: data input/output
  13248. PORT19–
  13249. When port functions are used: input/output port
  13250. PORT0
  13251. (input or output set for each bit by register)
  13252.  
  13253. Bus cycle start BS O Signal that indicates the start of a bus cycle
  13254.  
  13255. When using synchronous DRAM: asserted once for
  13256. a burst transfer
  13257.  
  13258. For other burst transfers: asserted each data cycle
  13259.  
  13260. Chip select 6–0 CS6–CS0 O Chip select signals that indicate the area being
  13261. accessed
  13262.  
  13263. CS5 and CS6 are also used as PCMCIA CE1A and
  13264. CE1B
  13265.  
  13266. Read/write RD/WR O Data bus input/output direction designation signal
  13267.  
  13268. Also used as the DRAM/synchronous
  13269. DRAM/PCMCIA write designation signal
  13270.  
  13271. Row address strobeRAS O RAS signal when using DRAM/synchronous DRAM
  13272.  
  13273. Read/column RD /CASS/ O Strobe signal that indicates a read cycle
  13274. address strobe/ FRAME When using synchronous DRAM: CAS signal
  13275. cycle frame
  13276. When using MPX bus: FRAME signal
  13277.  
  13278. Data enable 0 WE0 /CAS0/ O When using synchronous DRAM: selection signal for
  13279. DQM0 D7–D0
  13280.  
  13281. When using DRAM: CAS signal for D7–D0
  13282.  
  13283. In other cases: write strobe signal for D7–D0
  13284.  
  13285. Data enable 1 WE1 /CAS1/ O When using synchronous DRAM: selection signal for
  13286. DQM1 D15–D8
  13287.  
  13288. When using DRAM: CAS signal for D15–D8
  13289.  
  13290. When using PCMCIA: write strobe signal
  13291.  
  13292. In other cases: write strobe signal for D15–D8
  13293.  
  13294. 260
  13295.  
  13296. ----------------------- Page 277-----------------------
  13297.  
  13298. Table 13.1BSC Pins (cont)
  13299.  
  13300. Name Signals I / O Description
  13301.  
  13302. Data enable 2 WE2 /CAS2/ O When using synchronous DRAM: selection signal for
  13303. DQM2/ICIORD D23–D16
  13304.  
  13305. When using DRAM: CAS signal for D23–D16
  13306.  
  13307. When using PCMCIA: ICIORD signal
  13308.  
  13309. In other cases: write strobe signal for D23–D16
  13310.  
  13311. Data enable 3 WE3 /CAS3/ O When using synchronous DRAM: selection signal for
  13312. DQM3/ICIOWR D31–D24
  13313.  
  13314. When using DRAM: CAS signal for D31–D24
  13315.  
  13316. When using PCMCIA: ICIOWR signal
  13317.  
  13318. In other cases: write strobe signal for D31–D24
  13319.  
  13320. Data enable 4 WE4 /CAS4/ O When using synchronous DRAM: selection signal for
  13321. DQM4 D39–D32
  13322.  
  13323. When using DRAM: CAS signal for D39–D32
  13324.  
  13325. In other cases: write strobe signal for D39–D32
  13326.  
  13327. Data enable 5 WE5 /CAS5/ O When using synchronous DRAM: selection signal for
  13328. DQM5 D47–D40
  13329.  
  13330. When using DRAM: CAS signal for D47–D40
  13331.  
  13332. In other cases: write strobe signal for D47–D40
  13333.  
  13334. Data enable 6 WE6 /CAS6/ O When using synchronous DRAM: selection signal for
  13335. DQM6 D55–D48
  13336.  
  13337. When using DRAM: CAS signal for D55–D48
  13338.  
  13339. In other cases: write strobe signal for D55–D48
  13340.  
  13341. Data enable 7 WE7 /CAS7/ O When using synchronous DRAM: selection signal for
  13342. DQM7/REG D63–D56
  13343.  
  13344. When using DRAM: CAS signal for D63–D56
  13345.  
  13346. When using PCMCIA: REG signal
  13347.  
  13348. In other cases: write strobe signal for D63–D56
  13349.  
  13350. Ready RDY I Wait state request signal
  13351.  
  13352. Area 0 MPX bus MD6/IOIS16 I In power-on reset: Designates area 0 bus as MPX
  13353. specification/16-bit bus (1: SRAM, 0: MPX)
  13354. I/O
  13355. When using PCMCIA: 16-bit I/O designation signal.
  13356. Valid only in little-endian mode.
  13357.  
  13358. Clock enable CKE O Synchronous DRAM clock enable control signal
  13359.  
  13360. Bus release BREQ / I Bus release request signal/bus acknowledge signal
  13361. request BSACK
  13362.  
  13363. 261
  13364.  
  13365. ----------------------- Page 278-----------------------
  13366.  
  13367. Table 13.1BSC Pins (cont)
  13368.  
  13369. Name Signals I / O Description
  13370.  
  13371. Bus use BACK/ O Bus use permission signal/bus request
  13372. permission BSREQ
  13373. Area 0 bus MD3/CE2A*1 I/O In power-on reset: external space area 0 bus width
  13374.  
  13375. width/PCMCIA MD4/CE2B*2 specification signal
  13376. card select When using PCMCIA: CE2A, CE2B
  13377.  
  13378. Endian switchover/ MD5/RAS2*3 I/O Endian specification in a power-on reset.
  13379.  
  13380. row address strobe RAS2 when DRAM is connected to area 2
  13381.  
  13382. Master/slave MD7/TXD I/O Indicates master/slave status in a power-on reset.
  13383. switchover
  13384. Serial interface TXD
  13385.  
  13386. DMAC0 DACK0 O DMAC channel 0 data acknowledge
  13387. acknowledge
  13388. signal
  13389.  
  13390. DMAC1 DACK1 O DMAC channel 1 data acknowledge
  13391. acknowledge
  13392. signal
  13393.  
  13394. Read/column RD2 O Same signal as RD /CASS/FRAME
  13395. address strobe/ This signal is used when the RD /CASS/FRAME
  13396. cycle frame 2 signal load is heavy.
  13397.  
  13398. Read/write 2 RD/WR2 O Same signal as RD/WR
  13399.  
  13400. This signal is used when the RD/WR signal load is
  13401. heavy.
  13402.  
  13403. Notes: 1. MD3/CE2A input/output switching is performed by BCR1.A56PCM. Output is selected
  13404. when BCR1.A56PCM = 1.
  13405. 2. MD4/CE2B input/output switching is performed by BCR1.A56PCM. Output is selected
  13406. when BCR1.A56PCM = 1.
  13407. 3. MD5/RAS2 input/output switching is performed by BCR1.DRAMTP. Output is selected
  13408. when BCR1.DRAMTP (2–0) = 101.
  13409.  
  13410. 262
  13411.  
  13412. ----------------------- Page 279-----------------------
  13413.  
  13414. 1 3 . 1 . 4 Register Configuration
  13415.  
  13416. The BSC has the 11 registers shown in table 13.2. In addition, the synchronous DRAM mode
  13417. register incorporated in synchronous DRAM can also be accessed as an SH7750 register. The
  13418. functions of these registers include control of direct interfaces to various types of memory, wait
  13419. states, and refreshing.
  13420.  
  13421. Table 13.2BSC Registers
  13422.  
  13423. Abbrevia- R/ W Initial P 4 Area 7 Acces
  13424. Name tion Value Address Address s Size
  13425.  
  13426. Bus control register 1 BCR1 R/W H'0000 0000 H'FF80 0000 H'1F80 0000 32
  13427.  
  13428. Bus control register 2 BCR2 R/W H'3FFC H'FF80 0004 H'1F80 0004 16
  13429.  
  13430. Wait state control WCR1 R/W H'7777 7777 H'FF80 0008 H'1F80 0008 32
  13431. register 1
  13432.  
  13433. Wait state control WCR2 R/W H'FFFE EFFF H'FF80 000C H'1F80 000C 32
  13434. register 2
  13435.  
  13436. Wait state control WCR3 R/W H'0777 7777 H'FF80 0010 H'1F80 0010 32
  13437. register 3
  13438.  
  13439. Memory control register MCR R/W H'0000 0000 H'FF80 0014 H'1F80 0014 32
  13440.  
  13441. PCMCIA control register PCR R/W H'0000 H'FF80 0018 H'1F80 0018 16
  13442.  
  13443. Refresh timer RTCSR R/W H'0000 H'FF80 001C H'1F80 001C 16
  13444. control/status register
  13445.  
  13446. Refresh timer counter RTCNT R/W H'0000 H'FF80 0020 H'1F80 0020 16
  13447.  
  13448. Refresh time constant RTCOR R/W H'0000 H'FF80 0024 H'1F80 0024 16
  13449. counter
  13450.  
  13451. Refresh count register RFCR R/W H'0000 H'FF80 0028 H'1F80 0028 16
  13452.  
  13453. Synchronous For SDMR2 W — H'FF90 xxxx* H'1F90 xxxx 8
  13454. DRAM mode area 2
  13455. registers
  13456.  
  13457. For SDMR3 H'FF94 xxxx* H'1F94 xxxx
  13458. area 3
  13459.  
  13460. Note: * For details, see section 13.2.8, Synchronous DRAM Mode Registers.
  13461.  
  13462. 263
  13463.  
  13464. ----------------------- Page 280-----------------------
  13465.  
  13466. 1 3 . 1 . 5 Overview of Areas
  13467.  
  13468. Space Divisions: The architecture of the SH7750 provides a 32-bit virtual address space. The
  13469. virtual space is divided into five areas according to the upper address value. External space
  13470. comprises a 29-bit address space, divided into eight areas.
  13471.  
  13472. The virtual space can be allocated to any external space by means of the memory management unit
  13473. (MMU). Details are given in section 3, Memory Management Unit (MMU). This section describes
  13474. the areas into which the external space is divided.
  13475.  
  13476. With the SH7750, various kinds of memory or PC cards can be connected to the seven areas of
  13477. external space as shown in table 13.3, and chip select signals (CS0–CS6, CE2A, CE2B ) are
  13478. output for each of these areas. CS0 is asserted when accessing area 0, and CS6 when accessing area
  13479. 6. When DRAM or synchronous DRAM is connected to area 2 or 3, signals such as RAS, CAS,
  13480. RD/WR, and DQM are also asserted. When the PCMCIA interface is selected for area 5 or 6,
  13481. CE2A/CE2B is asserted in addition to CS5/CS6 for the byte to be accessed.
  13482.  
  13483. 256
  13484.  
  13485. H'0000 0000 Area 0 (CS0) H'0000 0000
  13486.  
  13487. Area 1 (CS1) H'0400 0000
  13488.  
  13489. P0 and P0 and Area 2 (CS2) H'0800 0000
  13490. U0 areas U0 areas
  13491. Area 3 (CS3) H'0C00 0000
  13492.  
  13493. Area 4 (CS4) H'1000 0000
  13494.  
  13495. Area 5 (CS5) H'1400 0000
  13496. H'8000 0000
  13497. P1 area P1 area Area 6 (CS6) H'1800 0000
  13498. H'1C00 0000
  13499. H'A000 0000 Area 7 (reserved area)
  13500. P2 area P2 area H'1FFF FFFF
  13501.  
  13502. H'C000 0000
  13503. P3 area P3 area
  13504.  
  13505. H'E000 0000 Store queue area Store queue area
  13506. H'E400 0000
  13507. P4 area P4 area
  13508. H'FFFF FFFF
  13509.  
  13510. Physical space Virtual space External space
  13511. (MMU off) (MMU on)
  13512.  
  13513. Notes: 1. When the MMU is off (MMUCR.AT = 0), the top 3 bits of the 32-bit address are ignored, and
  13514. memory is mapped onto a fixed 29-bit external space.
  13515. 2. When the MMU is on (MMUCR.AT = 1), the P0, U0, P3, and store queue areas can be
  13516. mapped onto any external space using the TLB.
  13517. For details, see section 3, Memory Management Unit (MMU).
  13518.  
  13519. Figure 13.2 Correspondence between Virtual Address Space and External
  13520. Address Space
  13521.  
  13522. 264
  13523.  
  13524. ----------------------- Page 281-----------------------
  13525.  
  13526. Table 13.3 External Address Space Map
  13527.  
  13528. External Connectable Settable Bus
  13529. Area Addresses S i z e Memory Widths Access
  13530. S i z e
  13531. 0 H'00000000– 64 Mbytes Normal memory 8, 16, 32, 64*1 8, 16, 32, 64
  13532.  
  13533. H'03FFFFFF
  13534. Burst ROM 8, 16, 32*1
  13535.  
  13536. MPX 32, 64*1
  13537.  
  13538. 1 H'04000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13539.  
  13540. H'07FFFFFF
  13541. MPX 32, 64*2
  13542.  
  13543. 2
  13544. Byte control SRAM 16, 32, 64*
  13545. 2 H'08000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13546.  
  13547. H'0BFFFFFF
  13548.  
  13549. 2, 3
  13550. Synchronous DRAM 32, 64* *
  13551. 2,*3
  13552. DRAM 16, 32*
  13553. MPX 32, 64*2
  13554.  
  13555. 3 H'0C000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13556.  
  13557. H'0FFFFFFF
  13558.  
  13559. 2, 3
  13560. Synchronous DRAM 32, 64* *
  13561. 2,*3
  13562. DRAM 16, 32, 64*
  13563. MPX 32, 64*2
  13564.  
  13565. 4 H'10000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13566.  
  13567. H'13FFFFFF
  13568. MPX 32, 64*2
  13569.  
  13570. 2
  13571. Byte control RAM 16, 32, 64*
  13572. 5 H'14000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13573.  
  13574. H'17FFFFFF
  13575. MPX 32, 64*2
  13576.  
  13577. Burst ROM 8, 16, 32*2
  13578.  
  13579. PCMCIA 8, 16*2,*4
  13580.  
  13581. 6 H'18000000– 64 Mbytes Normal memory 8, 16, 32, 64*2 8, 16, 32, 64
  13582.  
  13583. H'1BFFFFFF
  13584. MPX 32, 64*2
  13585.  
  13586. Burst ROM 8,16, 32*2
  13587.  
  13588. PCMCIA 8,16*2,*4
  13589.  
  13590. 7*5 H'1C000000– 64 Mbytes — — n: 0 to 7
  13591.  
  13592. H'1FFFFFFF
  13593.  
  13594. Notes: 1. Memory bus width specified by external pins
  13595.  
  13596. 265
  13597.  
  13598. ----------------------- Page 282-----------------------
  13599.  
  13600. 2. Memory bus width specified by register
  13601. 3. With synchronous DRAM interface, bus width is 32 or 64 bits only.
  13602. With DRAM interface, bus width is 16 or 32 bits only for area 2, and 16, 32, or 64 bits
  13603. only for area 3.
  13604. 4. With PCMCIA interface, bus width is 8 or 16 bits only.
  13605. 5. Do not access a reserved area, as operation cannot be guaranteed in this case.
  13606.  
  13607. Area 0: H'00000000 Normal memory/burst ROM/MPX
  13608.  
  13609. Area 1: H'04000000 Normal memory/MPX/byte control
  13610. SRAM
  13611.  
  13612. Area 2: H'08000000 Normal memory/synchronous DRAM/
  13613. DRAM/MPX
  13614.  
  13615. Area 3: H'0C000000 Normal memory/synchronous DRAM/
  13616. DRAM/MPX
  13617.  
  13618. Area 4: H'10000000 Normal memory/MPX/byte control
  13619. SRAM
  13620.  
  13621. Area 5: H'14000000 Normal memory/burst ROM/PCMCIA/
  13622. MPX
  13623. The PCMCIA interface is
  13624. Area 6: H'18000000 Normal memory/burst ROM/PCMCIA/ for memory and I/O card use
  13625.  
  13626. MPX
  13627.  
  13628. Figure 13.3 External Space Allocation
  13629.  
  13630. Memory Bus Width: In the SH7750, the memory bus width can be set independently for each
  13631. space. For area 0, a bus size of 8, 16, 32, or 64 bits can be selected in a power-on reset, using
  13632. external pins. The relationship between the external pins (MD4 and MD3) and the bus width in a
  13633. power-on reset is shown below.
  13634.  
  13635. MD4 MD3 Bus Width
  13636.  
  13637. 0 0 64 bits
  13638.  
  13639. 1 8 bits
  13640.  
  13641. 1 0 16 bits
  13642.  
  13643. 1 32 bits
  13644.  
  13645. When normal memory or ROM is used in areas 1 to 6, a bus width of 8, 16, 32, or 64 bits can be
  13646. selected with bus control register 2 (BCR2). When burst ROM is used, a bus width of 8, 16, or 32
  13647. bits can be selected. When byte control SRAM is used, a bus width of 16, 32, or 64 bits can be
  13648. selected. When the MPX bus is used, a bus width of 32 or 64 bits can be selected. When the
  13649.  
  13650. 266
  13651.  
  13652. ----------------------- Page 283-----------------------
  13653.  
  13654. DRAM interface is used, a bus width of 16, 32, or 64 bits can be selected with the memory
  13655. control register (MCR). When the DRAM interface is used for area 2 or 3, a bus width of 16 or 32
  13656. bits should be set. For the synchronous DRAM interface, set a bus width of 32 or 64 bits in the
  13657. MCR register.
  13658.  
  13659. When using the PCMCIA interface, set a bus width of 8 or 16 bits.
  13660.  
  13661. When using port functions, set a bus width of 8, 16, or 32 bits for all areas.
  13662.  
  13663. For details, see section 13.2.2, Bus Control Register 2 (BCR2), and section 13.2.6, Memory
  13664. Control Register (MCR).
  13665.  
  13666. The area 7 address range, H'1C000000 to H'1FFFFFFFF, is a reserved space and must not be used.
  13667.  
  13668. 1 3 . 1 . 6 PCMCIA Support
  13669.  
  13670. The SH7750 supports PCMCIA compliant interface specifications for physical space areas 5 and
  13671. 6.
  13672.  
  13673. The interfaces supported are basically the IC memory card interface and I/O card interface stipulated
  13674. in JEIDA specifications version 4.2 (PCMCIA2.1).
  13675.  
  13676. Physical space areas 5 and 6 support both the IC memory card interface and the I/O card interface.
  13677.  
  13678. The PCMCIA interface is supported only in little-endian mode.
  13679.  
  13680. Table 13.4 PCMCIA Interface Features
  13681.  
  13682. Item Features
  13683.  
  13684. Access Random access
  13685.  
  13686. Data bus 8/16 bits
  13687.  
  13688. Memory type Mask ROM, OTPROM, EPROM, EEPROM, flash memory, SRAM
  13689.  
  13690. Common memory capacity Max. 64 Mbytes
  13691.  
  13692. Attribute memory capacity Max. 64 Mbytes
  13693.  
  13694. Others Dynamic bus sizing for I/O bus width, access to PCMCIA interface
  13695. from address translation areas
  13696.  
  13697. 267
  13698.  
  13699. ----------------------- Page 284-----------------------
  13700.  
  13701. Table 13.5 PCMCIA Support Interfaces
  13702.  
  13703. IC Memory Card Interface I/O Card Interface Corresponding
  13704. SH7750 Pin
  13705.  
  13706. Signal Signal
  13707. Pin Name I / O Function Name I / O Function
  13708.  
  13709. 1 GND Ground GND Ground —
  13710.  
  13711. 2 D3 I/O Data D3 I/O Data D3
  13712.  
  13713. 3 D4 I/O Data D4 I/O Data D4
  13714.  
  13715. 4 D5 I/O Data D5 I/O Data D5
  13716.  
  13717. 5 D6 I/O Data D6 I/O Data D6
  13718.  
  13719. 6 D7 I/O Data D7 I/O Data D7
  13720.  
  13721. 7 CE1 I Card enable CE1 I Card enable CS5 or CS6
  13722.  
  13723. 8 A10 I Address A10 I Address A10
  13724.  
  13725. 9 OE I Output enable OE I Output enable RD
  13726.  
  13727. 10 A11 I Address A11 I Address A11
  13728.  
  13729. 11 A9 I Address A9 I Address A9
  13730.  
  13731. 12 A8 I Address A8 I Address A8
  13732.  
  13733. 13 A13 I Address A13 I Address A13
  13734.  
  13735. 14 A14 I Address A14 I Address A14
  13736.  
  13737. 15 WE /PGM I Write enable WE /PGM I Write enable WE1
  13738.  
  13739. 16 RDY /BSY O Ready/busy IREQ O Interrupt request Sensed on port
  13740.  
  13741. 17 VCC Operating VCC Operating power supply —
  13742. power supply
  13743.  
  13744. 18 VPP1 Programming VPP1 Programming/ —
  13745. power supply peripheral power supply
  13746.  
  13747. 19 A16 I Address A16 I Address A16
  13748.  
  13749. 20 A15 I Address A15 I Address A15
  13750.  
  13751. 21 A12 I Address A12 I Address A12
  13752.  
  13753. 22 A7 I Address A7 I Address A7
  13754.  
  13755. 23 A6 I Address A6 I Address A6
  13756.  
  13757. 24 A5 I Address A5 I Address A5
  13758.  
  13759. 25 A4 I Address A4 I Address A4
  13760.  
  13761. 26 A3 I Address A3 I Address A3
  13762.  
  13763. 27 A2 I Address A2 I Address A2
  13764.  
  13765. 28 A1 I Address A1 I Address A1
  13766.  
  13767. 268
  13768.  
  13769. ----------------------- Page 285-----------------------
  13770.  
  13771. Table 13.5 PCMCIA Support Interfaces (cont)
  13772.  
  13773. IC Memory Card Interface I/O Card Interface Correspondin
  13774. g SH7750 Pin
  13775.  
  13776. Signal Signal
  13777. Pin Name I / O Function Name I / O Function
  13778.  
  13779. 29 A0 I Address A0 I Address A0
  13780.  
  13781. 30 D0 I/O Data D0 I/O Data D0
  13782.  
  13783. 31 D1 I/O Data D1 I/O Data D1
  13784.  
  13785. 32 D2 I/O Data D2 I/O Data D2
  13786.  
  13787. 33 WP O Write protect IOIS16 O 16-bit I/O port IOIS16
  13788.  
  13789. 34 GND Ground GND Ground —
  13790.  
  13791. 35 GND Ground GND Ground —
  13792.  
  13793. 36 CD1 O Card detection CD1 O Card detection Sensed on port
  13794.  
  13795. 37 D11 I/O Data D11 I/O Data D11
  13796.  
  13797. 38 D12 I/O Data D12 I/O Data D12
  13798.  
  13799. 39 D13 I/O Data D13 I/O Data D13
  13800.  
  13801. 40 D14 I/O Data D14 I/O Data D14
  13802.  
  13803. 41 D15 I/O Data D15 I/O Data D15
  13804.  
  13805. 42 CE2 I Card enable CE2 I Card enable CE2A or CE2B
  13806.  
  13807. 43 RFSH I Refresh request RFSH I Refresh request Output from port
  13808.  
  13809. 44 RFU Reserved IORD I I/O read ICIORD
  13810.  
  13811. 45 RFU Reserved IOWR I I/O write ICIOWR
  13812.  
  13813. 46 A17 I Address A17 I Address A17
  13814.  
  13815. 47 A18 I Address A18 I Address A18
  13816.  
  13817. 48 A19 I Address A19 I Address A19
  13818.  
  13819. 49 A20 I Address A20 I Address A20
  13820.  
  13821. 50 A21 I Address A21 I Address A21
  13822.  
  13823. 51 VCC Power supply VCC Power supply —
  13824.  
  13825. 52 VPP2 Programming VPP2 Programming/ —
  13826. power supply peripheral power
  13827. supply
  13828.  
  13829. 53 A22 I Address A22 I Address A22
  13830.  
  13831. 54 A23 I Address A23 I Address A23
  13832.  
  13833. 55 A24 I Address A24 I Address A24
  13834.  
  13835. 56 A25 I Address A25 I Address A25
  13836.  
  13837. 269
  13838.  
  13839. ----------------------- Page 286-----------------------
  13840.  
  13841. Table 13.5 PCMCIA Support Interfaces (cont)
  13842.  
  13843. IC Memory Card Interface I/O Card Interface Correspondin
  13844. g SH7750 Pin
  13845.  
  13846. Signal Signal
  13847. Pin Name I / O Function Name I / O Function
  13848.  
  13849. 57 RFU Reserved RFU Reserved —
  13850.  
  13851. 58 RESET I Reset RESET I Reset Output from port
  13852.  
  13853. 59 WAIT O Wait request WAIT O Wait request RDY
  13854.  
  13855. 60 RFU Reserved INPACK O Input acknowledge —
  13856.  
  13857. 61 REG I Attribute memory REG I Attribute memory WE7
  13858. space select space select
  13859.  
  13860. 62 BVD2 O Battery voltage SPKR O Digital speech Sensed on port
  13861. detection signal
  13862.  
  13863. 63 BVD1 O Battery voltage STSCHG O Card status Sensed on port
  13864. detection change
  13865.  
  13866. 64 D8 I/O Data D8 I/O Data D8
  13867.  
  13868. 65 D9 I/O Data D9 I/O Data D9
  13869.  
  13870. 66 D10 I/O Data D10 I/O Data D10
  13871.  
  13872. 67 CD2 O Card detection CD2 O Card detection Sensed on port
  13873.  
  13874. 68 GND Ground GND Ground —
  13875.  
  13876. 270
  13877.  
  13878. ----------------------- Page 287-----------------------
  13879.  
  13880. 1 3 . 2 Register Descriptions
  13881.  
  13882. 1 3 . 2 . 1 Bus Control Register 1 (BCR1)
  13883.  
  13884. Bus control register 1 (BCR1) is a 32-bit readable/writable register that specifies the function, bus
  13885. cycle status, etc., of each area.
  13886.  
  13887. BCR1 is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset or
  13888. in standby mode. External memory other than area 0 should not be accessed until register
  13889. initialization is completed.
  13890.  
  13891. Bit: 31 30 29 28 27 26 25 24
  13892.  
  13893. Bit name: ENDIAN MASTER A0MPX — — — IPUP OPUP
  13894.  
  13895. Initial value: 0/1* 0/1* 0/1* 0 0 0 0 0
  13896.  
  13897. R/W: R R R R R R R/W R/W
  13898.  
  13899. Bit: 23 22 21 20 19 18 17 16
  13900.  
  13901. Bit name: — — A1MBC A4MBC BREQEN PSHR MEMMPX —
  13902.  
  13903. Initial value: 0 0 0 0 0 0 0 0
  13904.  
  13905. R/W: R R R/W R/W R/W R/W R/W R
  13906.  
  13907. Bit: 15 14 13 12 11 10 9 8
  13908.  
  13909. Bit name: HIZMEM HIZCNT A0BST2 A0BST1 A0BST0 A5BST2 A5BST1 A5BST0
  13910.  
  13911. Initial value: 0 0 0 0 0 0 0 0
  13912.  
  13913. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  13914.  
  13915. Bit: 7 6 5 4 3 2 1 0
  13916.  
  13917. Bit name: A6BST2 A6BST1 A6BST0 DRAMTP2 DRAMTP1 DRAMTP0 — A56PCM
  13918.  
  13919. Initial value: 0 0 0 0 0 0 0 0
  13920.  
  13921. R/W: R/W R/W R/W R/W R/W R/W R R/W
  13922.  
  13923. Note: * These bits sample external pin values in a power-on reset.
  13924.  
  13925. 271
  13926.  
  13927. ----------------------- Page 288-----------------------
  13928.  
  13929. Bit 31—Endian Flag (ENDIAN): Samples the value of the endian specification external pin
  13930. (MD5) in a power-on reset. The endian mode of all spaces is determined by this bit. ENDIAN is a
  13931. read-only bit.
  13932.  
  13933. Bit 31: ENDIAN Description
  13934.  
  13935. 0 In a power-on reset, the endian setting external pin (MD5) is low, designating
  13936. big-endian mode for the SH7750
  13937.  
  13938. 1 In a power-on reset, the endian setting external pin (MD5) is high,
  13939. designating little-endian mode for the SH7750
  13940.  
  13941. Bit 30—Master/Slave Flag (MASTER): Samples the value of the master/slave
  13942. specification external pin (MD7) in a power-on reset. The master/slave status of all spaces is
  13943. determined by this bit. MASTER is a read-only bit.
  13944.  
  13945. Bit 30: MASTER Description
  13946.  
  13947. 0 In a power-on reset, the master/slave setting external pin (MD7) is low,
  13948. designating master mode for the SH7750
  13949.  
  13950. 1 In a power-on reset, the master/slave setting external pin (MD7) is high,
  13951. designating slave mode for the SH7750
  13952.  
  13953. Bit 29—Area 0 Memory Type (A0MPX): Samples the value of the area 0 memory type
  13954. specification external pin (MD6) in a power-on reset. The memory type of area 0 is determined by
  13955. this bit. A0MPX is a read-only bit.
  13956.  
  13957. Bit 29: A0MPX Description
  13958.  
  13959. 0 In a power-on reset, the external pin specifying the area 0 memory type
  13960. (MD6) is low, designating the area 0 memory type as normal memory
  13961.  
  13962. 1 In a power-on reset, the external pin specifying the area 0 memory type
  13963. (MD6) is high, designating the area 0 memory type as MPX
  13964.  
  13965. Bits 28 to 26, 23, 22, 16, and 1—Reserved: These bits are always read as 0, and should
  13966. only be written with 0.
  13967.  
  13968. 272
  13969.  
  13970. ----------------------- Page 289-----------------------
  13971.  
  13972. Bit 25—Control Input Pin Pull-Up Resistor Control (IPUP): Specifies the pull-up
  13973. resistor status for control input pins (NMI, IRL0–IRL3, BREQ , MD6/IOIS16, RDY ). IPUP is
  13974. initialized by a power-on reset.
  13975.  
  13976. Bit 25: IPUP Description
  13977.  
  13978. 0 Pull-up resistor is on for control input pins (NMI, IRL0 –IRL3 , BREQ ,
  13979. MD6/IOIS16, RDY ) (Initial value)
  13980.  
  13981. 1 Pull-up resistor is off for control input pins (NMI, IRL0 –IRL3 , BREQ ,
  13982. MD6/IOIS16, RDY )
  13983.  
  13984. Bit 24—Control Output Pin Pull-Up Resistor Control (OPUP): Specifies the pull-
  13985. up resistor status for control output pins (A[25:0], BS, CSn, RD , WEn , RD/WR, RAS, RAS2,
  13986. CE2A, CE2B , RD2 , RD/WR2) when high-impedance. OPUP is initialized by a power-on reset.
  13987.  
  13988. Bit 24: OPUP Description
  13989.  
  13990. 0 Pull-up resistor is on for control output pins (A[25:0], BS, CSn, RD , WEn ,
  13991. RD/WR, RAS, RAS2, CE2A, CE2B, RD2 , RD/WR2 ) (Initial value)
  13992.  
  13993. 1 Pull-up resistor is off for control output pins (A[25:0], BS, CSn, RD , WEn ,
  13994. RD/WR, RAS, RAS2, CE2A, CE2B, RD2 , RD/WR2 )
  13995.  
  13996. Bit 21—Area 1 SRAM Byte Control Mode (A1MBC): MPX has priority when an
  13997. MPX bus specification is made. This bit is initialized by a power-on reset.
  13998.  
  13999. Bit 21: A1MBC Description
  14000.  
  14001. 0 Area 1 SRAM is set to normal mode (Initial value)
  14002.  
  14003. 1 Area 1 SRAM is set to byte control mode
  14004.  
  14005. Bit 20—Area 4 SRAM Byte Control Mode (A4MBC): MPX has priority when an
  14006. MPX bus specification is made. This bit is initialized by a power-on reset.
  14007.  
  14008. Bit 20: A4MBC Description
  14009.  
  14010. 0 Area 4 SRAM is set to normal mode (Initial value)
  14011.  
  14012. 1 Area 4 SRAM is set to byte control mode
  14013.  
  14014. 273
  14015.  
  14016. ----------------------- Page 290-----------------------
  14017.  
  14018. Bit 19—BREQ Enable (BREQEN): Indicates whether external requests can be accepted.
  14019. BREQEN is initialized to the external request acceptance disabled state by a power-on reset. It is
  14020. ignored in the case of a slave mode startup.
  14021.  
  14022. Bit 19: BREQEN Description
  14023.  
  14024. 0 External requests are not accepted (Initial value)
  14025.  
  14026. 1 External requests are accepted
  14027.  
  14028. Bit 18—Partial-Sharing Bit (PSHR): Sets partial-sharing mode. PSHR is valid only in
  14029. the case of a master mode startup.
  14030.  
  14031. Bit 18: PSHR Description
  14032.  
  14033. 0 Master mode (Initial value)
  14034.  
  14035. 1 Partial-sharing mode
  14036.  
  14037. Bit 17—Area 1 to 6 MPX Bus Specification (MEMMPX): Sets the MPX bus when
  14038. areas 1 to 6 are set as normal memory (or burst ROM). MEMMPX is initialized by a power-on
  14039. reset.
  14040.  
  14041. Bit 17: MEMMPX Description
  14042.  
  14043. 0 Basic interface (or burst ROM interface) is selected when areas 1 to 6 are
  14044. set as normal memory (or burst ROM) (Initial value)
  14045.  
  14046. 1 MPX bus interface is selected when areas 1 to 6 are set as normal memory
  14047. (or burst ROM)
  14048.  
  14049. Bit 15—High-Z Control (HIZMEM): Specifies the state of address and other signals
  14050. (A[25:0], BS, CSn, RD/WR, CE2A, CE2B , RD/WR2) in standby mode.
  14051.  
  14052. Bit 15: HIZMEM Description
  14053.  
  14054. 0 The A[25:0], BS, CSn, RD/WR, CE2A, CE2B, and RD/WR2 signals go to
  14055. high-impedance (High-Z) in standby mode and when the bus is released
  14056. (Initial value)
  14057.  
  14058. 1 The A[25:0], BS, CSn, RD/WR, CE2A, CE2B, and RD/WR2 signals drive in
  14059. standby mode
  14060.  
  14061. 274
  14062.  
  14063. ----------------------- Page 291-----------------------
  14064.  
  14065. Bit 14—High-Z Control (HIZCNT): Specifies the state of the RAS and CAS signals in
  14066. standby mode and when the bus is released.
  14067.  
  14068. Bit 14: HIZCNT Description
  14069.  
  14070. 0 The RAS, RAS2, WEn /CASn/DQMn, RD /CASS/FRAME , and RD2 signals go
  14071. to high-impedance (High-Z) in standby mode and when the bus is released
  14072. (Initial value)
  14073.  
  14074. 1 The RAS, RAS2, WEn /CASn/DQMn, RD /CASS/FRAME , and RD2 signals
  14075. drive in standby mode and when the bus is released
  14076.  
  14077. Bits 13 to 11—Area 0 Burst ROM Control (A0BST2–A0BST0): These bits specify
  14078. whether burst ROM is used in external space area 0. When burst ROM is used, they also specify
  14079. the number of accesses in a burst. If area 0 is an MPX interface area, these bits are ignored.
  14080.  
  14081. Bit 13: A0BST2Bit 12: A0BST1Bit 11: A0BST0Description
  14082.  
  14083. 0 0 0 Area 0 is accessed as normal memory
  14084. (Initial value)
  14085.  
  14086. 1 Area 0 is accessed as burst ROM (4
  14087. consecutive accesses)
  14088.  
  14089. Can be used with 8-, 16-, or 32-bit bus
  14090. width
  14091.  
  14092. 1 0 Area 0 is accessed as burst ROM (8
  14093. consecutive accesses)
  14094.  
  14095. Can be used with 8-, 16-, or 32-bit bus
  14096. width
  14097.  
  14098. 1 Area 0 is accessed as burst ROM (16
  14099. consecutive accesses)
  14100.  
  14101. Can only be used with 8- or 16-bit bus
  14102. width. Do not specify for 32-bit bus width
  14103.  
  14104. 1 0 0 Area 0 is accessed as burst ROM (32
  14105. consecutive accesses)
  14106.  
  14107. Can only be used with 8-bit bus width
  14108.  
  14109. 1 Reserved
  14110.  
  14111. 1 0 Reserved
  14112.  
  14113. 1 Reserved
  14114.  
  14115. 275
  14116.  
  14117. ----------------------- Page 292-----------------------
  14118.  
  14119. Bits 10 to 8—Area 5 Burst Enable (A5BST2–A5BST0): These bits specify whether
  14120. burst ROM is used in external space area 5. When burst ROM is used, they also specify the
  14121. number of accesses in a burst. If area 5 is an MPX interface area, these bits are ignored.
  14122.  
  14123. Bit 10: A5BST2Bit 9: A5BST1 Bit 8: A5BST0 Description
  14124.  
  14125. 0 0 0 Area 5 is accessed in normal mode
  14126. (Initial value)
  14127.  
  14128. 1 Area 5 is burst-accessed (4 consecutive
  14129. accesses)
  14130.  
  14131. Can be used with 8-, 16-, or 32--bit bus
  14132. width
  14133.  
  14134. 1 0 Area 5 is burst-accessed (8 consecutive
  14135. accesses)
  14136.  
  14137. Can be used with 8-, 16-, or 32-bit bus
  14138. width
  14139.  
  14140. 1 Area 5 is burst-accessed (16 consecutive
  14141. accesses)
  14142.  
  14143. Can only be used with 8- or 16-bit bus
  14144. width. Do not specify for 32-bit bus width
  14145.  
  14146. 1 0 0 Area 5 is burst-accessed (32 consecutive
  14147. accesses)
  14148.  
  14149. Can only be used with 8-bit bus width
  14150.  
  14151. 1 Reserved
  14152.  
  14153. 1 0 Reserved
  14154.  
  14155. 1 Reserved
  14156.  
  14157. Note: Clear to 0 when PCMCIA is used.
  14158.  
  14159. 276
  14160.  
  14161. ----------------------- Page 293-----------------------
  14162.  
  14163. Bits 7 to 5—Area 6 Burst Enable (A6BST2–A6BST0): These bits specify whether
  14164. burst ROM is used in external space area 6. When burst ROM is used, they also specify the
  14165. number of accesses in a burst. If area 6 is an MPX interface area, these bits are ignored.
  14166.  
  14167. Bit 7: A6BST2 Bit 6: A6BST1 Bit 5: A6BST0 Description
  14168.  
  14169. 0 0 0 Area 6 is accessed in normal mode
  14170. (Initial value)
  14171.  
  14172. 1 Area 6 is burst-accessed (4 consecutive
  14173. accesses)
  14174.  
  14175. Can be used with 8-, 16-, or 32--bit bus
  14176. width
  14177.  
  14178. 1 0 Area 6 is burst-accessed (8 consecutive
  14179. accesses)
  14180.  
  14181. Can be used with 8-, 16-, or 32-bit bus
  14182. width
  14183.  
  14184. 1 Area 6 is burst-accessed (16 consecutive
  14185. accesses)
  14186.  
  14187. Can only be used with 8- or 16-bit bus
  14188. width. Do not specify for 32-bit bus width
  14189.  
  14190. 1 0 0 Area 6 is burst-accessed (32 consecutive
  14191. accesses)
  14192.  
  14193. Can only be used with 8-bit bus width
  14194.  
  14195. 1 Reserved
  14196.  
  14197. 1 0 Reserved
  14198.  
  14199. 1 Reserved
  14200.  
  14201. Note: Clear to 0 when PCMCIA is used.
  14202.  
  14203. 277
  14204.  
  14205. ----------------------- Page 294-----------------------
  14206.  
  14207. Bits 4 to 2—Area 2 and 3 Memory Type (DRAMTP2–DRAMTP0): These bits
  14208. specify the type of memory connected to external space areas 2 and 3. ROM, SRAM, flash ROM,
  14209. etc., can be directly connected as normal memory. DRAM and synchronous DRAM can also be
  14210. directly connected.
  14211.  
  14212. Bit 4: Bit 3: Bit 2: Description
  14213. DRAMTP2 DRAMTP1 DRAMTP0
  14214.  
  14215. 0 0 0 Areas 2 and 3 are normal memory or
  14216. MPX*1
  14217.  
  14218. (Initial value)
  14219.  
  14220. 1 Reserved (Cannot be set)
  14221.  
  14222. 1
  14223. 1 0 Area 2 is normal memory or MPX* , area 3
  14224. is synchronous DRAM
  14225.  
  14226. 1 Areas 2 and 3 are synchronous DRAM
  14227.  
  14228. 1
  14229. 1 0 0 Area 2 is normal memory or MPX* , area 3
  14230. is DRAM
  14231. 1 Areas 2 and 3 are DRAM*2
  14232.  
  14233. 1 0 Reserved (Cannot be set)
  14234.  
  14235. 1 Reserved (Cannot be set)
  14236.  
  14237. Note: 1. Selection of normal memory or MPX is determined by the setting of the MEMMPX bit
  14238. 2. When this mode is selected, 16 or 32 bits should be specified as the bus width for areas
  14239. 2 and 3. In this mode the MD5 pin is designated for output as the RAS2 pin.
  14240.  
  14241. Bit 0—Area 5 and 6 Bus Type (A56PCM): Specifies whether external space areas 5 and 6
  14242. are accessed as PCMCIA space. The setting of these bits has priority over the MEMMPX and
  14243. AnBST bit settings.
  14244.  
  14245. Bit 0: A56PCM Description
  14246.  
  14247. 0 External space areas 5 and 6 are accessed as normal memory(Initial value)
  14248.  
  14249. 1 External space areas 5 and 6 are accessed as PCMCIA space*
  14250.  
  14251. Note: * The MD3 pin is designated for output as theCE2A pin.
  14252. The MD4 pin is designated for output as the CE2B pin.
  14253.  
  14254. 278
  14255.  
  14256. ----------------------- Page 295-----------------------
  14257.  
  14258. 1 3 . 2 . 2 Bus Control Register 2 (BCR2)
  14259.  
  14260. Bus control register 2 (BCR2) is a 16-bit readable/writable register that specifies the bus width for
  14261. each area, and whether a 16-bit port is used.
  14262.  
  14263. BCR2 is initialized to H'3FFC by a power-on reset, but is not initialized by a manual reset or in
  14264. standby mode. External memory other than area 0 should not be accessed until register
  14265. initialization is completed.
  14266.  
  14267. Bit: 15 14 13 12 11 10 9 8
  14268.  
  14269. Bit name: A0SZ1 A0SZ0 A6SZ1 A6SZ0 A5SZ1 A5SZ0 A4SZ1 A4SZ0
  14270.  
  14271. Initial value: 0/1* 0/1* 1 1 1 1 1 1
  14272.  
  14273. R/W: R R R/W R/W R/W R/W R/W R/W
  14274.  
  14275. Bit: 7 6 5 4 3 2 1 0
  14276.  
  14277. Bit name: A3SZ1 A3SZ0 A2SZ1 A2SZ0 A1SZ1 A0SZ0 — PORTEN
  14278.  
  14279. Initial value: 1 1 1 1 1 1 0 0
  14280.  
  14281. R/W: R/W R/W R/W R/W R/W R/W — R/W
  14282.  
  14283. Note: * These bits sample the values of the external pins that specify the area 0 bus size.
  14284.  
  14285. Bits 15 and 14—Area 0 Bus Width (A0SZ1, A0SZ0): These bits sample the external
  14286. pins (MD3 and MD4) that specify the bus size in a power-on reset. They are read-only bits.
  14287.  
  14288. Bits 2n + 1, 2n—Area n (1 to 6) Bus Width Specification (AnSZ1, AnSZ0):
  14289. These bits specify the bus width of physical space area n (n = 1 to 6).
  14290.  
  14291. (Bit 0): Bit 2n + 1: AnSZ1 Bit 2n: AnSZ0 Description
  14292. PORTEN
  14293.  
  14294. 0 0 0 Bus width is 64 bits (Initial value)
  14295.  
  14296. 1 Bus width is 8 bits
  14297.  
  14298. 1 0 Bus width is 16 bits
  14299.  
  14300. 1 Bus width is 32 bits
  14301.  
  14302. 1 0 0 Reserved (Setting prohibited)
  14303.  
  14304. 1 Bus width is 8 bits
  14305.  
  14306. 1 0 Bus width is 16 bits
  14307.  
  14308. 1 Bus width is 32 bits
  14309.  
  14310. Bit 1—Reserved: This bit is always read as 0, and should only be written with 0.
  14311.  
  14312. 279
  14313.  
  14314. ----------------------- Page 296-----------------------
  14315.  
  14316. Bit 0—Port Function Enable (PORTEN): Specifies whether pins D51 to D32 are used as
  14317. a 20-bit port. When this function is used, a bus width of 8, 16, or 32 bits should be set for all
  14318. areas.
  14319.  
  14320. Bit 0: PORTEN Description
  14321.  
  14322. 0 D51 to D32 are not used as a port (Initial value)
  14323.  
  14324. 1 D51 to D32 are used as a port
  14325.  
  14326. 1 3 . 2 . 3 Wait Control Register 1 (WCR1)
  14327.  
  14328. Wait control register 1 (WCR1) is a 32-bit readable/writable register that specifies the number of
  14329. idle state insertion cycles for each area. With some kinds of memory, data bus drive does not go off
  14330. immediately after the read signal from off-chip goes off. As a result, there is a possibility of a data
  14331. bus collision when consecutive memory accesses are performed on memory in different areas, or
  14332. when a memory write is performed immediately after a read. In the SH7750, the number of idle
  14333. cycles set in the WCR1 register are inserted automatically if there is a possibility of this kind of
  14334. data bus collision.
  14335.  
  14336. WCR1 is initialized to H'77777777 by a power-on reset, but is not initialized by a manual reset or
  14337. in standby mode.
  14338.  
  14339. Bit: 31 30 29 28 27 26 25 24
  14340.  
  14341. Bit name: — DMAIW2 DMAIW1 DMAIW0 — A6IW2 A6IW1 A6IW0
  14342.  
  14343. Initial value: 0 1 1 1 0 1 1 1
  14344.  
  14345. R/W: R R/W R/W R/W R R/W R/W R/W
  14346.  
  14347. Bit: 23 22 21 20 19 18 17 16
  14348.  
  14349. Bit name: — A5IW2 A5IW1 A5IW0 — A4IW2 A4IW1 A4IW0
  14350.  
  14351. Initial value: 0 1 1 1 0 1 1 1
  14352.  
  14353. R/W: R R/W R/W R/W R R/W R/W R/W
  14354.  
  14355. Bit: 15 14 13 12 11 10 9 8
  14356.  
  14357. Bit name: — A3IW2 A3IW1 A3IW0 — A2IW2 A2IW1 A2IW0
  14358.  
  14359. Initial value: 0 1 1 1 0 1 1 1
  14360.  
  14361. R/W: R R/W R/W R/W R R/W R/W R/W
  14362.  
  14363. 280
  14364.  
  14365. ----------------------- Page 297-----------------------
  14366.  
  14367. Bit: 7 6 5 4 3 2 1 0
  14368.  
  14369. Bit name: — A1IW2 A1IW1 A1IW0 — A0IW2 A0IW1 A0IW0
  14370.  
  14371. Initial value: 0 1 1 1 0 1 1 1
  14372.  
  14373. R/W: R R/W R/W R/W R R/W R/W R/W
  14374.  
  14375. Bits 31, 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0, and
  14376. should only be written with 0.
  14377.  
  14378. Bits 30 to 28— DMAIW-DACK Device Inter-Cycle Idle Specification
  14379. (DMAIW2–DMAIW0): These bits specify the number of idle cycles between bus cycles to be
  14380. inserted when switching from a DACK device to another space, or from a read access to a write
  14381. access on the same device. The DMAIW bits are valid only for DMA single address transfer; with
  14382. DMA dual address transfer, inter-area idle cycles are inserted.
  14383.  
  14384. Bits 4n + 2 to 4n—Area n (6 to 0) Inter-Cycle Idle Specification (AnlW2–
  14385. AnlW0): These bits specify the number of idle cycles between bus cycles to be inserted when
  14386. switching from external space area n (n = 6 to 0) to another space, or from a read access to a write
  14387. access in the same space.
  14388.  
  14389. DMAIW2/AnIW2 DMAIW1/AnIW1 DMAIW0/AnIW0 Inserted Idle Cycles
  14390.  
  14391. 0 0 0 0
  14392.  
  14393. 1 1
  14394.  
  14395. 1 0 2
  14396.  
  14397. 1 3
  14398.  
  14399. 1 0 0 6
  14400.  
  14401. 1 9
  14402.  
  14403. 1 0 12
  14404.  
  14405. 1 15 (Initial value)
  14406.  
  14407. • Idle Insertion between Accesses
  14408.  
  14409. 281
  14410.  
  14411. ----------------------- Page 298-----------------------
  14412.  
  14413. Preceding Following Cycle Same Differen
  14414. Cycle Area t Area
  14415.  
  14416. Same Area Different Area
  14417.  
  14418. Read Write Read Write MP X MP X
  14419. Address Address
  14420. Output Output
  14421.  
  14422. CPU DMA CPU DMA CPU DMA CPU DMA
  14423.  
  14424. Read M M M M M M M (1) M (1)
  14425.  
  14426. Write M M M M M (1)
  14427.  
  14428. DMA read M M M M M M — M (1)
  14429. (memory →
  14430. device)
  14431.  
  14432. DMA write D D D D* D D D D — D (1)
  14433. (device →
  14434. memory)
  14435.  
  14436. M, D: WCR1 wait insertion
  14437. (One cycle inserted in MPX access even if WCR1 is cleared to 0)
  14438. M: Memory setting (area 0 to area 6)
  14439. D: DMA setting
  14440. * : No insertion in consecutive accesses to same device
  14441. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  14442. and bits A3IW2–A3IW0 to 000.
  14443.  
  14444. 1 3 . 2 . 4 Wait Control Register 2 (WCR2)
  14445.  
  14446. Wait control register 2 (WCR2) is a 32-bit readable/writable register that specifies the number of
  14447. wait state insertion cycles for each area. It also specifies the data access pitch when performing
  14448. burst memory access. This enables low-speed memory to be directly connected without using
  14449. external circuitry.
  14450.  
  14451. WCR2 is initialized to H'FFFEEFFF by a power-on reset, but is not initialized by a manual reset
  14452. or in standby mode.
  14453.  
  14454. 282
  14455.  
  14456. ----------------------- Page 299-----------------------
  14457.  
  14458. Bit: 31 30 29 28 27 26 25 24
  14459.  
  14460. Bit name: A6W2 A6W1 A6W0 A6B2 A6B1 A6B0 A5W2 A5W1
  14461.  
  14462. Initial value: 1 1 1 1 1 1 1 1
  14463.  
  14464. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14465.  
  14466. Bit: 23 22 21 20 19 18 17 16
  14467.  
  14468. Bit name: A5W0 A5B2 A5B1 A5B0 A4W2 A4W1 A4W0 —
  14469.  
  14470. Initial value: 1 1 1 1 1 1 1 0
  14471.  
  14472. R/W: R/W R/W R/W R/W R/W R/W R/W R
  14473.  
  14474. Bit: 15 14 13 12 11 10 9 8
  14475.  
  14476. Bit name: A3W2 A3W1 A3W0 — A2W2 A2W1 A2W0 A1W2
  14477.  
  14478. Initial value: 1 1 1 0 1 1 1 1
  14479.  
  14480. R/W: R/W R/W R/W R R/W R/W R/W R/W
  14481.  
  14482. Bit: 7 6 5 4 3 2 1 0
  14483.  
  14484. Bit name: A1W1 A1W0 A0W2 A0W1 A0W0 A0B2 A0B1 A0B0
  14485.  
  14486. Initial value: 1 1 1 1 1 1 1 1
  14487.  
  14488. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14489.  
  14490. Bits 31 to 29—Area 6 Wait Control (A6W2—A6W0): These bits specify the number
  14491. of wait states to be inserted for external space area 6.
  14492.  
  14493. Description
  14494.  
  14495. First Cycle
  14496.  
  14497. Bit 31: A6W2 Bit 30: A6W1 Bit 29: A6W0 Inserted Wait States RDY Pin
  14498.  
  14499. 0 0 0 0 Ignored
  14500.  
  14501. 1 1 Enabled
  14502.  
  14503. 1 0 2 Enabled
  14504.  
  14505. 1 3 Enabled
  14506.  
  14507. 1 0 0 6 Enabled
  14508.  
  14509. 1 9 Enabled
  14510.  
  14511. 1 0 12 Enabled
  14512.  
  14513. 1 15 (Initial value) Enabled
  14514.  
  14515. 283
  14516.  
  14517. ----------------------- Page 300-----------------------
  14518.  
  14519. Bits 28 to 26—Area 6 Burst Pitch (A6B2–A6B0): These bits specify the burst pitch in
  14520. a burst transfer.
  14521.  
  14522. Description
  14523.  
  14524. Burst Cycle (Excluding First Cycle)
  14525.  
  14526. Bit 28: A6B2 Bit 27: A6B1 Bit 26: A6B0 States Per Data RDY Pin
  14527. Transfer
  14528.  
  14529. 0 0 0 0 Ignored
  14530.  
  14531. 1 1 Enabled
  14532.  
  14533. 1 0 2 Enabled
  14534.  
  14535. 1 3 Enabled
  14536.  
  14537. 1 0 0 4 Enabled
  14538.  
  14539. 1 5 Enabled
  14540.  
  14541. 1 0 6 Enabled
  14542.  
  14543. 1 7 (Initial value) Enabled
  14544.  
  14545. Bits 25 to 23—Area 5 Wait Control (A5W2–A5W0): These bits specify the number of
  14546. wait states to be inserted for external space area 5.
  14547.  
  14548. Description
  14549.  
  14550. First Cycle
  14551.  
  14552. Bit 25: A5W2 Bit 24: A5W1 Bit 23: A5W0 Inserted Wait States RDY Pin
  14553.  
  14554. 0 0 0 0 Ignored
  14555.  
  14556. 1 1 Enabled
  14557.  
  14558. 1 0 2 Enabled
  14559.  
  14560. 1 3 Enabled
  14561.  
  14562. 1 0 0 6 Enabled
  14563.  
  14564. 1 9 Enabled
  14565.  
  14566. 1 0 12 Enabled
  14567.  
  14568. 1 15 (Initial value) Enabled
  14569.  
  14570. 284
  14571.  
  14572. ----------------------- Page 301-----------------------
  14573.  
  14574. Bits 22 to 20—Area 5 Burst Pitch (A5B2–A5B0): These bits specify the burst pitch in
  14575. a burst transfer.
  14576.  
  14577. Description
  14578.  
  14579. Burst Cycle (Excluding First Cycle)
  14580.  
  14581. Bit 22: A5B2 Bit 21: A5B1 Bit 20: A5B0 Burst Pitch Per Data RDY Pin
  14582. Transfer
  14583.  
  14584. 0 0 0 0 Ignored
  14585.  
  14586. 1 1 Enabled
  14587.  
  14588. 1 0 2 Enabled
  14589.  
  14590. 1 3 Enabled
  14591.  
  14592. 1 0 0 4 Enabled
  14593.  
  14594. 1 5 Enabled
  14595.  
  14596. 1 0 6 Enabled
  14597.  
  14598. 1 7 (Initial value) Enabled
  14599.  
  14600. Bits 19 to 17—Area 4 Wait Control (A4W2–A4W0): These bits specify the number of
  14601. wait states to be inserted for external space area 4.
  14602.  
  14603. Description
  14604.  
  14605. Bit 19: A4W2 Bit 18: A4W1 Bit 17: A4W0 Inserted Wait States RDY Pin
  14606.  
  14607. 0 0 0 0 Ignored
  14608.  
  14609. 1 1 Enabled
  14610.  
  14611. 1 0 2 Enabled
  14612.  
  14613. 1 3 Enabled
  14614.  
  14615. 1 0 0 6 Enabled
  14616.  
  14617. 1 9 Enabled
  14618.  
  14619. 1 0 12 Enabled
  14620.  
  14621. 1 15 (Initial value) Enabled
  14622.  
  14623. Bits 16 and 12—Reserved: These bits are always read as 0, and should only be written with
  14624. 0.
  14625.  
  14626. Bits 15 to 13—Area 3 Wait Control (A3W2–A3W0): These bits specify the number of
  14627. wait states to be inserted for external space area 3. External wait input is only enabled when
  14628. normal memory is used, and is ignored when DRAM or synchronous DRAM is used.
  14629.  
  14630. • When Normal Memory is Used
  14631.  
  14632. 285
  14633.  
  14634. ----------------------- Page 302-----------------------
  14635.  
  14636. Description
  14637.  
  14638. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Inserted Wait States RDY Pin
  14639.  
  14640. 0 0 0 0 Ignored
  14641.  
  14642. 1 1 Enabled
  14643.  
  14644. 1 0 2 Enabled
  14645.  
  14646. 1 3 Enabled
  14647.  
  14648. 1 0 0 6 Enabled
  14649.  
  14650. 1 9 Enabled
  14651.  
  14652. 1 0 12 Enabled
  14653.  
  14654. 1 15 (Initial value) Enabled
  14655.  
  14656. • When DRAM or Synchronous DRAM is Used*1
  14657.  
  14658. Description
  14659.  
  14660. DRAM CAS Synchronous
  14661. Bit 15: A3W2 Bit 14: A3W1 Bit 13: A3W0 Assertion Width DRAM CAS Latency
  14662. Cycles
  14663.  
  14664. 0 0 0 1 Inhibited
  14665. 1 2 1*2
  14666.  
  14667. 1 0 3 2
  14668.  
  14669. 1 4 3
  14670. 1 0 0 7 4*2
  14671.  
  14672. 1 10 5*2
  14673.  
  14674. 1 0 13 Inhibited
  14675.  
  14676. 1 16 Inhibited
  14677.  
  14678. Notes: 1. External wait input is always ignored.
  14679. 2. Inhibited in RAS down mode.
  14680.  
  14681. Bits 11 to 9—Area 2 Wait Control (A2W2–A2W0): These bits specify the number of
  14682. wait states to be inserted for external space area 2. External wait input is only enabled when
  14683. normal memory is used, and is ignored when DRAM or synchronous DRAM is used.
  14684.  
  14685. • When Normal Memory is Used
  14686.  
  14687. 286
  14688.  
  14689. ----------------------- Page 303-----------------------
  14690.  
  14691. Description
  14692.  
  14693. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Inserted Wait States RDY Pin
  14694.  
  14695. 0 0 0 0 Ignored
  14696.  
  14697. 1 1 Enabled
  14698.  
  14699. 1 0 2 Enabled
  14700.  
  14701. 1 3 Enabled
  14702.  
  14703. 1 0 0 6 Enabled
  14704.  
  14705. 1 9 Enabled
  14706.  
  14707. 1 0 12 Enabled
  14708.  
  14709. 1 15 (Initial value) Enabled
  14710.  
  14711. • When DRAM or Synchronous DRAM is Used*
  14712.  
  14713. Description
  14714.  
  14715. DRAM CAS Synchronous
  14716. Bit 11: A2W2 Bit 10: A2W1 Bit 9: A2W0 Assertion Width DRAM CAS Latency
  14717. Cycles
  14718.  
  14719. 0 0 0 1 Inhibited
  14720.  
  14721. 1 2 1
  14722.  
  14723. 1 0 3 2
  14724.  
  14725. 1 4 3
  14726.  
  14727. 1 0 0 7 4
  14728.  
  14729. 1 10 5
  14730.  
  14731. 1 0 13 Inhibited
  14732.  
  14733. 1 16 Inhibited
  14734.  
  14735. Note: * External wait input is always ignored.
  14736.  
  14737. 287
  14738.  
  14739. ----------------------- Page 304-----------------------
  14740.  
  14741. Bits 8 to 6—Area 1 Wait Control (A1W2–A1W0): These bits specify the number of
  14742. wait states to be inserted for external space area 1.
  14743.  
  14744. Description
  14745.  
  14746. Bit 8: A1W2 Bit 7: A1W1 Bit 6: A1W0 Inserted Wait States RDY Pin
  14747.  
  14748. 0 0 0 0 Ignored
  14749.  
  14750. 1 1 Enabled
  14751.  
  14752. 1 0 2 Enabled
  14753.  
  14754. 1 3 Enabled
  14755.  
  14756. 1 0 0 6 Enabled
  14757.  
  14758. 1 9 Enabled
  14759.  
  14760. 1 0 12 Enabled
  14761.  
  14762. 1 15 (Initial value) Enabled
  14763.  
  14764. Bits 5 to 3—Area 0 Wait Control (A0W2 to A0W0): These bits specify the number of
  14765. wait states to be inserted for external space area 0.
  14766.  
  14767. Description
  14768.  
  14769. First Cycle
  14770.  
  14771. Bit 5: A0W2 Bit 4: A0W1 Bit 3: A0W0 Inserted Wait States RDY Pin
  14772.  
  14773. 0 0 0 0 Ignored
  14774.  
  14775. 1 1 Enabled
  14776.  
  14777. 1 0 2 Enabled
  14778.  
  14779. 1 3 Enabled
  14780.  
  14781. 1 0 0 6 Enabled
  14782.  
  14783. 1 9 Enabled
  14784.  
  14785. 1 0 12 Enabled
  14786.  
  14787. 1 15 (Initial value) Enabled
  14788.  
  14789. 288
  14790.  
  14791. ----------------------- Page 305-----------------------
  14792.  
  14793. Bits 2 to 0—Area 0 Burst Pitch (A0B2–A0B0): These bits specify the burst pitch in a
  14794. burst transfer.
  14795.  
  14796. Description
  14797.  
  14798. Burst Cycle (Excluding First Cycle)
  14799.  
  14800. Bit 2: A0B2 Bit 1: A0B1 Bit 0: A0B0 Burst Pitch Per Data RDY Pin
  14801. Transfer
  14802.  
  14803. 0 0 0 0 Ignored
  14804.  
  14805. 1 1 Enabled
  14806.  
  14807. 1 0 2 Enabled
  14808.  
  14809. 1 3 Enabled
  14810.  
  14811. 1 0 0 4 Enabled
  14812.  
  14813. 1 5 Enabled
  14814.  
  14815. 1 0 6 Enabled
  14816.  
  14817. 1 7 (Initial value) Enabled
  14818.  
  14819. • When MPX is Used (Areas 0 to 6)
  14820.  
  14821. Bit 4n + 2: Bit 4n + 1: Bit 4n: Description
  14822. AnW2 AnW1 AnW0
  14823.  
  14824. Inserted Wait States RDY Pin
  14825.  
  14826. 1st Data 2nd Data
  14827. Onward
  14828.  
  14829. Read Write
  14830.  
  14831. 0 0 0 1 0 0 Enabled
  14832.  
  14833. 1 1 Enabled
  14834.  
  14835. 1 0 2 2 Enabled
  14836.  
  14837. 1 3 3 Enabled
  14838.  
  14839. 1 0 0 1 0 1 Enabled
  14840.  
  14841. 1 1 Enabled
  14842.  
  14843. 1 0 2 2 Enabled
  14844.  
  14845. 1 3 3 Enabled
  14846.  
  14847. (n = 6 to 0)
  14848.  
  14849. 289
  14850.  
  14851. ----------------------- Page 306-----------------------
  14852.  
  14853. 1 3 . 2 . 5 Wait Control Register 3 (WCR3)
  14854.  
  14855. Wait control register 3 (WCR3) is a 32-bit readable/writable register that specifies the cycles
  14856. inserted in the setup time from the address until assertion of the write strobe, and the data hold
  14857. time from negation of the strobe, for each area. This enables low-speed memory to be directly
  14858. connected without using external circuitry.
  14859.  
  14860. WCR3 is initialized to H'07777777 by a power-on reset, but is not initialized by a manual reset or
  14861. in standby mode.
  14862.  
  14863. Bit: 31 30 29 28 27 26 25 24
  14864.  
  14865. Bit name: — — — — — A6S0 A6H1 A6H0
  14866.  
  14867. Initial value: 0 0 0 0 0 1 1 1
  14868.  
  14869. R/W: R R R R R R/W R/W R/W
  14870.  
  14871. Bit: 23 22 21 20 19 18 17 16
  14872.  
  14873. Bit name: — A5S0 A5H1 A5H0 — A4S0 A4H1 A4H0
  14874.  
  14875. Initial value: 0 1 1 1 0 1 1 1
  14876.  
  14877. R/W: R R/W R/W R/W R R/W R/W R/W
  14878.  
  14879. Bit: 15 14 13 12 11 10 9 8
  14880.  
  14881. Bit name: — A3S0 A3H1 A3H0 — A2S0 A2H1 A2H0
  14882.  
  14883. Initial value: 0 1 1 1 0 1 1 1
  14884.  
  14885. R/W: R R/W R/W R/W R R/W R/W R/W
  14886.  
  14887. Bit: 7 6 5 4 3 2 1 0
  14888.  
  14889. Bit name: — A1S0 A1H1 A0H0 — A0S0 A0H1 A0H0
  14890.  
  14891. Initial value: 0 1 1 1 0 1 1 1
  14892.  
  14893. R/W: R R/W R/W R/W R R/W R/W R/W
  14894.  
  14895. Bits 31 to 27, 23, 19, 15, 11, 7, and 3—Reserved: These bits are always read as 0,
  14896. and should only be written with 0.
  14897.  
  14898. 290
  14899.  
  14900. ----------------------- Page 307-----------------------
  14901.  
  14902. Valid only for normal memory and burst ROM:
  14903.  
  14904. Bit 4n + 2—Area n (6 to 0) Write Strobe Setup Time (AnS0): Specifies the number
  14905. of cycles inserted in the setup time from the address until assertion of the read/write strobe.
  14906.  
  14907. Bit 4n + 2: AnS0 Waits Inserted in Setup
  14908.  
  14909. 0 0
  14910.  
  14911. 1 1 (Initial value)
  14912.  
  14913. (n = 6 to 0)
  14914.  
  14915. Valid only for normal memory and burst ROM:
  14916.  
  14917. Bits 4n + 1 and 4n—Area n (6 to 0) Data Hold Time (AnH1, AnH0): When
  14918. writing, these bits specify the number of cycles to be inserted in the hold time from negation of
  14919. the write strobe. When reading, they specify the number of cycles to be inserted in the hold time
  14920. from the data sampling timing.
  14921.  
  14922. Bit 4n + 1: AnH1 Bit 4n: AnH0 Waits Inserted in Hold
  14923.  
  14924. 0 0 0
  14925.  
  14926. 1 1
  14927.  
  14928. 1 0 2
  14929.  
  14930. 1 3 (Initial value)
  14931.  
  14932. (n = 6 to 0)
  14933.  
  14934. 1 3 . 2 . 6 Memory Control Register (MCR)
  14935.  
  14936. The memory control register (MCR) is a 32-bit readable/writable register that specifiesRAS and
  14937. CAS timing and burst control for DRAM and synchronous DRAM (areas 2 and 3), address
  14938. multiplexing, and refresh control. This enables DRAM and synchronous DRAM to be directly
  14939. connected without using external circuitry.
  14940.  
  14941. MCR is initialized to H'00000000 by a power-on reset, but is not initialized by a manual reset or
  14942. in standby mode. Bits RASD, MRSET, TRC2–0, TPC2–0, RCD1–0, TRWL2–0, TRAS2–0,
  14943. BE, SZ1–0, AMXEXT, AMX2–0, and EDOMODE are written in the initialization following a
  14944. power-on reset, and should not be modified subsequently. When writing to bits RFSH and
  14945. RMODE, the same values should be written to the other bits so that they remain unchanged.
  14946. When using DRAM or synchronous DRAM, areas 2 and 3 should not be accessed until register
  14947. initialization is completed.
  14948.  
  14949. 291
  14950.  
  14951. ----------------------- Page 308-----------------------
  14952.  
  14953. Bit: 31 30 29 28 27 26 25 24
  14954.  
  14955. Bit name: RASD MRSET TRC2 TRC1 TRC0 — — —
  14956.  
  14957. Initial value: 0 0 0 0 0 0 0 0
  14958.  
  14959. R/W: R/W R/W R/W R/W R/W R R R
  14960.  
  14961. Bit: 23 22 21 20 19 18 17 16
  14962.  
  14963. Bit name: TCAS — TPC2 TPC1 TPC0 — RCD1 RCD0
  14964.  
  14965. Initial value: 0 0 0 0 0 0 0 0
  14966.  
  14967. R/W: R/W R R/W R/W R/W R R/W R/W
  14968.  
  14969. Bit: 15 14 13 12 11 10 9 8
  14970.  
  14971. Bit name: TRWL2 TRWL1 TRWL0 TRAS2 TRAS1 TRAS0 BE SZ1
  14972.  
  14973. Initial value: 0 0 0 0 0 0 0 0
  14974.  
  14975. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14976.  
  14977. Bit: 7 6 5 4 3 2 1 0
  14978.  
  14979. Bit name: SZ0 AMXEXT AMX2 AMX1 AMX0 RFSH RMODE EDO
  14980. MODE
  14981.  
  14982. Initial value: 0 0 0 0 0 0 0 0
  14983.  
  14984. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  14985.  
  14986. Bit 31—RAS Down (RASD): Sets RAS down mode. When RAS down mode is used, set
  14987. BE to 1. Do not set RAS down mode in slave mode or partial-sharing mode, or when areas 2 and 3
  14988. are both designated as synchronous DRAM space.
  14989.  
  14990. Bit 31: RASD Description
  14991.  
  14992. 0 Normal mode (Initial value)
  14993.  
  14994. 1 RAS down mode
  14995.  
  14996. Note: When synchronous DRAM is used in RAS down mode, set bits DMAIW2–DMAIW0 to 000
  14997. and bits A3IW2–A3IW0 to 000.
  14998.  
  14999. Bit 30—Mode Register Set (MRSET): Set when a synchronous DRAM mode register
  15000. setting is used. See Power-On Sequence in section 13.3.5, Synchronous DRAM Interface.
  15001.  
  15002. Bit 30: MRSET Description
  15003.  
  15004. 0 All-bank precharge (Initial value)
  15005.  
  15006. 1 Mode register setting
  15007.  
  15008. 292
  15009.  
  15010. ----------------------- Page 309-----------------------
  15011.  
  15012. Bits 26 to 24, 22, and 18—Reserved: These bits are always read as 0, and should only be
  15013. written with 0.
  15014.  
  15015. Bits 29 to 27—RAS Precharge Time at End of Refresh (TRC2–TRC0)
  15016. (Synchronous DRAM: auto- and self-refresh both enabled; DRAM: auto- and self-refresh both
  15017. enabled)
  15018.  
  15019. RAS Precharge Time
  15020. Bit 29: TRC2 Bit 28: TRC1 Bit 27: TRC0 Immediately after Refresh
  15021.  
  15022. 0 0 0 0 (Initial value)
  15023.  
  15024. 1 3
  15025.  
  15026. 1 0 6
  15027.  
  15028. 1 9
  15029.  
  15030. 1 0 0 12
  15031.  
  15032. 1 15
  15033.  
  15034. 1 0 18
  15035.  
  15036. 1 21
  15037.  
  15038. Bit 23—CAS Negation Period (TCAS): This bit is valid only when DRAM is connected.
  15039.  
  15040. Bit 23: TCAS CAS Negation Period
  15041.  
  15042. 0 1 (Initial value)
  15043.  
  15044. 1 2
  15045.  
  15046. Bits 21 to 19—RAS Precharge Period (TPC2–TPC0): When the DRAM interface is
  15047. selected for the connected memory, these bits specify the minimum number of cycles until RAS is
  15048. asserted again after being negated. When the synchronous DRAM interface is selected, these bits
  15049. specify the minimum number of cycles until the next bank active command is output after
  15050. precharging.
  15051.  
  15052. 293
  15053.  
  15054. ----------------------- Page 310-----------------------
  15055.  
  15056. RAS Precharge Time
  15057.  
  15058. Bit 21: TPC2 Bit 20: TPC1 Bit 19: TPC0 DRAM Synchronous DRAM
  15059.  
  15060. 0 0 0 0 1* (Initial value)
  15061.  
  15062. 1 1 2
  15063.  
  15064. 1 0 2 3
  15065.  
  15066. 1 3 4*
  15067.  
  15068. 1 0 0 4 5*
  15069.  
  15070. 1 5 6*
  15071.  
  15072. 1 0 6 7*
  15073.  
  15074. 1 7 8*
  15075.  
  15076. Note: * Inhibited in RAS down mode.
  15077.  
  15078. Bits 17 and 16—RAS-CAS Delay (RCD1, RCD0): When the DRAM interface is
  15079. selected for the connected memory, these bits set the RAS-CAS assertion delay time. When the
  15080. synchronous DRAM interface is selected, these bits set the bank active-read/write command delay
  15081. time.
  15082.  
  15083. Description
  15084.  
  15085. Bit 17: RCD1 Bit 16: RCD0 DRAM Synchronous DRAM
  15086.  
  15087. 0 0 2 cycles Reserved (Setting prohibited)
  15088.  
  15089. 1 3 cycles 2 cycles
  15090.  
  15091. 1 0 4 cycles 3 cycles
  15092.  
  15093. 1 5 cycles 4 cycles*
  15094.  
  15095. Note: * Inhibited in RAS down mode.
  15096.  
  15097. Bits 15 to 13—Write Precharge Delay (TRWL2–TRWL0): These bits set the
  15098. synchronous DRAM write precharge delay time. In auto-precharge mode, they specify the time
  15099. until the next bank active command is issued after a write cycle. After a write cycle, the next active
  15100. command is not issued for a period of TPC + TRWL. In RAS down mode, they specify the time
  15101. until the next precharge command is issued. After a write cycle, the next precharge command is not
  15102. issued for a period of TRWL. This setting is valid only when synchronous DRAM is connected.
  15103.  
  15104. 294
  15105.  
  15106. ----------------------- Page 311-----------------------
  15107.  
  15108. Bit 15: TRWL2 Bit 14: TRWL1 Bit 13: TRWL0 Write Precharge ACT Delay
  15109. Time
  15110.  
  15111. 0 0 0 1 (Initial value)
  15112.  
  15113. 1 2
  15114.  
  15115. 1 0 3*
  15116.  
  15117. 1 4*
  15118.  
  15119. 1 0 0 5*
  15120.  
  15121. 1 Reserved (Setting prohibited)
  15122.  
  15123. 1 0 Reserved (Setting prohibited)
  15124.  
  15125. 1 Reserved (Setting prohibited)
  15126.  
  15127. Note: * Inhibited in RAS down mode.
  15128.  
  15129. Bits 12 to 10—CAS-Before-RAS Refresh R A S Assertion Period (TRAS2–
  15130. TRAS0): When the DRAM interface is selected for the connected memory, these bits set the
  15131. RAS assertion period in CAS-before-RAS refreshing. When the synchronous DRAM interface is
  15132. selected, the bank active command is not issued for a period of TRC + TRAS after an auto-refresh
  15133. command is issued.
  15134.  
  15135. Bit 12: TRAS2 Bit 11: TRAS1 Bit 10: TRAS0 RAS /DRAM Command
  15136. Assertion Period Interval after
  15137. Synchronous
  15138. DRAM Refresh
  15139.  
  15140. 0 0 0 2 4 + TRC
  15141. (Initial value)
  15142.  
  15143. 1 3 5 + TRC
  15144.  
  15145. 1 0 4 6 + TRC
  15146.  
  15147. 1 5 7 + TRC
  15148.  
  15149. 1 0 0 6 8 + TRC
  15150.  
  15151. 1 7 9 + TRC
  15152.  
  15153. 1 0 8 10 + TRC
  15154.  
  15155. 1 9 11 + TRC
  15156.  
  15157. Bit 9—Burst Enable (BE): Specifies whether burst access is performed on DRAM. In
  15158. synchronous DRAM access, burst access is always performed regardless of the specification of this
  15159. bit. The DRAM transfer mode depends on EDOMODE.
  15160.  
  15161. 295
  15162.  
  15163. ----------------------- Page 312-----------------------
  15164.  
  15165. B E EDOMODE 8/16/32/64-Bit Transfer 32-Byte Transfer
  15166.  
  15167. 0 0 Single Single
  15168.  
  15169. 1 Setting prohibited Setting prohibited
  15170.  
  15171. 1 0 Single/fast page* Fast page
  15172.  
  15173. 1 EDO EDO
  15174.  
  15175. Note: * In fast page mode, 32-bit or 64-bit transfer with a 16-bit bus, 64-bit transfer with a 32-bit
  15176. bus.
  15177.  
  15178. Bits 8 and 7—Memory Data Size (SZ1, SZ0): These bits specify the memory data size
  15179. of DRAM and synchronous DRAM. This setting has priority over the BCR2 register setting.
  15180.  
  15181. Description
  15182.  
  15183. Bit 8: SZ1 Bit 7: SZ0 DRAM SDRAM
  15184.  
  15185. 0 0 64 bits 64 bits
  15186.  
  15187. 1 Reserved (Setting prohibited) Reserved (Setting prohibited)
  15188.  
  15189. 1 0 16 bits Reserved (Setting prohibited)
  15190.  
  15191. 1 32 bits 32 bits
  15192.  
  15193. Bits 6 to 3—Address Multiplexing (AMXEXT, AMX2–AMX0): These bits specify
  15194. address multiplexing for DRAM and synchronous DRAM. The actual address shift value is
  15195. different for the DRAM interface and the synchronous DRAM interface.
  15196.  
  15197. • For DRAM Interface:
  15198.  
  15199. Bit 6: Bit 5: Bit 4: Bit 3: Description
  15200. AMXEXT AMX2 AMX1 AMX0
  15201.  
  15202. DRAM
  15203.  
  15204. 0* 0 0 0 8-bit column address product
  15205. (Initial value)
  15206.  
  15207. 1 9-bit column address product
  15208.  
  15209. 1 0 10-bit column address product
  15210.  
  15211. 1 11-bit column address product
  15212.  
  15213. 1 0 0 12-bit column address product
  15214.  
  15215. 1 Reserved (Setting prohibited)
  15216.  
  15217. 1 0 Reserved (Setting prohibited)
  15218.  
  15219. 1 Reserved (Setting prohibited)
  15220.  
  15221. Note: * When the DRAM interface is used, clear the AMXEXT bit to 0.
  15222.  
  15223. • For Synchronous DRAM Interface:
  15224.  
  15225. 296
  15226.  
  15227. ----------------------- Page 313-----------------------
  15228.  
  15229. AMX AMXEXT S Z Synchronous DRAM BANK
  15230.  
  15231. 0 0 64 (16M: 512k × 16 bits × 2) × 4 a[22]*
  15232.  
  15233. 32 (16M: 512k × 16 bits × 2) × 2 a[21]*
  15234.  
  15235. 1 64 (16M: 512k × 16 bits × 2) × 4 a[21]*
  15236.  
  15237. 32 (16M: 512k × 16 bits × 2) × 2 a[20]*
  15238.  
  15239. 1 0 64 (16M: 1M × 8 bits × 2) × 8 a[23]*
  15240.  
  15241. 32 (16M: 1M × 8 bits × 2) × 4 a[22]*
  15242.  
  15243. 1 64 (16M: 1M × 8 bits × 2) × 8 a[22]*
  15244.  
  15245. 32 (16M: 1M × 8 bits × 2) × 4 a[21]*
  15246.  
  15247. 2 — 64 (64M: 1M × 16 bits × 4) × 4 a[24:23]*
  15248.  
  15249. 32 (64M: 1M × 16 bits × 4) × 2 a[23:22]*
  15250.  
  15251. 3 64 (64M: 2M × 8 bits × 4) × 8 a[25:24]*
  15252.  
  15253. 32 (64M: 2M × 8 bits × 4) × 4 a[24:23]*
  15254.  
  15255. 4 64 (64M: 512k × 32 bits × 4) × 2 a[23:22]*
  15256.  
  15257. 32 (64M: 512k × 32 bits × 4) × 1 a[22:21]*
  15258.  
  15259. 5 64 (64M: 1M × 32 bits × 2) × 2 a[23]*
  15260.  
  15261. 32 (64M: 1M × 32 bits × 2) × 1 a[22]*
  15262.  
  15263. 6 64 Reserved (Setting prohibited)
  15264.  
  15265. 32 Reserved (Setting prohibited)
  15266.  
  15267. 7 64 (16M: 256k × 32 bits × 2) × 2 a[21]*
  15268.  
  15269. 32 (16M: 256k × 32 bits × 2) × 1 a[20]*
  15270.  
  15271. Note: * a[*]: Physical address
  15272.  
  15273. Bit 2—Refresh Control (RFSH): Specifies refresh control. Selects whether refreshing is
  15274. performed for DRAM and synchronous DRAM. When the refresh function is not used, the refresh
  15275. request cycle generation timer can be used as an interval timer.
  15276.  
  15277. Bit 2: RFSH Description
  15278.  
  15279. 0 Refreshing is not performed (Initial value)
  15280.  
  15281. 1 Refreshing is performed
  15282.  
  15283. 297
  15284.  
  15285. ----------------------- Page 314-----------------------
  15286.  
  15287. Bit 1—Refresh Mode (RMODE): Specifies whether normal refreshing or self-refreshing is
  15288. performed when the RFSH bit is set to 1. When the RFSH bit is 1 and this bit is cleared to 0,
  15289. CAS-before-RAS refreshing or auto-refreshing is performed for DRAM and synchronous DRAM,
  15290. using the cycle set by refresh-related registers RTCNT, RTCOR, and RTCSR. If a refresh request
  15291. is issued during an external bus cycle, the refresh cycle is executed when the bus cycle ends. When
  15292. the RFSH bit is 1 and this bit is set to 1, the self-refresh state is set for DRAM and synchronous
  15293. DRAM, after waiting for the end of any currently executing external bus cycle. All refresh requests
  15294. for memory in the self-refresh state are ignored.
  15295.  
  15296. Bit 1: RMODE Description
  15297.  
  15298. 0 CAS-before-RAS refreshing is performed (when RFSH = 1) (Initial value)
  15299.  
  15300. 1 Self-refreshing is performed (when RFSH = 1)
  15301.  
  15302. Bit 0—EDO Mode (EDOMODE): Used to specify the data sampling timing for data reads
  15303. when using EDO mode DRAM. The setting of this bit does not affect the operation timing of
  15304. memory other than DRAM. Set this bit to 1 only when DRAM is used.
  15305.  
  15306. 1 3 . 2 . 7 PCMCIA Control Register (PCR)
  15307.  
  15308. The PCMCIA control register (PCR) is a 16-bit readable/writable register that specifies the OE
  15309. and WE signal assertion/negation timing for the PCMCIA interface connected to areas 5 and 6.
  15310. The OE and WE signal assertion width is set by the wait control bits in the WCR2 register.
  15311.  
  15312. PCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  15313. standby mode.
  15314.  
  15315. Bit: 15 14 13 12 11 10 9 8
  15316.  
  15317. Bit name: A5PCW1 A5PCW0 A6PCW1 A6PCW0 A5TED2 A5TED1 A5TED0 A6TED2
  15318.  
  15319. Initial value: 0 0 0 0 0 0 0 0
  15320.  
  15321. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15322.  
  15323. Bit: 7 6 5 4 3 2 1 0
  15324.  
  15325. Bit name: A6TED1 A6TED0 A5TEH2 A5TEH1 A5TEH0 A6TEH2 A6TEH1 A6TEH0
  15326.  
  15327. Initial value: 0 0 0 0 0 0 0 0
  15328.  
  15329. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15330.  
  15331. 298
  15332.  
  15333. ----------------------- Page 315-----------------------
  15334.  
  15335. Bits 15 and 14—PCMCIA Wait (A5PCW1, A5PCW0): These bits specify the number
  15336. of waits to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait
  15337. cycle. The setting of these bits is selected when the TC bit is cleared to 0 in the page table entry
  15338. assistance register (PTEA).
  15339.  
  15340. Bit 15: A5PCW1 Bit 14: A5PCW0 Waits Inserted
  15341.  
  15342. 0 0 0 (Initial value)
  15343.  
  15344. 1 15
  15345.  
  15346. 1 0 30
  15347.  
  15348. 1 50
  15349.  
  15350. Bits 13 and 12—PCMCIA Wait (A6PCW1, A6PCW0): These bits specify the number
  15351. of waits to be added to the number of waits specified by WCR2 in a low-speed PCMCIA wait
  15352. cycle. The setting of these bits is selected when the TC bit is set to 1 in the page table entry
  15353. assistance register (PTEA).
  15354.  
  15355. Bit 13: A6PCW1 Bit 12: A6PCW0 Waits Inserted
  15356.  
  15357. 0 0 0 (Initial value)
  15358.  
  15359. 1 15
  15360.  
  15361. 1 0 30
  15362.  
  15363. 1 50
  15364.  
  15365. Bits 11 to 9—Address-O E /WE Assertion Delay (A5TED2–A5TED0): These bits set
  15366. the delay time from address output to OE/WE assertion on the connected PCMCIA interface. The
  15367. setting of these bits is selected when the TC bit is cleared to 0 in PTEA.
  15368.  
  15369. Bit 11: A5TED2 Bit 10: A5TED1 Bit 9: A5TED0 Waits Inserted
  15370.  
  15371. 0 0 0 0 (Initial value)
  15372.  
  15373. 1 1
  15374.  
  15375. 1 0 2
  15376.  
  15377. 1 3
  15378.  
  15379. 1 0 0 6
  15380.  
  15381. 1 9
  15382.  
  15383. 1 0 12
  15384.  
  15385. 1 15
  15386.  
  15387. 299
  15388.  
  15389. ----------------------- Page 316-----------------------
  15390.  
  15391. Bits 8 to 6—Address-O E /WE Assertion Delay (A6TED2–A6TED0): These bits set
  15392. the delay time from address output to OE/WE assertion on the connected PCMCIA interface. The
  15393. setting of these bits is selected when the TC bit is set to 1 in PTEA.
  15394.  
  15395. Bit 8: A6TED2 Bit 7: A6TED1 Bit 6: A6TED0 Waits Inserted
  15396.  
  15397. 0 0 0 0 (Initial value)
  15398.  
  15399. 1 1
  15400.  
  15401. 1 0 2
  15402.  
  15403. 1 3
  15404.  
  15405. 1 0 0 6
  15406.  
  15407. 1 9
  15408.  
  15409. 1 0 12
  15410.  
  15411. 1 15
  15412.  
  15413. Bits 5 to 3—O E /WE Negation-Address Delay (A5TEH2–A5TEH0): These bits set
  15414. the address hold delay time from OE/WE negation in a write on the connected PCMCIA interface
  15415. or in an I/O card read. In the case of a memory card read, the address hold delay time from the data
  15416. sampling timing is set. The setting of these bits is selected when the TC bit is cleared to 0 in
  15417. PTEA.
  15418.  
  15419. Bit 5: A5TEH2 Bit 4: A5TEH1 Bit 3: A5TEH0 Waits Inserted
  15420.  
  15421. 0 0 0 0 (Initial value)
  15422.  
  15423. 1 1
  15424.  
  15425. 1 0 2
  15426.  
  15427. 1 3
  15428.  
  15429. 1 0 0 6
  15430.  
  15431. 1 9
  15432.  
  15433. 1 0 12
  15434.  
  15435. 1 15
  15436.  
  15437. 300
  15438.  
  15439. ----------------------- Page 317-----------------------
  15440.  
  15441. Bits 2 to 0—O E /WE Negation-Address Delay (A6TEH2–A6TEH0): These bits set
  15442. the address hold delay time from OE/WE negation in a write on the connected PCMCIA interface
  15443. or in an I/O card read. In the case of a memory card read, the address hold delay time from the data
  15444. sampling timing is set. The setting of these bits is selected when the TC bit is set to 1 in PTEA.
  15445.  
  15446. Bit 2: A6TEH2 Bit 1: A6TEH1 Bit 0: A6TEH0 Waits Inserted
  15447.  
  15448. 0 0 0 0 (Initial value)
  15449.  
  15450. 1 1
  15451.  
  15452. 1 0 2
  15453.  
  15454. 1 3
  15455.  
  15456. 1 0 0 6
  15457.  
  15458. 1 9
  15459.  
  15460. 1 0 12
  15461.  
  15462. 1 15
  15463.  
  15464. 1 3 . 2 . 8 Synchronous DRAM Mode Register (SDMR)
  15465.  
  15466. The synchronous DRAM mode register (SDMR) is a write-only virtual 16-bit register that is
  15467. written to via the synchronous DRAM address bus, and sets the mode of the area 2 and area 3
  15468. synchronous DRAM.
  15469.  
  15470. Settings for the SDMR register must be made before accessing synchronous DRAM.
  15471.  
  15472. Bit: 15 14 13 12 11 10 9 8
  15473.  
  15474. Bit name:
  15475.  
  15476. Initial value: — — — — — — — —
  15477.  
  15478. R/W: W W W W W W W W
  15479.  
  15480. Bit: 7 6 5 4 3 2 1 0
  15481.  
  15482. Bit name:
  15483.  
  15484. Initial value: — — — — — — — —
  15485.  
  15486. R/W: W W W W W W W W
  15487.  
  15488. Since the address bus, not the data bus, is used to write to the synchronous DRAM mode register,
  15489. if the value to be set is “X” and the SDMR register address is “Y”, value “X” is written to the
  15490. synchronous DRAM mode register by performing a write to address X + Y. When the synchronous
  15491. DRAM bus width is set to 32 bits, as A0 of the synchronous DRAM is connected to A2 of the
  15492. SH7750, and A1 of the synchronous DRAM is connected to A3 of the SH7750, the value actually
  15493. written to the synchronous DRAM is the value of “X” shifted 2 bits to the right.
  15494.  
  15495. 301
  15496.  
  15497. ----------------------- Page 318-----------------------
  15498.  
  15499. For example, to write H'0230 to the area 2 SDMR register, arbitrary data is written to address
  15500. H'FF900000 (address “Y”) + H'08C0 (value “X”) (= H'FF9008C0). As a result, H'0230 is written
  15501. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  15502.  
  15503. Similarly, to write H'0230 to the area 3 SDMR register, arbitrary data is written to address
  15504. H'FF940000 (address “Y”) + H'08C0 (value “X”) (= H'FF9408C0). As a result, H'0230 is written
  15505. to the SDMR register. The range of value “X” is H'0000 to H'0FFC.
  15506.  
  15507. The lower 16 bits of the address are set in the synchronous DRAM mode register.
  15508.  
  15509. For a 32-bit bus:
  15510.  
  15511. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15512.  
  15513. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  15514. DE2 DE1 DE0
  15515.  
  15516. ←→
  15517. 10 bits set in case of 32-bit bus width
  15518.  
  15519. For a 64-bit bus:
  15520.  
  15521. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15522.  
  15523. Address 0 0 0 LMO LMO LMO WT BL2 BL1 BL0
  15524. DE2 DE1 DE0
  15525.  
  15526. ←→
  15527. 10 bits set in case of 64-bit bus width
  15528.  
  15529. LMODE: RAS-CAS latency
  15530. BL: Burst length
  15531. WT: Wrap type (0: Sequential)
  15532.  
  15533. BL LMODE
  15534. 000: Reserved 000: Reserved
  15535. 001: Reserved 001: 1
  15536. 010: 4 010: 2
  15537. 011: 8 011: 3
  15538. 100: Reserved 100: Reserved
  15539. 101: Reserved 101: Reserved
  15540. 110: Reserved 110: Reserved
  15541. 111: Reserved 111: Reserved
  15542.  
  15543. 302
  15544.  
  15545. ----------------------- Page 319-----------------------
  15546.  
  15547. 1 3 . 2 . 9 Refresh Timer Control/Status Register (RTSCR)
  15548.  
  15549. The refresh timer control/status register (RTSCR) is a 16-bit readable/writable register that
  15550. specifies the refresh cycle and whether interrupts are to be generated.
  15551.  
  15552. RTSCR is initialized to H'0000 by a power-on reset, but is not initialized by a manual reset or in
  15553. standby mode.
  15554.  
  15555. Bit: 15 14 13 12 11 10 9 8
  15556.  
  15557. Bit name: — — — — — — — —
  15558.  
  15559. Initial value: 0 0 0 0 0 0 0 0
  15560.  
  15561. R/W: — — — — — — — —
  15562.  
  15563. Bit: 7 6 5 4 3 2 1 0
  15564.  
  15565. Bit name: CMF CMIE CKS2 CKS1 CKS0 OVF OVIE LMTS
  15566.  
  15567. Initial value: 0 0 0 0 0 0 0 0
  15568.  
  15569. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15570.  
  15571. Bits 15 to 8—Reserved: These bits are always read as 0. For the write values, see section
  15572. 13.2.13, Notes on Accessing Refresh Control Registers.
  15573.  
  15574. Bit 7—Compare-Match Flag (CMF): Status flag that indicates a match between the refresh
  15575. timer counter (RTCNT) and refresh time constant register (RTCOR) values.
  15576.  
  15577. Bit 7: CMF Description
  15578.  
  15579. 0 RTCNT and RTCOR values do not match (Initial value)
  15580.  
  15581. [Clearing condition]
  15582. When 0 is written to CMF
  15583.  
  15584. 1 RTCNT and RTCOR values match
  15585.  
  15586. [Setting condition]
  15587. When RTCNT = RTCOR*
  15588.  
  15589. Note: * If 1 is written, the original value is retained.
  15590.  
  15591. Bit 6—Compare-Match Interrupt Enable (CMIE): Controls generation or suppression of
  15592. an interrupt request when the CMF flag is set to 1 in RTCSR. Do not set this bit to 1 when
  15593. CAS-before-RAS refreshing or auto-refreshing is used.
  15594.  
  15595. Bit 6: CMIE Description
  15596.  
  15597. 0 Interrupt requests initiated by CMF are disabled (Initial value)
  15598.  
  15599. 1 Interrupt requests initiated by CMF are enabled
  15600.  
  15601. 303
  15602.  
  15603. ----------------------- Page 320-----------------------
  15604.  
  15605. Bits 5 to 3—Clock Select Bits (CKS2–CKS0): These bits select the input clock for
  15606. RTCNT. The base clock is the external bus clock (CKIO). The RTCNT count clock is obtained by
  15607. scaling CKIO by the specified factor.
  15608.  
  15609. Bit 5: CKS2 Bit 4: CKS1 Bit 3: CKS0 Description
  15610.  
  15611. 0 0 0 Clock input disabled (Initial value)
  15612.  
  15613. 1 Bus clock (CKIO)/4
  15614.  
  15615. 1 0 CKIO/16
  15616.  
  15617. 1 CKIO/64
  15618.  
  15619. 1 0 0 CKIO/256
  15620.  
  15621. 1 CKIO/1024
  15622.  
  15623. 1 0 CKIO/2048
  15624.  
  15625. 1 CKIO/4096
  15626.  
  15627. Bit 2—Refresh Count Overflow Flag (OVF): Status flag that indicates that the number
  15628. of refresh requests indicated by the refresh count register (RFCR) has exceeded the number specified
  15629. by the LMTS bit in RTCSR.
  15630.  
  15631. Bit 2: OVF Description
  15632.  
  15633. 0 RFCR has not overflowed the count limit indicated by LMTS (Initial value)
  15634.  
  15635. [Clearing condition]
  15636. When 0 is written to OVF
  15637.  
  15638. 1 RFCR has overflowed the count limit indicated by LMTS
  15639.  
  15640. [Setting condition]
  15641. When RFCR overflows the count limit set by LMTS*
  15642.  
  15643. Note: * If 1 is written, the original value is retained.
  15644.  
  15645. Bit 1—Refresh Count Overflow Interrupt Enable (OVIE): Controls generation or
  15646. suppression of an interrupt request when the OVF flag is set to 1 in RTCSR.
  15647.  
  15648. Bit 1: OVIE Description
  15649.  
  15650. 0 Interrupt requests initiated by OVF are disabled (Initial value)
  15651.  
  15652. 1 Interrupt requests initiated by OVF are enabled
  15653.  
  15654. 304
  15655.  
  15656. ----------------------- Page 321-----------------------
  15657.  
  15658. Bit 0—Refresh Count Overflow Limit Select (LMTS): Specifies the count limit to be
  15659. compared with the refresh count indicated by the refresh count register (RFCR). If the RFCR
  15660. register value exceeds the value specified by LMTS, the OVF flag is set.
  15661.  
  15662. Bit 0: LMTS Description
  15663.  
  15664. 0 Count limit is 1024 (Initial value)
  15665.  
  15666. 1 Count limit is 512
  15667.  
  15668. 1 3 . 2 . 1 0 Refresh Timer Counter (RTCNT)
  15669.  
  15670. The refresh timer counter (RTCNT) is an 8-bit readable/writable counter that is incremented by the
  15671. input clock (selected by bits CKS2–CKS0 in the RTCSR register). When the RTCNT counter
  15672. value matches the RTCOR register value, the CMF bit is set in the RTCSR register and the
  15673. RTCNT counter is cleared.
  15674.  
  15675. RTCNT is initialized to H'0000 by a power-on reset, but continues to count when a manual reset
  15676. is performed. In standby mode, RTCNT is not initialized, and retains its contents.
  15677.  
  15678. Bit: 15 14 13 12 11 10 9 8
  15679.  
  15680. Bit name: — — — — — — — —
  15681.  
  15682. Initial value: 0 0 0 0 0 0 0 0
  15683.  
  15684. R/W: — — — — — — — —
  15685.  
  15686. Bit: 7 6 5 4 3 2 1 0
  15687.  
  15688. Bit name:
  15689.  
  15690. Initial value: 0 0 0 0 0 0 0 0
  15691.  
  15692. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15693.  
  15694. 1 3 . 2 . 1 1 Refresh Time Constant Register (RTCOR)
  15695.  
  15696. The refresh time constant register (RTCOR) is a readable/writable register that specifies the upper
  15697. limit of the RTCNT counter. The RTCOR register and RTCNT counter values (lower 8 bits) are
  15698. constantly compared, and when they match the CMF bit is set in the RTCSR register and the
  15699. RTCNT counter is cleared to 0. If the refresh bit (RFSH) has been set to 1 in the memory control
  15700. register (MCR) and CAS-before-RAS has been selected as the refresh mode, a memory refresh
  15701. cycle is generated when the CMF bit is set.
  15702.  
  15703. 305
  15704.  
  15705. ----------------------- Page 322-----------------------
  15706.  
  15707. RTCOR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its
  15708. contents, in a manual reset and in standby mode.
  15709.  
  15710. Bit: 15 14 13 12 11 10 9 8
  15711.  
  15712. Bit name: — — — — — — — —
  15713.  
  15714. Initial value: 0 0 0 0 0 0 0 0
  15715.  
  15716. R/W: — — — — — — — —
  15717.  
  15718. Bit: 7 6 5 4 3 2 1 0
  15719.  
  15720. Bit name:
  15721.  
  15722. Initial value: 0 0 0 0 0 0 0 0
  15723.  
  15724. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15725.  
  15726. 1 3 . 2 . 1 2 Refresh Count Register (RFCR)
  15727.  
  15728. The refresh count register (RFCR) is a 10-bit readable/writable counter that counts the number of
  15729. refreshes by being incremented each time the RTCOR register and RTCNT counter values match.
  15730. If the RFCR register value exceeds the count limit specified by the LMTS bit in the RTCSR
  15731. register, the OVF flag is set in the RTCSR register and the RFCR register is cleared.
  15732.  
  15733. RFCR is initialized to H'0000 by a power-on reset, but is not initialized, and retains its contents,
  15734. in a manual reset and in standby mode.
  15735.  
  15736. Bit: 15 14 13 12 11 10 9 8
  15737.  
  15738. Bit name: — — — — — —
  15739.  
  15740. Initial value: 0 0 0 0 0 0 0 0
  15741.  
  15742. R/W: — — — — — — R/W R/W
  15743.  
  15744. Bit: 7 6 5 4 3 2 1 0
  15745.  
  15746. Bit name:
  15747.  
  15748. Initial value: 0 0 0 0 0 0 0 0
  15749.  
  15750. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  15751.  
  15752. 306
  15753.  
  15754. ----------------------- Page 323-----------------------
  15755.  
  15756. 1 3 . 2 . 1 3 Notes on Accessing Refresh Control Registers
  15757.  
  15758. When the refresh timer control/status register (RTCSR), refresh timer counter (RTCNT), refresh
  15759. time constant register (RTCOR), and refresh count register (RFCR) are written to, a special code is
  15760. added to the data to prevent inadvertent rewriting in the event of program runaway, etc. The
  15761. following procedures should be used for read/write operations.
  15762.  
  15763. Writing to RTCSR, RTCNT, RTCOR, and RFCR: A word transfer instruction must
  15764. always be used when writing to RTCSR, RTCNT, RTCOR, or RFCR. A write cannot be
  15765. performed with a byte transfer instruction.
  15766.  
  15767. When writing to RTCSR, RTCNT, or RTCOR, set B'10100101 in the upper byte and the write
  15768. data in the lower byte, as shown in figure 13.4. When writing to RFCR, set B'101001 in the 6
  15769. bits starting from the MSB in the upper byte, and the write data in the remaining bits.
  15770.  
  15771. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15772. RTCSR,
  15773. RTCNT, 1 0 1 0 0 1 0 1 Write data
  15774. RTCOR
  15775.  
  15776. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  15777.  
  15778. 1 0 1 0 0 1 Write data
  15779. RFCR
  15780.  
  15781. Figure 13.4 Writing to RTCSR, RTCNT, RTCOR, and RFCR
  15782.  
  15783. Reading RTCSR, RTCNT, RTCOR, and RFCR: A 16-bit access must always be used
  15784. when reading RTCSR, RTCNT, RTCOR, or RFCR. Undefined bits are read as 0.
  15785.  
  15786. 307
  15787.  
  15788. ----------------------- Page 324-----------------------
  15789.  
  15790. 1 3 . 3 Operation
  15791.  
  15792. 1 3 . 3 . 1 Endian/Access Size and Data Alignment
  15793.  
  15794. The SH7750 supports both big-endian mode, in which the most significant byte (MSByte) is at
  15795. the 0 address end in a string of byte data, and little-endian mode, in which the least significant byte
  15796. (LSByte) is at the 0 address end. The mode is set by means of the MD5 external pin in a power-on
  15797. reset, big-endian mode being set if the MD5 pin is low, and little-endian mode if it is high.
  15798.  
  15799. A data bus width of 8, 16, 32, or 64 bits can be selected for normal memory, 16, 32, or 64 bits for
  15800. DRAM, 32 or 64 bits for synchronous DRAM, and 8 or 16 bits for the PCMCIA interface. Data
  15801. alignment is carried out according to the data bus width and endian mode of each device. Thus, four
  15802. read operations are needed to read longword data from an 8-bit device. In the SH7750, data
  15803. alignment and data length conversion between the different interfaces is performed automatically.
  15804.  
  15805. The relationship between the endian mode, device data length, and access unit, is shown in tables
  15806. 13.6 to 13.13.
  15807.  
  15808. 308
  15809.  
  15810. ----------------------- Page 325-----------------------
  15811.  
  15812. Table 13.6 (1) 64-Bit External Device/Big-Endian Access and Data
  15813. Alignment
  15814.  
  15815. Data Bus
  15816.  
  15817. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  15818.  
  15819. Byte, Adr=8n 1 Data — — — — — — —
  15820. 7–0
  15821.  
  15822. Byte, Adr=8n+1 1 — Data — — — — — —
  15823. 7–0
  15824.  
  15825. Byte, Adr=8n+2 1 — — Data — — — — —
  15826. 7–0
  15827.  
  15828. Byte, Adr=8n+3 1 — — — Data — — — —
  15829. 7–0
  15830.  
  15831. Byte, Adr=8n+4 1 — — — — Data — — —
  15832. 7–0
  15833.  
  15834. Byte, Adr=8n+5 1 — — — — — Data — —
  15835. 7–0
  15836.  
  15837. Byte, Adr=8n+6 1 — — — — — — Data —
  15838. 7–0
  15839.  
  15840. Byte, Adr=8n+7 1 — — — — — — — Data
  15841. 7–0
  15842.  
  15843. Word, Adr=8n 1 Data Data — — — — — —
  15844. 15–8 7–0
  15845.  
  15846. Word, Adr=8n+2 1 — — Data Data — — — —
  15847. 15–8 7–0
  15848.  
  15849. Word, Adr=8n+4 1 — — — — Data Data — —
  15850. 15–8 7–0
  15851.  
  15852. Word, Adr=8n+6 1 — — — — — — Data Data
  15853. 15–8 7–0
  15854.  
  15855. Longword, 1 Data Data Data Data — — — —
  15856. Adr=8n 31–24 23–16 15–8 7–0
  15857.  
  15858. Longword, 1 — — — — Data Data Data Data
  15859. Adr=8n+4 31–24 23–16 15–8 7–0
  15860.  
  15861. Quadword, 1 Data Data Data Data Data Data Data Data
  15862. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  15863.  
  15864. 309
  15865.  
  15866. ----------------------- Page 326-----------------------
  15867.  
  15868. Table 13.6 (2) 64-Bit External Device/Big-Endian Access and Data
  15869. Alignment
  15870.  
  15871. Strobe Signals
  15872.  
  15873. WE7, WE6, WE5, WE4, WE3, WE2, WE1, WE0,
  15874. CAS7 , CAS6 , CAS5 , CAS4 , CAS3 , CAS2 , CAS1 , CAS0 ,
  15875. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  15876.  
  15877. Byte, Adr=8n 1 Asserted
  15878.  
  15879. Byte, Adr=8n+1 1 Asserted
  15880.  
  15881. Byte, Adr=8n+2 1 Asserted
  15882.  
  15883. Byte, Adr=8n+3 1 Asserted
  15884.  
  15885. Byte, Adr=8n+4 1 Asserted
  15886.  
  15887. Byte, Adr=8n+5 1 Asserted
  15888.  
  15889. Byte, Adr=8n+6 1 Asserted
  15890.  
  15891. Byte, Adr=8n+7 1 Asserted
  15892.  
  15893. Word, Adr=8n 1 Asserted Asserted
  15894.  
  15895. Word, Adr=8n+2 1 AssertedAsserted
  15896.  
  15897. Word, Adr=8n+4 1 Asserted Asserted
  15898.  
  15899. Word, Adr=8n+6 1 AssertedAsserted
  15900.  
  15901. Longword, 1 Asserted Asserted AssertedAsserted
  15902. Adr=8n
  15903.  
  15904. Longword, 1 Asserted Asserted AssertedAsserted
  15905. Adr=8n+4
  15906.  
  15907. Quadword, 1 Asserted Asserted AssertedAsserted Asserted Asserted AssertedAsserted
  15908. Adr=8n
  15909.  
  15910. 310
  15911.  
  15912. ----------------------- Page 327-----------------------
  15913.  
  15914. Table 13.732-Bit External Device/Big-Endian Access and Data Alignment
  15915.  
  15916. Data Bus Strobe Signals
  15917.  
  15918. WE3, WE2, WE1, WE0,
  15919. CAS3 , CAS2 , CAS1 , CAS0 ,
  15920. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15921.  
  15922. Byte, Adr=4n 1 Data — — — Asserted
  15923. 7–0
  15924.  
  15925. Byte, Adr=4n+1 1 — Data — — Asserted
  15926. 7–0
  15927.  
  15928. Byte, Adr=4n+2 1 — — Data — Asserted
  15929. 7–0
  15930.  
  15931. Byte, Adr=4n+3 1 — — — Data Asserted
  15932. 7–0
  15933.  
  15934. Word, Adr=4n 1 Data Data — — Asserted Asserted
  15935. 15–8 7–0
  15936.  
  15937. Word, Adr=4n+2 1 — — Data Data Asserted Asserted
  15938. 15–8 7–0
  15939.  
  15940. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15941. Adr=4n 31–24 23–16 15–8 7–0
  15942.  
  15943. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  15944. 63–56 55–48 47–40 39–32
  15945.  
  15946. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  15947. 31–24 23–16 15–8 7–0
  15948.  
  15949. 311
  15950.  
  15951. ----------------------- Page 328-----------------------
  15952.  
  15953. Table 13.816-Bit External Device/Big-Endian Access and Data Alignment
  15954.  
  15955. Data Bus Strobe Signals
  15956.  
  15957. WE3, WE2, WE1, WE0,
  15958. CAS3 , CAS2 , CAS1 , CAS0 ,
  15959. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15960.  
  15961. Byte, Adr=2n 1 — — Data — Asserted
  15962. 7–0
  15963.  
  15964. Byte, Adr=2n+1 1 — — — Data Asserted
  15965. 7–0
  15966.  
  15967. Word 1 — — Data Data Asserted Asserted
  15968. 15–8 7–0
  15969.  
  15970. Longword 1 — — Data Data Asserted Asserted
  15971. 31–24 23–16
  15972.  
  15973. 2 — — Data Data Asserted Asserted
  15974. 15–8 7–0
  15975.  
  15976. Quadword 1 — — Data Data Asserted Asserted
  15977. 63–56 55–48
  15978.  
  15979. 2 — — Data Data Asserted Asserted
  15980. 47–40 39–32
  15981.  
  15982. 3 — — Data Data Asserted Asserted
  15983. 31–24 23–16
  15984.  
  15985. 4 — — Data Data Asserted Asserted
  15986. 15–8 7–0
  15987.  
  15988. 312
  15989.  
  15990. ----------------------- Page 329-----------------------
  15991.  
  15992. Table 13.98-Bit External Device/Big-Endian Access and Data Alignment
  15993.  
  15994. Data Bus Strobe Signals
  15995.  
  15996. WE3, WE2, WE1, WE0,
  15997. CAS3 , CAS2 , CAS1 , CAS0 ,
  15998. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  15999.  
  16000. Byte 1 — — — Data Asserted
  16001. 7–0
  16002.  
  16003. Word 1 — — — Data Asserted
  16004. 15–8
  16005.  
  16006. 2 — — — Data Asserted
  16007. 7–0
  16008.  
  16009. Longword 1 — — — Data Asserted
  16010. 31–24
  16011.  
  16012. 2 — — — Data Asserted
  16013. 23–16
  16014.  
  16015. 3 — — — Data Asserted
  16016. 15–8
  16017.  
  16018. 4 — — — Data Asserted
  16019. 7–0
  16020.  
  16021. Quadword 1 — — — Data Asserted
  16022. 63–56
  16023.  
  16024. 2 — — — Data Asserted
  16025. 55–48
  16026.  
  16027. 3 — — — Data Asserted
  16028. 47–40
  16029.  
  16030. 4 — — — Data Asserted
  16031. 39–32
  16032.  
  16033. 5 — — — Data Asserted
  16034. 31–24
  16035.  
  16036. 6 — — — Data Asserted
  16037. 23–16
  16038.  
  16039. 7 — — — Data Asserted
  16040. 15–8
  16041.  
  16042. 8 — — — Data Asserted
  16043. 7–0
  16044.  
  16045. 313
  16046.  
  16047. ----------------------- Page 330-----------------------
  16048.  
  16049. Table 13.10 (1) 64-Bit External Device/Little-Endian Access and Data
  16050. Alignment
  16051.  
  16052. Data Bus
  16053.  
  16054. Operation No. D63–56 D55–48 D47–40 D39–32 D31–24 D23–16 D15–8 D7–0
  16055.  
  16056. Byte, Adr=8n 1 — — — — — — — Data
  16057. 7–0
  16058.  
  16059. Byte, Adr=8n+1 1 — — — — — — Data —
  16060. 7–0
  16061.  
  16062. Byte, Adr=8n+2 1 — — — — — Data — —
  16063. 7–0
  16064.  
  16065. Byte, Adr=8n+3 1 — — — — Data — — —
  16066. 7–0
  16067.  
  16068. Byte, Adr=8n+4 1 — — — Data — — — —
  16069. 7–0
  16070.  
  16071. Byte, Adr=8n+5 1 — — Data — — — — —
  16072. 7–0
  16073.  
  16074. Byte, Adr=8n+6 1 — Data — — — — — —
  16075. 7–0
  16076.  
  16077. Byte, Adr=8n+7 1 Data — — — — — — —
  16078. 7–0
  16079.  
  16080. Word, Adr=8n 1 — — — — — — Data Data
  16081. 15–8 7–0
  16082.  
  16083. Word, Adr=8n+2 1 — — Data Data — —
  16084. 15–8 7–0
  16085.  
  16086. Word, Adr=8n+4 1 — — Data Data — — — —
  16087. 15–8 7–0
  16088.  
  16089. Word, Adr=8n+6 1 Data Data — — — — — —
  16090. 15–8 7–0
  16091.  
  16092. Longword, 1 — — — — Data Data Data Data
  16093. Adr=8n 31–24 23–16 15–8 7–0
  16094.  
  16095. Longword, 1 Data Data Data Data — — — —
  16096. Adr=8n+4 31–24 23–16 15–8 7–0
  16097.  
  16098. Quadword, 1 Data Data Data Data Data Data Data Data
  16099. Adr=8n 63–56 55–48 47–40 39–32 31–24 23–16 15–8 7–0
  16100.  
  16101. 314
  16102.  
  16103. ----------------------- Page 331-----------------------
  16104.  
  16105. Table 13.10 (2) 64-Bit External Device/Little-Endian Access and Data
  16106. Alignment
  16107.  
  16108. Strobe Signals
  16109.  
  16110. WE7, WE6, WE5, WE4, WE3, WE2, WE1, WE0,
  16111. CAS7 , CAS6 , CAS5 , CAS4 , CAS3 , CAS2 , CAS1 , CAS0 ,
  16112. Operation No. DQM7 DQM6 DQM5 DQM4 DQM3 DQM2 DQM1 DQM0
  16113.  
  16114. Byte, Adr=8n 1 Asserted
  16115.  
  16116. Byte, Adr=8n+1 1 Asserted
  16117.  
  16118. Byte, Adr=8n+2 1 Asserted
  16119.  
  16120. Byte, Adr=8n+3 1 Asserted
  16121.  
  16122. Byte, Adr=8n+4 1 Asserted
  16123.  
  16124. Byte, Adr=8n+5 1 Asserted
  16125.  
  16126. Byte, Adr=8n+6 1 Asserted
  16127.  
  16128. Byte, Adr=8n+7 1 Asserted
  16129.  
  16130. Word, Adr=8n 1 Asserted Asserted
  16131.  
  16132. Word, Adr=8n+2 1 Asserted Asserted
  16133.  
  16134. Word, Adr=8n+4 1 Asserted Asserted
  16135.  
  16136. Word, Adr=8n+6 1 Asserted Asserted
  16137.  
  16138. Longword, 1 Asserted Asserted Asserted Asserted
  16139. Adr=8n
  16140.  
  16141. Longword, 1 Asserted Asserted Asserted Asserted
  16142. Adr=8n+4
  16143.  
  16144. Quadword, 1 Asserted Asserted Asserted Asserted Asserted Asserted Asserted Asserted
  16145. Adr=8n
  16146.  
  16147. 315
  16148.  
  16149. ----------------------- Page 332-----------------------
  16150.  
  16151. Table 13.11 32-Bit External Device/Little-Endian Access and Data Alignment
  16152.  
  16153. Data Bus Strobe Signals
  16154.  
  16155. WE3, WE2, WE1, WE0,
  16156. CAS3 , CAS2 , CAS1 , CAS0 ,
  16157. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  16158.  
  16159. Byte, Adr=4n 1 — — Data Asserted
  16160. 7–0
  16161.  
  16162. Byte, Adr=4n+1 1 — — Data — Asserted
  16163. 7–0
  16164.  
  16165. Byte, Adr=4n+2 1 — Data — — Asserted
  16166. 7–0
  16167.  
  16168. Byte, Adr=4n+3 1 Data — — — Asserted
  16169. 7–0
  16170.  
  16171. Word, Adr=4n 1 — — Data Data Asserted Asserted
  16172. 15–8 7–0
  16173.  
  16174. Word, Adr=4n+2 1 Data Data — — Asserted Asserted
  16175. 15–8 7–0
  16176.  
  16177. Longword, 1 Data Data Data Data Asserted Asserted Asserted Asserted
  16178. Adr=4n 31–24 23–16 15–8 7–0
  16179.  
  16180. Quadword 1 Data Data Data Data Asserted Asserted Asserted Asserted
  16181. 31–24 23–16 15–8 7–0
  16182.  
  16183. 2 Data Data Data Data Asserted Asserted Asserted Asserted
  16184. 63–56 55–48 47–40 39–32
  16185.  
  16186. 316
  16187.  
  16188. ----------------------- Page 333-----------------------
  16189.  
  16190. Table 13.12 16-Bit External Device/Little-Endian Access and Data Alignment
  16191.  
  16192. Data Bus Strobe Signals
  16193.  
  16194. WE3, WE2, WE1, WE0,
  16195. CAS3 , CAS2 , CAS1 , CAS0 ,
  16196. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  16197.  
  16198. Byte, Adr=2n 1 — — — Data Asserted
  16199. 7–0
  16200.  
  16201. Byte, Adr=2n+1 1 — — Data — Asserted
  16202. 7–0
  16203.  
  16204. Word 1 — — Data Data Asserted Asserted
  16205. 15–8 7–0
  16206.  
  16207. Longword 1 — — Data Data Asserted Asserted
  16208. 15–8 7–0
  16209.  
  16210. 2 — — Data Data Asserted Asserted
  16211. 31–24 23–16
  16212.  
  16213. Quadword 1 — — Data Data Asserted Asserted
  16214. 15–8 7–0
  16215.  
  16216. 2 — — Data Data Asserted Asserted
  16217. 31–24 23–16
  16218.  
  16219. 3 — — Data Data Asserted Asserted
  16220. 47–40 39–32
  16221.  
  16222. 4 — — Data Data Asserted Asserted
  16223. 63–56 55–48
  16224.  
  16225. 317
  16226.  
  16227. ----------------------- Page 334-----------------------
  16228.  
  16229. Table 13.13 8-Bit External Device/Little-Endian Access and Data Alignment
  16230.  
  16231. Data Bus Strobe Signals
  16232.  
  16233. WE3, WE2, WE1, WE0,
  16234. CAS3 , CAS2 , CAS1 , CAS0 ,
  16235. Operation No. D31–D24 D23–D16 D15–D8 D7–D0 DQM3 DQM2 DQM1 DQM0
  16236.  
  16237. Byte 1 — — — Data Asserted
  16238. 7–0
  16239.  
  16240. Word 1 — — — Data Asserted
  16241. 7–0
  16242.  
  16243. 2 — — — Data Asserted
  16244. 15–8
  16245.  
  16246. Longword 1 — — — Data Asserted
  16247. 7–0
  16248.  
  16249. 2 — — — Data Asserted
  16250. 15–8
  16251.  
  16252. 3 — — — Data Asserted
  16253. 23–16
  16254.  
  16255. 4 — — — Data Asserted
  16256. 31–24
  16257.  
  16258. Quadword 1 — — — Data Asserted
  16259. 7–0
  16260.  
  16261. 2 — — — Data Asserted
  16262. 15–8
  16263.  
  16264. 3 — — — Data Asserted
  16265. 23–16
  16266.  
  16267. 4 — — — Data Asserted
  16268. 31–24
  16269.  
  16270. 5 — — — Data Asserted
  16271. 39–32
  16272.  
  16273. 6 — — — Data Asserted
  16274. 47–40
  16275.  
  16276. 7 — — — Data Asserted
  16277. 55–48
  16278.  
  16279. 8 — — — Data Asserted
  16280. 63–56
  16281.  
  16282. 1 3 . 3 . 2 Areas
  16283.  
  16284. Area 0: For area 0, physical address bits A28 to A26 are 000.
  16285.  
  16286. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function, can
  16287. be connected to this space.
  16288.  
  16289. 318
  16290.  
  16291. ----------------------- Page 335-----------------------
  16292.  
  16293. A bus width of 8, 16, 32, or 64 bits can be selected in a power-on reset by means of external pins
  16294. MD3 and MD4. For details, see Memory Bus Width in section 13.1.5.
  16295.  
  16296. When area 0 space is accessed, the CS0 signal is asserted. In addition, the RD signal, which can be
  16297. used as OE, and write control signals WE0 to WE7 , are asserted.
  16298.  
  16299. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A0W2 to A0W0
  16300. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16301. of the external wait pin (RDY ).
  16302.  
  16303. When the burst function is used, the number of burst cycle transfer states is determined in the
  16304. range 2 to 9 according to the number of waits.
  16305.  
  16306. Area 1: For area 1, physical address bits A28 to A26 are 001.
  16307.  
  16308. Only normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to
  16309. this space.
  16310.  
  16311. A bus width of 8, 16, 32, or 64 bits can be selected with bits A1SZ1 and A1SZ0 in the BCR2
  16312. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  16313. A1SZ1 and A1SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  16314. width of 16, 32, or 64 bits.
  16315.  
  16316. When area 1 space is accessed, the CS1 signal is asserted. In addition, the RD signal, which can be
  16317. used as OE, and write control signals WE0 to WE7 , are asserted.
  16318.  
  16319. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A1W2 to A1W0
  16320. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16321. of the external wait pin (RDY ).
  16322.  
  16323. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16324. and 0–3 cycles, respectively, by means of bit A1S0 and bits A1H1 and A1H0 in the WCR3
  16325. register.
  16326.  
  16327. Area 2: For area 2, physical address bits A28 to A26 are 010.
  16328.  
  16329. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM, can
  16330. be connected to this space.
  16331.  
  16332. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16333. A2SZ1 and A2SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  16334. should be selected with bits A2SZ1 and A2SZ0 in the BCR2 register. When synchronous DRAM
  16335. is connected, select 32 or 64 bits with the SZ bits in the MCR register. When DRAM is
  16336. connected to area 2, select a bus width of 16 or 32 bits with the SZ bits in MCR. For details, see
  16337. Memory Bus Width in section 13.1.5.
  16338.  
  16339. 319
  16340.  
  16341. ----------------------- Page 336-----------------------
  16342.  
  16343. When area 2 space is accessed, the CS2 signal is asserted.
  16344.  
  16345. When normal memory is connected, the RD signal, which can be used as OE, and write control
  16346. signals WE0 to WE7 , are asserted.
  16347.  
  16348. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A2W2 to A2W0
  16349. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16350. of the external wait pin (RDY ).
  16351.  
  16352. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16353. and 0–3 cycles, respectively, by means of bit A2S0 and bits A2H1 and A2H0 in the WCR3
  16354. register.
  16355.  
  16356. When synchronous DRAM is connected, the RAS and CAS signals, RD/WR signal, and byte
  16357. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed.RAS, CAS,
  16358. and data timing control, and address multiplexing control, can be set using the MCR register.
  16359.  
  16360. When DRAM is connected, the RAS2 signal, CAS4 to CAS7 signals, and RD/WR signal are
  16361. asserted, and address multiplexing is performed. RAS2, CAS, and data timing control, and address
  16362. multiplexing control, can be set using the MCR register.
  16363.  
  16364. Area 3: For area 3, physical address bits A28 to A26 are 011.
  16365.  
  16366. Normal memory such as SRAM, ROM, and MPX, and also DRAM and synchronous DRAM, can
  16367. be connected to this space.
  16368.  
  16369. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16370. A3SZ1 and A3SZ0 in the BCR2 register. When MPX is connected, a bus width of 32 or 64 bits
  16371. should be selected with bits A3SZ1 and A3SZ0 in the BCR2 register. When DRAM is connected,
  16372. 16, 32, or 64 bits can be selected with the SZ bits in the MCR register. When synchronous
  16373. DRAM is connected, select 32 or 64 bits with the SZ bits in MCR. For details, see Memory Bus
  16374. Width in section 13.1.5.
  16375.  
  16376. When area 3 space is accessed, the CS3 signal is asserted.
  16377.  
  16378. When normal memory is connected, the RD signal, which can be used as OE, and write control
  16379. signals WE0 to WE7 , are asserted.
  16380.  
  16381. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A3W2 to A3W0
  16382. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16383. of the external wait pin (RDY ).
  16384.  
  16385. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16386. and 0–3 cycles, respectively, by means of bit A3S0 and bits A3H1 and A3H0 in the WCR3
  16387. register.
  16388.  
  16389. 320
  16390.  
  16391. ----------------------- Page 337-----------------------
  16392.  
  16393. When synchronous DRAM is connected, the RAS and CAS signals, RD/WR signal, and byte
  16394. control signals DQM0 to DQM7 are asserted, and address multiplexing is performed. When
  16395. DRAM is connected, the RAS signal, CAS0 to CAS7 signals, and RD/WR signal are asserted,
  16396. and address multiplexing is performed. RAS, CAS, and data timing control, and address
  16397. multiplexing control, can be set using the MCR register.
  16398.  
  16399. Area 4: For area 4, physical address bits A28 to A26 are 100.
  16400.  
  16401. Normal memory such as SRAM, ROM, MPX, and byte control SRAM can be connected to this
  16402. space.
  16403.  
  16404. A bus width of 8, 16, 32, or 64 bits can be selected with bits A4SZ1 and A4SZ0 in the BCR2
  16405. register. When MPX is connected, a bus width of 32 or 64 bits should be selected with bits
  16406. A4SZ1 and A4SZ0 in the BCR2 register. When byte control SRAM is connected, select a bus
  16407. width of 16, 32, or 64 bits. For details, see Memory Bus Width in section 13.1.5.
  16408.  
  16409. When area 4 space is accessed, the CS4 signal is asserted, and the RD signal, which can be used as
  16410. OE, and write control signals WE0 to WE7 , are also asserted.
  16411.  
  16412. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A4W2 to A4W0
  16413. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16414. of the external wait pin (RDY ).
  16415.  
  16416. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16417. and 0–3 cycles, respectively, by means of bit A4S0 and bits A4H1 and A4H0 in the WCR3
  16418. register.
  16419.  
  16420. Area 5: For area 5, physical address bits A28 to A26 are 101.
  16421.  
  16422. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function, and
  16423. a PCMCIA interface, can be connected to this space.
  16424.  
  16425. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16426. A5SZ1 and A5SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  16427. 32 bits can be selected with bits A5SZ1 and A5SZ0 in BCR2. When MPX is connected, a bus
  16428. width of 32 or 64 bits should be selected with bits A5SZ1 and A5SZ0 in BCR2. When a
  16429. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A5SZ1 and
  16430. A5SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  16431.  
  16432. When area 5 space is accessed with normal memory connected, the CS5 signal is asserted. In
  16433. addition, the RD signal, which can be used as OE, and write control signals WE0 to WE7 , are
  16434. asserted. When a PCMCIA interface is connected, the CE1A and CE2A signals, the RD signal,
  16435. which can be used as OE, and the WE1 , WE2 , WE3 , and WE7 signals, which can be used as WE ,
  16436. ICIORD, ICIOWR , and REG, respectively, are asserted.
  16437.  
  16438. 321
  16439.  
  16440. ----------------------- Page 338-----------------------
  16441.  
  16442. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A5W2 to A5W0
  16443. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16444. of the external wait pin (RDY ).
  16445.  
  16446. When the burst function is used, the number of burst cycle transfer states is determined in the
  16447. range 2 to 9 according to the number of waits.
  16448.  
  16449. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16450. and 0–3 cycles, respectively, by means of bit A5S0 and bits A5H1 and A5H0 in the WCR3
  16451. register.
  16452.  
  16453. When a PCMCIA interface is used, the address/CE1A/CE2A setup and hold times with respect to
  16454. the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A5TED1 and
  16455. A5TED0, and bits A5TEH1 and A5TEH0, in the PCR register. In addition, the number of wait
  16456. cycles can be set in the range 0 to 50 with bits A5PCW1 and A5PCW0. The number of waits set
  16457. in PCR is added to the number of waits set in WCR2.
  16458.  
  16459. Area 6: For area 6, physical address bits A28 to A26 are 110.
  16460.  
  16461. Normal memory such as SRAM, ROM, and MPX, and also burst ROM with a burst function, and
  16462. a PCMCIA interface, can be connected to this space.
  16463.  
  16464. When normal memory is connected, a bus width of 8, 16, 32, or 64 bits can be selected with bits
  16465. A6SZ1 and A6SZ0 in the BCR2 register. When burst ROM is connected, a bus width of 8, 16 or
  16466. 32 bits can be selected with bits A6SZ1 and A6SZ0 in BCR2. When MPX is connected, a bus
  16467. width of 32 or 64 bits should be selected with bits A6SZ1 and A6SZ0 in BCR2. When a
  16468. PCMCIA interface is connected, either 8 or 16 bits should be selected with bits A6SZ1 and
  16469. A6SZ0 in BCR2. For details, see Memory Bus Width in section 13.1.5.
  16470.  
  16471. When area 6 space is accessed with normal memory connected, the CS6 signal is asserted. In
  16472. addition, the RD signal, which can be used as OE, and write control signals WE0 to WE7 , are
  16473. asserted. When a PCMCIA interface is connected, the CE1B and CE2B signals, the RD signal,
  16474. which can be used as OE, and the WE1 , WE2 , WE3 , and WE7 signals, which can be used as WE ,
  16475. ICIORD, ICIOWR , and REG, respectively, are asserted.
  16476.  
  16477. As regards the number of bus cycles, from 0 to 15 waits can be selected with bits A6W2 to A6W0
  16478. in the WCR2 register. In addition, any number of waits can be inserted in each bus cycle by means
  16479. of the external wait pin (RDY ).
  16480.  
  16481. When the burst function is used, the number of burst cycle transfer states is determined in the
  16482. range 2 to 9 according to the number of waits.
  16483.  
  16484. The read/write strobe signal address and CS setup and hold times can be set within a range of 0–1
  16485. and 0–3 cycles, respectively, by means of bit A6S0 and bits A6H1 and A6H0 in the WCR3
  16486. register.
  16487.  
  16488. 322
  16489.  
  16490. ----------------------- Page 339-----------------------
  16491.  
  16492. When a PCMCIA interface is used, the address/CE1B /CE2B setup and hold times with respect to
  16493. the read/write strobe signals can be set in the range of 0 to 15 cycles with bits A6TED1 and
  16494. A6TED0, and bits A6TEH1 and A6TEH0, in the PCR register. In addition, the number of wait
  16495. cycles can be set in the range 0 to 50 with bits A6PCW1 and A6PCW0. The number of waits set
  16496. in PCR is added to the number of waits set in WCR2.
  16497.  
  16498. 1 3 . 3 . 3 Basic Interface
  16499.  
  16500. Basic Timing: The basic interface of the SH7750 uses strobe signal output in consideration of
  16501. the fact that mainly SRAM will be directly connected. Figure 13.5 shows the basic timing of
  16502. normal space accesses. A no-wait normal access is completed in two cycles. The BS signal is
  16503. asserted for one cycle to indicate the start of a bus cycle. The CSn signal is asserted on the T1
  16504. rising edge, and negated on the next T2 clock rising edge. Therefore, there is no negation period in
  16505. case of access at minimum pitch.
  16506.  
  16507. There is no access size specification when reading. The correct access start address is output in the
  16508. least significant bit of the address, but since there is no access size specification, 32 bits are always
  16509. read in the case of a 32-bit device, and 16 bits in the case of a 16-bit device. When writing, only
  16510. the WE signal for the byte to be written is asserted. For details, see section 13.3.1, Endian/Access
  16511. Size and Data Alignment.
  16512.  
  16513. Read/write operations for cache fill or copy-back follow the set bus width and transfer a total of 32
  16514. bytes consecutively. The first access is performed on the data for which there was an access request,
  16515. and the remaining accesses are performed on the data at the 32-byte boundary. The bus is not
  16516. released during this transfer.
  16517.  
  16518. 323
  16519.  
  16520. ----------------------- Page 340-----------------------
  16521.  
  16522.  
  16523. T1 T2
  16524.  
  16525. CKIO
  16526.  
  16527. A25–A0
  16528.  
  16529. CSn
  16530.  
  16531. RD/WR
  16532.  
  16533. RD
  16534.  
  16535. D63–D0
  16536. (read)
  16537.  
  16538. WEn
  16539.  
  16540. D63–D0
  16541. (write)
  16542.  
  16543. BS
  16544.  
  16545. RDY
  16546.  
  16547. DACKn
  16548. (SA: IO ← memory)
  16549.  
  16550. DACKn
  16551. (SA: IO → memory)
  16552.  
  16553. DACKn
  16554. (DA)
  16555.  
  16556. SA: Single address DMA
  16557. DA: Dual address DMA
  16558.  
  16559.  
  16560. Figure 13.5 Basic Timing of Basic Interface
  16561.  
  16562. 324
  16563.  
  16564. ----------------------- Page 341-----------------------
  16565.  
  16566. Figures 13.6, 13.7, 13.8, and 13.9 show examples of connection to 64-, 32-, 16-, and 8-bit data
  16567. width SRAM.
  16568.  
  16569. 128K × 8-bit
  16570. SH7750 SRAM
  16571.  
  16572. A19–A3 A16–A0
  16573. CSn CS
  16574. RD OE
  16575. D63–D56 I/O7–I/O0
  16576. WE7 WE
  16577.  
  16578. A16–A0
  16579. CS
  16580. OE
  16581. D55–D48 I/O7–I/O0
  16582. WE6 WE
  16583.  
  16584. A16–A0
  16585. CS
  16586. OE
  16587. D47–D40 I/O7–I/O0
  16588. WE5 WE
  16589.  
  16590. A16–A0
  16591. CS
  16592. OE
  16593. D39–D32 I/O7–I/O0
  16594. WE4 WE
  16595.  
  16596. A16–A0
  16597. CS
  16598. OE
  16599. D31–D24 I/O7–I/O0
  16600. WE3 WE
  16601.  
  16602. A16–A0
  16603. CS
  16604. OE
  16605. D23–D16 I/O7–I/O0
  16606. WE2 WE
  16607.  
  16608. A16–A0
  16609. CS
  16610. OE
  16611. D15–D8 I/O7–I/O0
  16612. WE1 WE
  16613.  
  16614. A16–A0
  16615. CS
  16616. OE
  16617. D7–D0 I/O7–I/O0
  16618. WE0 WE
  16619.  
  16620. Figure 13.6 Example of 64-Bit Data Width SRAM Connection
  16621.  
  16622. 325
  16623.  
  16624. ----------------------- Page 342-----------------------
  16625.  
  16626. 128K × 8-bit
  16627. SH7750 SRAM
  16628.  
  16629. A18 A16
  16630.  
  16631. • •
  16632. • •
  16633. • •
  16634. • •
  16635. • •
  16636. • •
  16637. • •
  16638. • •
  16639. A2 A0
  16640. CSn CS
  16641. RD OE
  16642. D31 I/O7
  16643.  
  16644. • • • •
  16645. • • • •
  16646. • • •
  16647. •
  16648. • • • •
  16649.  
  16650. D24 I/O0
  16651. WE3 WE
  16652. D23
  16653.  
  16654.  
  16655. •
  16656. •
  16657. •
  16658. •
  16659. •
  16660. •
  16661. •
  16662. •
  16663. D16 A16
  16664.  
  16665. • •
  16666. WE2 • •
  16667. • •
  16668. D15 • •
  16669. A0
  16670. •
  16671. •
  16672. •
  16673. •
  16674. •
  16675. • • CS
  16676. •
  16677. D8 OE
  16678. WE1 I/O7
  16679.  
  16680. • •
  16681. D7 • •
  16682. • •
  16683.  
  16684. • • • •
  16685. •
  16686. •
  16687. •
  16688. • • I/O0
  16689. •
  16690. D0 WE
  16691. WE0
  16692.  
  16693. A16
  16694.  
  16695. •
  16696. •
  16697. •
  16698. •
  16699. •
  16700. •
  16701. •
  16702. •
  16703. A0
  16704. CS
  16705. OE
  16706. I/O7
  16707. • •
  16708. • •
  16709. • •
  16710.  
  16711. • •
  16712.  
  16713. I/O0
  16714. WE
  16715.  
  16716. A16
  16717.  
  16718. •
  16719. •
  16720. •
  16721. •
  16722. •
  16723. •
  16724. •
  16725. •
  16726. A0
  16727. CS
  16728. OE
  16729. I/O7
  16730.  
  16731. •
  16732. •
  16733. •
  16734. •
  16735. •
  16736. •
  16737. •
  16738. •
  16739. I/O0
  16740. WE
  16741.  
  16742. Figure 13.7 Example of 32-Bit Data Width SRAM Connection
  16743.  
  16744. 326
  16745.  
  16746. ----------------------- Page 343-----------------------
  16747.  
  16748. 128K × 8-bit
  16749. SH7750 SRAM
  16750.  
  16751. A17 A16
  16752.  
  16753.  
  16754. •
  16755. • • •
  16756. •
  16757. • • •
  16758. •
  16759. • • •
  16760. •
  16761. • • •
  16762.  
  16763. A1 A0
  16764. CSn CS
  16765. RD OE
  16766. D15 I/O7
  16767.  
  16768.  
  16769. •
  16770. • •
  16771. •
  16772. • •
  16773. •
  16774. • •
  16775. •
  16776. • •
  16777.  
  16778. D8 I/O0
  16779. WE1 WE
  16780. D7
  16781.  
  16782. • •
  16783. • •
  16784. • •
  16785. • •
  16786.  
  16787. D0 A16
  16788.  
  16789.  
  16790. •
  16791. •
  16792. •
  16793. WE0 •
  16794. •
  16795. •
  16796. •
  16797. •
  16798.  
  16799. A0
  16800. CS
  16801. OE
  16802. I/O7
  16803.  
  16804.  
  16805. •
  16806. •
  16807. •
  16808. •
  16809. •
  16810. •
  16811. •
  16812. •
  16813.  
  16814. I/O0
  16815. WE
  16816.  
  16817. Figure 13.8 Example of 16-Bit Data Width SRAM Connection
  16818.  
  16819. 327
  16820.  
  16821. ----------------------- Page 344-----------------------
  16822.  
  16823. 128K × 8-bit
  16824. SH7750 SRAM
  16825.  
  16826. A16 A16
  16827.  
  16828. • • • •
  16829. • • • •
  16830. • • • •
  16831.  
  16832. • • • •
  16833.  
  16834. A0 A0
  16835. CSn CS
  16836. RD OE
  16837. D7 I/O7
  16838.  
  16839. • • • •
  16840. • • • •
  16841. • •
  16842. • •
  16843. • • • •
  16844.  
  16845. D0 I/O0
  16846. WE0 WE
  16847.  
  16848. Figure 13.9 Example of 8-Bit Data Width SRAM Connection
  16849.  
  16850. Wait State Control: Wait state insertion on the basic interface can be controlled by the WCR2
  16851. settings. If the WCR2 wait specification bits corresponding to a particular area are not zero, a
  16852. software wait is inserted in accordance with that specification. For details, see section 13.2.4, Wait
  16853. Control Register 2 (WCR2).
  16854.  
  16855. The specified number of Tw cycles are inserted as wait cycles using the basic interface wait timing
  16856. shown in figure 13.10.
  16857.  
  16858. 328
  16859.  
  16860. ----------------------- Page 345-----------------------
  16861.  
  16862. T1
  16863. Tw T2
  16864.  
  16865. CKIO
  16866.  
  16867. A25–A0
  16868.  
  16869. CSn
  16870.  
  16871. RD/WR
  16872.  
  16873. RD
  16874.  
  16875. D63–D0
  16876. (read)
  16877.  
  16878. WEn
  16879.  
  16880. D63–D0
  16881. (write)
  16882.  
  16883. BS
  16884.  
  16885. RDY
  16886.  
  16887. DACKn
  16888. (SA: IO ← memory)
  16889.  
  16890. DACKn
  16891. (SA: IO → memory)
  16892.  
  16893. DACKn
  16894. (DA)
  16895.  
  16896. Figure 13.10 Basic Interface Wait Timing (Software Wait Only)
  16897.  
  16898. 329
  16899.  
  16900. ----------------------- Page 346-----------------------
  16901.  
  16902. When software wait insertion is specified by WCR2, the external wait input RDY signal is also
  16903. sampled. RDY signal sampling is shown in figure 13.11. A single-cycle wait is specified as a
  16904. software wait. Sampling is performed at the transition from the Tw state to the T2 state; therefore,
  16905. the RDY signal has no effect if asserted in the T1 cycle or the first Tw cycle. The RDY signal is
  16906. sampled on the rising edge of the clock.
  16907.  
  16908.  
  16909. T1 Tw Twe T2
  16910.  
  16911. CKIO
  16912.  
  16913. A25–A0
  16914.  
  16915. CSn
  16916.  
  16917. RD/WR
  16918.  
  16919. RD
  16920. (read)
  16921.  
  16922. D63–D0
  16923. (read)
  16924.  
  16925. WEn
  16926. (write)
  16927.  
  16928. D63–D0
  16929. (write)
  16930.  
  16931. BS
  16932.  
  16933. RDY
  16934.  
  16935. DACKn
  16936. (SA: IO ← memory)
  16937.  
  16938. DACKn
  16939. (SA: IO → memory)
  16940.  
  16941. DACKn
  16942. (DA)
  16943.  
  16944. Figure 13.11 Basic Interface Wait State Timing (Wait State Insertion by R D Y
  16945. Signal)
  16946.  
  16947. 330
  16948.  
  16949. ----------------------- Page 347-----------------------
  16950.  
  16951. 1 3 . 3 . 4 DRAM Interface
  16952.  
  16953. Direct Connection of DRAM: When the memory type bits (DRAMTP2–0) in BCR1 are set
  16954. to 100, area 3 becomes DRAM space; when set to 101, area 2 and area 3 become DRAM space.
  16955. The DRAM interface function can then be used to connect DRAM directly to the SH7750.
  16956.  
  16957. 16, 32, or 64 bits can be selected as the interface data width for area 3 when bits DRAMTP2–0 are
  16958. set to 100, and 16 or 32 bits can be used for both area 2 and area 3 when bits DRAMTP2–0 are set
  16959. to 101.
  16960.  
  16961. 2-CAS 16-bit DRAMs can be connected, since CAS is used to control byte access.
  16962.  
  16963. Signals used for connection when DRAM is connected to area 3 are RAS, CAS0 to CAS7, and
  16964. RD/WR. CAS2 to CAS7 are not used when the data width is 16 bits. When DRAM is connected
  16965. to areas 2 and 3, the signals for area 2 DRAM connection are RAS2, CAS4 to CAS7, and
  16966. RD/WR, and those for area 3 DRAM connection are RAS, CAS0 to CAS3, and RD/WR.
  16967.  
  16968. In addition to normal read and write access modes, fast page mode is supported for burst access. For
  16969. DRAM connected to areas 2 and 3, EDO mode, which enables the DRAM access time to be
  16970. increased, is supported.
  16971.  
  16972. 331
  16973.  
  16974. ----------------------- Page 348-----------------------
  16975.  
  16976. 1M × 16-bit
  16977. SH7750 DRAM
  16978.  
  16979. A12–A3 A9–A0
  16980. RAS RAS
  16981. CS3 OE
  16982. RD/WR WE
  16983. D63–D48 I/O15–I/O0
  16984. WE7 UCAS
  16985. WE6 LCAS
  16986.  
  16987. A9–A0
  16988. RAS
  16989. OE
  16990. WE
  16991. D47–D32 I/O15–I/O0
  16992. WE5 UCAS
  16993. WE4 LCAS
  16994.  
  16995. A9–A0
  16996. RAS
  16997. OE
  16998. WE
  16999. D31–D16 I/O15–I/O0
  17000. WE3 UCAS
  17001. WE2 LCAS
  17002.  
  17003. A9–A0
  17004. RAS
  17005. OE
  17006. WE
  17007. D15–D0 I/O15–I/O0
  17008. WE1 UCAS
  17009. WE0 LCAS
  17010.  
  17011. Figure 13.12 Example of DRAM Connection (64-Bit Data Width, Area 3)
  17012.  
  17013. 332
  17014.  
  17015. ----------------------- Page 349-----------------------
  17016.  
  17017. 256K × 16-bit
  17018. SH7750 DRAM
  17019.  
  17020. A10 A8
  17021.  
  17022.  
  17023. • • • •
  17024. • • • •
  17025. • •
  17026. • •
  17027. • • • •
  17028. A2 A0
  17029.  
  17030.  
  17031. RAS RAS
  17032. CS3 OE
  17033. RD/WR WE
  17034. D31 I/O15
  17035.  
  17036.  
  17037. • •
  17038. • •
  17039. • •
  17040. • •
  17041. • •
  17042. • •
  17043. • •
  17044. • •
  17045. D16 I/O0
  17046. CAS3 UCAS
  17047. CAS2 LCAS
  17048. D15
  17049.  
  17050. • •
  17051. • •
  17052. • •
  17053.  
  17054. • •
  17055. D0
  17056. A8
  17057.  
  17058. CAS1 • •
  17059. • •
  17060. • •
  17061.  
  17062. CAS0 • •
  17063. A0
  17064.  
  17065.  
  17066. RAS
  17067. OE
  17068. WE
  17069. I/O15
  17070.  
  17071. • •
  17072. • •
  17073. • •
  17074. • •
  17075. I/O0
  17076. UCAS
  17077. LCAS
  17078.  
  17079. Figure 13.13 Example of DRAM Connection (32-Bit Data Width, Area 3)
  17080.  
  17081. 333
  17082.  
  17083. ----------------------- Page 350-----------------------
  17084.  
  17085. 256K × 16-bit
  17086. SH7750 DRAM
  17087.  
  17088. A9 A8
  17089.  
  17090. • • • •
  17091. • • • •
  17092. • • • •
  17093. • • • •
  17094. A1 A0
  17095. CS3
  17096. CS2
  17097. RAS RAS Area 3
  17098.  
  17099. RAS2 OE
  17100. RD/WR WE
  17101. D15 I/O15
  17102.  
  17103. • • • •
  17104. • • • •
  17105. • • • •
  17106. • • • •
  17107. D0 I/O0
  17108. CAS1 UCAS
  17109. CAS0 LCAS
  17110.  
  17111. CAS5
  17112. CAS4
  17113.  
  17114. A8
  17115.  
  17116. • •
  17117. • •
  17118. • •
  17119. • •
  17120. A0
  17121. RAS
  17122. OE
  17123. Area 2
  17124. WE
  17125. I/O15
  17126. • •
  17127. • •
  17128. • •
  17129.  
  17130. • •
  17131. I/O0
  17132. UCAS
  17133. LCAS
  17134.  
  17135. Figure 13.14 Example of DRAM Connection (16-Bit Data Width,
  17136. Areas 2 and 3)
  17137.  
  17138. 334
  17139.  
  17140. ----------------------- Page 351-----------------------
  17141.  
  17142. Address Multiplexing: When area 2 or area 3 is designated as DRAM space, address
  17143. multiplexing is always performed in accesses to DRAM. This enables DRAM, which requires row
  17144. and column address multiplexing, to be connected directly to the SH7750 without using an
  17145. external address multiplexer circuit. Any of the five multiplexing methods shown below can be
  17146. selected, by setting bits AMXEXT and AMX2–0 in MCR for area 2 or 3 DRAM. The relationship
  17147. between the AMXEXT and AMX2–0 bits and address multiplexing is shown in table 13.14. The
  17148. address output pins subject to address multiplexing are A17 to A1. The address signals output by
  17149. pins A25 to A18 are undefined.
  17150.  
  17151. Table 13.14 Relationship between AMXEXT and AMX2–0 Bits and Address
  17152. Multiplexing
  17153.  
  17154. Setting Number External Address Pins
  17155. of Column
  17156. Address
  17157. Bits
  17158.  
  17159. AMXEXT AMX2 AMX1 AMX0 Output Timing A1–A13 A14 A15 A16 A17
  17160.  
  17161. 0 0 0 0 8 bits Column address A1–A13 A14 A15 A16 A17
  17162.  
  17163. Row address A9–A21 A22 A23 A24 A25
  17164.  
  17165. 1 9 bits Column address A1–A13 A14 A15 A16 A17
  17166.  
  17167. Row address A10–A22 A23 A24 A25 A17
  17168.  
  17169. 1 0 10 bits Column address A1–A13 A14 A15 A16 A17
  17170.  
  17171. Row address A11–A23 A24 A25 A16 A17
  17172.  
  17173. 1 11 bits Column address A1–A13 A14 A15 A16 A17
  17174.  
  17175. Row address A12–A24 A25 A15 A16 A17
  17176.  
  17177. 1 0 0 12 bits Column address A1–A13 A14 A15 A16 A17
  17178.  
  17179. Row address A13–A25 A14 A15 A16 A17
  17180.  
  17181. Other settings Reserved — — — — — —
  17182.  
  17183. 335
  17184.  
  17185. ----------------------- Page 352-----------------------
  17186.  
  17187. Basic Timing: The basic timing for DRAM access is 4 cycles. This basic timing is shown in
  17188. figure 13.15. Tpc is the precharge cycle, Tr the RAS assert cycle, Tc1 the CAS assert cycle, and
  17189. Tc2 the read data latch cycle.
  17190.  
  17191.  
  17192. Tr1 Tr2 Tc1 Tc2 Tpc
  17193.  
  17194. CKIO
  17195.  
  17196. A25–A0 Row Column
  17197.  
  17198. CSn
  17199.  
  17200. RD/WR
  17201.  
  17202. RAS
  17203.  
  17204. CAS
  17205.  
  17206. D63–D0
  17207. (read)
  17208.  
  17209. D63–D0
  17210. (write)
  17211.  
  17212. BS
  17213.  
  17214. DACKn
  17215. (SA: IO ← memory)
  17216.  
  17217. DACKn
  17218. (SA: IO → memory)
  17219.  
  17220. Figure 13.15 Basic DRAM Access Timing
  17221.  
  17222. 336
  17223.  
  17224. ----------------------- Page 353-----------------------
  17225.  
  17226. Wait State Control: As the clock frequency increases, it becomes impossible to complete all
  17227. states in one cycle as in basic access. Therefore, provision is made for state extension by using the
  17228. setting bits in WCR2 and MCR. The timing with state extension using these settings is shown in
  17229. figure 13.16. Additional Tpc cycles (cycles used to secure the RAS precharge time) can be inserted
  17230. by means of the TPC bit in MCR, giving from 1 to 7 cycles. The number of cycles from RAS
  17231. assertion to CAS assertion can be set to between 2 and 5 by inserting Trw cycles by means of the
  17232. RCD bit in MCR. Also, the number of cycles from CAS assertion to the end of the access can be
  17233. varied between 1 and 16 according to the setting of A2W2 to A2W0 or A3W2 to A3W0 in WCR2.
  17234.  
  17235.  
  17236. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  17237.  
  17238. CKIO
  17239.  
  17240. A25–A0 Row Column
  17241.  
  17242. CSn
  17243.  
  17244. RD/WR
  17245.  
  17246. RAS
  17247.  
  17248. CAS
  17249.  
  17250. D63–D0
  17251. (read)
  17252.  
  17253. D63–D0
  17254. (write)
  17255.  
  17256. BS
  17257.  
  17258. DACKn
  17259. (SA: IO ← memory)
  17260.  
  17261. DACKn
  17262. (SA: IO → memory)
  17263.  
  17264. Figure 13.16 DRAM Wait State Timing
  17265.  
  17266. 337
  17267.  
  17268. ----------------------- Page 354-----------------------
  17269.  
  17270. Burst Access: In addition to the normal DRAM access mode in which a row address is output in
  17271. each data access, a fast page mode is also provided for the case where consecutive accesses are made
  17272. to the same row. This mode allows fast access to data by outputting the row address only once,
  17273. then changing only the column address for each subsequent access. Normal access or burst access
  17274. using fast page mode can be selected by means of the burst enable (BE) bit in MCR. The timing
  17275. for burst access using fast page mode is shown in figure 13.17.
  17276.  
  17277. In burst transfer, 4 (longword access) or 32 (cache fill or cache write-back) bytes of data are burst-
  17278. transferred in the case of a 16-bit bus size. With a 32-bit bus size, 32 bytes of data are burst-
  17279. transferred (cache fill or cache write-back). In a 32-byte burst transfer (cache fill), the first access
  17280. comprises a longword that includes the data requiring access. The remaining accesses are performed
  17281. on 32-byte boundary data that includes the relevant data. In burst transfer (cache write-back),
  17282. wraparound writing is performed for 32-byte boundary data.
  17283.  
  17284. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tpc
  17285.  
  17286. CKIO
  17287.  
  17288. A25–A0 r c1 c2 c3 c4
  17289.  
  17290. CSn
  17291.  
  17292. RD/WR
  17293.  
  17294. RAS
  17295.  
  17296. CAS
  17297.  
  17298. D63–D0
  17299. d1 d2 d3 d4
  17300. (read)
  17301.  
  17302. D63–D0
  17303. d1 d2 d3 d4
  17304. (write)
  17305.  
  17306. BS
  17307.  
  17308. DACKn
  17309. (SA: IO ← memory)
  17310.  
  17311. DACKn
  17312. (SA: IO → memory)
  17313.  
  17314. Figure 13.17 DRAM Burst Access Timing
  17315.  
  17316. 338
  17317.  
  17318. ----------------------- Page 355-----------------------
  17319.  
  17320. EDO Mode: With DRAM, in addition to the mode in which data is output to the data bus only
  17321. while the CAS signal is asserted in a data read cycle, an EDO (extended data out) mode is also
  17322. provided in which, once the CAS signal is asserted while the RAS signal is asserted, even if the
  17323. CAS signal is negated, data is output to the data bus until the CAS signal is next asserted. In the
  17324. SH7750, the EDO mode bit (EDOMODE) in MCR enables either normal access/burst access
  17325. using fast page mode, or EDO mode normal access/burst access, to be selected for DRAM. When
  17326. EDO mode is set, BE must be set to 1 in MCR. EDO mode normal access is shown in figure
  17327. 13.18, and burst access in figure 13.19.
  17328.  
  17329. CAS Negation Period: The CAS negation period can be set to 1 or 2 by means of the TCAS bit in
  17330. the MCR register.
  17331.  
  17332. Tr1 Tr2 Tc1 Tc2 Tce Tpc
  17333.  
  17334. CKIO
  17335.  
  17336.  
  17337.  
  17338.  
  17339. A25–A0 Row Column
  17340.  
  17341.  
  17342.  
  17343.  
  17344. CSn
  17345.  
  17346.  
  17347.  
  17348. RD/WR
  17349.  
  17350.  
  17351.  
  17352.  
  17353. RAS
  17354.  
  17355.  
  17356.  
  17357.  
  17358. CASn
  17359.  
  17360. D63–D0
  17361.  
  17362. (read)
  17363.  
  17364.  
  17365.  
  17366.  
  17367.  
  17368. BS
  17369.  
  17370.  
  17371.  
  17372. DACKn
  17373. (SA: IO ← memory)
  17374.  
  17375. Figure 13.18 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  17376.  
  17377. 339
  17378.  
  17379. ----------------------- Page 356-----------------------
  17380.  
  17381. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  17382.  
  17383. CKIO
  17384.  
  17385. A25–A0 r c1 c2 c3 c4
  17386.  
  17387. CSn
  17388.  
  17389. RD/WR
  17390.  
  17391. RAS
  17392.  
  17393. CAS
  17394.  
  17395. D63–D0
  17396. d1 d2 d3 d4
  17397. (read)
  17398.  
  17399. BS
  17400.  
  17401. DACKn
  17402. (SA: IO ← memory)
  17403.  
  17404. Figure 13.19 Burst Access Timing in DRAM EDO Mode
  17405.  
  17406. RAS Down Mode: The SH7750 has an address comparator for detecting row address matches in
  17407. burst mode. By using this address comparator, and also setting RAS down mode specification bit
  17408. RASD to 1, it is possible to select RAS down mode, in which RAS remains asserted after the end
  17409. of an access. When RAS down mode is used, if the refresh cycle is longer than the maximum
  17410. DRAM RAS assert time, the refresh cycle must be decreased to or below the maximum value of
  17411. tRAS .
  17412.  
  17413. RAS down mode can only be used when DRAM is connected in area 3.
  17414.  
  17415. In RAS down mode, in the event of an access to an address with a different row address, an access
  17416. to a different area, a refresh request, or a bus request, RAS is negated and the necessary operation is
  17417. performed. When DRAM access is resumed after this, since this is the start of RAS down mode,
  17418. the operation starts with row address output. Timing charts are shown in figures 13.20 (1), (2),
  17419. (3), and (4).
  17420.  
  17421. 340
  17422.  
  17423. ----------------------- Page 357-----------------------
  17424.  
  17425. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  17426.  
  17427. CKIO
  17428.  
  17429. A25–A0 r c1 c2 c3 c4
  17430.  
  17431. CSn
  17432.  
  17433. RD/WR
  17434.  
  17435. RAS
  17436.  
  17437. CAS
  17438.  
  17439. D63–D0
  17440. d1 d2 d3 d4
  17441. (read)
  17442.  
  17443. D63–D0
  17444. d1 d2 d3 d4
  17445. (write)
  17446.  
  17447. BS
  17448.  
  17449. DACKn
  17450. (SA: IO ← memory)
  17451.  
  17452. DACKn
  17453. (SA: IO → memory)
  17454.  
  17455. Figure 13.20 (1) DRAM Burst Bus Cycle, RAS Down Mode Start
  17456. (Fast Page Mode, RCD = 0, Anw = 0)
  17457.  
  17458. 341
  17459.  
  17460. ----------------------- Page 358-----------------------
  17461.  
  17462. Tnop Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  17463.  
  17464. CKIO
  17465.  
  17466.  
  17467.  
  17468. A25–A0 c0 c1 c2 c3
  17469.  
  17470.  
  17471.  
  17472.  
  17473. CSn
  17474.  
  17475.  
  17476. RD/WR
  17477.  
  17478.  
  17479. End of RAS down mode
  17480. RAS
  17481.  
  17482.  
  17483.  
  17484. CASn
  17485.  
  17486. D63–D0
  17487.  
  17488. (read) d0 d1 d2 d3
  17489.  
  17490.  
  17491.  
  17492.  
  17493.  
  17494.  
  17495. D63–D0
  17496. d0 d1 d2 d3
  17497. (write)
  17498.  
  17499.  
  17500.  
  17501. BS
  17502.  
  17503.  
  17504. DACKn
  17505. (SA: IO ← memory)
  17506.  
  17507.  
  17508.  
  17509. DACKn
  17510. (SA: IO → memory)
  17511.  
  17512. Figure 13.20 (2) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  17513. (Fast Page Mode, RCD = 0, Anw = 0)
  17514.  
  17515. 342
  17516.  
  17517. ----------------------- Page 359-----------------------
  17518.  
  17519. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  17520.  
  17521. CKIO
  17522.  
  17523. A25–A0 r c1 c2 c3 c4
  17524.  
  17525. CSn
  17526.  
  17527. RD/WR
  17528.  
  17529. RAS
  17530.  
  17531. CAS
  17532.  
  17533. D63–D0
  17534. d1 d2 d3 d4
  17535. (read)
  17536.  
  17537. BS
  17538.  
  17539. DACKn
  17540. (SA: IO ← memory)
  17541.  
  17542. Figure 13.20 (3) DRAM Burst Bus Cycle, RAS Down Mode Start
  17543. (EDO Mode, RCD = 0, Anw = 0)
  17544.  
  17545. 343
  17546.  
  17547. ----------------------- Page 360-----------------------
  17548.  
  17549. Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  17550.  
  17551. CKIO
  17552.  
  17553. A25–A0 c1 c2 c3 c4
  17554.  
  17555. CSn
  17556.  
  17557. RD/WR
  17558.  
  17559. End of RAS down mode
  17560.  
  17561. RAS
  17562.  
  17563. CAS
  17564.  
  17565. D63–D0
  17566. d1 d2 d3 d4
  17567. (read)
  17568.  
  17569. BS
  17570.  
  17571. DACKn
  17572. (SA: IO ← memory)
  17573.  
  17574. Figure 13.20 (4) DRAM Burst Bus Cycle, RAS Down Mode Continuation
  17575. (EDO Mode, RCD = 0, Anw = 0)
  17576.  
  17577. Refresh Timing: The bus state controller includes a function for controlling DRAM refreshing.
  17578. Distributed refreshing using a CAS-before-RAS cycle can be performed for DRAM by clearing the
  17579. RMODE bit to 0 and setting the RFSH bit to 1 in MCR. Self-refresh mode is also supported.
  17580.  
  17581. When CAS-before-RAS refresh cycles are executed, refreshing is performed at intervals determined
  17582. by the input clock selected by bits CKS2–CKS0 in RTCSR, and the value set in RTCOR. The
  17583. value of bits CKS2–CKS0 in RTCOR should be set so as to satisfy the specification for the
  17584. DRAM refresh interval. First make the settings for RTCOR, RTCNT, and the RMODE and
  17585. RFSH bits in MCR, then make the CKS2–CKS0 setting. When the clock is selected by CKS2–
  17586. CKS0, RTCNT starts counting up from the value at that time. The RTCNT value is constantly
  17587. compared with the RTCOR value, and if the two values are the same, a refresh request is generated
  17588. and the BACK pin goes high. If the SH7750’s external bus can be used, CAS-before-RAS
  17589. refreshing is performed. At the same time, RTCNT is cleared to zero and the count-up is restarted.
  17590. Figure 13.21 shows the operation of CAS-before-RAS refreshing.
  17591.  
  17592. 344
  17593.  
  17594. ----------------------- Page 361-----------------------
  17595.  
  17596. RTCOR value RTCNT cleared to 0 when
  17597. RTCNT = RTCOR
  17598. RTCNT
  17599.  
  17600. H'00000000 Time
  17601.  
  17602. RTCSR.CKS2–0 = 000 ≠ 000
  17603.  
  17604. Refresh
  17605. request
  17606.  
  17607. Refresh request cleared
  17608.  
  17609. by start of refresh cycle
  17610. External bus
  17611.  
  17612. CAS-before-RAS refresh cycle
  17613.  
  17614. Figure 13.21 CAS-Before-RAS Refresh Operation
  17615.  
  17616. Figure 13.22 shows the timing of the CAS-before-RAS refresh cycle.
  17617.  
  17618. The number of RAS assert cycles in the refresh cycle is specified by bits TRAS2–TRAS0 in
  17619. MCR. The specification of the RAS precharge time in the refresh cycle is determined by the
  17620. setting of bits TRC2–TRC0 in MCR.
  17621.  
  17622. 345
  17623.  
  17624. ----------------------- Page 362-----------------------
  17625.  
  17626. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  17627.  
  17628. CKIO
  17629.  
  17630. A25–A0
  17631.  
  17632. CSn
  17633.  
  17634. RD/WR
  17635.  
  17636. RAS
  17637.  
  17638. CAS
  17639.  
  17640. D63–D0
  17641.  
  17642. BS
  17643.  
  17644. Figure 13.22 DRAM CAS-Before-RAS Refresh Cycle Timing (TRAS = 0,
  17645. TRC = 1)
  17646.  
  17647. The self-refreshing supported by the SH7750 is shown in figure 13.23.
  17648.  
  17649. After the self-refresh is cleared, the refresh controller immediately generates a refresh request. The
  17650. RAS precharge time immediately after the end of the self-refreshing can be set by bits TRC2–
  17651. TRC0 in MCR.
  17652.  
  17653. DRAMs include low-power products (L versions) with a long refresh cycle time (for example, the
  17654. HM51W4160AL L version has a refresh cycle of 1024 cycles/128 ms compared with 1024
  17655. cycles/16 ms for the normal version). With these DRAMs, however, the same refresh cycle as for
  17656. the normal version is requested only in the case of refreshing immediately following self-
  17657. refreshing. To ensure efficient DRAM refreshing, therefore, processing is needed to generate an
  17658. overflow interrupt and restore the refresh cycle to the proper value, after the necessary CAS-before-
  17659. RAS refreshing has been performed following self-refreshing of an L-version DRAM, using the
  17660. OVF, OVIE, and LMTS bits in RTCSR and the refresh controller’s refresh count register (RFCR).
  17661. The necessary procedure is as follows.
  17662.  
  17663. 1. Normally, set the refresh counter count cycle to the optimum value for the L version (e.g.
  17664. 1024 cycles/128 ms).
  17665.  
  17666. 346
  17667.  
  17668. ----------------------- Page 363-----------------------
  17669.  
  17670. 2. When a transition is made to self-refreshing:
  17671.  
  17672. a. Provide an interrupt handler to restore the refresh counter count value to the optimum value
  17673. for the L version (e.g. 1024 cycles/128 ms) when a refresh counter overflow interrupt is
  17674. generated.
  17675.  
  17676. b. Re-set the refresh counter count cycle to the requested short cycle (e.g. 1024 cycles/16 ms),
  17677. set refresh controller overflow interruption, and clear the refresh controller’s refresh count
  17678. register (RFCR) to 0.
  17679.  
  17680. c. Set self-refresh mode.
  17681.  
  17682. By using this procedure, the refreshing immediately following a self-refresh will be performed in a
  17683. short cycle, and when adequate refreshing ends, an interrupt is generated and the setting can be
  17684. restored to the original refresh cycle.
  17685.  
  17686. CAS-before-RAS refreshing is performed in normal operation, in sleep mode, and in the case of a
  17687. manual reset.
  17688.  
  17689. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the case
  17690. of a manual reset.
  17691.  
  17692. When the bus has been released in response to a bus arbitration request, or when a transition is
  17693. made to standby mode, signals generally become high-impedance, but whether the RAS and CAS
  17694. signals become high-impedance or continue to be output can be controlled by the HIZCNT bit in
  17695. BCR1. This enables the DRAM to be kept in the self-refreshing state.
  17696.  
  17697. As the DRAM CAS signal is multiplexed with WEn for normal memory (SRAM, etc.), access to
  17698. memory that uses the WEn signals must be disabled during self-refreshing.
  17699.  
  17700. 347
  17701.  
  17702. ----------------------- Page 364-----------------------
  17703.  
  17704. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  17705.  
  17706. CKIO
  17707.  
  17708. A25–A0
  17709.  
  17710. CSn
  17711.  
  17712. RD/WR
  17713.  
  17714. RAS
  17715.  
  17716. CAS
  17717.  
  17718. D63–D0
  17719.  
  17720. BS
  17721.  
  17722. Figure 13.23 DRAM Self-Refresh Cycle Timing
  17723.  
  17724. Power-On Sequence: Regarding use of DRAM after powering on, it is requested that a wait
  17725. time (at least 100 µs or 200 µs) during which no access can be performed be provided, followed by
  17726. at least the prescribed number (usually 8) of dummy CAS-before-RAS refresh cycles. As the bus
  17727. state controller does not perform any special operations for a power-on reset, the necessary power-
  17728. on sequence must be carried out by the initialization program executed after a power-on reset.
  17729.  
  17730. 348
  17731.  
  17732. ----------------------- Page 365-----------------------
  17733.  
  17734. 1 3 . 3 . 5 Synchronous DRAM Interface
  17735.  
  17736. Direct Connection of Synchronous DRAM: Since synchronous DRAM can be selected
  17737. by the CS signal, it can be connected to physical space areas 2 and 3 using RAS and other control
  17738. signals in common. If the memory type bits (DRAMTP2–0) in BCR1 are set to 010, area 2 is
  17739. normal memory space and area 3 is synchronous DRAM space; if set to 011, areas 2 and 3 are
  17740. both synchronous DRAM space.
  17741.  
  17742. With the SH7750, burst read/burst write mode is supported as the synchronous DRAM operating
  17743. mode. The data bus width is 32 or 64 bits, and the SZ size bits in MCR must be set to 00 or 11.
  17744. The burst enable bit (BE) in MCR is ignored, a 32-byte burst transfer is performed in a cache
  17745. fill/copy-back cycle, and in a write-through area write or a non-cacheable area read/write, 32-byte
  17746. data is read even in a single read in order to access synchronous DRAM with a burst read/write
  17747. access. 32-byte data transfer is also performed in a single write, but DQMn is not asserted when
  17748. unnecessary data is transferred.
  17749.  
  17750. The control signals for direct connection of synchronous DRAM are RAS, CAS, RD/WR, CS2 or
  17751. CS3, DQM0 to DQM7, and CKE. All the signals other than CS2 and CS3 are common to all
  17752. areas, and signals other than CKE are valid and latched only when CS2 or CS3 is asserted.
  17753. Synchronous DRAM can therefore be connected in parallel to a number of areas. CKE is negated
  17754. (driven low) when the frequency is changed, when the clock is unstable after the clock supply is
  17755. stopped and restarted, or when self-refreshing is performed, and is always asserted (high) at other
  17756. times.
  17757.  
  17758. Commands for synchronous DRAM are specified by RAS, CAS, RD/WR, and specific address
  17759. signals. The commands are NOP, auto-refresh (REF), self-refresh (SELF), precharge all banks
  17760. (PALL), precharge specified bank (PRE), row address strobe bank active (ACTV), read (READ),
  17761. read with precharge (READA), write (WRIT), write with precharge (WRITA), and mode register
  17762. setting (MRS).
  17763.  
  17764. Byte specification is performed by DQM0 to DQM7. A read/write is performed for the byte for
  17765. which the corresponding DQM signal is low. When the bus width is 64 bits, in big-endian mode
  17766. DQM7 specifies an access to address 8n, and DQM0 specifies an access to address 8n + 7. In little-
  17767. endian mode, DQM7 specifies an access to address 8n + 7, and DQM0 specifies an access to
  17768. address 8n.
  17769.  
  17770. Figures 13.24 and 13.25 show examples of the connection of 16M × 16-bit synchronous DRAMs.
  17771.  
  17772. 349
  17773.  
  17774. ----------------------- Page 366-----------------------
  17775.  
  17776. 512K × 16-bit × 2-bank
  17777. SH7750 synchronous DRAM
  17778.  
  17779. A12–A3 A9–A0
  17780. CKIO CLK
  17781. CKE CKE
  17782. CS3 CS
  17783. RAS RAS
  17784. RD CAS
  17785. RD/WR WE
  17786. D63–D48 I/O15–I/O0
  17787. DQM7 DQMU
  17788. DQM6 DQML
  17789.  
  17790. A9–A0
  17791. CLK
  17792. CKE
  17793. CS
  17794. RAS
  17795. CAS
  17796. WE
  17797. D47–D32 I/O15–I/O0
  17798. DQM5 DQMU
  17799. DQM4 DQML
  17800.  
  17801. A9–A0
  17802. CLK
  17803. CKE
  17804. CS
  17805. RAS
  17806. CAS
  17807. WE
  17808. D31–D16 I/O15–I/O0
  17809. DQM3 DQMU
  17810. DQM2 DQML
  17811.  
  17812. A9–A0
  17813. CLK
  17814. CKE
  17815. CS
  17816. RAS
  17817. CAS
  17818. WE
  17819. D15–D0 I/O15–I/O0
  17820. DQM1 DQMU
  17821. DQM0 DQML
  17822.  
  17823. Figure 13.24 Example of 64-Bit Data Width Synchronous DRAM Connection
  17824. (Area 3)
  17825.  
  17826. 350
  17827.  
  17828. ----------------------- Page 367-----------------------
  17829.  
  17830. 512K × 16-bit × 2-bank
  17831. SH7750 synchronous DRAM
  17832.  
  17833. A11–A2 A9–A0
  17834. CKIO CLK
  17835. CKE CKE
  17836. CS3 CS
  17837. RAS RAS
  17838. RD CAS
  17839. RD/WR WE
  17840. D31–D16 I/O15–I/O0
  17841. DQM3 DQMU
  17842. DQM2 DQML
  17843.  
  17844. A9–A0
  17845. CLK
  17846. CKE
  17847. CS
  17848. RAS
  17849. CAS
  17850. WE
  17851. D15–D0 I/O15–I/O0
  17852. DQM1 DQMU
  17853. DQM0 DQML
  17854.  
  17855. Figure 13.25 Example of 32-Bit Data Width Synchronous DRAM Connection
  17856. (Area 3)
  17857.  
  17858. Address Multiplexing: Synchronous DRAM can be connected without external multiplexing
  17859. circuitry in accordance with the address multiplex specification bits AMXEXT and AMX2–AMX0
  17860. in MCR. Table 13.15 shows the relationship between the address multiplex specification bits and
  17861. the bits output at the address pins. See Appendix F, Synchronous DRAM Address Multiplexing
  17862. Tables.
  17863.  
  17864. The address signals output at A25–A18, A1, and A0 are undefined.
  17865.  
  17866. When A0, the LSB of the synchronous DRAM address, is connected to the SH7750, with a 32-bit
  17867. bus width it makes a longword address specification. Connection should therefore be made in this
  17868. order: connect pin A0 of the synchronous DRAM to pin A2 of the SH7750, then connect pin A1
  17869. to pin A3.
  17870.  
  17871. With a 64-bit bus width, the LSB makes a quadword address specification. Connection should
  17872. therefore be made in this order: connect pin A0 of the synchronous DRAM to pin A3 of the
  17873. SH7750, then connect pin A1 to pin A4.
  17874.  
  17875. 351
  17876.  
  17877. ----------------------- Page 368-----------------------
  17878.  
  17879. Table 13.15 Example of Correspondence between SH7750 and Synchronous
  17880. DRAM Address Pins (64-Bit Bus Width, AMX2–AMX0 = 011,
  17881. AMXEXT = 0)
  17882.  
  17883. SH7750 Address Pin Synchronous DRAM Address Pin
  17884.  
  17885. RAS Cycle CAS Cycle Function
  17886.  
  17887. A14 A22 A22 A11 BANK select bank address
  17888.  
  17889. A13 A21 H/L A10 Address precharge setting
  17890.  
  17891. A12 A20 0 A9
  17892.  
  17893. A11 A19 0 A8
  17894.  
  17895. A10 A18 A10 A7
  17896.  
  17897. A9 A17 A9 A6
  17898.  
  17899. A8 A16 A8 A5
  17900.  
  17901. A7 A15 A7 A4
  17902.  
  17903. A6 A14 A6 A3
  17904.  
  17905. A5 A13 A5 A2
  17906.  
  17907. A4 A12 A4 A1
  17908.  
  17909. A3 A11 A3 A0
  17910.  
  17911. A2 — A2 Not used
  17912.  
  17913. A1 — A1 Not used
  17914.  
  17915. A0 — A0 Not used
  17916.  
  17917. Burst Read: The timing chart for a burst read is shown in figure 13.26. In the following
  17918. example it is assumed that four 512K x 16-bit x 2-bank synchronous DRAMs are connected, and a
  17919. 64-bit data width is used. The burst length is 4. Following the Tr cycle in which ACTV command
  17920. output is performed, a READA command is issued in the Tc1 cycle, and the read data is accepted
  17921. on the rising edge of the external command clock (CKIO) from cycle Td1 to cycle Td4. The Tpc
  17922. cycle is used to wait for completion of auto-precharge based on the READA command inside the
  17923. synchronous DRAM; no new access command can be issued to the same bank during this cycle. In
  17924. the SH7750, the number of Tpc cycles is determined by the specification of bits TPC2–TPC0 in
  17925. MCR, and commands are not issued for the same synchronous DRAM during this interval.
  17926.  
  17927. The example in figure 13.26 shows the basic cycle. To connect slower synchronous DRAM, the
  17928. cycle can be extended by setting WCR2 and MCR bits. The number of cycles from the ACTV
  17929. command output cycle, Tr, to the READA command output cycle, Tc1, can be specified by bits
  17930. RCD1 and RCD0 in MCR, with a value of 0 to 3 specifying 2 to 4 cycles, respectively. In the
  17931. case of 2 or more cycles, a Trw cycle, in which an NOP command is issued for the synchronous
  17932. DRAM, is inserted between the Tr cycle and the Tc cycle. The number of cycles from READA
  17933. command output cycle Tc1 to the first read data latch cycle, Td1, can be specified as 1 to 5 cycles
  17934.  
  17935. 352
  17936.  
  17937. ----------------------- Page 369-----------------------
  17938.  
  17939. independently for areas 2 and 3 by means of bits A2W2–A2W0 and A3W2–A3W0 in WCR2. This
  17940. number of cycles corresponds to the number of synchronous DRAM CAS latency cycles.
  17941.  
  17942. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  17943.  
  17944. CKIO
  17945.  
  17946.  
  17947.  
  17948. Bank Row
  17949.  
  17950. t
  17951.  
  17952. Precharge-sel Row H/L
  17953.  
  17954. t
  17955.  
  17956. Address Row c0
  17957.  
  17958.  
  17959.  
  17960.  
  17961. CSn
  17962.  
  17963.  
  17964.  
  17965. RD/WR
  17966.  
  17967.  
  17968.  
  17969. RAS
  17970.  
  17971.  
  17972.  
  17973. CASS
  17974.  
  17975.  
  17976.  
  17977. DQMn
  17978.  
  17979. D63–D0
  17980. (read) d0 d1 d2 d3
  17981.  
  17982.  
  17983.  
  17984.  
  17985.  
  17986. BS
  17987.  
  17988. CKE
  17989.  
  17990.  
  17991.  
  17992. DACKn
  17993. (SA: IO ← memory)
  17994.  
  17995. Figure 13.26 Basic Timing for Synchronous DRAM Burst Read
  17996.  
  17997. In a synchronous DRAM cycle, the BS signal is asserted for one cycle at the start of the bus cycle.
  17998. The order of access is as follows: in a fill operation in the event of a cache miss, 64-bit boundary
  17999. data including the missed data is read first, then 32-byte boundary data including the missed data is
  18000. read in wraparound mode.
  18001.  
  18002. 353
  18003.  
  18004. ----------------------- Page 370-----------------------
  18005.  
  18006. Single Read: With the SH7750, as synchronous DRAM is set to burst read/burst write mode,
  18007. read data output continues after the required data has been read. To prevent data collisions, after the
  18008. required data is read in Td1, empty read cycles Td2 to Td4 are performed, and the SH7750 waits for
  18009. the end of the synchronous DRAM operation. The BS signal is asserted only in Td1.
  18010.  
  18011. When the data width is 64 bits, there are 4 burst transfers in a read. In cache-through and other
  18012. DMA read cycles, of cycles Td1 to Td4, BS is asserted and data latched only in the Td1 cycle.
  18013.  
  18014. Since such empty cycles increase the memory access time, and tend to reduce program execution
  18015. speed and DMA transfer speed, it is important both to avoid unnecessary cache-through area
  18016. accesses, and to use a data structure that will allow data to be placed at a 32-byte boundary, and to
  18017. be transferred in 32-byte units, when carrying out DMA transfer with synchronous DRAM
  18018. specified as the source.
  18019.  
  18020. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  18021.  
  18022. CKIO
  18023.  
  18024. Bank Row
  18025.  
  18026. Precharge-sel Row H/L
  18027.  
  18028. Address Row c1
  18029.  
  18030. CSn
  18031.  
  18032. RD/WR
  18033.  
  18034. RAS
  18035.  
  18036. CASS
  18037.  
  18038. DQMn
  18039.  
  18040. D63–D0
  18041. c1
  18042. (read)
  18043.  
  18044. BS
  18045.  
  18046. CKE
  18047.  
  18048. DACKn
  18049. (SA: IO ← memory)
  18050.  
  18051. Figure 13.27 Basic Timing for Synchronous DRAM Single Read
  18052.  
  18053. 354
  18054.  
  18055. ----------------------- Page 371-----------------------
  18056.  
  18057. Burst Write: The timing chart for a burst write is shown in figure 13.28. In the SH7750, a
  18058. burst write occurs only in the event of cache copy-back or a 32-byte transfer by the DMAC. In a
  18059. burst write operation, following the Tr cycle in which ACTV command output is performed, a
  18060. WRITA command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle, the
  18061. write data is output at the same time as the write command. In the case of the write with auto-
  18062. precharge command, precharging of the relevant bank is performed in the synchronous DRAM after
  18063. completion of the write command, and therefore no command can be issued for the same bank until
  18064. precharging is completed. Consequently, in addition to the precharge wait cycle, Tpc, used in a read
  18065. access, cycle Trwl is also added as a wait interval until precharging is started following the write
  18066. command. Issuance of a new command for the same bank is postponed during this interval. The
  18067. number of Trwl cycles can be specified by bits TRWL2–TRWL0 in MCR. 32-byte boundary data
  18068. is written in wraparound mode.
  18069.  
  18070. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  18071.  
  18072. CKIO
  18073.  
  18074. Bank Row
  18075.  
  18076. Precharge-sel Row H/L
  18077.  
  18078. Address Row c1
  18079.  
  18080. CSn
  18081.  
  18082. RD/WR
  18083.  
  18084. RAS
  18085.  
  18086. CASS
  18087.  
  18088. DQMn
  18089.  
  18090. D63–D0
  18091. c1 c2 c3 c4
  18092. (read)
  18093.  
  18094. CKE
  18095.  
  18096. DACKn
  18097. (SA: IO → memory)
  18098.  
  18099. Figure 13.28 Basic Timing for Synchronous DRAM Burst Write
  18100.  
  18101. 355
  18102.  
  18103. ----------------------- Page 372-----------------------
  18104.  
  18105. Single Write: The basic timing chart for write access is shown in figure 13.29. In a single
  18106. write operation, following the Tr cycle in which ACTV command output is performed, a WRITA
  18107. command that performs auto-precharge is issued in the Tc1 cycle. In the write cycle, the write data
  18108. is output at the same time as the write command. In the case of a write with auto-precharge,
  18109. precharging of the relevant bank is performed in the synchronous DRAM after completion of the
  18110. write command, and therefore no command can be issued for the same bank until precharging is
  18111. completed. Consequently, in addition to the precharge wait cycle, Tpc, used in a read access, cycle
  18112. Trwl is also added as a wait interval until precharging is started following the write command.
  18113. Issuance of a new command for the same bank is postponed during this interval. The number of
  18114. Trwl cycles can be specified by bits TRWL2–TRWL0 in MCR.
  18115.  
  18116. As the SH7750 supports burst read/burst write operations for synchronous DRAM, a single write
  18117. requires the same number of cycles as a burst write.
  18118.  
  18119. 356
  18120.  
  18121. ----------------------- Page 373-----------------------
  18122.  
  18123. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1 Tpc
  18124.  
  18125. CKIO
  18126.  
  18127. Bank Row
  18128.  
  18129. Precharge-sel Row H/L
  18130.  
  18131. Address Row c1
  18132.  
  18133. CSn
  18134.  
  18135. RD/WR
  18136.  
  18137. RAS
  18138.  
  18139. CASS
  18140.  
  18141. DQMn
  18142.  
  18143. D63–D0
  18144. c1
  18145. (read)
  18146.  
  18147. BS
  18148.  
  18149. CKE
  18150.  
  18151. DACKn
  18152. (SA: IO → memory)
  18153.  
  18154. Figure 13.29 Basic Timing for Synchronous DRAM Single Write
  18155.  
  18156. 357
  18157.  
  18158. ----------------------- Page 374-----------------------
  18159.  
  18160. RAS Down Mode: The synchronous DRAM bank function is used to support high-speed
  18161. accesses to the same row address. When the RASD bit in MCR is 1, read/write command accesses
  18162. are performed using commands without auto-precharge (READ, WRIT). In this case, precharging
  18163. is not performed when the access ends. When accessing the same row address in the same bank, it
  18164. is possible to issue the READ or WRIT command immediately, without issuing an ACTV
  18165. command, in the same way as in the DRAM RAS down state. As synchronous DRAM is
  18166. internally divided into two or four banks, it is possible to activate one row address in each bank. If
  18167. the next access is to a different row address, a PRE command is first issued to precharge the
  18168. relevant bank, then when precharging is completed, the access is performed by issuing an ACTV
  18169. command followed by a READ or WRIT command. If this is followed by an access to a different
  18170. row address, the access time will be longer because of the precharging performed after the access
  18171. request is issued.
  18172.  
  18173. In a write, when auto-precharge is performed, a command cannot be issued for a period of Trwl +
  18174. Tpc cycles after issuance of the WRIT command. When RAS down mode is used, READ or WRIT
  18175. commands can be issued successively if the row address is the same. The number of cycles can
  18176. thus be reduced by Trwl + Tpc cycles for each write. The number of cycles between issuance of the
  18177. precharge command and the row address strobe command is determined by bits TPC2–TPC0 in
  18178. MCR.
  18179.  
  18180. There is a limit on tRAS, the time for placing each bank in the active state. If there is no guarantee
  18181. that there will not be a cache hit and another row address will be accessed within the period in
  18182. which this value is maintained by program execution, it is necessary to set auto-refresh and set the
  18183. refresh cycle to no more than the maximum value of tRAS . In this way, it is possible to observe the
  18184. restrictions on the maximum active state time for each bank. If auto-refresh is not used, measures
  18185. must be taken in the program to ensure that the banks do not remain active for longer than the
  18186. prescribed time.
  18187.  
  18188. A burst read cycle without auto-precharge is shown in figure 13.30, a burst read cycle for the same
  18189. row address in figure 13.31, and a burst read cycle for different row addresses in figure 13.32.
  18190. Similarly, a burst write cycle without auto-precharge is shown in figure 13.33, a burst write cycle
  18191. for the same row address in figure 13.34, and a burst write cycle for different row addresses in
  18192. figure 13.35.
  18193.  
  18194. When synchronous DRAM is read, there is a 2-cycle latency for the DMQn signal that performs
  18195. the byte specification. As a result, when the READ command is issued in figure 13.30, if the Tc
  18196. cycle is executed immediately, the DMQn signal specification for Td1 cycle data output cannot be
  18197. carried out. Therefore, the CAS latency should not be set to 1.
  18198.  
  18199. When RAS down mode is set, if only accesses to the respective banks in area 3 are considered, as
  18200. long as accesses to the same row address continue, the operation starts with the cycle in figure
  18201. 13.30 or 13.33, followed by repetition of the cycle in figure 13.31 or 13.34. An access to a
  18202. different area during this time has no effect. If there is an access to a different row address in the
  18203. bank active state, after this is detected the bus cycle in figure 13.32 or 13.35 is executed instead of
  18204.  
  18205. 358
  18206.  
  18207. ----------------------- Page 375-----------------------
  18208.  
  18209. that in figure 13.31 or 13.34. In RAS down mode, too, both banks become inactive after a refresh
  18210. cycle or after the bus is released as the result of bus arbitration.
  18211.  
  18212. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  18213.  
  18214. CKIO
  18215.  
  18216. Bank Row
  18217.  
  18218. Precharge-sel Row H/L
  18219.  
  18220. Address Row c1
  18221.  
  18222. CSn
  18223.  
  18224. RD/WR
  18225.  
  18226. RAS
  18227.  
  18228. CASS
  18229.  
  18230. DQMn
  18231.  
  18232. D63–D0
  18233. c1 c2 c3 c4
  18234. (read)
  18235.  
  18236. BS
  18237.  
  18238. CKE
  18239.  
  18240. DACKn
  18241. (SA: IO ← memory)
  18242.  
  18243. Figure 13.30 Burst Read Timing
  18244.  
  18245. 359
  18246.  
  18247. ----------------------- Page 376-----------------------
  18248.  
  18249. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  18250.  
  18251. CKIO
  18252.  
  18253. Bank
  18254.  
  18255. Precharge-sel H/L
  18256.  
  18257. Address c1
  18258.  
  18259. CSn
  18260.  
  18261. RD/WR
  18262.  
  18263. RAS
  18264.  
  18265. CASS
  18266.  
  18267. DQMn
  18268.  
  18269. D63–D0
  18270. (read) c1 c2 c3 c4
  18271.  
  18272. BS
  18273.  
  18274. CKE
  18275.  
  18276. DACKn
  18277. (SA: IO ← memory)
  18278.  
  18279. Figure 13.31 Burst Read Timing (RAS Down, Same Row Address)
  18280.  
  18281. 360
  18282.  
  18283. ----------------------- Page 377-----------------------
  18284.  
  18285. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  18286.  
  18287. CKIO
  18288.  
  18289. Bank Row
  18290.  
  18291. Precharge-sel Row H/L
  18292.  
  18293. Address Row c1
  18294.  
  18295. CSn
  18296.  
  18297. RD/WR
  18298.  
  18299. RAS
  18300.  
  18301. CASS
  18302.  
  18303. DQMn
  18304.  
  18305. D63–D0
  18306. (read) c1 c2 c3 c4
  18307.  
  18308. BS
  18309.  
  18310. CKE
  18311.  
  18312. DACKn
  18313. (SA: IO ← memory)
  18314.  
  18315. Figure 13.32 Burst Read Timing (RAS Down, Different Row Addresses)
  18316.  
  18317. 361
  18318.  
  18319. ----------------------- Page 378-----------------------
  18320.  
  18321. Tr Trw Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  18322.  
  18323. CKIO
  18324.  
  18325. Bank Row
  18326.  
  18327. Precharge-sel Row H/L
  18328.  
  18329. Address Row c1
  18330.  
  18331. CSn
  18332.  
  18333. RD/WR
  18334.  
  18335. RAS
  18336.  
  18337. CASS
  18338.  
  18339. DQMn
  18340.  
  18341.  
  18342.  
  18343. D63–D0
  18344. c1 c2 c3 c4
  18345. (read)
  18346.  
  18347. BS
  18348.  
  18349. CKE
  18350.  
  18351. DACKn
  18352. (SA: IO → memory)
  18353.  
  18354. Figure 13.33 Burst Write Timing
  18355.  
  18356. 362
  18357.  
  18358. ----------------------- Page 379-----------------------
  18359.  
  18360. Tncp*1 Tnop*2 Tc1 Tc2 Tc3 Tc4 Trw1 Trw1
  18361.  
  18362. CKIO
  18363.  
  18364. Bank Row
  18365.  
  18366. Precharge-sel H/L
  18367.  
  18368. Address c1
  18369.  
  18370. CSn
  18371.  
  18372. RD/WR
  18373.  
  18374. RAS
  18375.  
  18376. CASS
  18377.  
  18378. DQMn
  18379.  
  18380.  
  18381.  
  18382. D63–D0
  18383. c1 c2 c3 c4
  18384. (read)
  18385.  
  18386. BS
  18387.  
  18388. CKE
  18389.  
  18390. DACKn
  18391. (SA: IO → memory)
  18392.  
  18393. Notes: 1. Tncp: DACK output start cycle (inserted only in the case of DACK output)
  18394. 2. Tnop: Dummy cycle (always inserted)
  18395.  
  18396. Figure 13.34 Burst Write Timing (Same Row Address)
  18397.  
  18398. 363
  18399.  
  18400. ----------------------- Page 380-----------------------
  18401.  
  18402. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4
  18403.  
  18404. CKIO
  18405.  
  18406. Bank Row
  18407.  
  18408. Precharge-sel Row H/L
  18409.  
  18410. Address Row c1
  18411.  
  18412. CSn
  18413.  
  18414. RD/WR
  18415.  
  18416. RAS
  18417.  
  18418. CASS
  18419.  
  18420. DQMn
  18421.  
  18422. D63–D0
  18423. c1 c2 c3 c4
  18424. (read)
  18425.  
  18426. BS
  18427.  
  18428. CKE
  18429.  
  18430. DACKn
  18431. (SA: IO → memory)
  18432.  
  18433. Figure 13.35 Burst Write Timing (Different Row Addresses)
  18434.  
  18435. Pipelined Access: When the RASD bit is set to 1 in MCR, pipelined access is performed
  18436. between an access by the CPU and an access by the DMAC, or in the case of consecutive accesses
  18437. by the DMAC, to provide faster access to synchronous DRAM. As synchronous DRAM is
  18438. internally divided into two or four banks, after a READ or WRIT command is issued for one bank
  18439. it is possible to issue a PRE, ACTV, or other command during the CAS latency cycle or data
  18440. latch cycle, or during the data write cycle, and so shorten the access cycle.
  18441.  
  18442. When a read access is followed by another read access to the same row address, after a READ
  18443. command has been issued, another READ command is issued before the end of the data latch cycle,
  18444. so that there is read data on the data bus continuously. When an access is made to another row
  18445. address and the bank is different, the PRE command or ACTV command can be issued during the
  18446. CAS latency cycle or data latch cycle. If there are consecutive access requests for different row
  18447. addresses in the same bank, the PRE command cannot be issued until the last-but-one data latch
  18448.  
  18449. 364
  18450.  
  18451. ----------------------- Page 381-----------------------
  18452.  
  18453. cycle. If a read access is followed by a write access, it may be possible to issue a PRE or ACT
  18454. command, depending on the bank and row address, but since the write data is output at the same
  18455. time as the WRIT command, the PRE, ACTV, and WRIT commands are issued in such a way that
  18456. one or two empty cycles occur automatically on the data bus. Similarly, with a read access
  18457. following a write access, or a write access following a write access, the PRE, ACTV, READ, or
  18458. WRIT command is issued during the data write cycle for the preceding access; however, in the case
  18459. of different row addresses in the same bank, a PRE command cannot be issued, and so in this case
  18460. the PRE command is issued following the number of Trwl cycles specified by the TRWL bits in
  18461. MCR, after the end of the last data write cycle.
  18462.  
  18463. Figure 13.36 shows a burst read cycle for a different bank and row address following a preceding
  18464. burst read cycle.
  18465.  
  18466. Pipelined access is enabled only for consecutive access to area 3, and will be discontinued in the
  18467. event of an access to another area. Pipelined access is also discontinued in the event of a refresh
  18468. cycle, or bus release due to bus arbitration. The cases in which pipelined access is available are
  18469. shown in table 13.16. In this table, “DMAC dual” indicates transfer in DMAC dual address mode,
  18470. and “DMAC single”, transfer in DMAC single address mode.
  18471.  
  18472. Table 13.16 Cycles in Which Pipelined Access Can Be Used
  18473.  
  18474. Preceding Access Following Access
  18475.  
  18476. CPU DMAC Dual DMAC Single
  18477.  
  18478. Read Write Read Write Read Write
  18479.  
  18480. CPU Read X X O X O O
  18481.  
  18482. Write X X O X O O
  18483.  
  18484. DMAC dual Read X X X X X X
  18485.  
  18486. Write O O O X O O
  18487.  
  18488. DMAC single Read O O X X O O
  18489.  
  18490. Write O O O X O O
  18491.  
  18492. O: Pipelined access possible
  18493. X: Pipelined access not possible
  18494.  
  18495. 365
  18496.  
  18497. ----------------------- Page 382-----------------------
  18498.  
  18499. Tc1_A Tc1_B
  18500.  
  18501. CKIO
  18502.  
  18503. Bank
  18504.  
  18505. Precharge-sel H/L H/L
  18506.  
  18507. Address c_A c_B
  18508.  
  18509. CSn
  18510.  
  18511. RD/WR
  18512.  
  18513. RAS
  18514.  
  18515. CASS
  18516.  
  18517. DQMn
  18518.  
  18519. D63–D0
  18520. a1 a2 a3 a4 b1 b2
  18521. (read)
  18522.  
  18523. BS
  18524.  
  18525. CKE
  18526.  
  18527. Figure 13.36 Burst Read Cycle for Different Bank and Row Address
  18528. Following Preceding Burst Read Cycle
  18529.  
  18530. Refreshing: The bus state controller is provided with a function for controlling synchronous
  18531. DRAM refreshing. Auto-refreshing can be performed by clearing the RMODE bit to 0 and setting
  18532. the RFSH bit to 1 in MCR. If synchronous DRAM is not accessed for a long period, self-refresh
  18533. mode, in which the power consumption for data retention is low, can be activated by setting both
  18534. the RMODE bit and the RFSH bit to 1.
  18535.  
  18536. • Auto-Refreshing
  18537.  
  18538. Refreshing is performed at intervals determined by the input clock selected by bits CKS2–
  18539. CKS0 in RTCSR, and the value set in RTCOR. The value of bits CKS2–CKS0 in RTCOR
  18540. should be set so as to satisfy the refresh interval specification for the synchronous DRAM
  18541. used. First make the settings for RTCOR, RTCNT, and the RMODE and RFSH bits in MCR,
  18542. then make the CKS2–CKS0 setting last of all. When the clock is selected by CKS2–CKS0,
  18543. RTCNT starts counting up from the value at that time. The RTCNT value is constantly
  18544. compared with the RTCOR value, and if the two values are the same, a refresh request is
  18545. generated and an auto-refresh is performed. At the same time, RTCNT is cleared to zero and the
  18546. count-up is restarted. Figure 13.38 shows the auto-refresh cycle timing.
  18547.  
  18548. 366
  18549.  
  18550. ----------------------- Page 383-----------------------
  18551.  
  18552. First, an REF command is issued in the TRr cycle. After the TRr cycle, new command output
  18553. cannot be performed for the duration of the number of cycles specified by bits TRAS2–TRAS0
  18554. in MCR plus the number of cycles specified by bits TRC2–TRC0 in MCR. The TRAS2–
  18555. TRAS0 and TRC2–TRC0 bits must be set so as to satisfy the synchronous DRAM refresh
  18556. cycle time specification (active/active command delay time).
  18557.  
  18558. Auto-refreshing is performed in normal operation, in sleep mode, and in the case of a manual
  18559. reset.
  18560.  
  18561. RTCOR value RTCNT cleared to 0 when
  18562. RTCNT = RTCOR
  18563. RTCNT
  18564.  
  18565. H'00000000 Time
  18566.  
  18567. RTCSR.CKS2–0 = 000 ≠ 000
  18568.  
  18569. Refresh
  18570. request
  18571.  
  18572. Refresh request cleared
  18573.  
  18574. by start of refresh cycle
  18575. External bus
  18576.  
  18577. Auto-refresh cycle
  18578.  
  18579. Figure 13.37 Auto-Refresh Operation
  18580.  
  18581. 367
  18582.  
  18583. ----------------------- Page 384-----------------------
  18584.  
  18585. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  18586.  
  18587. CKIO
  18588.  
  18589. CSn
  18590.  
  18591. RD/WR
  18592.  
  18593. RAS
  18594.  
  18595. CASS
  18596.  
  18597. DQMn
  18598.  
  18599. D63–D0
  18600.  
  18601. BS
  18602.  
  18603. CKE
  18604.  
  18605. Figure 13.38 Synchronous DRAM Auto-Refresh Timing
  18606.  
  18607. • Self-Refreshing
  18608.  
  18609. Self-refresh mode is a kind of standby mode in which the refresh timing and refresh addresses
  18610. are generated within the synchronous DRAM. Self-refreshing is activated by setting both the
  18611. RMODE bit and the RFSH bit to 1. The self-refresh state is maintained while the CKE signal
  18612. is low. Synchronous DRAM cannot be accessed while in the self-refresh state. Self-refresh
  18613. mode is cleared by clearing the RMODE bit to 0. After self-refresh mode has been cleared,
  18614. command issuance is disabled for the number of cycles specified by bits TRC2–TRC0 in
  18615. MCR. Self-refresh timing is shown in figure 13.39. Settings must be made so that self-refresh
  18616. clearing and data retention are performed correctly, and auto-refreshing is performed at the
  18617. correct intervals. When self-refreshing is activated from the state in which auto-refreshing is
  18618. set, or when exiting standby mode other than through a power-on reset, auto-refreshing is
  18619. restarted if RFSH is set to 1 and RMODE is cleared to 0 when self-refresh mode is cleared. If
  18620. the transition from clearing of self-refresh mode to the start of auto-refreshing takes time, this
  18621. time should be taken into consideration when setting the initial value of RTCNT. Making the
  18622. RTCNT value 1 less than the RTCOR value will enable refreshing to be started immediately.
  18623.  
  18624. After self-refreshing has been set, the self-refresh state continues even if the chip standby state
  18625. is entered using the SH7750’s standby function, and is maintained even after recovery from
  18626. standby mode other than through a power-on reset.
  18627.  
  18628. 368
  18629.  
  18630. ----------------------- Page 385-----------------------
  18631.  
  18632. In the case of a power-on reset, the bus state controller’s registers are initialized, and therefore
  18633. the self-refresh state is cleared.
  18634.  
  18635. Self-refreshing is performed in normal operation, in sleep mode, in standby mode, and in the
  18636. case of a manual reset.
  18637.  
  18638. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  18639.  
  18640. CKIO
  18641.  
  18642. CSn
  18643.  
  18644. RD/WR
  18645.  
  18646. RAS
  18647.  
  18648. CASS
  18649.  
  18650. DQMn
  18651.  
  18652. D63–D0
  18653.  
  18654. BS
  18655.  
  18656. CKE
  18657.  
  18658. Figure 13.39 Synchronous DRAM Self-Refresh Timing
  18659.  
  18660. • Relationship between Refresh Requests and Bus Cycle Requests
  18661.  
  18662. If a refresh request is generated during execution of a bus cycle, execution of the refresh is
  18663. deferred until the bus cycle is completed. If a refresh request occurs when the bus has been
  18664. released by the bus arbiter, refresh execution is deferred until the bus is acquired. If a match
  18665. between RTCNT and RTCOR occurs while a refresh is waiting to be executed, so that a new
  18666. refresh request is generated, the previous refresh request is eliminated. In order for refreshing to
  18667. be performed normally, care must be taken to ensure that no bus cycle or bus mastership occurs
  18668. that is longer than the refresh interval. When a refresh request is generated, theBACK pin is
  18669. negated (driven high). Therefore, normal refreshing can be performed by having theBACK pin
  18670. monitored by a bus master other than the SH7750 requesting the bus, or the bus arbiter, and
  18671. returning the bus to the SH7750.
  18672.  
  18673. 369
  18674.  
  18675. ----------------------- Page 386-----------------------
  18676.  
  18677. Power-On Sequence: In order to use synchronous DRAM, mode setting must first be
  18678. performed after powering on. To perform synchronous DRAM initialization correctly, the bus state
  18679. controller registers must first be set, followed by a write to the synchronous DRAM mode register.
  18680. In synchronous DRAM mode register setting, the address signal value at that time is latched by a
  18681. combination of the RAS, CAS, and RD/WR signals. If the value to be set is X, the bus state
  18682. controller provides for value X to be written to the synchronous DRAM mode register by
  18683. performing a write to address H'FF900000 + X for area 2 synchronous DRAM, and to address
  18684. H'FF940000 + X for area 3 synchronous DRAM. In this operation the data is ignored, but the
  18685. mode write is performed as a byte-size access. To set burst read/write, CAS latency 1 to 3, wrap
  18686. type = sequential, and burst length 4 or 8, supported by the SH7750, arbitrary data is written by
  18687. byte-size access to the following addresses.
  18688.  
  18689. Bus Width CAS Latency Area 2 Area 3
  18690.  
  18691. 32 1 FF90004C FF94004C
  18692.  
  18693. 2 FF90008C FF94008C
  18694.  
  18695. 3 FF9000CC FF9400CC
  18696.  
  18697. 64 1 FF900090 FF940090
  18698.  
  18699. 2 FF900110 FF940110
  18700.  
  18701. 3 FF900190 FF940190
  18702.  
  18703. The value set in MCR.MRSET is used to select whether a precharge all banks command or a mode
  18704. register setting command is issued. The timing for the precharge all banks command is shown in
  18705. figure 13.40 (1), and the timing for the mode register setting command in figure 13.40 (2).
  18706.  
  18707. Before mode register, a 200 µs idle time (depending on the memory manufacturer) must be
  18708. guaranteed after the power required for the synchronous DRAM is turned on. If the reset signal
  18709. pulse width is greater than this idle time, there is no problem in making the precharge all banks
  18710. setting immediately.
  18711.  
  18712. First, a precharge all banks (PALL) command is issued in the TRp1 cycle by performing a write to
  18713. address H'FF900000 + X or H'FF940000 + X while MCR.MRSET = 0. Next, the number of
  18714. dummy auto-refresh cycles specified by the manufacturer (usually 8) or more must be executed.
  18715. This is achieved automatically while various kinds of initialization are being performed after auto-
  18716. refresh setting, but a way of carrying this out more dependably is to change the RTCOR register
  18717. value to set a short refresh request generation interval just while these dummy cycles are being
  18718. executed. With simple read or write access, the address counter in the synchronous DRAM used for
  18719. auto-refreshing is not initialized, and so the cycle must always be an auto-refresh cycle. After auto-
  18720. refreshing has been executed at least the prescribed number of times, a mode register setting
  18721. command is issued in the TMw1 cycle by setting MCR.MRSET to 1 and performing a write to
  18722. address H'FF900000 + X or H'FF940000 + X.
  18723.  
  18724. 370
  18725.  
  18726. ----------------------- Page 387-----------------------
  18727.  
  18728. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  18729.  
  18730. CKIO
  18731.  
  18732. Bank
  18733.  
  18734. Precharge-sel
  18735.  
  18736. Address
  18737.  
  18738. CSn
  18739.  
  18740. RD/WR
  18741.  
  18742. RAS
  18743.  
  18744. CASS
  18745.  
  18746. D31–D0
  18747.  
  18748. CKE
  18749. (High)
  18750.  
  18751. Figure 13.40 (1) Synchronous DRAM Mode Write Timing
  18752.  
  18753. 371
  18754.  
  18755. ----------------------- Page 388-----------------------
  18756.  
  18757. TRp1 TRp2 TRp3 TRp4 TMw1 TMw2 TMw3 TMw4 TMw5
  18758.  
  18759. CKIO
  18760.  
  18761. Bank
  18762.  
  18763. Precharge-sel
  18764.  
  18765. Address
  18766.  
  18767. CSn
  18768.  
  18769. RD/WR
  18770.  
  18771. RAS
  18772.  
  18773. CASS
  18774.  
  18775. D31–D0
  18776.  
  18777. CKE
  18778. (High)
  18779.  
  18780. Figure 13.40 (2) Synchronous DRAM Mode Write Timing
  18781.  
  18782. 372
  18783.  
  18784. ----------------------- Page 389-----------------------
  18785.  
  18786. 1 3 . 3 . 6 Burst ROM Interface
  18787.  
  18788. Setting bits A0BST2–A0BST0, A5BST2–A5BST0, and A6BST2–A6BST0 in BCR1 to a non-
  18789. zero value allows burst ROM to be connected to areas 0, 5, and 6. The burst ROM interface
  18790. provides high-speed access to ROM that has a burst access function. The timing for burst access to
  18791. burst ROM is shown in figure 13.41. Two wait cycles are set. Basically, access is performed in
  18792. the same way as for normal space, but when the first cycle ends, only the address is changed before
  18793. the next access is executed. When 8-bit ROM is connected, the number of consecutive accesses can
  18794. be set as 4, 8, 16, or 32 with bits A0BST2–A0BST0, A5BST2–A5BST0, or A6BST2–A6BST0.
  18795. When 16-bit ROM is connected, 4, 8, or 16 can be set in the same way. When 32-bit ROM is
  18796. connected, 4 or 8 can be set.
  18797.  
  18798. RDY pin sampling is always performed when one or more wait states are set.
  18799.  
  18800. The second and subsequent access cycles also comprise two cycles when a burst ROM setting is
  18801. made and the wait specification is 0. The timing in this case is shown in figure 13.42.
  18802.  
  18803. In a ROM write operation, a basic bus cycle (write) is performed.
  18804.  
  18805. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18806. according to the set bus width. The first access is performed on the data for which there was an
  18807. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  18808. bus is not released during this period.
  18809.  
  18810. Figure 13.43 shows the timing when a burst ROM setting is made, and setup/hold is specified in
  18811. WCR3.
  18812.  
  18813. 373
  18814.  
  18815. ----------------------- Page 390-----------------------
  18816.  
  18817. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  18818.  
  18819. CKIO
  18820.  
  18821. A25–A5
  18822.  
  18823. A4–A0
  18824.  
  18825. CSn
  18826.  
  18827. RD/WR
  18828.  
  18829. RD
  18830.  
  18831. D63–D0
  18832. (read)
  18833.  
  18834. BS
  18835.  
  18836. RDY
  18837.  
  18838. DACKn
  18839. (SA: IO ← memory)
  18840.  
  18841. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18842.  
  18843. Figure 13.41 Burst ROM Basic Access Timing
  18844.  
  18845. 374
  18846.  
  18847. ----------------------- Page 391-----------------------
  18848.  
  18849. T1 Tw Tw TB2 TB1 Tw TB2 TB1 Tw TB2 TB1 Tw T2
  18850.  
  18851. CKIO
  18852.  
  18853. A25–A5
  18854.  
  18855. A4–A0
  18856.  
  18857. CSn
  18858.  
  18859. RD/WR
  18860.  
  18861. RD
  18862.  
  18863. D63–D0
  18864. (read)
  18865.  
  18866. BS
  18867.  
  18868. RDY
  18869.  
  18870. DACKn
  18871. (SA: IO ← memory)
  18872.  
  18873. Note: For a write cycle, a basic bus cycle (write cycle) is performed.
  18874.  
  18875. Figure 13.42 Burst ROM Wait Access Timing
  18876.  
  18877. 375
  18878.  
  18879. ----------------------- Page 392-----------------------
  18880.  
  18881. TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  18882.  
  18883. CKIO
  18884.  
  18885. A25–A5
  18886.  
  18887. A4–A0
  18888.  
  18889. CSn
  18890.  
  18891. RD/WR
  18892.  
  18893. RD
  18894.  
  18895. D63–D0
  18896. (read)
  18897.  
  18898. BS
  18899.  
  18900. RDY
  18901.  
  18902. DACKn
  18903. (SA: IO ← memory)
  18904.  
  18905. Figure 13.43 Burst ROM Wait Access Timing
  18906.  
  18907. 1 3 . 3 . 7 PCMCIA Interface
  18908.  
  18909. In the SH7750, setting the A56PCM bit in BCR1 to 1 makes the bus interface for external space
  18910. areas 5 and 6 an IC memory card interface or I/O card interface as stipulated in JEIDA specification
  18911. version 4.2 (PCMCIA2.1).
  18912.  
  18913. Figure 13.44 shows an example of PCMCIA card connection to the SH7750. To enable active
  18914. insertion of the PCMCIA cards (i.e. insertion or removal while system power is being supplied), a
  18915. 3-state buffer must be connected between the SH7750’s bus interface and the PCMCIA cards.
  18916.  
  18917. As operation in big-endian mode is not explicitly stipulated in the JEIDA/PCMCIA specifications,
  18918. the SH7750 supports only a little-endian mode PCMCIA interface.
  18919.  
  18920. The PCMCIA interface can only be accessed when the MMU is used. PCMCIA memory space can
  18921. be set in MMU page units, and there is a choice of 8-bit common memory, 16-bit common
  18922. memory, 8-bit attribute memory, 16-bit attribute memory, 8-bit I/O space, 16-bit I/O space, or
  18923. dynamic bus sizing. The setting is made with bits SA2–SA0 in PTEA.
  18924.  
  18925. 376
  18926.  
  18927. ----------------------- Page 393-----------------------
  18928.  
  18929. SA2 SA1 SA0 Description
  18930.  
  18931. 0 0 0 Reserved (Setting prohibited)
  18932.  
  18933. 1 Dynamic I/O bus sizing
  18934.  
  18935. 1 0 8-bit I/O space
  18936.  
  18937. 1 16-bit I/O space
  18938.  
  18939. 1 0 0 8-bit common memory
  18940.  
  18941. 1 16-bit common memory
  18942.  
  18943. 1 0 8-bit attribute memory
  18944.  
  18945. 1 16-bit attribute memory
  18946.  
  18947. Wait cycles in a bus access can be selected with the TC bit in PTEA. When TC is cleared to 0,
  18948. bits A5W2–A5W0 in wait control register 2 (WCR2) and bits A5PCW1–A5PCW0, A5TED2–
  18949. A5TED0, and A5TEH2–A5TEH0 in the PCMCIA control register (PCR) are selected. When TC
  18950. is set to 1, bits A6W2–A6W0 in WCR2 and bits A6PCW1–A6PCW0, A6TED2–A6TED0, and
  18951. A6TEH2–A6TEH0 in PCR are selected.
  18952.  
  18953. AnPCW1–AnPCW0 specify the number of wait states to be inserted in a low-speed bus cycle; a
  18954. value of 0, 15, 30, or 50 can be set, and this value is added to the number of wait states for
  18955. insertion specified by WCR2. AnTED2–AnTED0 can be set to a value from 0 to 15, enabling the
  18956. address, CS, CE2A, CE2B , and REG setup times with respect to the RD and WE1 signals to be
  18957. secured. AnTEH2–AnTEH0 can also be set to a value from 0 to 15, enabling the address, CS,
  18958. CE2A, CE2B , and REG write data hold times with respect to the RD and WE1 signals to be
  18959. secured.
  18960.  
  18961. Wait cycles between cycles are set with bits A5IW2–A5IW0 and A6IW2–A6IW0 in wait control
  18962. register 1 (WCR1). The inter-cycle write cycles selected depend only on the area accessed (area 5 or
  18963. 6): when area 5 is accessed, bits A5IW2–A5IW0 are selected, and when area 6 is accessed, bits
  18964. A6IW2–A6IW0 are selected.
  18965.  
  18966. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  18967. according to the set bus width. The first access is performed on the data for which there was an
  18968. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  18969. bus is not released during this period.
  18970.  
  18971. 377
  18972.  
  18973. ----------------------- Page 394-----------------------
  18974.  
  18975. A25–A0 A25–A0
  18976. D15–D0 G
  18977. RD/WR D7–D0
  18978. CE1B/(CS6)
  18979. D15–D0
  18980. CE1A/(CS5) G
  18981. DIR
  18982. CE2B
  18983. CE2A D15–D8 PC card
  18984. (memory I/O)
  18985.  
  18986. G
  18987. SH7750 DIR
  18988.  
  18989. CE1
  18990. CE2
  18991.  
  18992. RD OE
  18993. WE1 WE/PGM
  18994. ICIORD (IORD)
  18995. ICIOWR G (IOWR)
  18996.  
  18997. REG REG
  18998. WAIT
  18999. RDY
  19000.  
  19001. IOIS16 (IOIS16)
  19002. Card
  19003. detection CD1, CD2
  19004. circuit
  19005.  
  19006. Output
  19007. Port A25–A0
  19008. G
  19009. D7–D0
  19010.  
  19011. D15–D0
  19012. G
  19013. DIR
  19014.  
  19015. D15–D8 PC card
  19016.  
  19017. (memory I/O)
  19018.  
  19019. G
  19020. DIR
  19021.  
  19022. CE1
  19023. CE2
  19024. OE
  19025. WE/PGM
  19026. G REG
  19027.  
  19028. WAIT
  19029.  
  19030. Card
  19031. detection CD1, CD2
  19032. circuit
  19033.  
  19034.  
  19035. Figure 13.44 Example of PCMCIA Interface
  19036.  
  19037. 378
  19038.  
  19039. ----------------------- Page 395-----------------------
  19040.  
  19041. Memory Card Interface Basic Timing: Figure 13.45 shows the basic timing for the
  19042. PCMCIA IC memory card interface, and figure 13.46 shows the PCMCIA memory bus wait
  19043. timing.
  19044.  
  19045. Tpcm1 Tpcm2
  19046.  
  19047. CKIO
  19048.  
  19049. A25–A0
  19050.  
  19051. CExx
  19052. REG
  19053.  
  19054. RD/WR
  19055.  
  19056. RD
  19057. (read)
  19058.  
  19059. D15–D0
  19060. (read)
  19061.  
  19062. WE1
  19063. (write)
  19064.  
  19065. D15–D0
  19066. (read)
  19067.  
  19068. BS
  19069.  
  19070. Figure 13.45 Basic Timing for PCMCIA Memory Card Interface
  19071.  
  19072. 379
  19073.  
  19074. ----------------------- Page 396-----------------------
  19075.  
  19076. Tpcm0 Tpcm0w Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  19077.  
  19078. CKIO
  19079.  
  19080. A25–A0
  19081.  
  19082.  
  19083.  
  19084. CExx
  19085. REG
  19086.  
  19087. RD/WR
  19088.  
  19089. RD
  19090. (read)
  19091.  
  19092. D15–D0
  19093. (read)
  19094.  
  19095. WE1
  19096. (write)
  19097.  
  19098. D15–D0
  19099. (write)
  19100.  
  19101. BS
  19102.  
  19103. RDY
  19104.  
  19105. Figure 13.46 Wait Timing for PCMCIA Memory Card Interface
  19106.  
  19107. 380
  19108.  
  19109. ----------------------- Page 397-----------------------
  19110.  
  19111. Common memory
  19112. (64 MB)
  19113. Access Physical
  19114. by CS5 wait address space
  19115. controller Physical I/O
  19116. addresses
  19117.  
  19118. 1 kB IO 1
  19119. Virtual Access page
  19120. address space by CS6 wait IO 1
  19121. controller
  19122. Common
  19123. IO 2
  19124. memory 1
  19125.  
  19126. Card 1 Common
  19127. on CS5 memory 2
  19128. Attribute memory Attribute memory IO 2
  19129. I/O space 1 (64 MB) 1 kB Different virtual pages
  19130. I/O space 2 page mapped to the same
  19131. . physical page
  19132. .
  19133. . Example of I/O spaces with different cycle times
  19134.  
  19135. (less than 1 kB)
  19136.  
  19137. I/O space
  19138. (64 MB)
  19139.  
  19140. Card 2
  19141. on CS6
  19142. .
  19143. .
  19144. .
  19145.  
  19146. The page size can be 1 kB, 4 kB, 64 kB, or 1 MB.
  19147.  
  19148. Example of PCMCIA interface mapping
  19149.  
  19150. Figure 13.47 PCMCIA Space Allocation
  19151.  
  19152. I/O Card Interface Timing: Figures 13.48 and 13.49 show the timing for the PCMCIA I/O
  19153. card interface.
  19154.  
  19155. When an I/O card interface access is made to a PCMCIA card in little-endian mode, dynamic sizing
  19156. of the I/O bus width is possible using the IOIS16 pin. When a 16-bit bus width is set, if the
  19157. IOIS16 signal is high during a word-size I/O bus cycle, the I/O port is recognized as being 8 bits
  19158. in width. In this case, a data access for only 8 bits is performed in the I/O bus cycle being
  19159. executed, followed automatically by a data access for the remaining 8 bits.
  19160.  
  19161. Figure 13.50 shows the basic timing for dynamic bus sizing.
  19162.  
  19163. 381
  19164.  
  19165. ----------------------- Page 398-----------------------
  19166.  
  19167. Tpci1 Tpci2
  19168.  
  19169. CKIO
  19170.  
  19171. A25–A0
  19172.  
  19173. CExx
  19174. REG
  19175.  
  19176. RD/WR
  19177.  
  19178. ICIORD
  19179. (read)
  19180.  
  19181. D15–D0
  19182. (read)
  19183.  
  19184. ICIOWR
  19185. (write)
  19186.  
  19187. D15–D0
  19188. (write)
  19189.  
  19190. BS
  19191.  
  19192. Figure 13.48 Basic Timing for PCMCIA I/O Card Interface
  19193.  
  19194. 382
  19195.  
  19196. ----------------------- Page 399-----------------------
  19197.  
  19198. Tpci0 Tpci0w Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  19199.  
  19200. CKIO
  19201.  
  19202. A25–A0
  19203.  
  19204. CExx
  19205. REG
  19206.  
  19207. RD/WR
  19208.  
  19209. ICIORD
  19210. (read)
  19211.  
  19212.  
  19213. D15–D0
  19214. (read)
  19215.  
  19216. ICIOWR
  19217. (write)
  19218.  
  19219. D15–D0
  19220. (write)
  19221.  
  19222. BS
  19223.  
  19224. RDY
  19225.  
  19226. IOIS16
  19227.  
  19228. Figure 13.49 Wait Timing for PCMCIA I/O Card Interface
  19229.  
  19230. 383
  19231.  
  19232. ----------------------- Page 400-----------------------
  19233.  
  19234. Tpci0 Tpci Tpci1w Tpci2 Tpci2w Tpci0 Tpci Tpci1w Tpci2 Tpci2w
  19235.  
  19236. CKIO
  19237.  
  19238.  
  19239.  
  19240.  
  19241. A25–A1
  19242.  
  19243.  
  19244. A0
  19245.  
  19246.  
  19247.  
  19248. CExx
  19249. REG (WE7)
  19250.  
  19251.  
  19252.  
  19253.  
  19254. RD/WR
  19255.  
  19256.  
  19257.  
  19258. IORD (WE2)
  19259. (read)
  19260.  
  19261.  
  19262. D15–D0
  19263. (read)
  19264.  
  19265.  
  19266.  
  19267. IOWR (WE3)
  19268. (write)
  19269.  
  19270.  
  19271.  
  19272.  
  19273.  
  19274. D15–D0
  19275. (write)
  19276.  
  19277.  
  19278.  
  19279. BS
  19280.  
  19281.  
  19282.  
  19283.  
  19284. RDY
  19285.  
  19286. IOIS16
  19287.  
  19288.  
  19289.  
  19290.  
  19291.  
  19292.  
  19293. Figure 13.50 Dynamic Bus Sizing Timing for PCMCIA I/O Card Interface
  19294.  
  19295. 384
  19296.  
  19297. ----------------------- Page 401-----------------------
  19298.  
  19299. 1 3 . 3 . 8 MPX Interface
  19300.  
  19301. If the MD6 pin is set to 0 in a power-on reset, the MPX interface for normal memory is selected
  19302. for area 0. The MPX interface is selected for areas 1 to 6 by means of the MPX bit in BCR1. The
  19303. MPX interface offers a multiplexed address/data type bus protocol, and permits easy connection to
  19304. an external memory controller chip that uses a single 32-bit multiplexed address/data bus. The
  19305. address is output to D25–D0, and the access size to D63–D61.
  19306.  
  19307. For details of access sizes and data alignment, see section 13.3.1, Endian/Access Size and Data
  19308. Alignment.
  19309.  
  19310. The address signals output at A25–A0 are undefined.
  19311.  
  19312. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  19313. according to the set bus width. The first access is performed on the data for which there was an
  19314. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  19315. bus is not released during this period.
  19316.  
  19317. D63 D62 D61 Access Size
  19318.  
  19319. 0 0 0 Byte
  19320.  
  19321. 1 Word
  19322.  
  19323. 1 0 Longword
  19324.  
  19325. 1 Quadword
  19326.  
  19327. 1 X X 32-byte burst
  19328.  
  19329. X: Don’t care
  19330.  
  19331. SH7750 MPX device
  19332.  
  19333. CKIO CLK
  19334. CSn CS
  19335. BS BS
  19336. RD FRAME
  19337. RD/WR WE
  19338. D63–D0 I/O63–I/O0
  19339. RDY RDY
  19340.  
  19341. Figure 13.51 Example of 64-Bit Data Width MPX Connection
  19342.  
  19343. The MPX interface timing is shown below.
  19344.  
  19345. When the MPX interface is used for areas 1 to 6, a bus size of 32 or 64 bits should be specified in
  19346. BCR2.
  19347.  
  19348. 385
  19349.  
  19350. ----------------------- Page 402-----------------------
  19351.  
  19352. For wait control, waits specified by WCR2 and wait insertion by means of the RDY pin can be
  19353. used.
  19354.  
  19355. Tm1
  19356. Tmd1w Tmd1
  19357.  
  19358. CKIO
  19359.  
  19360. RD/FRAME
  19361.  
  19362. D63–D0 A D0
  19363.  
  19364. CSn
  19365.  
  19366. RD/WR
  19367.  
  19368. RDY
  19369.  
  19370. BS
  19371.  
  19372. DACKn
  19373. (DA)
  19374.  
  19375. Figure 13.52 MPX Interface Timing 1 (Single Read Cycle, No Wait)
  19376.  
  19377. 386
  19378.  
  19379. ----------------------- Page 403-----------------------
  19380.  
  19381.  
  19382. Tm1 Tmd1w Tmd1w Tmd1
  19383.  
  19384. CKIO
  19385.  
  19386. RD/FRAME
  19387.  
  19388. D63–D0 A D0
  19389.  
  19390. CSn
  19391.  
  19392. RD/WR
  19393.  
  19394. RDY
  19395.  
  19396. BS
  19397.  
  19398. DACKn
  19399. (DA)
  19400.  
  19401. Figure 13.53 MPX Interface Timing 2 (Single Read, One Internal Wait
  19402. Inserted)
  19403.  
  19404. 387
  19405.  
  19406. ----------------------- Page 404-----------------------
  19407.  
  19408.  
  19409. Tm1 Tmd1
  19410.  
  19411. CKIO
  19412.  
  19413. RD/FRAME
  19414.  
  19415. D63–D0 A D0
  19416.  
  19417. CSn
  19418.  
  19419. RD/WR
  19420.  
  19421. RDY
  19422.  
  19423. BS
  19424.  
  19425. DACKn
  19426. (DA)
  19427.  
  19428. Figure 13.54 MPX Interface Timing 3 (Single Write Cycle, No Wait)
  19429.  
  19430. 388
  19431.  
  19432. ----------------------- Page 405-----------------------
  19433.  
  19434.  
  19435. Tm1 Tmd1w Tmd1w Tmd1
  19436.  
  19437. CKIO
  19438.  
  19439. RD/FRAME
  19440.  
  19441. D63–D0 A D0
  19442.  
  19443. CSn
  19444.  
  19445. RD/WR
  19446.  
  19447. RDY
  19448.  
  19449. BS
  19450.  
  19451. DACKn
  19452. (DA)
  19453.  
  19454. Figure 13.55 MPX Interface Timing 4 (Single Write, One Internal Wait
  19455. Inserted)
  19456.  
  19457. 389
  19458.  
  19459. ----------------------- Page 406-----------------------
  19460.  
  19461. Tm1 Tmd3 Tmd4
  19462. Tmd1w Tmd1 Tmd2
  19463.  
  19464. CKIO
  19465.  
  19466. RD/FRAME
  19467.  
  19468. D63–D0 A D0 D1 D2 D3
  19469.  
  19470. CSn
  19471.  
  19472. RD/WR
  19473.  
  19474. RDY
  19475.  
  19476. BS
  19477.  
  19478. DACKn
  19479. (DA)
  19480.  
  19481. Figure 13.56 MPX Interface Timing 5 (Burst Read Cycle, No Wait)
  19482.  
  19483.  
  19484. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  19485.  
  19486. CKIO
  19487.  
  19488. RD/FRAME
  19489.  
  19490. D63–D0 A D0 D1 D2 D3
  19491.  
  19492. CSn
  19493.  
  19494. RD/WR
  19495.  
  19496. RDY
  19497.  
  19498. BS
  19499.  
  19500. DACKn
  19501. (DA)
  19502.  
  19503. Figure 13.57 MPX Interface Timing 6 (Burst Read Cycle, One Internal Wait
  19504. Inserted)
  19505.  
  19506. 390
  19507.  
  19508. ----------------------- Page 407-----------------------
  19509.  
  19510. Tm1 Tmd4
  19511. Tmd1 Tmd2 Tmd3
  19512.  
  19513. CKIO
  19514.  
  19515. RD/FRAME
  19516.  
  19517. D63–D0 A D0 D1 D2 D3
  19518.  
  19519. CSn
  19520.  
  19521. RD/WR
  19522.  
  19523. RDY
  19524.  
  19525. BS
  19526.  
  19527. DACKn
  19528. (DA)
  19529.  
  19530. Figure 13.58 MPX Interface Timing 7 (Burst Write Cycle, No Wait)
  19531.  
  19532.  
  19533. Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  19534.  
  19535. CKIO
  19536.  
  19537. RD/FRAME
  19538.  
  19539. D63–D0 A D0 D1 D2 D3
  19540.  
  19541. CSn
  19542.  
  19543. RD/WR
  19544.  
  19545. RDY
  19546.  
  19547. BS
  19548.  
  19549. DACKn
  19550. (DA)
  19551.  
  19552. Figure 13.59 MPX Interface Timing 8 (Burst Write Cycle, One Internal Wait
  19553. Inserted for First Data Only)
  19554.  
  19555. 391
  19556.  
  19557. ----------------------- Page 408-----------------------
  19558.  
  19559. 1 3 . 3 . 9 Byte Control SRAM
  19560.  
  19561. The byte control SRAM interface is a memory interface that outputs a byte select strobe (WEn ) in
  19562. both read and write bus cycles. It has 16 bit data pins, and can be directly connected to SRAM
  19563. which has an upper byte select strobe and lower byte select strobe function such as UB and LB.
  19564.  
  19565. Areas 1 and 4 can be designated as byte control SRAM. However, when these areas are set to MPX
  19566. mode, MPX mode has priority.
  19567.  
  19568. The byte control SRAM write timing is the same as for the normal SRAM interface.
  19569.  
  19570. In read operations, the WEn pin timing is different. In a read access, only the WE signal for the
  19571. byte being read is asserted. Assertion is synchronized with the fall of the CKIO clock, as for the
  19572. WE signal, while negation is synchronized with the rise of the CKIO clock, using the same
  19573. timing as the RD signal.
  19574.  
  19575. Cache fill or copy-back reads and writes are performed consecutively for a total of 32 bytes
  19576. according to the set bus width. The first access is performed on the data for which there was an
  19577. access request, and the remaining accesses are performed on the data at the 32-byte boundary. The
  19578. bus is not released during this period.
  19579.  
  19580. Figure 13.60 shows an example of byte control SRAM connection to the SH7750, and figures
  19581. 13.61 to 13.63 show examples of byte control SRAM bus timing.
  19582.  
  19583. 392
  19584.  
  19585. ----------------------- Page 409-----------------------
  19586.  
  19587. 64K × 16-bit
  19588. SH7750 SRAM
  19589.  
  19590. A18–A3 A15–A0
  19591. CSn CS
  19592. RD OE
  19593. RD/WR WE
  19594. D63–D48 I/O15–I/O0
  19595. WE7 UB
  19596. WE6 LB
  19597.  
  19598. A15–A0
  19599. CS
  19600. OE
  19601. WE
  19602. D47–D32 I/O15–I/O0
  19603. WE5 UB
  19604. WE4 LB
  19605.  
  19606. A15–A0
  19607. CS
  19608. OE
  19609. WE
  19610. D31–D16 I/O15–I/O0
  19611. WE3 UB
  19612. WE2 LB
  19613.  
  19614. A15–A0
  19615. CS
  19616. OE
  19617. WE
  19618. D15–D0 I/O15–I/O0
  19619. WE1 UB
  19620. WE0 LB
  19621.  
  19622. Figure 13.60 Example of 64-Bit Data Width Byte Control SRAM
  19623.  
  19624. 393
  19625.  
  19626. ----------------------- Page 410-----------------------
  19627.  
  19628. T1 T2
  19629.  
  19630. CKIO
  19631.  
  19632.  
  19633.  
  19634.  
  19635. A25–A0
  19636.  
  19637.  
  19638.  
  19639.  
  19640. CSn
  19641.  
  19642.  
  19643.  
  19644. RD/WR
  19645.  
  19646.  
  19647.  
  19648. RD
  19649.  
  19650. D63–D0
  19651.  
  19652. (read)
  19653.  
  19654.  
  19655.  
  19656.  
  19657.  
  19658. WEn
  19659.  
  19660.  
  19661.  
  19662. BS
  19663.  
  19664. RDY
  19665.  
  19666.  
  19667.  
  19668. DACKn
  19669. (SA: IO ← memory)
  19670.  
  19671.  
  19672. DACKn
  19673. (DA)
  19674.  
  19675. Figure 13.61 Byte Control SRAM Basic Read Cycle (No Wait)
  19676.  
  19677. 394
  19678.  
  19679. ----------------------- Page 411-----------------------
  19680.  
  19681. T1 Tw T2
  19682.  
  19683. CKIO
  19684.  
  19685. A25–A0
  19686.  
  19687. CSn
  19688.  
  19689. RD/WR
  19690.  
  19691. RD
  19692.  
  19693. D63–D0
  19694. (read)
  19695.  
  19696. WEn
  19697.  
  19698. BS
  19699.  
  19700. RDY
  19701.  
  19702. DACKn
  19703. (SA: IO ← memory)
  19704.  
  19705. DACKn
  19706. (DA)
  19707.  
  19708. Figure 13.62 Byte Control SRAM Basic Read Cycle (One Internal Wait
  19709. Cycle)
  19710.  
  19711. 395
  19712.  
  19713. ----------------------- Page 412-----------------------
  19714.  
  19715. T1 Tw Twe T2
  19716.  
  19717. CKIO
  19718.  
  19719. A25–A0
  19720.  
  19721. CSn
  19722.  
  19723. RD/WR
  19724.  
  19725. RD
  19726.  
  19727. D63–D0
  19728. (read)
  19729.  
  19730. WEn
  19731.  
  19732. BS
  19733.  
  19734. RDY
  19735.  
  19736. DACKn
  19737. (SA: IO ← memory)
  19738.  
  19739. DACKn
  19740. (DA)
  19741.  
  19742. Figure 13.63 Byte Control SRAM Basic Read Cycle (One Internal Wait + One
  19743. External Wait)
  19744.  
  19745. 396
  19746.  
  19747. ----------------------- Page 413-----------------------
  19748.  
  19749. 1 3 . 3 . 1 0 Waits between Access Cycles
  19750.  
  19751. A problem associated with higher external memory bus operating frequencies is that data buffer
  19752. turn-off on completion of a read from a low-speed device may be too slow, causing a collision
  19753. with the data in the next access, and so resulting in lower reliability or incorrect operation. To
  19754. avoid this problem, a data collision prevention feature has been provided. This memorizes the
  19755. preceding access area and the kind of read/write, and if there is a possibility of a bus collision when
  19756. the next access is started, inserts a wait cycle before the access cycle to prevent a data collision.
  19757. Wait cycle insertion consists of inserting idle cycles between access cycles, as shown in section
  19758. 13.2.3, Wait Control Register (WCR1). When the SH7750 performs consecutive write cycles, the
  19759. data transfer direction is fixed (from the SH7750 to other memory) and there is no problem. With
  19760. read accesses to the same area, also, in principle data is output from the same data buffer, and wait
  19761. cycle insertion is not performed. If there is originally space between accesses, according to the
  19762. setting of bits AnIW2–AnIW0 (n = 0 to 6) in WCR1, the number of idle cycles inserted is the
  19763. specified number of idle cycles minus the number of empty cycles.
  19764.  
  19765. When bus arbitration is performed, the bus is released after waits are inserted between cycles.
  19766.  
  19767. In single address mode DMA transfer, when data transfer is performed from an I/O device to
  19768. memory the data on the bus is determined by the speed of the I/O device. With a low-speed I/O
  19769. device, an inter-cycle idle wait equivalent to the output buffer turn-off time must be inserted. Even
  19770. with high-speed memory, when DMA transfer is considered, it may be necessary to insert an inter-
  19771. cycle wait to adjust to the speed of a low-speed device, preventing the memory from being used at
  19772. full speed.
  19773.  
  19774. Bits DMAIW2–DMAIW0 in wait control register 1 (WCR1) allow an inter-cycle wait setting to
  19775. be made when transferring data from an I/O device to memory using single address mode DMA
  19776. transfer. From 0 to 15 waits can be inserted. The number of waits specified by DMAIW2–
  19777. DMAIW0 are inserted in single address DMA transfers to all areas.
  19778.  
  19779. In dual address mode DMA transfer, the normal inter-cycle wait specified by AnIW2–AnIW0 (n = 0
  19780. to 6) is inserted.
  19781.  
  19782. 397
  19783.  
  19784. ----------------------- Page 414-----------------------
  19785.  
  19786. T1 T2 Twait T1 T2 Twait T1 T2
  19787.  
  19788. CKIO
  19789.  
  19790. A25–A0
  19791.  
  19792. CSm
  19793.  
  19794. CSn
  19795.  
  19796. BS
  19797.  
  19798. RD/WR
  19799.  
  19800. RD
  19801.  
  19802. D63–D0
  19803.  
  19804. Area m space read Area n space read Area n space write
  19805.  
  19806. Area m inter-access wait specification Area n inter-access wait specification
  19807.  
  19808. Figure 13.64 Waits between Access Cycles
  19809.  
  19810. 1 3 . 3 . 1 1 Bus Arbitration
  19811.  
  19812. The SH7750 is provided with a bus arbitration function that grants the bus to an external device
  19813. when it makes a bus request. Also provided is a bus arbitration function to support the connection
  19814. of two processors. The purpose of this function is to enable a multiprocessor system to be
  19815. implemented with a minimum of hardware by connecting the processors in a bus arbitration master
  19816. and slave arrangement.
  19817.  
  19818. There are three bus arbitration modes: master mode, partial-sharing master mode, and slave mode.
  19819. In master mode the bus is held on a constant basis, and is released to another device in response to
  19820. a bus request. In slave mode the bus is not held on a constant basis; a bus request is issued each
  19821. time an external bus cycle occurs, and the bus is released again at the end of the access. In partial-
  19822. sharing master mode, only area 2 is shared with external devices; slave mode is in effect for area 2,
  19823. while for other spaces, bus arbitration is not performed and the bus is held constantly. The area in
  19824. the master mode chip to which area 2 in the partial-sharing master mode chip is allocated is
  19825. determined by an external circuit.
  19826.  
  19827. 398
  19828.  
  19829. ----------------------- Page 415-----------------------
  19830.  
  19831. Master mode and slave mode can be specified by the external mode pins. Partial-sharing master
  19832. mode is entered from master mode by means of a software setting. See Appendix C, Mode Pin
  19833. Settings, for the external mode pin settings. In master mode and slave mode, the bus goes to the
  19834. high-impedance state when not being held, so that it is possible to directly connect the master
  19835. mode and slave mode chips. In partial-sharing master mode, the bus is constantly driven, and
  19836. therefore an external buffer is necessary for connection to the master bus. In master mode, it is
  19837. possible to connect an external device that issues bus requests instead of a slave mode chip. In the
  19838. following description, an external device that issues bus requests is also referred to as a slave.
  19839.  
  19840. The SH7750 has two internal bus masters: the CPU and the DMAC. When synchronous DRAM
  19841. or DRAM is connected and refresh control is performed, refresh requests constitute a third bus
  19842. master. In addition to these are bus requests from external devices in master mode. If requests occur
  19843. simultaneously, priority is given, in high-to-low order, to a bus request from an external device, a
  19844. refresh request, the DMAC, and the CPU.
  19845.  
  19846. To prevent incorrect operation of connected devices when the bus is transferred between master and
  19847. slave, all bus control signals are negated before the bus is released. When mastership of the bus is
  19848. received, also, bus control signals begin driving the bus from the negated state. Since signals are
  19849. driven to the same value by the master and slave exchanging the bus, output buffer collisions can
  19850. be avoided. By turning off the output buffer on the side releasing the bus, and turning on the
  19851. output buffer on the side receiving the bus, simultaneously with respect to the bus control signals,
  19852. it is possible to eliminate the signal high-impedance period. It is not necessary to provide the pull-
  19853. up resistors usually inserted in these control signal lines to prevent incorrect operation due to
  19854. external noise in the high-impedance state.
  19855.  
  19856. Bus transfer is executed between bus cycles.
  19857.  
  19858. When the bus release request signal (BREQ ) is asserted, the SH7750 releases the bus as soon as
  19859. the currently executing bus cycle ends, and outputs the bus use permission signal (BACK ).
  19860. However, bus release is not performed during a burst transfer for cache fill or write-back, or
  19861. between a read cycle and write cycle during execution of a TAS instruction. Also, bus arbitration is
  19862. not performed between bus cycles generated due to the fact that the data bus width is smaller than
  19863. the access size, such as when a longword access is made to 8-bit memory. When BREQ is negated,
  19864. BACK is negated and use of the bus is resumed. See Appendix E, Pin Functions, for the pin states
  19865. when the bus is released.
  19866.  
  19867. As the CPU in the SH7750 is connected to cache memory by a dedicated internal bus, reading from
  19868. cache memory can still be carried out when the bus is being used by another bus master inside or
  19869. outside the SH7750. When writing from the CPU, an external write cycle is generated when write-
  19870. through has been set for the cache in the SH7750, or when an access is made to a cache-off area.
  19871. There is consequently a delay until the bus is returned.
  19872.  
  19873. 399
  19874.  
  19875. ----------------------- Page 416-----------------------
  19876.  
  19877. When the SH7750 wants to take back the bus in response to an internal memory refresh request, it
  19878. negates BACK . On receiving the BACK negation, the device that asserted the external bus release
  19879. request negates BREQ to release the bus. The bus is thereby returned to the SH7750, which then
  19880. carries out the necessary processing.
  19881.  
  19882. CKIO
  19883.  
  19884. BREQ
  19885. BACK Asserted for at least 2 cyc
  19886.  
  19887. Negated within 2 cyc
  19888. HiZ
  19889. A25–A0
  19890.  
  19891. HiZ
  19892. CSn
  19893.  
  19894. RD/WR HiZ
  19895.  
  19896. HiZ
  19897. RD
  19898.  
  19899. HiZ
  19900. WEn
  19901.  
  19902. HiZ HiZ
  19903. D63–D0 (write)
  19904.  
  19905. HiZ
  19906. BS
  19907.  
  19908. Master mode device access
  19909.  
  19910. Must be asserted for
  19911. at least 2 cyc Must be negated within 2 cyc
  19912.  
  19913. BREQ/BSACK
  19914.  
  19915. BACK/BSREQ
  19916.  
  19917. HiZ HiZ
  19918. A25–A0
  19919.  
  19920. HiZ HiZ
  19921. CSn
  19922.  
  19923. HiZ HiZ
  19924. RD/WR
  19925.  
  19926. HiZ HiZ
  19927. RD
  19928.  
  19929. HiZ HiZ
  19930. WEn
  19931.  
  19932. HiZ HiZ
  19933. D63–D0 (write)
  19934.  
  19935. HiZ HiZ
  19936. BS
  19937.  
  19938. Slave mode device access
  19939.  
  19940. Master access Slave access Master access
  19941.  
  19942. Figure 13.65 Arbitration Sequence
  19943. 400
  19944.  
  19945. ----------------------- Page 417-----------------------
  19946.  
  19947. 1 3 . 3 . 1 2 Master Mode
  19948.  
  19949. The master mode processor holds the bus itself unless it receives a bus request.
  19950.  
  19951. On receiving an assertion (low level) of the bus request signal (BREQ ) from off-chip, the master
  19952. mode processor releases the bus and asserts (drives low) the bus use permission signal (BACK ) as
  19953. soon as the currently executing bus cycle ends. If a bus release request due to a refresh request has
  19954. not been issued, on receiving the BREQ negation (high level) indicating that the slave has released
  19955. the bus, the processor negates (drives high) the BACK signal and resumes use of the bus.
  19956.  
  19957. If a bus request is issued due to a memory refresh request in the bus-released state, the processor
  19958. negates the bus use permission signal (BACK ), and on receiving the BREQ negation indicating
  19959. that the slave has released the bus, resumes use of the bus.
  19960.  
  19961. When the bus is released, all bus interface related output signals and input/output signals go to the
  19962. high-impedance state, except for the synchronous DRAM interface CKE signal and bus arbitration
  19963. BACK signal, and DACK0 and DACK1 which control DMA transfers.
  19964.  
  19965. With DRAM, the bus is released after precharging is completed. With synchronous DRAM, also,
  19966. a precharge command is issued for the active bank and the bus is released after precharging is
  19967. completed.
  19968.  
  19969. The actual bus release sequence is as follows.
  19970.  
  19971. First, the bus use permission signal is asserted in synchronization with the rising edge of the
  19972. clock. The address bus and data bus go to the high-impedance state in synchronization with the
  19973. next rising edge of the clock after this BACK assertion. At the same time, the bus control signals
  19974. (BS, CSn, RAS1, RAS2, WEn , RD , RD/WR, RD2 , RD/WR2, CE2A, and CE2B ) go to the
  19975. high-impedance state. These bus control signals are negated no later than one cycle before going to
  19976. high-impedance. Bus request signal sampling is performed on the rising edge of the clock.
  19977.  
  19978. The sequence for re-acquiring the bus from the slave is as follows.
  19979.  
  19980. As soon as BREQ negation is detected on the rising edge of the clock, BACK is negated and bus
  19981. control signal driving is started. Driving of the address bus and data bus starts at the next rising
  19982. edge of an in-phase clock. The bus control signals are asserted and the bus cycle is actually started,
  19983. at the earliest, at the clock rising edge at which the address and data signals are driven.
  19984.  
  19985. In order to reacquire the bus and start execution of a refresh operation or bus access, theBREQ
  19986. signal must be negated for at least two cycles.
  19987.  
  19988. If a refresh request is generated when BACK has been asserted and the bus has been released, the
  19989. BACK signal is negated even while the BREQ signal is asserted to request the slave to relinquish
  19990. the bus. When the SH7750 is used in master mode, consecutive bus accesses may be attempted to
  19991. reduce the overhead due to arbitration in the case of a slave designed independently by the user.
  19992.  
  19993. 401
  19994.  
  19995. ----------------------- Page 418-----------------------
  19996.  
  19997. When connecting a slave for which the total duration of consecutive accesses exceeds the refresh
  19998. cycle, the design should provide for the bus to be released as soon as possible after negation of the
  19999. BACK signal is detected.
  20000.  
  20001. 1 3 . 3 . 1 3 Slave Mode
  20002.  
  20003. In slave mode, the bus is normally in the released state, and an external device cannot be accessed
  20004. unless the bus is acquired through execution of the bus arbitration sequence. In a reset, also, the
  20005. bus-released state is established and the bus arbitration sequence is started from the reset vector
  20006. fetch.
  20007.  
  20008. To acquire the bus, the slave device asserts (drives low) the BSREQ signal in synchronization with
  20009. the rising edge of the clock. The bus use permission BSACK signal is sampled for assertion (low
  20010. level) in synchronization with the rising edge of the clock. When BSACK assertion is detected, the
  20011. bus control signals and address bus are immediately driven at the negated level. The bus cycle is
  20012. started at the next rising edge of the clock. The last signal negated at the end of the access cycle is
  20013. synchronized with the rising edge of the clock. When the bus cycle ends, the BSREQ signal is
  20014. negated and the release of the bus is reported to the master. On the next rising edge of the clock,
  20015. the control signals are set to high-impedance.
  20016.  
  20017. In order for the slave mode processor to begin access, theBSACK signal must be asserted for at
  20018. least two cycles.
  20019.  
  20020. For a slave access cycle in DRAM or synchronous DRAM, the bus is released on completion of
  20021. precharging, as in the case of the master.
  20022.  
  20023. Refresh control is left to the master mode device, and any refresh control settings made in slave
  20024. mode are ignored.
  20025.  
  20026. Do not use DRAM/synchronous DRAM RAS down mode in slave mode.
  20027.  
  20028. Synchronous DRAM mode register settings should be made by the master mode device. Do not
  20029. use the DMAC’s DDT mode in slave mode.
  20030.  
  20031. 402
  20032.  
  20033. ----------------------- Page 419-----------------------
  20034.  
  20035. 1 3 . 3 . 1 4 Partial-Sharing Master Mode
  20036.  
  20037. In partial-sharing master mode, area 2 only is shared with other devices, and other areas can be
  20038. accessed at all times. Partial-sharing master mode can be set by setting master mode with the
  20039. external mode pins, and setting the PSHR bit to 1 in BCR1 in the initialization procedure in a
  20040. power-on reset. In a manual reset the bus state controller setting register values are retained, and so
  20041. need not be set again.
  20042.  
  20043. Partial-sharing master mode is designed for use in conjunction with a master mode chip. The
  20044. partial-sharing master can access a device on the master side via area 2, but the master cannot
  20045. access a device on the partial-sharing master side.
  20046.  
  20047. An address and control signal buffer and a data buffer must be located between the partial-sharing
  20048. master and the master, and controlled by a buffer control circuit.
  20049.  
  20050. The partial-sharing master mode processor uses the following procedure to access area 2. It asserts
  20051. the BSREQ signal on the rising edge of the clock, and issues a bus request to the master. It
  20052. samples BSACK on each rising edge of the clock, and on receiving BSACK assertion, starts the
  20053. access cycle on the next rising edge of the clock. At the end of the access, it negates BSREQ on
  20054. the rising edge of the clock. Buffer control in an access to an area 2 device by the partial-sharing
  20055. master is carried out by referencing the CS2 signal or BSREQ and BSACK signals on the partial-
  20056. sharing master side. Permission to use the bus is reported by the BSACK line connected to the
  20057. partial-sharing master, but the master may also negate the BSACK signal even while the bus is
  20058. being used, if it needs the bus urgently in order to service a refresh, for example. Consequently, the
  20059. partial-sharing master has to monitor the BSREQ signal to see whether it can continue to use the
  20060. bus after detecting BSACK assertion. In the case of the address buffer, after the address buffer is
  20061. turned on when BSACK assertion is detected, the buffer is kept on until BSREQ is negated, at
  20062. which point it is turned off. If the turning-off of the buffer used is late, resulting in a collision
  20063. with the start of an access cycle on the master side, the BSREQ signal output from the partial-
  20064. sharing master must be routed through a delay circuit as part of the buffer control circuit, and input
  20065. to the master BREQ signal.
  20066.  
  20067. In order for a partial-sharing master mode processor to begin area 2 access, theBSACK signal
  20068. must be asserted for at least two cycles.
  20069.  
  20070. When the bus is released after area 2 has been accessed in partial-sharing master mode, if area 2 is
  20071. synchronous DRAM, there is a wait of the period required for auto-precharge before bus release is
  20072. performed.
  20073.  
  20074. In partial-sharing master mode, refreshing is not performed for area 2 (refresh requests are ignored).
  20075.  
  20076. Do not use DRAM/synchronous DRAM RAS down mode in partial-sharing master mode.
  20077.  
  20078. 403
  20079.  
  20080. ----------------------- Page 420-----------------------
  20081.  
  20082. Area 2 synchronous DRAM mode register settings should be made by the master mode device. Set
  20083. partial-sharing master mode (by setting the PSHR bit to 1 in BCR1) after completion of the area 3
  20084. synchronous DRAM mode register settings.
  20085.  
  20086. In partial-sharing master mode, DMA transfer should not be performed on area 2, and the DMAC’s
  20087. DDT mode should not be used.
  20088.  
  20089. 1 3 . 3 . 1 5 Cooperation between Master and Slave
  20090.  
  20091. To enable system resources to be controlled in a harmonious fashion by master and slave, their
  20092. respective roles must be clearly defined. Before DRAM or synchronous DRAM is used,
  20093. initialization operations must be carried out. Responsibility must also be assigned when a standby
  20094. operation is performed to implement the power-down state.
  20095.  
  20096. The design of the SH7750 provides for all control, including initialization, refreshing, and standby
  20097. control, to be carried out by the master mode device. In a dual-processor configuration using direct
  20098. master/slave connection, all processing except direct access to memory is handled by the master. In
  20099. a combination of master mode and partial-sharing master mode, the partial-sharing master mode
  20100. processor performs initialization, refreshing, and standby control for the areas connected to it, with
  20101. the exception of area 2, while the master performs initialization of the memory connected to it.
  20102.  
  20103. If the SH7750 is specified as the master in a power-on reset, it will not accept bus requests from
  20104. the slave until the BREQ enable bit (BCR1.BREQEN) is set to 1.
  20105.  
  20106. To ensure that the slave processor does not access memory requiring initialization before use, such
  20107. as DRAM and synchronous DRAM, until initialization is completed, write 1 to the BREQ enable
  20108. bit after initialization ends.
  20109.  
  20110. Before setting self-refresh mode in standby mode, etc., write 0 to the BREQ enable bit to
  20111. invalidate the BREQ signal from the slave. Write 1 to the BREQ enable bit only after the master
  20112. has performed the necessary processing (refresh settings, etc.) for exiting self-refresh mode.
  20113.  
  20114. 404
  20115.  
  20116. ----------------------- Page 421-----------------------
  20117.  
  20118. Section 14 Direct Memory Access Controller (DMAC)
  20119.  
  20120. 1 4 . 1 Overview
  20121.  
  20122. The SH7750 includes an on-chip four-channel direct memory access controller (DMAC). The
  20123. DMAC can be used in place of the CPU to perform high-speed data transfers among external
  20124. devices equipped with DACK (DMA transfer end notification), external memories, memory-
  20125. mapped external devices, and on-chip peripheral modules (except the DMAC, BSC, and UBC).
  20126. Using the DMAC reduces the burden on the CPU and increases the operating efficiency of the
  20127. chip.
  20128.  
  20129. 1 4 . 1 . 1 Features
  20130.  
  20131. The DMAC has the following features.
  20132.  
  20133. • Four channels
  20134.  
  20135. • Physical address space
  20136.  
  20137. • Choice of 8-bit, 16-bit, 32-bit, 64-bit, or 32-byte transfer data length
  20138.  
  20139. • Maximum of 16 M (16,777,216) transfers
  20140.  
  20141. • Choice of single or dual address mode
  20142.  
  20143.  Single address mode: Either the transfer source or the transfer destination (peripheral device)
  20144. is accessed by a DACK signal while the other is accessed by address. One data transfer is
  20145. completed in one bus cycle.
  20146.  
  20147.  Dual address mode: Both the transfer source and transfer destination are accessed by address.
  20148. Values set in DMAC internal registers indicate the accessed address for both the transfer
  20149. source and the transfer destination. Two bus cycles are required for one data transfer.
  20150.  
  20151. • Channel functions: Transfer modes that can be set are different for each channel.
  20152.  
  20153.  Channel 0: Single or dual address mode. External requests are accepted.
  20154.  
  20155.  Channel 1: Single or dual address mode. External requests are accepted.
  20156.  
  20157.  Channel 2: Dual address mode only.
  20158.  
  20159.  Channel 3: Dual address mode only.
  20160.  
  20161. • Transfer requests: The following three DMAC transfer activation requests are supported.
  20162.  
  20163.  External request: From two DREQ pins. Either low level detection or falling edge detection
  20164. can be specified. External requests can be accepted on channels 0 and 1 only.
  20165.  
  20166.  Requests from on-chip peripheral modules: Transfer requests from modules such as the SCI
  20167. and TMU. These can be accepted on all channels.
  20168.  
  20169.  Auto-request: The transfer request is generated automatically within the DMAC.
  20170.  
  20171. • Choice of bus mode: Cycle steal mode or burst mode
  20172.  
  20173. • Two types of DMAC channel priority ranking:
  20174.  
  20175. 405
  20176.  
  20177. ----------------------- Page 422-----------------------
  20178.  
  20179.  Fixed priority mode: Channel priorities are permanently fixed.
  20180.  
  20181.  Round robin mode: Sets the lowest priority for the channel for which an execution request
  20182. was last accepted.
  20183.  
  20184. • An interrupt request can be sent to the CPU on completion of the specified number of transfers.
  20185.  
  20186. • On-demand data transfer mode (DDT mode)
  20187.  
  20188. In this mode, interfacing between an external device and the DMAC is performed using the
  20189. DBREQ , BAVL, TR , TDACK, and ID [1:0] pins. External requests can be accepted on all four
  20190. channels.
  20191.  
  20192. For channel 0, data transfer can be carried out with the transfer mode, number of transfers,
  20193. transfer address (single only), etc., specified by the external device.
  20194.  
  20195. For channels 1 to 3, when transfer is performed by means of an on-chip peripheral module
  20196. request or auto-request, the operation is the same as in the normal mode. On these channels,
  20197. data transfer can be initiated by an external request.
  20198.  
  20199.  Channel 0: Single address mode. External requests are accepted
  20200.  
  20201.  Channel 1: Single or dual address mode. External requests are accepted.
  20202.  
  20203.  Channel 2: Single or dual address mode. External requests are accepted.
  20204.  
  20205.  Channel 3: Single or dual address mode. External requests are accepted.
  20206.  
  20207. In DDT mode, data transfer is carried out using the DBREQ , BAVL, TR , TDACK, and ID
  20208. [1:0] signals to perform handshaking between the external device and the DMAC.
  20209.  
  20210. 406
  20211.  
  20212. ----------------------- Page 423-----------------------
  20213.  
  20214. 1 4 . 1 . 2 Block Diagram
  20215.  
  20216. Figure 14.1 shows a block diagram of the DMAC.
  20217.  
  20218. DMAC module
  20219.  
  20220. Count
  20221. control SARn
  20222.  
  20223. Register DARn
  20224. control
  20225.  
  20226. s DMATCRn
  20227. u s
  20228. b u Activation
  20229.  
  20230. On-chip l b
  20231. a l control
  20232. r a
  20233. peripheral e n CHCRn
  20234. h r
  20235. module p e
  20236. i t
  20237. r n
  20238. e I
  20239. P
  20240. DMAOR
  20241. Request
  20242. TMU
  20243. priority
  20244. SCI, SCIF
  20245. control
  20246.  
  20247. DACK0, DACK1
  20248. DRAK0, DRAK1
  20249.  
  20250. Bus
  20251. interface
  20252.  
  20253. s
  20254. p s
  20255. i e
  20256. h r
  20257. c- d SAR0, DAR0, DMATCR0,
  20258. n d
  20259. o a dreq0-3 CHCR0 only
  20260. / e
  20261. s l
  20262. s u
  20263. e d
  20264. r o
  20265. d
  20266. d m DDT module
  20267. a l
  20268.  
  20269. l a
  20270. DREQ0, DREQ1 a r
  20271. n e DTR command buffer
  20272. r h
  20273. e p
  20274. t i
  20275. x r
  20276. E e
  20277. BAVL p
  20278. 32B data CH0 CH1 CH2 CH3
  20279. buffer DBREQ
  20280. External bus
  20281. Bus state DDTMODE Request controller
  20282. ID[1:0]
  20283. controller BAVL
  20284. TDACK DDTD
  20285. 48 bits
  20286. DMAOR: DMAC operation register id[1:0] TR DBREQ
  20287. SARn: DMAC source address
  20288. tdack
  20289. register
  20290. DARn: DMAC destination address register
  20291. DMATCRn: DMAC transfer count register
  20292. CHCRn: DMAC channel control register
  20293. (n: 0 to 3)
  20294.  
  20295. Figure 14.1 Block Diagram of DMAC
  20296.  
  20297. 407
  20298.  
  20299. ----------------------- Page 424-----------------------
  20300.  
  20301. 1 4 . 1 . 3 Pin Configuration
  20302.  
  20303. Tables 14.1 and 14.2 show the DMAC pins.
  20304.  
  20305. Table 14.1DMAC Pins
  20306.  
  20307. Channel Pin Name Abbreviation I / O Function
  20308.  
  20309. 0 DMA transfer DREQ0 Input DMA transfer request input from
  20310. request external device to channel 0
  20311.  
  20312. DREQ acceptance DRAK0 Output Acceptance of request for DMA
  20313. confirmation transfer from channel 0 to external
  20314. device
  20315.  
  20316. Notification to external device of start
  20317. of execution
  20318.  
  20319. DMA transfer end DACK0 Output Strobe output to external device of
  20320. notification DMA transfer request from channel 0
  20321. to external device
  20322.  
  20323. 1 DMA transfer DREQ1 Input DMA transfer request input from
  20324. request external device to channel 1
  20325.  
  20326. DREQ acceptance DRAK1 Output Acceptance of request for DMA
  20327. confirmation transfer from channel 1 to external
  20328. device
  20329.  
  20330. Notification to external device of start
  20331. of execution
  20332.  
  20333. DMA transfer end DACK1 Output Strobe output to external device of
  20334. notification DMA transfer request from channel 1
  20335. to external device
  20336.  
  20337. 408
  20338.  
  20339. ----------------------- Page 425-----------------------
  20340.  
  20341. Table 14.2DMAC Pins in DDT Mode
  20342.  
  20343. Pin Name Abbreviation I / O Function
  20344.  
  20345. Data bus request DBREQ Input Data bus release request from external
  20346. (DREQ0 ) device for DTR format input
  20347.  
  20348. Data bus available BAVL Output Data bus release notification
  20349. (DRAK0) Data bus can be used 2 cycles after
  20350.  
  20351. BAVL is asserted
  20352.  
  20353. Transfer request signal TR Input If asserted 2 cycles after BAVL
  20354. (DREQ1 ) assertion, DTR format is sent
  20355.  
  20356. Only TR asserted: DMA request
  20357.  
  20358. DBREQ and TR asserted
  20359. simultaneously: Direct request to
  20360. channel 2
  20361.  
  20362. DMAC strobe TDACK Output Reply strobe signal for external device
  20363. (DACK0) from DMAC
  20364.  
  20365. Channel number ID [1:0] Output Notification of channel number to
  20366. notification (DRAK1, DACK1) external device at same time as TDACK
  20367. output
  20368.  
  20369. (ID [1] = DRAK1, ID [0] = DACK1)
  20370.  
  20371. 1 4 . 1 . 4 Register Configuration
  20372.  
  20373. Table 14.3 summarizes the DMAC registers. The DMAC has a total of 17 registers: four registers
  20374. are allocated to each channel, and an additional control register is shared by all four channels.
  20375.  
  20376. Table 14.3DMAC Registers
  20377.  
  20378. Chan Abbre- Read/ Area 7 Acces
  20379. nel Name viation Write Initial P 4 Address s Size
  20380. Value Address
  20381. 0 DMA source SAR0 R/W*2 Undefined H'FFA00000 H'1FA00000 32
  20382.  
  20383. address register 0
  20384. DMA destination DAR0 R/W*2 Undefined H'FFA00004 H'1FA00004 32
  20385.  
  20386. address register 0
  20387. DMA transfer DMATCR0 R/W*2 Undefined H'FFA00008 H'1FA00008 32
  20388.  
  20389. count register 0
  20390.  
  20391. 1, 2
  20392. DMA channel CHCR0 R/W* * H'00000000 H'FFA0000C H'1FA0000C 32
  20393. control register 0
  20394.  
  20395. 409
  20396.  
  20397. ----------------------- Page 426-----------------------
  20398.  
  20399. Table 14.3DMAC Registers
  20400.  
  20401. Chan Abbre- Read/ Area 7 Acces
  20402. nel Name viation Write Initial P 4 Address s Size
  20403. Value Address
  20404.  
  20405. 1 DMA source SAR1 R/W Undefined H'FFA00010 H'1FA00010 32
  20406. address register 1
  20407.  
  20408. DMA destination DAR1 R/W Undefined H'FFA00014 H'1FA00014 32
  20409. address register 1
  20410.  
  20411. DMA transfer DMATCR1 R/W Undefined H'FFA00018 H'1FA00018 32
  20412. count register 1
  20413. DMA channel CHCR1 R/W*1 H'00000000 H'FFA0001C H'1FA0001C 32
  20414.  
  20415. control register 1
  20416.  
  20417. 2 DMA source SAR2 R/W Undefined H'FFA00020 H'1FA00020 32
  20418. address register 2
  20419.  
  20420. DMA destination DAR2 R/W Undefined H'FFA00024 H'1FA00024 32
  20421. address register 2
  20422.  
  20423. DMA transfer DMATCR2 R/W Undefined H'FFA00028 H'1FA00028 32
  20424. count register 2
  20425. DMA channel CHCR2 R/W*1 H'00000000 H'FFA0002C H'1FA0002C 32
  20426.  
  20427. control register 2
  20428.  
  20429. 3 DMA source SAR3 R/W Undefined H'FFA00030 H'1FA00030 32
  20430. address register 3
  20431.  
  20432. DMA destination DAR3 R/W Undefined H'FFA00034 H'1FA00034 32
  20433. address register 3
  20434.  
  20435. DMA transfer DMATCR3 R/W Undefined H'FFA00038 H'1FA00038 32
  20436. count register 3
  20437. DMA channel CHCR3 R/W*1 H'00000000 H'FFA0003C H'1FA0003C 32
  20438.  
  20439. control register 3
  20440. Com- DMA operation DMAOR R/W*1 H'00000000 H'FFA00040 H'1FA00040 32
  20441.  
  20442. mon register
  20443.  
  20444. Notes: Longword access should be used for all control registers. If a different access width is
  20445. used, reads will return all 0s and writes will not be possible.
  20446. 1. Bit 1 of CHCR0–CHCR3 and bits 2 and 1 of DMAOR can only be written with 0 after being
  20447. read as 1, to clear the flags.
  20448. 2. In DDT mode, writes from the CPU are masked. Writes from external devices using the
  20449. DTR format are possible.
  20450.  
  20451. 410
  20452.  
  20453. ----------------------- Page 427-----------------------
  20454.  
  20455. 1 4 . 2 Register Descriptions
  20456.  
  20457. 1 4 . 2 . 1 DMA Source Address Registers 0–3 (SAR0–SAR3)
  20458.  
  20459. Bit: 31 30 29 28 27 26 25 24
  20460.  
  20461. Initial value: — — — — — — — —
  20462.  
  20463. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20464.  
  20465. Bit: 23 0
  20466.  
  20467. · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · ·
  20468. ·· · ·
  20469.  
  20470. Initial value: — · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · —
  20471. ·· · ·
  20472.  
  20473. R/W: R/W · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · R/W
  20474. ·· · ·
  20475.  
  20476. DMA source address registers 0–3 (SAR0–SAR3) are 32-bit readable/writable registers that specify
  20477. the source address of a DMA transfer. These registers have a counter feedback function, and during
  20478. a DMA transfer they indicate the next source address. In single address mode, the SAR value is
  20479. ignored when a device with DACK has been specified as the transfer source.
  20480.  
  20481. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit, 64-
  20482. bit, or 32-byte data transfer, respectively. If a different address is specified, an address error will be
  20483. detected and the DMAC will halt.
  20484.  
  20485. The initial value of these registers after a power-on or manual reset is undefined. They retain their
  20486. values in standby mode and deep sleep mode.
  20487.  
  20488. When transfer is performed from memory to an external device in DDT mode, DTR format [31:0]
  20489. is set in SAR0 [31:0].
  20490.  
  20491. 411
  20492.  
  20493. ----------------------- Page 428-----------------------
  20494.  
  20495. 1 4 . 2 . 2 DMA Destination Address Registers 0–3 (DAR0–DAR3)
  20496.  
  20497. Bit: 31 30 29 28 27 26 25 24
  20498.  
  20499. Initial value: — — — — — — — —
  20500.  
  20501. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20502.  
  20503. Bit: 23 0
  20504.  
  20505. · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · ·
  20506. ·· · ·
  20507.  
  20508. Initial value: — · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · —
  20509. ·· · ·
  20510.  
  20511. R/W: R/W · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · ·· · · · R/W
  20512. ·· · ·
  20513.  
  20514. DMA destination address registers 0–3 (DAR0–DAR3) are 32-bit readable/writable registers that
  20515. specify the destination address of a DMA transfer. These registers have a counter feedback function,
  20516. and during a DMA transfer they indicate the next destination address. In single address mode, the
  20517. DAR value is ignored when a device with DACK has been specified as the transfer destination.
  20518.  
  20519. Specify a 16-bit, 32-bit, 64-bit, or 32-byte boundary address when performing a 16-bit, 32-bit, 64-
  20520. bit, or 32-byte data transfer, respectively. If a different address is specified, an address error will be
  20521. detected and the DMAC will halt.
  20522.  
  20523. The initial value of these registers after a power-on or manual reset is undefined. They retain their
  20524. values in standby mode and deep sleep mode.
  20525.  
  20526. When transfer is performed from an external device to memory in DDT mode, DTR format [31:0]
  20527. is set in DAR0 [31:0].
  20528.  
  20529. Note: When a 16-bit, 32-bit, 64-bit, or 32-byte boundary address is specified, take care
  20530. with the setting of bit 0, bits 1–0, bits 2–0, or bits 4–0, respectively. If an address
  20531. specification that ignores boundary considerations is made, the DMAC will detect an
  20532. address error and halt operation on all channels (DMAOR: address error flag AE = 1). The
  20533. DMAC will also detect an address error and halt if an area 7 address is specified in an
  20534. external data bus transfer, or if the address of a nonexistent on-chip peripheral module is
  20535. specified.
  20536.  
  20537. 412
  20538.  
  20539. ----------------------- Page 429-----------------------
  20540.  
  20541. 1 4 . 2 . 3 DMA Transfer Count Registers 0–3 (DMATCR0–DMATCR3)
  20542.  
  20543. Bit: 31 30 29 28 27 26 25 24
  20544.  
  20545. Initial value: 0 0 0 0 0 0 0 0
  20546.  
  20547. R/W: R R R R R R R R
  20548.  
  20549. Bit: 23 22 21 20 19 18 17 16
  20550.  
  20551. Initial value: — — — — — — — —
  20552.  
  20553. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20554.  
  20555. Bit: 15 14 13 12 11 10 9 8
  20556.  
  20557. Initial value: — — — — — — — —
  20558.  
  20559. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20560.  
  20561. Bit: 7 6 5 4 3 2 1 0
  20562.  
  20563. Initial value: — — — — — — — —
  20564.  
  20565. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20566.  
  20567. DMA transfer count registers 0–3 (DMATCR0–DMATCR3) are 32-bit readable/writable registers
  20568. that specify the transfer count for the corresponding channel (byte count, word count, longword
  20569. count, quadword count, or 32-byte count). Specifying H'000001 gives a transfer count of 1, while
  20570. H'000000 gives the maximum setting, 16,777,216 (16M) transfers. During DMAC operation, the
  20571. remaining number of transfers is shown.
  20572.  
  20573. Bits 31–24 of these registers are reserved; they are always read as 0, and should only be written
  20574. with 0.
  20575.  
  20576. The initial value of these registers after a power-on or manual reset is undefined. They retain their
  20577. values in standby mode and deep sleep mode.
  20578.  
  20579. In DDT mode, DTR format [55:48] is set in DMATCR0 [7:0]
  20580.  
  20581. 413
  20582.  
  20583. ----------------------- Page 430-----------------------
  20584.  
  20585. 1 4 . 2 . 4 DMA Channel Control Registers 0–3 (CHCR0–CHCR3)
  20586.  
  20587. Bit: 31 30 29 28 27 26 25 24
  20588.  
  20589. SSA2 SSA1 SSA0 STC DSA2 DSA1 DSA0 DTC
  20590.  
  20591. Initial value: 0 0 0 0 0 0 0 0
  20592.  
  20593. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20594.  
  20595. Bit: 23 22 21 20 19 18 17 16
  20596.  
  20597. — — — — DS RL AM AL
  20598.  
  20599. Initial value: 0 0 0 0 — — — —
  20600.  
  20601. R/W: R R R R R/W (R/W) R/W (R/W)
  20602.  
  20603. Bit: 15 14 13 12 11 10 9 8
  20604.  
  20605. DM1 DM0 SM1 SM0 RS3 RS2 RS1 RS0
  20606.  
  20607. Initial value: 0 0 0 0 0 0 0 0
  20608.  
  20609. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  20610.  
  20611. Bit: 7 6 5 4 3 2 1 0
  20612.  
  20613. TM TS2 TS1 TS0 — IE TE DE
  20614.  
  20615. Initial value: 0 0 0 0 0 0 0 0
  20616.  
  20617. R/W: R/W R/W R/W R/W R R/W R/(W) R/W
  20618.  
  20619. Note: The TE bit can only be written with 0 after being read as 1, to clear the flag.
  20620. The RL, AM, AL, and DS bits may be absent, depending on the channel.
  20621.  
  20622. DMA channel control registers 0–3 (CHCR0–CHCR3) are 32-bit readable/writable registers that
  20623. specify the operating mode, transfer method, etc., for each channel. Bits 31–28 and 27–24 indicate
  20624. the source address and destination address, respectively; these settings are only valid when the
  20625. transfer involves the CS5 or CS6 space and the relevant space has been specified as a PCMCIA
  20626. interface space. In other cases, these bits should be cleared to 0. For details of the PCMCIA
  20627. interface, see section 13.3.7, PCMCIA Interface, in section 13, Bus State Controller (BSC).
  20628.  
  20629. In DDT mode, CHCR0 is set according to the DTR format. (The following settings are fixed:
  20630. CHCR0 [31:24] = 0, [18:16] = 0, [2] = 0, [1] = 0, [0] = 1)
  20631.  
  20632. Bits 18 and 16 are not present in CHCR2 and CHCR3. In CHCR2 and CHCR3, these bits cannot
  20633. be modified (a write value of 0 should always be used) and are always read as 0.
  20634.  
  20635. These registers are initialized to H'00000000 by a power-on or manual reset. They retain their
  20636. values in standby mode and deep sleep mode.
  20637.  
  20638. 414
  20639.  
  20640. ----------------------- Page 431-----------------------
  20641.  
  20642. Bits 31 to 29—Source Address Space Attribute Specification (SSA2–SSA0):
  20643. These bits specify the space attribute for PCMCIA access. These bits are only valid in the case of
  20644. page mapping to PCMCIA connected to areas 5 and 6.
  20645.  
  20646. Bit 31: SSA2 Bit 30: SSA1 Bit 29: SSA0 Description
  20647.  
  20648. 0 0 0 Reserved in PCMCIA access (Initial value)
  20649.  
  20650. 1 Dynamic bus sizing I/O space
  20651.  
  20652. 1 0 8-bit I/O space
  20653.  
  20654. 1 16-bit I/O space
  20655.  
  20656. 1 0 0 8-bit common memory space
  20657.  
  20658. 1 16-bit common memory space
  20659.  
  20660. 1 0 8-bit attribute memory space
  20661.  
  20662. 1 16-bit attribute memory space
  20663.  
  20664. Bit 28—Source Address Wait Control Select (STC): Specifies CS5 or CS6 space wait
  20665. control for PCMCIA access. This bit selects the wait control register in the BSC that performs
  20666. area 5 and 6 wait cycle control.
  20667.  
  20668. Bit 28: STC Description
  20669.  
  20670. 0 C5 space wait cycle selection (Initial value)
  20671.  
  20672. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  20673. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  20674. PCMCIA control register (PCR), are selected
  20675.  
  20676. 1 C6 space wait cycle selection
  20677.  
  20678. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  20679. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  20680. PCMCIA control register (PCR), are selected
  20681.  
  20682. Note: For details, see section 13.3.7, PCMCIA Interface.
  20683.  
  20684. 415
  20685.  
  20686. ----------------------- Page 432-----------------------
  20687.  
  20688. Bits 27 to 25—Destination Address Space Attribute Specification (DSA2–
  20689. DSA0): These bits specify the space attribute for PCMCIA access. These bits are only valid in
  20690. the case of page mapping to PCMCIA connected to areas 5 and 6.
  20691.  
  20692. Bit 27: DSA2 Bit 26: DSA1 Bit 25: DSA0 Description
  20693.  
  20694. 0 0 0 Reserved in PCMCIA access (Initial value)
  20695.  
  20696. 1 Dynamic bus sizing I/O space
  20697.  
  20698. 1 0 8-bit I/O space
  20699.  
  20700. 1 16-bit I/O space
  20701.  
  20702. 1 0 0 8-bit common memory space
  20703.  
  20704. 1 16-bit common memory space
  20705.  
  20706. 1 0 8-bit attribute memory space
  20707.  
  20708. 1 16-bit attribute memory space
  20709.  
  20710. Bit 24—Destination Address Wait Control Select (DTC): Specifies CS5 or CS6
  20711. space wait cycle control for PCMCIA access. This bit selects the wait control register in the BSC
  20712. that performs area 5 and 6 wait cycle control.
  20713.  
  20714. Bit 24: DTC Description
  20715.  
  20716. 0 C5 space wait cycle selection (Initial value)
  20717.  
  20718. Settings of bits A5W2–A5W0 in wait control register 2 (WCR2), and bits
  20719. A5PCW1–A5PCW0, A5TED2–A5TED0, and A5TEH2–A5TEH0 in the
  20720. PCMCIA control register (PCR), are selected
  20721.  
  20722. 1 C6 space wait cycle selection
  20723.  
  20724. Settings of bits A6W2–A6W0 in wait control register 2 (WCR2), and bits
  20725. A6PCW1–A6PCW0, A6TED2–A6TED0, and A6TEH2–A6TEH0 in the
  20726. PCMCIA control register (PCR), are selected
  20727.  
  20728. Note: For details, see section 13.3.7, PCMCIA Interface.
  20729.  
  20730. Bits 23 to 20—Reserved: These bits are always read as 0, and should only be written with 0.
  20731.  
  20732. Bit 19—DREQ Select (DS): Specifies either low level detection or falling edge detection as
  20733. the sampling method for the DREQ pin used in external request mode.
  20734.  
  20735. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  20736. CHCR0–CHCR3.
  20737.  
  20738. Bit 19: DS Description
  20739.  
  20740. 0 Low level detection (Initial value)
  20741.  
  20742. 1 Falling edge detection
  20743.  
  20744. 416
  20745.  
  20746. ----------------------- Page 433-----------------------
  20747.  
  20748. Bit 18—Request Check Level (RL): Selects whether the DRAK signal (that notifies an
  20749. external device of the acceptance of DREQ) is an active-high or active-low output.
  20750.  
  20751. This bit is valid only in CHCR0 and CHCR1.
  20752.  
  20753. Bit 18: RL Description
  20754.  
  20755. 0 DRAK is an active-high output (Initial value)
  20756.  
  20757. 1 DRAK is an active-low output
  20758.  
  20759. Bit 17—Acknowledge Mode (AM): In dual address mode, selects whether DACK is output
  20760. in the data read cycle or write cycle. In single address mode, DACK is always output regardless of
  20761. the setting of this bit.
  20762.  
  20763. In normal DMA mode, this bit is valid only in CHCR0 and CHCR1. In DDT mode, it is valid in
  20764. CHCR1–CHCR3.
  20765.  
  20766. Bit 17: AM Description
  20767.  
  20768. 0 DACK is output in read cycle (Initial value)
  20769.  
  20770. 1 DACK is output in write cycle
  20771.  
  20772. Bit 16—Acknowledge Level (AL): Specifies the DACK (acknowledge) signal as active-
  20773. high or active-low.
  20774.  
  20775. This bit is valid only in CHCR0 and CHCR1.
  20776.  
  20777. Bit 16: AL Description
  20778.  
  20779. 0 Active-high output (Initial value)
  20780.  
  20781. 1 Active-low output
  20782.  
  20783. 417
  20784.  
  20785. ----------------------- Page 434-----------------------
  20786.  
  20787. Bits 15 and 14—Destination Address Mode 1 and 0 (DM1, DM0): These bits
  20788. specify incrementing/decrementing of the DMA transfer destination address. The specification of
  20789. these bits is ignored when data is transferred from external memory to an external device in single
  20790. address mode. For channel 0, in DDT mode, the settings are fixed at DM1 = 0 and DM0 = 1.
  20791.  
  20792. Bit 15: DM1 Bit 14: DM0 Description
  20793.  
  20794. 0 0 Destination address fixed (Initial value)
  20795.  
  20796. 1 Destination address incremented (+1 in 8-bit transfer, +2 in 16-
  20797. bit transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in 32-
  20798. byte burst transfer)
  20799.  
  20800. 1 0 Destination address decremented (–1 in 8-bit transfer, –2 in 16-
  20801. bit transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in 32-
  20802. byte burst transfer)
  20803.  
  20804. 1 Setting prohibited
  20805.  
  20806. Bits 13 and 12—Source Address Mode 1 and 0 (SM1, SM0): These bits specify
  20807. incrementing/decrementing of the DMA transfer source address. The specification of these bits is
  20808. ignored when data is transferred from an external device to external memory in single address mode.
  20809. For channel 0, in DDT mode the settings are fixed at SM1 = 0 and SM0 = 1.
  20810.  
  20811. Bit 13: SM1 Bit 12: SM0 Description
  20812.  
  20813. 0 0 Source address fixed (Initial value)
  20814.  
  20815. 1 Source address incremented (+1 in 8-bit transfer, +2 in 16-bit
  20816. transfer, +4 in 32-bit transfer, +8 in 64-bit transfer, +32 in 32-
  20817. byte burst transfer)
  20818.  
  20819. 1 0 Source address decremented (–1 in 8-bit transfer, –2 in 16-bit
  20820. transfer, –4 in 32-bit transfer, –8 in 64-bit transfer, –32 in 32-
  20821. byte burst transfer)
  20822.  
  20823. 1 Setting prohibited
  20824.  
  20825. 418
  20826.  
  20827. ----------------------- Page 435-----------------------
  20828.  
  20829. Bits 11 to 8—Resource Select 3 to 0 (RS3–RS0): These bits specify the transfer
  20830. request source.
  20831.  
  20832. Bit 11: Bit 10: Bit 9: Bit 8:
  20833. RS3 RS2 RS1 RS0 Description
  20834.  
  20835. 1
  20836. 0 0 0 0 External request, dual address mode* (external address space
  20837. → external address space) (Initial value)
  20838.  
  20839. 1 Setting prohibited
  20840.  
  20841. 1 0 External request, single address mode
  20842.  
  20843. 1, 3, 4
  20844. External address space → external device* * *
  20845.  
  20846. 1 External request, single address mode
  20847.  
  20848. 1, 3, 4
  20849. External device → external address space* * *
  20850.  
  20851. 1 0 0 Auto-request (external address space → external address
  20852. space)*2
  20853.  
  20854. 1 Auto-request (external address space → on-chip peripheral
  20855. module)*2
  20856.  
  20857. 1 0 Auto-request (on-chip peripheral module → external address
  20858. space)*2
  20859.  
  20860. 1 Setting prohibited
  20861.  
  20862. 1 0 0 0 SCI transmit-data-empty interrupt transfer request
  20863. (external address space → SCTDR1)*2
  20864.  
  20865. 1 SCI receive-data-full interrupt transfer request
  20866. (SCRDR1 → external address space)*2
  20867.  
  20868. 1 0 SCIF transmit-data-empty interrupt transfer request
  20869. (external address space → SCFTDR2)*2
  20870.  
  20871. 1 SCIF receive-data-full interrupt transfer request
  20872. (SCFRDR2 → external address space)*2
  20873.  
  20874. 1 0 0 TMU channel 2 (input capture interrupt, external address space
  20875. → external address space)*2
  20876.  
  20877. 1 TMU channel 2 (input capture interrupt)
  20878. (external address space → on-chip peripheral module)*2
  20879.  
  20880. 1 0 TMU channel 2 (input capture interrupt)
  20881. (on-chip peripheral module → external address space)*2
  20882.  
  20883. 1 Setting prohibited
  20884.  
  20885. Notes: 1. External request specifications are valid only for channels 0 and 1. Requests are not
  20886. accepted for channels 2 and 3 in normal DMA mode.
  20887. 2. Dual address mode
  20888. 3. In DDT mode, selection is possible with the DTR format [60] (R/W bit) specification for
  20889. channel 0 only.
  20890. 4. In DDT mode, an external request specification should be made for channels 1, 2, and
  20891. 3. Only DTR format setting is possible for channel 0.
  20892.  
  20893. 419
  20894.  
  20895. ----------------------- Page 436-----------------------
  20896.  
  20897. Bit 7—Transmit Mode (TM): Specifies the bus mode for transfer.
  20898.  
  20899. Bit 7: TM Description
  20900.  
  20901. 0 Cycle steal mode (Initial value)
  20902.  
  20903. 1 Burst mode
  20904.  
  20905. Setting possible with DTR format [57:55] (MD bits)
  20906.  
  20907. Bits 6 to 4—Transmit Size 2 to 0 (TS2–TS0): These bits specify the transfer data size.
  20908.  
  20909. Bit 6: TS2 Bit 5: TS1 Bit 4: TS0 Description
  20910.  
  20911. 0 0 0 Quadword size (64-bit) specification(Initial value)
  20912.  
  20913. 1 Byte size (8-bit) specification
  20914.  
  20915. 1 0 Word size (16-bit) specification
  20916.  
  20917. 1 Longword size (32-bit) specification
  20918.  
  20919. 1 0 0 32-byte block transfer specification
  20920.  
  20921. Setting possible with DTR format [63:61] (SZ bits)
  20922.  
  20923. Bit 3—Reserved: This bit is always read as 0, and should only be written with 0.
  20924.  
  20925. Bit 2—Interrupt Enable (IE): When this bit is set to 1, an interrupt request (DMTE) is
  20926. generated after the number of data transfers specified in DMATCR (when TE = 1).
  20927.  
  20928. Bit 2: IE Description
  20929.  
  20930. 0 Interrupt request not generated after number of transfers specified in
  20931. DMATCR (Initial value) (CHCR0 only fixed in DDT mode)
  20932.  
  20933. 1 Interrupt request generated after number of transfers specified in DMATCR
  20934.  
  20935. 420
  20936.  
  20937. ----------------------- Page 437-----------------------
  20938.  
  20939. Bit 1—Transfer End (TE): This bit is set to 1 after the number of transfers specified in
  20940. DMATCR. If the IE bit is set to 1 at this time, an interrupt request (DMTE) is generated.
  20941.  
  20942. If data transfer ends before TE is set to 1 (for example, due to an NMI interrupt, address error, or
  20943. clearing of the DE bit or the DME bit in DMAOR), the TE bit is not set to 1. When this bit is 1,
  20944. the transfer enabled state is not entered even if the DE bit is set to 1.
  20945.  
  20946. Bit 1: TE Description
  20947.  
  20948. 0 Number of transfers specified in DMATCR not completed (Initial value)
  20949.  
  20950. [Clearing conditions]
  20951.  
  20952. 〈 When 0 is written to TE after reading TE = 1
  20953.  
  20954. 〈 In a power-on or manual reset, and in standby mode
  20955.  
  20956. 1 Number of transfers specified in DMATCR completed
  20957.  
  20958. Bit 0—DMAC Enable (DE): Enables operation of the corresponding channel.
  20959.  
  20960. Bit 0: DE Description
  20961.  
  20962. 0 Operation of corresponding channel is disabled (Initial value)
  20963.  
  20964. 1 Operation of corresponding channel is enabled
  20965.  
  20966. When auto-request is specified (with RS3–RS0), transfer is begun when this bit is set to 1. In the
  20967. case of an external request or on-chip peripheral module request, transfer is begun when a transfer
  20968. request is issued after this bit is set to 1. Transfer can be suspended midway by clearing this bit to
  20969. 0.
  20970.  
  20971. Even if the DE bit has been set, transfer is not enabled when TE is 1, when DME in DMAOR is
  20972. 0, or when the NMIF or AE bit in DMAOR is 1.
  20973.  
  20974. For channel 0, in DDT mode this bit is set to 1 when a DTR format is received. DE remains set to
  20975. 1 even if TE is set to 1. When the mode is switched from DDT mode to normal DMA mode (DDT
  20976. bit = 0 in DMAOR), the DE bit must be cleared to 0.
  20977.  
  20978. 421
  20979.  
  20980. ----------------------- Page 438-----------------------
  20981.  
  20982. 1 4 . 2 . 5 DMA Operation Register (DMAOR)
  20983.  
  20984. Bit: 31 30 29 28 27 26 25 24
  20985.  
  20986. — — — — — — — —
  20987.  
  20988. Initial value: 0 0 0 0 0 0 0 0
  20989.  
  20990. R/W: R R R R R R R R
  20991.  
  20992. Bit: 23 22 21 20 19 18 17 16
  20993.  
  20994. — — — — — — — —
  20995.  
  20996. Initial value: 0 0 0 0 0 0 0 0
  20997.  
  20998. R/W: R R R R R R R R
  20999.  
  21000. Bit: 15 14 13 12 11 10 9 8
  21001.  
  21002. DDT — — — — — PR1 PR0
  21003.  
  21004. Initial value: 0 0 0 0 0 0 0 0
  21005.  
  21006. R/W: R/W R R R R R R/W R/W
  21007.  
  21008. Bit: 7 6 5 4 3 2 1 0
  21009.  
  21010. — — — — — AE NMIF DME
  21011.  
  21012. Initial value: 0 0 0 0 0 0 0 0
  21013.  
  21014. R/W: R R R R R R/(W) R/(W) R/W
  21015.  
  21016. Note: The AE and NMIF bits can only be written with 0 after being read as 1, to clear the
  21017. flags.
  21018.  
  21019. DMAOR is a 32-bit readable/writable register that specifies the DMAC transfer mode.
  21020.  
  21021. DMAOR is initialized to H'00000000 by a power-on or manual reset. They retain their values in
  21022. standby mode and deep sleep mode.
  21023.  
  21024. Bits 31 to 16—Reserved: These bits are always read as 0, and should only be written with 0.
  21025.  
  21026. Bit 15—On-Demand Data Transfer (DDT): Specifies on-demand data transfer mode. When
  21027. the DDT bit is set to 1, CPU writes to SAR0, DAR0, DMATCR0, and CHCR0 are masked.
  21028.  
  21029. Bit 15: DDT Description
  21030.  
  21031. 0 Normal DMA mode (Initial value)
  21032.  
  21033. 1 On-demand data transfer mode
  21034.  
  21035. Note: BAVL (DRAK0) is an active-high output in normal DMA mode. When the DDT bit is
  21036. set to 1, the BAVL pin function is enabled and this pin becomes an active-low output.
  21037.  
  21038. 422
  21039.  
  21040. ----------------------- Page 439-----------------------
  21041.  
  21042. Bits 14 to 10—Reserved: These bits are always read as 0, and should only be written with 0.
  21043.  
  21044. Bits 9 and 8—Priority Mode 1 and 0 (PR1, PR0): These bits determine the order of
  21045. priority for channel execution when transfer requests are made for a number of channels
  21046. simultaneously.
  21047.  
  21048. Bit 9: PR1 Bit 8: PR0 Description
  21049.  
  21050. 0 0 CH0 > CH1 > CH2 > CH3 (Initial value)
  21051.  
  21052. 1 CH0 > CH2 > CH3 > CH1
  21053.  
  21054. 1 0 CH2 > CH0 > CH1 > CH3
  21055.  
  21056. 1 Round robin mode
  21057.  
  21058. Bits 7 to 3—Reserved: These bits are always read as 0, and should only be written with 0.
  21059.  
  21060. Bit 2—Address Error Flag (AE): Indicates that an address error has occurred during DMA
  21061. transfer. If this bit is set during data transfer, transfers on all channels are suspended, and an
  21062. interrupt request (DMAE) is generated. The CPU cannot write 1 to AE. This bit can only be
  21063. cleared by writing 0 after reading 1.
  21064.  
  21065. Bit 2: AE Description
  21066.  
  21067. 0 No address error, DMA transfer enabled (Initial value)
  21068.  
  21069. [Clearing condition]
  21070. When 0 is written to AE after reading AE = 1
  21071.  
  21072. 1 Address error, DMA transfer disabled
  21073.  
  21074. [Setting condition]
  21075. When an address error is caused by the DMAC
  21076.  
  21077. Bit 1—NMI Flag (NMIF): Indicates that NMI has been input. This bit is set regardless of
  21078. whether or not the DMAC is operating. If this bit is set during data transfer, transfers on all
  21079. channels are suspended. The CPU cannot write 1 to NMIF. This bit can only be cleared by writing
  21080. 0 after reading 1.
  21081.  
  21082. Bit 1: NMIF Description
  21083.  
  21084. 0 No NMI input, DMA transfer enabled (Initial value)
  21085.  
  21086. [Clearing condition]
  21087. When 0 is written to NMIF after reading NMIF = 1
  21088.  
  21089. 1 NMI input, DMA transfer disabled
  21090.  
  21091. [Setting condition]
  21092. When an NMI interrupt is generated
  21093.  
  21094. 423
  21095.  
  21096. ----------------------- Page 440-----------------------
  21097.  
  21098. Bit 0—DMAC Master Enable (DME): Enables activation of the entire DMAC. When the
  21099. DME bit and the DE bit of the CHCR register for the corresponding channel are set to 1, that
  21100. channel is enabled for transfer. If this bit is cleared during data transfer, transfers on all channels are
  21101. suspended.
  21102.  
  21103. Even if the DME bit has been set, transfer is not enabled when TE is 1 or DE is 0 in CHCR, or
  21104. when the NMI or AE bit in DMAOR is 1.
  21105.  
  21106. Bit 0: DME Description
  21107.  
  21108. 0 Operation disabled on all channels (Initial value)
  21109.  
  21110. 1 Operation enabled on all channels
  21111.  
  21112. 1 4 . 3 Operation
  21113.  
  21114. When a DMA transfer request is issued, the DMAC starts the transfer according to the
  21115. predetermined channel priority order. It ends the transfer when the transfer end conditions are
  21116. satisfied. Transfers can be requested in three modes: auto-request, external request, and on-chip
  21117. peripheral module request. There are two modes for DMA transfer: single address mode and dual
  21118. address mode. Either burst mode or cycle steal mode can be selected as the bus mode.
  21119.  
  21120. 1 4 . 3 . 1 DMA Transfer Procedure
  21121.  
  21122. After the desired transfer conditions have been set in the DMA source address register (SAR), DMA
  21123. destination address register (DAR), DMA transfer count register (DMATCR), DMA channel
  21124. control register (CHCR), and DMA operation register (DMAOR), the DMAC transfers data
  21125. according to the following procedure:
  21126.  
  21127. 1. The DMAC checks to see if transfer is enabled (DE = 1, DME = 1, TE = 0, NMIF = 0, AE =
  21128. 0).
  21129.  
  21130. 2. When a transfer request is issued and transfer has been enabled, the DMAC transfers one transfer
  21131. unit of data (determined by the setting of TS2–TS0). In auto-request mode, the transfer begins
  21132. automatically when the DE bit and DME bit are set to 1. The DMATCR value is decremented
  21133. by 1 for each transfer. The actual transfer flow depends on the address mode and bus mode.
  21134.  
  21135. 3. When the specified number of transfers have been completed (when the DMATCR value
  21136. reaches 0), the transfer ends normally. If the IE bit in CHCR is set to 1 at this time, a DMTE
  21137. interrupt request is sent to the CPU.
  21138.  
  21139. 4. If a DMAC address error or NMI interrupt occurs, the transfer is suspended. Transfer is also
  21140. suspended when the DE bit in CHCR or the DME bit in DMAOR is cleared to 0. In the event
  21141. of an address error, a DMAE interrupt request is forcibly sent to the CPU.
  21142.  
  21143. Figure 14.2 shows a flowchart of this procedure.
  21144.  
  21145. 424
  21146.  
  21147. ----------------------- Page 441-----------------------
  21148.  
  21149. Start
  21150.  
  21151. Initial settings
  21152. (SAR, DAR, DMATCR,
  21153. CHCR, DMAOR)
  21154.  
  21155. No
  21156. DE, DME = 1?
  21157.  
  21158. Yes
  21159. Illegal address check *4
  21160. (reflected in AE bit)
  21161.  
  21162. No
  21163. NMIF, AE, TE = 0?
  21164.  
  21165. Yes
  21166. *2
  21167.  
  21168. Transfer No
  21169. request issued?
  21170. *1 Bus mode,
  21171. *3
  21172. Yes transfer request mode,
  21173. DREQ detection
  21174. method
  21175. Transfer (1 transfer unit)
  21176. DMATCR - 1 → DMATCR
  21177. Update SAR, DAR
  21178.  
  21179. No No NMIF or No
  21180. DMATCR = 0? AE = 1 or DE = 0 or
  21181.  
  21182. DME = 0?
  21183. Yes
  21184. Yes
  21185. DMTE interrupt request
  21186. Transfer suspended
  21187. (when IE = 1)
  21188.  
  21189. NMIF or
  21190. No
  21191. AE = 1 or DE = 0 or
  21192. DME = 0?
  21193.  
  21194. Yes
  21195.  
  21196. End of transfer Normal end
  21197.  
  21198. Notes: 1. In auto-request mode, transfer begins when the NMIF, AE, and TE bits are all 0, and the DE
  21199. and DME bits are set to 1.
  21200. 2. DREQ level detection (external request) in burst mode, or cycle steal mode.
  21201. 3. DREQ edge detection (external request) in burst mode, or auto-request mode in burst mode.
  21202. 4. An illegal address is detected by comparing bits TS2–TS0 in CHCRn with SARn and DARn.
  21203.  
  21204. Figure 14.2 DMAC Transfer Flowchart
  21205.  
  21206. 425
  21207.  
  21208. ----------------------- Page 442-----------------------
  21209.  
  21210. 1 4 . 3 . 2 DMA Transfer Requests
  21211.  
  21212. DMA transfer requests are basically generated at either the data transfer source or destination, but
  21213. they can also be issued by external devices or on-chip peripheral modules that are neither the source
  21214. nor the destination.
  21215.  
  21216. Transfers can be requested in three modes: auto-request, external request, and on-chip peripheral
  21217. module request. The transfer request mode is selected by means of bits RS3–RS0 in DMA channel
  21218. control registers 0–3 (CHCR0–CHCR3).
  21219.  
  21220. Auto Request Mode: When there is no transfer request signal from an external source, as in a
  21221. memory-to-memory transfer or a transfer between memory and an on-chip peripheral module
  21222. unable to request a transfer, the auto-request mode allows the DMAC to automatically generate a
  21223. transfer request signal internally. When the DE bit in CHCR0–CHCR3 and the DME bit in the
  21224. DMA operation register (DMAOR) are set to 1, the transfer begins (so long as the TE bit in
  21225. CHCR0–CHCR3 and the NMIF and AE bits in DMAOR are all 0).
  21226.  
  21227. External Request Mode: In this mode a transfer is performed in response to a transfer request
  21228. signal (DREQ) from an external device. One of the modes shown in table 14.4 should be chosen
  21229. according to the application system. If DMA transfer is enabled (DE = 1, DME = 1, TE = 0,
  21230. NMIF = 0, AE = 0), transfer starts when DREQ is input. The DS bit in CHCR0/CHCR1 is used
  21231. to select either falling edge detection or low level detection for theDREQ signal (level detection
  21232. when DS = 0, edge detection when DS = 1).
  21233.  
  21234. The source of the transfer request does not have to be the data transfer source or destination.
  21235.  
  21236. Table 14.4 Selecting External Request Mode with RS Bits
  21237.  
  21238. RS3 RS2 RS1 RS0 Address Mode Transfer Source Transfer
  21239. Destination
  21240.  
  21241. 0 0 0 0 Dual address External memory External memory
  21242. mode or memory-mapped or memory-mapped
  21243. external device external device
  21244.  
  21245. 1 0 Single address External memory External device
  21246. mode or memory-mapped with DACK
  21247. external device
  21248.  
  21249. 1 Single address External device with External memory
  21250. mode DACK or memory-mapped
  21251. external device
  21252.  
  21253. On-Chip Peripheral Module Request Mode: In this mode a transfer is performed in
  21254. response to a transfer request signal (interrupt request signal) from an on-chip peripheral module.
  21255. As shown in table 14.5, there are seven transfer request signals: input capture interrupts from the
  21256. timer unit (TMU), and receive-data-full interrupts (RXI) and transmit-data-empty interrupts (TXI)
  21257.  
  21258. 426
  21259.  
  21260. ----------------------- Page 443-----------------------
  21261.  
  21262. from the two serial communication interfaces (SCI, SCIF). If DMA transfer is enabled (DE = 1,
  21263. DME = 1, TE = 0, NMIF = 0, AE = 0), transfer starts when a transfer request signal is input.
  21264.  
  21265. The source of the transfer request does not have to be the data transfer source or destination.
  21266. However, when the transfer request is set to RXI (transfer request by SCI/SCIF receive-data-full
  21267. interrupt), the transfer source must be the SCI/SCIF’s receive data register (SCRDR1/SCFRDR2).
  21268. When the transfer request is set to TXI (transfer request by SCI/SCIF transmit-data-empty
  21269. interrupt), the transfer destination must be the SCI/SCIF’s transmit data register
  21270. (SCTDR1/SCFTDR2).
  21271.  
  21272. Table 14.5 Selecting On-Chip Peripheral Module Request Mode with RS Bits
  21273.  
  21274. DMAC Transfer DMAC Transfer Transfer Transfer
  21275. RS3 RS2 RS1 RS0 Request Request Signal Source Destinatio Bus
  21276. Source n Mode
  21277.  
  21278. 1 0 0 0 SCI transmitter SCTDR1 (SCI External* SCTDR1 Cycle steal
  21279. transmit-data- mode
  21280. empty transfer
  21281. request)
  21282.  
  21283. 1 SCI receiver SCRDR1 (SCI SCRDR1 External* Cycle steal
  21284. receive-data-full mode
  21285. transfer request)
  21286.  
  21287. 1 0 SCIF transmitter SCFTDR2 (SCIF External* SCFTDR2 Cycle steal
  21288. transmit-data- mode
  21289. empty transfer
  21290. request)
  21291.  
  21292. 1 SCIF receiver SCFRDR2 (SCIF SCFRDR2 External* Cycle steal
  21293. receive-data-full mode
  21294. transfer request)
  21295.  
  21296. 1 0 0 TMU channel 2 Input capture External* External* Burst/cycl
  21297. occurrence e steal
  21298. mode
  21299.  
  21300. 1 TMU channel 2 Input capture External* On-chip Burst/cycl
  21301. occurrence peripheral e steal
  21302. mode
  21303.  
  21304. 1 0 TMU channel 2 Input capture On-chip External* Burst/cycl
  21305. occurrence peripheral e steal
  21306. mode
  21307.  
  21308. TMU: Timer unit
  21309. SCI: Serial communication interface
  21310. SCIF: Serial communication interface with FIFO
  21311. Note: * External memory or memory-mapped external device
  21312. Note: SCI/SCIF burst transfer setting is prohibited.
  21313.  
  21314. 427
  21315.  
  21316. ----------------------- Page 444-----------------------
  21317.  
  21318. To output a transfer request from an on-chip peripheral module, set the DMA transfer request
  21319. enable bit for that module and output a transfer request signal.
  21320.  
  21321. For details, see sections 12, Timer Unit (TMU), 15, Serial Communication Interface (SCI), and
  21322. 16, Serial Communication Interface with FIFO (SCIF).
  21323.  
  21324. When a DMA transfer corresponding to a transfer request signal from an on-chip peripheral module
  21325. shown in table 14.5 is carried out, the signal is discontinued automatically. This occurs every
  21326. transfer in cycle steal mode, and in the last transfer in burst mode.
  21327.  
  21328. 1 4 . 3 . 3 Channel Priorities
  21329.  
  21330. If the DMAC receives simultaneous transfer requests on two or more channels, it selects a channel
  21331. according to a predetermined priority system, either in a fixed mode or round robin mode. The
  21332. mode is selected with priority bits PR1 and PR0 in the DMA operation register (DMAOR).
  21333.  
  21334. Fixed Mode: In this mode, the relative channel priorities remain fixed. The following priority
  21335. orders are available in fixed mode:
  21336.  
  21337. • CH0 > CH1 > CH2 > CH3
  21338.  
  21339. • CH0 > CH2 > CH3 > CH1
  21340.  
  21341. • CH2 > CH0 > CH1 > CH3
  21342.  
  21343. The priority order is selected with bits PR1 and PR0 in DMAOR.
  21344.  
  21345. Round Robin Mode: In round robin mode, each time the transfer of one transfer unit (byte,
  21346. word, longword, quadword, or 32 bytes) ends on a given channel, that channel is assigned the
  21347. lowest priority level. This is illustrated in figure 14.3. The order of priority in round robin mode
  21348. immediately after a reset is CH0 > CH1 > CH2 > CH3.
  21349.  
  21350. Note: In round robin mode, if no transfer request is accepted for any channel during DMA
  21351. transfer, the priority order becomes CH0 > CH1 > CH2 > CH3.
  21352.  
  21353. 428
  21354.  
  21355. ----------------------- Page 445-----------------------
  21356.  
  21357. Transfer on channel 0
  21358.  
  21359. Initial priority order CH0 > CH1 > CH2 > CH3 Channel 0 is given the lowest
  21360. priority.
  21361.  
  21362. Priority order after transfer CH1 > CH2 > CH3 > CH0
  21363.  
  21364. Transfer on channel 1
  21365.  
  21366. Initial priority order CH0 > CH1 > CH2 > CH3 When channel 1 is given the
  21367. lowest priority, the priority of
  21368. channel 0, which was higher
  21369. than channel 1, is also
  21370. Priority order after transfer CH2 > CH3 > CH0 > CH1 shifted simultaneously.
  21371.  
  21372. Transfer on channel 2
  21373. When channel 2 is given the
  21374. Initial priority order CH0 > CH1 > CH2 > CH3 lowest priority, the priorities of
  21375.  
  21376. channels 0 and 1, which were
  21377. higher than channel 2, are
  21378. also shifted simultaneously. If
  21379. there is a transfer request for
  21380. channel 1 only immediately
  21381. Priority order after transfer CH3 > CH0 > CH1 > CH2
  21382. afterward, channel 1 is given
  21383. the lowest priority and the
  21384. priorities of channels 3 and 0
  21385. are simultaneously shifted
  21386. down.
  21387. Priority after transfer due to
  21388. issuance of a transfer request CH2 > CH3 > CH0 > CH1
  21389. for channel 1 only.
  21390.  
  21391. Transfer on channel 3
  21392.  
  21393. Initial priority order CH0 > CH1 > CH2 > CH3 No change in priority order
  21394.  
  21395. Priority order after transfer CH0 > CH1 > CH2 > CH3
  21396.  
  21397. Figure 14.3 Round Robin Mode
  21398.  
  21399. Figure 14.4 shows the changes in priority levels when transfer requests are issued simultaneously
  21400. for channels 0 and 3, and channel 1 receives a transfer request during a transfer on channel 0. The
  21401. operation of the DMAC in this case is as follows.
  21402.  
  21403. 1. Transfer requests are issued simultaneously for channels 0 and 3.
  21404.  
  21405. 2. Since channel 0 has a higher priority level than channel 3, the channel 0 transfer is executed
  21406. first (channel 3 is on transfer standby).
  21407.  
  21408. 429
  21409.  
  21410. ----------------------- Page 446-----------------------
  21411.  
  21412. 3. A transfer request is issued for channel 1 during the channel 0 transfer (channels 1 and 3 are on
  21413. transfer standby).
  21414.  
  21415. 4. At the end of the channel 0 transfer, channel 0 shifts to the lowest priority level.
  21416.  
  21417. 5. At this point, channel 1 has a higher priority level than channel 3, so the channel 1 transfer is
  21418. started (channel 3 is on transfer standby).
  21419.  
  21420. 6. At the end of the channel 1 transfer, channel 1 shifts to the lowest priority level.
  21421.  
  21422. 7. The channel 3 transfer is started.
  21423.  
  21424. 8. At the end of the channel 3 transfer, the channel 3 and channel 2 priority levels are lowered,
  21425. giving channel 3 the lowest priority.
  21426.  
  21427. Transfer request Channel DMAC operation Channel priority
  21428. waiting order
  21429. 1. Issued for channels 0
  21430. and 3
  21431. 2. Start of channel 0 0 > 1 > 2 > 3
  21432. transfer
  21433. 3. Issued for channel 1 3
  21434.  
  21435. Change of
  21436. priority order
  21437. 4. End of channel 0 1 > 2 > 3 > 0
  21438. 1, 3
  21439. transfer
  21440.  
  21441. 5. Start of channel 1
  21442. transfer
  21443.  
  21444. Change of
  21445. priority order
  21446. 3 6. End of channel 1 2 > 3 > 0 > 1
  21447. transfer
  21448.  
  21449. 7. Start of channel 3
  21450. transfer
  21451.  
  21452. None
  21453. Change of
  21454. priority order
  21455. 8. End of channel 3 0 > 1 > 2 > 3
  21456. transfer
  21457.  
  21458. Figure 14.4 Example of Changes in Priority Order in Round Robin Mode
  21459.  
  21460. 430
  21461.  
  21462. ----------------------- Page 447-----------------------
  21463.  
  21464. 1 4 . 3 . 4 Types of DMA Transfer
  21465.  
  21466. The DMAC supports the transfers shown in table 14.6. It can operate in single address mode, in
  21467. which either the transfer source or the transfer destination is accessed using the acknowledge signal,
  21468. or in dual address mode, in which both the transfer source and transfer destination addresses are
  21469. output. The actual transfer operation timing depends on the bus mode, which can be either burst
  21470. mode or cycle steal mode.
  21471.  
  21472. Table 14.6 Supported DMA Transfers
  21473.  
  21474. Transfer Destination
  21475.  
  21476. External External Memory- On-Chip
  21477. Transfer Source Device with Memory Mapped Peripheral
  21478. DACK External Module
  21479. Device
  21480.  
  21481. External device Not available Single address Single address Not available
  21482. with DACK mode mode
  21483.  
  21484. External memory Single address Dual address Dual address mode Dual address mode
  21485. mode mode
  21486.  
  21487. Memory-mapped Single address Dual address Dual address mode Dual address mode
  21488. external device mode mode
  21489.  
  21490. On-chip peripheral Not available Dual address Dual address mode Not available
  21491. module mode
  21492.  
  21493. 431
  21494.  
  21495. ----------------------- Page 448-----------------------
  21496.  
  21497. Address Modes
  21498.  
  21499. Single Address Mode: In single address mode, both the transfer source and the transfer
  21500. destination are external; one is accessed by the DACK signal and the other by an address. In this
  21501. mode, the DMAC performs a DMA transfer in one bus cycle by simultaneously outputting the
  21502. external device strobe signal (DACK) to either the transfer source or transfer destination external
  21503. device to access it, while outputting an address to the other side of the transfer. Figure 14.5 shows
  21504. an example of a transfer between external memory and an external device with DACK in which the
  21505. external device outputs data to the data bus and that data is written to external memory in the same
  21506. bus cycle.
  21507.  
  21508. External External
  21509. address data bus
  21510. bus
  21511. SH7750
  21512. External
  21513. DMAC memory
  21514.  
  21515. External device
  21516. with DACK
  21517.  
  21518. DACK
  21519.  
  21520. DREQ
  21521.  
  21522. : Data flow
  21523.  
  21524. Figure 14.5 Data Flow in Single Address Mode
  21525.  
  21526. Two types of transfer are possible in single address mode: (1) transfer between an external device
  21527. with DACK and a memory-mapped external device, and (2) transfer between an external device with
  21528. DACK and external memory. Only the external request signal (DREQ) is used in both these cases.
  21529.  
  21530. Figure 14.6 shows the transfer timing for single address mode.
  21531.  
  21532. The access timing depends on the type of external memory. For details, see the descriptions of the
  21533. memory interfaces in section 13, Bus State Controller (BSC).
  21534.  
  21535. 432
  21536.  
  21537. ----------------------- Page 449-----------------------
  21538.  
  21539. CKIO
  21540.  
  21541. A28–A0 Address output to external memory
  21542. space
  21543.  
  21544. CSn
  21545.  
  21546. D63–D0 Data output from external device
  21547. with DACK
  21548.  
  21549. DACK DACK signal to external
  21550. device with DACK
  21551.  
  21552. WE WE signal to external memory space
  21553.  
  21554. (a) From external device with DACK to external memory space
  21555.  
  21556. CKIO
  21557.  
  21558. A28–A0 Address output to external memory
  21559. space
  21560.  
  21561. CSn
  21562.  
  21563. D63–D0 Data output from external memory
  21564. space
  21565.  
  21566. RD RD signal to external memory space
  21567.  
  21568. DACK DACK signal to external
  21569. device with DACK
  21570.  
  21571. (b) From external memory space to external device with DACK
  21572.  
  21573. Figure 14.6 DMA Transfer Timing in Single Address Mode
  21574.  
  21575. 433
  21576.  
  21577. ----------------------- Page 450-----------------------
  21578.  
  21579. Dual Address Mode: Dual address mode is used to access both the transfer source and the
  21580. transfer destination by address. The transfer source and destination can be accessed by either on-chip
  21581. peripheral module or external address.
  21582.  
  21583. In dual address mode, data is read from the transfer source in the data read cycle, and written to the
  21584. transfer destination in the data write cycle, so that the transfer is executed in two bus cycles. The
  21585. transfer data is temporarily stored in the data buffer in the bus state controller (BSC).
  21586.  
  21587. In a transfer between external memories such as that shown in figure 14.7, data is read from
  21588. external memory into the BSC’s data buffer in the read cycle, then written to the other external
  21589. memory in the write cycle. Figure 14.8 shows the timing for this operation.
  21590.  
  21591. SAR Memory
  21592. DMAC s
  21593. u
  21594. b s
  21595. DAR s u
  21596. b
  21597. s Transfer source
  21598. e a
  21599. t
  21600. r a module
  21601. d
  21602. d D
  21603. A
  21604.  
  21605. Transfer destination
  21606. BSC Data buffer
  21607. module
  21608.  
  21609. Taking the SAR value as the address, data is read from the transfer source module
  21610. and stored temporarily in the data buffer in the bus state controller (BSC).
  21611.  
  21612. 1st bus cycle
  21613.  
  21614. SAR Memory
  21615. DMAC
  21616. s
  21617. u
  21618. DAR b s
  21619. u
  21620. s b Transfer source
  21621. s
  21622. e a
  21623. r t module
  21624. d a
  21625. d D
  21626. A
  21627. Transfer destination
  21628. BSC Data buffer
  21629. module
  21630.  
  21631. Taking the DAR value as the address, the data stored in the BSC’s data buffer is
  21632. written to the transfer destination module.
  21633.  
  21634. 2nd bus cycle
  21635.  
  21636. Figure 14.7 Operation in Dual Address Mode
  21637.  
  21638. 434
  21639.  
  21640. ----------------------- Page 451-----------------------
  21641.  
  21642. CKIO
  21643.  
  21644. A28–A0 Transfer source Transfer destination
  21645. address address
  21646.  
  21647. CSn
  21648.  
  21649. D63–D0
  21650.  
  21651. RD
  21652.  
  21653. WE
  21654.  
  21655. DACK
  21656.  
  21657. Data read cycle Data write cycle
  21658. (1st cycle) (2nd cycle)
  21659.  
  21660. Transfer from external memory space to external memory space
  21661.  
  21662.  
  21663. Figure 14.8 Example of Transfer Timing in Dual Address Mode
  21664.  
  21665. Bus Modes
  21666.  
  21667. There are two bus modes, cycle steal mode and burst mode, selected with the TM bit in CHCR0–
  21668. CHCR3.
  21669.  
  21670. Cycle Steal Mode: In cycle steal mode, the DMAC releases the bus to the CPU at the end of
  21671. each transfer-unit (8-bit, 16-bit, 32-bit, 64-bit, or 32-byte) transfer. When the next transfer request
  21672. is issued, the DMAC reacquires the bus from the CPU and carries out another transfer-unit transfer.
  21673. At the end of this transfer, the bus is again given to the CPU. This is repeated until the transfer
  21674. end condition is satisfied.
  21675.  
  21676. Cycle steal mode can be used with all categories of transfer request source, transfer source, and
  21677. transfer destination.
  21678.  
  21679. Figure 14.9 shows an example of DMA transfer timing in cycle steal mode. The transfer
  21680. conditions in this example are dual address mode and DREQ level detection.
  21681.  
  21682. 435
  21683.  
  21684. ----------------------- Page 452-----------------------
  21685.  
  21686. DREQ
  21687.  
  21688. Bus returned to CPU
  21689.  
  21690. Bus cycle CPU CPU CPU DMAC DMAC CPU DMAC DMAC CPU CPU
  21691.  
  21692. Read, write Read, write
  21693.  
  21694. Figure 14.9 Example of DMA Transfer in Cycle Steal Mode
  21695.  
  21696. Burst Mode: In burst mode, once the DMAC has acquired the bus it holds the bus and transfers
  21697. data continuously until the transfer end condition is satisfied. With DREQ low level detection in
  21698. external request mode, however, when DREQ is driven high the bus passes to another bus master
  21699. after the end of the DMAC transfer request that has already been accepted, even if the transfer end
  21700. condition has not been satisfied.
  21701.  
  21702. Figure 14.10 shows an example of DMA transfer timing in burst mode. The transfer conditions in
  21703. this example are single address mode and DREQ level detection.
  21704.  
  21705. DREQ
  21706.  
  21707. Bus cycle CPU CPU CPU DMAC DMAC DMAC DMAC DMAC DMAC CPU
  21708.  
  21709. Figure 14.10 Example of DMA Transfer in Burst Mode
  21710.  
  21711. Note: Burst mode can be set regardless of the data size. A 32-byte block transfer burst mode
  21712. setting can also be made.
  21713.  
  21714. 436
  21715.  
  21716. ----------------------- Page 453-----------------------
  21717.  
  21718. Relationship between DMA Transfer Type, Request Mode, and Bus Mode
  21719.  
  21720. Table 14.7 shows the relationship between the type of DMA transfer, the request mode, and the
  21721. bus mode.
  21722.  
  21723. Table 14.7Relationship between DMA Transfer Type, Request Mode, and Bus
  21724. Mode
  21725.  
  21726. Address Request Bus Transfer Usable
  21727. Mode Type of Transfer Mode Mode Size (Bits) Channels
  21728. Single External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  21729.  
  21730. and external memory B
  21731. External device with DACK External B/C 8/16/32/64/32 0, 1 (2, 3)*6
  21732.  
  21733. and memory-mapped external B
  21734. device
  21735.  
  21736. 1 5, 6
  21737. Dual External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  21738. external memory B
  21739.  
  21740. 1 5, 6
  21741. External memory and Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  21742. memory-mapped external B
  21743. device
  21744.  
  21745. 1 5, 6
  21746. Memory-mapped external Any* B/C 8/16/32/64/32 0, 1, 2, 3* *
  21747. device and memory-mapped B
  21748. external device
  21749.  
  21750. 2 3 4 5, 6
  21751. External memory and Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  21752. on-chip peripheral module
  21753.  
  21754. 2 3 4 5, 6
  21755. Memory-mapped external Any* B/C* 8/16/32/64* 0, 1, 2, 3* *
  21756. device and on-chip
  21757. peripheral module
  21758.  
  21759. 32B: 32-byte burst transfer
  21760. B: Burst
  21761. C: Cycle steal
  21762. Notes: 1. External request, auto-request, or on-chip peripheral module request (TMU input
  21763. capture interrupt request) possible. In the case of an on-chip peripheral module
  21764. request, it is not possible to specify external memory data transfer with the SCI (SCIF)
  21765. as the transfer request source.
  21766. 2. External request, auto-request, or on-chip peripheral module request possible. If the
  21767. transfer request source is the SCI (SCIF), either the transfer source must be SCRDR1
  21768. (SCFRDR2) or the transfer destination must be SCTDR1 (SCFTDR2).
  21769. 3. When the transfer request source is the SCI (SCIF), only cycle steal mode can be used.
  21770. 4. Access size permitted for the on-chip peripheral module register that is the transfer
  21771. source or transfer destination.
  21772. 5. When the transfer request is an external request, only channels 0 and 1 can be used.
  21773. 6. In DDT mode, transfer requests can be accepted for all channels from external devices
  21774. capable of DTR format output.
  21775.  
  21776. 437
  21777.  
  21778. ----------------------- Page 454-----------------------
  21779.  
  21780. Bus Mode and Channel Priority Order
  21781.  
  21782. When, for example, channel 1 is transferring data in burst mode, and a transfer request is issued to
  21783. channel 0, which has a higher priority, the channel 0 transfer is started immediately.
  21784.  
  21785. If fixed mode has been set for the priority levels (CH0 > CH1), transfer on channel 1 is continued
  21786. after transfer on channel 0 is completely finished, whether cycle steal mode or burst mode is set for
  21787. channel 0.
  21788.  
  21789. If round robin mode has been set for the priority levels, transfer on channel 1 is restarted after one
  21790. transfer unit of data is transferred on channel 0, whether cycle steal mode or burst mode is set for
  21791. channel 0. Channel execution alternates in the order: channel 1 → channel 0 → channel 1 →
  21792. channel 0.
  21793.  
  21794. An example of round robin mode operation is shown in figure 14.11.
  21795.  
  21796. Since channel 1 is in burst mode (in the case of edge sensing) regardless of whether fixed mode or
  21797. round robin mode is set for the priority order, the bus is not released to the CPU until channel 1
  21798. transfer ends.
  21799.  
  21800. CPU DMAC CH1 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH0 DMAC CH1 DMAC CH1 CPU
  21801.  
  21802. CH0 CH1 CH0
  21803.  
  21804. CPU DMAC channel 1 DMAC channel 0 and DMAC channel 1 CPU
  21805. burst mode channel 1 round robin burst mode
  21806. mode
  21807.  
  21808. Priority system: Round robin mode
  21809. Channel 0: Cycle steal mode
  21810. Channel 1: Burst mode (edge-sensing)
  21811.  
  21812. Figure 14.11 Bus Handling with Two DMAC Channels Operating
  21813.  
  21814. Note: When channel 1 is in level-sensing burst mode with the settings shown in figure 14.11,
  21815. the bus is passed to the CPU during a break in requests.
  21816.  
  21817. 438
  21818.  
  21819. ----------------------- Page 455-----------------------
  21820.  
  21821. 1 4 . 3 . 5 Number of Bus Cycle States and D R E Q Pin Sampling Timing
  21822.  
  21823. Number of States in Bus Cycle: The number of states in the bus cycle when the DMAC is
  21824. the bus master is controlled by the bus state controller (BSC) just as it is when the CPU is the
  21825. bus master. See section 13, Bus State Controller (BSC), for details.
  21826.  
  21827. DREQ Pin Sampling Timing: In external request mode, the DREQ pin is sampled at the
  21828. rising edge of CKIO clock pulses. When DREQ input is detected, a DMAC bus cycle is generated
  21829. and DMA transfer executed after four CKIO cycles at the earliest.
  21830.  
  21831. The second and subsequent DREQ sampling operations are performed one cycle after the start of
  21832. the first DMAC transfer bus cycle (in the case of single address mode).
  21833.  
  21834. DRAK is output for one cycle only, once each time DREQ is detected, regardless of the transfer
  21835. mode or DREQ detection method. In the case of burst mode edge detection, DREQ is sampled in
  21836. the first cycle only, and so DRAK is output in the first cycle only .
  21837.  
  21838. Operation: Figures 14.12 to 14.23 show the timing in each mode.
  21839.  
  21840. 1. Cycle Steal Mode
  21841.  
  21842. In cycle steal mode, The DREQ sampling timing differs for dual address mode and single
  21843. address mode, and for level detection and edge detection of DREQ.
  21844.  
  21845. For example, in figure 14.12 (cycle steal mode, dual address mode, level detection), DMAC
  21846. transfer begins, at the earliest, four CKIO cycles after the first sampling operation. The second
  21847. sampling operation is performed one cycle after the start of the first DMAC transfer write
  21848. cycle. If DREQ is not detected at this time, sampling is executed in every subsequent cycle.
  21849.  
  21850. In figure 14.13 (cycle steal mode, dual address mode, edge detection), DMAC transfer begins, at
  21851. the earliest, five CKIO cycles after the first sampling operation. The second sampling operation
  21852. begins from the cycle in which the first DMAC transfer read cycle ends. If DREQ is not
  21853. detected at this time, sampling is executed in every subsequent cycle.
  21854.  
  21855. In figure 14.16 (cycle steal mode, dual address mode, level detection), with SDRAM: row hit
  21856. read/write transfer using a 64-bit bus width and a 32-byte block as the data size, DMAC transfer
  21857. begins, at the earliest, four CKIO cycles after the first sampling operation. The second
  21858. sampling operation is performed in the cycle in which the first DMAC transfer write cycle is
  21859. begun.
  21860.  
  21861. For details of the timing for various kinds of memory access, see section 13, Bus State
  21862. Controller (BSC).
  21863.  
  21864. Figure 14.19 shows the case of cycle steal mode, single address mode, and level detection. In
  21865. this case, too, transfer is started, at the earliest, four CKIO cycles after the first DREQ
  21866. sampling operation. The second sampling operation is performed one cycle after the start of the
  21867. first DMAC transfer bus cycle.
  21868.  
  21869. 439
  21870.  
  21871. ----------------------- Page 456-----------------------
  21872.  
  21873. Figure 14.20 shows the case of cycle steal mode, single address mode, and edge detection. In
  21874. this case, transfer is started, at the earliest, five CKIO cycles after the first DREQ sampling
  21875. operation. The second sampling begins one cycle after the first assertion of DRAK.
  21876.  
  21877. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21878.  
  21879. 2. Burst Mode, Dual Address Mode, Level Detection
  21880.  
  21881. DREQ samplingtiming in burst mode using dual address mode and level detection is virtually
  21882. the same as for cycle steal mode.
  21883.  
  21884. For example, in figure 14.14, DMAC transfer begins, at the earliest, four CKIO cycles after
  21885. the first sampling operation. The second sampling operation is performed one cycle after the
  21886. start of the first DMAC transfer write cycle.
  21887.  
  21888. In the case of dual address mode transfer initiated by an external request, the DACK signal can
  21889. be output in either the read cycle or the write cycle of the DMAC transfer according to the
  21890. specification of the AM bit in CHCR.
  21891.  
  21892. 3. Burst Mode, Single Address Mode, Level Detection
  21893.  
  21894. DREQ samplingtiming in burst mode using single address mode and level detection is shown
  21895. in figure 14.21.
  21896.  
  21897. In the example shown in figure 14.21, DMAC transfer begins, at the earliest, four CKIO
  21898. cycles after the first sampling operation, and the second sampling operation begins one cycle
  21899. after the start of the first DMAC transfer bus cycle.
  21900.  
  21901. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21902.  
  21903. In figure 14.23, with a 32-byte data size, 64-bit bus width, and SDRAM: row hit write,
  21904. DMAC transfer begins, at the earliest, six CKIO cycles after the first sampling operation. The
  21905. second sampling operation begins one cycle after DACK is asserted for the first DMAC
  21906. transfer.
  21907.  
  21908. 4. Burst Mode, Dual Address Mode, Edge Detection
  21909.  
  21910. In burst mode using dual address mode and edge detection, DREQ sampling is performed in the
  21911. first cycle only.
  21912.  
  21913. For example, in the case shown in figure 14.15, DMAC transfer begins, at the earliest, five
  21914. CKIO cycles after the first sampling operation. DMAC transfer then continues until the end of
  21915. the number of data transfers set in DMATCR. DREQ is not sampled during this time, and
  21916. therefore DRAK is output in the first cycle only.
  21917. In the case of dual address mode transfer initiated by an external request, the DACK signal can
  21918. be output in either the read cycle or the write cycle of the DMAC transfer according to the
  21919. specification of the AM bit in CHCR.
  21920.  
  21921. 5. Burst Mode, Single Address Mode, Edge Detection
  21922.  
  21923. In burst mode using single address mode and edge detection, DREQ sampling is performed only
  21924. in the first cycle.
  21925.  
  21926. 440
  21927.  
  21928. ----------------------- Page 457-----------------------
  21929.  
  21930. For example, in the case shown in figure 14.22, DMAC transfer begins, at the earliest, five
  21931. cycles after the first sampling operation. DMAC transfer then continues until the end of the
  21932. number of data transfers set in DMATCR. DREQ is not sampled during this time, and
  21933. therefore DRAK is output in the first cycle only.
  21934.  
  21935. In single address mode, the DACK signal is output every DMAC transfer cycle.
  21936.  
  21937. 441
  21938.  
  21939. ----------------------- Page 458-----------------------
  21940.  
  21941. 4
  21942. 4
  21943. 2 E
  21944. x
  21945. t
  21946. e
  21947. r
  21948. n CKIO
  21949. a
  21950. l
  21951. Bus locked Bus locked
  21952. B
  21953. u
  21954. s F
  21955. Source address Destination address Source address Destination address
  21956.  
  21957. i
  21958. → g A[25:0]
  21959. u
  21960. r
  21961. E e
  21962.  
  21963. x
  21964. t 1
  21965. e 4
  21966. r .
  21967. n 1 D[63:0] Read Write Read Write
  21968. a 2
  21969. l
  21970.  
  21971.  
  21972. B
  21973. u D
  21974. s DREQ0
  21975. / u
  21976. D a (level
  21977. R l detection) 1st 2nd
  21978. E A acceptance acceptance
  21979. Q d
  21980. d
  21981. r
  21982. ( e
  21983. L
  21984. DREQ1
  21985. s
  21986. e s
  21987. v
  21988. e M
  21989. l
  21990.  
  21991. o
  21992. D d DRAK0
  21993. e e
  21994. t /
  21995. e C
  21996. c y
  21997. t c
  21998. i
  21999. o l
  22000. e
  22001. n
  22002. ) Bus cycle
  22003. S
  22004. CPU DMAC CPU DMAC CPU
  22005. ,
  22006. t
  22007. D e
  22008. a
  22009. A l
  22010. C M
  22011. K o
  22012.  
  22013. d
  22014. DACK0
  22015. ( e
  22016. R
  22017. e
  22018. a
  22019. d
  22020.  
  22021. C
  22022. y : DREQ sampling and determination of channel priority
  22023. c
  22024. l
  22025. e
  22026. )
  22027.  
  22028. ----------------------- Page 459-----------------------
  22029.  
  22030. E
  22031. x
  22032. t
  22033. e
  22034. r
  22035. n CKIO
  22036. a
  22037. l Bus locked Bus locked
  22038.  
  22039. B
  22040. u
  22041. F
  22042. Source address Destination address Source address Destination address Source address
  22043. s
  22044. i
  22045. → g A[25:0]
  22046. u
  22047. r
  22048. E e
  22049. x 1
  22050. t
  22051. e 4
  22052. r .
  22053. n 1 D[63:0] Read Write Read Write Read
  22054. 3
  22055. a
  22056. l
  22057.  
  22058. B
  22059. u D
  22060. s
  22061. DREQ0
  22062. / u
  22063. D a
  22064. (edge
  22065. l
  22066. R
  22067. detection) 1st 2nd 3rd 4th
  22068.  
  22069. E A acceptance acceptance acceptance accep-
  22070. Q d tance
  22071. d
  22072. r
  22073. ( e DREQ1
  22074. E s
  22075. s
  22076. d
  22077. g M
  22078. e
  22079.  
  22080. o
  22081. D d DRAK0
  22082. e e
  22083. t /
  22084. e C
  22085. c y
  22086. t
  22087. i c
  22088. o l
  22089. n e
  22090. ) Bus cycle CPU DMAC CPU DMAC CPU DMAC
  22091. , S
  22092. t
  22093. D e
  22094. a
  22095. A l
  22096. C M
  22097. K
  22098. o DACK0
  22099. ( d
  22100. R e
  22101. e
  22102. a
  22103. d
  22104.  
  22105. C
  22106. y : DREQ sampling and determination of channel priority
  22107. c
  22108. l
  22109. e
  22110. 4 )
  22111. 4
  22112. 3
  22113.  
  22114. ----------------------- Page 460-----------------------
  22115.  
  22116. 4
  22117. 4
  22118. 4 E
  22119. x
  22120. t
  22121. e
  22122. r
  22123. n
  22124. a
  22125. CKIO
  22126. l
  22127. Bus locked Bus locked
  22128. B
  22129. u
  22130. s Source address Destination address Source address Destination address
  22131. → A[25:0]
  22132. F
  22133. i
  22134. E g
  22135. x u
  22136. t r
  22137. e e
  22138. r
  22139. n 1 D[63:0] Read Write Read Write
  22140. a 4
  22141. l
  22142. .
  22143.  
  22144. 1
  22145. B 4
  22146. u
  22147. s
  22148. /
  22149. DREQ0
  22150.  
  22151. D
  22152. D
  22153. (level
  22154. R u detection) 1st 2nd
  22155. E a acceptance acceptance
  22156. l
  22157. Q
  22158. A
  22159. ( d
  22160. L d DREQ1
  22161. e r
  22162. v e
  22163. e s
  22164. l s
  22165.  
  22166. D M DRAK0
  22167. e o
  22168. t
  22169. e d
  22170. c e
  22171. t /
  22172. i B
  22173. o u
  22174. n r
  22175. ) s Bus cycle
  22176. ,
  22177. CPU DMAC-1 DMAC-2 CPU
  22178. t
  22179.  
  22180. D M
  22181. A o
  22182. C d
  22183. K e
  22184. DACK0
  22185. (
  22186. R
  22187. e
  22188. a
  22189. d
  22190.  
  22191. C
  22192. y
  22193. : DREQ sampling and determination of channel priority
  22194. c
  22195. l
  22196. e
  22197. )
  22198.  
  22199. ----------------------- Page 461-----------------------
  22200.  
  22201. E
  22202. x
  22203. t
  22204. e
  22205. r
  22206. n CKIO
  22207. a
  22208. l
  22209.  
  22210. Bus locked Bus locked
  22211. B
  22212. u
  22213. s
  22214. Source address Destination address Source address Destination address
  22215.  
  22216. → F A[25:0]
  22217. i
  22218. E g
  22219. x u
  22220. t r
  22221. e e
  22222. r
  22223. n 1
  22224. D[63:0] Read Write Read Write
  22225. a 4
  22226. l .
  22227. 1
  22228. B 5
  22229. u
  22230. s DREQ0
  22231. /
  22232. D D (edge
  22233. R u detection) 1st
  22234. E a
  22235. acceptance TE bit: transfer end
  22236. l
  22237. Q
  22238. A
  22239. ( d
  22240. E d DREQ1
  22241. d r
  22242. e
  22243. g s
  22244. e s
  22245.  
  22246. D M DRAK0
  22247. e o
  22248. t
  22249. e d
  22250. c e
  22251. t /
  22252. i B
  22253. o
  22254. n u
  22255. ) r Bus cycle
  22256. , s
  22257. CPU DMAC-1 DMAC-2 CPU
  22258. t
  22259.  
  22260. D M
  22261. A
  22262. C o
  22263. d
  22264. K e
  22265. DACK0
  22266. (
  22267. R
  22268. e
  22269. a
  22270. d
  22271.  
  22272. C
  22273. y : DREQ sampling and determination of channel priority
  22274. c
  22275. l
  22276. e
  22277. 4 )
  22278. 4
  22279. 5
  22280.  
  22281. ----------------------- Page 462-----------------------
  22282.  
  22283. 4
  22284. 4 E
  22285. 6 ( x
  22286. B t
  22287. e
  22288. u r
  22289. s n
  22290. a
  22291. W l
  22292. CKIO
  22293.  
  22294. i B
  22295. d u
  22296. t
  22297. Destination
  22298. s
  22299. h
  22300. Source address Source address
  22301.  
  22302. F
  22303. address
  22304. : → i
  22305. 6 g A[25:0]
  22306. 4 E u
  22307. r
  22308. x e
  22309. B t
  22310. i e 1
  22311. t r
  22312. s n 4
  22313. , .
  22314. a 1 D[63:0] Read Read Read Read Write Write Write Write Read Read
  22315. S l 6
  22316. D B
  22317. R u
  22318. A s D
  22319. /
  22320. D
  22321. DREQ0
  22322. M u
  22323. R
  22324. (level
  22325. : a
  22326. l detection)
  22327. E
  22328. R
  22329. 1st 2nd
  22330. o Q A acceptance acceptance
  22331. d
  22332. w ( d
  22333. L r
  22334. H e
  22335. DREQ1
  22336. e s
  22337. i v s
  22338. t
  22339. e
  22340. R l M
  22341. e D o
  22342. a e d DRAK0
  22343. d t e
  22344. / e /
  22345. W c C
  22346. t y
  22347. r i
  22348. i o c
  22349. t n l
  22350. e ) e
  22351. ) / Bus cycle
  22352. ,
  22353. CPU DMAC-1 DMAC-2
  22354. 3 S
  22355. D 2 t
  22356. - e
  22357. A B a
  22358. l
  22359. C y
  22360. K t M
  22361. e
  22362.  
  22363. o
  22364. B
  22365. DACK0
  22366. ( d
  22367. R l e
  22368. o
  22369. e c
  22370. a k
  22371. d
  22372.  
  22373. C T
  22374. r
  22375. y a
  22376. c : DREQ sampling and determination of channel priority
  22377. l n
  22378. e s
  22379. ) f
  22380. e
  22381. r
  22382.  
  22383. ----------------------- Page 463-----------------------
  22384.  
  22385.  
  22386.  
  22387. CKIO
  22388.  
  22389. F
  22390. i
  22391. g
  22392. O u On-chip Source address Source address Source address
  22393. n r
  22394. e
  22395. peripheral
  22396. -
  22397. C address bus
  22398. h 1
  22399. i 4
  22400. p .
  22401. 1 On-chip
  22402. 7
  22403. S
  22404. Read Read Read
  22405. peripheral
  22406. C data bus
  22407. I
  22408. ( D
  22409. L u
  22410. Destination address Destination address Destination address
  22411. e a
  22412. l A[31:0]
  22413. v
  22414. e A
  22415. l
  22416.  
  22417. d
  22418. D d
  22419. e r
  22420. t e D[63:0]
  22421. e
  22422. Write Write Write
  22423. s
  22424. c s
  22425. t
  22426. i
  22427. o M
  22428. n o
  22429. )
  22430. d
  22431. → e
  22432. /
  22433. C Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU
  22434. y
  22435. E c
  22436. x l
  22437. t e
  22438. e
  22439. r S
  22440. n t
  22441. a e
  22442. l a
  22443. l
  22444.  
  22445. B
  22446. u M
  22447. s o
  22448. d
  22449. e
  22450.  
  22451. 4
  22452. 4
  22453. 7
  22454.  
  22455. ----------------------- Page 464-----------------------
  22456.  
  22457. 4
  22458. 4
  22459. 8
  22460.  
  22461.  
  22462.  
  22463. CKIO
  22464.  
  22465. F
  22466. i
  22467. g
  22468. E u Source address Source address Source address
  22469. x r
  22470. t e
  22471. A[31:0]
  22472. e
  22473. r
  22474. n 1
  22475. 4
  22476. a .
  22477. l 1
  22478. 8 D[63:0]
  22479. B
  22480. Read Read Read
  22481.  
  22482. u
  22483. s
  22484.  
  22485. → D
  22486. u
  22487. Destination address Destination address Destination address
  22488. On-chip
  22489. a
  22490. l peripheral
  22491. O
  22492. A
  22493. address bus
  22494. n
  22495. - d
  22496. C d
  22497. h r
  22498. On-chip
  22499. i e peripheral
  22500. p
  22501. Write Write Write
  22502. s
  22503. s
  22504. data bus
  22505.  
  22506. S
  22507. C M T1 T2 T1 T2 T1 T2
  22508. I o
  22509. d
  22510. ( e
  22511. L /
  22512. e C Bus cycle CPU DMAC CPU DMAC CPU DMAC
  22513. v y
  22514. e c
  22515. l l
  22516. e
  22517. D
  22518. e S
  22519. t t
  22520. e e
  22521. c a
  22522. t l
  22523.  
  22524. i
  22525. o M
  22526. n
  22527. ) o
  22528. d
  22529. e
  22530.  
  22531. ----------------------- Page 465-----------------------
  22532.  
  22533.  
  22534.  
  22535. CKIO
  22536.  
  22537. E F Source address Source address Source address Source address
  22538. i
  22539. x g
  22540. t
  22541. u
  22542. A[25:0]
  22543. e
  22544. r r
  22545. n e
  22546.  
  22547. a
  22548. l 1
  22549. 4
  22550. B .
  22551. u 1
  22552. 9
  22553. D[63:0] Read Read Read Read
  22554. s
  22555.  
  22556. →
  22557.  
  22558. S
  22559. E i
  22560. n
  22561. DREQ0
  22562. x
  22563. t g (level
  22564. e l
  22565. r e detection) 1st 2nd 3rd 4th
  22566. n acceptance acceptance acceptance acceptance
  22567. a A
  22568. l
  22569. d
  22570. B d
  22571. u r DREQ1
  22572. s e
  22573. / s
  22574. D s
  22575. R M
  22576. E o
  22577. Q d
  22578. DRAK0
  22579. e
  22580. /
  22581. ( C
  22582. L y
  22583. e c
  22584. v l
  22585. e e
  22586. l Bus cycle CPU DMAC CPU DMAC CPU DMAC CPU DMAC CPU
  22587.  
  22588. S
  22589. D t
  22590. e
  22591. e a
  22592. t
  22593. e l
  22594. c
  22595. t M
  22596. i
  22597. o o DACK0
  22598. n d
  22599. ) e
  22600.  
  22601. : DREQ sampling and determination of channel priority
  22602.  
  22603. 4
  22604. 4
  22605. 9
  22606.  
  22607. ----------------------- Page 466-----------------------
  22608.  
  22609. 4
  22610. 5
  22611. 0
  22612.  
  22613.  
  22614.  
  22615. CKIO
  22616.  
  22617. E F
  22618. i
  22619. Source address Source address Source address
  22620. x g
  22621. t u A[25:0]
  22622. e r
  22623. r
  22624. e
  22625. n
  22626. a
  22627. l 1
  22628. 4
  22629. B .
  22630. 2
  22631. u 0 D[63:0] Read Read Read
  22632. s
  22633.  
  22634.  
  22635. →
  22636. S
  22637. E i
  22638. n
  22639. x
  22640. DREQ0
  22641. t g (edge
  22642. e l
  22643. r e detection) 1st 2nd 3rd
  22644. n
  22645. A
  22646. acceptance acceptance acceptance
  22647. a
  22648. l d
  22649. B d
  22650. r
  22651. u e DREQ1
  22652. s s
  22653. /
  22654. D s
  22655. R M
  22656. E o
  22657. Q d
  22658. DRAK0
  22659. e
  22660.  
  22661. /
  22662. ( C
  22663. E y
  22664. d c
  22665. g l
  22666. e
  22667. e CPU DMAC CPU DMAC CPU DMAC CPU
  22668. Bus cycle
  22669. S
  22670. D t
  22671. e e
  22672. t a
  22673. e l
  22674.  
  22675. c
  22676. t M
  22677. i
  22678. o
  22679. n o DACK0
  22680. ) d
  22681. e
  22682.  
  22683. : DREQ sampling and determination of channel priority
  22684.  
  22685. ----------------------- Page 467-----------------------
  22686.  
  22687.  
  22688.  
  22689. CKIO
  22690.  
  22691. E
  22692. x
  22693. t
  22694. Source address Source address Source address Source address
  22695. e F
  22696. r i
  22697. A[25:0]
  22698. n g
  22699. a u
  22700. l r
  22701. e
  22702. B
  22703. u 1
  22704. s 4 D[63:0] Read Read Read Read
  22705. .
  22706. → 2
  22707. 1
  22708.  
  22709.  
  22710. E
  22711. x DREQ0
  22712. t S
  22713. e i (level
  22714. r n
  22715. n
  22716. detection) 1st 2nd 3rd 4th
  22717. g
  22718. a l acceptance acceptance acceptance acceptance
  22719. l e
  22720.  
  22721. B A
  22722. u d
  22723. s
  22724. DREQ1
  22725. / d
  22726. D r
  22727. e
  22728. R s
  22729. s
  22730. E
  22731. Q M
  22732. DRAK0
  22733. o
  22734. ( d
  22735. L e
  22736. e /
  22737. v B
  22738. e u Bus cycle CPU DMAC-1 DMAC-2 DMAC-3 CPU DMAC-4
  22739. l r
  22740.  
  22741. s
  22742. D t
  22743. e M
  22744. t
  22745. e o
  22746. c d
  22747. t
  22748. i e
  22749. DACK0
  22750. o
  22751. n
  22752. )
  22753.  
  22754. : DREQ sampling and determination of channel priority
  22755.  
  22756. 4
  22757. 5
  22758. 1
  22759.  
  22760. ----------------------- Page 468-----------------------
  22761.  
  22762. 4
  22763. 5
  22764. 2
  22765.  
  22766.  
  22767.  
  22768. CKIO
  22769.  
  22770. E Source address Source address Source address Source address
  22771. x
  22772. t F
  22773. A[25:0]
  22774. e i
  22775. r g
  22776. n u
  22777. a r
  22778. l
  22779. e
  22780.  
  22781. B
  22782. u 1
  22783. 4
  22784. D[63:0] Read Read Read Read
  22785. s .
  22786. 2
  22787. → 2
  22788.  
  22789.  
  22790. E DREQ0
  22791. x S (edge
  22792. t
  22793. e i
  22794. n
  22795. detection)
  22796. r
  22797. 1st
  22798. n g acceptance
  22799. l
  22800. a e
  22801. l
  22802.  
  22803. B A TE bit: transfer end
  22804. u d
  22805. s d
  22806. / r
  22807. D e
  22808. R s
  22809. s
  22810. E
  22811. Q M DRAK0
  22812. o
  22813. ( d
  22814. E e
  22815. /
  22816. d B
  22817. g u
  22818. e
  22819. r
  22820. Bus cycle CPU DMAC-1 DMAC-2 DMAC-3 DMAC-4 CPU
  22821.  
  22822. s
  22823. D t
  22824. e M
  22825. t
  22826. e
  22827. c o
  22828. t d
  22829. i e
  22830. o DACK0
  22831. n
  22832. )
  22833.  
  22834. : DREQ sampling and determination of channel priority
  22835.  
  22836. ----------------------- Page 469-----------------------
  22837.  
  22838. E
  22839. x
  22840. t
  22841. e
  22842. r
  22843. n
  22844. a
  22845. l
  22846. CKIO
  22847. B
  22848. u
  22849. s
  22850. Destination Destination Destination
  22851. → address address address
  22852. ( F
  22853. B E i A[25:0]
  22854. g
  22855. u x u
  22856. s t r
  22857. e e
  22858. W r
  22859. n
  22860. i a 1
  22861. d l 4 D[63:0] Write Write Write Write Write Write Write Write Write Write Write Write
  22862. .
  22863. t B 2
  22864. h 3
  22865. : u
  22866. s
  22867. 6 /
  22868. 4 D DREQ0
  22869. R S
  22870. i (level
  22871. B E n detection)
  22872. i
  22873. 1st 2nd 3rd
  22874. t g
  22875. s Q l acceptance acceptance acceptance
  22876. , e
  22877.  
  22878. S ( A
  22879. D L d
  22880. e DREQ1
  22881. R v d
  22882. A e r
  22883. l e
  22884. M s
  22885. s
  22886. : D
  22887. e M DRAK0
  22888. R t
  22889. e o
  22890. o c d
  22891. w t e
  22892. i
  22893. o
  22894. DMAC-1 DMAC-2 DMAC-3
  22895. /
  22896. H n B
  22897. i ) u Bus cycle CPU CPU
  22898. /
  22899. t 3 r
  22900. s
  22901. 2 t
  22902. W B- Asserted 2 cycles before Asserted 2 cycles before Asserted 2 cycles before
  22903. r y M start of bus cycle start of bus cycle start of bus cycle
  22904. i
  22905. t t o
  22906. e e d
  22907. )
  22908. e DACK0
  22909. B
  22910. l
  22911. o
  22912. c
  22913. k
  22914.  
  22915. T
  22916. r : DREQ sampling and determination of channel priority
  22917. a
  22918. n
  22919. s
  22920. f
  22921. 4 e
  22922. 5 r
  22923. 3
  22924.  
  22925. ----------------------- Page 470-----------------------
  22926.  
  22927. 1 4 . 3 . 6 Ending DMA Transfer
  22928.  
  22929. The conditions for ending DMA transfer are different for ending on individual channels and for
  22930. ending on all channels together. Except for the case where transfer ends when the value in the
  22931. DMA transfer count register (DMATCR) reaches 0, the following conditions apply to ending
  22932. transfer.
  22933.  
  22934. 1. Cycle Steal Mode (External Request, On-Chip Peripheral Module Request, Auto-Request)
  22935.  
  22936. When a transfer end condition is satisfied, acceptance of DMAC transfer requests is suspended.
  22937. The DMAC completes transfer for the transfer requests accepted up to the point at which the
  22938. transfer end condition was satisfied, then stops.
  22939.  
  22940. In cycle steal mode, the operation is the same for both edge and level transfer request detection.
  22941.  
  22942. 2. Burst Mode, Edge Detection (External Request, On-Chip Peripheral Module Request, Auto-
  22943. Request)
  22944.  
  22945. The delay between the point at which a transfer end condition is satisfied and the point at which
  22946. the DMAC actually stops is the same as in cycle steal mode. In burst mode with edge
  22947. detection, only the first transfer request activates the DMAC, but the timing of stop request
  22948. (DE = 0 in CHCR, DME = 0 in DMAOR) sampling is the same as the transfer request
  22949. sampling timing shown in 4 and 5 under Operation in section 14.3.5. Therefore, a transfer
  22950. request is regarded as having been issued until a stop request is detected, and the corresponding
  22951. processing is executed before the DMAC stops.
  22952.  
  22953. 3. Burst Mode, Level Detection (External Request)
  22954.  
  22955. The delay between the point at which a transfer end condition is satisfied and the point at which
  22956. the DMAC actually stops is the same as in cycle steal mode. As in the case of burst mode with
  22957. edge detection, the timing of stop request (DE = 0 in CHCR, DME = 0 in DMAOR) sampling
  22958. is the same as the transfer request sampling timing shown in 2 and 3 under Operation in
  22959. section 14.3.5. Therefore, a transfer request is regarded as having been issued until a stop
  22960. request is detected, and the corresponding processing is executed before the DMAC stops.
  22961.  
  22962. 4. Transfer Suspension Bus Timing
  22963.  
  22964. Transfer suspension is executed on completion of processing for one transfer unit. In dual
  22965. address mode transfer, write cycle processing is executed even if a transfer end condition is
  22966. satisfied during the read cycle, and the transfers covered in 1, 2, and 3 above are also executed
  22967. before operation is suspended.
  22968.  
  22969. Conditions for Ending Transfer on Individual Channels: Transfer ends on the
  22970. corresponding channel when either of the following conditions is satisfied:
  22971.  
  22972. • The value in the DMA transfer count register (DMATCR) reaches 0.
  22973.  
  22974. • The DE bit in the DMA channel control register (CHCR) is cleared to 0.
  22975.  
  22976. 1. End of transfer when DMATCR = 0
  22977. 454
  22978.  
  22979. ----------------------- Page 471-----------------------
  22980.  
  22981. When the DMATCR value reaches 0, DMA transfer ends on the corresponding channel and the
  22982. transfer end flag (TE) in CHCR is set. If the interrupt enable bit (IE) is set at this time, an
  22983. interrupt (DMTE) request is sent to the CPU.
  22984.  
  22985. Transfer ending when DMATCR = 0 does not follow the procedures described in 1, 2, 3, and 4
  22986. in section 14.3.6.
  22987.  
  22988. 2. End of transfer when DE = 0 in CHCR
  22989.  
  22990. When the DMA enable bit (DE) in CHCR is cleared, DMA transfer is suspended on the
  22991. corresponding channel. The TE bit is not set in this case. Transfer ending in this case follows
  22992. the procedures described in 1, 2, 3, and 4 in section 14.3.6.
  22993.  
  22994. Conditions for Ending Transfer Simultaneously on All Channels: Transfer ends on
  22995. all channels simultaneously when either of the following conditions is satisfied:
  22996.  
  22997. • The address error bit (AE) or NMI flag (NMIF) in the DMA operation register (DMAOR) is
  22998. set.
  22999.  
  23000. • The DMA master enable bit (DME) in DMAOR is cleared to 0.
  23001.  
  23002. 1. End of transfer when AE = 1 in DMAOR
  23003.  
  23004. If the AE bit in DMAOR is set to 1 due to an address error, DMA transfer is suspended on all
  23005. channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is
  23006. passed to the CPU. Therefore, when AE is set to 1, the values in the DMA source address
  23007. register (SAR), DMA destination address register (DAR), and DMA transfer count register
  23008. (DMATCR) indicate the addresses for the DMA transfer to be performed next and the remaining
  23009. number of transfers. The TE bit is not set in this case. Before resuming transfer, it is necessary
  23010. to make a new setting for the channel that caused the address error, then write 0 to the AE bit
  23011. after first reading 1 from it. Acceptance of external requests is suspended while AE is set to 1,
  23012. so a DMA transfer request must be reissued when resuming transfer. Acceptance of internal
  23013. requests is also suspended, so when resuming transfer, the DMA transfer request enable bit for
  23014. the relevant on-chip peripheral module must be cleared to 0 before the new setting is made.
  23015.  
  23016. 455
  23017.  
  23018. ----------------------- Page 472-----------------------
  23019.  
  23020. 2. End of transfer when NMIF = 1 in DMAOR
  23021.  
  23022. If the NMIF bit in DMAOR is set to 1 due to an NMI interrupt, DMA transfer is suspended on
  23023. all channels in accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is
  23024. passed to the CPU. Therefore, when NMIF is set to 1, the values in the DMA source address
  23025. register (SAR), DMA destination address register (DAR), and DMA transfer count register
  23026. (DMATCR) indicate the addresses for the DMA transfer to be performed next and the remaining
  23027. number of transfers. The TE bit is not set in this case. Before resuming transfer after NMI
  23028. interrupt handling is completed, 0 must be written to the NMIF bit after first reading 1 from it.
  23029. As in the case of AE being set to 1, acceptance of external requests is suspended while NMIF is
  23030. set to 1, so a DMA transfer request must be reissued when resuming transfer. Acceptance of
  23031. internal requests is also suspended, so when resuming transfer, the DMA transfer request enable
  23032. bit for the relevant on-chip peripheral module must be cleared to 0 before the new setting is
  23033. made.
  23034.  
  23035. 3. End of transfer when DME = 0 in DMAOR
  23036.  
  23037. If the DME bit in DMAOR is cleared to 0, DMA transfer is suspended on all channels in
  23038. accordance with the conditions in 1, 2, 3, and 4 in section 14.3.6, and the bus is passed to the
  23039. CPU. The TE bit is not set in this case. When DME is cleared to 0, the values in the DMA
  23040. source address register (SAR), DMA destination address register (DAR), and DMA transfer
  23041. count register (DMATCR) indicate the addresses for the DMA transfer to be performed next and
  23042. the remaining number of transfers. When resuming transfer, DME must be set to 1. Operation
  23043. will then be resumed from the next transfer.
  23044.  
  23045. 456
  23046.  
  23047. ----------------------- Page 473-----------------------
  23048.  
  23049. 1 4 . 4 Examples of Use
  23050.  
  23051. 1 4 . 4 . 1 Examples of Transfer between External Memory and an External Device
  23052.  
  23053. with DACK
  23054.  
  23055. Examples of transfer of data in external memory to an external device with DACK using DMAC
  23056. channel 1 are considered here.
  23057.  
  23058. Table 14.8 shows the transfer conditions and the corresponding register settings.
  23059.  
  23060. Table 14.8 Conditions for Transfer between External Memory and an External
  23061. Device with DACK, and Corresponding Register Settings
  23062.  
  23063. Transfer Conditions Register Set Value
  23064.  
  23065. Transfer source: external memory SAR1 H'0C000000
  23066.  
  23067. Transfer source: external device with DACK DAR1 (Accessed by DACK)
  23068.  
  23069. Number of transfers: 32 DMATCR1 H'00000020
  23070.  
  23071. Transfer source address: decremented CHCR1 H'000022A5
  23072.  
  23073. Transfer destination address: (setting invalid)
  23074.  
  23075. Transfer request source: external pin (DREQ1 )
  23076. edge detection
  23077.  
  23078. Bus mode: burst
  23079.  
  23080. Transfer unit: word
  23081.  
  23082. No interrupt request at end of transfer
  23083.  
  23084. Channel priority order: 2 > 0 > 1 > 3 DMAOR H'00000201
  23085.  
  23086. 457
  23087.  
  23088. ----------------------- Page 474-----------------------
  23089.  
  23090. 1 4 . 5 On-Demand Data Transfer Mode
  23091.  
  23092. 1 4 . 5 . 1 Operation
  23093.  
  23094. Setting the DDT bit to 1 in DMAOR causes a transition to on-demand data transfer mode (DDT
  23095. mode). In DDT mode, it is possible to specify direct single address mode transfer to channel 0 via
  23096. the data bus and DDT module, and simultaneously issue a transfer request, using the DBREQ ,
  23097. BAVL, TR , TDACK, and ID [1:0] signals between an external device and the DMAC. Figure
  23098. 14.24 shows a block diagram of the DMAC, DDT, BU, and an external device (withDBREQ ,
  23099. BAVL, TR , TDACK, and ID [1:0] pins).
  23100.  
  23101. DMAC DDT
  23102. SAR0 Memory
  23103.  
  23104. DAR0
  23105. Data
  23106. DMATCR0 buffer
  23107.  
  23108. CHCR0
  23109. s
  23110. s u
  23111. Request u b
  23112. DREQ0–3 controller b a
  23113. ddtmode s t
  23114. s a
  23115. e D
  23116. r
  23117. d
  23118. bavl TR d External
  23119. ddtmode tdack id[1:0] A device (with
  23120.  
  23121. DTR DBREQ, BAVL,
  23122. BAVL TR, TDACK,
  23123. BSC
  23124. DBREQ
  23125. and ID [1:0])
  23126.  
  23127. Data buffer
  23128. TDACK FIFO or
  23129. ID[1:0] memory
  23130.  
  23131. Figure 14.24 On-Demand Transfer Mode Block Diagram
  23132.  
  23133. For channels 1 to 3, after making the settings for normal DMA transfer using the CPU, a transfer
  23134. request can be issued from an external device using the DBREQ , BAVL, TR , TDACK, and ID
  23135. [1:0] signals (handshake protocol using the data bus). A transfer request can also be issued simply
  23136. by asserting TR , without using the external bus (handshake protocol without use of the data bus).
  23137. For channel 2, after making the DMA transfer settings in the normal way, a transfer request can be
  23138. issued directly from an external device (with DBREQ , BAVL, TR , TDACK, and ID [1:0] pins) by
  23139. asserting DBREQ and TR simultaneously .
  23140.  
  23141. In DDT mode, there is a choice of five modes for performing DMA transfer.
  23142.  
  23143. 458
  23144.  
  23145. ----------------------- Page 475-----------------------
  23146.  
  23147. 1. Normal data transfer mode (channel 0)
  23148.  
  23149. BAVL (the data bus available signal) is asserted in response to DBREQ (the data bus request
  23150. signal) from an external device. Two CKIO-synchronous cycles afterBAVL is asserted, the
  23151. external data bus drives the data transfer setting command (DTR command) in synchronization
  23152. with TR (the transfer request signal). The initial settings are then made in the DMAC channel
  23153. 0 control register, and the DMA transfer is processed.
  23154.  
  23155. 2. Normal data transfer mode (except channel 0)
  23156.  
  23157. In this mode, the data transfer settings are made in the DMAC from the CPU, and DMA
  23158. transfer requests only are performed from the external device.
  23159.  
  23160. As in 1 above, DBREQ is asserted from the external device and the external bus is secured,
  23161. then the DTR command is driven.
  23162.  
  23163. The transfer request channel can be specified by means of the two ID bits in the DTR
  23164. command.
  23165.  
  23166. 3. Handshake protocol using the data bus (valid for channel 0 only)
  23167.  
  23168. This mode is only valid for channel 0.
  23169.  
  23170. After the initial settings have been made in the DMAC channel 0 control register, the DDT
  23171. module asserts a data transfer request for the DMAC by setting the DTR command ID = 00 and
  23172. MD = 00, and driving the DTR command.
  23173.  
  23174. 4. Handshake protocol without use of the data bus
  23175.  
  23176. The DDT module includes a function for recording the previously asserted request channel. By
  23177. using this function, it is possible to assert a transfer request for the channel for which a request
  23178. was asserted immediately before, by asserting TR only from an external device after a transfer
  23179. request has once been made to the channel for which an initial setting has been made in the
  23180. DMAC control register (DTR command and data transfer setting by the CPU in the DMAC).
  23181. 5. Direct data transfer mode (valid for channel 2 only)
  23182.  
  23183. A data transfer request can be asserted for channel 2 by asserting DREQ and TR simultaneously
  23184. from an external device after the initial settings have been made in the DMAC channel 2
  23185. control register.
  23186.  
  23187. Note: For details of the DTR format setting procedure, see Appendix G, SH7750 On-Demand
  23188. Data Transfer Mode.
  23189.  
  23190. 459
  23191.  
  23192. ----------------------- Page 476-----------------------
  23193.  
  23194. 1 4 . 5 . 2 Notes on Use of DDT Module
  23195.  
  23196. 1. The handshake protocol without use of the data bus is always used, except in the case where
  23197. TR is asserted two cycles after BAVL is asserted (and excluding requests to channel 2 by means
  23198. of simultaneous assertion of DBREQ and TR ).
  23199.  
  23200. 2. If a request to channel 2 is asserted by simultaneous assertion of DBREQ and TR during
  23201. execution with the handshake protocol without use of the data bus, it is accepted if there is
  23202. space in the channel 2 request queue.
  23203.  
  23204. 3. With the handshake protocol without use of the data bus, a DMA transfer request can be
  23205. asserted again for the channel for which transfer was requested immediately before by asserting
  23206. TR only.
  23207.  
  23208. 4. When channel 0 is operated using the handshake protocol without use of the data bus, MD ≠
  23209. 00 should always be transferred as initialization data*. Operation is not guaranteed if the
  23210. handshake protocol is executed without transferring initialization data.
  23211.  
  23212. Note: * Initialization data: MD ≠ 00, ID = 00, SZ, R/W, COUNT, ADDRESS.
  23213.  
  23214. 5. If only TR is asserted when operating other than with the handshake protocol without use of
  23215. the data bus, this is ignored by the DDT module (which does not operate).
  23216.  
  23217. 6. Operation is not guaranteed if the handshake protocol using the data bus is executed for channel
  23218. 0 without transferring initialization data. (A request only is asserted for the DMAC.)
  23219.  
  23220. 7. The DDT module is provided with four request queues for each of channels 1 to 3. If a request
  23221. from an external device is asserted when these request queues are full, it will be ignored.
  23222. (Channel 0 has a request flag; requests asserted while this flag is set are ignored.)
  23223.  
  23224. 8. The DDT module uses the following procedure to process ID, MD, and SZ:
  23225.  
  23226. When ID = 00
  23227.  
  23228. a. MD = 00: ID, MD select (handshake with data bus)
  23229.  
  23230. b. MD ≠ 00, SZ = 111: DMAC (CHCR0 DE bit) setting (transfer end request)
  23231.  
  23232. c. MD ≠ 00: ADDRESS, COUNT, MD, RW, SZ, ID select (data transfer to DMAC)
  23233.  
  23234. When ID ≠ 00
  23235.  
  23236. a. Request to channels 1–3 (items other than ID ignored)
  23237.  
  23238. 9. A data transfer end request (ID = 00, MD ≠ 00, SZ = 111) is not accepted when the channel 0
  23239. request flag in the DDT module is set (is not accepted during the bus cycle). Therefore, if the
  23240. DTR command initialization data settings are ID = 00 and MD = 01 (edge sensing and burst
  23241. transfer), transfer cannot be halted midway. (Set MD to a value other than 01.)
  23242.  
  23243. 10.The handshake protocol using the data bus applies only to channel 0 (MD = 00).
  23244.  
  23245. 11.Except when DTR.ID = 00, data other than DTR.ID is ignored.
  23246.  
  23247. 460
  23248.  
  23249. ----------------------- Page 477-----------------------
  23250.  
  23251. 12.A channel 0 DMA transfer halt request can be implemented by settings of DTR.ID = 00,
  23252. DTR.MD ≠ 00, and DTR.SZ = 111. Values set in DMAC control registers, etc., are retained.
  23253. DMAC register reads are possible, but an execution restart from an external device is not
  23254. possible.
  23255.  
  23256. 13.If a request is asserted for a channel other than channel 0 during execution with the handshake
  23257. protocol using the data bus, and settings of DTR.ID = 00 and DTR.MD = 00 are sent by an
  23258. external device with the handshake protocol using the data bus after DMA transfer has been
  23259. executed on that channel, a request to channel 0 is asserted. (Initialization data need not be set
  23260. when continuing in this way.)
  23261.  
  23262. 14.DBREQ is already used as a bus arbitration signal, but when a request to channel 2 is asserted
  23263. by means of simultaneous assertion of DBREQ and TR , DBREQ is not interpreted as a bus
  23264. arbitration signal (i.e., BAVL is not asserted by this signal).
  23265.  
  23266. 15.It takes one cycle for DBREQ to be accepted by the DDT module after being asserted by an
  23267. external device, but if BAVL is asserted from the BSC at this time, BAVL is not asserted
  23268. since the DBREQ assertion by the external device is not reported to the BSC.
  23269.  
  23270. 16.When settings of ID = 00, MD = 10, and SZ = 110 are transferred to the DDT module, the
  23271. DDT channel 0 request flag and channel 1 to 3 request queues are cleared. (If a transfer request to
  23272. a particular channel is followed by another request to the same channel while the TE bit in
  23273. CHCR remains set to 1, request queue clearance is necessary since the DMAC is halted.)
  23274.  
  23275. 17.When TR only is asserted in the handshake protocol using the data bus while the channel 0 TE
  23276. flag is set after the end of the last DMA transfer, the TE flag must be cleared.
  23277.  
  23278. If a transfer request is sent by asserting TR only for channel 0 when the channel 0 TE flag is
  23279. set, the DMAC will freeze. In this case, the flag can be cleared as described in 16 above.
  23280.  
  23281. 18.After DBREQ is asserted, do not assert DBREQ again until BAVL is asserted, as this will
  23282. result in a discrepancy between the number of DBREQ and BAVL assertions.
  23283.  
  23284. 19.Check that DMA transfer is not in progress before modifying the DDT bit in DMAOR. If
  23285. DMAOR.DDT is cleared to 0 during DMA transfer in DDT mode, the DMAC will freeze. In
  23286. this case, the flag can be cleared as described in 16 above.
  23287.  
  23288. 461
  23289.  
  23290. ----------------------- Page 478-----------------------
  23291.  
  23292. 1 4 . 6 Usage Notes
  23293.  
  23294. 1. When modifying SAR0–SAR3, DAR0–DAR3, DMATCR0–DMATCR3, and CHCR0–
  23295. CHCR3, first clear the DE bit for the relevant channel to 0.
  23296.  
  23297. 2. The NMIF bit in DMAOR is set when an NMI interrupt is input even if the DMAC is not
  23298. operating.
  23299.  
  23300. Confirmation method when DMA transfer is not executed correctly:
  23301.  
  23302. Read the NMIF, AE, and DME bits in DMAOR, the DE and TE bits in CHCR0–CHCR3, and
  23303. DMATCR0–DMATCR3. If NMIF was set before the transfer, the DMATCR transfer count
  23304. will remain at the set value. If NMIF was set during the transfer, when the DE bit is 1 and the
  23305. TE bit is 0 in CHCR0–CHCR3, the DMATCR value will indicate the remaining number of
  23306. transfers.
  23307.  
  23308. Also, the next addresses to be accessed can be found by reading SAR0–SAR3 and DAR0–
  23309. DAR3. If the AE bit has been set, an address error has occurred. Check the set values in
  23310. CHCR, SAR, and DAR.
  23311.  
  23312. 3. Check that DMA transfer is not in progress before making a transition to the module standby
  23313. state, standby mode, or deep sleep mode.
  23314.  
  23315. Either check that TE = 1 in CHCR0–CHCR3, or clear DME to 0 in DMAOR to terminate
  23316. DMA transfer. When DME is cleared to 0 in DMAOR, transfer halts at the end of the currently
  23317. executing DMA bus cycle. Note, therefore, that transfer may not end immediately, depending
  23318. on the transfer data size. DMA operation is not guaranteed if the module standby state, standby
  23319. mode, or deep sleep mode is entered without confirming that DMA transfer has ended.
  23320.  
  23321. 4. Do not specify a DMAC, CCN, BIST, BSC, or UBC control register as the DMAC transfer
  23322. source or destination.
  23323.  
  23324. 5. When activating the DMAC, make the SAR, DAR, and DMATCR register settings for the
  23325. relevant channel before setting DE to 1 in CHCR, or make the register settings with DE
  23326. cleared to 0 in CHCR, then set DE to 1. It does not matter whether setting of the DME bit to
  23327. 1 in DMAOR is carried out first or last. To operate the relevant channel, DME and DE must
  23328. both be set to 1. The DMAC may not operate normally if the SAR, DAR, and DMATCR
  23329. settings are not made (with the exception of the unused register in single address mode).
  23330.  
  23331. 6. After the DMATCR count reaches 0 and DMA transfer ends normally, always write 0 to
  23332. DMATCR even when executing the maximum number of transfers on the same channel.
  23333.  
  23334. 7. When falling edge detection is used for external requests, keep the external request pin high
  23335. when making DMAC settings.
  23336.  
  23337. 8. When using the DMAC in single address mode, set an external address as the address. All
  23338. channels will halt due to an address error if an on-chip peripheral module address is set.
  23339.  
  23340. 462
  23341.  
  23342. ----------------------- Page 479-----------------------
  23343.  
  23344. Section 15 Serial Communication Interface (SCI)
  23345.  
  23346. 1 5 . 1 Overview
  23347.  
  23348. The SH7750 is equipped with a single-channel serial communication interface (SCI) and a single-
  23349. channel serial communication interface with built-in FIFO registers (SCI with FIFO: SCIF).
  23350.  
  23351. The SCI can handle both asynchronous and synchronous serial communication. A function is also
  23352. provided for serial communication between processors (multiprocessor communication function).
  23353.  
  23354. The SCI supports a smart card interface conforming to ISO/IEC 7816-3 (Identification Card) as a
  23355. serial communication interface function for IC card interface use. For details, see section 17, Smart
  23356. Card Interface.
  23357.  
  23358. The SCIF is a dedicated asynchronous communication serial interface with built-in 16-stage FIFO
  23359. registers for both transmission and reception. For details, see section 16, Serial Communication
  23360. Interface with FIFO.
  23361.  
  23362. 1 5 . 1 . 1 Features
  23363.  
  23364. SCI features are listed below.
  23365.  
  23366. • Choice of synchronous or asynchronous serial communication mode
  23367.  
  23368.  Asynchronous mode
  23369.  
  23370. Serial data communication is executed using an asynchronous system in which
  23371. synchronization is achieved character by character. Serial data communication can be carried
  23372. out with standard asynchronous communication chips such as a Universal Asynchronous
  23373. Receiver/Transmitter (UART) or Asynchronous Communication Interface Adapter (ACIA).
  23374. A multiprocessor communication function is also provided that enables serial data
  23375. communication with a number of processors.
  23376. There is a choice of 12 serial data transfer formats.
  23377.  
  23378. Data length: 7 or 8 bits
  23379.  
  23380. Stop bit length: 1 or 2 bits
  23381.  
  23382. Parity: Even/odd/none
  23383.  
  23384. Multiprocessor bit: 1 or 0
  23385.  
  23386. Receive error detection: Parity, overrun, and framing errors
  23387.  
  23388. Break detection: A break can be detected by reading the RxD
  23389. pin level directly from the serial port register (SCSPTR1) when
  23390. a framing error occurs.
  23391.  
  23392.  Synchronous mode
  23393.  
  23394. 463
  23395.  
  23396. ----------------------- Page 480-----------------------
  23397.  
  23398. Serial data communication is synchronized with a clock. Serial data communication can be
  23399. carried out with other chips that have a synchronous communication function.
  23400.  
  23401. There is a single serial data transfer format.
  23402.  
  23403. Data length: 8 bits
  23404.  
  23405. Receive error detection: Overrun errors
  23406.  
  23407. • Full-duplex communication capability
  23408.  
  23409. The transmitter and receiver are mutually independent, enabling transmission and reception to
  23410. be executed simultaneously. Double-buffering is used in both the transmitter and the receiver,
  23411. enabling continuous transmission and continuous reception of serial data.
  23412.  
  23413. • On-chip baud rate generator allows any bit rate to be selected.
  23414.  
  23415. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  23416. SCK pin
  23417.  
  23418. • Four interrupt sources
  23419.  
  23420. There are four interrupt sources—transmit-data-empty, transmit-end, receive-data-full, and
  23421. receive-error—that can issue requests independently. The transmit-data-empty interrupt and
  23422. receive-data-full interrupt can activate the DMA controller (DMAC) to execute a data transfer.
  23423.  
  23424. • When not in use, the SCI can be stopped by halting its clock supply to reduce power
  23425. consumption.
  23426.  
  23427. 464
  23428.  
  23429. ----------------------- Page 481-----------------------
  23430.  
  23431. 1 5 . 1 . 2 Block Diagram
  23432.  
  23433. Figure 15.1 shows a block diagram of the SCI.
  23434.  
  23435. e
  23436. c Internal
  23437. a
  23438. Module data bus f data bus
  23439. r
  23440. e
  23441. t
  23442. n
  23443. i
  23444.  
  23445. s
  23446. u
  23447. B
  23448.  
  23449. SCRDR1 SCTDR1 SCSSR1 SCBRR1
  23450. SCSCR1
  23451. Pφ
  23452. SCSMR1
  23453. RxD SCRSR1 SCTSR1
  23454. SCSPTR1 Baud rate Pφ/4
  23455. generator
  23456. Transmission/
  23457. Pφ/16
  23458. reception
  23459. control
  23460. TxD Pφ/64
  23461. Parity generation Clock
  23462.  
  23463. Parity check
  23464. External clock
  23465. SCK
  23466. TEI
  23467. TXI
  23468. RXI
  23469. ERI
  23470.  
  23471. SCI
  23472.  
  23473. SCRSR1: Receive shift register
  23474. SCRDR1: Receive data register
  23475. SCTSR1: Transmit shift register
  23476. SCTDR1: Transmit data register
  23477. SCSMR1: Serial mode register
  23478. SCSCR1: Serial control register
  23479. SCSSR1: Serial status register
  23480. SCBRR1: Bit rate register
  23481. SCSPTR1: Serial port register
  23482.  
  23483. Figure 15.1 Block Diagram of SCI
  23484.  
  23485. 465
  23486.  
  23487. ----------------------- Page 482-----------------------
  23488.  
  23489. 1 5 . 1 . 3 Pin Configuration
  23490.  
  23491. Table 15.1 shows the SCI pin configuration.
  23492.  
  23493. Table 15.1SCI Pins
  23494.  
  23495. Pin Name Abbreviation I / O Function
  23496.  
  23497. Serial clock pin MD0/SCK I/O Clock input/output
  23498.  
  23499. Receive data pin RxD Input Receive data input
  23500.  
  23501. Transmit data pin MD7/TxD Output Transmit data output
  23502.  
  23503. Note: The serial clock pin and transmit data pin function as mode input pins MD0 and
  23504. MD7 after a power-on reset. They are made to function as serial pins by performing SCI
  23505. operation settings with the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/A bit in
  23506. SCSMR1. Break state transmission and detection, can be set in the SCI’s SCSPTR1
  23507. register.
  23508.  
  23509. 1 5 . 1 . 4 Register Configuration
  23510.  
  23511. The SCI has the internal registers shown in table 15.2. These registers are used to specify
  23512. asynchronous mode or synchronous mode, the data format, and the bit rate, and to perform
  23513. transmitter/receiver control.
  23514.  
  23515. With the exception of the serial port register, the SCI registers are initialized in standby mode and
  23516. in the module standby state as well as after a power-on reset or manual reset. When recovering
  23517. from standby mode or the module standby state, the registers must be set again.
  23518.  
  23519. Table 15.2SCI Registers
  23520.  
  23521. Initial Area 7 Acces
  23522. Name Abbreviation R/ W Value P4 Address Address s Size
  23523.  
  23524. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  23525.  
  23526. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  23527.  
  23528. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  23529.  
  23530. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  23531. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  23532.  
  23533. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  23534. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  23535.  
  23536. Notes: 1. Only 0 can be written, to clear flags.
  23537. 2. The value of bits 2 and 0 is undefined.
  23538.  
  23539. 466
  23540.  
  23541. ----------------------- Page 483-----------------------
  23542.  
  23543. 1 5 . 2 Register Descriptions
  23544.  
  23545. 1 5 . 2 . 1 Receive Shift Register (SCRSR1)
  23546.  
  23547. Bit: 7 6 5 4 3 2 1 0
  23548.  
  23549. R/W: — — — — — — — —
  23550.  
  23551. SCRSR1 is the register used to receive serial data.
  23552.  
  23553. The SCI sets serial data input from the RxD pin in SCRSR1 in the order received, starting with
  23554. the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it is
  23555. transferred to SCRDR1 automatically.
  23556.  
  23557. SCRSR1 cannot be directly read or written to by the CPU.
  23558.  
  23559. 1 5 . 2 . 2 Receive Data Register (SCRDR1)
  23560.  
  23561. Bit: 7 6 5 4 3 2 1 0
  23562.  
  23563. Initial value: 0 0 0 0 0 0 0 0
  23564.  
  23565. R/W: R R R R R R R R
  23566.  
  23567. SCRDR1 is the register that stores received serial data.
  23568.  
  23569. When the SCI has received one byte of serial data, it transfers the received data from SCRSR1 to
  23570. SCRDR1 where it is stored, and completes the receive operation. SCRSR1 is then enabled for
  23571. reception.
  23572.  
  23573. Since SCRSR1 and SCRDR1 function as a double buffer in this way, it is possible to receive data
  23574. continuously.
  23575.  
  23576. SCRDR1 is a read-only register, and cannot be written to by the CPU.
  23577.  
  23578. SCRDR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  23579. module standby state.
  23580.  
  23581. 467
  23582.  
  23583. ----------------------- Page 484-----------------------
  23584.  
  23585. 1 5 . 2 . 3 Transmit Shift Register (SCTSR1)
  23586.  
  23587. Bit: 7 6 5 4 3 2 1 0
  23588.  
  23589. R/W: — — — — — — — —
  23590.  
  23591. SCTSR1 is the register used to transmit serial data.
  23592.  
  23593. To perform serial data transmission, the SCI first transfers transmit data from SCTDR1 to
  23594. SCTSR1, then sends the data to the TxD pin starting with the LSB (bit 0).
  23595.  
  23596. When transmission of one byte is completed, the next transmit data is transferred from SCTDR1
  23597. to SCTSR1, and transmission started, automatically. However, data transfer from SCTDR1 to
  23598. SCTSR1 is not performed if the TDRE flag in the serial status register (SCSSR1) is set to 1.
  23599.  
  23600. SCTSR1 cannot be directly read or written to by the CPU.
  23601.  
  23602. 1 5 . 2 . 4 Transmit Data Register (SCTDR1)
  23603.  
  23604. Bit: 7 6 5 4 3 2 1 0
  23605.  
  23606. Initial value: 1 1 1 1 1 1 1 1
  23607.  
  23608. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23609.  
  23610. SCTDR1 is an 8-bit register that stores data for serial transmission.
  23611.  
  23612. When the SCI detects that SCTSR1 is empty, it transfers the transmit data written in SCTDR1 to
  23613. SCTSR1 and starts serial transmission. Continuous serial transmission can be carried out by
  23614. writing the next transmit data to SCTDR1 during serial transmission of the data in SCTSR1.
  23615.  
  23616. SCTDR1 can be read or written to by the CPU at all times.
  23617.  
  23618. SCTDR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  23619. module standby state.
  23620.  
  23621. 468
  23622.  
  23623. ----------------------- Page 485-----------------------
  23624.  
  23625. 1 5 . 2 . 5 Serial Mode Register (SCSMR1)
  23626.  
  23627. Bit: 7 6 5 4 3 2 1 0
  23628.  
  23629. C/A CHR PE O/E STOP MP CKS1 CKS0
  23630.  
  23631. Initial value: 0 0 0 0 0 0 0 0
  23632.  
  23633. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23634.  
  23635. SCSMR1 is an 8-bit register used to set the SCI’s serial transfer format and select the baud rate
  23636. generator clock source.
  23637.  
  23638. SCSMR1 can be read or written to by the CPU at all times.
  23639.  
  23640. SCSMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  23641. module standby state.
  23642.  
  23643. Bit 7—Communication Mode (C/A): Selects asynchronous mode or synchronous mode as
  23644. the SCI operating mode.
  23645.  
  23646. Bit 7: C/A Description
  23647.  
  23648. 0 Asynchronous mode (Initial value)
  23649.  
  23650. 1 Synchronous mode
  23651.  
  23652. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the data length in asynchronous
  23653. mode. In synchronous mode, a fixed data length of 8 bits is used regardless of the CHR setting,
  23654.  
  23655. Bit 6: CHR Description
  23656.  
  23657. 0 8-bit data (Initial value)
  23658.  
  23659. 1 7-bit data*
  23660.  
  23661. Note: * When 7-bit data is selected, the MSB (bit 7) of SCTDR1 is not transmitted.
  23662.  
  23663. Bit 5—Parity Enable (PE): In asynchronous mode, selects whether or not parity bit addition
  23664. is performed in transmission, and parity bit checking in reception. In synchronous mode, parity bit
  23665. addition and checking is not performed, regardless of the PE bit setting.
  23666.  
  23667. Bit 5: PE Description
  23668.  
  23669. 0 Parity bit addition and checking disabled (Initial value)
  23670.  
  23671. 1 Parity bit addition and checking enabled*
  23672.  
  23673. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/E bit is added to
  23674. transmit data before transmission. In reception, the parity bit is checked for the parity
  23675. (even or odd) specified by the O/E bit.
  23676.  
  23677. 469
  23678.  
  23679. ----------------------- Page 486-----------------------
  23680.  
  23681. Bit 4—Parity Mode (O/E ): Selects either even or odd parity for use in parity addition and
  23682. checking. The O/E bit setting is only valid when the PE bit is set to 1, enabling parity bit
  23683. addition and checking, in asynchronous mode. The O/E bit setting is invalid in synchronous mode,
  23684. and when parity addition and checking is disabled in asynchronous mode.
  23685.  
  23686. Bit 4: O/E Description
  23687. 0 Even parity*1 (Initial value)
  23688.  
  23689. 1 Odd parity*2
  23690.  
  23691. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the total
  23692. number of 1-bits in the transmit character plus the parity bit is even. In reception, a
  23693. check is performed to see if the total number of 1-bits in the receive character plus the
  23694. parity bit is even.
  23695. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  23696. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  23697. check is performed to see if the total number of 1-bits in the receive character plus the
  23698. parity bit is odd.
  23699.  
  23700. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length in asynchronous
  23701. mode. The STOP bit setting is only valid in asynchronous mode. If synchronous mode is set, the
  23702. STOP bit setting is invalid since stop bits are not added.
  23703.  
  23704. Bit 3: STOP Description
  23705. 0 1 stop bit*1 (Initial value)
  23706.  
  23707. 1 2 stop bits*2
  23708.  
  23709. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  23710. before it is sent.
  23711. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  23712. before it is sent.
  23713.  
  23714. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  23715. 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
  23716. character.
  23717.  
  23718. 470
  23719.  
  23720. ----------------------- Page 487-----------------------
  23721.  
  23722. Bit 2—Multiprocessor Mode (MP): Selects a multiprocessor format. When a
  23723. multiprocessor format is selected, the PE bit and O/E bit parity settings are invalid. The MP bit
  23724. setting is only valid in asynchronous mode; it is invalid in synchronous mode.
  23725.  
  23726. For details of the multiprocessor communication function, see section 15.3.3, Multiprocessor
  23727. Communication Function.
  23728.  
  23729. Bit 2: MP Description
  23730.  
  23731. 0 Multiprocessor function disabled (Initial value)
  23732.  
  23733. 1 Multiprocessor format selected
  23734.  
  23735. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source
  23736. for the on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and
  23737. Pφ/64, according to the setting of bits CKS1 and CKS0.
  23738.  
  23739. For the relation between the clock source, the bit rate register setting, and the baud rate, see section
  23740. 15.2.9, Bit Rate Register (SCBRR1).
  23741.  
  23742. Bit 1: CKS1 Bit 0: CKS0 Description
  23743.  
  23744. 0 0 Pφ clock (Initial value)
  23745.  
  23746. 1 Pφ/4 clock
  23747.  
  23748. 1 0 Pφ/16 clock
  23749.  
  23750. 1 Pφ/64 clock
  23751.  
  23752. Note: Pφ: Peripheral clock
  23753.  
  23754. 1 5 . 2 . 6 Serial Control Register (SCSCR1)
  23755.  
  23756. Bit: 7 6 5 4 3 2 1 0
  23757.  
  23758. TIE RIE TE RE MPIE TEIE CKE1 CKE0
  23759.  
  23760. Initial value: 0 0 0 0 0 0 0 0
  23761.  
  23762. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  23763.  
  23764. The SCSCR1 register performs enabling or disabling of SCI transfer operations, serial clock
  23765. output in asynchronous mode, and interrupt requests, and selection of the serial clock source.
  23766.  
  23767. SCSCR1 can be read or written to by the CPU at all times.
  23768.  
  23769. SCSCR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  23770. module standby state.
  23771.  
  23772. 471
  23773.  
  23774. ----------------------- Page 488-----------------------
  23775.  
  23776. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-data-empty
  23777. interrupt (TXI) request generation when serial transmit data is transferred from SCTDR1 to
  23778. SCTSR1 and the TDRE flag in SCSSR1 is set to 1.
  23779.  
  23780. Bit 7: TIE Description
  23781.  
  23782. 0 Transmit-data-empty interrupt (TXI) request disabled* (Initial value)
  23783.  
  23784. 1 Transmit-data-empty interrupt (TXI) request enabled
  23785.  
  23786. Note: * TXI interrupt requests can be cleared by reading 1 from the TDRE flag, then clearing it to 0,
  23787. or by clearing the TIE bit to 0.
  23788.  
  23789. Bit 6—Receive Interrupt Enable (RIE): Enables or disables receive-data-full interrupt
  23790. (RXI) request and receive-error interrupt (ERI) request generation when serial receive data is
  23791. transferred from SCRSR1 to SCRDR1 and the RDRF flag in SCSSR1 is set to 1.
  23792.  
  23793. Bit 6: RIE Description
  23794.  
  23795. 0 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  23796. request disabled* (Initial value)
  23797.  
  23798. 1 Receive-data-full interrupt (RXI) request and receive-error interrupt (ERI)
  23799. request enabled
  23800.  
  23801. Note: * RXI and ERI interrupt requests can be cleared by reading 1 from the RDRF flag, or the FER,
  23802. PER, or ORER flag, then clearing the flag to 0, or by clearing the RIE bit to 0.
  23803.  
  23804. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the
  23805. SCI.
  23806.  
  23807. Bit 5: TE Description
  23808. 0 Transmission disabled*1 (Initial value)
  23809.  
  23810. 1 Transmission enabled*2
  23811.  
  23812. Notes: 1. The TDRE flag in SCSSR1 is fixed at 1.
  23813. 2. In this state, serial transmission is started when transmit data is written to SCTDR1 and
  23814. the TDRE flag in SCSSR1 is cleared to 0.
  23815. SCSMR1 setting must be performed to decide the transmit format before setting the TE
  23816. bit to 1.
  23817.  
  23818. 472
  23819.  
  23820. ----------------------- Page 489-----------------------
  23821.  
  23822. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCI.
  23823.  
  23824. Bit 4: RE Description
  23825. 0 Reception disabled*1 (Initial value)
  23826.  
  23827. 1 Reception enabled*2
  23828.  
  23829. Notes: 1. Clearing the RE bit to 0 does not affect the RDRF, FER, PER, and ORER flags, which
  23830. retain their states.
  23831. 2. Serial reception is started in this state when a start bit is detected in asynchronous
  23832. mode or serial clock input is detected in synchronous mode.
  23833. SCSMR1 setting must be performed to decide the receive format before setting
  23834. the RE bit to 1.
  23835.  
  23836. Bit 3—Multiprocessor Interrupt Enable (MPIE): Enables or disables multiprocessor
  23837. interrupts. The MPIE bit setting is only valid in asynchronous mode when the MP bit in
  23838. SCSMR1 is set to 1.
  23839.  
  23840. The MPIE bit setting is invalid in synchronous mode or when the MP bit is cleared to 0.
  23841.  
  23842. Bit 3: MPIE Description
  23843.  
  23844. 0 Multiprocessor interrupts disabled (normal reception performed) (Initial value)
  23845.  
  23846. [Clearing conditions]
  23847.  
  23848. When the MPIE bit is cleared to 0
  23849.  
  23850. When data with MPB = 1 is received
  23851.  
  23852. 1 Multiprocessor interrupts enabled*
  23853.  
  23854. Receive interrupt (RXI) requests, receive-error interrupt (ERI) requests, and
  23855. setting of the RDRF, FER, and ORER flags in SCSSR1 are disabled until data
  23856. with the multiprocessor bit set to 1 is received.
  23857.  
  23858. Note: * Receive data transfer from SCRSR1 to SCRDR1, receive error detection, and setting of the
  23859. RDRF, FER, and ORER flags in SCSSR1, is not performed. When receive data including
  23860. MPB = 1 is received, the MPB bit in SCSSR1 is set to 1, the MPIE bit is cleared to 0
  23861. automatically, and generation of RXI and ERI interrupts (when the TIE and RIE bits in
  23862. SCSCR1 are set to 1) and FER and ORER flag setting is enabled.
  23863.  
  23864. Bit 2—Transmit-End interrupt Enable (TEIE): Enables or disables transmit-end interrupt
  23865. (TEI) request generation when there is no valid transmit data in SCTDR1 at the time for MSB data
  23866. transmission.
  23867.  
  23868. 473
  23869.  
  23870. ----------------------- Page 490-----------------------
  23871.  
  23872. Bit 2: TEIE Description
  23873.  
  23874. 0 Transmit-end interrupt (TEI) request disabled* (Initial value)
  23875.  
  23876. 1 Transmit-end interrupt (TEI) request enabled*
  23877.  
  23878. Note: * TEI interrupt requests can be cleared by reading 1 from the TDRE flag in SCSSR1, then
  23879. clearing it to 0 and clearing the TEND flag to 0, or by clearing the TEIE bit to 0.
  23880.  
  23881. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits are used to select the
  23882. SCI clock source and enable or disable clock output from the SCK pin. The combination of the
  23883. CKE1 and CKE0 bits determines whether the SCK pin functions as the serial clock output pin or
  23884. the serial clock input pin.
  23885.  
  23886. The setting of the CKE0 bit, however, is only valid for internal clock operation (CKE1 = 0) in
  23887. asynchronous mode. The CKE0 bit setting is invalid in synchronous mode and in the case of
  23888. external clock operation (CKE1 = 1). The CKE1 and CKE0 bits must be set before determining
  23889. the SCI’s operating mode with SCSMR1.
  23890.  
  23891. For details of clock source selection, see table 15.9 in section 15.3, Operation.
  23892.  
  23893. Bit 1: CKE1 Bit 0: CKE0 Description
  23894.  
  23895. 0 0 Asynchronous mode Internal clock/SCK pin functions as
  23896. input pin (input signal ignored)*1
  23897.  
  23898. Synchronous mode Internal clock/SCK pin functions as
  23899. serial clock output*1
  23900.  
  23901. 1 Asynchronous mode Internal clock/SCK pin functions as
  23902. clock output*2
  23903.  
  23904. Synchronous mode Internal clock/SCK pin functions as
  23905. serial clock output
  23906.  
  23907. 1 0 Asynchronous mode External clock/SCK pin functions as
  23908. clock input*3
  23909.  
  23910. Synchronous mode External clock/SCK pin functions as
  23911. serial clock input
  23912.  
  23913. 1 Asynchronous mode External clock/SCK pin functions as
  23914. clock input*3
  23915.  
  23916. Synchronous mode External clock/SCK pin functions as
  23917. serial clock input
  23918.  
  23919. Notes: 1. Initial value
  23920. 2. Outputs a clock of the same frequency as the bit rate.
  23921. 3. Inputs a clock with a frequency 16 times the bit rate.
  23922.  
  23923. 474
  23924.  
  23925. ----------------------- Page 491-----------------------
  23926.  
  23927. 1 5 . 2 . 7 Serial Status Register (SCSSR1)
  23928.  
  23929. Bit: 7 6 5 4 3 2 1 0
  23930.  
  23931. TDRE RDRF ORER FER PER TEND MPB MPBT
  23932.  
  23933. Initial value: 1 0 0 0 0 1 0 0
  23934.  
  23935. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  23936.  
  23937. Note: * Only 0 can be written, to clear the flag.
  23938.  
  23939. SCSSR1 is an 8-bit register containing status flags that indicate the operating status of the SCI,
  23940. and multiprocessor bits.
  23941.  
  23942. SCSSR1 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  23943. TDRE, RDRF, ORER, PER, and FER. Also note that in order to clear these flags they must be
  23944. read as 1 beforehand. The TEND flag and MPB flag are read-only flags and cannot be modified.
  23945.  
  23946. SCSSR1 is initialized to H'84 by a power-on reset or manual reset, in standby mode, and in the
  23947. module standby state.
  23948.  
  23949. Bit 7—Transmit Data Register Empty (TDRE): Indicates that data has been transferred
  23950. from SCTDR1 to SCTSR1 and the next serial transmit data can be written to SCTDR1.
  23951.  
  23952. Bit 7: TDRE Description
  23953.  
  23954. 0 Valid transmit data has been written to SCTDR1
  23955.  
  23956. [Clearing conditions]
  23957.  
  23958. When 0 is written to TDRE after reading TDRE = 1
  23959.  
  23960. When data is written to SCTDR1 by the DMAC
  23961.  
  23962. 1 There is no valid transmit data in SCTDR1 (Initial value)
  23963.  
  23964. [Setting conditions]
  23965.  
  23966. Power-on reset, manual reset, standby mode, or module standby
  23967.  
  23968. When the TE bit in SCSCR1 is 0
  23969.  
  23970. When data is transferred from SCTDR1 to SCTSR1 and data can be written
  23971. to SCTDR1
  23972.  
  23973. 475
  23974.  
  23975. ----------------------- Page 492-----------------------
  23976.  
  23977. Bit 6—Receive Data Register Full (RDRF): Indicates that the received data has been
  23978. stored in SCRDR1.
  23979.  
  23980. Bit 6: RDRF Description
  23981.  
  23982. 0 There is no valid receive data in SCRDR1 (Initial value)
  23983.  
  23984. [Clearing conditions]
  23985.  
  23986. Power-on reset, manual reset, standby mode, or module standby
  23987.  
  23988. When 0 is written to RDRF after reading RDRF = 1
  23989.  
  23990. When data in SCRDR1 is read by the DMAC
  23991.  
  23992. 1 There is valid receive data in SCRDR1
  23993.  
  23994. [Setting condition]
  23995.  
  23996. When serial reception ends normally and receive data is transferred from
  23997. SCRSR1 to SCRDR1
  23998.  
  23999. Note: SCRDR1 and the RDRF flag are not affected and retain their previous values when an error
  24000. is detected during reception or when the RE bit in SCSCR1 is cleared to 0.
  24001. If reception of the next data is completed while the RDRF flag is still set to 1, an overrun
  24002. error will occur and the receive data will be lost.
  24003.  
  24004. Bit 5—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  24005. causing abnormal termination.
  24006.  
  24007. Bit 5: ORER Description
  24008. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  24009.  
  24010. [Clearing conditions]
  24011.  
  24012. Power-on reset, manual reset, standby mode, or module standby
  24013.  
  24014. When 0 is written to ORER after reading ORER = 1
  24015.  
  24016. 2
  24017. 1 An overrun error occurred during reception*
  24018.  
  24019. [Setting condition]
  24020.  
  24021. When the next serial reception is completed while RDRF = 1
  24022.  
  24023. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in SCSCR1
  24024. is cleared to 0.
  24025. 2. The receive data prior to the overrun error is retained in SCRDR1, and the data received
  24026. subsequently is lost. Serial reception cannot be continued while the ORER flag is set to
  24027. 1. In synchronous mode, serial transmission cannot be continued either.
  24028.  
  24029. 476
  24030.  
  24031. ----------------------- Page 493-----------------------
  24032.  
  24033. Bit 4—Framing Error (FER): Indicates that a framing error occurred during reception in
  24034. asynchronous mode, causing abnormal termination.
  24035.  
  24036. Bit 4: FER Description
  24037. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  24038.  
  24039. [Clearing conditions]
  24040.  
  24041. Power-on reset, manual reset, standby mode, or module standby
  24042.  
  24043. When 0 is written to FER after reading FER = 1
  24044.  
  24045. 1 A framing error occurred during reception
  24046.  
  24047. [Setting condition]
  24048.  
  24049. When the SCI checks whether the stop bit at the end of the receive data is 1
  24050. when reception ends, and the stop bit is 0*2
  24051.  
  24052. Notes: 1. The FER flag is not affected and retains its previous state when the RE bit in SCSCR1 is
  24053. cleared to 0.
  24054. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop bit
  24055. is not checked. If a framing error occurs, the receive data is transferred to SCRDR1 but
  24056. the RDRF flag is not set. Serial reception cannot be continued while the FER flag is set
  24057. to 1.
  24058.  
  24059. Bit 3—Parity Error (PER): Indicates that a parity error occurred during reception with parity
  24060. addition in asynchronous mode, causing abnormal termination.
  24061.  
  24062. Bit 3: PER Description
  24063. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  24064.  
  24065. [Clearing conditions]
  24066.  
  24067. Power-on reset, manual reset, standby mode, or module standby
  24068.  
  24069. When 0 is written to PER after reading PER = 1
  24070.  
  24071. 1 A parity error occurred during reception*2
  24072.  
  24073. [Setting condition]
  24074.  
  24075. When, in reception, the number of 1-bits in the receive data plus the parity
  24076. bit does not match the parity setting (even or odd) specified by the O/E bit in
  24077. SCSMR1
  24078.  
  24079. Notes: 1. The PER flag is not affected and retains its previous state when the RE bit in SCSCR1 is
  24080. cleared to 0.
  24081. 2. If a parity error occurs, the receive data is transferred to SCRDR1 but the RDRF flag is
  24082. not set. Serial reception cannot be continued while the PER flag is set to 1.
  24083.  
  24084. 477
  24085.  
  24086. ----------------------- Page 494-----------------------
  24087.  
  24088. Bit 2—Transmit End (TEND): Indicates that there is no valid data in SCTDR1 when the
  24089. last bit of the transmit character is sent, and transmission has been ended.
  24090.  
  24091. The TEND flag is read-only and cannot be modified.
  24092.  
  24093. Bit 2: TEND Description
  24094.  
  24095. 0 Transmission is in progress
  24096.  
  24097. [Clearing conditions]
  24098.  
  24099. When 0 is written to TDRE after reading TDRE = 1
  24100.  
  24101. When data is written to SCTDR1 by the DMAC
  24102.  
  24103. 1 Transmission has been ended (Initial value)
  24104.  
  24105. [Setting conditions]
  24106.  
  24107. Power-on reset, manual reset, standby mode, or module standby
  24108.  
  24109. When the TE bit in SCSCR1 is 0
  24110.  
  24111. When TDRE = 1 on transmission of the last bit of a 1-byte serial transmit
  24112. character
  24113.  
  24114. Bit 1—Multiprocessor Bit (MPB): When reception is performed using a multiprocessor
  24115. format in asynchronous mode, MPB stores the multiprocessor bit in the receive data.
  24116.  
  24117. The MPB flag is read-only and cannot be modified.
  24118.  
  24119. Bit 1: MPB Description
  24120.  
  24121. 0 Data with a 0 multiprocessor bit has been received* (Initial value)
  24122.  
  24123. 1 Data with a 1 multiprocessor bit has been received
  24124.  
  24125. Note: * Retains its previous state when the RE bit in SCSCR1 is cleared to 0 while using a
  24126. multiprocessor format.
  24127.  
  24128. 478
  24129.  
  24130. ----------------------- Page 495-----------------------
  24131.  
  24132. Bit 0—Multiprocessor Bit Transfer (MPBT): When transmission is performed using a
  24133. multiprocessor format in asynchronous mode, MPBT stores the multiprocessor bit to be added to
  24134. the transmit data.
  24135.  
  24136. The MPBT bit setting is invalid in synchronous mode, when a multiprocessor format is not used,
  24137. and when the operation is not transmission.
  24138.  
  24139. Unlike transmit data, the MPBT bit is not double-buffered, so it is necessary to check whether
  24140. transmission has been completed before changing its value.
  24141.  
  24142. Bit 0: MPBT Description
  24143.  
  24144. 0 Data with a 0 multiprocessor bit is transmitted (Initial value)
  24145.  
  24146. 1 Data with a 1 multiprocessor bit is transmitted
  24147.  
  24148. 1 5 . 2 . 8 Serial Port Register (SCSPTR1)
  24149.  
  24150. Bit: 7 6 5 4 3 2 1 0
  24151.  
  24152. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  24153.  
  24154. Initial value: 0 0 0 0 0 — 0 —
  24155.  
  24156. R/W: R/W — — — R/W R/W R/W R/W
  24157.  
  24158. SCSPTR1 is an 8-bit readable/writable register that controls input/output and data for the port pins
  24159. multiplexed with the serial communication interface (SCI) pins. Input data can be read from the
  24160. RxD pin, output data written to the TxD pin, and breaks in serial transmission/reception
  24161. controlled, by means of bits 1 and 0. SCK pin data reading and output data writing can be
  24162. performed by means of bits 3 and 2. Bit 7 controls enabling and disabling of the RXI interrupt.
  24163.  
  24164. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2 and
  24165. 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is undefined.
  24166. SCSPTR1 is not initialized in the module standby state or standby mode.
  24167.  
  24168. Bit 7—Error Interrupt Only (EIO): When the EIO bit is 1, an RXI interrupt request is not
  24169. sent to the CPU even if the RIE bit is set to 1. When the DMAC is used, this setting means that
  24170. only ERI interrupts are handled by the CPU. The DMAC transfers read data to memory or another
  24171. peripheral module. This bit specifies enabling or disabling of the RXI interrupt.
  24172.  
  24173. Bit 7: EIO Description
  24174.  
  24175. 0 The RIE bit enables/disables RXI and ERI interrupts
  24176.  
  24177. When the RIE bit is 1, RXI and ERI interrupts are sent to INTC (Initial value)
  24178.  
  24179. 1 When the RIE bit is 1, only ERI interrupts are sent to INTC
  24180.  
  24181. 479
  24182.  
  24183. ----------------------- Page 496-----------------------
  24184.  
  24185. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  24186.  
  24187. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin
  24188. input/output. When the SCK pin is actually set as a port output pin and outputs the value set by
  24189. the SPB1DT bit, the C/A bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be
  24190. cleared to 0.
  24191.  
  24192. Bit 3: SPB1IO Description
  24193.  
  24194. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  24195.  
  24196. 1 SPB1DT bit value is output to the SCK pin
  24197.  
  24198. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin
  24199. input/output data. Input or output is specified by the SPB1IO bit (see the description of bit 3,
  24200. SPB1IO, for details). When output is specified, the value of the SPB1DT bit is output to the SCK
  24201. pin. The SCK pin value is read from the SPB1DT bit regardless of the value of the SPB1IO bit.
  24202. The initial value of this bit after a power-on or manual reset is undefined.
  24203.  
  24204. Bit 2: SPB1DT Description
  24205.  
  24206. 0 Input/output data is low-level
  24207.  
  24208. 1 Input/output data is high-level
  24209.  
  24210. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output
  24211. condition. When the TxD pin is actually set as a port output pin and outputs the value set by the
  24212. SPB0DT bit, the TE bit in SCSCR1 should be cleared to 0.
  24213.  
  24214. Bit 1: SPB0IO Description
  24215.  
  24216. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  24217.  
  24218. 1 SPB0DT bit value is output to the TxD pin
  24219.  
  24220. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data
  24221. and TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  24222. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the value
  24223. of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the SPB0DT bit
  24224. regardless of the value of the SPB0IO bit. The initial value of this bit after a power-on or manual
  24225. reset is undefined.
  24226.  
  24227. Bit 0: SPB0DT Description
  24228.  
  24229. 0 Input/output data is low-level
  24230.  
  24231. 1 Input/output data is high-level
  24232.  
  24233. SCI I/O port block diagrams are shown in figures 15.2 to 15.4.
  24234. 480
  24235.  
  24236. ----------------------- Page 497-----------------------
  24237.  
  24238. Reset
  24239.  
  24240. R
  24241. Q D
  24242. SPB1IO
  24243. C
  24244.  
  24245. Internal data bus
  24246. SPTRW
  24247.  
  24248. Reset
  24249. MD0/SCK
  24250. R
  24251. Q D
  24252.  
  24253. SPB1DT
  24254. C SCI
  24255.  
  24256. SPTRW Clock output enable signal
  24257.  
  24258. Mode setting Serial clock output signal *
  24259. register
  24260. Serial clock input signal
  24261.  
  24262. Clock input enable signal
  24263.  
  24264. SPTRR
  24265.  
  24266. SPTRW: Write to SPTR
  24267. SPTRR: Read SPTR
  24268.  
  24269. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  24270. the CKE0 and CKE1 bits in SCSCR1 and the C/A bit in SCSMR1.
  24271.  
  24272.  
  24273. Figure 15.2 MD0/SCK Pin
  24274.  
  24275. 481
  24276.  
  24277. ----------------------- Page 498-----------------------
  24278.  
  24279. Reset
  24280.  
  24281. R
  24282. Q D
  24283. SPB0IO
  24284. C Internal data bus
  24285.  
  24286. SPTRW
  24287.  
  24288. Reset
  24289. MD7/TxD
  24290. R
  24291. Q D
  24292. SPB0DT
  24293. C SCI
  24294.  
  24295. SPTRW Transmit enable signal
  24296.  
  24297. Mode setting register
  24298.  
  24299. Serial transmit data
  24300.  
  24301. SPTRW: Write to SPTR
  24302.  
  24303. Figure 15.3 MD7/TxD Pin
  24304.  
  24305. SCI
  24306. RxD
  24307.  
  24308. Serial receive data
  24309.  
  24310. Internal data bus
  24311.  
  24312. SPTRR
  24313.  
  24314. SPTRR: Read SPTR
  24315.  
  24316. Figure 15.4 RxD Pin
  24317.  
  24318. 482
  24319.  
  24320. ----------------------- Page 499-----------------------
  24321.  
  24322. 1 5 . 2 . 9 Bit Rate Register (SCBRR1)
  24323.  
  24324. Bit: 7 6 5 4 3 2 1 0
  24325.  
  24326. Initial value: 1 1 1 1 1 1 1 1
  24327.  
  24328. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  24329.  
  24330. SCBRR1 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  24331. generator operating clock selected by bits CKS1 and CKS0 in SCSMR1.
  24332.  
  24333. SCBRR1 can be read or written to by the CPU at all times.
  24334.  
  24335. SCBRR1 is initialized to H'FF by a power-on reset or manual reset, in standby mode, and in the
  24336. module standby state.
  24337.  
  24338. The SCBRR1 setting is found from the following equations.
  24339.  
  24340. Asynchronous mode:
  24341.  
  24342.  
  24343. P
  24344. φ 6
  24345. N = × 10 – 1
  24346. 64 × 22n–1 × B
  24347.  
  24348. Synchronous mode:
  24349.  
  24350.  
  24351. P
  24352. φ 6
  24353. N = × 10 – 1
  24354. 8 × 22n–1 × B
  24355.  
  24356. Where B: Bit rate (bits/s)
  24357. N: SCBRR1 setting for baud rate generator (0 ≤ N ≤ 255)
  24358. Pφ : Peripheral module operating frequency (MHz)
  24359. n: Baud rate generator input clock (n = 0 to 3)
  24360. (See the table below for the relation between n and the clock.)
  24361.  
  24362. SCSMR1 Setting
  24363.  
  24364. n Clock CKS1 CKS0
  24365.  
  24366. 0 Pφ 0 0
  24367.  
  24368. 1 Pφ/4 0 1
  24369.  
  24370. 2 Pφ/16 1 0
  24371.  
  24372. 3 Pφ/64 1 1
  24373.  
  24374. 483
  24375.  
  24376. ----------------------- Page 500-----------------------
  24377.  
  24378. The bit rate error in asynchronous mode is found from the following equation:
  24379.  
  24380. P × 106
  24381. φ
  24382. Error (%) = 2n–1 – 1 × 100
  24383. (N + 1) × B × 64 × 2
  24384.  
  24385. Table 15.3 shows sample SCBRR1 settings in asynchronous mode, and table 15.4 shows sample
  24386. SCBRR1 settings in synchronous mode.
  24387.  
  24388. 484
  24389.  
  24390. ----------------------- Page 501-----------------------
  24391.  
  24392. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  24393.  
  24394. Pφ (MHz)
  24395.  
  24396. 2 2.097152 2.4576 3
  24397.  
  24398. Bit Rate Error Error Error Error
  24399. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24400.  
  24401. 110 1 141 0.03 1 148 –0.04 1 174 –0.26 1 212 0.03
  24402.  
  24403. 150 1 103 0.16 1 108 0.21 1 127 0.00 1 155 0.16
  24404.  
  24405. 300 0 207 0.16 0 217 0.21 0 255 0.00 1 77 0.16
  24406.  
  24407. 600 0 103 0.16 0 108 0.21 0 127 0.00 0 155 0.16
  24408.  
  24409. 1200 0 51 0.16 0 54 –0.70 0 63 0.00 0 77 0.16
  24410.  
  24411. 2400 0 25 0.16 0 26 1.14 0 31 0.00 0 38 0.16
  24412.  
  24413. 4800 0 12 0.16 0 13 –2.48 0 15 0.00 0 19 –2.34
  24414.  
  24415. 9600 0 6 –6.99 0 6 –2.48 0 7 0.00 0 9 –2.34
  24416.  
  24417. 19200 0 2 8.51 0 2 13.78 0 3 0.00 0 4 –2.34
  24418.  
  24419. 31250 0 1 0.00 0 1 4.86 0 1 22.88 0 2 0.00
  24420.  
  24421. 38400 0 1 –18.62 0 1 –14.67 0 1 0.00
  24422.  
  24423. Pφ (MHz)
  24424.  
  24425. 3 . 6 8 6 4 4 4 . 9 1 5 2 5
  24426.  
  24427. Bit Rate Error Error Error Error
  24428. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24429.  
  24430. 110 2 64 0.70 2 70 0.03 2 86 0.31 2 88 –0.25
  24431.  
  24432. 150 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  24433.  
  24434. 300 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  24435.  
  24436. 600 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  24437.  
  24438. 1200 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  24439.  
  24440. 2400 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  24441.  
  24442. 4800 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  24443.  
  24444. 9600 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  24445.  
  24446. 19200 0 5 0.00 0 6 –6.99 0 7 0.00 0 7 1.73
  24447.  
  24448. 31250 — — — 0 3 0.00 0 4 –1.70 0 4 0.00
  24449.  
  24450. 38400 0 2 0.00 0 2 8.51 0 3 0.00 0 3 1.73
  24451.  
  24452. Legend
  24453. Blank: No setting is available.
  24454. —: A setting is available but error occurs.
  24455.  
  24456. 485
  24457.  
  24458. ----------------------- Page 502-----------------------
  24459.  
  24460. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  24461. (cont)
  24462.  
  24463. Pφ (MHz)
  24464.  
  24465. 6 6 . 1 4 4 7.37288 8
  24466.  
  24467. Bit Rate Error Error Error Error
  24468. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24469.  
  24470. 110 2 106 –0.44 2 108 0.08 2 130 –0.07 2 141 0.03
  24471.  
  24472. 150 2 77 0.16 2 79 0.00 2 95 0.00 2 103 0.16
  24473.  
  24474. 300 1 155 0.16 1 159 0.00 1 191 0.00 1 207 0.16
  24475.  
  24476. 600 1 77 0.16 1 79 0.00 1 95 0.00 1 103 0.16
  24477.  
  24478. 1200 0 155 0.16 0 159 0.00 0 191 0.00 0 207 0.16
  24479.  
  24480. 2400 0 77 0.16 0 79 0.00 0 95 0.00 0 103 0.16
  24481.  
  24482. 4800 0 38 0.16 0 39 0.00 0 47 0.00 0 51 0.16
  24483.  
  24484. 9600 0 19 –2.34 0 19 0.00 0 23 0.00 0 25 0.16
  24485.  
  24486. 19200 0 9 –2.34 0 9 0.00 0 11 0.00 0 12 0.16
  24487.  
  24488. 31250 0 5 0.00 0 5 2.40 0 6 5.33 0 7 0.00
  24489.  
  24490. 38400 0 4 –2.34 0 4 0.00 0 5 0.00 0 6 –6.99
  24491.  
  24492. Pφ (MHz)
  24493.  
  24494. 9 . 8 3 0 4 1 0 1 2 1 2 . 2 8 8
  24495.  
  24496. Bit Rate Error Error Error Error
  24497. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24498.  
  24499. 110 2 174 –0.26 2 177 –0.25 2 212 0.03 2 217 0.08
  24500.  
  24501. 150 2 127 0.00 2 129 0.16 2 155 0.16 2 159 0.00
  24502.  
  24503. 300 1 255 0.00 2 64 0.16 2 77 0.16 2 79 0.00
  24504.  
  24505. 600 1 127 0.00 1 129 0.16 1 155 0.16 1 159 0.00
  24506.  
  24507. 1200 0 255 0.00 1 64 0.16 1 77 0.16 1 79 0.00
  24508.  
  24509. 2400 0 127 0.00 0 129 0.16 0 155 0.16 0 159 0.00
  24510.  
  24511. 4800 0 63 0.00 0 64 0.16 0 77 0.16 0 79 0.00
  24512.  
  24513. 9600 0 31 0.00 0 32 –1.36 0 38 0.16 0 39 0.00
  24514.  
  24515. 19200 0 15 0.00 0 15 1.73 0 19 0.16 0 19 0.00
  24516.  
  24517. 31250 0 9 –1.70 0 9 0.00 0 11 0.00 0 11 2.40
  24518.  
  24519. 38400 0 7 0.00 0 7 1.73 0 9 –2.34 0 9 0.00
  24520.  
  24521. 486
  24522.  
  24523. ----------------------- Page 503-----------------------
  24524.  
  24525. Table 15.3 Examples of Bit Rates and SCBRR1 Settings in Asynchronous Mode
  24526. (cont)
  24527.  
  24528. Pφ (MHz)
  24529.  
  24530. 14.7456 1 6 19.6608 2 0
  24531.  
  24532. Bit Rate Error Error Error Error
  24533. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24534.  
  24535. 110 3 64 0.70 3 70 0.03 3 86 0.31 3 88 –0.25
  24536.  
  24537. 150 2 191 0.00 2 207 0.16 2 255 0.00 3 64 0.16
  24538.  
  24539. 300 2 95 0.00 2 103 0.16 2 127 0.00 2 129 0.16
  24540.  
  24541. 600 1 191 0.00 1 207 0.16 1 255 0.00 2 64 0.16
  24542.  
  24543. 1200 1 95 0.00 1 103 0.16 1 127 0.00 1 129 0.16
  24544.  
  24545. 2400 0 191 0.00 0 207 0.16 0 255 0.00 1 64 0.16
  24546.  
  24547. 4800 0 95 0.00 0 103 0.16 0 127 0.00 0 129 0.16
  24548.  
  24549. 9600 0 47 0.00 0 51 0.16 0 63 0.00 0 64 0.16
  24550.  
  24551. 19200 0 23 0.00 0 25 0.16 0 31 0.00 0 32 –1.36
  24552.  
  24553. 31250 0 14 –1.70 0 15 0.00 0 19 –1.70 0 19 0.00
  24554.  
  24555. 38400 0 11 0.00 0 12 0.16 0 15 0.00 0 15 1.73
  24556.  
  24557. Pφ (MHz)
  24558.  
  24559. 2 4 2 4 . 5 7 6 2 8 . 7 3 0
  24560.  
  24561. Bit Rate Error Error Error Error
  24562. (bits/s) n N ( % ) n N ( % ) n N ( % ) n N ( % )
  24563.  
  24564. 110 3 106 –0.44 3 108 0.08 3 126 0.31 3 132 0.13
  24565.  
  24566. 150 3 77 0.16 3 79 0.00 3 92 0.46 3 97 –0.35
  24567.  
  24568. 300 2 155 0.16 2 159 0.00 2 186 –0.08 2 194 0.16
  24569.  
  24570. 600 2 77 0.16 2 79 0.00 2 92 0.46 2 97 –0.35
  24571.  
  24572. 1200 1 155 0.16 1 159 0.00 1 186 –0.08 1 194 0.16
  24573.  
  24574. 2400 1 77 0.16 1 79 0.00 1 92 0.46 1 97 –0.35
  24575.  
  24576. 4800 0 155 0.16 0 159 0.00 0 186 –0.08 0 194 –1.36
  24577.  
  24578. 9600 0 77 0.16 0 79 0.00 0 92 0.46 0 97 –0.35
  24579.  
  24580. 19200 0 38 0.16 0 39 0.00 0 46 –0.61 0 48 –0.35
  24581.  
  24582. 31250 0 23 0.00 0 24 –1.70 0 28 –1.03 0 29 0.00
  24583.  
  24584. 38400 0 19 –2.34 0 19 0.00 0 22 1.55 0 23 1.73
  24585.  
  24586. 487
  24587.  
  24588. ----------------------- Page 504-----------------------
  24589.  
  24590. Table 15.4 Examples of Bit Rates and SCBRR1 Settings in Synchronous Mode
  24591.  
  24592. Pφ (MHz)
  24593.  
  24594. 4 8 1 6 2 8 . 7 3 0
  24595.  
  24596. Bit Rate n N n N n N n N n N
  24597. (bits/s)
  24598.  
  24599. 10 — — — — — — — — — —
  24600.  
  24601. 250 2 249 3 124 3 249 — — — —
  24602.  
  24603. 500 2 124 2 249 3 124 3 223 3 233
  24604.  
  24605. 1k 1 249 2 124 2 249 3 111 3 116
  24606.  
  24607. 2.5k 1 99 1 199 2 99 2 178 2 187
  24608.  
  24609. 5k 0 199 1 99 1 199 2 89 2 93
  24610.  
  24611. 10k 0 99 0 199 1 99 1 178 1 187
  24612.  
  24613. 25k 0 39 0 79 0 159 1 71 1 74
  24614.  
  24615. 50k 0 19 0 39 0 79 0 143 0 149
  24616.  
  24617. 100k 0 9 0 19 0 39 0 71 0 74
  24618.  
  24619. 250k 0 3 0 7 0 15 — — 0 29
  24620.  
  24621. 500k 0 1 0 3 0 7 — — 0 14
  24622.  
  24623. 1M 0 0* 0 1 0 3 — — — —
  24624.  
  24625. 2M 0 0* 0 1 — — — —
  24626.  
  24627. Note: As far as possible, the setting should be made so that the error is within 1%.
  24628. Legend
  24629. Blank: No setting is available.
  24630. —: A setting is available but error occurs.
  24631. * Continuous transmission/reception is not possible.
  24632.  
  24633. 488
  24634.  
  24635. ----------------------- Page 505-----------------------
  24636.  
  24637. Table 15.5 shows the maximum bit rate for various frequencies in asynchronous mode. Tables
  24638. 15.6 and 15.7 show the maximum bit rates with external clock input.
  24639.  
  24640. Table 15.5 Maximum Bit Rate for Various Frequencies with Baud Rate
  24641. Generator (Asynchronous Mode)
  24642.  
  24643. Settings
  24644.  
  24645. Pφ (MHz) Maximum Bit Rate n N
  24646. (bits/s)
  24647.  
  24648. 2 62500 0 0
  24649.  
  24650. 2.097152 65536 0 0
  24651.  
  24652. 2.4576 76800 0 0
  24653.  
  24654. 3 93750 0 0
  24655.  
  24656. 3.6864 115200 0 0
  24657.  
  24658. 4 125000 0 0
  24659.  
  24660. 4.9152 153600 0 0
  24661.  
  24662. 8 250000 0 0
  24663.  
  24664. 9.8304 307200 0 0
  24665.  
  24666. 12 375000 0 0
  24667.  
  24668. 14.7456 460800 0 0
  24669.  
  24670. 16 500000 0 0
  24671.  
  24672. 19.6608 614400 0 0
  24673.  
  24674. 20 625000 0 0
  24675.  
  24676. 24 750000 0 0
  24677.  
  24678. 24.576 768000 0 0
  24679.  
  24680. 28.7 896875 0 0
  24681.  
  24682. 30 937500 0 0
  24683.  
  24684. 489
  24685.  
  24686. ----------------------- Page 506-----------------------
  24687.  
  24688. Table 15.6 Maximum Bit Rate with External Clock Input (Asynchronous Mode)
  24689.  
  24690. Pφ (MHz) External Input Clock (MHz)Maximum Bit Rate (bits/s)
  24691.  
  24692. 2 0.5000 31250
  24693.  
  24694. 2.097152 0.5243 32768
  24695.  
  24696. 2.4576 0.6144 38400
  24697.  
  24698. 3 0.7500 46875
  24699.  
  24700. 3.6864 0.9216 57600
  24701.  
  24702. 4 1.0000 62500
  24703.  
  24704. 4.9152 1.2288 76800
  24705.  
  24706. 8 2.0000 125000
  24707.  
  24708. 9.8304 2.4576 153600
  24709.  
  24710. 12 3.0000 187500
  24711.  
  24712. 14.7456 3.6864 230400
  24713.  
  24714. 16 4.0000 250000
  24715.  
  24716. 19.6608 4.9152 307200
  24717.  
  24718. 20 5.0000 312500
  24719.  
  24720. 24 6.0000 375000
  24721.  
  24722. 24.576 6.1440 384000
  24723.  
  24724. 28.7 7.1750 448436
  24725.  
  24726. 30 7.5000 468750
  24727.  
  24728. Table 15.7 Maximum Bit Rate with External Clock Input (Synchronous Mode)
  24729.  
  24730. Pφ (MHz) External Input Clock (MHz)Maximum Bit Rate (bits/s)
  24731.  
  24732. 8 1.3333 1333333.3
  24733.  
  24734. 16 2.6667 2666666.7
  24735.  
  24736. 24 4.0000 4000000.0
  24737.  
  24738. 28.7 4.7833 4783333.3
  24739.  
  24740. 30 5.0000 5000000.0
  24741.  
  24742. 490
  24743.  
  24744. ----------------------- Page 507-----------------------
  24745.  
  24746. 1 5 . 3 Operation
  24747.  
  24748. 1 5 . 3 . 1 Overview
  24749.  
  24750. The SCI can carry out serial communication in two modes: asynchronous mode in which
  24751. synchronization is achieved character by character, and synchronous mode in which synchronization
  24752. is achieved with clock pulses.
  24753.  
  24754. Selection of asynchronous or synchronous mode and the transmission format is made using
  24755. SCSMR1 as shown in table 15.8. The SCI clock source is determined by a combination of the
  24756. C/A bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1, as shown in table 15.9.
  24757.  
  24758. • Asynchronous mode
  24759.  
  24760.  Data length: Choice of 7 or 8 bits
  24761.  
  24762.  Choice of parity addition, multiprocessor bit addition, and addition of 1 or 2 stop bits (the
  24763. combination of these parameters determines the transfer format and character length)
  24764.  
  24765.  Detection of framing, parity, and overrun errors, and breaks, during reception
  24766.  
  24767.  Choice of internal or external clock as SCI clock source
  24768.  
  24769. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  24770. clock with the same frequency as the bit rate can be output.
  24771.  
  24772. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  24773. input (the on-chip baud rate generator is not used).
  24774.  
  24775. • Synchronous mode
  24776.  
  24777.  Transfer format: Fixed 8-bit data
  24778.  
  24779.  Detection of overrun errors during reception
  24780.  
  24781.  Choice of internal or external clock as SCI clock source
  24782.  
  24783. When internal clock is selected: The SCI operates on the baud rate generator clock and a
  24784. serial clock is output off-chip.
  24785.  
  24786. When external clock is selected: The on-chip baud rate generator is not used, and the SCI
  24787. operates on the input serial clock.
  24788.  
  24789. 491
  24790.  
  24791. ----------------------- Page 508-----------------------
  24792.  
  24793. Table 15.8SCSMR1 Settings for Serial Transfer Format Selection
  24794.  
  24795. SCSMR1 Settings SCI Transfer Format
  24796.  
  24797. Multi-
  24798. Bit 7: Bit 6: Bit 2: Bit 5: Bit 3: Data processo Parity Stop
  24799. C/A CHR M P P E S TO Mode Length r Bit Bit Bit
  24800. P Length
  24801.  
  24802. 0 0 0 0 0 Asynchronous 8-bit data No No 1 bit
  24803. mode
  24804.  
  24805. 1 2 bits
  24806.  
  24807. 1 0 Yes 1 bit
  24808.  
  24809. 1 2 bits
  24810.  
  24811. 1 0 0 7-bit data No 1 bit
  24812.  
  24813. 1 2 bits
  24814.  
  24815. 1 0 Yes 1 bit
  24816.  
  24817. 1 2 bits
  24818.  
  24819. 0 1 * 0 Asynchronous 8-bit data Yes No 1 bit
  24820. mode
  24821. (multiprocessor
  24822. format)
  24823.  
  24824. 1 2 bits
  24825.  
  24826. 1 0 7-bit data 1 bit
  24827.  
  24828. 1 2 bits
  24829.  
  24830. 1 * * * * Synchronous 8-bit data No None
  24831. mode
  24832.  
  24833. Note: An asterisk in the table means “Don’t care.”
  24834.  
  24835. 492
  24836.  
  24837. ----------------------- Page 509-----------------------
  24838.  
  24839. Table 15.9SCSMR1 and SCSCR1 Settings for SCI Clock Source Selection
  24840.  
  24841. SCSMR1 SCSCR1 Setting SCI Transmit/Receive Clock
  24842.  
  24843. Bit 7: Bit 1: Bit 0: Clock
  24844. C/A CKE1 CKE0 Mode Source SCK Pin Function
  24845.  
  24846. 0 0 0 Asynchronous Internal SCI does not use SCK pin
  24847. mode
  24848.  
  24849. 1 Outputs clock with same
  24850. frequency as bit rate
  24851.  
  24852. 1 0 External Inputs clock with frequency
  24853. of 16 times the bit rate
  24854.  
  24855. 1
  24856.  
  24857. 1 0 0 Synchronous Internal Outputs serial clock
  24858. mode
  24859.  
  24860. 1
  24861.  
  24862. 1 0 External Inputs serial clock
  24863.  
  24864. 1
  24865.  
  24866. 1 5 . 3 . 2 Operation in Asynchronous Mode
  24867.  
  24868. In asynchronous mode, characters are sent or received, each preceded by a start bit indicating the
  24869. start of communication and followed by one or two stop bits indicating the end of communication.
  24870. Serial communication is thus carried out with synchronization established on a character-by-
  24871. character basis.
  24872.  
  24873. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  24874. communication. Both the transmitter and the receiver also have a double-buffered structure, so that
  24875. data can be read or written during transmission or reception, enabling continuous data transfer.
  24876.  
  24877. Figure 15.5 shows the general format for asynchronous serial communication.
  24878.  
  24879. In asynchronous serial communication, the transmission line is usually held in the mark state
  24880. (high level). The SCI monitors the transmission line, and when it goes to the space state (low
  24881. level), recognizes a start bit and starts serial communication.
  24882.  
  24883. One serial communication character consists of a start bit (low level), followed by data (in LSB-
  24884. first order), a parity bit (high or low level), and finally one or two stop bits (high level).
  24885.  
  24886. In asynchronous mode, the SCI performs synchronization at the falling edge of the start bit in
  24887. reception. The SCI samples the data on the eighth pulse of a clock with a frequency of 16 times
  24888. the length of one bit, so that the transfer data is latched at the center of each bit.
  24889.  
  24890. 493
  24891.  
  24892. ----------------------- Page 510-----------------------
  24893.  
  24894. Idle state (mark state)
  24895.  
  24896. 1 (LSB) (MSB) 1
  24897.  
  24898. Serial 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  24899. data
  24900.  
  24901. Start Parity Stop
  24902. bit bit bit(s)
  24903. Transmit/receive data
  24904.  
  24905. 1 bit 7 or 8 bits 1 bit, 1 or
  24906. or none 2 bits
  24907.  
  24908. One unit of transfer data (character or frame)
  24909.  
  24910. Figure 15.5 Data Format in Asynchronous Communication (Example with 8-
  24911. Bit Data, Parity, Two Stop Bits)
  24912.  
  24913. Data Transfer Format
  24914.  
  24915. Table 15.10 shows the data transfer formats that can be used in asynchronous mode. Any of 12
  24916. transfer formats can be selected according to the SCSMR1 setting.
  24917.  
  24918. 494
  24919.  
  24920. ----------------------- Page 511-----------------------
  24921.  
  24922. Table 15.10 Serial Transfer Formats (Asynchronous Mode)
  24923.  
  24924. SCSMR1 Serial Transfer Format and Frame Length
  24925. Settings
  24926.  
  24927. CHR PE MP STOP 1 2 3 4 5 6 7 8 9 10 11 12
  24928.  
  24929. 0 0 0 0 S 8-bit data STOP
  24930.  
  24931. 0 0 0 1 S 8-bit data STOP STOP
  24932.  
  24933. 0 1 0 0 S 8-bit data P STOP
  24934.  
  24935. 0 1 0 1 S 8-bit data P STOP STOP
  24936.  
  24937. 1 0 0 0 S 7-bit data STOP
  24938.  
  24939. 1 0 0 1 S 7-bit data STOP STOP
  24940.  
  24941. 1 1 0 0 S 7-bit data P STOP
  24942.  
  24943. 1 1 0 1 S 7-bit data P STOP STOP
  24944.  
  24945. 0 * 1 0 S 8-bit data MPB STOP
  24946.  
  24947. 0 * 1 1 S 8-bit data MPB STOP STOP
  24948.  
  24949. 1 * 1 0 S 7-bit data MPB STOP
  24950.  
  24951. 1 * 1 1 S 7-bit data MPB STOP STOP
  24952.  
  24953. S: Start bit
  24954. STOP: Stop bit
  24955. P: Parity bit
  24956. MPB: Multiprocessor bit
  24957. Note: An asterisk in the table means “Don’t care.”
  24958.  
  24959. 495
  24960.  
  24961. ----------------------- Page 512-----------------------
  24962.  
  24963. Clock
  24964.  
  24965. Either an internal clock generated by the on-chip baud rate generator or an external clock input at
  24966. the SCK pin can be selected as the SCI’s serial clock, according to the setting of the C/A bit in
  24967. SCSMR1 and the CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection,
  24968. see table 15.9.
  24969.  
  24970. When an external clock is input at the SCK pin, the clock frequency should be 16 times the bit
  24971. rate used.
  24972.  
  24973. When the SCI is operated on an internal clock, the clock can be output from the SCK pin. The
  24974. frequency of the clock output in this case is equal to the bit rate, and the phase is such that the
  24975. rising edge of the clock is at the center of each transmit data bit, as shown in figure 15.6.
  24976.  
  24977. 0 D0 D1 D2 D3 D4 D5 D6 D7 0/1 1 1
  24978.  
  24979. One frame
  24980.  
  24981. Figure 15.6 Relation between Output Clock and Transfer Data Phase
  24982. (Asynchronous Mode)
  24983.  
  24984. Data Transfer Operations
  24985.  
  24986. SCI Initialization (Asynchronous Mode): Before transmitting and receiving data, it is
  24987. necessary to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  24988.  
  24989. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared to
  24990. 0 before making the change using the following procedure. When the TE bit is cleared to 0, the
  24991. TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  24992. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  24993.  
  24994. When an external clock is used the clock should not be stopped during operation, including
  24995. initialization, since operation will be unreliable in this case.
  24996.  
  24997. Figure 15.7 shows a sample SCI initialization flowchart.
  24998.  
  24999. 496
  25000.  
  25001. ----------------------- Page 513-----------------------
  25002.  
  25003. 1. Set the clock selection in SCSCR1.
  25004. Initialization
  25005. Be sure to clear bits RIE, TIE, TEIE,
  25006. and MPIE, and bits TE and RE, to 0.
  25007. Clear TE and RE bits
  25008. in SCSCR1 to 0 When clock output is selected in
  25009. asynchronous mode, it is output
  25010. immediately after SCSCR1 settings
  25011. Set CKE1 and CKE0 bits are made.
  25012. in SCSCR1 (leaving TE and 2. Set the data transfer format in
  25013. RE bits cleared to 0) SCSMR1.
  25014.  
  25015. 3. Write a value corresponding to the
  25016. Set data transfer format bit rate into SCBRR1. (Not
  25017. in SCSMR1 necessary if an external clock is
  25018.  
  25019. used.)
  25020.  
  25021. Set value in SCBRR1 4. Wait at least one bit interval, then set
  25022. the TE bit or RE bit in SCSCR1 to 1.
  25023. Wait Also set the RIE, TIE, TEIE, and
  25024. MPIE bits.
  25025.  
  25026. No Setting the TE and RE bits enables
  25027. 1-bit interval elapsed?
  25028. the TxD and RxD pins to be used.
  25029. When transmitting, the SCI will go to
  25030. Yes the mark state; when receiving, it will
  25031. go to the idle state, waiting for a start
  25032. Set TE and RE bits in SCSCR1
  25033. bit.
  25034. to 1, and set RIE, TIE, TEIE,
  25035. and MPIE bits
  25036.  
  25037. End
  25038.  
  25039. Figure 15.7 Sample SCI Initialization Flowchart
  25040.  
  25041. Serial Data Transmission (Asynchronous Mode): Figure 15.8 shows a sample
  25042. flowchart for serial transmission.
  25043.  
  25044. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  25045.  
  25046. 497
  25047.  
  25048. ----------------------- Page 514-----------------------
  25049.  
  25050. Start of transmission 1. SCI status check and transmit data
  25051. write: Read SCSSR1 and check that
  25052. the TDRE flag is set to 1, then write
  25053. transmit data to SCTDR1 and clear
  25054. Read TDRE flag in SCSSR1
  25055. the TDRE flag to 0.
  25056.  
  25057. 2. Serial transmission continuation
  25058. No
  25059. TDRE = 1? procedure: To continue serial
  25060. transmission, read 1 from the TDRE
  25061. Yes flag to confirm that writing is possible,
  25062. then write data to SCTDR1, and then
  25063. Write transmit data to SCTDR1 clear the TDRE flag to 0. (Checking
  25064. and clear TDRE flag and clearing of the TDRE flag is
  25065. in SCSSR1 to 0 automatic when the direct memory
  25066. access controller (DMAC) is activated
  25067. by a transmit-data-empty interrupt
  25068. No (TXI) request, and data is written to
  25069. All data transmitted?
  25070. SCTDR1.)
  25071.  
  25072. Yes 3. Break output at the end of serial
  25073. transmission: To output a break in
  25074. serial transmission, clear the SPB0DT
  25075. Read TEND flag in SCSSR1 bit to 0 and set the SPB0IO bit to 1 in
  25076. SCSPTR, then clear the TE bit in
  25077. SCSCR1 to 0.
  25078. No
  25079. TEND = 1?
  25080.  
  25081.  
  25082. Yes
  25083.  
  25084. No
  25085. Break output?
  25086.  
  25087. Yes
  25088.  
  25089. Clear SPB0DT to 0 and
  25090. set SPB0IO to 1
  25091.  
  25092. Clear TE bit in SCSCR1 to 0
  25093.  
  25094. End of transmission
  25095.  
  25096. Figure 15.8 Sample Serial Transmission Flowchart
  25097.  
  25098. In serial transmission, the SCI operates as described below.
  25099.  
  25100. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  25101. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  25102. SCTSR1.
  25103.  
  25104. 498
  25105.  
  25106. ----------------------- Page 515-----------------------
  25107.  
  25108. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25109. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI) is
  25110. generated.
  25111.  
  25112. The serial transmit data is sent from the TxD pin in the following order.
  25113.  
  25114. a. Start bit: One 0-bit is output.
  25115.  
  25116. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  25117.  
  25118. c. Parity bit or multiprocessor bit: One parity bit (even or odd parity), or one multiprocessor
  25119. bit is output. (A format in which neither a parity bit nor a multiprocessor bit is output can
  25120. also be selected.)
  25121.  
  25122. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  25123.  
  25124. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  25125. sent.
  25126.  
  25127. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is
  25128. cleared to 0, data is transferred from SCTDR1 to SCTSR1, the stop bit is sent, and then serial
  25129. transmission of the next frame is started.
  25130.  
  25131. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and
  25132. then the line goes to the mark state in which 1 is output continuously. If the TEIE bit in
  25133. SCSCR1 is set to 1 at this time, a TEI interrupt request is generated.
  25134.  
  25135. Figure 15.9 shows an example of the operation for transmission in asynchronous mode.
  25136.  
  25137. Start Data Parity Stop Start Data Parity Stop
  25138. 1 bit bit bit bit bit bit 1
  25139.  
  25140. Serial Idle state
  25141. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  25142. data (mark state)
  25143.  
  25144. TDRE
  25145.  
  25146. TEND
  25147.  
  25148. TXI interrupt TXI interrupt
  25149. request request
  25150. Data written to SCTDR1 TEI interrupt
  25151. and TDRE flag cleared to request
  25152. 0 by TXI interrupt handler
  25153.  
  25154. One frame
  25155.  
  25156. Figure 15.9 Example of Transmit Operation in Asynchronous Mode
  25157. (Example with 8-Bit Data, Parity, One Stop Bit)
  25158.  
  25159. Serial Data Reception (Asynchronous Mode): Figure 15.10 shows a sample flowchart
  25160. for serial reception.
  25161. 499
  25162.  
  25163. ----------------------- Page 516-----------------------
  25164.  
  25165. Use the following procedure for serial data reception after enabling the SCI for reception.
  25166.  
  25167. Start of reception 1. Receive error handling and
  25168. break detection: If a receive
  25169. error occurs, read the ORER,
  25170. PER, and FER flags in
  25171. Read ORER, PER, and FER flags SCSSR1 to identify the error.
  25172. in SCSSR1 After performing the
  25173. appropriate error handling,
  25174. ensure that the ORER, PER,
  25175. PER or FER Yes
  25176. and FER flags are all cleared to
  25177. or ORER = 1?
  25178. 0. Reception cannot be
  25179. No Error handling resumed if any of these flags
  25180. are set to 1. In the case of a
  25181. framing error, a break can be
  25182. Read RDRF flag in SCSSR1
  25183. detected by reading the value
  25184. of the RxD pin.
  25185.  
  25186. No 2. SCI status check and receive
  25187. RDRF = 1?
  25188. data read : Read SCSSR1 and
  25189. check that RDRF = 1, then read
  25190. Yes
  25191. the receive data in SCRDR1
  25192. and clear the RDRF flag to 0.
  25193. Read receive data in SCRDR1,
  25194. and clear RDRF flag 3. Serial reception continuation
  25195. in SCSSR1 to 0 procedure: To continue serial
  25196. reception, complete zero-
  25197. clearing of the RDRF flag
  25198. No All data received? before the stop bit for the
  25199. current frame is received. (The
  25200. RDRF flag is cleared
  25201. Yes automatically when the direct
  25202.  
  25203. memory access controller
  25204. Clear RE bit in SCSCR1 to 0
  25205. (DMAC) is activated by an RXI
  25206. interrupt and the SCRDR1
  25207.  
  25208. value is read.)
  25209. End of reception
  25210.  
  25211. Figure 15.10 Sample Serial Reception Flowchart (1)
  25212.  
  25213. 500
  25214.  
  25215. ----------------------- Page 517-----------------------
  25216.  
  25217. Error handling
  25218.  
  25219. No
  25220. ORER = 1?
  25221.  
  25222. Yes
  25223.  
  25224. Overrun error handling
  25225.  
  25226. No
  25227. FER = 1?
  25228.  
  25229. Yes
  25230.  
  25231. Yes
  25232. Break?
  25233.  
  25234. No
  25235.  
  25236. Framing error handling Clear RE bit in SCSCR1 to 0
  25237.  
  25238. No
  25239. PER = 1?
  25240.  
  25241. Yes
  25242.  
  25243. Parity error handling
  25244.  
  25245. Clear ORER, PER, and FER flags
  25246. in SCSSR1 to 0
  25247.  
  25248. End
  25249.  
  25250.  
  25251. Figure 15.10 Sample Serial Reception Flowchart (2)
  25252.  
  25253. In serial reception, the SCI operates as described below.
  25254.  
  25255. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  25256. synchronization and starts reception.
  25257.  
  25258. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25259.  
  25260. 3. The parity bit and stop bit are received.
  25261.  
  25262. 501
  25263.  
  25264. ----------------------- Page 518-----------------------
  25265.  
  25266. After receiving these bits, the SCI carries out the following checks.
  25267.  
  25268. a. Parity check: The SCI checks whether the number of 1-bits in the receive data agrees with
  25269. the parity (even or odd) set in the O/E bit in SCSMR1.
  25270.  
  25271. b. Stop bit check: The SCI checks whether the stop bit is 1. If there are two stop bits, only
  25272. the first is checked.
  25273.  
  25274. c. Status check: The SCI checks whether the RDRF flag is 0, indicating that the receive data
  25275. can be transferred from SCRSR1 to SCRDR1.
  25276.  
  25277. If all the above checks are passed, the RDRF flag is set to 1, and the receive data is stored in
  25278. SCRDR1.
  25279.  
  25280. If a receive error is detected in the error check, the operation is as shown in table 15.11.
  25281.  
  25282. Note: No further receive operations can be performed when a receive error has occurred. Also note
  25283. that the RDRF flag is not set to 1 in reception, and so the error flags must be cleared to 0.
  25284.  
  25285. 4. If the EIO bit in SCSPTR1 is cleared to 0 and the RIE bit in SCSCR1 is set to 1 when the
  25286. RDRF flag changes to 1, a receive-data-full interrupt (RXI) request is generated.
  25287.  
  25288. If the RIE bit in SCSCR1 is set to 1 when the ORER, PER, or FER flag changes to 1, a
  25289. receive-error interrupt (ERI) request is generated. A receive-data-full request is always output to
  25290. the DMAC when the RDRF flag changes to 1.
  25291.  
  25292. Table 15.11 Receive Error Conditions
  25293.  
  25294. Receive Error Abbreviation Condition Data Transfer
  25295.  
  25296. Overrun error ORER Reception of next data is Receive data is not transferred
  25297. completed while RDRF flag from SCRSR1 to SCRDR1
  25298. in SCSSR1 is set to 1
  25299.  
  25300. Framing error FER Stop bit is 0 Receive data is transferred
  25301. from SCRSR1 to SCRDR1
  25302.  
  25303. Parity error PER Received data parity differs Receive data is transferred
  25304. from that (even or odd) set from SCRSR1 to SCRDR1
  25305. in SCSMR1
  25306.  
  25307. Figure 15.11 shows an example of the operation for reception in asynchronous mode.
  25308.  
  25309. 502
  25310.  
  25311. ----------------------- Page 519-----------------------
  25312.  
  25313. Start Data Parity Stop Start Data Parity Stop
  25314. 1 bit bit bit bit bit bit
  25315.  
  25316. Serial
  25317. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  25318. data
  25319.  
  25320. RDRF
  25321.  
  25322. FER
  25323.  
  25324. RXI interrupt
  25325. request SCRDR1 data read and ERI interrupt request
  25326. RDRF flag cleared to 0 generated by framing
  25327. One frame by RXI interrupt handler error
  25328.  
  25329. Figure 15.11 Example of SCI Receive Operation
  25330. (Example with 8-Bit Data, Parity, One Stop Bit)
  25331.  
  25332. 1 5 . 3 . 3 Multiprocessor Communication Function
  25333.  
  25334. The multiprocessor communication function performs serial communication using a
  25335. multiprocessor format, in which a multiprocessor bit is added to the transfer data, in asynchronous
  25336. mode. Use of this function enables data transfer to be performed among a number of processors
  25337. sharing a serial transmission line.
  25338.  
  25339. When multiprocessor communication is carried out, each receiving station is addressed by a unique
  25340. ID code.
  25341.  
  25342. The serial communication cycle consists of two cycles: an ID transmission cycle which specifies
  25343. the receiving station , and a data transmission cycle. The multiprocessor bit is used to differentiate
  25344. between the ID transmission cycle and the data transmission cycle.
  25345.  
  25346. The transmitting station first sends the ID of the receiving station with which it wants to perform
  25347. serial communication as data with a 1 multiprocessor bit added. It then sends transmit data as data
  25348. with a 0 multiprocessor bit added.
  25349.  
  25350. The receiving station skips the data until data with a 1 multiprocessor bit is sent.
  25351.  
  25352. When data with a 1 multiprocessor bit is received, the receiving station compares that data with its
  25353. own ID. The station whose ID matches then receives the data sent next. Stations whose ID does
  25354. not match continue to skip the data until data with a 1 multiprocessor bit is again received. In this
  25355. way, data communication is carried out among a number of processors.
  25356.  
  25357. Figure 15.12 shows an example of inter-processor communication using a multiprocessor format.
  25358.  
  25359. 503
  25360.  
  25361. ----------------------- Page 520-----------------------
  25362.  
  25363. Transmitting
  25364. station
  25365.  
  25366. Serial transmission line
  25367.  
  25368. Receiving Receiving Receiving Receiving
  25369. station A station B station C station D
  25370.  
  25371. (ID = 01) (ID = 02) (ID = 03) (ID = 04)
  25372.  
  25373. Serial
  25374. H'01 H'AA
  25375. data
  25376. (MPB = 1) (MPB = 0)
  25377.  
  25378. ID transmission cycle: Data transmission cycle:
  25379. Receiving station Data transmission to
  25380. specification receiving station specified
  25381. by ID
  25382.  
  25383. MPB: Multiprocessor bit
  25384.  
  25385. Figure 15.12 Example of Inter-Processor Communication Using
  25386. Multiprocessor Format (Transmission of Data H'AA to Receiving Station A)
  25387.  
  25388. Data Transfer Formats
  25389.  
  25390. There are four data transfer formats. When the multiprocessor format is specified, the parity bit
  25391. specification is invalid. For details, see table 15.10.
  25392.  
  25393. Clock
  25394.  
  25395. See the description under Clock in section 15.3.2.
  25396.  
  25397. Data Transfer Operations
  25398.  
  25399. Multiprocessor Serial Data Transmission: Figure 15.13 shows a sample flowchart for
  25400. multiprocessor serial data transmission.
  25401.  
  25402. Use the following procedure for multiprocessor serial data transmission after enabling the SCI for
  25403. transmission.
  25404.  
  25405. 504
  25406.  
  25407. ----------------------- Page 521-----------------------
  25408.  
  25409. Start of transmission
  25410. 1. SCI status check and ID data write:
  25411. Read SCSSR1 and check that the
  25412. Read TEND flag in SCSSR1 TEND flag is set to 1, then set the
  25413. MPBT bit in SCSSR1 to 1 and write
  25414. ID data to SCTDR1. Finally, clear the
  25415. No
  25416. TEND = 1? TDRE flag to 0.
  25417.  
  25418. 2. Preparation for data transfer: Read
  25419. Yes SCSSR1 and check that the TEND
  25420. flag is set to 1, then set the MPBT bit
  25421. Set MPBT bit in SCSSR1 to 1 and
  25422. in SCSSR1 to 1.
  25423. write ID data to SCTDR1
  25424. 3. Serial data transmission: Write the
  25425. first transmit data to SCTDR1, then
  25426. Clear TDRE flag to 0
  25427. clear the TDRE flag to 0.
  25428.  
  25429. To continue data transmission, be
  25430. Read TEND flag in SCSSR1 sure to read 1 from the TDRE flag to
  25431. confirm that writing is possible, then
  25432. write data to SCTDR1, and then clear
  25433. No the TDRE flag to 0. (Checking and
  25434. TEND = 1?
  25435. clearing of the TDRE flag is
  25436. automatic when the direct memory
  25437. Yes
  25438. access controller (DMAC) is
  25439. Clear MPBT bit in SCSSR1 to 0 activated by a transmit-data-empty
  25440. interrupt (TXI) request, and data is
  25441. written to SCTDR1.)
  25442.  
  25443. Write data to SCTDR1
  25444.  
  25445. Clear TDRE flag to 0
  25446.  
  25447. Read TDRE flag in SCSSR1
  25448.  
  25449. No
  25450. TDRE = 1?
  25451.  
  25452. Yes
  25453.  
  25454. No
  25455. All data transmitted?
  25456.  
  25457. Yes
  25458.  
  25459. End of transmission
  25460.  
  25461. Figure 15.13 Sample Multiprocessor Serial Transmission Flowchart
  25462.  
  25463. 505
  25464.  
  25465. ----------------------- Page 522-----------------------
  25466.  
  25467. In serial transmission, the SCI operates as described below.
  25468.  
  25469. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  25470. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  25471. SCTSR1.
  25472.  
  25473. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25474. transmission.
  25475.  
  25476. The serial transmit data is sent from the TxD pin in the following order.
  25477.  
  25478. a. Start bit: One 0-bit is output.
  25479.  
  25480. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  25481.  
  25482. c. Multiprocessor bit: One multiprocessor bit (MPBT value) is output.
  25483.  
  25484. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  25485.  
  25486. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  25487. sent.
  25488.  
  25489. 3. The SCI checks the TDRE flag at the timing for sending the stop bit. If the TDRE flag is set
  25490. to 1, the TEND flag in SCSSR1 is set to 1, the stop bit is sent, and then the line goes to the
  25491. mark state in which 1 is output. If the TEIE bit in SCSCR1 is set to 1 at this time, a
  25492. transmit-end interrupt (TEI) request is generated.
  25493.  
  25494. 4. The SCI monitors the TDRE flag. When TDRE is cleared to 0, the SCI recognizes that data
  25495. has been written to SCTDR1, and transfers the data from SCTDR1 to SCTSR1.
  25496.  
  25497. 5. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25498. transmitting. If the transmit-data-empty interrupt enable bit (TIE bit) in SCSCR1 is set to 1 at
  25499. this time, a transmit-data-empty interrupt (TXI) request is generated.
  25500.  
  25501. The order of transmission is the same as in step 2.
  25502.  
  25503. Figure 15.14 shows an example of SCI operation for transmission using a multiprocessor format.
  25504.  
  25505. 506
  25506.  
  25507. ----------------------- Page 523-----------------------
  25508.  
  25509. Multi- Multi- Multi-
  25510. Start Data proces- Stop Start Data proces- Stop Start Data proces- Stop
  25511. 1 bit sor bit bit bit sor bit bit bit sor bit bit 1
  25512.  
  25513. Serial Idle state
  25514. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 0 D0 D1 D7 0
  25515. data (mark state)
  25516.  
  25517. TDRE
  25518.  
  25519. TEND
  25520.  
  25521. One frame Data written to SCTDR1 TXI interrupt
  25522. and TDRE flag cleared request TEI interrupt
  25523. to 0 by TXI interrupt request
  25524. handler
  25525.  
  25526. MPBT bit cleared to 0, data
  25527. written to SCTDR1, and
  25528. TDRE flag cleared to 0 by
  25529. TEI interrupt handler
  25530.  
  25531. Figure 15.14 Example of SCI Transmit Operation (Example with 8-Bit Data,
  25532. Multiprocessor Bit, One Stop Bit)
  25533.  
  25534. Multiprocessor Serial Data Reception: Figure 15.15 shows a sample flowchart for
  25535. multiprocessor serial reception.
  25536.  
  25537. Use the following procedure for multiprocessor serial data reception after enabling the SCI for
  25538. reception.
  25539.  
  25540. 507
  25541.  
  25542. ----------------------- Page 524-----------------------
  25543.  
  25544. Start of reception 1. ID reception cycle: Set the MPIE
  25545. bit in SCSCR1 to 1.
  25546.  
  25547. Set MPIE bit in SCSCR1 to 1 2. SCI status check, ID reception
  25548. and comparison: Read SCSSR1
  25549. and check that the RDRF flag is
  25550. Read ORER and FER flags set to 1, then read the receive
  25551. in SCSSR1 data in SCRDR1 and compare it
  25552. with this station’s ID.
  25553. Yes
  25554. FER = 1? or ORER = 1? If the data is not this station’s ID,
  25555. set the MPIE bit to 1 again, and
  25556. No clear the RDRF flag to 0. If the
  25557.  
  25558. Read RDRF flag in SCSSR1 data is this station’s ID, clear the
  25559. RDRF flag to 0.
  25560.  
  25561. No 3. SCI status check and data
  25562. RDRF = 1?
  25563. reception: Read SCSSR1 and
  25564. Yes check that the RDRF flag is set to
  25565. Read receive data in SCRDR1 1, then read the data in SCRDR1.
  25566.  
  25567. 4. Receive error handling and break
  25568. No detection: If a receive error
  25569. This station’s ID?
  25570. occurs, read the ORER and FER
  25571. Yes flags in SCSSR1 to identify the
  25572.  
  25573. error. After performing the
  25574. Read ORER and FER flags
  25575. appropriate error handling,
  25576. in SCSSR1
  25577. ensure that the ORER and FER
  25578. flags are all cleared to 0.
  25579. Yes
  25580. FER = 1? or ORER = 1? Reception cannot be resumed if
  25581. either of these flags is set to 1. In
  25582. No the case of a framing error, a
  25583. Read RDRF flag in SCSSR1 break can be detected by reading
  25584. the RxD pin value.
  25585. No
  25586. RDRF = 1?
  25587.  
  25588. Yes
  25589. Read receive data in SCRDR1
  25590.  
  25591. No
  25592. All data received?
  25593.  
  25594. Yes Error handling
  25595.  
  25596. End of reception
  25597.  
  25598. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (1)
  25599.  
  25600. 508
  25601.  
  25602. ----------------------- Page 525-----------------------
  25603.  
  25604. Error handling
  25605.  
  25606. No
  25607. ORER = 1?
  25608.  
  25609. Yes
  25610.  
  25611. Overrun error handling
  25612.  
  25613. No
  25614. FER = 1?
  25615.  
  25616. Yes
  25617.  
  25618. Yes
  25619. Break?
  25620.  
  25621. No
  25622.  
  25623. Framing error handling Clear RE bit in SCSCR1 to 0
  25624.  
  25625. Clear ORER and FER flags
  25626. in SCSSR1 to 0
  25627.  
  25628. End
  25629.  
  25630. Figure 15.15 Sample Multiprocessor Serial Reception Flowchart (2)
  25631.  
  25632. 509
  25633.  
  25634. ----------------------- Page 526-----------------------
  25635.  
  25636. Figure 15.16 shows an example of SCI operation for multiprocessor format reception.
  25637.  
  25638. Start Stop Start Data Stop
  25639. 1 bit Data (ID1) MPB bit bit (Data1) MPB bit 1
  25640.  
  25641. Serial 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1 Idle state
  25642. data (mark state)
  25643.  
  25644. MPIE
  25645.  
  25646. RDRF
  25647.  
  25648. SCRDR1
  25649. ID1
  25650. value
  25651.  
  25652. RXI interrupt request SCRDR1 data read As data is not this RXI interrupt request
  25653. (multiprocessor and RDRF flag station’s ID, MPIE is not generated, and
  25654. interrupt) cleared to 0 by RXI bit is set to 1 again SCRDR1 retains its
  25655. MPIE = 0 interrupt handler state
  25656.  
  25657. (a) Data does not match station’s ID
  25658.  
  25659. Start Stop Start Data Stop
  25660. 1 bit Data (ID2) MPB bit bit (Data2) MPB bit 1
  25661.  
  25662. Serial Idle state
  25663. 0 D0 D1 D7 1 1 0 D0 D1 D7 0 1
  25664. data (mark state)
  25665.  
  25666. MPIE
  25667.  
  25668. RDRF
  25669.  
  25670. SCRDR1
  25671. value ID1 ID2 Data2
  25672.  
  25673. RXI interrupt request SCRDR1 data read As data matches this MPIE bit set
  25674. (multiprocessor interrupt) and RDRF flag station’s ID, reception to 1 again
  25675. MPIE = 0 cleared to 0 by RXI continues and data is
  25676. interrupt handler received by RXI
  25677. interrupt handler
  25678.  
  25679. (b) Data matches station’s ID
  25680.  
  25681. Figure 15.16 Example of SCI Receive Operation (Example with 8-Bit Data,
  25682. Multiprocessor Bit, One Stop Bit)
  25683.  
  25684. 510
  25685.  
  25686. ----------------------- Page 527-----------------------
  25687.  
  25688. In multiprocessor mode serial reception, the SCI operates as described below.
  25689.  
  25690. 1. The SCI monitors the transmission line, and if a 0 start bit is detected, performs internal
  25691. synchronization and starts reception.
  25692.  
  25693. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25694.  
  25695. 3. If the MPIE bit is 1, MPIE is cleared to 0 when a 1 is received in the multiprocessor bit
  25696. position. If the multiprocessor bit is 0, the MPIE bit is not changed. The value of the
  25697. multiprocessor bit is transferred to the MPB bit in SCSSR1.
  25698.  
  25699. 4. If the MPIE bit is 0, RDRF is checked at the stop bit position, and if RDRF is 1 the overrun
  25700. error bit is set. If the stop bit is not 0, the framing error bit is set. If RDRF is 0, the value in
  25701. SCRSR1 is transferred to SCRDR1, and if the stop bit is 0, RDRF is set to 1.
  25702.  
  25703. If MPIE remains set to 1, the SCI ignores the received data.
  25704.  
  25705. 1 5 . 3 . 4 Operation in Synchronous Mode
  25706.  
  25707. In synchronous mode, data is transmitted or received in synchronization with clock pulses, making
  25708. it suitable for high-speed serial communication.
  25709.  
  25710. Inside the SCI, the transmitter and receiver are independent units, enabling full-duplex
  25711. communication. Both the transmitter and the receiver also have a double-buffered structure, so that
  25712. data can be read or written during transmission or reception, enabling continuous data transfer.
  25713.  
  25714. Figure 15.17 shows the general format for synchronous serial communication.
  25715.  
  25716. One unit of transfer data (character or frame)
  25717.  
  25718. * *
  25719.  
  25720. Serial clock
  25721.  
  25722. LSB MSB
  25723.  
  25724. Serial data Don’t care Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Don’t care
  25725.  
  25726. Note: * High except in continuous transfer
  25727.  
  25728.  
  25729. Figure 15.17 Data Format in Synchronous Communication
  25730.  
  25731. 511
  25732.  
  25733. ----------------------- Page 528-----------------------
  25734.  
  25735. In synchronous serial communication, data on the transmission line is output from one falling
  25736. edge of the serial clock to the next. Data confirmation is guaranteed at the rising edge of the serial
  25737. clock.
  25738.  
  25739. In serial communication, one character consists of data output starting with the LSB and ending
  25740. with the MSB. After the MSB is output, the transmission line holds the MSB state.
  25741.  
  25742. In synchronous mode, the SCI receives data in synchronization with the falling edge of the serial
  25743. clock.
  25744.  
  25745. Data Transfer Format
  25746.  
  25747. A fixed 8-bit data format is used. No parity or multiprocessor bits are added.
  25748.  
  25749. Clock
  25750.  
  25751. Either an internal clock generated by the on-chip baud rate generator or an external serial clock
  25752. input at the SCK pin can be selected, according to the setting of the C/A bit in SCSMR1 and the
  25753. CKE1 and CKE0 bits in SCSCR1. For details of SCI clock source selection, see table 15.9.
  25754.  
  25755. When the SCI is operated on an internal clock, the serial clock is output from the SCK pin.
  25756.  
  25757. Eight serial clock pulses are output in the transfer of one character, and when no transfer is
  25758. performed the clock is fixed high. In reception only, if an on-chip clock source is selected, clock
  25759. pulses are output while RE = 1. When the last data is received, RE should be cleared to 0 before
  25760. the end of bit 7.
  25761.  
  25762. Data Transfer Operations
  25763.  
  25764. SCI Initialization (Synchronous Mode): Before transmitting and receiving data, it is
  25765. necessary to clear the TE and RE bits in SCSCR1 to 0, then initialize the SCI as described below.
  25766.  
  25767. When the operating mode, transfer format, etc., is changed, the TE and RE bits must be cleared to
  25768. 0 before making the change using the following procedure. When the TE bit is cleared to 0, the
  25769. TDRE flag is set to 1 and SCTSR1 is initialized. Note that clearing the RE bit to 0 does not
  25770. change the contents of the RDRF, PER, FER, and ORER flags, or the contents of SCRDR1.
  25771.  
  25772. Figure 15.18 shows a sample SCI initialization flowchart.
  25773.  
  25774. 512
  25775.  
  25776. ----------------------- Page 529-----------------------
  25777.  
  25778. 1. Set the clock selection in SCSCR1.
  25779. Initialization
  25780. Be sure to clear bits RIE, TIE, TEIE,
  25781. and MPIE, TE and RE, to 0.
  25782.  
  25783. Clear TE and RE bits 2. Set the data transfer format in
  25784. in SCSCR1 to 0 SCSMR1.
  25785.  
  25786. 3. Write a value corresponding to the bit
  25787. Set RIE, TIE, TEIE, MPIE, CKE1 rate into SCBRR1. (Not necessary if
  25788. and CKE0 bits in SCSCR1 an external clock is used.)
  25789. (leaving TE and RE bits 4. Wait at least one bit interval, then set
  25790. cleared to 0) the TE bit or RE bit in SCSCR1 to 1.
  25791.  
  25792. Also set the RIE, TIE, TEIE, and MPIE
  25793. Set data transfer format
  25794. bits. Setting the TE and RE bits
  25795. in SCSMR1
  25796. enables the TxD and RxD pins to be
  25797. used.
  25798.  
  25799. Set value in SCBRR1
  25800.  
  25801.  
  25802. Wait
  25803.  
  25804. No
  25805. 1-bit interval elapsed?
  25806.  
  25807. Yes
  25808.  
  25809. Set TE and RE bits in SCSCR1
  25810. to 1, and set RIE, TIE, TEIE,
  25811. and MPIE bits
  25812.  
  25813. End
  25814.  
  25815. Figure 15.18 Sample SCI Initialization Flowchart
  25816.  
  25817. 513
  25818.  
  25819. ----------------------- Page 530-----------------------
  25820.  
  25821. Serial Data Transmission (Synchronous Mode): Figure 15.19 shows a sample flowchart
  25822. for serial transmission.
  25823.  
  25824. Use the following procedure for serial data transmission after enabling the SCI for transmission.
  25825.  
  25826. 1. SCI status check and transmit
  25827. Start of transmission
  25828. data write: Read SCSSR1 and
  25829. check that the TDRE flag is set to
  25830. 1, then write transmit data to
  25831. Read TDRE flag in SCSSR1
  25832. SCTDR1 and clear the TDRE flag
  25833. to 0.
  25834.  
  25835. No 2. To continue serial transmission,
  25836. TDRE = 1?
  25837. be sure to read 1 from the TDRE
  25838. flag to confirm that writing is
  25839. Yes possible, then write data to
  25840. SCTDR1, and then clear the
  25841. Write transmit data to SCTDR1 TDRE flag to 0. (Checking and
  25842. and clear TDRE flag clearing of the TDRE flag is
  25843. in SCSSR1 to 0 automatic when the direct
  25844. memory access controller
  25845. (DMAC) is activated by a
  25846. All data transmitted? No transmit-data-empty interrupt
  25847.  
  25848. (TXI) request, and data is written
  25849. to SCTDR1.)
  25850. Yes
  25851.  
  25852.  
  25853. Read TEND flag in SCSSR1
  25854.  
  25855. No
  25856. TEND = 1?
  25857.  
  25858. Yes
  25859.  
  25860. Clear TE bit in SCSCR1 to 0
  25861.  
  25862. End
  25863.  
  25864. Figure 15.19 Sample Serial Transmission Flowchart
  25865.  
  25866. In serial transmission, the SCI operates as described below.
  25867.  
  25868. 1. The SCI monitors the TDRE flag in SCSSR1. When TDRE is cleared to 0, the SCI
  25869. recognizes that data has been written to SCTDR1, and transfers the data from SCTDR1 to
  25870. SCTSR1.
  25871.  
  25872. 514
  25873.  
  25874. ----------------------- Page 531-----------------------
  25875.  
  25876. 2. After transferring data from SCTDR1 to SCTSR1, the SCI sets the TDRE flag to 1 and starts
  25877. transmission. If the TIE bit is set to 1 at this time, a transmit-data-empty interrupt (TXI)
  25878. request is generated.
  25879.  
  25880. When clock output mode has been set, the SCI outputs 8 serial clock pulses. When use of an
  25881. external clock has been specified, data is output synchronized with the input clock.
  25882.  
  25883. The serial transmit data is sent from the TxD pin starting with the LSB (bit 0) and ending with
  25884. the MSB (bit 7).
  25885.  
  25886. 3. The SCI checks the TDRE flag at the timing for sending the MSB (bit 7).
  25887.  
  25888. If the TDRE flag is cleared to 0, data is transferred from SCTDR1 to SCTSR1, and serial
  25889. transmission of the next frame is started.
  25890.  
  25891. If the TDRE flag is set to 1, the TEND flag in SCSSR1 is set to 1, the MSB (bit 7) is sent,
  25892. and the TxD pin maintains its state.
  25893.  
  25894. If the TEIE bit in SCSCR1 is set to 1 at this time, a transmit-end interrupt (TEI) request is
  25895. generated.
  25896.  
  25897. 4. After completion of serial transmission, the SCK pin is fixed high.
  25898.  
  25899. Figure 15.20 shows an example of SCI operation in transmission.
  25900.  
  25901. Transfer
  25902. direction
  25903.  
  25904. Serial clock
  25905.  
  25906. LSB MSB
  25907.  
  25908. Serial data Bit 0 Bit 1 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  25909.  
  25910. TDRE
  25911.  
  25912. TEND
  25913.  
  25914. Data written to SCTDR1 TXI interrupt TEI interrupt
  25915. and TDRE flag cleared to request request
  25916. TXI interrupt 0 in TXI interrupt handler
  25917.  
  25918. request One frame
  25919.  
  25920. Figure 15.20 Example of SCI Transmit Operation
  25921.  
  25922. Serial Data Reception (Synchronous Mode): Figure 15.21 shows a sample flowchart for
  25923. serial reception.
  25924.  
  25925. Use the following procedure for serial data reception after enabling the SCI for reception.
  25926.  
  25927. 515
  25928.  
  25929. ----------------------- Page 532-----------------------
  25930.  
  25931. When changing the operating mode from asynchronous to synchronous, be sure to check that the
  25932. ORER, PER, and FER flags are all cleared to 0. The RDRF flag will not be set if the FER or
  25933. PER flag is set to 1, and neither transmit nor receive operations will be possible.
  25934.  
  25935. Start of reception 1. Receive error handling: If a
  25936. receive error occurs, read the
  25937. ORER flag in SCSSR1 , and
  25938. after performing the appropriate
  25939. Read ORER flag in SCSSR1
  25940. error handling, clear the ORER
  25941. flag to 0. Transfer cannot be
  25942. resumed if the ORER flag is set
  25943. Yes
  25944. ORER = 1? to 1.
  25945.  
  25946. 2. SCI status check and receive
  25947. No Error handling data read: Read SCSSR1 and
  25948. check that the RDRF flag is set
  25949. to 1, then read the receive data
  25950. Read RDRF flag in SCSSR1
  25951. in SCRDR1 and clear the RDRF
  25952. flag to 0. Transition of the RDRF
  25953. No flag from 0 to 1 can also be
  25954. RDRF = 1?
  25955. identified by an RXI interrupt.
  25956.  
  25957. Yes 3. Serial reception continuation
  25958. procedure: To continue serial
  25959. Read receive data in SCRDR1, reception, finish reading the
  25960. and clear RDRF flag RDRF flag, reading SCRDR1,
  25961. in SCSSR1 to 0 and clearing the RDRF flag to 0,
  25962. before the MSB (bit 7) of the
  25963. No current frame is received. (The
  25964. All data received? RDRF flag is cleared
  25965. automatically when the direct
  25966. Yes memory access controller
  25967. (DMAC) is activated by a
  25968. Clear RE bit in SCSCR1 to 0 receive-data-full interrupt (RXI)
  25969.  
  25970. request and the SCRDR1 value
  25971. End of reception is read.)
  25972.  
  25973. Figure 15.21 Sample Serial Reception Flowchart (1)
  25974.  
  25975. 516
  25976.  
  25977. ----------------------- Page 533-----------------------
  25978.  
  25979. Error handling
  25980.  
  25981. No
  25982. ORER = 1?
  25983.  
  25984. Yes
  25985.  
  25986. Overrun error handling
  25987.  
  25988. Clear ORER flag in SCSSR1 to 0
  25989.  
  25990. End
  25991.  
  25992. Figure 15.21 Sample Serial Reception Flowchart (2)
  25993.  
  25994. In serial reception, the SCI operates as described below.
  25995.  
  25996. 1. The SCI performs internal initialization in synchronization with serial clock input or output.
  25997.  
  25998. 2. The received data is stored in SCRSR1 in LSB-to-MSB order.
  25999.  
  26000. After reception, the SCI checks whether the RDRF flag is 0, indicating that the receive data can
  26001. be transferred from SCRSR1 to SCRDR1.
  26002.  
  26003. If this check is passed, the RDRF flag is set to 1, and the receive data is stored in SCRDR1. If
  26004. a receive error is detected in the error check, the operation is as shown in table 15.11.
  26005.  
  26006. Neither transmit nor receive operations can be performed subsequently when a receive error has
  26007. been found in the error check.
  26008.  
  26009. Also, as the RDRF flag is not set to 1 when receiving, the flag must be cleared to 0.
  26010.  
  26011. 3. If the RIE bit in SCRSR1 is set to 1 when the RDRF flag changes to 1, a receive-data-full
  26012. interrupt (RXI) request is generated. If the RIE bit in SCRSR1 is set to 1 when the ORER flag
  26013. changes to 1, a receive-error interrupt (ERI) request is generated.
  26014.  
  26015. Figure 15.22 shows an example of SCI operation in reception.
  26016.  
  26017. 517
  26018.  
  26019. ----------------------- Page 534-----------------------
  26020.  
  26021. Transfer
  26022. direction
  26023.  
  26024. Serial clock
  26025.  
  26026. Serial data Bit 7 Bit 0 Bit 7 Bit 0 Bit 1 Bit 6 Bit 7
  26027.  
  26028. RDRF
  26029.  
  26030. ORER
  26031.  
  26032. RXI interrupt Data read from RXI interrupt ERI interrupt
  26033. request SCRDR1 and RDRF request request due to
  26034. flag cleared to 0 in RXI overrun error
  26035. interrupt handler
  26036.  
  26037. One frame
  26038.  
  26039. Figure 15.22 Example of SCI Receive Operation
  26040.  
  26041. Simultaneous Serial Data Transmission and Reception (Synchronous Mode):
  26042. Figure 15.23 shows a sample flowchart for simultaneous serial transmit and receive operations.
  26043.  
  26044. Use the following procedure for simultaneous serial data transmit and receive operations after
  26045. enabling the SCI for transmission and reception.
  26046.  
  26047. 518
  26048.  
  26049. ----------------------- Page 535-----------------------
  26050.  
  26051. 1. SCI status check and transmit data
  26052. Start of transmission/reception
  26053. write:
  26054. Read SCSSR1 and check that the
  26055. TDRE flag is set to 1, then write
  26056. transmit data to SCTDR1 and clear
  26057. Read TDRE flag in SCSSR1
  26058. the TDRE flag to 0. Transition of the
  26059. TDRE flag from 0 to 1 can also be
  26060. No identified by a TXI interrupt.
  26061. TDRE = 1?
  26062. 2. Receive error handling:
  26063. Yes If a receive error occurs, read the
  26064. ORER flag in SCSSR1 , and after
  26065. Write transmit data performing the appropriate error
  26066. to SCTDR1 and clear TDRE flag handling, clear the ORER flag to 0.
  26067. in SCSSR1 to 0 Transmission/reception cannot be
  26068. resumed if the ORER flag is set to 1.
  26069.  
  26070. 3. SCI status check and receive data
  26071. read:
  26072. Read ORER flag in SCSSR1 Read SCSSR1 and check that the
  26073.  
  26074. RDRF flag is set to 1, then read the
  26075. Yes receive data in SCRDR1 and clear the
  26076. ORER = 1? RDRF flag to 0. Transition of the
  26077. RDRF flag from 0 to 1 can also be
  26078. No Error handling identified by an RXI interrupt.
  26079.  
  26080. 4. Serial transmission/reception
  26081. Read RDRF flag in SCSSR1 continuation procedure:
  26082. To continue serial transmission/
  26083. No reception, finish reading the RDRF
  26084. RDRF = 1? flag, reading SCRDR1, and clearing
  26085. the RDRF flag to 0, before the MSB
  26086. Yes (bit 7) of the current frame is received.
  26087. Also, before the MSB (bit 7) of the
  26088. Read receive data in SCRDR1, current frame is transmitted, read 1
  26089. and clear RDRF flag from the TDRE flag to confirm that
  26090. in SCSSR1 to 0 writing is possible, then write data to
  26091. SCTDR1 and clear the TDRE flag to
  26092. 0.
  26093. No
  26094. All data transferred? (Checking and clearing of the TDRE
  26095. flag is automatic when the DMAC is
  26096. Yes activated by a transmit-data-empty
  26097. interrupt (TXI) request, and data is
  26098. Clear TE and RE bits written to SCTDR1. Similarly, the
  26099. in SCRSR1 to 0 RDRF flag is cleared automatically
  26100. when the DMAC is activated by a
  26101. receive-data-full interrupt (RXI)
  26102. End of transmission/reception request and the SCRDR1 value is
  26103. read.)
  26104.  
  26105. Note: When switching from transmit or receive operation to simultaneous transmit and receive
  26106. operations, first clear the TE bit and RE bit to 0, then set both these bits to 1.
  26107.  
  26108. Figure 15.23 Sample Flowchart for Serial Data Transmission and Reception
  26109.  
  26110. 519
  26111.  
  26112. ----------------------- Page 536-----------------------
  26113.  
  26114. 1 5 . 4 SCI Interrupt Sources and DMAC
  26115.  
  26116. The SCI has four interrupt sources: the transmit-end interrupt (TEI) request, receive-error interrupt
  26117. (ERI) request, receive-data-full interrupt (RXI) request, and transmit-data-empty interrupt (TXI)
  26118. request.
  26119.  
  26120. Table 15.12 shows the interrupt sources and their relative priorities. Individual interrupt sources
  26121. can be enabled or disabled with the TIE, RIE, and TEIE bits in SCRSR1, and the EIO bit in
  26122. SCSPTR1. Each kind of interrupt request is sent to the interrupt controller independently.
  26123.  
  26124. When the TDRE flag in the serial status register (SCSSR1) is set to 1, a TDR-empty request is
  26125. generated separately from the interrupt request. A TDR-empty request can activate the direct
  26126. memory access controller (DMAC) to perform data transfer. The TDRE flag is cleared to 0
  26127. automatically when a write to the transmit data register (SCTDR1) is performed by the DMAC.
  26128.  
  26129. When the RDRF flag in SCSSR1 is set to 1, an RDR-full request is generated separately from the
  26130. interrupt request. An RDR-full request can activate the DMAC to perform data transfer.
  26131.  
  26132. The RDRF flag is cleared to 0 automatically when a receive data register (SCRDR1) read is
  26133. performed by the DMAC.
  26134.  
  26135. When the ORER, FER, or PER flag in SCSSR1 is set to 1, an ERI interrupt request is generated.
  26136. The DMAC cannot be activated by an ERI interrupt request. When receive data processing is to be
  26137. carried out by the DMAC and receive error handling is to be performed by means of an interrupt to
  26138. the CPU, set the RIE bit to 1 and also set the EIO bit in SCSPTR1 to 1 so that an interrupt error
  26139. occurs only for a receive error. If the EIO bit is cleared to 0, interrupts to the CPU will be
  26140. generated even during normal data reception.
  26141.  
  26142. When the TEND flag in SCSSR1 is set to 1, a TEI interrupt request is generated. The DMAC
  26143. cannot be activated by a TEI interrupt request.
  26144.  
  26145. A TXI interrupt indicates that transmit data can be written, and a TEI interrupt indicates that the
  26146. transmit operation has ended.
  26147.  
  26148. Table 15.12 SCI Interrupt Sources
  26149.  
  26150. Interrupt DMAC Priority on
  26151. Source Description Activation Reset Release
  26152.  
  26153. ERI Receive error (ORER, FER, or PER) Not possible High
  26154.  
  26155. RXI Receive data register full (RDRF) Possible ↑
  26156.  
  26157. TXI Transmit data register empty (TDRE) Possible ↓
  26158.  
  26159. TEI Transmit end (TEND) Not possible Low
  26160.  
  26161. See section 5, Exceptions, for the priority order and relation to non-SCI interrupts.
  26162.  
  26163. 520
  26164.  
  26165. ----------------------- Page 537-----------------------
  26166.  
  26167. 1 5 . 5 Usage Notes
  26168.  
  26169. The following points should be noted when using the SCI.
  26170.  
  26171. SCTDR1 Writing and the TDRE Flag: The TDRE flag in SCSSR1 is a status flag that
  26172. indicates that transmit data has been transferred from SCTDR1 to SCTSR1. When the SCI
  26173. transfers data from SCTDR1 to SCTSR1, the TDRE flag is set to 1.
  26174.  
  26175. Data can be written to SCTDR1 regardless of the state of the TDRE flag. However, if new data is
  26176. written to SCTDR1 when the TDRE flag is cleared to 0, the data stored in SCTDR1 will be lost
  26177. since it has not yet been transferred to SCTSR1. It is therefore essential to check that the TDRE
  26178. flag is set to 1 before writing transmit data to SCTDR1.
  26179.  
  26180. Simultaneous Multiple Receive Errors: If a number of receive errors occur at the same
  26181. time, the state of the status flags in SCSSR1 is as shown in table 15.13. If there is an overrun
  26182. error, data is not transferred from SCRSR1 to SCRDR1, and the receive data is lost.
  26183.  
  26184. Table 15.13 SCSSR1 Status Flags and Transfer of Receive Data
  26185.  
  26186. SCSSR1 Status Flags Receive Data
  26187. Transfer
  26188. SCRSR1 → SCRDR1
  26189.  
  26190. Receive Errors RDRF ORER FER PER
  26191.  
  26192. Overrun error 1 1 0 0 X
  26193.  
  26194. Framing error 0 0 1 0 O
  26195.  
  26196. Parity error 0 0 0 1 O
  26197.  
  26198. Overrun error + framing error 1 1 1 0 X
  26199.  
  26200. Overrun error + parity error 1 1 0 1 X
  26201.  
  26202. Framing error + parity error 0 0 1 1 O
  26203.  
  26204. Overrun error + framing error + 1 1 1 1 X
  26205. parity error
  26206.  
  26207. O: Receive data is transferred from SCRSR1 to SCRDR1.
  26208. X: Receive data is not transferred from SCRSR1 to SCRDR1.
  26209.  
  26210. Break Detection and Processing: Break signals can be detected by reading the RxD pin
  26211. directly when a framing error (FER) is detected. In the break state the input from the RxD pin
  26212. consists of all 0s, so the FER flag is set and the parity error flag (PER) may also be set. Note that
  26213. the SCI receiver continues to operate in the break state, so if the FER flag is cleared to 0 it will be
  26214. set to 1 again.
  26215.  
  26216. 521
  26217.  
  26218. ----------------------- Page 538-----------------------
  26219.  
  26220. Sending a Break Signal: The input/output condition and level of the TxD pin are determined
  26221. by bits SPB0IO and SPB0DT in the serial port register (SCSPTR1). This feature can be used to
  26222. send a break signal.
  26223.  
  26224. After the serial transmitter is initialized, the TxD pin function is not selected and the value of the
  26225. SPB0DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  26226. enabled). The SPB0IO and SPB0DT bits should therefore be set to 1 (designating output and high
  26227. level) beforehand.
  26228.  
  26229. To send a break signal during serial transmission, clear the SPB0DT bit to 0 (designating low
  26230. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  26231. transmitter is initialized regardless of its current state, and the TxD pin becomes an output port
  26232. outputting the value 0.
  26233.  
  26234. Receive Error Flags and Transmit Operations (Synchronous Mode Only):
  26235. Transmission cannot be started when a receive error flag (ORER, PER, or FER) is set to 1, even if
  26236. the TDRE flag is set to 1. Be sure to clear the receive error flags to 0 before starting transmission.
  26237.  
  26238. Note also that the receive error flags are not cleared to 0 by clearing the RE bit to 0.
  26239.  
  26240. Receive Data Sampling Timing and Receive Margin in Asynchronous Mode: The
  26241. SCI operates on a base clock with a frequency of 16 times the bit rate. In reception, the SCI
  26242. synchronizes internally with the fall of the start bit, which it samples on the base clock. Receive
  26243. data is latched at the rising edge of the eighth base clock pulse. The timing is shown in figure
  26244. 15.24.
  26245.  
  26246. 522
  26247.  
  26248. ----------------------- Page 539-----------------------
  26249.  
  26250. 16 clocks
  26251.  
  26252. 8 clocks
  26253.  
  26254. 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
  26255.  
  26256. Base clock
  26257.  
  26258. –7.5 clocks +7.5 clocks
  26259.  
  26260. Receive data Start bit D0 D1
  26261. (RxD)
  26262.  
  26263. Synchronization
  26264. sampling timing
  26265.  
  26266. Data sampling
  26267. timing
  26268.  
  26269. Figure 15.24 Receive Data Sampling Timing in Asynchronous Mode
  26270.  
  26271. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  26272.  
  26273. 1 | D – 0.5 |
  26274. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100% .............. (1)
  26275. 2N N
  26276.  
  26277. M: Receive margin (%)
  26278. N: Ratio of clock frequency to bit rate (N = 16)
  26279. D: Clock duty cycle (D = 0 to 1.0)
  26280. L: Frame length (L = 9 to 12)
  26281. F: Absolute deviation of clock frequency
  26282.  
  26283. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation (2).
  26284.  
  26285. When D = 0.5 and F = 0:
  26286.  
  26287. M = (0.5 – 1/(2 × 16)) × 100% = 46.875% ....................................... (2)
  26288.  
  26289. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  26290.  
  26291. 523
  26292.  
  26293. ----------------------- Page 540-----------------------
  26294.  
  26295. When Using the DMAC: When an external clock source is used as the serial clock, the
  26296. transmit clock should not be input until at least 5 peripheral operating clock cycles after SCTDR1
  26297. is updated by the DMAC. Incorrect operation may result if the transmit clock is input within 4
  26298. cycles after SCTDR1 is updated. (See figure 15.25)
  26299.  
  26300. SCK
  26301. t
  26302.  
  26303. TDRE
  26304.  
  26305. TxD D0 D1 D2 D3 D4 D5 D6 D7
  26306.  
  26307. Note: When operating on an external clock, set t > 4.
  26308.  
  26309. Figure 15.25 Example of Synchronous Transmission by DMAC
  26310.  
  26311. When SCRDR1 is read by the DMAC, be sure to set the SCI receive-data-full interrupt (RXI) as
  26312. the activation source with bits RS3 to RS0 in CHCR.
  26313.  
  26314. When Using Synchronous External Clock Mode:
  26315. • Do not set TE or RE to 1 until at least 4 peripheral operating clock cycles after external clock
  26316. SCK has changed from 0 to 1.
  26317.  
  26318. • Only set both TE and RE to 1 when external clock SCK is 1.
  26319.  
  26320. • In reception, note that if RE is cleared to 0 from 2.5 to 3.5 peripheral operating clock cycles
  26321. after the rising edge of the RxD D7 bit SCK input, RDRF will be set to 1 but copying to
  26322. SCRDR1 will not be possible.
  26323.  
  26324. When Using Synchronous Internal Clock Mode: In reception, note that if RE is cleared
  26325. to zero 1.5 peripheral operating clock cycles after the rising edge of the RxD D7 bit SCK output,
  26326. RDRF will be set to 1 but copying to SCRDR1 will not be possible.
  26327.  
  26328. 524
  26329.  
  26330. ----------------------- Page 541-----------------------
  26331.  
  26332. Section 16 Serial Communication Interface with FIFO (SCIF)
  26333.  
  26334. 1 6 . 1 Overview
  26335.  
  26336. The SH7750 is equipped with a single-channel serial communication interface with built-in FIFO
  26337. buffers (Serial Communication Interface with FIFO: SCIF). The SCIF can perform asynchronous
  26338. serial communication.
  26339.  
  26340. Sixteen-stage FIFO registers are provided for both transmission and reception, enabling fast,
  26341. efficient, and continuous communication.
  26342.  
  26343. 1 6 . 1 . 1 Features
  26344.  
  26345. SCIF features are listed below.
  26346.  
  26347. • Asynchronous serial communication
  26348.  
  26349. Serial data communication is executed using an asynchronous system in which synchronization
  26350. is achieved character by character. Serial data communication can be carried out with standard
  26351. asynchronous communication chips such as a Universal Asynchronous Receiver/Transmitter
  26352. (UART) or Asynchronous Communication Interface Adapter (ACIA).
  26353.  
  26354. There is a choice of 8 serial data transfer formats.
  26355.  
  26356.  Data length: 7 or 8 bits
  26357.  
  26358.  Stop bit length: 1 or 2 bits
  26359.  
  26360.  Parity: Even/odd/none
  26361.  
  26362.  Receive error detection: Parity, framing, and overrun errors
  26363.  
  26364.  Break detection: If the receive data following that in which a framing error occurred is also
  26365. at the space “0” level, and there is a frame error, a break is detected. When a framing error
  26366. occurs, a break can also be detected by reading the RxD2 pin level directly from the serial
  26367. port register (SCSPTR2).
  26368.  
  26369. • Full-duplex communication capability
  26370.  
  26371. The transmitter and receiver are independent units, enabling transmission and reception to be
  26372. performed simultaneously.
  26373.  
  26374. The transmitter and receiver both have a 16-stage FIFO buffer structure, enabling fast and
  26375. continuous serial data transmission and reception.
  26376.  
  26377. • On-chip baud rate generator allows any bit rate to be selected.
  26378.  
  26379. • Choice of serial clock source: internal clock from baud rate generator or external clock from
  26380. SCK2 pin
  26381.  
  26382. • Four interrupt sources
  26383.  
  26384. There are four interrupt sources—transmit-FIFO-data-empty, break, receive-FIFO-data-full, and
  26385. receive-error—that can issue requests independently.
  26386.  
  26387. 525
  26388.  
  26389. ----------------------- Page 542-----------------------
  26390.  
  26391. • The DMA controller (DMAC) can be activated to execute a data transfer by issuing a DMA
  26392. transfer request in the event of a transmit-FIFO-data-empty or receive-FIFO-data-full interrupt.
  26393.  
  26394. • When not in use, the SCIF can be stopped by halting its clock supply to reduce power
  26395. consumption.
  26396.  
  26397. • Modem control functions (RTS2 and CTS2) are provided.
  26398.  
  26399. • The amount of data in the transmit/receive FIFO registers, and the number of receive errors in
  26400. the receive data in the receive FIFO register, can be ascertained.
  26401.  
  26402. • A timeout error (DR) can be detected during reception.
  26403.  
  26404. 526
  26405.  
  26406. ----------------------- Page 543-----------------------
  26407.  
  26408. 1 6 . 1 . 2 Block Diagram
  26409.  
  26410. Figure 16.1 shows a block diagram of the SCIF.
  26411.  
  26412. e
  26413. c Internal
  26414. a
  26415. Module data bus f data bus
  26416. r
  26417. e
  26418. t
  26419. n
  26420. i
  26421.  
  26422. s
  26423. u
  26424. B
  26425.  
  26426. SCFRDR2 SCFTDR2 SCSMR2 SCBRR2
  26427. (16-stage) (16-stage) SCLSR2
  26428.  
  26429. SCFDR2
  26430. Pφ
  26431. SCFCR2
  26432. RxD2 SCRSR2 SCTSR2
  26433. SCFSR2 Baud rate Pφ/4
  26434. SCSCR2 generator
  26435.  
  26436. SCSPTR2 Pφ/16
  26437.  
  26438. Transmission/
  26439. reception Pφ/64
  26440. control
  26441. TxD2
  26442. Parity generation Clock
  26443.  
  26444. Parity check
  26445.  
  26446. External clock
  26447. SCK2
  26448. TXI
  26449. CTS2 RXI
  26450. ERI
  26451. RTS2 BRI
  26452.  
  26453. SCIF
  26454.  
  26455. SCRSR2: Receive shift register SCFSR2: Serial status register
  26456. SCFRDR2: Receive FIFO data register SCBRR2: Bit rate register
  26457. SCTSR2: Transmit shift register SCSPTR2: Serial port register
  26458. SCFTDR2: Transmit FIFO data register SCFCR2: FIFO control register
  26459. SCSMR2: Serial mode register SCFDR2: FIFO data count register
  26460. SCSCR2: Serial control register SCLSR2: Line status register
  26461.  
  26462. Figure 16.1 Block Diagram of SCIF
  26463.  
  26464. 527
  26465.  
  26466. ----------------------- Page 544-----------------------
  26467.  
  26468. 1 6 . 1 . 3 Pin Configuration
  26469.  
  26470. Table 16.1 shows the SCIF pin configuration.
  26471.  
  26472. Table 16.1SCIF Pins
  26473.  
  26474. Pin Name Abbreviation I / O Function
  26475.  
  26476. Serial clock pin MRESET/SCK2 Input Clock input
  26477.  
  26478. Receive data pin MD2/RxD2 Input Receive data input
  26479.  
  26480. Transmit data pin MD1/TxD2 Output Transmit data output
  26481.  
  26482. Modem control pin CTS2 I/O Transmission enabled
  26483.  
  26484. Modem control pin MD8/RTS2 I/O Transmission request
  26485.  
  26486. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset is
  26487. executed. The MD1/TxD2, MD2/RxD2, and MD8/RTS2 pins function as the MD1, MD2, and
  26488. MD8 mode input pins after a power-on reset. These pins are made to function as serial pins
  26489. by performing SCIF operation settings with the TE and RE bits in SCSCR2 and the MCE bit in
  26490. SCFCR2. Break state transmission and detection can be set in the SCIF’s SCSPTR2
  26491. register.
  26492.  
  26493. 528
  26494.  
  26495. ----------------------- Page 545-----------------------
  26496.  
  26497. 1 6 . 1 . 4 Register Configuration
  26498.  
  26499. The SCIF has the internal registers shown in table 16.2. These registers are used to specify the
  26500. data format and bit rate, and to perform transmitter/receiver control.
  26501.  
  26502. Table 16.2SCIF Registers
  26503.  
  26504. Abbrevia- Initial P 4 Area 7 Acces
  26505. Name tion R/ W Value Address Address s Size
  26506.  
  26507. Serial mode register SCSMR2 R/W H'0000 H'FFE80000 H'IFE80000 16
  26508.  
  26509. Bit rate register SCBRR2 R/W H'FF H'FFE80004 H'IFE80004 8
  26510.  
  26511. Serial control register SCSCR2 R/W H'0000 H'FFE80008 H'IFE80008 16
  26512.  
  26513. Transmit FIFO data register SCFTDR2 W Undefined H'FFE8000C H'IFE8000C 8
  26514. Serial status register SCFSR2 R/(W)*1 H'0060 H'FFE80010 H'IFE80010 16
  26515.  
  26516. Receive FIFO data register SCFRDR2 R Undefined H'FFE80014 H'IFE80014 8
  26517.  
  26518. FIFO control register SCFCR2 R/W H'0000 H'FFE80018 H'IFE80018 16
  26519.  
  26520. FIFO data count register SCFDR2 R H'0000 H'FFE8001C H'IFE8001C 16
  26521. Serial port register SCSPTR2 R/W H'0000*2 H'FFE80020 H'IFE80020 16
  26522.  
  26523. Line status register SCLSR2 R/(W)*3 H'0000 H'FFE80024 H'IFE80024 16
  26524.  
  26525. Notes: 1. Only 0 can be written, to clear flags. Bits 15 to 8, 3, and 2 are read-only, and cannot be
  26526. modified.
  26527. 2. The value of bits 6, 4, and 0 is undefined.
  26528. 3. Only 0 can be written, to clear flags. Bits 15 to 1 are read-only, and cannot be modified.
  26529.  
  26530. 1 6 . 2 Register Descriptions
  26531.  
  26532. 1 6 . 2 . 1 Receive Shift Register (SCRSR2)
  26533.  
  26534. Bit: 7 6 5 4 3 2 1 0
  26535.  
  26536. R/W: — — — — — — — —
  26537.  
  26538. SCRSR2 is the register used to receive serial data.
  26539.  
  26540. The SCIF sets serial data input from the RxD2 pin in SCRSR2 in the order received, starting with
  26541. the LSB (bit 0), and converts it to parallel data. When one byte of data has been received, it is
  26542. transferred to the receive FIFO register, SCFRDR2, automatically.
  26543.  
  26544. SCRSR2 cannot be directly read or written to by the CPU.
  26545.  
  26546. 529
  26547.  
  26548. ----------------------- Page 546-----------------------
  26549.  
  26550. 1 6 . 2 . 2 Receive FIFO Data Register (SCFRDR2)
  26551.  
  26552. Bit: 7 6 5 4 3 2 1 0
  26553.  
  26554. R/W: R R R R R R R R
  26555.  
  26556. SCFRDR2 is a 16-stage FIFO register that stores received serial data.
  26557.  
  26558. When the SCIF has received one byte of serial data, it transfers the received data from SCRSR2 to
  26559. SCFRDR2 where it is stored, and completes the receive operation. SCRSR2 is then enabled for
  26560. reception, and consecutive receive operations can be performed until the receive FIFO register is
  26561. full (16 data bytes).
  26562.  
  26563. SCFRDR2 is a read-only register, and cannot be written to by the CPU.
  26564.  
  26565. If a read is performed when there is no receive data in the receive FIFO register, an undefined value
  26566. will be returned. When the receive FIFO register is full of receive data, subsequent serial data is
  26567. lost.
  26568.  
  26569. The contents of SCFRDR2 are undefined after a power-on reset or manual reset.
  26570.  
  26571. 1 6 . 2 . 3 Transmit Shift Register (SCTSR2)
  26572.  
  26573. Bit: 7 6 5 4 3 2 1 0
  26574.  
  26575. R/W: — — — — — — — —
  26576.  
  26577. SCTSR2 is the register used to transmit serial data.
  26578.  
  26579. To perform serial data transmission, the SCIF first transfers transmit data from SCFTDR2 to
  26580. SCTSR2, then sends the data to the TxD2 pin starting with the LSB (bit 0).
  26581.  
  26582. When transmission of one byte is completed, the next transmit data is transferred from SCFTDR2
  26583. to SCTSR2, and transmission started, automatically.
  26584.  
  26585. SCTSR2 cannot be directly read or written to by the CPU.
  26586.  
  26587. 530
  26588.  
  26589. ----------------------- Page 547-----------------------
  26590.  
  26591. 1 6 . 2 . 4 Transmit FIFO Data Register (SCFTDR2)
  26592.  
  26593. Bit: 7 6 5 4 3 2 1 0
  26594.  
  26595. R/W: W W W W W W W W
  26596.  
  26597. SCFTDR2 is a 16-stage FIFO register that stores data for serial transmission.
  26598.  
  26599. If SCTSR2 is empty when transmit data has been written to SCFTDR2, the SCIF transfers the
  26600. transmit data written in SCFTDR2 to SCTSR2 and starts serial transmission.
  26601.  
  26602. SCFTDR2 is a write-only register, and cannot be read by the CPU.
  26603.  
  26604. The next data cannot be written when SCFTDR2 is filled with 16 bytes of transmit data. Data
  26605. written in this case is ignored.
  26606.  
  26607. The contents of SCFTDR2 are undefined after a power-on reset or manual reset.
  26608.  
  26609. 1 6 . 2 . 5 Serial Mode Register (SCSMR2)
  26610.  
  26611. Bit: 15 14 13 12 11 10 9 8
  26612.  
  26613. — — — — — — — —
  26614.  
  26615. Initial value: 0 0 0 0 0 0 0 0
  26616.  
  26617. R/W: R R R R R R R R
  26618.  
  26619. Bit: 7 6 5 4 3 2 1 0
  26620.  
  26621. — CHR PE O/E STOP — CKS1 CKS0
  26622.  
  26623. Initial value: 0 0 0 0 0 0 0 0
  26624.  
  26625. R/W: R R/W R/W R/W R/W R R/W R/W
  26626.  
  26627. SCSMR2 is a 16-bit register used to set the SCIF’s serial transfer format and select the baud rate
  26628. generator clock source.
  26629.  
  26630. SCSMR2 can be read or written to by the CPU at all times.
  26631.  
  26632. SCSMR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  26633. standby mode or in the module standby state.
  26634.  
  26635. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  26636.  
  26637. 531
  26638.  
  26639. ----------------------- Page 548-----------------------
  26640.  
  26641. Bit 6—Character Length (CHR): Selects 7 or 8 bits as the asynchronous mode data length.
  26642.  
  26643. Bit 6: CHR Description
  26644.  
  26645. 0 8-bit data (Initial value)
  26646.  
  26647. 1 7-bit data*
  26648.  
  26649. Note: * When 7-bit data is selected, the MSB (bit 7) of SCFTDR2 is not transmitted.
  26650.  
  26651. Bit 5—Parity Enable (PE): Selects whether or not parity bit addition is performed in
  26652. transmission, and parity bit checking in reception.
  26653.  
  26654. Bit 5: PE Description
  26655.  
  26656. 0 Parity bit addition and checking disabled (Initial value)
  26657.  
  26658. 1 Parity bit addition and checking enabled*
  26659.  
  26660. Note: * When the PE bit is set to 1, the parity (even or odd) specified by the O/E bit is added to
  26661. transmit data before transmission. In reception, the parity bit is checked for the parity
  26662. (even or odd) specified by the O/E bit.
  26663.  
  26664. Bit 4—Parity Mode (O/E ): Selects either even or odd parity for use in parity addition and
  26665. checking. The O/E bit setting is only valid when the PE bit is set to 1, enabling parity bit
  26666. addition and checking. The O/E bit setting is invalid when parity addition and checking is disabled.
  26667.  
  26668. Bit 4: O/E Description
  26669. 0 Even parity*1 (Initial value)
  26670.  
  26671. 1 Odd parity*2
  26672.  
  26673. Notes: 1. When even parity is set, parity bit addition is performed in transmission so that the total
  26674. number of 1-bits in the transmit character plus the parity bit is even. In reception, a
  26675. check is performed to see if the total number of 1-bits in the receive character plus the
  26676. parity bit is even.
  26677. 2. When odd parity is set, parity bit addition is performed in transmission so that the total
  26678. number of 1-bits in the transmit character plus the parity bit is odd. In reception, a
  26679. check is performed to see if the total number of 1-bits in the receive character plus the
  26680. parity bit is odd.
  26681.  
  26682. 532
  26683.  
  26684. ----------------------- Page 549-----------------------
  26685.  
  26686. Bit 3—Stop Bit Length (STOP): Selects 1 or 2 bits as the stop bit length.
  26687.  
  26688. Bit 3: STOP Description
  26689. 0 1 stop bit*1 (Initial value)
  26690.  
  26691. 1 2 stop bits*2
  26692.  
  26693. Notes: 1. In transmission, a single 1-bit (stop bit) is added to the end of a transmit character
  26694. before it is sent.
  26695. 2. In transmission, two 1-bits (stop bits) are added to the end of a transmit character
  26696. before it is sent.
  26697.  
  26698. In reception, only the first stop bit is checked, regardless of the STOP bit setting. If the second
  26699. 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
  26700. character.
  26701.  
  26702. Bit 2—Reserved: This bit is always read as 0, and should only be written with 0.
  26703.  
  26704. Bits 1 and 0—Clock Select 1 and 0 (CKS1, CKS0): These bits select the clock source
  26705. for the on-chip baud rate generator. The clock source can be selected from Pφ, Pφ/4, Pφ/16, and
  26706. Pφ/64, according to the setting of bits CKS1 and CKS0.
  26707.  
  26708. For the relation between the clock source, the bit rate register setting, and the baud rate, see section
  26709. 16.2.8, Bit Rate Register (SCBRR2).
  26710.  
  26711. Bit 1: CKS1 Bit 0: CKS0 Description
  26712.  
  26713. 0 0 Pφ clock (Initial value)
  26714.  
  26715. 1 Pφ/4 clock
  26716.  
  26717. 1 0 Pφ/16 clock
  26718.  
  26719. 1 Pφ/64 clock
  26720.  
  26721. Note: Pφ: Peripheral clock
  26722.  
  26723. 1 6 . 2 . 6 Serial Control Register (SCSCR2)
  26724.  
  26725. Bit: 15 14 13 12 11 10 9 8
  26726.  
  26727. — — — — — — — —
  26728.  
  26729. Initial value: 0 0 0 0 0 0 0 0
  26730.  
  26731. R/W: R R R R R R R R
  26732.  
  26733. Bit: 7 6 5 4 3 2 1 0
  26734.  
  26735. TIE RIE TE RE REIE — CKE1 —
  26736.  
  26737. Initial value: 0 0 0 0 0 0 0 0
  26738.  
  26739. R/W: R/W R/W R/W R/W R/W R R/W R
  26740.  
  26741. 533
  26742.  
  26743. ----------------------- Page 550-----------------------
  26744.  
  26745. The SCSCR2 register performs enabling or disabling of SCIF transfer operations, and interrupt
  26746. requests, and selection of the serial clock source.
  26747.  
  26748. SCSCR2 can be read or written to by the CPU at all times.
  26749.  
  26750. SCSCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  26751. standby mode or in the module standby state.
  26752.  
  26753. Bits 15 to 8, 2, and 0—Reserved: These bits are always read as 0, and should only be
  26754. written with 0.
  26755.  
  26756. Bit 7—Transmit Interrupt Enable (TIE): Enables or disables transmit-FIFO-data-empty
  26757. interrupt (TXI) request generation when serial transmit data is transferred from SCFTDR2 to
  26758. SCTSR2, the number of data bytes in the transmit FIFO register falls to or below the transmit
  26759. trigger set number, and the TDFE flag in the serial status register (SCFSR2) is set to 1.
  26760.  
  26761. Bit 7: TIE Description
  26762.  
  26763. 0 Transmit-FIFO-data-empty interrupt (TXI) request disabled* (Initial value)
  26764.  
  26765. 1 Transmit-FIFO-data-empty interrupt (TXI) request enabled
  26766.  
  26767. Note: * TXI interrupt requests can be cleared by writing transmit data exceeding the transmit trigger
  26768. set number to SCFTDR2, reading 1 from the TDFE flag, then clearing it to 0, or by clearing
  26769. the TIE bit to 0.
  26770.  
  26771. Bit 6—Receive Interrupt Enable (RIE): Enables or disables generation of a receive-data-
  26772. full interrupt (RXI) request when the RDF flag or DR flag in SCFSR2 is set to 1, a receive-error
  26773. interrupt (ERI) request when the ER flag in SCFSR2 is set to 1, and a break interrupt (BRI)
  26774. request when the BRK flag in SCFSR2 or the ORER flag in SCLSR2 is set to 1.
  26775.  
  26776. Bit 6: RIE Description
  26777.  
  26778. 0 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  26779. request, and break interrupt (BRI) request disabled* (Initial value)
  26780.  
  26781. 1 Receive-data-full interrupt (RXI) request, receive-error interrupt (ERI)
  26782. request, and break interrupt (BRI) request enabled
  26783.  
  26784. Note: * An RXI interrupt request can be cleared by reading 1 from the RDF or DR flag, then clearing
  26785. the flag to 0, or by clearing the RIE bit to 0. ERI and BRI interrupt requests can be cleared
  26786. by reading 1 from the ER, BRK, or ORER flag, then clearing the flag to 0, or by clearing the
  26787. RIE and REIE bits to 0.
  26788.  
  26789. 534
  26790.  
  26791. ----------------------- Page 551-----------------------
  26792.  
  26793. Bit 5—Transmit Enable (TE): Enables or disables the start of serial transmission by the
  26794. SCIF.
  26795.  
  26796. Bit 5: TE Description
  26797.  
  26798. 0 Transmission disabled (Initial value)
  26799.  
  26800. 1 Transmission enabled*
  26801.  
  26802. Note: * Serial transmission is started when transmit data is written to SCFTDR2 in this state.
  26803. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be made,
  26804. the transmission format decided, and the transmit FIFO reset, before the TE bit is set to 1.
  26805.  
  26806. Bit 4—Receive Enable (RE): Enables or disables the start of serial reception by the SCIF.
  26807.  
  26808. Bit 4: RE Description
  26809. 0 Reception disabled*1 (Initial value)
  26810.  
  26811. 1 Reception enabled*2
  26812.  
  26813. Notes: 1. Clearing the RE bit to 0 does not affect the DR, ER, BRK, RDF, FER, PER, and ORER
  26814. flags, which retain their states.
  26815. 2. Serial transmission is started when a start bit is detected in this state.
  26816. Serial mode register (SCSMR2) and FIFO control register (SCFCR2) settings must be
  26817. made, the reception format decided, and the receive FIFO reset, before the RE bit is set
  26818. to 1.
  26819.  
  26820. Bit 3—Receive Error Interrupt Enable (REIE): Enables or disables generation of
  26821. receive-error interrupt (ERI) and break interrupt (BRI) requests. The REIE bit setting is valid only
  26822. when the RIE bit is 0.
  26823.  
  26824. Bit 3: REIE Description
  26825.  
  26826. 0 Receive-error interrupt (ERI) and break interrupt (BRI) requests disabled*
  26827. (Initial value)
  26828.  
  26829. 1 Receive-error interrupt (ERI) and break interrupt (BRI) requests enabled
  26830.  
  26831. Note: * Receive-error interrupt (ERI) and break interrupt (BRI) requests can be cleared by reading 1
  26832. from the ER, BRK, or ORER flag, then clearing the flag to 0, or by clearing the RIE and REIE
  26833. bits to 0. When REIE is set to 1, ERI and BRI interrupt requests will be generated even if
  26834. RIE is cleared to 0. In DMAC transfer, this setting is made if the interrupt controller is to be
  26835. notified of ERI and BRI interrupt requests.
  26836.  
  26837. 535
  26838.  
  26839. ----------------------- Page 552-----------------------
  26840.  
  26841. Bit 1—Clock Enable 1 (CKE1): Selects the SCIF clock source. The CKE1 bit must be set
  26842. before determining the SCIF’s operating mode with SCSMR2.
  26843.  
  26844. Bit 1: CKE1 Description
  26845. 0 Internal clock/SCK2 pin functions as input pin (input signal ignored)*1
  26846.  
  26847. 1 External clock/SCK2 pin functions as clock input*2
  26848.  
  26849. Notes: 1. Initial value
  26850. 2. Inputs a clock with a frequency 16 times the bit rate.
  26851.  
  26852. 1 6 . 2 . 7 Serial Status Register (SCFSR2)
  26853.  
  26854. Bit: 15 14 13 12 11 10 9 8
  26855.  
  26856. PER3 PER2 PER1 PER0 FER3 FER2 FER1 FER0
  26857.  
  26858. Initial value: 0 0 0 0 0 0 0 0
  26859.  
  26860. R/W: R R R R R R R R
  26861.  
  26862. Bit: 7 6 5 4 3 2 1 0
  26863.  
  26864. ER TEND TDFE BRK FER PER RDF DR
  26865.  
  26866. Initial value: 0 1 1 0 0 0 0 0
  26867.  
  26868. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R R R/(W)* R/(W)*
  26869.  
  26870. Note: * Only 0 can be written, to clear the flag.
  26871.  
  26872. SCFSR2 is a 16-bit register. The lower 8 bits consist of status flags that indicate the operating
  26873. status of the SCIF, and the upper 8 bits indicate the number of receive errors in the data in the
  26874. receive FIFO register.
  26875.  
  26876. SCFSR2 can be read or written to by the CPU at all times. However, 1 cannot be written to flags
  26877. ER, TEND, TDFE, BRK, RDF, and DR. Also note that in order to clear these flags they must be
  26878. read as 1 beforehand. The FER flag and PER flag are read-only flags and cannot be modified.
  26879.  
  26880. SCFSR2 is initialized to H'0060 by a power-on reset or manual reset. It is not initialized in
  26881. standby mode or in the module standby state.
  26882.  
  26883. Bits 15 to 12—Number of Parity Errors (PER3–PER0): These bits indicate the
  26884. number of data bytes in which a parity error occurred in the receive data stored in SCFRDR2.
  26885.  
  26886. After the ER bit in SCFSR2 is set, the value indicated by bits 15 to 12 is the number of data
  26887. bytes in which a parity error occurred.
  26888.  
  26889. If all 16 bytes of receive data in SCFRDR2 have parity errors, the value indicated by bits PER3 to
  26890. PER0 will be 0.
  26891.  
  26892. 536
  26893.  
  26894. ----------------------- Page 553-----------------------
  26895.  
  26896. Bits 11 to 8—Number of Framing Errors (FER3–FER0): These bits indicate the
  26897. number of data bytes in which a framing error occurred in the receive data stored in SCFRDR2.
  26898.  
  26899. After the ER bit in SCFSR2 is set, the value indicated by bits 11 to 8 is the number of data bytes
  26900. in which a framing error occurred.
  26901.  
  26902. If all 16 bytes of receive data in SCFRDR2 have framing errors, the value indicated by bits FER3
  26903. to FER0 will be 0.
  26904.  
  26905. Bit 7—Receive Error (ER): Indicates that a framing error or parity error occurred during
  26906. reception.*1
  26907.  
  26908. Bit 7: ER Description
  26909.  
  26910. 0 No framing error or parity error occurred during reception (Initial value)
  26911.  
  26912. [Clearing conditions]
  26913.  
  26914. Power-on reset or manual reset
  26915.  
  26916. When 0 is written to ER after reading ER = 1
  26917.  
  26918. 1 A framing error or parity error occurred during reception
  26919.  
  26920. [Setting conditions]
  26921.  
  26922. When the SCIF checks whether the stop bit at the end of the receive data is
  26923. 2
  26924. 1 when reception ends, and the stop bit is 0*
  26925.  
  26926. When, in reception, the number of 1-bits in the receive data plus the parity
  26927. bit does not match the parity setting (even or odd) specified by the O/E bit in
  26928. SCSMR2
  26929.  
  26930. Notes: 1. The ER flag is not affected and retains its previous state when the RE bit in SCSCR2 is
  26931. cleared to 0. When a receive error occurs, the receive data is still transferred to
  26932. SCFRDR2, and reception continues.
  26933. The FER and PER bits in SCFSR2 can be used to determine whether there is a receive
  26934. error in the data read from SCFRDR2.
  26935. 2. In 2-stop-bit mode, only the first stop bit is checked for a value of 1; the second stop bit
  26936. is not checked.
  26937.  
  26938. 537
  26939.  
  26940. ----------------------- Page 554-----------------------
  26941.  
  26942. Bit 6—Transmit End (TEND): Indicates that there is no valid data in SCFTDR2 when the
  26943. last bit of the transmit character is sent, and transmission has been ended.
  26944.  
  26945. Bit 6: TEND Description
  26946.  
  26947. 0 Transmission is in progress
  26948.  
  26949. [Clearing conditions]
  26950.  
  26951. When transmit data is written to SCFTDR2, and 0 is written to TEND after
  26952. reading TEND = 1
  26953.  
  26954. When data is written to SCFTDR2 by the DMAC
  26955.  
  26956. 1 Transmission has been ended (Initial value)
  26957.  
  26958. [Setting conditions]
  26959.  
  26960. Power-on reset or manual reset
  26961.  
  26962. When the TE bit in SCSCR2 is 0
  26963.  
  26964. When there is no transmit data in SCFTDR2 on transmission of the last bit of
  26965. a 1-byte serial transmit character
  26966.  
  26967. Bit 5—Transmit FIFO Data Empty (TDFE): Indicates that data has been transferred from
  26968. SCFTDR2 to SCTSR2, the number of data bytes in SCFTDR2 has fallen to or below the
  26969. transmit trigger data number set by bits TTRG1 and TTRG0 in the FIFO control register
  26970. (SCFCR2), and new transmit data can be written to SCFTDR2.
  26971.  
  26972. Bit 5: TDFE Description
  26973.  
  26974. 0 A number of transmit data bytes exceeding the transmit trigger set number
  26975. have been written to SCFTDR2
  26976.  
  26977. [Clearing conditions]
  26978.  
  26979. When transmit data exceeding the transmit trigger set number is written to
  26980. SCFTDR2, and 0 is written to TDFE after reading TDFE = 1
  26981.  
  26982. When transmit data exceeding the transmit trigger set number is written to
  26983. SCFTDR2 by the DMAC
  26984.  
  26985. 1 The number of transmit data bytes in SCFTDR2 does not exceed the
  26986. transmit trigger set number (Initial value)
  26987.  
  26988. [Setting conditions]
  26989.  
  26990. Power-on reset or manual reset
  26991.  
  26992. When the number of SCFTDR2 transmit data bytes falls to or below the
  26993. transmit trigger set number as the result of a transmit operation*
  26994.  
  26995. Note: * As SCFTDR2 is a 16-byte FIFO register, the maximum number of bytes that can be written
  26996. when TDFE = 1 is 16 - (transmit trigger set number). Data written in excess of this will be
  26997. ignored.
  26998. The number of data bytes in SCFTDR2 is indicated by the upper bits of SCFDR2.
  26999.  
  27000. Bit 4—Break Detect (BRK): Indicates that a receive data break signal has been detected.
  27001.  
  27002. 538
  27003.  
  27004. ----------------------- Page 555-----------------------
  27005.  
  27006. Bit 4: BRK Description
  27007.  
  27008. 0 A break signal has not been received (Initial value)
  27009.  
  27010. [Clearing conditions]
  27011.  
  27012. Power-on reset or manual reset
  27013.  
  27014. When 0 is written to BRK after reading BRK = 1
  27015.  
  27016. 1 A break signal has been received*
  27017.  
  27018. [Setting condition]
  27019.  
  27020. When data with a framing error is received, followed by the space “0” level
  27021. (low level ) for at least one frame length
  27022.  
  27023. Note: * When a break is detected, the receive data (H'00) following detection is not transferred to
  27024. SCFRDR2. When the break ends and the receive signal returns to mark “1”, receive data
  27025. transfer is resumed.
  27026.  
  27027. Bit 3—Framing Error (FER): Indicates a framing error in the data read from SCFRDR2.
  27028.  
  27029. Bit 3: FER Description
  27030.  
  27031. 0 There is no framing error in the receive data read from SCFRDR2
  27032. (Initial value)
  27033.  
  27034. [Clearing conditions]
  27035.  
  27036. Power-on reset or manual reset
  27037.  
  27038. When there is no framing error in SCFRDR2 read data
  27039.  
  27040. 1 There is a framing error in the receive data read from SCFRDR2
  27041.  
  27042. [Setting condition]
  27043.  
  27044. When there is a framing error in SCFRDR2 read data
  27045.  
  27046. Bit 2—Parity Error (PER): Indicates a parity error in the data read from SCFRDR2.
  27047.  
  27048. 539
  27049.  
  27050. ----------------------- Page 556-----------------------
  27051.  
  27052. Bit 2: PER Description
  27053.  
  27054. 0 There is no parity error in the receive data read from SCFRDR2
  27055. (Initial value)
  27056.  
  27057. [Clearing conditions]
  27058.  
  27059. Power-on reset or manual reset
  27060.  
  27061. When there is no parity error in SCFRDR2 read data
  27062.  
  27063. 1 There is a parity error in the receive data read from SCFRDR2
  27064.  
  27065. [Setting condition]
  27066.  
  27067. When there is a parity error in SCFRDR2 read data
  27068.  
  27069. Bit 1—Receive FIFO Data Full (RDF): Indicates that the received data has been
  27070. transferred from SCRSR2 to SCFRDR2, and the number of receive data bytes in SCFRDR2 is
  27071. equal to or greater than the receive trigger number set by bits RTRG1 and RTRG0 in the FIFO
  27072. control register (SCFCR2).
  27073.  
  27074. Bit 1: RDF Description
  27075.  
  27076. 0 The number of receive data bytes in SCFRDR2 is less than the receive
  27077. trigger set number (Initial value)
  27078.  
  27079. [Clearing conditions]
  27080.  
  27081. Power-on reset or manual reset
  27082.  
  27083. When SCFRDR2 is read until the number of receive data bytes in SCFRDR2
  27084. falls below the receive trigger set number, and 0 is written to RDF after
  27085. reading RDF = 1
  27086.  
  27087. When SCFRDR2 is read by the DMAC until the number of receive data bytes
  27088. in SCFRDR2 falls below the receive trigger set number
  27089.  
  27090. 1 The number of receive data bytes in SCFRDR2 is equal to or greater than the
  27091. receive trigger set number
  27092.  
  27093. [Setting condition]
  27094.  
  27095. When SCFRDR2 contains at least the receive trigger set number of receive
  27096. data bytes*
  27097.  
  27098. Note: * SCFRDR2 is a 16-byte FIFO register. When RDF = 1, at least the receive trigger set number
  27099. of data bytes can be read. If all the data in SCFRDR2 is read and another read is performed,
  27100. the data value will be undefined. The number of receive data bytes in SCFRDR2 is indicated
  27101. by the lower bits of SCFDR2.
  27102.  
  27103. 540
  27104.  
  27105. ----------------------- Page 557-----------------------
  27106.  
  27107. Bit 0—Receive Data Ready (DR): Indicates that there are fewer than the receive trigger set
  27108. number of data bytes in SCFRDR2, and no further data has arrived for at least 15 etu after the stop
  27109. bit of the last data received.
  27110.  
  27111. Bit 0: DR Description
  27112.  
  27113. 0 Reception is in progress or has ended normally and there is no receive data
  27114. left in SCFRDR2 (Initial value)
  27115.  
  27116. [Clearing conditions]
  27117.  
  27118. Power-on reset or manual reset
  27119.  
  27120. When all the receive data in SCFRDR2 has been read, and 0 is written to DR
  27121. after reading DR = 1
  27122.  
  27123. When all the receive data in SCFRDR2 has been read by the DMAC
  27124.  
  27125. 1 No further receive data has arrived
  27126.  
  27127. [Setting condition]
  27128.  
  27129. When SCFRDR2 contains fewer than the receive trigger set number of
  27130. receive data bytes, and no further data has arrived for at least 15 etu after
  27131. the stop bit of the last data received*
  27132.  
  27133. Note: * Equivalent to 1.5 frames with an 8-bit, 1-stop-bit format.
  27134. etu: Elementary time unit (time for transfer of 1 bit)
  27135.  
  27136. 541
  27137.  
  27138. ----------------------- Page 558-----------------------
  27139.  
  27140. 1 6 . 2 . 8 Bit Rate Register (SCBRR2)
  27141.  
  27142. Bit: 7 6 5 4 3 2 1 0
  27143.  
  27144. Initial value: 1 1 1 1 1 1 1 1
  27145.  
  27146. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27147.  
  27148. SCBRR2 is an 8-bit register that sets the serial transfer bit rate in accordance with the baud rate
  27149. generator operating clock selected by bits CKS1 and CKS0 in SCSMR2.
  27150.  
  27151. SCBRR2 can be read or written to by the CPU at all times.
  27152.  
  27153. SCBRR2 is initialized to H'FF by a power-on reset or manual reset. It is not initialized in standby
  27154. mode or in the module standby state.
  27155.  
  27156. The SCBRR2 setting is found from the following equation.
  27157.  
  27158. Asynchronous mode:
  27159.  
  27160.  
  27161. P
  27162. N = φ × 106 – 1
  27163. 64 × 22n–1 × B
  27164.  
  27165. Where B: Bit rate (bits/s)
  27166. N: SCBRR2 setting for baud rate generator (0 ≤ N ≤ 255)
  27167. Pφ : Peripheral module operating frequency (MHz)
  27168. n: Baud rate generator input clock (n = 0 to 3)
  27169. (See the table below for the relation between n and the clock.)
  27170.  
  27171. SCSMR2 Setting
  27172.  
  27173. n Clock CKS1 CKS0
  27174.  
  27175. 0 Pφ 0 0
  27176.  
  27177. 1 Pφ/4 0 1
  27178.  
  27179. 2 Pφ/16 1 0
  27180.  
  27181. 3 Pφ/64 1 1
  27182.  
  27183. The bit rate error in asynchronous mode is found from the following equation:
  27184.  
  27185. 6
  27186. P × 10
  27187. φ
  27188. Error (%) = 2n–1 – 1 × 100
  27189. (N + 1) × B × 64 × 2
  27190.  
  27191. 542
  27192.  
  27193. ----------------------- Page 559-----------------------
  27194.  
  27195. 1 6 . 2 . 9 FIFO Control Register (SCFCR2)
  27196.  
  27197. Bit: 15 14 13 12 11 10 9 8
  27198.  
  27199. — — — — — — — —
  27200.  
  27201. Initial value: 0 0 0 0 0 0 0 0
  27202.  
  27203. R/W: R R R R R R R R
  27204.  
  27205. Bit: 7 6 5 4 3 2 1 0
  27206.  
  27207. RTRG1 RTRG0 TTRG1 TTRG0 MCE TFRST RFRST LOOP
  27208.  
  27209. Initial value: 0 0 0 0 0 0 0 0
  27210.  
  27211. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  27212.  
  27213. SCFCR2 performs data count resetting and trigger data number setting for the transmit and receive
  27214. FIFO registers, and also contains a loopback test enable bit.
  27215.  
  27216. SCFCR2 can be read or written to by the CPU at all times.
  27217.  
  27218. SCFCR2 is initialized to H'0000 by a power-on reset or manual reset. It is not initialized in
  27219. standby mode or in the module standby state.
  27220.  
  27221. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  27222.  
  27223. Bits 7 and 6—Receive FIFO Data Number Trigger (RTRG1, RTRG0): These bits
  27224. are used to set the number of receive data bytes that sets the receive data full (RDF) flag in the
  27225. serial status register (SCFSR2).
  27226.  
  27227. 543
  27228.  
  27229. ----------------------- Page 560-----------------------
  27230.  
  27231. The RDF flag is set when the number of receive data bytes in SCFRDR2 is equal to or greater
  27232. than the trigger set number shown in the following table.
  27233.  
  27234. Bit 7: RTRG1 Bit 6: RTRG0 Receive Trigger Number
  27235.  
  27236. 0 0 1*
  27237.  
  27238. 1 4
  27239.  
  27240. 1 0 8
  27241.  
  27242. 1 14
  27243.  
  27244. Note: * Initial value
  27245.  
  27246. Bits 5 and 4—Transmit FIFO Data Number Trigger (TTRG1, TTRG0): These bits
  27247. are used to set the number of remaining transmit data bytes that sets the transmit FIFO data
  27248. register empty (TDFE) flag in the serial status register (SCFSR2). The TDFE flag is set when the
  27249. number of transmit data bytes in SCFTDR2 is equal to or less than the trigger set number shown
  27250. in the following table.
  27251.  
  27252. Bit 5: TTRG1 Bit 4: TTRG0 Transmit Trigger Number
  27253.  
  27254. 0 0 8 (8) *
  27255.  
  27256. 1 4 (12)
  27257.  
  27258. 1 0 2 (14)
  27259.  
  27260. 1 1 (15)
  27261.  
  27262. Note: * Initial value. Figures in parentheses are the number of empty bytes in SCFTDR2 when the
  27263. flag is set.
  27264.  
  27265. Bit 3—Modem Control Enable (MCE): Enables the CTS2 and RTS2 modem control
  27266. signals.
  27267.  
  27268. Bit 3: MCE Description
  27269.  
  27270. 0 Modem signals disabled* (Initial value)
  27271.  
  27272. 1 Modem signals enabled
  27273.  
  27274. Note: * CTS2 is fixed at active-0 regardless of the input value, and RTS2 output is also fixed at 0.
  27275.  
  27276. 544
  27277.  
  27278. ----------------------- Page 561-----------------------
  27279.  
  27280. Bit 2—Transmit FIFO Data Register Reset (TFRST): Invalidates the transmit data in
  27281. the transmit FIFO data register and resets it to the empty state.
  27282.  
  27283. Bit 2: TFRST Description
  27284.  
  27285. 0 Reset operation disabled* (Initial value)
  27286.  
  27287. 1 Reset operation enabled
  27288.  
  27289. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  27290.  
  27291. Bit 1—Receive FIFO Data Register Reset (RFRST): Invalidates the receive data in the
  27292. receive FIFO data register and resets it to the empty state.
  27293.  
  27294. Bit 1: RFRST Description
  27295.  
  27296. 0 Reset operation disabled* (Initial value)
  27297.  
  27298. 1 Reset operation enabled
  27299.  
  27300. Note: * A reset operation is performed in the event of a power-on reset or manual reset.
  27301.  
  27302. Bit 0—Loopback Test (LOOP): Internally connects the transmit output pin (TxD2) and
  27303. receive input pin (RxD2), and the RTS2 pin and CTS2 pin, enabling loopback testing.
  27304.  
  27305. Bit 0: LOOP Description
  27306.  
  27307. 0 Loopback test disabled (Initial value)
  27308.  
  27309. 1 Loopback test enabled
  27310.  
  27311. 545
  27312.  
  27313. ----------------------- Page 562-----------------------
  27314.  
  27315. 1 6 . 2 . 1 0 FIFO Data Count Register (SCFDR2)
  27316.  
  27317. SCFDR2 is a 16-bit register that indicates the number of data bytes stored in SCFTDR2 and
  27318. SCFRDR2.
  27319.  
  27320. The upper 8 bits show the number of transmit data bytes in SCFTDR2, and the lower 8 bits show
  27321. the number of receive data bytes in SCFRDR2.
  27322.  
  27323. SCFDR2 can be read by the CPU at all times.
  27324.  
  27325. Bit: 15 14 13 12 11 10 9 8
  27326.  
  27327. — — — T4 T3 T2 T1 T0
  27328.  
  27329. Initial value: 0 0 0 0 0 0 0 0
  27330.  
  27331. R/W: R R R R R R R R
  27332.  
  27333. These bits show the number of untransmitted data bytes in SCFTDR2. A value of H'00 indicates
  27334. that there is no transmit data, and a value of H'10 indicates that SCFTDR2 is full of transmit data.
  27335.  
  27336. Bit: 7 6 5 4 3 2 1 0
  27337.  
  27338. — — — R4 R3 R2 R1 R0
  27339.  
  27340. Initial value: 0 0 0 0 0 0 0 0
  27341.  
  27342. R/W: R R R R R R R R
  27343.  
  27344. These bits show the number of receive data bytes in SCFRDR2. A value of H'00 indicates that
  27345. there is no receive data, and a value of H'10 indicates that SCFRDR2 is full of receive data.
  27346.  
  27347. 1 6 . 2 . 1 1 Serial Port Register (SCSPTR2)
  27348.  
  27349. Bit: 15 14 13 12 11 10 9 8
  27350.  
  27351. — — — — — — — —
  27352.  
  27353. Initial value: 0 0 0 0 0 0 0 0
  27354.  
  27355. R/W: R R R R R R R R
  27356.  
  27357. Bit: 7 6 5 4 3 2 1 0
  27358.  
  27359. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  27360.  
  27361. Initial value: 0 — 0 — 0 0 0 —
  27362.  
  27363. R/W: R/W R/W R/W R/W R R R/W R/W
  27364.  
  27365. SCSPTR2 is a 16-bit readable/writable register that controls input/output and data for the port pins
  27366. multiplexed with the serial communication interface (SCIF) pins. Input data can be read from the
  27367. 546
  27368.  
  27369. ----------------------- Page 563-----------------------
  27370.  
  27371. RxD2 pin, output data written to the TxD2 pin, and breaks in serial transmission/reception
  27372. controlled, by means of bits 1 and 0. Data can be read from, and output data written to, the CTS2
  27373. pin by means of bits 5 and 4. Data can be read from, and output data written to, the RTS2 pin by
  27374. means of bits 6 and 7.
  27375.  
  27376. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6, 4,
  27377. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0 is
  27378. undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  27379.  
  27380. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  27381.  
  27382. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies the serial port RTS2 pin
  27383. input/output condition. When the RTS2 pin is actually set as a port output pin and outputs the
  27384. value set by the RTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  27385.  
  27386. Bit 7: RTSIO Description
  27387.  
  27388. 0 RTSDT bit value is not output to RTS2 pin (Initial value)
  27389.  
  27390. 1 RTSDT bit value is output to RTS2 pin
  27391.  
  27392. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port RTS2 pin
  27393. input/output data. Input or output is specified by the RTSIO bit (see the description of bit 7,
  27394. RTSIO, for details). In output mode, the RTSDT bit value is output to the RTS2 pin. The RTS2
  27395. pin value is read from the RTSDT bit regardless of the value of the RTSIO bit. The initial value
  27396. of this bit after a power-on reset or manual reset is undefined.
  27397.  
  27398. Bit 6: RTSDT Description
  27399.  
  27400. 0 Input/output data is low-level
  27401.  
  27402. 1 Input/output data is high-level
  27403.  
  27404. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies the serial port CTS2 pin
  27405. input/output condition. When the CTS2 pin is actually set as a port output pin and outputs the
  27406. value set by the CTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  27407.  
  27408. Bit 5: CTSIO Description
  27409.  
  27410. 0 CTSDT bit value is not output to CTS2 pin (Initial value)
  27411.  
  27412. 1 CTSDT bit value is output to CTS2 pin
  27413.  
  27414. 547
  27415.  
  27416. ----------------------- Page 564-----------------------
  27417.  
  27418. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port CTS2 pin
  27419. input/output data. Input or output is specified by the CTSIO bit (see the description of bit 5,
  27420. CTSIO, for details). In output mode, the CTSDT bit value is output to the CTS2 pin. The CTS2
  27421. pin value is read from the CTSDT bit regardless of the value of the CTSIO bit. The initial value
  27422. of this bit after a power-on reset or manual reset is undefined.
  27423.  
  27424. Bit 4: CTSDT Description
  27425.  
  27426. 0 Input/output data is low-level
  27427.  
  27428. 1 Input/output data is high-level
  27429.  
  27430. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  27431.  
  27432. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output
  27433. condition. When the TxD2 pin is actually set as a port output pin and outputs the value set by the
  27434. SPB2DT bit, the TE bit in SCSCR2 should be cleared to 0.
  27435.  
  27436. Bit 1: SPB2IO Description
  27437.  
  27438. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  27439.  
  27440. 1 SPB2DT bit value is output to the TxD2 pin
  27441.  
  27442. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data
  27443. and TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  27444. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the value
  27445. of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the SPB2DT bit
  27446. regardless of the value of the SPB2IO bit. The initial value of this bit after a power-on reset or
  27447. manual reset is undefined.
  27448.  
  27449. Bit 0: SPB2DT Description
  27450.  
  27451. 0 Input/output data is low-level
  27452.  
  27453. 1 Input/output data is high-level
  27454.  
  27455. SCIF I/O port block diagrams are shown in figures 16.2 to 16.5.
  27456.  
  27457. 548
  27458.  
  27459. ----------------------- Page 565-----------------------
  27460.  
  27461. Reset
  27462.  
  27463. R D7
  27464. Q D
  27465. RTSIO
  27466. C Internal data bus
  27467.  
  27468. SPTRW
  27469.  
  27470. Reset
  27471. MD8/RTS2
  27472. R D6
  27473. Q D
  27474. RTSDT
  27475. C SCIF
  27476.  
  27477. Modem control
  27478. SPTRW
  27479. enable signal*
  27480.  
  27481. Mode setting RTS2 signal
  27482. register
  27483.  
  27484. SPTRR
  27485.  
  27486. SPTRW: Write to SPTR
  27487. SPTRR: Read SPTR
  27488.  
  27489. Note: * The RTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  27490.  
  27491. Figure 16.2 MD8/RTS2 Pin
  27492.  
  27493. 549
  27494.  
  27495. ----------------------- Page 566-----------------------
  27496.  
  27497. Reset
  27498. R D5
  27499.  
  27500. Q D
  27501. CTSIO
  27502. C Internal data bus
  27503.  
  27504. SPTRW
  27505.  
  27506. Reset
  27507. CTS2
  27508. R
  27509. D4
  27510. Q D
  27511. CTSDT
  27512. C SCIF
  27513.  
  27514. SPTRW
  27515.  
  27516. CTS2 signal
  27517.  
  27518. Modem control enable signal*
  27519.  
  27520. SPTRR
  27521.  
  27522. SPTRW: Write to SPTR
  27523. SPTRR: Read SPTR
  27524.  
  27525. Note: * The CTS2 pin function is designated as modem control by the MCE bit in SCFCR2.
  27526.  
  27527.  
  27528. Figure 16.3 CTS2 Pin
  27529.  
  27530. 550
  27531.  
  27532. ----------------------- Page 567-----------------------
  27533.  
  27534. Reset
  27535.  
  27536. R
  27537. D1
  27538. Q D
  27539. SPB2IO
  27540. C Internal data bus
  27541.  
  27542. SPTRW
  27543.  
  27544. Reset
  27545. MD1/TxD2
  27546. R D0
  27547. Q D
  27548. SPB2DT
  27549. C SCIF
  27550.  
  27551. Transmit enable
  27552. SPTRW
  27553. signal
  27554.  
  27555. Mode setting
  27556. register Serial transmit data
  27557.  
  27558. SPTRW: Write to SPTR
  27559.  
  27560. Figure 16.4 MD1/TxD2 Pin
  27561.  
  27562. SCIF
  27563. MD2/RxD2
  27564.  
  27565. Serial receive
  27566. Mode setting data
  27567. register
  27568.  
  27569. D0
  27570.  
  27571. Internal data bus
  27572.  
  27573.  
  27574. SPTRR
  27575.  
  27576. SPTRR: Read SPTR
  27577.  
  27578. Figure 16.5 MD2/RxD2 Pin
  27579.  
  27580. 551
  27581.  
  27582. ----------------------- Page 568-----------------------
  27583.  
  27584. 1 6 . 2 . 1 2 Line Status Register (SCLSR2)
  27585.  
  27586. Bit: 15 14 13 12 11 10 9 8
  27587.  
  27588. — — — — — — — —
  27589.  
  27590. Initial value: 0 0 0 0 0 0 0 0
  27591.  
  27592. R/W: R R R R R R R R
  27593.  
  27594. Bit: 7 6 5 4 3 2 1 0
  27595.  
  27596. — — — — — — — ORER
  27597.  
  27598. Initial value: 0 0 0 0 0 0 0 0
  27599.  
  27600. R/W: R R R R R R R (R/W)*
  27601.  
  27602. Note: * Only 0 can be written, to clear the flag.
  27603.  
  27604. Bits 15 to 1—Reserved: These bits are always read as 0, and should only be written with 0.
  27605.  
  27606. Bit 0—Overrun Error (ORER): Indicates that an overrun error occurred during reception,
  27607. causing abnormal termination.
  27608.  
  27609. Bit 0: ORER Description
  27610. 0 Reception in progress, or reception has ended normally*1 (Initial value)
  27611.  
  27612. [Clearing conditions]
  27613.  
  27614. Power-on reset or manual reset
  27615.  
  27616. When 0 is written to ORER after reading ORER = 1
  27617.  
  27618. 1 An overrun error occurred during reception*2
  27619.  
  27620. [Setting condition]
  27621.  
  27622. When the next serial reception is completed while the receive FIFO is full
  27623.  
  27624. Notes: 1. The ORER flag is not affected and retains its previous state when the RE bit in SCSCR2
  27625. is cleared to 0.
  27626. 2. The receive data prior to the overrun error is retained in SCFRDR2, and the data
  27627. received subsequently is lost. Serial reception cannot be continued while the ORER
  27628. flag is set to 1.
  27629.  
  27630. 552
  27631.  
  27632. ----------------------- Page 569-----------------------
  27633.  
  27634. 1 6 . 3 Operation
  27635.  
  27636. 1 6 . 3 . 1 Overview
  27637.  
  27638. The SCIF can carry out serial communication in asynchronous mode, in which synchronization is
  27639. achieved character by character. See section 15.3.2, Operation in Asynchronous Mode, for details.
  27640.  
  27641. Sixteen-stage FIFO buffers are provided for both transmission and reception, reducing the CPU
  27642. overhead and enabling fast, continuous communication to be performed.RTS2 and CTS2 signals
  27643. are also provided as modem control signals.
  27644.  
  27645. The transmission format is selected using the serial mode register (SCSMR2), as shown in table
  27646. 16.3. The SCIF clock source is determined by the CKE1 bit in the serial control register
  27647. (SCSCR2), as shown in table 16.4.
  27648.  
  27649. • Data length: Choice of 7 or 8 bits
  27650.  
  27651. • Choice of parity addition and addition of 1 or 2 stop bits (the combination of these parameters
  27652. determines the transfer format and character length)
  27653.  
  27654. • Detection of framing errors, parity errors, receive-FIFO-data-full state, overrun errors, receive-
  27655. data-ready state, and breaks, during reception
  27656.  
  27657. • Indication of the number of data bytes stored in the transmit and receive FIFO registers
  27658.  
  27659. • Choice of internal or external clock as SCIF clock source
  27660.  
  27661. When internal clock is selected: The SCIF operates on the baud rate generator clock.
  27662.  
  27663. When external clock is selected: A clock with a frequency of 16 times the bit rate must be
  27664. input (the on-chip baud rate generator is not used).
  27665.  
  27666. Table 16.3SCSMR2 Settings for Serial Transfer Format Selection
  27667.  
  27668. SCSMR2 Settings SCIF Transfer Format
  27669.  
  27670. Bit 6: Bit 5: Bit 3: Data Multi- Parity Stop
  27671. CHR P E STOP Mode Length processor Bit Bit Bit
  27672. Length
  27673.  
  27674. 0 0 0 Asynchronous mode 8-bit data No No 1 bit
  27675.  
  27676. 1 2 bits
  27677.  
  27678. 1 0 Yes 1 bit
  27679.  
  27680. 1 2 bits
  27681.  
  27682. 1 0 0 7-bit data No 1 bit
  27683.  
  27684. 1 2 bits
  27685.  
  27686. 1 0 Yes 1 bit
  27687.  
  27688. 1 2 bits
  27689.  
  27690. 553
  27691.  
  27692. ----------------------- Page 570-----------------------
  27693.  
  27694. Table 16.4SCSCR2 Settings for SCIF Clock Source Selection
  27695.  
  27696. SCSCR2 SCIF Transmit/Receive Clock
  27697. Setting
  27698.  
  27699. Bit 1: CKE1 Mode Clock Source SCK2 Pin Function
  27700.  
  27701. 0 Asynchronous mode Internal SCIF does not use SCK2 pin
  27702.  
  27703. 1 External Inputs clock with frequency of 16
  27704. times the bit rate
  27705.  
  27706. 1 6 . 3 . 2 Serial Operation
  27707.  
  27708. Data Transfer Format
  27709.  
  27710. Table 16.5 shows the data transfer formats that can be used. Any of 8 transfer formats can be
  27711. selected according to the SCSMR2 settings.
  27712.  
  27713. 554
  27714.  
  27715. ----------------------- Page 571-----------------------
  27716.  
  27717. Table 16.5 Serial Transfer Formats
  27718.  
  27719. SCSMR2
  27720. Settings Serial Transfer Format and Frame Length
  27721.  
  27722. CHR PE STOP 1 2 3 4 5 6 7 8 9 10 11 12
  27723.  
  27724. 0 0 0 S 8-bit data STOP
  27725.  
  27726. 0 0 1 S 8-bit data STOP STOP
  27727.  
  27728. 0 1 0 S 8-bit data P STOP
  27729.  
  27730. 0 1 1 S 8-bit data P STOP STOP
  27731.  
  27732. 1 0 0 S 7-bit data STOP
  27733.  
  27734. 1 0 1 S 7-bit data STOP STOP
  27735.  
  27736. 1 1 0 S 7-bit data P STOP
  27737.  
  27738. 1 1 1 S 7-bit data P STOP STOP
  27739.  
  27740. S: Start bit
  27741. STOP: Stop bit
  27742. P: Parity bit
  27743.  
  27744. Clock
  27745.  
  27746. Either an internal clock generated by the on-chip baud rate generator or an external clock input at
  27747. the SCK2 pin can be selected as the SCIF’s serial clock, according to the setting of the CKE1 bit
  27748. in SCSCR2. For details of SCIF clock source selection, see table 16.4.
  27749.  
  27750. When an external clock is input at the SCK2 pin, the clock frequency should be 16 times the bit
  27751. rate used.
  27752.  
  27753. 555
  27754.  
  27755. ----------------------- Page 572-----------------------
  27756.  
  27757. Data Transfer Operations
  27758.  
  27759. SCIF Initialization: Before transmitting and receiving data, it is necessary to clear the TE and
  27760. RE bits in SCSCR2 to 0, then initialize the SCIF as described below.
  27761.  
  27762. When the transfer format, etc., is changed, the TE and RE bits must be cleared to 0 before making
  27763. the change using the following procedure. When the TE bit is cleared to 0, SCTSR2 is initialized.
  27764. Note that clearing the TE and RE bits to 0 does not change the contents of SCFSR2, SCFTDR2,
  27765. or SCFRDR2. The TE bit should be cleared to 0 after all transmit data has been sent and the
  27766. TEND flag in SCFSR2 has been set. TEND can also be cleared to 0 during transmission, but the
  27767. data being transmitted will go to the mark state after the clearance. Before setting TE again to start
  27768. transmission, the TFRST bit in SCFCR2 should first be set to 1 to reset SCFTDR2.
  27769.  
  27770. When an external clock is used the clock should not be stopped during operation, including
  27771. initialization, since operation will be unreliable in this case.
  27772.  
  27773. Figure 16.6 shows a sample SCIF initialization flowchart.
  27774.  
  27775. 556
  27776.  
  27777. ----------------------- Page 573-----------------------
  27778.  
  27779. Initialization 1. Set the clock selection in SCSCR2.
  27780.  
  27781. Be sure to clear bits RIE and TIE,
  27782. and bits TE and RE, to 0.
  27783. Clear TE and RE bits
  27784. 2. Set the data transfer format in
  27785. in SCSCR2 to 0
  27786. SCSMR2.
  27787.  
  27788. 3. Write a value corresponding to the
  27789. Set TFRST and RFRST bits
  27790. bit rate into SCBRR2. (Not
  27791. in SCFCR2 to 1
  27792. necessary if an external clock is
  27793. used.)
  27794. Set CKE1 bit in SCSCR2 4. Wait at least one bit interval, then
  27795. (leaving TE and RE bits set the TE bit or RE bit in SCSCR2
  27796. cleared to 0) to 1. Also set the RIE, REIE, and
  27797.  
  27798. TIE bits.
  27799.  
  27800. Set data transfer format Setting the TE and RE bits enables
  27801. in SCSMR2 the TxD2 and RxD2 pins to be
  27802. used. When transmitting, the SCIF
  27803. will go to the mark state; when
  27804. Set value in SCBRR2 receiving, it will go to the idle state,
  27805.  
  27806. Wait waiting for a start bit.
  27807.  
  27808. No
  27809. 1-bit interval elapsed?
  27810.  
  27811. Yes
  27812.  
  27813. Set RTRG1–0, TTRG1–0,
  27814. and MCE bits in SCFCR2
  27815. Clear TFRST and RFRST bits to 0
  27816.  
  27817. Set TE and RE bits
  27818. in SCSCR2 to 1,
  27819. and set RIE, TIE, and REIE bits
  27820.  
  27821. End
  27822.  
  27823. Figure 16.6 Sample SCIF Initialization Flowchart
  27824.  
  27825. 557
  27826.  
  27827. ----------------------- Page 574-----------------------
  27828.  
  27829. Serial Data Transmission: Figure 16.7 shows a sample flowchart for serial transmission.
  27830.  
  27831. Use the following procedure for serial data transmission after enabling the SCIF for transmission.
  27832.  
  27833.  
  27834. Start of transmission 1. SCIF status check and transmit data
  27835. write:
  27836.  
  27837. Read SCFSR2 and check that the
  27838. Read TDFE flag in SCFSR2 TDFE flag is set to 1, then write
  27839. transmit data to SCFTDR2, read 1
  27840. No from the TDFE and TEND flags, then
  27841. TDFE = 1? clear these flags to 0.
  27842.  
  27843. The number of transmit data bytes
  27844. Yes
  27845. that can be written is 16 - (transmit
  27846. Write transmit data (16 - transmit trigger set number).
  27847.  
  27848. trigger set number) to SCFTDR2, 2. Serial transmission continuation
  27849. read 1 from TDFE flag and TEND procedure:
  27850. flag in SCFSR2, then clear to 0
  27851. To continue serial transmission, read
  27852. 1 from the TDFE flag to confirm that
  27853. All data transmitted? No writing is possible, then write data to
  27854.  
  27855. SCFTDR2, and then clear the TDFE
  27856. Yes flag to 0.
  27857.  
  27858. 3. Break output at the end of serial
  27859. Read TEND flag in SCFSR2 transmission:
  27860.  
  27861. To output a break in serial
  27862. No transmission, clear the SPB2DT bit to
  27863. TEND = 1? 0 and set the SPB2IO bit to 1 in
  27864. SCSPTR2, then clear the TE bit in
  27865. Yes SCSCR2 to 0.
  27866.  
  27867. No In steps 1 and 2, it is possible to
  27868. Break output? ascertain the number of data bytes
  27869.  
  27870. that can be written from the number
  27871. Yes of transmit data bytes in SCFTDR2
  27872.  
  27873. Clear SPB2DT to 0 and indicated by the upper 8 bits of
  27874. SCFDR2.
  27875. set SPB2IO to 1
  27876.  
  27877. Clear TE bit in SCSCR2 to 0
  27878.  
  27879. End of transmission
  27880.  
  27881. Figure 16.7 Sample Serial Transmission Flowchart
  27882.  
  27883. 558
  27884.  
  27885. ----------------------- Page 575-----------------------
  27886.  
  27887. In serial transmission, the SCIF operates as described below.
  27888.  
  27889. 1. When data is written into SCFTDR2, the SCIF transfers the data from SCFTDR2 to SCTSR2
  27890. and starts transmitting. Confirm that the TDFE flag in the serial status register (SCFSR2) is
  27891. set to 1 before writing transmit data to SCFTDR2. The number of data bytes that can be
  27892. written is at least (16 - transmit trigger setting).
  27893.  
  27894. 2. When data is transferred from SCFTDR2 to SCTSR2 and transmission is started, consecutive
  27895. transmit operations are performed until there is no transmit data left in SCFTDR2. When the
  27896. number of transmit data bytes in SCFTDR2 falls to or below the transmit trigger number set
  27897. in the FIFO control register (SCFCR2), the TDFE flag is set. If the TIE bit in SCSCR2 is set
  27898. to 1 at this time, a transmit-FIFO-data-empty interrupt (TXI) request is generated.
  27899.  
  27900. The serial transmit data is sent from the TxD2 pin in the following order.
  27901.  
  27902. a. Start bit: One 0-bit is output.
  27903.  
  27904. b. Transmit data: 8-bit or 7-bit data is output in LSB-first order.
  27905.  
  27906. c. Parity bit: One parity bit (even or odd parity) is output. (A format in which a parity bit is
  27907. not output can also be selected.)
  27908.  
  27909. d. Stop bit(s): One or two 1-bits (stop bits) are output.
  27910.  
  27911. e. Mark state: 1 is output continuously until the start bit that starts the next transmission is
  27912. sent.
  27913.  
  27914. 3. The SCIF checks the SCFTDR2 transmit data at the timing for sending the stop bit. If data is
  27915. present, the data is transferred from SCFTDR2 to SCTSR2, the stop bit is sent, and then serial
  27916. transmission of the next frame is started.
  27917.  
  27918. If there is no transmit data, the TEND flag in SCFSR2 is set to 1, the stop bit is sent, and
  27919. then the line goes to the mark state in which 1 is output.
  27920.  
  27921. Figure 16.8 shows an example of the operation for transmission in asynchronous mode.
  27922.  
  27923. 559
  27924.  
  27925. ----------------------- Page 576-----------------------
  27926.  
  27927. Start Data Parity Stop Start Data Parity Stop
  27928. 1 bit bit bit bit bit bit 1
  27929.  
  27930. Serial Idle state
  27931. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 1
  27932. data (mark state)
  27933.  
  27934. TDFE
  27935.  
  27936. TEND
  27937.  
  27938. TXI interrupt TXI interrupt
  27939. request request
  27940. Data written to SCFTDR2
  27941. and TDFE flag read as 1
  27942. then cleared to 0 by TXI
  27943. interrupt handler
  27944.  
  27945. One frame
  27946.  
  27947. Figure 16.8 Example of Transmit Operation
  27948. (Example with 8-Bit Data, Parity, One Stop Bit)
  27949.  
  27950. 4. When modem control is enabled, transmission can be stopped and restarted in accordance with
  27951. the CTS2 input value. When CTS2 is set to 1, if transmission is in progress, the line goes to
  27952. the mark state after transmission of one frame. When CTS2 is set to 0, the next transmit data
  27953. is output starting from the start bit.
  27954.  
  27955. Figure 16.9 shows an example of the operation when modem control is used.
  27956.  
  27957. Start Parity Stop Start
  27958. bit bit bit bit
  27959.  
  27960. Serial data
  27961. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1
  27962. TxD2
  27963.  
  27964. CTS2
  27965.  
  27966. Drive high before stop bit
  27967.  
  27968. Figure 16.9 Example of Operation Using Modem Control (CTS2 )
  27969.  
  27970. 560
  27971.  
  27972. ----------------------- Page 577-----------------------
  27973.  
  27974. Serial Data Reception: Figure 16.10 shows a sample flowchart for serial reception.
  27975.  
  27976. Use the following procedure for serial data reception after enabling the SCIF for reception.
  27977.  
  27978. Start of reception 1. Receive error handling and
  27979. break detection: Read the DR,
  27980. ER, and BRK flags in
  27981. Read ER, DR, BRK flags in SCFSR2, and the ORER flag
  27982. SCFSR2 and ORER in SCLSR2, to identify any
  27983. flag in SCLSR2 error, perform the appropriate
  27984. error handling, then clear the
  27985. DR, ER, BRK, and ORER
  27986. flags to 0. In the case of a
  27987. ER or DR or BRK or ORER Yes framing error, a break can also
  27988.  
  27989. = 1? be detected by reading the
  27990. value of the RxD2 pin.
  27991. No Error handling
  27992. 2. SCIF status check and receive
  27993. data read : Read SCFSR2 and
  27994. Read RDF flag in SCFSR2 check that RDF = 1, then read
  27995. the receive data in SCFRDR2,
  27996. read 1 from the RDF flag, and
  27997. No
  27998. RDF = 1? then clear the RDF flag to 0.
  27999. The transition of the RDF flag
  28000. Yes from 0 to 1 can also be
  28001. identified by an RXI interrupt.
  28002. Read receive data in
  28003. 3. Serial reception continuation
  28004. SCFRDR2, and clear RDF
  28005. procedure: To continue serial
  28006. flag in SCFSR2 to 0
  28007. reception, read at least the
  28008. receive trigger set number of
  28009. No receive data bytes from
  28010. All data received?
  28011. SCFRDR2, read 1 from the
  28012. RDF flag, then clear the RDF
  28013. Yes
  28014. flag to 0. The number of
  28015. Clear RE bit in SCSCR2 to 0 receive data bytes in
  28016. SCFRDR2 can be ascertained
  28017. by reading the lower bits of
  28018. End of reception SCFDR2.
  28019.  
  28020. Figure 16.10 Sample Serial Reception Flowchart (1)
  28021.  
  28022. 561
  28023.  
  28024. ----------------------- Page 578-----------------------
  28025.  
  28026. 1. Whether a framing error or parity error
  28027. Error handling
  28028. has occurred in the receive data read
  28029. from SCFRDR2 can be ascertained
  28030. No from the FER and PER bits in
  28031. ORER = 1? SCFSR2.
  28032.  
  28033. Yes 2. When a break signal is received,
  28034. receive data is not transferred to
  28035. Overrun error handling SCFRDR2 while the BRK flag is set.
  28036. However, note that the last data in
  28037. SCFRDR2 is H'00 (the break data in
  28038. which a framing error occurred is
  28039. No
  28040. ER = 1? stored).
  28041.  
  28042.  
  28043. Yes
  28044.  
  28045. Receive error handling
  28046.  
  28047. No
  28048. BRK = 1?
  28049.  
  28050. Yes
  28051.  
  28052. Break handling
  28053.  
  28054. No
  28055. DR = 1?
  28056.  
  28057. Yes
  28058.  
  28059. Read receive data in SCFRDR2
  28060.  
  28061. Clear DR, ER, BRK flags
  28062. in SCFSR2,
  28063. and ORER flag in SCLSR2, to 0
  28064.  
  28065. End
  28066.  
  28067. Figure 16.10 Sample Serial Reception Flowchart (2)
  28068.  
  28069. 562
  28070.  
  28071. ----------------------- Page 579-----------------------
  28072.  
  28073. In serial reception, the SCIF operates as described below.
  28074.  
  28075. 1. The SCIF monitors the transmission line, and if a 0 start bit is detected, performs internal
  28076. synchronization and starts reception.
  28077.  
  28078. 2. The received data is stored in SCRSR2 in LSB-to-MSB order.
  28079.  
  28080. 3. The parity bit and stop bit are received.
  28081.  
  28082. After receiving these bits, the SCIF carries out the following checks.
  28083.  
  28084. a. Stop bit check: The SCIF checks whether the stop bit is 1. If there are two stop bits, only
  28085. the first is checked.
  28086.  
  28087. b. The SCIF checks whether receive data can be transferred from the receive shift register
  28088. (SCRSR2) to SCFRDR2.
  28089.  
  28090. c. Overrun error check: The SCIF checks that the ORER flag is 0, indicating that no overrun
  28091. error has occurred.
  28092.  
  28093. d. Break check: The SCIF checks that the BRK flag is 0, indicating that the break state is not
  28094. set.
  28095.  
  28096. If all the above checks are passed, the receive data is stored in SCFRDR2.
  28097.  
  28098. Note: Reception continues when parity error, framing error occurs.
  28099.  
  28100. 4. If the RIE bit in SCSCR2 is set to 1 when the RDF or DR flag changes to 1, a receive-FIFO-
  28101. data-full interrupt (RXI) request is generated.
  28102.  
  28103. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the ER flag changes to 1, a receive-
  28104. error interrupt (ERI) request is generated.
  28105.  
  28106. If the RIE bit or REIE bit in SCSCR2 is set to 1 when the BRK or ORER flag changes to 1,
  28107. a break reception interrupt (BRI) request is generated.
  28108.  
  28109. Figure 16.11 shows an example of the operation for reception.
  28110.  
  28111. 563
  28112.  
  28113. ----------------------- Page 580-----------------------
  28114.  
  28115. Start Data Parity Stop Start Data Parity Stop
  28116. 1 bit bit bit bit bit bit
  28117.  
  28118. Serial
  28119. 0 D0 D1 D7 0/1 1 0 D0 D1 D7 0/1 0 0/1
  28120. data
  28121.  
  28122. RDF
  28123.  
  28124. FER
  28125.  
  28126. RXI interrupt
  28127. request Data read and RDF flag ERI interrupt request
  28128.  
  28129. One frame read as 1 then cleared to generated by receive
  28130. 0 by RXI interrupt handler error
  28131.  
  28132. Figure 16.11 Example of SCIF Receive Operation
  28133. (Example with 8-Bit Data, Parity, One Stop Bit)
  28134.  
  28135. 5. When modem control is enabled, the RTS2 signal is output when SCFRDR2 is empty. When
  28136. RTS2 is 0, reception is possible. When RTS2 is 1, this indicates that SCFRDR2 contains 15
  28137. or more bytes of data, and there is no free space, reception is not possible.
  28138.  
  28139. Figure 16.12 shows an example of the operation when modem control is used.
  28140.  
  28141. Start Parity Stop Start
  28142. bit bit bit bit
  28143. Serial data
  28144. 0 D0 D1 D2 D7 0/1 1 0
  28145. RxD2
  28146.  
  28147. RTS2
  28148.  
  28149. Figure 16.12 Example of Operation Using Modem Control (RTS2 )
  28150.  
  28151. 564
  28152.  
  28153. ----------------------- Page 581-----------------------
  28154.  
  28155. 1 6 . 4 SCIF Interrupt Sources and the DMAC
  28156.  
  28157. The SCIF has four interrupt sources: transmit-FIFO-data-empty interrupt (TXI) request, receive-
  28158. error interrupt (ERI) request, receive-FIFO-data-full interrupt (RXI) request, and break interrupt
  28159. (BRI) request.
  28160.  
  28161. Table 16.6 shows the interrupt sources and their order of priority. The interrupt sources are enabled
  28162. or disabled by means of the TIE, RIE, and REIE bits in SCSCR2. A separate interrupt request is
  28163. sent to the interrupt controller for each of these interrupt sources.
  28164.  
  28165. When transmission/reception is carried out using the DMAC, output of interrupt requests to the
  28166. interrupt controller can be inhibited by clearing the RIE bit in SCSCR2 to 0. By setting the REIE
  28167. bit to 1 while the RIE bit is cleared to 0, it is possible to output ERI and BRI interrupt requests,
  28168. but not RXI interrupt requests.
  28169.  
  28170. When the TDFE flag in the serial status register (SCFSR2) is set to 1, a transmit-FIFO-data-
  28171. empty request is generated separately from the interrupt request. A transmit-FIFO-data-empty
  28172. request can activate the DMAC to perform data transfer.
  28173.  
  28174. When the RDF flag or DR flag in SCFSR2 is set to 1, a receive-FIFO-data-full request is
  28175. generated separately from the interrupt request. A receive-FIFO-data-full request can activate the
  28176. DMAC to perform data transfer.
  28177.  
  28178. When using the DMAC for transmission/reception, set and enable the DMAC before making the
  28179. SCIF settings. See section 14, Direct Memory Access Controller (DMAC), for details of the
  28180. DMAC setting procedure.
  28181.  
  28182. When the BRK flag in SCFSR2 or the ORER flag in the line status register (SCLSR2) is set to
  28183. 1, a BRI interrupt request is generated.
  28184.  
  28185. The TXI interrupt indicates that transmit data can be written, and the RXI interrupt indicates that
  28186. there is receive data in SCFRDR2.
  28187.  
  28188. 565
  28189.  
  28190. ----------------------- Page 582-----------------------
  28191.  
  28192. Table 16.6 SCIF Interrupt Sources
  28193.  
  28194. Interrupt DMAC Priority on
  28195. Source Description Activation Reset
  28196. Release
  28197.  
  28198. ERI Interrupt initiated by receive error flag (ER) Not possible High
  28199.  
  28200. RXI Interrupt initiated by receive FIFO data full flag Possible ↑
  28201. (RDF) or receive data ready flag (DR)
  28202.  
  28203. BRI Interrupt initiated by break flag (BRK) or overrun Not possible
  28204. error flag (ORER) ↓
  28205.  
  28206. TXI Interrupt initiated by transmit FIFO data empty Possible Low
  28207. flag (TDFE)
  28208.  
  28209. See section 5, Exceptions, for priorities and the relationship with non-SCIF interrupts.
  28210.  
  28211. 1 6 . 5 Usage Notes
  28212.  
  28213. Note the following when using the SCIF.
  28214.  
  28215. SCFTDR2 Writing and the TDFE Flag: The TDFE flag in the serial status register
  28216. (SCFSR2) is set when the number of transmit data bytes written in the transmit FIFO data register
  28217. (SCFTDR2) has fallen to or below the transmit trigger number set by bits TTRG1 and TTRG0 in
  28218. the FIFO control register (SCFCR2). After TDFE is set, transmit data up to the number of empty
  28219. bytes in SCFTDR2 can be written, allowing efficient continuous transmission.
  28220.  
  28221. However, if the number of data bytes written in SCFTDR2 is equal to or less than the transmit
  28222. trigger number, the TDFE flag will be set to 1 again after being read as 1 and cleared to 0. TDFE
  28223. clearing should therefore be carried out when SCFTDR2 contains more than the transmit trigger
  28224. number of transmit data bytes.
  28225.  
  28226. The number of transmit data bytes in SCFTDR2 can be found from the upper 8 bits of the FIFO
  28227. data count register (SCFDR2).
  28228.  
  28229. SCFRDR2 Reading and the RDF Flag: The RDF flag in the serial status register
  28230. (SCFSR2) is set when the number of receive data bytes in the receive FIFO data register
  28231. (SCFRDR2) has become equal to or greater than the receive trigger number set by bits RTRG1
  28232. and RTRG0 in the FIFO control register (SCFCR2). After RDF is set, receive data equivalent to
  28233. the trigger number can be read from SCFRDR2, allowing efficient continuous reception.
  28234.  
  28235. However, if the number of data bytes in SCFRDR2 is equal to or greater than the trigger number,
  28236. the RDF flag will be set to 1 again if it is cleared to 0. RDF should therefore be cleared to 0 after
  28237. being read as 1 after all the receive data has been read.
  28238.  
  28239. 566
  28240.  
  28241. ----------------------- Page 583-----------------------
  28242.  
  28243. The number of receive data bytes in SCFRDR2 can be found from the lower 8 bits of the FIFO
  28244. data count register (SCFDR2).
  28245.  
  28246. Break Detection and Processing: Break signals can be detected by reading the RxD2 pin
  28247. directly when a framing error (FER) is detected. In the break state the input from the RxD2 pin
  28248. consists of all 0s, so the FER flag is set and the parity error flag (PER) may also be set.
  28249.  
  28250. Although the SCIF stops transferring receive data to SCFRDR2 after receiving a break, the receive
  28251. operation continues.
  28252.  
  28253. Sending a Break Signal: The input/output condition and level of the TxD2 pin are determined
  28254. by bits SPB2IO and SPB2DT in the serial port register (SCSPTR2). This feature can be used to
  28255. send a break signal.
  28256.  
  28257. After the serial transmitter is initialized, the TxD2 pin function is not selected and the value of the
  28258. SPB2DT bit substitutes for the mark state until the TE bit is set to 1 (i.e. transmission is
  28259. enabled). The SPB2IO and SPB2DT bits should therefore be set to 1 (designating output and high
  28260. level) beforehand.
  28261.  
  28262. To send a break signal during serial transmission, clear the SPB2DT bit to 0 (designating low
  28263. level), then clear the TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the
  28264. transmitter is initialized, regardless of its current state, and 0 is output from the TxD2 pin.
  28265.  
  28266. Receive Data Sampling Timing and Receive Margin: The SCIF operates on a base
  28267. clock with a frequency of 16 times the bit rate. In reception, the SCIF synchronizes internally with
  28268. the fall of the start bit, which it samples on the base clock. Receive data is latched at the rising
  28269. edge of the eighth base clock pulse. The timing is shown in figure 16.13.
  28270.  
  28271. 567
  28272.  
  28273. ----------------------- Page 584-----------------------
  28274.  
  28275. 16 clocks
  28276.  
  28277. 8 clocks
  28278.  
  28279. 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
  28280.  
  28281. Base clock
  28282.  
  28283. –7.5 clocks +7.5 clocks
  28284.  
  28285. Receive data Start bit D0 D1
  28286. (RxD2)
  28287.  
  28288. Synchronization
  28289. sampling timing
  28290.  
  28291. Data sampling
  28292. timing
  28293.  
  28294. Figure 16.13 Receive Data Sampling Timing in Asynchronous Mode
  28295.  
  28296. The receive margin in asynchronous mode can therefore be expressed as shown in equation (1).
  28297.  
  28298. 1 | D – 0.5 |
  28299. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100% ................... (1)
  28300. 2N N
  28301.  
  28302. M: Receive margin (%)
  28303. N: Ratio of clock frequency to bit rate (N = 16)
  28304. D: Clock duty cycle (D = 0 to 1.0)
  28305. L: Frame length (L = 9 to 12)
  28306. F: Absolute deviation of clock frequency
  28307.  
  28308. From equation (1), if F = 0 and D = 0.5, the receive margin is 46.875%, as given by equation (2).
  28309.  
  28310. When D = 0.5 and F = 0:
  28311.  
  28312. M = (0.5 – 1 / (2 × 16) ) × 100% = 46.875% .......................................... (2)
  28313.  
  28314. This is a theoretical value. A reasonable margin to allow in system designs is 20% to 30%.
  28315.  
  28316. 568
  28317.  
  28318. ----------------------- Page 585-----------------------
  28319.  
  28320. SCK2/MRESET: As the manual reset pin is multiplexed with the SCK2 pin, a manual reset
  28321. must not be executed while the SCIF is operating in external clock mode.
  28322.  
  28323. When Using the DMAC: When using the DMAC for transmission/reception, inhibit output
  28324. of RXI and TXI interrupt requests to the interrupt controller. If interrupt request output is enabled,
  28325. interrupt requests to the interrupt controller will be cleared by the DMAC without regard to the
  28326. interrupt handler.
  28327.  
  28328. Serial Ports: Note that, when the SCIF pin value is read using a serial port, the value read will
  28329. be the value two peripheral clock cycles earlier.
  28330.  
  28331. Overrun error flag: SCIF overrun error flag is not set in the case that overrun error and
  28332. flaming error occurred simultaneously in receiving data, that means 17th byte data which overrun
  28333. was accompanying with flaming error. In such case, only SCFSR2. ER flag which shows
  28334. occurrence of flaming error is set. RxFIFO stores data received before the overrun and does not
  28335. store (i. e. lose) overrun data. SCIF has no bit which corresponds to SCFSR2. FER for the lost
  28336. data.
  28337.  
  28338. In addition to the overrun error handling software routine, exception handler should check co-
  28339. occurrence of overrun error when a flaming error is occurred and when a co-occurrence is found, it
  28340. should handle also overrun error (When (i) a overrun error solely occurred without accompanying
  28341. with other receive error and (ii) when a parity error is accompanied with overrun error, usual
  28342. overrun error handling can be used. Overrun error handling should rather be done primarily).
  28343.  
  28344. 569
  28345.  
  28346. ----------------------- Page 586-----------------------
  28347.  
  28348. Flow chart:
  28349. Framing error occurrence
  28350. When flaming error (SCFSR. ER=1) is occurred, bit7 to
  28351.  
  28352. bit0 should be read out from SCFDR2. If bit7 to bit0
  28353. Bits 7 to 0 No
  28354. in SCFDR2 = H'10? equals H'10, contents of the RxFIFO should be read.
  28355.  
  28356. When the data received last is not accompanied with
  28357. Yes
  28358. flaming error (SCFSR2. FER=0) both overrun error
  28359. Normal error handling
  28360. handling and flaming error handling shoud be
  28361.  
  28362. PER or FER bit Yes conducted.
  28363. in SCFSR2 set to 1?
  28364.  
  28365.  
  28366. No
  28367. Error handling
  28368.  
  28369. Read receive FIFO
  28370.  
  28371. No
  28372. Last data?
  28373.  
  28374. Yes
  28375.  
  28376. Overrun error handling
  28377. +
  28378. framing error handling
  28379.  
  28380. Figure 16.14 Overrun Error Flag
  28381.  
  28382. 570
  28383.  
  28384. ----------------------- Page 587-----------------------
  28385.  
  28386. Section 17 Smart Card Interface
  28387.  
  28388. 1 7 . 1 Overview
  28389.  
  28390. An IC card (smart card) interface conforming to ISO/IEC 7816-3 (Identification Card) is supported
  28391. as a serial communication interface (SCI) extension function.
  28392.  
  28393. Switching between the normal serial communication interface and the smart card interface is carried
  28394. out by means of a register setting.
  28395.  
  28396. 1 7 . 1 . 1 Features
  28397.  
  28398. Features of the smart card interface are listed below.
  28399.  
  28400. • Asynchronous mode
  28401.  
  28402.  Data length: 8 bits
  28403.  
  28404.  Parity bit generation and checking
  28405.  
  28406.  Transmission of error signal (parity error) in receive mode
  28407.  
  28408.  Error signal detection and automatic data retransmission in transmit mode
  28409.  
  28410.  Direct convention and inverse convention both supported
  28411.  
  28412. • On-chip baud rate generator allows any bit rate to be selected
  28413.  
  28414. • Three interrupt sources
  28415.  
  28416. There are three interrupt sources—transmit-data-empty, receive-data-full, and transmit/receive
  28417. error—that can issue requests independently.
  28418.  
  28419. The transmit-data-empty interrupt and receive-data-full interrupt can activate the DMA
  28420. controller (DMAC) to execute data transfer.
  28421.  
  28422. 571
  28423.  
  28424. ----------------------- Page 588-----------------------
  28425.  
  28426. 1 7 . 1 . 2 Block Diagram
  28427.  
  28428. Figure 17.1 shows a block diagram of the smart card interface.
  28429.  
  28430. e
  28431. c Internal
  28432. a
  28433. Module data bus f data bus
  28434. r
  28435. e
  28436. t
  28437. n
  28438. i
  28439.  
  28440. s
  28441. u
  28442. B
  28443.  
  28444. SCRDR1 SCTDR1 SCSCMR1 SCBRR1
  28445. SCSSR1
  28446. Pφ
  28447. SCSCR1
  28448. RxD SCRSR1 SCTSR1
  28449. Baud rate
  28450. SCSMR1 Pφ/4
  28451. generator
  28452. SCSPTR1
  28453. Transmission/ Pφ/16
  28454. reception
  28455. control Pφ/64
  28456. TxD
  28457. Parity generation Clock
  28458.  
  28459. Parity check
  28460.  
  28461. External clock
  28462. SCK
  28463.  
  28464. TXI
  28465. RXI
  28466. ERI
  28467.  
  28468. SCI
  28469.  
  28470. SCSCMR1: Smart card mode register
  28471. SCRSR1: Receive shift register
  28472. SCRDR1: Receive data register
  28473. SCTSR1: Transmit shift register
  28474. SCTDR1: Transmit data register
  28475. SCSMR1: Serial mode register
  28476. SCSCR1: Serial control register
  28477. SCSSR1: Serial status register
  28478. SCBRR1: Bit rate register
  28479. SCSPTR1: Serial port register
  28480.  
  28481. Figure 17.1 Block Diagram of Smart Card Interface
  28482.  
  28483. 572
  28484.  
  28485. ----------------------- Page 589-----------------------
  28486.  
  28487. 1 7 . 1 . 3 Pin Configuration
  28488.  
  28489. Table 17.1 shows the smart card interface pin configuration.
  28490.  
  28491. Table 17.1 Smart Card Interface Pins
  28492.  
  28493. Pin Name Abbreviation I / O Function
  28494.  
  28495. Serial clock pin MD0/SCK I/O Clock input/output
  28496.  
  28497. Receive data pin RxD Input Receive data input
  28498.  
  28499. Transmit data pin MD7/TxD Output Transmit data output
  28500.  
  28501. 1 7 . 1 . 4 Register Configuration
  28502.  
  28503. The smart card interface has the internal registers shown in table 17.2. Details of the SCBRR1,
  28504. SCTDR1, SCRDR1, and SCSPTR1 registers are the same as for the normal SCI function: see the
  28505. register descriptions in section 15, Serial Communication Interface.
  28506.  
  28507. With the exception of the serial port register, the smart card interface registers are initialized in
  28508. standby mode and in the module standby state as well as by a power-on reset or manual reset.
  28509. When recovering from standby mode or the module standby state, the registers must be set again.
  28510.  
  28511. Table 17.2 Smart Card Interface Registers
  28512.  
  28513. Initial Area 7 Acces
  28514. Name Abbreviation R/ W Value P4 Address Address s Size
  28515.  
  28516. Serial mode register SCSMR1 R/W H'00 H'FFE00000 H'1FE00000 8
  28517.  
  28518. Bit rate register SCBRR1 R/W H'FF H'FFE00004 H'1FE00004 8
  28519.  
  28520. Serial control register SCSCR1 R/W H'00 H'FFE00008 H'1FE00008 8
  28521.  
  28522. Transmit data register SCTDR1 R/W H'FF H'FFE0000C H'1FE0000C 8
  28523. Serial status register SCSSR1 R/(W)*1 H'84 H'FFE00010 H'1FE00010 8
  28524.  
  28525. Receive data register SCRDR1 R H'00 H'FFE00014 H'1FE00014 8
  28526.  
  28527. Smart card mode SCSCMR1 R/W H'00 H'FFE00018 H'1FE00018 8
  28528. register
  28529. Serial port register SCSPTR1 R/W H'00*2 H'FFE0001C H'1FE0001C 8
  28530.  
  28531. Notes: 1. Only 0 can be written, to clear flags.
  28532. 2. The value of bits 2 and 0 is undefined.
  28533.  
  28534. 573
  28535.  
  28536. ----------------------- Page 590-----------------------
  28537.  
  28538. 1 7 . 2 Register Descriptions
  28539.  
  28540. Only registers that have been added, and bit functions that have been modified, for the smart card
  28541. interface are described here.
  28542.  
  28543. 1 7 . 2 . 1 Smart Card Mode Register (SCSCMR1)
  28544.  
  28545. SCSCMR1 is an 8-bit readable/writable register that selects the smart card interface function.
  28546. SCSCMR1 is initialized to H'00 by a power-on reset or manual reset, in standby mode, and in the
  28547. module standby state.
  28548.  
  28549. Bit: 7 6 5 4 3 2 1 0
  28550.  
  28551. — — — — SDIR SINV — SMIF
  28552.  
  28553. Initial value: — — — — 0 0 — 0
  28554.  
  28555. R/W: — — — — R/W R/W — R/W
  28556.  
  28557. Bits 7 to 4 and 1—Reserved: These bits are always read as 0, and should only be written
  28558. with 0.
  28559.  
  28560. Bit 3—Smart Card Data Transfer Direction (SDIR): Selects the serial/parallel
  28561. conversion format.
  28562.  
  28563. Bit 3: SDIR Description
  28564.  
  28565. 0 SCTDR1 contents are transmitted LSB-first (Initial value)
  28566.  
  28567. Receive data is stored in SCRDR1 LSB-first
  28568.  
  28569. 1 SCTDR1 contents are transmitted MSB-first
  28570.  
  28571. Receive data is stored in SCRDR1 MSB-first
  28572.  
  28573. Bit 2—Smart Card Data Invert (SINV): Specifies inversion of the data logic level. This
  28574. function is used together with the bit 3 function for communication with an inverse convention
  28575. card. The SINV bit does not affect the logic level of the parity bit. For parity-related setting
  28576. procedures, see section 17.3.4, Register Settings.
  28577.  
  28578. Bit 2: SINV Description
  28579.  
  28580. 0 SCTDR1 contents are transmitted as they are (Initial value)
  28581.  
  28582. Receive data is stored in SCRDR1 as it is
  28583.  
  28584. 1 SCTDR1 contents are inverted before being transmitted
  28585.  
  28586. Receive data is stored in SCRDR1 in inverted form
  28587.  
  28588. 574
  28589.  
  28590. ----------------------- Page 591-----------------------
  28591.  
  28592. Bit 0—Smart Card Interface Mode Select (SMIF): Enables or disables the smart card
  28593. interface function.
  28594.  
  28595. Bit 0: SMIF Description
  28596.  
  28597. 0 Smart card interface function is disabled (Initial value)
  28598.  
  28599. 1 Smart card interface function is enabled
  28600.  
  28601. 1 7 . 2 . 2 Serial Mode Register (SCSMR1)
  28602.  
  28603. Bit 7 of SCSMR1 has a different function in smart card interface mode.
  28604.  
  28605. Bit: 7 6 5 4 3 2 1 0
  28606.  
  28607. GM(C/A) CHR PE O/E STOP MP CKS1 CKS0
  28608.  
  28609. Initial value: 0 0 0 0 0 0 0 0
  28610.  
  28611. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  28612.  
  28613. Bit 7—GSM Mode (GM): Sets the smart card interface function to GSM mode.
  28614.  
  28615. With the normal smart card interface, this bit is cleared to 0. Setting this bit to 1 selects GSM
  28616. mode, an additional mode for controlling the timing for setting the TEND flag that indicates
  28617. completion of transmission, and the type of clock output used. The details of the additional clock
  28618. output control mode are specified by the CKE1 and CKE0 bits in the serial control register
  28619. (SCSCR1). In GSM mode, the pulse width is guaranteed when SCK start/stop specifications are
  28620. made by CKE1 and CKE0.
  28621.  
  28622. Bit 7: GM Description
  28623.  
  28624. 0 Normal smart card interface mode operation (Initial value)
  28625.  
  28626. The TEND flag is set 12.5 etu after the beginning of the start bit
  28627.  
  28628. Clock output on/off control only
  28629.  
  28630. 1 GSM mode smart card interface mode operation
  28631.  
  28632. The TEND flag is set 11.0 etu after the beginning of the start bit
  28633.  
  28634. Clock output on/off and fixed-high/fixed-low control (set in SCSCR1)
  28635.  
  28636. Note: etu: Elementary time unit (time for transfer of 1 bit)
  28637.  
  28638. 575
  28639.  
  28640. ----------------------- Page 592-----------------------
  28641.  
  28642. Bits 6 to 0: Operate in the same way as for the normal SCI. See section 15, Serial
  28643. Communication Interface, for details. With the smart card interface, the following settings should
  28644. be used: CHR = 0, PE = 1, STOP = 1, MP = 0.
  28645.  
  28646. 1 7 . 2 . 3 Serial Control Register (SCSCR1)
  28647.  
  28648. Bits 1 and 0 of SCSCR1 have a different function in smart card interface mode.
  28649.  
  28650. Bit: 7 6 5 4 3 2 1 0
  28651.  
  28652. TIE RIE TE RE — — CKE1 CKE0
  28653.  
  28654. Initial value: 0 0 0 0 0 0 0 0
  28655.  
  28656. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  28657.  
  28658. Bits 7 to 4: Operate in the same way as for the normal SCI. See section 15, Serial
  28659. Communication Interface, for details.
  28660.  
  28661. Bits 3 and 2: Not used with the smart card interface.
  28662.  
  28663. Bits 1 and 0—Clock Enable 1 and 0 (CKE1, CKE0): These bits specify the function of
  28664. the SCK pin. In smart card interface mode, an internal clock is always used as the clock source. In
  28665. smart card interface mode, it is possible to specify a fixed high level or fixed low level for the
  28666. clock output, in addition to the usual switching between enabling and disabling of the clock
  28667. output.
  28668.  
  28669. G M CKE1 CKE0 SCK Pin Function
  28670.  
  28671. 0 0 0 Port I/O pin
  28672.  
  28673. 1 Clock output as SCK output pin
  28674.  
  28675. 1 0 Invalid setting: must not be used
  28676.  
  28677. 1 Invalid setting: must not be used
  28678.  
  28679. 1 0 0 Output pin with output fixed low
  28680.  
  28681. 1 Clock output as output pin
  28682.  
  28683. 1 0 Output pin with output fixed high
  28684.  
  28685. 1 Clock output as output pin
  28686.  
  28687. 576
  28688.  
  28689. ----------------------- Page 593-----------------------
  28690.  
  28691. 1 7 . 2 . 4 Serial Status Register (SCSSR1)
  28692.  
  28693. Bit 4 of SCSSR1 has a different function in smart card interface mode. Coupled with this, the
  28694. setting conditions for bit 2 (TEND) are also different.
  28695.  
  28696. Bit: 7 6 5 4 3 2 1 0
  28697.  
  28698. TDRE RDRF ORER FER/ PER TEND — —
  28699. ERS
  28700.  
  28701. Initial value: 1 0 0 0 0 1 0 0
  28702.  
  28703. R/W: R/(W)* R/(W)* R/(W)* R/(W)* R/(W)* R R R/W
  28704.  
  28705. Note: * Only 0 can be written, to clear the flag.
  28706.  
  28707. Bits 7 to 5: Operate in the same way as for the normal SCI. See section 15, Serial
  28708. Communication Interface, for details.
  28709.  
  28710. Bit 4—Error Signal Status (ERS): In smart card interface mode, bit 4 indicates the status
  28711. of the error signal sent back from the receiving side during transmission. Framing errors are not
  28712. detected in smart card interface mode.
  28713.  
  28714. Bit 4: ERS Description
  28715.  
  28716. 0 Normal reception, no error signal (Initial value)
  28717.  
  28718. [Clearing conditions]
  28719.  
  28720. Power-on reset, manual reset, standby mode, or module standby
  28721.  
  28722. When 0 is written to ERS after reading ERS = 1
  28723.  
  28724. 1 An error signal has been sent from the receiving side indicating detection of
  28725. a parity error
  28726.  
  28727. [Setting condition]
  28728.  
  28729. When the low level of the error signal is detected
  28730.  
  28731. Note: Clearing the TE bit in SCSCR1 to 0 does not affect the ERS flag, which retains its previous
  28732. state.
  28733.  
  28734. Bit 3—Parity Error (PER): Operates in the same way as for the normal SCI. See section 15,
  28735. Serial Communication Interface, for details.
  28736.  
  28737. 577
  28738.  
  28739. ----------------------- Page 594-----------------------
  28740.  
  28741. Bit 2—Transmit End (TEND): The setting conditions for the TEND flag are as follows.
  28742.  
  28743. Bit 2: TEND Description
  28744.  
  28745. 0 Transmission in progress
  28746.  
  28747. [Clearing condition]
  28748.  
  28749. When 0 is written to TDRE after reading TDRE = 1
  28750.  
  28751. 1 Transmission has been ended (Initial value)
  28752.  
  28753. [Setting conditions]
  28754.  
  28755. Power-on reset, manual reset, standby mode, or module standby
  28756.  
  28757. When the TE bit in SCSCR1 is 0 and the FER/ERS bit is also 0
  28758.  
  28759. When the GM bit in SCSMR1 is 0, and TDRE = 1 and FER/ERS = 0 (normal
  28760. transmission) 2.5 etu after transmission of a 1-byte serial character
  28761.  
  28762. When the GM bit in SCSMR1 is 1, and TDRE = 1 and FER/ERS = 0 (normal
  28763. transmission) 1.0 etu after transmission of a 1-byte serial character
  28764.  
  28765. etu: Elementary Time Unit
  28766.  
  28767. Bits 1 and 0: Not used with the smart card interface.
  28768.  
  28769. 1 7 . 3 Operation
  28770.  
  28771. 1 7 . 3 . 1 Overview
  28772.  
  28773. The main functions of the smart card interface are as follows.
  28774.  
  28775. • One frame consists of 8-bit data plus a parity bit.
  28776.  
  28777. • In transmission, a guard time of at least 2 etu (elementary time unit: the time for transfer of
  28778. one bit) is left between the end of the parity bit and the start of the next frame.
  28779.  
  28780. • If a parity error is detected during reception, a low error signal level is output for a 1-etu period
  28781. 10.5 etu after the start bit.
  28782.  
  28783. • If an error signal is detected during transmission, the same data is transmitted automatically
  28784. after the elapse of 2 etu or longer.
  28785.  
  28786. • Only asynchronous communication is supported; there is no synchronous communication
  28787. function.
  28788.  
  28789. 578
  28790.  
  28791. ----------------------- Page 595-----------------------
  28792.  
  28793. 1 7 . 3 . 2 Pin Connections
  28794.  
  28795. Figure 17.2 shows a schematic diagram of smart card interface related pin connections.
  28796.  
  28797. In communication with an IC card, since both transmission and reception are carried out on a
  28798. single data transmission line, the TxD pin and RxD pin should be connected outside the chip. The
  28799. data transmission line should be pulled up on the VCC power supply side with a resistor. The
  28800. TxD pin is multiplexed with MD7, so caution is required in a reset.
  28801.  
  28802. When the clock generated on the smart card interface is used by an IC card, the SCK pin output is
  28803. input to the CLK pin of the IC card. No connection is needed if the IC card uses an internal clock.
  28804.  
  28805. Chip port output is used as the reset signal.
  28806.  
  28807. Other pins must normally be connected to the power supply or ground.
  28808.  
  28809. Note: If an IC card is not connected, and both TE and RE are set to 1, closed
  28810. transmission/reception is possible, enabling self-diagnosis to be carried out.
  28811.  
  28812. VCC
  28813.  
  28814.  
  28815. TxD
  28816. IO
  28817. Data line
  28818. RxD
  28819.  
  28820. SCK Clock line
  28821. CLK
  28822.  
  28823. SH7750 Px (port) Reset line RST
  28824.  
  28825. Connected equipment IC card
  28826.  
  28827. Figure 17.2 Schematic Diagram of Smart Card Interface Pin Connections
  28828.  
  28829. 579
  28830.  
  28831. ----------------------- Page 596-----------------------
  28832.  
  28833. 1 7 . 3 . 3 Data Format
  28834.  
  28835. Figure 17.3 shows the smart card interface data format. In reception in this mode, a parity check is
  28836. carried out on each frame, and if an error is detected an error signal is sent back to the transmitting
  28837. side to request retransmission of the data. If an error signal is detected during transmission, the
  28838. same data is retransmitted.
  28839.  
  28840. When there is no parity error
  28841.  
  28842. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  28843.  
  28844. Transmitting station output
  28845.  
  28846. When a parity error occurs
  28847.  
  28848. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp DE
  28849.  
  28850. Transmitting station output
  28851.  
  28852. Receiving
  28853. station
  28854. Ds: Start bit output
  28855. D0–D7: Data bits
  28856. Dp: Parity bit
  28857. DE: Error signal
  28858.  
  28859.  
  28860. Figure 17.3 Smart Card Interface Data Format
  28861.  
  28862. The operation sequence is as follows.
  28863.  
  28864. 1. When the data line is not in use it is in the high-impedance state, and is fixed high with a pull-
  28865. up resistor.
  28866.  
  28867. 2. The transmitting station starts transmission of one frame of data. The data frame starts with a
  28868. start bit (Ds, low-level), followed by 8 data bits (D0 to D7) and a parity bit (Dp).
  28869.  
  28870. 3. With the smart card interface, the data line then returns to the high-impedance state. The data
  28871. line is pulled high with a pull-up resistor.
  28872.  
  28873. 4. The receiving station carries out a parity check.
  28874.  
  28875. If there is no parity error and the data is received normally, the receiving station waits for
  28876. reception of the next data.
  28877.  
  28878. 580
  28879.  
  28880. ----------------------- Page 597-----------------------
  28881.  
  28882. If a parity error occurs, however, the receiving station outputs an error signal (DE, low-level)
  28883. to request retransmission of the data. After outputting the error signal for the prescribed length
  28884. of time, the receiving station places the signal line in the high-impedance state again. The
  28885. signal line is pulled high again by a pull-up resistor.
  28886.  
  28887. 5. If the transmitting station does not receive an error signal, it proceeds to transmit the next data
  28888. frame.
  28889.  
  28890. If it receives an error signal, however, it returns to step 2 and retransmits the erroneous data.
  28891.  
  28892. 1 7 . 3 . 4 Register Settings
  28893.  
  28894. Table 17.3 shows a bit map of the registers used by the smart card interface. Bits indicated as 0 or
  28895. 1 must be set to the value shown. The setting of other bits is described below.
  28896.  
  28897. Table 17.3 Smart Card Interface Register Settings
  28898.  
  28899. Bit
  28900.  
  28901. Register Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
  28902.  
  28903. SCSMR1 GM 0 1 O/E 1 0 CKS1 CKS0
  28904.  
  28905. SCBRR1 BRR7 BRR6 BRR5 BRR4 BRR3 BRR2 BRR1 BRR0
  28906.  
  28907. SCSCR1 TIE RIE TE RE 0 0 CKE1 CKE0
  28908.  
  28909. SCTDR1 TDR7 TDR6 TDR5 TDR4 TDR3 TDR2 TDR1 TDR0
  28910.  
  28911. SCSSR1 TDRE RDRF ORER FER/ERS PER TEND 0 0
  28912.  
  28913. SCRDR1 RDR7 RDR6 RDR5 RDR4 RDR3 RDR2 RDR1 RDR0
  28914.  
  28915. SCSCMR1 — — — — SDIR SINV — SMIF
  28916.  
  28917. SCSPTR1 EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  28918.  
  28919. Note: A dash indicates an unused bit.
  28920.  
  28921. Serial Mode Register (SCSMR1) Settings: The GM bit is used to select the timing of
  28922. TEND flag setting, and, together with the CKE1 and CKE0 bits in the serial control register
  28923. (SCSCR1), to select the clock output state.
  28924.  
  28925. 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
  28926. inverse convention type.
  28927.  
  28928. Bits CKS1 and CKS0 select the clock source of the on-chip baud rate generator. See section
  28929. 17.3.5, Clock.
  28930.  
  28931. 581
  28932.  
  28933. ----------------------- Page 598-----------------------
  28934.  
  28935. I/O data Ds Da Db Dc Dd De Df Dg Dh Dp DE
  28936.  
  28937. Guard
  28938. time
  28939.  
  28940. 12.5 etu
  28941. TXI
  28942. GM = 0
  28943. (TEND interrupt)
  28944.  
  28945. 11.0 etu
  28946. GM = 1
  28947.  
  28948. Figure 17.4 TEND Generation Timing
  28949.  
  28950. Bit Rate Register (SCBRR1) Setting: SCBRR1 is used to set the bit rate. See section
  28951. 17.3.5, Clock, for the method of calculating the value to be set.
  28952.  
  28953. Serial Control Register (SCSCR1) Settings: The function of the TIE, RIE, TE, and RE
  28954. bits is the same as for the normal SCI. See section 15, Serial Communication Interface, for
  28955. details.
  28956.  
  28957. The CKE1 and CKE0 bits specify the clock output state. See section 17.3.5, Clock, for details.
  28958.  
  28959. Smart Card Mode Register (SCSCMR1) Settings: The SDIR bit and SINV bit are both
  28960. cleared to 0 if the IC card is of the direct convention type, and both set to 1 if of the inverse
  28961. convention type.
  28962.  
  28963. The SMIF bit is set to 1 when the smart card interface is used.
  28964.  
  28965. Figure 17.5 shows examples of register settings and the waveform of the start character for the two
  28966. types of IC card (direct convention and inverse convention).
  28967.  
  28968. With the direct convention type, the logic 1 level corresponds to state Z and the logic 0 level to
  28969. state A, and transfer is performed in LSB-first order. The start character data in this case is H'3B.
  28970. The parity bit is 1 since even parity is stipulated for the smart card.
  28971.  
  28972. With the inverse convention type, the logic 1 level corresponds to state A and the logic 0 level to
  28973. state Z, and transfer is performed in MSB-first order. The start character data in this case is H'3F.
  28974. The parity bit is 0, corresponding to state Z, since even parity is stipulated for the smart card.
  28975.  
  28976. Inversion specified by the SINV bit applies only to the data bits, D7 to D0. For parity bit
  28977. inversion, the O/E bit in SCSMR1 is set to odd parity mode. (This applies to both transmission
  28978. and reception).
  28979.  
  28980. 582
  28981.  
  28982. ----------------------- Page 599-----------------------
  28983.  
  28984. (Z) A Z Z A Z Z Z A A Z (Z) State
  28985.  
  28986. Ds D0 D1 D2 D3 D4 D5 D6 D7 Dp
  28987.  
  28988. (a) Direct convention (SDIR = SINV = O/E = 0)
  28989.  
  28990. (Z) A Z Z A A A A A A Z (Z) State
  28991.  
  28992. Ds D7 D6 D5 D4 D3 D2 D1 D0 Dp
  28993.  
  28994. (b) Inverse convention (SDIR = SINV = O/E = 1)
  28995.  
  28996. Figure 17.5 Sample Start Character Waveforms
  28997.  
  28998. 1 7 . 3 . 5 Clock
  28999.  
  29000. Only an internal clock generated by the on-chip baud rate generator can be used as the
  29001. transmit/receive clock for the smart card interface. The bit rate is set with the bit rate register
  29002. (SCBRR1) and the CKS1 and CKS0 bits in the serial mode register (SCSMR1). The equation for
  29003. calculating the bit rate is shown below. Table 17.5 shows some sample bit rates.
  29004.  
  29005. If clock output is selected with CKE0 set to 1, a clock with a frequency of 372 times the bit rate is
  29006. output from the SCK pin.
  29007.  
  29008.  
  29009. P
  29010. B = φ × 106
  29011. 1488 × 22n–1 × (N + 1)
  29012.  
  29013. Where: N = Value set in SCBRR1 (0 ≤ N ≤ 255)
  29014. B = Bit rate (bits/s)
  29015. Pφ = Peripheral module operating frequency (MHz)
  29016. n = 0 to 3 (See table 17.4)
  29017.  
  29018. Table 17.4Values of n and Corresponding CKS1 and CKS0 Settings
  29019.  
  29020. n CKS1 CKS0
  29021.  
  29022. 0 0 0
  29023.  
  29024. 1 0 1
  29025.  
  29026. 2 1 0
  29027.  
  29028. 3 1 1
  29029.  
  29030. 583
  29031.  
  29032. ----------------------- Page 600-----------------------
  29033.  
  29034. Table 17.5 Examples of Bit Rate B (bits/s) for Various SCBRR1 Settings
  29035. (When n = 0)
  29036.  
  29037. Pφ (MHz)
  29038.  
  29039. N 7 . 1 4 2 4 1 0 . 0 0 10.7136 14.2848 2 5 . 0 3 3 . 0 5 0 . 0
  29040.  
  29041. 0 9600.0 13440.9 14400.0 19200.0 33602.2 44354.8 67204.3
  29042.  
  29043. 1 4800.0 6720.4 7200.0 9600.0 16801.1 22177.4 33602.2
  29044.  
  29045. 2 3200.0 4480.3 4800.0 6400.0 11200.7 14784.9 22401.4
  29046.  
  29047. Note: Bit rates are rounded to one decimal place.
  29048.  
  29049. The method of calculating the value to be set in the bit rate register (SCBRR1) from the peripheral
  29050. module operating frequency and bit rate is shown below. Here, N is an integer in the range 0 ≤ N
  29051. ≤ 255, and the smaller error is specified.
  29052.  
  29053.  
  29054. P
  29055. φ 6
  29056. N = × 10 – 1
  29057. 1488 × 22n–1 × B
  29058.  
  29059. Table 17.6 Examples of SCBRR1 Settings for Bit Rate B (bits/s) (When n = 0)
  29060.  
  29061. Pφ (MHz)
  29062.  
  29063. 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
  29064.  
  29065. Bits/s N Error N Error N Error N Error N Error N Error N Error
  29066.  
  29067. 9600 0 0.00 1 30.00 1 25.00 1 8.99 3 14.27 4 8.22 6 0.01
  29068.  
  29069. Table 17.7 Maximum Bit Rate at Various Frequencies (Smart Card Interface
  29070. Mode)
  29071.  
  29072. Pφ (MHz) Maximum Bit Rate (bits/s) N n
  29073.  
  29074. 7.1424 19200 0 0
  29075.  
  29076. 10.00 26882 0 0
  29077.  
  29078. 10.7136 28800 0 0
  29079.  
  29080. 16.00 43010 0 0
  29081.  
  29082. 20.00 53763 0 0
  29083.  
  29084. 25.0 67204 0 0
  29085.  
  29086. 30.0 80645 0 0
  29087.  
  29088. 33.0 88710 0 0
  29089.  
  29090. 50.0 67204 0 0
  29091.  
  29092. 584
  29093.  
  29094. ----------------------- Page 601-----------------------
  29095.  
  29096. The bit rate error is given by the following equation:
  29097.  
  29098. φ
  29099. P
  29100. Error (%) = 1488 × 22n–1 × B × (N + 1) × 106 – 1 × 100
  29101.  
  29102. Table 17.8 shows the relationship between the smart card interface transmit/receive clock register
  29103. settings and the output state.
  29104.  
  29105. Table 17.8Register Settings and SCK Pin State
  29106.  
  29107. Register Values SCK Pin
  29108.  
  29109. Setting SMIF G M CKE1 CKE0 Output S t ate
  29110. 1*1 1 0 0 0 Port Determined by setting of SPB1IO
  29111.  
  29112. and SPB1DT bits in SCSPTR1
  29113.  
  29114. 1 0 0 1 SCK (serial clock) output state
  29115. 2*2 1 1 0 0 Low output Low-level output state
  29116.  
  29117. 1 1 0 1 SCK (serial clock) output state
  29118. 3*2 1 1 1 0 High output High-level output state
  29119.  
  29120. 1 1 1 1 SCK (serial clock) output state
  29121.  
  29122. Notes: 1. The SCK output state changes as soon as the CKE0 bit setting is changed.
  29123. Clear the CKE1 bit to 0.
  29124. 2. Stopping and starting the clock by changing the CKE0 bit setting does not affect the
  29125. clock duty cycle.
  29126.  
  29127. Width is Width is
  29128. Port value
  29129. undefined undefined Port value
  29130.  
  29131. SCK
  29132.  
  29133. (a) When GM = 0
  29134.  
  29135. CKE1 value Specified Specified
  29136. width width CKE1 value
  29137.  
  29138. SCK
  29139.  
  29140. (b) When GM = 1
  29141.  
  29142. Figure 17.6 Difference in Clock Output According to GM Bit Setting
  29143.  
  29144. 585
  29145.  
  29146. ----------------------- Page 602-----------------------
  29147.  
  29148. 1 7 . 3 . 6 Data Transfer Operations
  29149.  
  29150. Initialization: Before transmitting and receiving data, the smart card interface must be
  29151. initialized as described below. Initialization is also necessary when switching from transmit mode
  29152. to receive mode, or vice versa. Figure 17.7 shows a sample initialization processing flowchart.
  29153.  
  29154. 1. Clear the TE and RE bits in the serial control register (SCSCR1) to 0.
  29155.  
  29156. 2. Clear error flags FER/ERS, PER, and ORER in the serial status register (SCSSR1) to 0.
  29157.  
  29158. 3. Set the GM bit, parity bit (O/E), and baud rate generator select bits (CKS1 and CKS0) in the
  29159. serial mode register (SCSMR1). Clear the CHR and MP bits to 0, and set the STOP and PE
  29160. bits to 1.
  29161.  
  29162. 4. Set the SMIF, SDIR, and SINV bits in the smart card mode register (SCSCMR1).
  29163.  
  29164. When the SMIF bit is set to 1, the TxD pin and RxD pin both go to the high-impedance state.
  29165.  
  29166. 5. Set the value corresponding to the bit rate in the bit rate register (SCBRR1).
  29167.  
  29168. 6. Set the clock source select bits (CKE1 and CKE0) in SCSCR1. Clear the TIE, RIE, TE, RE,
  29169. MPIE, and TEIE bits to 0.
  29170.  
  29171. If the CKE0 bit is set to 1, the clock is output from the SCK pin.
  29172.  
  29173. 7. Wait at least one bit interval, then set the TIE, RIE, TE, and RE bits in SCSCR1. Do not set
  29174. the TE bit and RE bit at the same time, except for self-diagnosis.
  29175.  
  29176. 586
  29177.  
  29178. ----------------------- Page 603-----------------------
  29179.  
  29180. Initialization
  29181.  
  29182. Clear TE and RE bits
  29183. 1
  29184. in SCSCR1 to 0
  29185.  
  29186. Clear FER/ERS, PER, and
  29187. 2
  29188. ORER flags in SCSCR1 to 0
  29189.  
  29190. In SCSMR1, set parity in O/E bit,
  29191. clock in CKS1 and CKS0 bits, 3
  29192. and set GM
  29193.  
  29194. Set SMIF, SDIR, and SINV bits
  29195. 4
  29196. in SCSCMR1
  29197.  
  29198. Set value in SCBRR1 5
  29199.  
  29200. In SCSCR1, set clock in CKE1
  29201. and CKE0 bits, and clear TIE, 6
  29202. RIE, TE, RE, MPIE, and
  29203. TEIE bits to 0.
  29204.  
  29205. Wait
  29206.  
  29207. No
  29208. 1-bit interval elapsed?
  29209.  
  29210. Yes
  29211.  
  29212. Set TIE, RIE, TE, and RE bits
  29213. 7
  29214. in SCSCR1
  29215.  
  29216. End
  29217.  
  29218. Figure 17.7 Sample Initialization Flowchart
  29219.  
  29220. Serial Data Transmission: As data transmission in smart card mode involves error signal
  29221. sampling and retransmission processing, the processing procedure is different from that for the
  29222. normal SCI. Figure 17.8 shows a sample transmission processing flowchart.
  29223.  
  29224. 1. Perform smart card interface mode initialization as described in Initialization above.
  29225.  
  29226. 2. Check that the FER/ERS error flag in SCSSR1 is cleared to 0.
  29227.  
  29228. 3. Repeat steps 2 and 3 until it can be confirmed that the TEND flag in SCSSR1 is set to 1.
  29229. 587
  29230.  
  29231. ----------------------- Page 604-----------------------
  29232.  
  29233. 4. Write the transmit data to SCTDR1, clear the TDRE flag to 0, and perform the transmit
  29234. operation. The TEND flag is cleared to 0.
  29235.  
  29236. 5. To continue transmitting data, go back to step 2.
  29237.  
  29238. 6. To end transmission, clear the TE bit to 0.
  29239.  
  29240. With the above processing, interrupt handling is possible.
  29241.  
  29242. If transmission ends and the TEND flag is set to 1 while the TIE bit is set to 1 and interrupt
  29243. requests are enabled, a transmit-data-empty interrupt (TXI) request will be generated. If an error
  29244. occurs in transmission and the ERS flag is set to 1 while the RIE bit is set to 1 and interrupt
  29245. requests are enabled, a transmit/receive-error interrupt (ERI) request will be generated. See Interrupt
  29246. Operation below for details.
  29247.  
  29248. 588
  29249.  
  29250. ----------------------- Page 605-----------------------
  29251.  
  29252. Start
  29253.  
  29254. Initialization 1
  29255.  
  29256. Start of transmission
  29257.  
  29258. 2
  29259. No
  29260. FER/ERS = 0?
  29261.  
  29262. Yes
  29263. Error handling
  29264.  
  29265. No
  29266. TEND = 1? 3
  29267.  
  29268. Yes
  29269.  
  29270. Write transmit data to SCTDR1,
  29271. and clear TDRE flag 4
  29272. in SCSSR1 to 0
  29273.  
  29274. No
  29275. All data transmitted? 5
  29276.  
  29277. Yes
  29278.  
  29279. No
  29280. FER/ERS = 0?
  29281.  
  29282. Yes
  29283. Error handling
  29284.  
  29285. No
  29286. TEND = 1?
  29287.  
  29288. Yes
  29289.  
  29290. Clear TE bit in SCSCR1 to 0 6
  29291.  
  29292. End of transmission
  29293.  
  29294. Figure 17.8 Sample Transmission Processing Flowchart
  29295.  
  29296. Serial Data Reception: Data reception in smart card mode uses the same processing procedure
  29297. as for the normal SCI. Figure 17.9 shows a sample reception processing flowchart.
  29298.  
  29299. 1. Perform smart card interface mode initialization as described in Initialization above.
  29300.  
  29301. 2. Check that the ORER flag and PER flag in SCSSR1 are cleared to 0. If either is set, perform
  29302. the appropriate receive error handling, then clear both the ORER and the PER flag to 0.
  29303.  
  29304. 589
  29305.  
  29306. ----------------------- Page 606-----------------------
  29307.  
  29308. 3. Repeat steps 2 and 3 until it can be confirmed that the RDRF flag is set to 1.
  29309.  
  29310. 4. Read the receive data from SCRDR1.
  29311.  
  29312. 5. To continue receiving data, clear the RDRF flag to 0 and go back to step 2.
  29313.  
  29314. 6. To end reception, clear the RE bit to 0.
  29315.  
  29316. With the above processing, interrupt handling is possible.
  29317.  
  29318. If reception ends and the RDRF flag is set to 1 while the RIE bit is set to 1 and interrupt requests
  29319. are enabled, a receive-data-full interrupt (RXI) request will be generated. If an error occurs in
  29320. reception and either the ORER flag or the PER flag is set to 1, a transmit/receive-error interrupt
  29321. (ERI) request will be generated.
  29322.  
  29323. See Interrupt Operation below for details.
  29324.  
  29325. If a parity error occurs during reception and the PER flag is set to 1, the received data is still
  29326. transferred to SCRDR1, and therefore this data can be read.
  29327.  
  29328. 590
  29329.  
  29330. ----------------------- Page 607-----------------------
  29331.  
  29332. Start
  29333.  
  29334. Initialization 1
  29335.  
  29336. Start of reception
  29337.  
  29338. 2
  29339. No
  29340. ORER = 0 and PER = 0?
  29341.  
  29342. Yes
  29343. Error handling
  29344.  
  29345. No
  29346. RDRF = 1? 3
  29347.  
  29348. Yes
  29349.  
  29350. Read receive data from
  29351. SCRDR1 and clear RDRF flag 4
  29352. in SCSSR1 to 0
  29353.  
  29354. No All data received? 5
  29355.  
  29356. Yes
  29357.  
  29358. Clear RE bit in SCSCR1 to 0 6
  29359.  
  29360. End of reception
  29361.  
  29362. Figure 17.9 Sample Reception Processing Flowchart
  29363.  
  29364. Mode Switching Operation: When switching from receive mode to transmit mode, first
  29365. confirm that the receive operation has been completed, then start from initialization, clearing RE
  29366. to 0 and setting TE to 1. The RDRF flag or the PER and ORER flags can be used to check that
  29367. the receive operation has been completed.
  29368.  
  29369. When switching from transmit mode to receive mode, first confirm that the transmit operation has
  29370. been completed, then start from initialization, clearing TE to 0 and setting RE to 1. The TEND
  29371. flag can be used to check that the transmit operation has been completed.
  29372.  
  29373. 591
  29374.  
  29375. ----------------------- Page 608-----------------------
  29376.  
  29377. Interrupt Operation: There are three interrupt sources in smart card interface mode, generating
  29378. transmit-data-empty interrupt (TXI) requests, transmit/receive-error interrupt (ERI) requests, and
  29379. receive-data-full interrupt (RXI) requests. The transmit-end interrupt (TEI) request cannot be used in
  29380. this mode.
  29381.  
  29382. When the TEND flag in SCSSR1 is set to 1, a TXI interrupt request is generated.
  29383.  
  29384. When the RDRF flag in SCSSR1 is set to 1, an RXI interrupt request is generated.
  29385.  
  29386. When any of flags ORER, PER, and FER/ERS in SCSSR1 is set to 1, an ERI interrupt request is
  29387. generated. The relationship between the operating states and interrupt sources is shown in table
  29388. 17.9.
  29389.  
  29390. Table 17.9 Smart Card Mode Operating States and Interrupt Sources
  29391.  
  29392. Operating State Flag Mask Bit Interrupt Source
  29393.  
  29394. Transmit mode Normal operation TEND TIE TXI
  29395.  
  29396. Error FER/ERS RIE ERI
  29397.  
  29398. Receive mode Normal operation RDRF RIE RXI
  29399.  
  29400. Error PER, ORER RIE ERI
  29401.  
  29402. Data Transfer Operation by DMAC: In smart card mode, as with the normal SCI, transfer
  29403. can be carried out using the DMAC. In a transmit operation, when the TEND flag in SCSSR1 is
  29404. set to 1, a TXI interrupt is requested. If the TXI request is designated beforehand as a DMAC
  29405. activation source, the DMAC will be activated by the TXI request, and transfer of the transmit data
  29406. will be carried out. The TEND flag is automatically cleared to 0 when data transfer is performed by
  29407. the DMAC. In the event of an error, the SCI retransmits the same data automatically. The TEND
  29408. flag remains cleared to 0 during this time, and the DMAC is not activated. Thus, the number of
  29409. bytes specified by the SCI and DMAC are transmitted automatically, including retransmission
  29410. following an error. However, the ERS flag is not cleared automatically when an error occurs, and
  29411. therefore the RIE bit should be set to 1 beforehand so that an ERI request will be generated in the
  29412. event of an error, and the ERS flag will be cleared.
  29413.  
  29414. In a receive operation, an RXI interrupt request is generated when the RDRF flag in SCSSR1 is
  29415. set to 1. If the RXI request is designated beforehand as a DMAC activation source, the DMAC will
  29416. be activated by the RXI request, and transfer of the receive data will be carried out.. The RDRF flag
  29417. is cleared to 0 automatically when data transfer is performed by the DMAC. If an error occurs, an
  29418. error flag is set but the RDRF flag is not. The DMAC is not activated, but instead, an ERI
  29419. interrupt request is sent to the CPU. The error flag must therefore be cleared.
  29420.  
  29421. When performing data transfer using the DMAC, it is essential to set and enable the DMAC before
  29422. carrying out SCI settings. For details of the DMAC setting procedures, see section 14, Direct
  29423. Memory Access Controller (DMAC).
  29424.  
  29425. 592
  29426.  
  29427. ----------------------- Page 609-----------------------
  29428.  
  29429. 1 7 . 4 Usage Notes
  29430.  
  29431. The following points should be noted when using the SCI as a smart card interface.
  29432.  
  29433. (1) Receive Data Sampling Timing and Receive Margin
  29434.  
  29435. In asynchronous mode, the SCI operates on a base clock with a frequency of 372 times the transfer
  29436. rate. In reception, the SCI synchronizes internally with the fall of the start bit, which it samples
  29437. on the base clock. Receive data is latched at the rising edge of the 186th base clock pulse. The
  29438. timing is shown in figure 17.10.
  29439.  
  29440. 372 clocks
  29441.  
  29442. 186 clocks
  29443.  
  29444. 0 185 371 0 185 371 0
  29445. Base clock
  29446.  
  29447. Start
  29448. Receive data
  29449. bit D0 D1
  29450. (RxD)
  29451.  
  29452. Synchronization
  29453. sampling timing
  29454.  
  29455. Data sampling
  29456. timing
  29457.  
  29458. Figure 17.10 Receive Data Sampling Timing in Smart Card Mode
  29459.  
  29460. The receive margin in smart card mode can therefore be expressed as shown in the following
  29461. equation.
  29462.  
  29463. 1 | D – 0.5 |
  29464. M = (0.5 – ) – (L – 0.5) F – (1 + F) × 100%
  29465. 2N N
  29466.  
  29467. M: Receive margin (%)
  29468. N: Ratio of clock frequency to bit rate (N = 372)
  29469. D: Clock duty cycle (D = 0 to 1.0)
  29470. L: Frame length (L =10)
  29471. F: Absolute deviation of clock frequency
  29472.  
  29473. 593
  29474.  
  29475. ----------------------- Page 610-----------------------
  29476.  
  29477. From the above equation, if F = 0 and D = 0.5, the receive margin is 49.866%, as given by the
  29478. following equation.
  29479.  
  29480. When D = 0.5 and F = 0:
  29481.  
  29482. M = (0.5 – 1/2 × 372) × 100% = 49.866%
  29483.  
  29484. (2) Retransfer Operations
  29485.  
  29486. Retransfer operations are performed by the SCI in receive mode and transmit mode as described
  29487. below.
  29488.  
  29489. Retransfer Operation when SCI is in Receive Mode
  29490.  
  29491. 1. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is
  29492. automatically set to 1. If the RIE bit in SCSCR1 is enabled at this time, an ERI interrupt
  29493. request is generated. The PER bit in SCSSR1 should be cleared to 0 before the next parity bit
  29494. is sampled.
  29495.  
  29496. 2. The RDRF bit in SCSSR1 is not set for a frame in which an error has occurred.
  29497.  
  29498. 3. If an error is found when the received parity bit is checked, the PER bit in SCSSR1 is not set
  29499. to 1.
  29500.  
  29501. 4. If no error is found when the received parity bit is checked, the receive operation is judged to
  29502. have been completed normally, and the RDRF bit in SCSSR1 is automatically set to 1. If the
  29503. RIE bit in SCSCR1 is enabled at this time, an RXI interrupt request is generated.
  29504.  
  29505. 5. When a normal frame is received, the pin retains the high-impedance state at the timing for
  29506. error signal transmission.
  29507.  
  29508. Retransfer Operation when SCI is in Transmit Mode
  29509.  
  29510. 1. If an error signal is sent back from the receiving side after transmission of one frame is
  29511. completed, the FER/ERS bit in SCSSR1 is set to 1. If the RIE bit in SCSCR1 is enabled at
  29512. this time, an ERI interrupt request is generated. The FER/ERS bit in SCSSR1 should be
  29513. cleared to 0 before the next parity bit is sampled.
  29514.  
  29515. 2. The TEND bit in SCSSR1 is not set for a frame for which an error signal indicating an error is
  29516. received.
  29517.  
  29518. 3. If an error signal is not sent back from the receiving side, the FER/ERS bit in SCSSR1 is not
  29519. set.
  29520.  
  29521. 4. If an error signal is not sent back from the receiving side, transmission of one frame, including
  29522. a retransfer, is judged to have been completed, and the TEND bit in SCSSR1 is set to 1. If the
  29523. TIE bit in SCSCR1 is enabled at this time, a TXI interrupt request is generated.
  29524.  
  29525. 594
  29526.  
  29527. ----------------------- Page 611-----------------------
  29528.  
  29529. (3) Standby Mode and Clock
  29530.  
  29531. When switching between smart card interface mode and standby mode, the following procedures
  29532. should be used to maintain the clock duty cycle.
  29533.  
  29534. Switching from Smart Card Interface Mode to Standby Mode:
  29535. 1. Set the SBP1IO and SBP1DT bits in SCSPTR1 to the values for the fixed output state in
  29536. standby mode.
  29537.  
  29538. 2. Write 0 to the TE and RE bits in the serial control register (SCSCR1) to stop transmit/receive
  29539. operations. At the same time, set the CKE1 bit to the value for the fixed output state in
  29540. standby mode.
  29541.  
  29542. 3. Write 0 to the CKE0 bit in SCSCR1 to stop the clock.
  29543.  
  29544. 4. Wait for one serial clock cycle. During this period, the duty cycle is preserved and clock output
  29545. is fixed at the specified level.
  29546.  
  29547. 5. Write H'00 to the serial mode register (SCSMR1) and smart card mode register (SCSMR1).
  29548.  
  29549. 6. Make the transition to the standby state.
  29550.  
  29551. Returning from Standby Mode to Smart Card Interface Mode:
  29552. 7. Clear the standby state.
  29553.  
  29554. 8. Set the CKE1 bit in SCSCR1 to the value for the fixed output state at the start of standby (the
  29555. current SCK pin state).
  29556.  
  29557. 9. Set smart card interface mode and output the clock. Clock signal generation is started with the
  29558. normal duty cycle.
  29559.  
  29560. 595
  29561.  
  29562. ----------------------- Page 612-----------------------
  29563.  
  29564. (4) Power-On and Clock
  29565.  
  29566. The following procedure should be used to secure the clock duty cycle after powering on.
  29567.  
  29568. 1. The initial state is port input and high impedance. Use pull-up or pull-down resistors to fix the
  29569. potential.
  29570.  
  29571. 2. Fix at the output specified by the CKE1 bit in the serial control register (SCSCR1).
  29572.  
  29573. 3. Set the serial mode register (SCSMR1) and smart card mode register (SCSCMR1), and switch
  29574. to smart card mode operation.
  29575.  
  29576. 4. Set the CKE0 bit in SCSCR1 to 1 to start clock output.
  29577.  
  29578. 596
  29579.  
  29580. ----------------------- Page 613-----------------------
  29581.  
  29582. Section 18 I/O Ports
  29583.  
  29584. 18.1 Overview
  29585.  
  29586. The SH7750 has a 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port.
  29587.  
  29588. 18.1.1 Features
  29589.  
  29590. The features of the general-purpose I/O port are as follows:
  29591.  
  29592. • 20-bit I/O port with input/output direction independently specifiable for each bit
  29593.  
  29594. • Pull-up can be specified independently for each bit.
  29595.  
  29596. • Interrupt input is possible for 16 of the 20 I/O port bits.
  29597.  
  29598. • Use or non-use of the I/O port can be selected with the PORTEN bit in bus control register
  29599. 2 (BCR2).
  29600.  
  29601. The features of the SCI I/O port are as follows:
  29602.  
  29603. • Data can be output when the I/O port is designated for output and SCI enabling has not
  29604. been set. This allows break function transmission.
  29605.  
  29606. • The RxD pin value can be read at all times, allowing break state detection.
  29607.  
  29608. • SCK pin control is possible when the I/O port is designated for output and SCI enabling
  29609. has not been set.
  29610.  
  29611. • The SCK pin value can be read at all times.
  29612.  
  29613. The features of the SCIF I/O port are as follows:
  29614.  
  29615. • Data can be output when the I/O port is designated for output and SCIF enabling has not
  29616. been set. This allows break function transmission.
  29617.  
  29618. • The RxD2 pin value can be read at all times, allowing break state detection.
  29619.  
  29620. • and pin control is possible when the I/O port is designated for output and
  29621. SCIF enabling has not been set.
  29622.  
  29623. • The and pin values can be read at all times.
  29624.  
  29625. 597
  29626.  
  29627. ----------------------- Page 614-----------------------
  29628.  
  29629. 18.1.2 Block Diagrams
  29630.  
  29631. Figure 18.1 shows a block diagram of the 16-bit general-purpose I/O port.
  29632.  
  29633. PBnPUP
  29634. PORTEN Pull-up resistor
  29635.  
  29636. Internal bus
  29637. 0 Port 15 (input/
  29638. Dn output data X output)/D47
  29639. P to
  29640. D Q 1 M Port 0 (input/
  29641.  
  29642. PDTRW C output)/D32
  29643.  
  29644. BCK
  29645.  
  29646. 0
  29647. DnDIR
  29648. X
  29649. P
  29650. 1 M
  29651. PBnIO
  29652.  
  29653. 0 Data input strobe
  29654. X
  29655. P
  29656. M 1 C
  29657. Q
  29658. D
  29659.  
  29660. Interrupt PTIRENn BCK
  29661. controller Dn input data
  29662.  
  29663. PORTEN 0: Port not available 1: Port available
  29664. PBnPuP 0: Pull-up 1: Pull-up off
  29665. DnDIR 0: Input 1: Output
  29666. PBnIO 0: Input 1: Output
  29667. PTIRENn 0: Interrupt input disabled 1: Interrupt input enabled
  29668.  
  29669. Figure 18.1 16-Bit Port
  29670.  
  29671. 598
  29672.  
  29673. ----------------------- Page 615-----------------------
  29674.  
  29675. Figure 18.2 shows a block diagram of the 4-bit general-purpose I/O port.
  29676.  
  29677. PBnPUP
  29678. Pull-up resistor
  29679. PORTEN
  29680.  
  29681. Internal bus
  29682. 0 Port 19 (input/
  29683. Dn output data X output)/D51
  29684. P to
  29685. D Q 1 M Port 16 (input/
  29686.  
  29687. PDTRW C output)/D48
  29688.  
  29689. BCK
  29690.  
  29691. 0
  29692. DnDIR
  29693. X
  29694. P
  29695. 1 M
  29696. PBnIO
  29697.  
  29698. 0 Data input strobe
  29699.  
  29700. X
  29701. P
  29702. M 1 C
  29703. Q D
  29704.  
  29705. BCK
  29706. Dn input data
  29707.  
  29708. PORTEN 0: Port not available 1: Port available
  29709. PBnPuP 0: Pull-up 1: Pull-up off
  29710. DnDIR 0: Input 1: Output
  29711. PBnIO 0: Input 1: Output
  29712.  
  29713. Figure 18.2 4-Bit Port
  29714.  
  29715. 599
  29716.  
  29717. ----------------------- Page 616-----------------------
  29718.  
  29719. SCI I/O port block diagrams are shown in figures 18.3 to 18.5.
  29720.  
  29721. Reset
  29722.  
  29723. R
  29724. Q D
  29725. SPB1IO
  29726. C
  29727.  
  29728. Internal data bus
  29729. SPTRW
  29730.  
  29731. Reset
  29732.  
  29733. MD0/SCK
  29734. R
  29735. Q D
  29736.  
  29737. SPB1DT
  29738. C SCI
  29739.  
  29740. SPTRW Clock output enable signal
  29741.  
  29742. Mode setting Serial clock output signal *
  29743. register
  29744. Serial clock input signal
  29745.  
  29746. Clock input enable signal
  29747.  
  29748. SPTRR
  29749.  
  29750. SPTRW: Write to SPTR
  29751. SPTRR: Read SPTR
  29752.  
  29753. Note: * Signals that set the SCK pin function as internal clock output or external clock input according to
  29754. the CKE0 and CKE1 bits in SCSCR1 and the C/ bit in SCSMR1.
  29755.  
  29756. Figure 18.3 MD0/SCK Pin
  29757.  
  29758. 600
  29759.  
  29760. ----------------------- Page 617-----------------------
  29761.  
  29762. Reset
  29763.  
  29764. R
  29765. Q D
  29766. SPB0IO
  29767. C Internal data bus
  29768.  
  29769. SPTRW
  29770.  
  29771. Reset
  29772. MD7/TxD
  29773. R
  29774. Q D
  29775. SPB0DT
  29776. C SCI
  29777.  
  29778. SPTRW Transmit enable signal
  29779.  
  29780. Mode setting register
  29781.  
  29782. Serial transmit data
  29783.  
  29784. SPTRW: Write to SPTR
  29785.  
  29786. Figure 18.4 MD7/TxD Pin
  29787.  
  29788. SCI
  29789. RxD
  29790.  
  29791. Serial receive data
  29792.  
  29793. Internal data bus
  29794.  
  29795. SPTRR
  29796.  
  29797. SPTRR: Read SPTR
  29798.  
  29799. Figure 18.5 RxD Pin
  29800.  
  29801. 601
  29802.  
  29803. ----------------------- Page 618-----------------------
  29804.  
  29805. SCIF I/O port block diagrams are shown in figures 18.6 to 18.9.
  29806.  
  29807. Reset
  29808.  
  29809. R
  29810. Q D
  29811. SPB2IO
  29812. C Internal data bus
  29813.  
  29814. SPTRW
  29815.  
  29816. Reset
  29817. MD1/TxD2
  29818. R
  29819. Q D
  29820. SPB2DT
  29821. C SCIF
  29822.  
  29823. Transmit enable
  29824. SPTRW
  29825. signal
  29826.  
  29827. Mode setting
  29828. register Serial transmit data
  29829.  
  29830. SPTRW: Write to SPTR
  29831.  
  29832. Figure 18.6 MD1/TxD2 Pin
  29833.  
  29834. SCIF
  29835. MD2/RxD2
  29836.  
  29837. Serial receive
  29838. Mode setting data
  29839. register
  29840.  
  29841. Internal data bus
  29842.  
  29843. SPTRR
  29844.  
  29845. SPTRR: Read SPTR
  29846.  
  29847. Figure 18.7 MD2/RxD2 Pin
  29848.  
  29849. 602
  29850.  
  29851. ----------------------- Page 619-----------------------
  29852.  
  29853. Reset
  29854.  
  29855. R
  29856. Q D
  29857. CTSIO
  29858. C Internal data bus
  29859.  
  29860. SPTRW
  29861.  
  29862. Reset
  29863.  
  29864. R
  29865. Q D
  29866. CTSDT
  29867. C SCIF
  29868.  
  29869. SPTRW
  29870.  
  29871. signal
  29872.  
  29873. Modem control enable
  29874. signal*
  29875.  
  29876. SPTRR
  29877.  
  29878. SPTRW: Write to SPTR
  29879. SPTRR: Read SPTR
  29880.  
  29881. Note: * MCE bit in SCFCR2: signal that designates modem control as the pin function.
  29882.  
  29883. Figure 18.8 Pin
  29884.  
  29885. 603
  29886.  
  29887. ----------------------- Page 620-----------------------
  29888.  
  29889. Reset
  29890.  
  29891. R
  29892. Q D
  29893. RTSIO
  29894. C Internal data bus
  29895.  
  29896. SPTRW
  29897.  
  29898. Reset
  29899. MD8/
  29900. R
  29901. Q D
  29902. RTSDT
  29903. C SCIF
  29904.  
  29905. Modem control
  29906. SPTRW
  29907. enable signal*
  29908.  
  29909. Mode setting
  29910. register signal
  29911.  
  29912. SPTRR
  29913.  
  29914. SPTRW: Write to SPTR
  29915. SPTRR: Read SPTR
  29916.  
  29917. Note: * MCE bit in SCFCR2: signal that designates modem control as the pin function.
  29918.  
  29919. Figure 18.9 MD8/ Pin
  29920.  
  29921. 604
  29922.  
  29923. ----------------------- Page 621-----------------------
  29924.  
  29925. 18.1.3 Pin Configuration
  29926.  
  29927. Table 18.1 shows the 20-bit general-purpose I/O port pin configuration.
  29928.  
  29929. Table 18.1 20-Bit General-Purpose I/O Port Pins
  29930.  
  29931. Pin Name Signal I / O Function
  29932.  
  29933. Port 19 pin PORT19 I/O I/O port
  29934.  
  29935. Port 18 pin PORT18 I/O I/O port
  29936.  
  29937. Port 17 pin PORT17 I/O I/O port
  29938.  
  29939. Port 16 pin PORT16 I/O I/O port
  29940.  
  29941. Port 15 pin PORT15 I/O* I/O port / GPIO interrupt
  29942.  
  29943. Port 14 pin PORT14 I/O* I/O port / GPIO interrupt
  29944.  
  29945. Port 13 pin PORT13 I/O* I/O port / GPIO interrupt
  29946.  
  29947. Port 12 pin PORT12 I/O* I/O port / GPIO interrupt
  29948.  
  29949. Port 11 pin PORT11 I/O* I/O port / GPIO interrupt
  29950.  
  29951. Port 10 pin PORT10 I/O* I/O port / GPIO interrupt
  29952.  
  29953. Port 9 pin PORT9 I/O* I/O port / GPIO interrupt
  29954.  
  29955. Port 8 pin PORT8 I/O* I/O port / GPIO interrupt
  29956.  
  29957. Port 7 pin PORT7 I/O* I/O port / GPIO interrupt
  29958.  
  29959. Port 6 pin PORT6 I/O* I/O port / GPIO interrupt
  29960.  
  29961. Port 5 pin PORT5 I/O* I/O port / GPIO interrupt
  29962.  
  29963. Port 4 pin PORT4 I/O* I/O port / GPIO interrupt
  29964.  
  29965. Port 3 pin PORT3 I/O* I/O port / GPIO interrupt
  29966.  
  29967. Port 2 pin PORT2 I/O* I/O port / GPIO interrupt
  29968.  
  29969. Port 1 pin PORT1 I/O* I/O port / GPIO interrupt
  29970.  
  29971. Port 0 pin PORT0 I/O* I/O port / GPIO interrupt
  29972.  
  29973. Note: * When port pins are used as GPIO interrupts, they must be set to input mode. The input
  29974. setting can be made in the PCTRA register.
  29975.  
  29976. 605
  29977.  
  29978. ----------------------- Page 622-----------------------
  29979.  
  29980. Table 18.2 shows the SCI I/O port pin configuration.
  29981.  
  29982. Table 18.2 SCI I/O Port Pins
  29983.  
  29984. Pin Name Abbreviation I / O Function
  29985.  
  29986. Serial clock pin MD0/SCK I/O Clock input/output
  29987.  
  29988. Receive data pin RxD Input Receive data input
  29989.  
  29990. Transmit data pin MD7/TxD Output Transmit data output
  29991.  
  29992. Note: Pins MD0/SCK and MD7/TxD function as mode input pins MD0 and MD7 after a power-on
  29993. reset. They are made to function as serial pins by performing SCI operation settings with
  29994. the TE, RE, CKEI, and CKE0 bits in SCSCR1 and the C/ bit in SCSMR1. Break state
  29995. transmission and detection can be performed by means of a setting in the SCI’s SCSPTR1
  29996. register.
  29997.  
  29998. Table 18.3 shows the SCIF I/O port pin configuration.
  29999.  
  30000. Table 18.3 SCIF I/O Port Pins
  30001.  
  30002. Pin Name Abbreviation I / O Function
  30003.  
  30004. Serial clock pin MRESET/SCK2 Input Clock input
  30005.  
  30006. Receive data pin MD2/RxD2 Input Receive data input
  30007.  
  30008. Transmit data pin MD1/TxD2 Output Transmit data output
  30009.  
  30010. Modem control pin I/O Transmission enabled
  30011.  
  30012. Modem control pin MD8/ I/O Transmission request
  30013.  
  30014. Note: The MRESET/SCK2 pin functions as the MRESET manual reset pin when a manual reset is
  30015. executed. The MD1/TxD2, MD2/RxD2, and MD8/ pins function as the MD1, MD2, and
  30016. MD8 mode input pins after a power-on reset. These pins are made to function as serial pins
  30017. by performing SCIF operation settings with the TE and RE bits in SCSCR2 and the MCE bit in
  30018. SCFCR2. Break state transmission and detection can be set in the SCIF’s SCSPTR2
  30019. register.
  30020.  
  30021. 606
  30022.  
  30023. ----------------------- Page 623-----------------------
  30024.  
  30025. 18.1.4 Register Configuration
  30026.  
  30027. The 20-bit general-purpose I/O port, SCI I/O port, and SCIF I/O port have seven registers, as
  30028. shown in table 18.4.
  30029.  
  30030. Table 18.4 I/O Port Registers
  30031.  
  30032. Area 7 Acces
  30033. Name Abbreviatio R/ W Initial P4 Address Address s Size
  30034. n Value*
  30035.  
  30036. Port control register A PCTRA R/W H'00000000 H'FF80002C H'1F80002C 32
  30037.  
  30038. Port data register A PDTRA R/W Undefined H'FF800030 H'1F800030 16
  30039.  
  30040. Port control register B PCTRB R/W H'00000000 H'FF800040 H'1F800040 32
  30041.  
  30042. Port data register B PDTRB R/W Undefined H'FF800044 H'1F800044 16
  30043.  
  30044. GPIO interrupt control GPIOIC R/W H'00000000 H'FF800048 H'1F800048 16
  30045. register
  30046.  
  30047. Serial port register SCSPTR1 R/W Undefined H'FFE0001C H'1FE0001C 8
  30048.  
  30049. Serial port register SCSPTR2 R/W Undefined H'FFE80020 H'1FE80020 16
  30050.  
  30051. Note: * Initialized by a power-on reset.
  30052.  
  30053. 607
  30054.  
  30055. ----------------------- Page 624-----------------------
  30056.  
  30057. 18.2 Register Descriptions
  30058.  
  30059. 18.2.1 Port Control Register A (PCTRA)
  30060.  
  30061. Port control register A (PCTRA) is a 32-bit readable/writable register that controls the
  30062. input/output direction and pull-up for each bit in the 16-bit port (port 15 pin to port 0 pin). As
  30063. the initial value of port data register A (PDTRA) is undefined, all the bits in the 16-bit port
  30064. should be set to output with PCTRA after writing a value to the PDTRA register.
  30065.  
  30066. PCTRA is initialized to H'00000000 by a power-on reset. It is not initialized by a manual
  30067. reset or in standby mode, and retains its contents.
  30068.  
  30069. Bit: 31 30 29 28 27 26 25 24
  30070.  
  30071. PB15PUP PB15IO PB14PUP PB14IO PB13PUP PB13IO PB12PUP PB12IO
  30072.  
  30073. Initial value: 0 0 0 0 0 0 0 0
  30074.  
  30075. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30076.  
  30077. Bit: 23 22 21 20 19 18 17 16
  30078.  
  30079. PB11PUP PB11IO PB10PUP PB10IO PB9PUP PB9IO PB8PUP PB8IO
  30080.  
  30081. Initial value: 0 0 0 0 0 0 0 0
  30082.  
  30083. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30084.  
  30085. Bit: 15 14 13 12 11 10 9 8
  30086.  
  30087. PB7PUP PB7IO PB6PUP PB6IO PB5PUP PB5IO PB4PUP PB4IO
  30088.  
  30089. Initial value: 0 0 0 0 0 0 0 0
  30090.  
  30091. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30092.  
  30093. Bit: 7 6 5 4 3 2 1 0
  30094.  
  30095. PB3PUP PB3IO PB2PUP PB2IO PB1PUP PB1IO PB0PUP PB0IO
  30096.  
  30097. Initial value: 0 0 0 0 0 0 0 0
  30098.  
  30099. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30100.  
  30101. 608
  30102.  
  30103. ----------------------- Page 625-----------------------
  30104.  
  30105. Bit 2n + 1 (n = 0–15)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the
  30106. 16-bit port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a
  30107. port pin set to output by bit PBnIO.
  30108.  
  30109. Bit 2n + 1: PBnPUP Description
  30110.  
  30111. 0 Bit m (m = 0–15) of 16-bit port is pulled up (Initial value)
  30112.  
  30113. 1 Bit m (m = 0–15) of 16-bit port is not pulled up
  30114.  
  30115. Bit 2n (n = 0–15)—Port I/O Control (PBnIO): Specifies whether each bit in the 16-bit port
  30116. is an input or an output.
  30117.  
  30118. Bit 2n: PBnIO Description
  30119.  
  30120. 0 Bit m (m = 0–15) of 16-bit port is an input (Initial value)
  30121.  
  30122. 1 Bit m (m = 0–15) of 16-bit port is an output
  30123.  
  30124. 18.2.2 Port Data Register A (PDTRA)
  30125.  
  30126. Port data register A (PDTRA) is a 16-bit readable/writable register used as a data latch for
  30127. each bit in the 16-bit port. When a bit is set as an output, the value written to the PDTRA
  30128. register is output from the external pin. When a value is read from the PDTRA register while
  30129. a bit is set as an input, the external pin value sampled on the external bus clock is read.
  30130. When a bit is set as an output, the value written to the PDTRA register is read.
  30131.  
  30132. PDTR is not initialized by a power-on or manual reset, or in standby mode, and retains its
  30133. contents.
  30134.  
  30135. Bit: 15 14 13 12 11 10 9 8
  30136.  
  30137. PB15DT PB14DT PB13DT PB12DT PB11DT PB10DT PB9DT PB8DT
  30138.  
  30139. Initial value: — — — — — — — —
  30140.  
  30141. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30142.  
  30143. Bit: 7 6 5 4 3 2 1 0
  30144.  
  30145. PB7DT PB6DT PB5DT PB4DT PB3DT PB2DT PB1DT PB0DT
  30146.  
  30147. Initial value: — — — — — — — —
  30148.  
  30149. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30150.  
  30151. 609
  30152.  
  30153. ----------------------- Page 626-----------------------
  30154.  
  30155. 18.2.3 Port Control Register B (PCTRB)
  30156.  
  30157. Port control register B (PCTRB) is a 32-bit readable/writable register that controls the
  30158. input/output direction and pull-up for each bit in the 4-bit port (port 19 pin to port 16 pin). As
  30159. the initial value of port data register B (PDTRB) is undefined, each bit in the 4-bit port
  30160. should be set to output with PCTRB after writing a value to the PDTRB register.
  30161.  
  30162. PCTRB is initialized to H'00000000 by a power-on reset. It is not initialized by a manual
  30163. reset or in standby mode, and retains its contents.
  30164.  
  30165. Bit: 31 30 29 28 27 26 25 24
  30166.  
  30167. — — — — — — — —
  30168.  
  30169. Initial value: 0 0 0 0 0 0 0 0
  30170.  
  30171. R/W: R R R R R R R R
  30172.  
  30173. Bit: 23 22 21 20 19 18 17 16
  30174.  
  30175. — — — — — — — —
  30176.  
  30177. Initial value: 0 0 0 0 0 0 0 0
  30178.  
  30179. R/W: R R R R R R R R
  30180.  
  30181. Bit: 15 14 13 12 11 10 9 8
  30182.  
  30183. — — — — — — — —
  30184.  
  30185. Initial value: 0 0 0 0 0 0 0 0
  30186.  
  30187. R/W: R R R R R R R R
  30188.  
  30189. Bit: 7 6 5 4 3 2 1 0
  30190.  
  30191. PB19PUP PB19IO PB18PUP PB18IO PB17PUP PB17IO PB16PUP PB16IO
  30192.  
  30193. Initial value: 0 0 0 0 0 0 0 0
  30194.  
  30195. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30196.  
  30197. Bit 2n + 1 (n = 0–3)—Port Pull-Up Control (PBnPUP): Specifies whether each bit in the 4-
  30198. bit port is to be pulled up with a built-in resistor. Pull-up is automatically turned off for a port
  30199. pin set to output by bit PBnIO.
  30200.  
  30201. Bit 2n + 1: PBnPUP Description
  30202.  
  30203. 0 Bit m (m = 16–19) of 4-bit port is pulled up (Initial value)
  30204.  
  30205. 1 Bit m (m = 16–19) of 4-bit port is not pulled up
  30206.  
  30207. 610
  30208.  
  30209. ----------------------- Page 627-----------------------
  30210.  
  30211. Bit 2n (n = 0–3)—Port I/O Control (PBnIO): Specifies whether each bit in the 4-bit port is
  30212. an input or an output.
  30213.  
  30214. Bit 2n: PBnIO Description
  30215.  
  30216. 0 Bit m (m = 16–19) of 4-bit port is an input (Initial value)
  30217.  
  30218. 1 Bit m (m = 16–19) of 4-bit port is an output
  30219.  
  30220. 18.2.4 Port Data Register B (PDTRB)
  30221.  
  30222. Port data register B (PDTRB) is a 16-bit readable/writable register used as a data latch for
  30223. each bit in the 4-bit port. When a bit is set as an output, the value written to the PDTRB
  30224. register is output from the external pin. When a value is read from the PDTRB register while
  30225. a bit is set as an input, the external pin value sampled on the external bus clock is read.
  30226. When a bit is set as an output, the value written to the PDTRB register is read.
  30227.  
  30228. PDTRB is not initialized by a power-on or manual reset, or in standby mode, and retains its
  30229. contents.
  30230.  
  30231. Bit: 15 14 13 12 11 10 9 8
  30232.  
  30233. — — — — — — — —
  30234.  
  30235. Initial value: 0 0 0 0 0 0 0 0
  30236.  
  30237. R/W: R R R R R R R R
  30238.  
  30239. Bit: 7 6 5 4 3 2 1 0
  30240.  
  30241. — — — — PB19DT PB18DT PB17DT PB16DT
  30242.  
  30243. Initial value: 0 0 0 0 — — — —
  30244.  
  30245. R/W: R R R R R/W R/W R/W R/W
  30246.  
  30247. 18.2.5 GPIO Interrupt Control Register (GPIOIC)
  30248.  
  30249. The GPIO interrupt control register (GPIOIC) is a 16-bit readable/writable register that
  30250. performs 16-bit interrupt input control.
  30251.  
  30252. GPIOIC is initialized to H'0000 by a power-on reset. It is not initialized by a manual reset or
  30253. in standby mode, and retains its contents.
  30254.  
  30255. GPIO interrupts are active-low level interrupts. Bit-by-bit masking is possible, and the OR of
  30256. all the bits set as GPIO interrupts is used for interrupt detection. Which bits interrupts are
  30257. input to can be identified by reading the PDTRA register.
  30258.  
  30259. 611
  30260.  
  30261. ----------------------- Page 628-----------------------
  30262.  
  30263. Bit: 15 14 13 12 11 10 9 8
  30264.  
  30265. PTIREN15 PTIREN14 PTIREN13 PTIREN12 PTIREN11 PTIREN10 PTIREN9 PTIREN8
  30266.  
  30267. Initial value: 0 0 0 0 0 0 0 0
  30268.  
  30269. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30270.  
  30271. Bit: 7 6 5 4 3 2 1 0
  30272.  
  30273. PTIREN7 PTIREN6 PTIREN5 PTIREN4 PTIREN3 PTIREN2 PTIREN1 PTIREN0
  30274.  
  30275. Initial value: 0 0 0 0 0 0 0 0
  30276.  
  30277. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30278.  
  30279. Bit n (n = 0–15)—Port Interrupt Enable (PTIRENn): Specifies whether interrupt input is
  30280. performed for each bit.
  30281.  
  30282. Bit n: PTIRENn Description
  30283.  
  30284. 0 Port m (m = 0–15) of 16-bit port is used as a normal I/O port (Initial value)
  30285.  
  30286. 1 Port m (m = 0–15) of 16-bit port is used as a GPIO interrupt*
  30287.  
  30288. Note: * When using an interrupt, set the corresponding port to input in the PCTRA register before
  30289. making the PTIRENn setting.
  30290.  
  30291. 18.2.6 Serial Port Register (SCSPTR1)
  30292.  
  30293. Bit: 7 6 5 4 3 2 1 0
  30294.  
  30295. EIO — — — SPB1IO SPB1DT SPB0IO SPB0DT
  30296.  
  30297. Initial value: 0 0 0 0 0 — 0 —
  30298.  
  30299. R/W: R/W — — — R/W R/W R/W R/W
  30300.  
  30301. The serial port register (SCSPTR1) is an 8-bit readable/writable register that controls
  30302. input/output and data for the port pins multiplexed with the serial communication interface
  30303. (SCI) pins. Input data can be read from the RxD pin, output data written to the TxD pin, and
  30304. breaks in serial transmission/reception controlled, by means of bits 1 and 0. SCK pin data
  30305. reading and output data writing can be performed by means of bits 3 and 2. Bit 7 controls
  30306. enabling and disabling of the RXI interrupt.
  30307.  
  30308. SCSPTR1 can be read or written to by the CPU at all times. All SCSPTR1 bits except bits 2
  30309. and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 2 and 0 is
  30310. undefined. SCSPTR1 is not initialized in the module standby state or standby mode.
  30311.  
  30312. Bit 7—Error Interrupt Only (EIO): See section 15.2.8, Serial Port Register (SCSPTR1).
  30313.  
  30314. Bits 6 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  30315.  
  30316. 612
  30317.  
  30318. ----------------------- Page 629-----------------------
  30319.  
  30320. Bit 3—Serial Port Clock Port I/O (SPB1IO): Specifies serial port SCK pin input/output.
  30321. When the SCK pin is actually set as a port output pin and outputs the value set by the
  30322. SPB1DT bit, the C/ bit in SCSMR1 and the CKE1 and CKE0 bits in SCSCR1 should be
  30323. cleared to 0.
  30324.  
  30325. Bit 3: SPB1IO Description
  30326.  
  30327. 0 SPB1DT bit value is not output to the SCK pin (Initial value)
  30328.  
  30329. 1 SPB1DT bit value is output to the SCK pin
  30330.  
  30331. Bit 2—Serial Port Clock Port Data (SPB1DT): Specifies the serial port SCK pin
  30332. input/output data. Input or output is specified by the SPB1IO bit (see the description of bit 3,
  30333. SPB1IO, for details). When output is specified, the value of the SPB1DT bit is output to the
  30334. SCK pin. The SCK pin value is read from the SPB1DT bit regardless of the value of the
  30335. SPB1IO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  30336.  
  30337. Bit 2: SPB1DT Description
  30338.  
  30339. 0 Input/output data is low-level
  30340.  
  30341. 1 Input/output data is high-level
  30342.  
  30343. Bit 1—Serial Port Break I/O (SPB0IO): Specifies the serial port TxD pin output condition.
  30344. When the TxD pin is actually set as a port output pin and outputs the value set by the
  30345. SPB0DT bit, the TE bit in SCSCR1 should be cleared to 0.
  30346.  
  30347. Bit 1: SPB0IO Description
  30348.  
  30349. 0 SPB0DT bit value is not output to the TxD pin (Initial value)
  30350.  
  30351. 1 SPB0DT bit value is output to the TxD pin
  30352.  
  30353. Bit 0—Serial Port Break Data (SPB0DT): Specifies the serial port RxD pin input data and
  30354. TxD pin output data. The TxD pin output condition is specified by the SPB0IO bit (see the
  30355. description of bit 1, SPB0IO, for details). When the TxD pin is designated as an output, the
  30356. value of the SPB0DT bit is output to the TxD pin. The RxD pin value is read from the
  30357. SPB0DT bit regardless of the value of the SPB0IO bit. The initial value of this bit after a
  30358. power-on reset or manual reset is undefined.
  30359.  
  30360. Bit 0: SPB0DT Description
  30361.  
  30362. 0 Input/output data is low-level
  30363.  
  30364. 1 Input/output data is high-level
  30365.  
  30366. 613
  30367.  
  30368. ----------------------- Page 630-----------------------
  30369.  
  30370. 18.2.7 Serial Port Register (SCSPTR2)
  30371.  
  30372. Bit: 15 14 13 12 11 10 9 8
  30373.  
  30374. — — — — — — — —
  30375.  
  30376. Initial value: 0 0 0 0 0 0 0 0
  30377.  
  30378. R/W: R R R R R R R R
  30379.  
  30380. Bit: 7 6 5 4 3 2 1 0
  30381.  
  30382. RTSIO RTSDT CTSIO CTSDT — — SPB2IO SPB2DT
  30383.  
  30384. Initial value: 0 — 0 — 0 0 0 —
  30385.  
  30386. R/W: R/W R/W R/W R/W R R R/W R/W
  30387.  
  30388. The serial port register (SCSPTR2) is a 16-bit readable/writable register that controls
  30389. input/output and data for the port pins multiplexed with the serial communication interface
  30390. (SCIF) pins. Input data can be read from the RxD2 pin, output data written to the TxD2 pin,
  30391. and breaks in serial transmission/reception controlled, by means of bits 1 and 0. pin
  30392. data reading and output data writing can be performed by means of bits 5 and 4, and
  30393. pin data reading and output data writing by means of bits 7 and 6.
  30394.  
  30395. SCSPTR2 can be read or written to by the CPU at all times. All SCSPTR2 bits except bits 6,
  30396. 4, and 0 are initialized to 0 by a power-on reset or manual reset; the value of bits 6, 4, and 0
  30397. is undefined. SCSPTR2 is not initialized in standby mode or in the module standby state.
  30398.  
  30399. Bits 15 to 8—Reserved: These bits are always read as 0, and should only be written with 0.
  30400.  
  30401. Bit 7—Serial Port RTS Port I/O (RTSIO): Specifies serial port pin input/output.
  30402. When the pin is actually set as a port output pin and outputs the value set by the
  30403. RTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  30404.  
  30405. Bit 7: RTSIO Description
  30406.  
  30407. 0 RTSDT bit value is not output to the pin (Initial value)
  30408.  
  30409. 1 RTSDT bit value is output to the pin
  30410.  
  30411. 614
  30412.  
  30413. ----------------------- Page 631-----------------------
  30414.  
  30415. Bit 6—Serial Port RTS Port Data (RTSDT): Specifies the serial port pin input/output
  30416. data. Input or output is specified by the RTSIO pin (see the description of bit 7, RTSIO, for
  30417. details). When the pin is designated as an output, the value of the RTSDT bit is output
  30418. to the pin. The pin value is read from the RTSDT bit regardless of the value of
  30419. the RTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  30420.  
  30421. Bit 6: RTSDT Description
  30422.  
  30423. 0 Input/output data is low-level
  30424.  
  30425. 1 Input/output data is high-level
  30426.  
  30427. Bit 5—Serial Port CTS Port I/O (CTSIO): Specifies serial port pin input/output.
  30428. When the pin is actually set as a port output pin and outputs the value set by the
  30429. CTSDT bit, the MCE bit in SCFCR2 should be cleared to 0.
  30430.  
  30431. Bit 5: CTSIO Description
  30432.  
  30433. 0 CTSDT bit value is not output to the pin (Initial value)
  30434.  
  30435. 1 CTSDT bit value is output to the pin
  30436.  
  30437. Bit 4—Serial Port CTS Port Data (CTSDT): Specifies the serial port pin input/output
  30438. data. Input or output is specified by the CTSIO pin (see the description of bit 5, CTSIO, for
  30439. details). When the pin is designated as an output, the value of the CTSDT bit is output
  30440. to the pin. The pin value is read from the CTSDT bit regardless of the value of
  30441. the CTSIO bit. The initial value of this bit after a power-on reset or manual reset is undefined.
  30442.  
  30443. Bit 4: CTSDT Description
  30444.  
  30445. 0 Input/output data is low-level
  30446.  
  30447. 1 Input/output data is high-level
  30448.  
  30449. Bits 3 and 2—Reserved: These bits are always read as 0, and should only be written with 0.
  30450.  
  30451. Bit 1—Serial Port Break I/O (SPB2IO): Specifies the serial port TxD2 pin output condition.
  30452. When the TxD2 pin is actually set as a port output pin and outputs the value set by the
  30453. SPB2DT bit, the TE bit in SCSCR2 should be cleared to 0.
  30454.  
  30455. Bit 1: SPB2IO Description
  30456.  
  30457. 0 SPB2DT bit value is not output to the TxD2 pin (Initial value)
  30458.  
  30459. 1 SPB2DT bit value is output to the TxD2 pin
  30460.  
  30461. 615
  30462.  
  30463. ----------------------- Page 632-----------------------
  30464.  
  30465. Bit 0—Serial Port Break Data (SPB2DT): Specifies the serial port RxD2 pin input data and
  30466. TxD2 pin output data. The TxD2 pin output condition is specified by the SPB2IO bit (see the
  30467. description of bit 1, SPB2IO, for details). When the TxD2 pin is designated as an output, the
  30468. value of the SPB2DT bit is output to the TxD2 pin. The RxD2 pin value is read from the
  30469. SPB2DT bit regardless of the value of the SPB2IO bit. The initial value of this bit after a
  30470. power-on reset or manual reset is undefined.
  30471.  
  30472. Bit 0: SPB2DT Description
  30473.  
  30474. 0 Input/output data is low-level
  30475.  
  30476. 1 Input/output data is high-level
  30477.  
  30478. 616
  30479.  
  30480. ----------------------- Page 633-----------------------
  30481.  
  30482. Section 19 Interrupt Controller (INTC)
  30483.  
  30484. 19.1 Overview
  30485.  
  30486. The interrupt controller (INTC) ascertains the priority of interrupt sources and controls
  30487. interrupt requests to the CPU. The INTC registers set the order of priority of each interrupt,
  30488. allowing the user to handle interrupt requests according to user-set priority.
  30489.  
  30490. 19.1.1 Features
  30491.  
  30492. The INTC has the following features.
  30493.  
  30494. • Fifteen interrupt priority levels can be set
  30495.  
  30496. By setting the three interrupt priority registers, the priorities of on-chip peripheral module
  30497. interrupts can be selected from 15 levels for different request sources.
  30498.  
  30499. • NMI noise canceler function
  30500.  
  30501. The NMI input level bit indicates the NMI pin state. The pin state can be checked by
  30502. reading this bit in the interrupt exception handler, enabling it to be used as a noise
  30503. canceler.
  30504.  
  30505. • NMI request masking when SR.BL bit is set
  30506.  
  30507. It is possible to select whether or not NMI requests are to be masked when the SR.BL bit
  30508. is set.
  30509.  
  30510. 19.1.2 Block Diagram
  30511.  
  30512. Figure 19.1 shows a block diagram of the INTC.
  30513.  
  30514. 617
  30515.  
  30516. ----------------------- Page 634-----------------------
  30517.  
  30518. NMI
  30519. Input control
  30520. –
  30521.  
  30522. 4 4
  30523.  
  30524. TMU (Interrupt request)
  30525. Com- Interrupt
  30526. RTC (Interrupt request) Priority
  30527. identifier parator request
  30528. SCI (Interrupt request)
  30529.  
  30530. SCIF (Interrupt request) SR
  30531.  
  30532. WDT (Interrupt request) I3 I2 I1 I0
  30533.  
  30534. REF (Interrupt request) CPU
  30535.  
  30536. DMAC (Interrupt request)
  30537.  
  30538. Hitachi- (Interrupt request)
  30539. UDI
  30540. GPIO (Interrupt request)
  30541.  
  30542. IPR
  30543. ICR
  30544.  
  30545. IPRA–IPRC
  30546.  
  30547. s
  30548. u
  30549. b
  30550.  
  30551. l
  30552. a
  30553. Bus interface n
  30554. r
  30555. e
  30556. t
  30557. n
  30558. I
  30559.  
  30560. INTC
  30561.  
  30562. TMU: Timer unit
  30563. RTC: Realtime clock unit
  30564. SCI: Serial communication interface
  30565. SCIF: Serial communication interface with FIFO
  30566. WDT: Watchdog timer
  30567. REF: Memory refresh controller section of the bus state controller
  30568. DMAC: Direct memory access controller
  30569. Hitachi-UDI: Hitachi-UDI unit
  30570. GPIO: I/O port
  30571. ICR: Interrupt control register
  30572. IPRA–IPRC: Interrupt priority registers A–C
  30573. SR: Status register
  30574.  
  30575. Figure 19.1 Block Diagram of INTC
  30576.  
  30577. 618
  30578.  
  30579. ----------------------- Page 635-----------------------
  30580.  
  30581. 19.1.3 Pin Configuration
  30582.  
  30583. Table 19.1 shows the INTC pin configuration.
  30584.  
  30585. Table 191 INTC Pins
  30586.  
  30587. Pin Name Abbreviation I / O Function
  30588.  
  30589. Nonmaskable interrupt NMI Input Input of nonmaskable interrupt request
  30590. input pin signal
  30591.  
  30592. Interrupt input pins – Input Input of interrupt request signals
  30593. (maskable by I3–I0 in SR)
  30594.  
  30595. 19.1.4 Register Configuration
  30596.  
  30597. The INTC has the registers shown in table 19.2.
  30598.  
  30599. Table 19.2 INTC Registers
  30600.  
  30601. Initial Area 7 Access
  30602. Name Abbreviation R/ W Value* 1 P4 Address Address S i z e
  30603.  
  30604. Interrupt control ICR R/W *2 H'FFD00000 H'1FD00000 16
  30605.  
  30606. register
  30607.  
  30608. Interrupt priority IPRA R/W H'0000 H'FFD00004 H'1FD00004 16
  30609. register A
  30610.  
  30611. Interrupt priority IPRB R/W H'0000 H'FFD00008 H'1FD00008 16
  30612. register B
  30613.  
  30614. Interrupt priority IPRC R/W H'0000 H'FFD0000C H'1FD0000C 16
  30615. register C
  30616.  
  30617. Notes: 1. Initialized by a power-on reset or manual reset.
  30618. 2. H'8000 when the NMI pin is high, H'0000 when the NMI pin is low.
  30619.  
  30620. 619
  30621.  
  30622. ----------------------- Page 636-----------------------
  30623.  
  30624. 19.2 Interrupt Sources
  30625.  
  30626. There are three types of interrupt sources: NMI, RL, and on-chip peripheral modules. Each
  30627. interrupt has a priority level (16–0), with level 16 as the highest and level 1 as the lowest.
  30628. When level 0 is set, the interrupt is masked and interrupt requests are ignored.
  30629.  
  30630. 19.2.1 NMI Interrupt
  30631.  
  30632. The NMI interrupt has the highest priority level of 16. It is always accepted unless the BL bit
  30633. in the status register in the CPU is set to 1. In sleep or standby mode, the interrupt is
  30634. accepted even if the BL bit is set to 1.
  30635.  
  30636. A setting can also be made to have the NMI interrupt accepted even if the BL bit is set to 1.
  30637.  
  30638. Input from the NMI pin is edge-detected. The NMI edge select bit (NMIE) in the interrupt
  30639. control register (ICR) is used to select either rising or falling edge. When the NMIE bit in the
  30640. ICR register is modified, the NMI interrupt is not detected for a maximum of 6 bus clock
  30641. cycles after the modification.
  30642.  
  30643. NMI interrupt exception handling does not affect the interrupt mask level bits (I3–I0) in the
  30644. status register (SR).
  30645.  
  30646. 620
  30647.  
  30648. ----------------------- Page 637-----------------------
  30649.  
  30650. 19.2.2 IRL Interrupts
  30651.  
  30652. IRL interrupts are input by level at pins – . The priority level is the level indicated
  30653. by pins – . An – value of 0 (0000) indicates the highest-level interrupt
  30654. request (interrupt priority level 15). A value of 15 (1111) indicates no interrupt request
  30655. (interrupt priority level 0).
  30656.  
  30657. SH7750
  30658.  
  30659. Interrupt Priority 4 to
  30660. requests encoder
  30661. to
  30662.  
  30663. Figure 19.2 Example of IRL Interrupt Connection
  30664.  
  30665. 621
  30666.  
  30667. ----------------------- Page 638-----------------------
  30668.  
  30669. Table 19.3 – Pins and Interrupt Levels
  30670.  
  30671. Interrupt Priority LevelInterrupt Request
  30672.  
  30673. 0 0 0 0 15 Level 15 interrupt request
  30674.  
  30675. 1 14 Level 14 interrupt request
  30676.  
  30677. 1 0 13 Level 13 interrupt request
  30678.  
  30679. 1 12 Level 12 interrupt request
  30680.  
  30681. 1 0 0 11 Level 11 interrupt request
  30682.  
  30683. 1 10 Level 10 interrupt request
  30684.  
  30685. 1 0 9 Level 9 interrupt request
  30686.  
  30687. 1 8 Level 8 interrupt request
  30688.  
  30689. 1 0 0 0 7 Level 7 interrupt request
  30690.  
  30691. 1 6 Level 6 interrupt request
  30692.  
  30693. 1 0 5 Level 5 interrupt request
  30694.  
  30695. 1 4 Level 4 interrupt request
  30696.  
  30697. 1 0 0 3 Level 3 interrupt request
  30698.  
  30699. 1 2 Level 2 interrupt request
  30700.  
  30701. 1 0 1 Level 1 interrupt request
  30702.  
  30703. 1 0 No interrupt request
  30704.  
  30705. A noise-cancellation feature is built in, and the IRL interrupt is not detected unless the levels
  30706. sampled at every bus clock cycle remain unchanged for three consecutive cycles, so that no
  30707. transient level on the IRL pin change is detected. In standby mode, as the bus clock is
  30708. stopped, noise cancellation is performed using the 32.768 kHz clock for the RTC instead.
  30709. When the RTC is not used, therefore, interruption by means of IRL interrupts cannot be
  30710. performed in standby mode.
  30711.  
  30712. The priority level of the IRL interrupt must not be lowered unless the interrupt is accepted
  30713. and the interrupt handling starts. However, the priority level can be changed to a higher one.
  30714.  
  30715. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by IRL interrupt
  30716. handling.
  30717.  
  30718. Pins – can be used for four independent interrupt requests by setting the IRLM bit
  30719. to 1 in the ICR register.
  30720.  
  30721. 622
  30722.  
  30723. ----------------------- Page 639-----------------------
  30724.  
  30725. Table 19.4 – Pins and Interrupt Levels (When IRLM = 1)
  30726.  
  30727. Interrupt Priority Level Interrupt Request
  30728.  
  30729. 1/0 1/0 1/0 0 13 IRL0
  30730.  
  30731. 1/0 1/0 0 1 10 IRL1
  30732.  
  30733. 1/0 0 1 1 7 IRL2
  30734.  
  30735. 0 1 1 1 4 IRL3
  30736.  
  30737. 19.2.3 On-Chip Peripheral Module Interrupts
  30738.  
  30739. On-chip peripheral module interrupts are generated by the following nine modules:
  30740.  
  30741. • Hitachi-UDI unit (Hitachi-UDI)
  30742.  
  30743. • Direct memory access controller (DMAC)
  30744.  
  30745. • Timer unit (TMU)
  30746.  
  30747. • Realtime clock (RTC)
  30748.  
  30749. • Serial communication interface (SCI)
  30750.  
  30751. • Serial communication interface with FIFO (SCIF)
  30752.  
  30753. • Bus state controller (BSC)
  30754.  
  30755. • Watchdog timer (WDT)
  30756.  
  30757. • I/O port (GPIO)
  30758.  
  30759. Not every interrupt source is assigned a different interrupt vector, bus sources are reflected in
  30760. the interrupt event register (INTEVT), so it is easy to identify sources by using the INTEVT
  30761. register value as a branch offset in the exception handling routine.
  30762.  
  30763. A priority level from 15 to 0 can be set for each module by means of interrupt priority
  30764. registers A to C (IPRA–IPRC).
  30765.  
  30766. The interrupt mask bits (I3–I0) in the status register (SR) are not affected by on-chip
  30767. peripheral module interrupt handling.
  30768.  
  30769. On-chip peripheral module interrupt source flag and interrupt enable flag updating should only
  30770. be carried out when the BL bit in the status register (SR) is set to 1. To prevent acceptance
  30771. of an erroneous interrupt from an interrupt source that should have been updated, first read the
  30772. on-chip peripheral register containing the relevant flag, then clear the BL bit to 0. This will
  30773. secure the necessary timing internally. When updating a number of flags, there is no problem
  30774. if only the register containing the last flag updated is read.
  30775.  
  30776. 623
  30777.  
  30778. ----------------------- Page 640-----------------------
  30779.  
  30780. If flag updating is performed while the BL bit is cleared to 0, the program may jump to the
  30781. interrupt handling routine when the INTEVT register value is 0. In this case, interrupt handling
  30782. is initiated due to the timing relationship between the flag update and interrupt request
  30783. recognition within the chip. Processing can be continued without any problem by executing
  30784. an RTE instruction.
  30785.  
  30786. 19.2.4 Interrupt Exception Handling and Priority
  30787.  
  30788. Table 19.5 lists the codes for the interrupt event register (INTEVT), and the order of interrupt
  30789. priority. Each interrupt source is assigned a unique INTEVT code. The start address of the
  30790. interrupt handler is common to each interrupt source. This is why, for instance, the value of
  30791. INTEVT is used as an offset at the start of the interrupt handler and branched to in order to
  30792. identify the interrupt source.
  30793.  
  30794. The order of priority of the on-chip peripheral modules is specified as desired by setting
  30795. priority levels from 0 to 15 in interrupt priority registers A to C (IPRA–IPRC). The order of
  30796. priority of the on-chip peripheral modules is set to 0 by a reset.
  30797.  
  30798. When the priorities for multiple interrupt sources are set to the same level and such interrupts
  30799. are generated simultaneously, they are handled according to the default priority order shown
  30800. in table 19.5.
  30801.  
  30802. Updating of interrupt priority registers A to C should only be carried out when the BL bit in
  30803. the status register (SR) is set to 1. To prevent erroneous interrupt acceptance, first read one of
  30804. the interrupt priority registers, then clear the BL bit to 0. This will secure the necessary
  30805. timing internally.
  30806.  
  30807. 624
  30808.  
  30809. ----------------------- Page 641-----------------------
  30810.  
  30811. Table 19.5 Interrupt Exception Handling Sources and Priority Order
  30812.  
  30813. INTEV Interrupt Priority IPR (Bit Priority within Default
  30814. Interrupt Source T Code (Initial Value) Numbers) IPR Setting Unit Priority
  30815.  
  30816. NMI H'1C0 16 — — High
  30817. IRL – = 0 H'200 15 — — ↑
  30818. ↓
  30819. – = 1 H'220 14 — —
  30820.  
  30821. – = 2 H'240 13 — —
  30822.  
  30823. – = 3 H'260 12 — —
  30824.  
  30825. – = 4 H'280 11 — —
  30826.  
  30827. – = 5 H'2A0 10 — —
  30828.  
  30829. – = 6 H'2C0 9 — —
  30830.  
  30831. – = 7 H'2E0 8 — —
  30832.  
  30833. – = 8 H'300 7 — —
  30834.  
  30835. – = 9 H'320 6 — —
  30836.  
  30837. – = A H'340 5 — —
  30838.  
  30839. – = B H'360 4 — —
  30840.  
  30841. – = C H'380 3 — —
  30842.  
  30843. – = D H'3A0 2 — —
  30844.  
  30845. – = E H'3C0 1 — —
  30846.  
  30847. IRL0 H'240 13 — —
  30848.  
  30849. IRL1 H'2A0 10 — —
  30850.  
  30851. IRL2 H'300 7 — —
  30852.  
  30853. IRL3 H'360 4 — —
  30854.  
  30855. Hitachi- Hitachi-UDI H'600 15–0 (0) IPRC (3–0) —
  30856. UDI
  30857.  
  30858. GPIO GPIOI H'620 15–0 (0) IPRC (15–12)—
  30859.  
  30860. DMAC DMTE0 H'640 15–0 (0) IPRC (11–8) High
  30861. DMTE1 H'660 ↑
  30862. ↓
  30863. DMTE2 H'680
  30864.  
  30865. DMTE3 H'6A0
  30866.  
  30867. DMAE H'6C0 Low
  30868.  
  30869. TMU0 TUNI0 H'400 15–0 (0) IPRA (15–12)—
  30870.  
  30871. TMU1 TUNI1 H'420 15–0 (0) IPRA (11–8) —
  30872.  
  30873. TMU2 TUNI2 H'440 15–0 (0) IPRA (7–4) High
  30874.  
  30875. TICPI2 H'460 Low Low
  30876.  
  30877. 625
  30878.  
  30879. ----------------------- Page 642-----------------------
  30880.  
  30881. Table 19.5 Interrupt Exception Handling Sources and Priority Order (cont)
  30882.  
  30883. INTEV Interrupt Priority IPR (Bit Priority within Default
  30884. Interrupt Source T Code (Initial Value) Numbers) IPR Setting Unit Priority
  30885.  
  30886. RTC ATI H'480 15–0 (0) IPRA (3–0) High High
  30887. ↑
  30888.  ↓
  30889. Low
  30890. PRI H'4A0 ↑
  30891. ↓
  30892. CUI H'4C0
  30893.  
  30894. SCI1 ERI H'4E0 15–0 (0) IPRB (7–4) High
  30895. RXI H'500 ↑
  30896.  
  30897. ↓
  30898. TXI H'520
  30899.  
  30900. TEI H'540 Low
  30901.  
  30902. SCIF ERI H'700 15–0 (0) IPRC (7–4) High
  30903. RXI H'720 ↑
  30904. 
  30905. ↓
  30906. BRI H'740
  30907.  
  30908. TXI H'760 Low
  30909.  
  30910. WDT ITI H'560 15–0 (0) IPRB (15–12) —
  30911.  
  30912. REF RCMI H'580 15–0 (0) IPRB (11–8) High
  30913.  
  30914. ROVI H'5A0 Low Low
  30915.  
  30916. Note: TUNI0–TUNI2: Underflow interrupts
  30917. TICPI2: Input capture interrupt
  30918. ATI: Alarm interrupt
  30919. PRI: Periodic interrupt
  30920. CUI: Carry-up interrupt
  30921. ERI: Receive-error interrupt
  30922. RXI: Receive-data-full interrupt
  30923. TXI: Transmit-data-empty interrupt
  30924. TEI: Transmit-end interrupt
  30925. BRI: Break interrupt request
  30926. ITI: Interval timer interrupt
  30927. RCMI: Compare-match interrupt
  30928. ROVI: Refresh counter overflow interrupt
  30929. Hitachi-UDI: Hitachi-UDI interrupt
  30930. GPIOI: I/O port interrupt
  30931. DMTE0–DMTE3: DMAC transfer end interrupts
  30932. DMAE: DMAC address error interrupt
  30933.  
  30934. 626
  30935.  
  30936. ----------------------- Page 643-----------------------
  30937.  
  30938. 19.3 Register Descriptions
  30939.  
  30940. 19.3.1 Interrupt Priority Registers A to C (IPRA–IPRC)
  30941.  
  30942. Interrupt priority registers A to C (IPRA–IPRC) are 16-bit readable/writable registers that set
  30943. priority levels from 0 to 15 for on-chip peripheral module interrupts. These registers are
  30944. initialized to H'0000 by a reset. They are not initialized in standby mode.
  30945.  
  30946. Bit: 15 14 13 12 11 10 9 8
  30947.  
  30948. Bit name:
  30949.  
  30950. Initial value: 0 0 0 0 0 0 0 0
  30951.  
  30952. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30953.  
  30954. Bit: 7 6 5 4 3 2 1 0
  30955.  
  30956. Bit name:
  30957.  
  30958. Initial value: 0 0 0 0 0 0 0 0
  30959.  
  30960. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  30961.  
  30962. Table 19.6 shows the relationship between the interrupt request sources and the IPRA–IPRC
  30963. register bits.
  30964.  
  30965. Table 19.6 Interrupt Request Sources and IPRA–IPRC Registers
  30966.  
  30967. Bits
  30968.  
  30969. Register 15–12 1 1 – 8 7 – 4 3 – 0
  30970.  
  30971. Interrupt priority register A TMU0 TMU1 TMU2 RTC
  30972. Interrupt priority register B WDT REF*1 SCI1 Reserved*2
  30973.  
  30974. Interrupt priority register C GPIO DMAC SCIF Hitachi-UDI
  30975.  
  30976. Notes: 1. REF is the memory refresh unit in the bus state controller
  30977. (BSC). See section 13, Bus State Controller (BSC), for details.
  30978. 2. Reserved bits: These bits are always read as 0 and should always be
  30979. written with 0.
  30980.  
  30981. As shown in table 19.6, four on-chip peripheral modules are assigned to each register.
  30982. Interrupt priority levels are established by setting a value from H'F (1111) to H'0 (0000) in
  30983. each of the four-bit groups: 15–12, 11–8, 7–4, and 3–0. Setting H'F designates priority level
  30984. 15 (the highest level), and setting H'0 designates priority level 0 (requests are masked).
  30985.  
  30986. 627
  30987.  
  30988. ----------------------- Page 644-----------------------
  30989.  
  30990. 19.3.2 Interrupt Control Register (ICR)
  30991.  
  30992. The interrupt control register (ICR) is a 16-bit register that sets the input signal detection
  30993. mode for external interrupt input pin NMI and indicates the input signal level at the NMI pin.
  30994. This register is initialized by a power-on reset or manual reset. It is not initialized in standby
  30995. mode.
  30996.  
  30997. Bit: 15 14 13 12 11 10 9 8
  30998.  
  30999. Bit name: NMIL MAI — — — — NMIB NMIE
  31000.  
  31001. Initial value: 0/1* 0 0 0 0 0 0 0
  31002.  
  31003. R/W: R R/W — — — — R/W R/W
  31004.  
  31005. Bit: 7 6 5 4 3 2 1 0
  31006.  
  31007. Bit name: IRLM — — — — — — —
  31008.  
  31009. Initial value: 0 0 0 0 0 0 0 0
  31010.  
  31011. R/W: R/W — — — — — — —
  31012.  
  31013. Note: * 1 when NMI pin input is high, 0 when low.
  31014.  
  31015. Bit 15—NMI Input Level (NMIL): Sets the level of the signal input at the NMI pin. This bit
  31016. can be read to determine the NMI pin level. It cannot be modified.
  31017.  
  31018. Bit 15: NMIL Description
  31019.  
  31020. 0 NMI pin input level is low
  31021.  
  31022. 1 NMI pin input level is high
  31023.  
  31024. Bit 14—NMI Interrupt Mask (MAI): Specifies whether or not all interrupts are to be
  31025. masked while the NMI pin input level is low, irrespective of the CPU’s SR.BL bit.
  31026.  
  31027. Bit 14: MAI Description
  31028.  
  31029. 0 Interrupts enabled even while NMI pin is low (Initial value)
  31030.  
  31031. 1 Interrupts disabled while NMI pin is low*
  31032.  
  31033. Note: * NMI interrupts are accepted in normal operation and in sleep mode.
  31034. In standby mode, all interrupts are masked, and standby is not cleared, while the NMI pin is
  31035. low.
  31036.  
  31037. 628
  31038.  
  31039. ----------------------- Page 645-----------------------
  31040.  
  31041. Bit 9—NMI Block Mode (NMIB): Specifies whether an NMI request is to be held pending
  31042. or detected immediately while the SR.BL bit is set to 1.
  31043.  
  31044. Bit 9: NMIB Description
  31045.  
  31046. 0 NMI interrupt requests held pending while SR.BL bit is set to 1
  31047. (Initial value)
  31048.  
  31049. 1 NMI interrupt requests detected while SR.BL bit is set to 1
  31050.  
  31051. Notes: 1. If interrupt requests are enabled while SR.BL = 1, the previous
  31052. exception information will be lost, and so must be saved beforehand.
  31053. 2. This bit is cleared automatically by NMI acceptance.
  31054.  
  31055. Bit 8—NMI Edge Select (NMIE): Specifies whether the falling or rising edge of the
  31056. interrupt request signal to the NMI pin is detected.
  31057.  
  31058. Bit 8: NMIE Description
  31059.  
  31060. 0 Interrupt request detected on falling edge of NMI input (Initial value)
  31061.  
  31062. 1 Interrupt request detected on rising edge of NMI input
  31063.  
  31064. Bit 7—IRL Pin Mode (IRLM): Specifies whether pins – are to be used as level-
  31065. encoded interrupt requests or as four independent interrupt requests.
  31066.  
  31067. Bit 7: IRLM Description
  31068.  
  31069. 0 pins used as level-encoded interrupt requests (Initial value)
  31070.  
  31071. 1 pins used as four independent interrupt requests
  31072.  
  31073. Bits 13 to 10 and 6 to 0—Reserved: These bits are always read as 0, and should only be
  31074. written with 0.
  31075.  
  31076. 629
  31077.  
  31078. ----------------------- Page 646-----------------------
  31079.  
  31080. 19.4 INTC Operation
  31081.  
  31082. 19.4.1 Interrupt Operation Sequence
  31083.  
  31084. The sequence of operations when an interrupt is generated is described below. Figure 19.3
  31085. shows a flowchart of the operations.
  31086.  
  31087. 1. The interrupt request sources send interrupt request signals to the interrupt controller.
  31088.  
  31089. 2. The interrupt controller selects the highest-priority interrupt from the interrupt requests
  31090. sent, according to the priority levels set in interrupt priority registers A to C (IPRA–IPRC).
  31091. Lower-priority interrupts are held pending. If two of these interrupts have the same priority
  31092. level, or if multiple interrupts occur within a single module, the interrupt with the highest
  31093. priority according to table 19.5, Interrupt Exception Handling Sources and Priority Order,
  31094. is selected.
  31095.  
  31096. 3. The priority level of the interrupt selected by the interrupt controller is compared with the
  31097. interrupt mask bits (I3–I0) in the status register (SR) of the CPU. If the request priority
  31098. level is higher that the level in bits I3–I0, the interrupt controller accepts the interrupt and
  31099. sends an interrupt request signal to the CPU.
  31100.  
  31101. 4. The CPU accepts an interrupt at a break between instructions.
  31102.  
  31103. 5. The interrupt source code is set in the interrupt event register (INTEVT).
  31104.  
  31105. 6. The status register (SR) and program counter (PC) are saved to SSR and SPC,
  31106. respectively.
  31107.  
  31108. 7. The block bit (BL), mode bit (MD), and register bank bit (RB) in SR are set to 1.
  31109.  
  31110. 8. The CPU jumps to the start address of the interrupt handler (the sum of the value set in
  31111. the vector base register (VBR) and H'00000600).
  31112.  
  31113. The interrupt handler may branch with the INTEVT register value as its offset in order to
  31114. identify the interrupt source. This enables it to branch to the handling routine for the particular
  31115. interrupt source.
  31116.  
  31117. Notes: 1. The interrupt mask bits (I3–I0) in the status register (SR) are not changed by
  31118. acceptance of an interrupt in the SH7750.
  31119.  
  31120. 2. The interrupt source flag should be cleared in the interrupt handler. To ensure that
  31121. an interrupt request that should have been cleared is not inadvertently accepted
  31122. again, read the interrupt source flag after it has been cleared, then wait for the
  31123. interval shown in table 19.7 (Time for priority decision and SR mask bit
  31124. comparison) before clearing the BL bit or executing an RTE instruction.
  31125.  
  31126. 630
  31127.  
  31128. ----------------------- Page 647-----------------------
  31129.  
  31130. Program
  31131. execution state
  31132.  
  31133. Interrupt No
  31134. generated?
  31135.  
  31136. Yes
  31137.  
  31138. (BL bit
  31139. in SR = 0) or No
  31140. (sleep or standby
  31141. mode)?
  31142. NMIB in No
  31143. ICR = 1 and
  31144. Yes
  31145. NMI?
  31146. No
  31147. NMI? Yes
  31148.  
  31149. Yes
  31150.  
  31151. Level 15 No
  31152.  
  31153. interrupt?
  31154.  
  31155. Yes
  31156. Level 14 No
  31157. I3–I0* = interrupt?
  31158. Yes
  31159. level 14 or
  31160. lower? Yes
  31161. Level 1 No
  31162. No I3–I0 = interrupt?
  31163. Yes
  31164. Set interrupt source level 13 or Yes
  31165. in INTEVT lower?
  31166.  
  31167. No
  31168. Yes I3–I0 =
  31169. Save SR to SSR; level 0?
  31170. save PC to SPC
  31171. No
  31172.  
  31173. Set BL, MD, RB bits
  31174. in SR to 1
  31175.  
  31176. Branch to exception
  31177. handler
  31178.  
  31179. Note: * I3–I0: Interrupt mask bits in status register (SR)
  31180.  
  31181. Figure 19.3 Interrupt Operation Flowchart
  31182.  
  31183. 631
  31184.  
  31185. ----------------------- Page 648-----------------------
  31186.  
  31187. 19.4.2 Multiple Interrupts
  31188.  
  31189. When handling multiple interrupts, interrupt handling should include the following
  31190. procedures:
  31191.  
  31192. 1. Branch to a specific interrupt handler corresponding to a code set in the INTEVT register.
  31193. The code in INTEVT can be used as a branch-offset for branching to the specific handler.
  31194.  
  31195. 2. Clear the interrupt source in the corresponding interrupt handler.
  31196.  
  31197. 3. Save SPC and SSR to the stack.
  31198.  
  31199. 4. Clear the BL bit in SR, and set the accepted interrupt level in the interrupt mask bits in
  31200. SR.
  31201.  
  31202. 5. Handle the interrupt.
  31203.  
  31204. 6. Set the BL bit in SR to 1.
  31205.  
  31206. 7. Restore SSR and SPC from memory.
  31207.  
  31208. 8. Execute the RTE instruction.
  31209.  
  31210. When these procedures are followed in order, an interrupt of higher priority than the one being
  31211. handled can be accepted after clearing BL in step 4. This enables the interrupt response time
  31212. to be shortened for urgent processing.
  31213.  
  31214. 19.4.3 Interrupt Masking with MAI Bit
  31215.  
  31216. By setting the MAI bit to 1 in the ICR register, it is possible to mask interrupts while the NMI
  31217. pin is low, irrespective of the BL and IMASK bits in the SR register.
  31218.  
  31219. • In normal operation and sleep mode
  31220.  
  31221. All interrupts are masked while the NMI pin is low. However, an NMI interrupt only is
  31222. generated by a transition at the NMI pin.
  31223.  
  31224. • In standby mode
  31225.  
  31226. All interrupts are masked while the NMI pin is low, and an NMI interrupt is not generated
  31227. by a transition at the NMI pin. Therefore, standby cannot be cleared by an NMI interrupt
  31228. while the MAI bit is set to 1.
  31229.  
  31230. 632
  31231.  
  31232. ----------------------- Page 649-----------------------
  31233.  
  31234. 19.5 Interrupt Response Time
  31235.  
  31236. The time from generation of an interrupt request until interrupt exception handling is
  31237. performed and fetching of the first instruction of the exception handler is started (the interrupt
  31238. response time) is shown in table 19.7.
  31239.  
  31240. Table 19.7 Interrupt Response Time
  31241.  
  31242. Number of States
  31243.  
  31244. Peripheral
  31245. Item N MI RL Modules Notes
  31246.  
  31247. Time for priority decision and 1Icyc + 4Bcyc 1Icyc + 7Bcyc 1Icyc + 2Bcyc
  31248. SR mask bit comparison
  31249.  
  31250. Wait time until end of S – 1 (≥ 0) × S – 1 (≥ 0) × S – 1 (≥ 0) ×
  31251. sequence being executed by Icyc Icyc Icyc
  31252. CPU
  31253.  
  31254. Time from interrupt exception 4 × Icyc 4 × Icyc 4 × Icyc
  31255. handling (save of SR and PC)
  31256. until fetch of first instruction
  31257. of exception handler is started
  31258.  
  31259. Response Total 5Icyc + 4Bcyc 5Icyc + 7Bcyc 5Icyc + 2Bcyc
  31260. time + (S – 1)Icyc + (S – 1)Icyc + (S – 1)Icyc
  31261.  
  31262. Minimum case 13Icyc 19Icyc 9Icyc When Icyc:
  31263. Bcyc = 2:1
  31264.  
  31265. Maximum 36 + S Icyc 60 + S Icyc 20 + S Icyc When Icyc:
  31266. case Bcyc = 8:1
  31267.  
  31268. Icyc: One cycle of internal clock supplied to CPU, etc.
  31269. Bcyc: One CKIO cycle
  31270. S: Latency of instruction
  31271.  
  31272. 633
  31273.  
  31274. ----------------------- Page 650-----------------------
  31275.  
  31276. 634
  31277.  
  31278. ----------------------- Page 651-----------------------
  31279.  
  31280. Section 20 User Break Controller (UBC)
  31281.  
  31282. 20.1 Overview
  31283.  
  31284. The user break controller (UBC) provides functions that simplify program debugging. When
  31285. break conditions are set in the UBC, a user break interrupt is generated according to the
  31286. contents of the bus cycle generated by the CPU. This function makes it easy to design an
  31287. effective self-monitoring debugger, enabling programs to be debugged with the chip alone,
  31288. without using an in-circuit emulator.
  31289.  
  31290. 20.1.1 Features
  31291.  
  31292. The UBC has the following features.
  31293.  
  31294. • Two break channels (A and B)
  31295.  
  31296. User break interrupts can be generated on independent conditions for channels A and B, or
  31297. on sequential conditions (sequential break setting: channel A → channel B).
  31298.  
  31299. • The following can be set as break compare conditions:
  31300.  
  31301.  Address (selection of 32-bit virtual address and ASID for comparison):
  31302.  
  31303. Address: All bits compared/lower 10 bits masked/lower 12 bits masked/lower 16 bits
  31304. masked/lower 20 bits masked/all bits masked
  31305.  
  31306. ASID: All bits compared/all bits masked
  31307.  
  31308.  Data (channel B only, 32-bit mask capability)
  31309.  
  31310.  Bus cycle: Instruction access/operand access
  31311.  
  31312.  Read/write
  31313.  
  31314.  Operand size: Byte/word/longword/quadword
  31315.  
  31316. • An instruction access cycle break can be effected before or after the instruction is
  31317. executed.
  31318.  
  31319. 635
  31320.  
  31321. ----------------------- Page 652-----------------------
  31322.  
  31323. 20.1.2 Block Diagram
  31324.  
  31325. Figure 20.1 shows a block diagram of the UBC.
  31326.  
  31327. Access Address Data
  31328. control bus bus
  31329.  
  31330. Channel A
  31331.  
  31332. Access BBRA
  31333. comparator
  31334.  
  31335. BARA
  31336.  
  31337. Address
  31338. comparator BASRA
  31339.  
  31340. BAMRA
  31341.  
  31342. Channel B
  31343.  
  31344. Access
  31345. BBRB
  31346. comparator
  31347.  
  31348. BARB
  31349.  
  31350. Address
  31351. comparator BASRB
  31352.  
  31353. BAMRB
  31354.  
  31355. Data BDRB
  31356.  
  31357. comparator
  31358.  
  31359. BDMRB
  31360.  
  31361. BBRA: Break bus cycle register A
  31362. BARA: Break address register A
  31363. BASRA: Break ASID register A
  31364. BAMRA: Break address mask register A
  31365. BBRB: Break bus cycle register B
  31366. BARB: Break address register B Control BRCR
  31367. BASRB: Break ASID register B
  31368. BAMRB: Break address mask register B
  31369. BDRB: Break data register B
  31370. User break trap request
  31371. BDMRB: Break data mask register B
  31372. BRCR: Break control register
  31373.  
  31374. Figure 20.1 Block Diagram of User Break Controller
  31375.  
  31376. 636
  31377.  
  31378. ----------------------- Page 653-----------------------
  31379.  
  31380. Table 20.1 shows the UBC registers.
  31381.  
  31382. Table 20.1 UBC Registers
  31383.  
  31384. Area 7 Access
  31385. Name Abbreviation R/ W Initial ValueP4 Address Address S i z e
  31386.  
  31387. Break address BARA R/W Undefined H'FF200000 H'1F200000 32
  31388. register A
  31389.  
  31390. Break address BAMRA R/W Undefined H'FF200004 H'1F200004 8
  31391. mask
  31392. register A
  31393.  
  31394. Break bus BBRA R/W H'0000 H'FF200008 H'1F200008 16
  31395. cycle register A
  31396.  
  31397. Break ASID BASRA R/W Undefined H'FF000014 H'1F000014 8
  31398. register A
  31399.  
  31400. Break address BARB R/W Undefined H'FF20000C H'1F20000C 32
  31401. register B
  31402.  
  31403. Break address BAMRB R/W Undefined H'FF200010 H'1F200010 8
  31404. mask
  31405. register B
  31406.  
  31407. Break bus BBRB R/W H'0000 H'FF200014 H'1F200014 16
  31408. cycle register B
  31409.  
  31410. Break ASID BASRB R/W Undefined H'FF000018 H'1F000018 8
  31411. register B
  31412.  
  31413. Break data BDRB R/W Undefined H'FF200018 H'1F200018 32
  31414. register B
  31415.  
  31416. Break data BDMRB R/W Undefined H'FF20001C H'1F20001C 32
  31417. mask register B
  31418.  
  31419. Break control BRCR R/W H'0000* H'FF200020 H'1F200020 16
  31420. register
  31421.  
  31422. Note: * Some bits are not initialized. See section 20.2.12, Break Control Register (BRCR), for
  31423. details.
  31424.  
  31425. 637
  31426.  
  31427. ----------------------- Page 654-----------------------
  31428.  
  31429. 20.2 Register Descriptions
  31430.  
  31431. 20.2.1 Access to UBC Control Registers
  31432.  
  31433. The access size must be the same as the control register size. If the sizes are different, a
  31434. write will not be effected in a UBC register write operation, and a read operation will return
  31435. an undefined value. UBC control register contents cannot be transferred to a floating-point
  31436. register using a floating-point memory load instruction.
  31437.  
  31438. When a UBC control register is updated, use either of the following methods to make the
  31439. updated value valid:
  31440.  
  31441. 1. Execute an RTE instruction after the memory store instruction that updated the register.
  31442. The updated value will be valid from the RTE instruction jump destination onward.
  31443.  
  31444. 2. Execute instructions requiring 5 states for execution after the memory store instruction that
  31445. updated the register. As the SH7750 executes two instructions in parallel and a minimum
  31446. of 0.5 state is required for execution of one instruction, 11 instructions must be inserted.
  31447. The updated value will be valid from the 6th state onward.
  31448.  
  31449. 638
  31450.  
  31451. ----------------------- Page 655-----------------------
  31452.  
  31453. 20.2.2 Break Address Register A (BARA)
  31454.  
  31455. Bit: 31 30 29 28 27 26 25 24
  31456.  
  31457. BAA31 BAA30 BAA29 BAA28 BAA27 BAA26 BAA25 BAA24
  31458.  
  31459. Initial value: * * * * * * * *
  31460.  
  31461. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31462.  
  31463. Bit: 23 22 21 20 19 18 17 16
  31464.  
  31465. BAA23 BAA22 BAA21 BAA20 BAA19 BAA18 BAA17 BAA16
  31466.  
  31467. Initial value: * * * * * * * *
  31468.  
  31469. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31470.  
  31471. Bit: 15 14 13 12 11 10 9 8
  31472.  
  31473. BAA15 BAA14 BAA13 BAA12 BAA11 BAA10 BAA9 BAA8
  31474.  
  31475. Initial value: * * * * * * * *
  31476.  
  31477. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31478.  
  31479. Bit: 7 6 5 4 3 2 1 0
  31480.  
  31481. BAA7 BAA6 BAA5 BAA4 BAA3 BAA2 BAA1 BAA0
  31482.  
  31483. Initial value: * * * * * * * *
  31484.  
  31485. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31486.  
  31487. Note: *: Undefined
  31488.  
  31489. Break address register A (BARA) is a 32-bit readable/writable register that specifies the
  31490. virtual address used in the channel A break conditions. BARA is not initialized by a power-on
  31491. reset or manual reset.
  31492.  
  31493. Bits 31 to 0—Break Address A31 to A0 (BAA31–BAA0): These bits hold the virtual address
  31494. (bits 31–0) used in the channel A break conditions.
  31495.  
  31496. 639
  31497.  
  31498. ----------------------- Page 656-----------------------
  31499.  
  31500. 20.2.3 Break ASID Register A (BASRA)
  31501.  
  31502. Bit: 7 6 5 4 3 2 1 0
  31503.  
  31504. BASA7 BASA6 BASA5 BASA4 BASA3 BASA2 BASA1 BASA0
  31505.  
  31506. Initial value: * * * * * * * *
  31507.  
  31508. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31509.  
  31510. Note: *: Undefined
  31511.  
  31512. Break ASID register A (BASRA) is an 8-bit readable/writable register that specifies the ASID
  31513. used in the channel A break conditions. BASRA is not initialized by a power-on reset or
  31514. manual reset.
  31515.  
  31516. Bits 7 to 0—Break ASID A7 to A0 (BASA7–BASA0): These bits hold the ASID (bits 7–0)
  31517. used in the channel A break conditions.
  31518.  
  31519. 20.2.4 Break Address Mask Register A (BAMRA)
  31520.  
  31521. Bit: 7 6 5 4 3 2 1 0
  31522.  
  31523. — — — — BAMA2 BASMA BAMA1 BAMA0
  31524.  
  31525. Initial value: 0 0 0 0 * * * *
  31526.  
  31527. R/W: R R R R R/W R/W R/W R/W
  31528.  
  31529. Note: *: Undefined
  31530.  
  31531. Break address mask register A (BAMRA) is an 8-bit readable/writable register that specifies
  31532. which bits are to be masked in the break ASID set in BASRA and the break address set in
  31533. BARA. BAMRA is not initialized by a power-on reset or manual reset.
  31534.  
  31535. Bits 7 to 4—Reserved: These bits are always read as 0, and should only be written with 0.
  31536.  
  31537. Bit 2—Break ASID Mask A (BASMA): Specifies whether all bits of the channel A break
  31538. ASID (BASA7–BASA0) are to be masked.
  31539.  
  31540. Bit 2: BASMA Description
  31541.  
  31542. 0 All BASRA bits are included in break conditions
  31543.  
  31544. 1 No BASRA bits are included in break conditions
  31545.  
  31546. 640
  31547.  
  31548. ----------------------- Page 657-----------------------
  31549.  
  31550. Bits 3, 1, and 0—Break Address Mask A2 to A0 (BAMA2–BAMA0): These bits specify
  31551. which bits of the channel A break address (BAA31–BAA0) set in BARA are to be masked.
  31552.  
  31553. Bit 3: BAMA2 Bit 1: BAMA1 Bit 0: BAMA0 Description
  31554.  
  31555. 0 0 0 All BARA bits are included in break conditions
  31556.  
  31557. 1 Lower 10 bits of BARA are masked, and not
  31558. included in break conditions
  31559.  
  31560. 1 0 Lower 12 bits of BARA are masked, and not
  31561. included in break conditions
  31562.  
  31563. 1 All BARA bits are masked, and not included in
  31564. break conditions
  31565.  
  31566. 1 0 0 Lower 16 bits of BARA are masked, and not
  31567. included in break conditions
  31568.  
  31569. 1 Lower 20 bits of BARA are masked, and not
  31570. included in break conditions
  31571.  
  31572. 1 * Reserved (cannot be set)
  31573.  
  31574. Note: *: Don’t care
  31575.  
  31576. 20.2.5 Break Bus Cycle Register A (BBRA)
  31577.  
  31578. Bit: 15 14 13 12 11 10 9 8
  31579.  
  31580. — — — — — — — —
  31581.  
  31582. Initial value: 0 0 0 0 0 0 0 0
  31583.  
  31584. R/W: R R R R R R R R
  31585.  
  31586. Bit: 7 6 5 4 3 2 1 0
  31587.  
  31588. — SZA2 IDA1 IDA0 RWA1 RWA0 SZA1 SZA0
  31589.  
  31590. Initial value: 0 0 0 0 0 0 0 0
  31591.  
  31592. R/W: R R/W R/W R/W R/W R/W R/W R/W
  31593.  
  31594. Break bus cycle register A (BBRA) is a 16-bit readable/writable register that sets three
  31595. conditions—(1) instruction access/operand access, (2) read/write, and (3) operand size—
  31596. from among the channel A break conditions.
  31597.  
  31598. BBRA is initialized to H'0000 by a power-on reset. It retains its value in standby mode.
  31599.  
  31600. Bits 15 to 7—Reserved: These bits are always read as 0, and should only be written with 0.
  31601.  
  31602. 641
  31603.  
  31604. ----------------------- Page 658-----------------------
  31605.  
  31606. Bits 5 and 4—Instruction Access/Operand Access Select A (IDA1, IDA0): These bits
  31607. specify whether an instruction access cycle or an operand access cycle is used as the bus
  31608. cycle in the channel A break conditions.
  31609.  
  31610. Bit 5: IDA1 Bit 4: IDA0 Description
  31611.  
  31612. 0 0 Condition comparison is not performed (Initial value)
  31613.  
  31614. 1 Instruction access cycle is used as break condition
  31615.  
  31616. 1 0 Operand access cycle is used as break condition
  31617.  
  31618. 1 Instruction access cycle or operand access cycle is used as
  31619. break condition
  31620.  
  31621. Bits 3 and 2—Read/Write Select A (RWA1, RWA0): These bits specify whether a read
  31622. cycle or write cycle is used as the bus cycle in the channel A break conditions.
  31623.  
  31624. Bit 3: RWA1 Bit 2: RWA0 Description
  31625.  
  31626. 0 0 Condition comparison is not performed (Initial value)
  31627.  
  31628. 1 Read cycle is used as break condition
  31629.  
  31630. 1 0 Write cycle is used as break condition
  31631.  
  31632. 1 Read cycle or write cycle is used as break condition
  31633.  
  31634. Bits 6, 1, and 0—Operand Size Select A (SZA2–SZA0): These bits select the operand size
  31635. of the bus cycle used as a channel A break condition.
  31636.  
  31637. Bit 6: SZA2 Bit 1: SZA1 Bit 0: SZA0 Description
  31638.  
  31639. 0 0 0 Operand size is not included in break conditions
  31640. (Initial value)
  31641.  
  31642. 1 Byte access is used as break condition
  31643.  
  31644. 1 0 Word access is used as break condition
  31645.  
  31646. 1 Longword access is used as break condition
  31647.  
  31648. 1 0 0 Quadword access is used as break condition
  31649.  
  31650. 1 Reserved (cannot be set)
  31651.  
  31652. 1 * Reserved (cannot be set)
  31653.  
  31654. Note: *: Don’t care
  31655.  
  31656. 642
  31657.  
  31658. ----------------------- Page 659-----------------------
  31659.  
  31660. 20.2.6 Break Address Register B (BARB)
  31661.  
  31662. BARB is the channel B break address register. The bit configuration is the same as for
  31663. BARA.
  31664.  
  31665. 20.2.7 Break ASID Register B (BASRB)
  31666.  
  31667. BASRB is the channel B break ASID register. The bit configuration is the same as for
  31668. BASRA.
  31669.  
  31670. 20.2.8 Break Address Mask Register B (BAMRB)
  31671.  
  31672. BAMRB is the channel B break address mask register. The bit configuration is the same as
  31673. for BAMRA.
  31674.  
  31675. 20.2.9 Break Data Register B (BDRB)
  31676.  
  31677. Bit: 31 30 29 28 27 26 25 24
  31678.  
  31679. BDB31 BDB30 BDB29 BDB28 BDB27 BDB26 BDB25 BDB24
  31680.  
  31681. Initial value: * * * * * * * *
  31682.  
  31683. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31684.  
  31685. Bit: 23 22 21 20 19 18 17 16
  31686.  
  31687. BDB23 BDB22 BDB21 BDB20 BDB19 BDB18 BDB17 BDB16
  31688.  
  31689. Initial value: * * * * * * * *
  31690.  
  31691. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31692.  
  31693. Bit: 15 14 13 12 11 10 9 8
  31694.  
  31695. BDB15 BDB14 BDB13 BDB12 BDB11 BDB10 BDB9 BDB8
  31696.  
  31697. Initial value: * * * * * * * *
  31698.  
  31699. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31700.  
  31701. Bit: 7 6 5 4 3 2 1 0
  31702.  
  31703. BDB7 BDB6 BDB5 BDB4 BDB3 BDB2 BDB1 BDB0
  31704.  
  31705. Initial value: * * * * * * * *
  31706.  
  31707. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31708.  
  31709. Note: *: Undefined
  31710.  
  31711. 643
  31712.  
  31713. ----------------------- Page 660-----------------------
  31714.  
  31715. Break data register B (BDRB) is a 32-bit readable/writable register that specifies the data
  31716. (bits 31–0) to be used in the channel B break conditions. BDRB is not initialized by a power-
  31717. on reset or manual reset.
  31718.  
  31719. Bits 31 to 0—Break Data B31 to B0 (BDB31–BDB0): These bits hold the data (bits 31–0) to
  31720. be used in the channel B break conditions.
  31721.  
  31722. 20.2.10 Break Data Mask Register B (BDMRB)
  31723.  
  31724. Bit: 31 30 29 28 27 26 25 24
  31725.  
  31726. BDMB31 BDMB30 BDMB29 BDMB28 BDMB27 BDMB26 BDMB25 BDMB24
  31727.  
  31728. Initial value: * * * * * * * *
  31729.  
  31730. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31731.  
  31732. Bit: 23 22 21 20 19 18 17 16
  31733.  
  31734. BDMB23 BDMB22 BDMB21 BDMB20 BDMB19 BDMB18 BDMB17 BDMB16
  31735.  
  31736. Initial value: * * * * * * * *
  31737.  
  31738. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31739.  
  31740. Bit: 15 14 13 12 11 10 9 8
  31741.  
  31742. BDMB15 BDMB14 BDMB13 BDMB12 BDMB11 BDMB10 BDMB9 BDMB8
  31743.  
  31744. Initial value: * * * * * * * *
  31745.  
  31746. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31747.  
  31748. Bit: 7 6 5 4 3 2 1 0
  31749.  
  31750. BDMB7 BDMB6 BDMB5 BDMB4 BDMB3 BDMB2 BDMB1 BDMB0
  31751.  
  31752. Initial value: * * * * * * * *
  31753.  
  31754. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  31755.  
  31756. Note: *: Undefined
  31757.  
  31758. Break data mask register B (BDMRB) is a 32-bit readable/writable register that specifies
  31759. which bits of the break data set in BDRB are to be masked. BDMRB is not initialized by a
  31760. power-on reset or manual reset.
  31761.  
  31762. 644
  31763.  
  31764. ----------------------- Page 661-----------------------
  31765.  
  31766. Bits 31 to 0—Break Data Mask B31 to B0 (BDMB31–BDMB0): These bits specify whether
  31767. the corresponding bit of the channel B break data (BDB31–BDB0) set in BDRB is to be
  31768. masked.
  31769.  
  31770. Bit 31–0: BDMBn Description
  31771.  
  31772. 0 Channel B break data bit BDBn is included in break conditions
  31773.  
  31774. 1 Channel B break data bit BDBn is masked, and not included in break
  31775. conditions
  31776.  
  31777. n = 31 to 0
  31778. Note: When the data bus value is included in the break conditions, the operand size should be
  31779. specified. When byte size is specified, set the same data in bits 15–8 and 7–0 of BDRB and
  31780. BDMRB.
  31781.  
  31782. 20.2.11 Break Bus Cycle Register B (BBRB)
  31783.  
  31784. BBRB is the channel B bus break register. The bit configuration is the same as for BBRA.
  31785.  
  31786. 20.2.12 Break Control Register (BRCR)
  31787.  
  31788. Bit: 15 14 13 12 11 10 9 8
  31789.  
  31790. CMFA CMFB — — — PCBA — —
  31791.  
  31792. Initial value: 0 0 0 0 0 * 0 0
  31793.  
  31794. R/W: R/W R/W R R R R/W R R
  31795.  
  31796. Bit: 7 6 5 4 3 2 1 0
  31797.  
  31798. DBEB PCBB — — SEQ — — UBDE
  31799.  
  31800. Initial value: * * 0 0 * 0 0 0
  31801.  
  31802. R/W: R/W R/W R R R/W R R R/W
  31803.  
  31804. Note: *: Undefined
  31805.  
  31806. The break control register (BRCR) is a 16-bit readable/writable register that specifies (1)
  31807. whether channels A and B are to be used as two independent channels or in a sequential
  31808. condition, (2) whether the break is to be effected before or after instruction execution, (3)
  31809. whether the BDRB register is to be included in the channel B break conditions, and (4)
  31810. whether the user break debug function is to be used. BRCR also contains condition match
  31811. flags. The CMFA, CMFB, and UBDE bits in BRCR are initialized to 0 by a power-on reset,
  31812. but retain their value in standby mode. The value of the PCBA, DBEB, PCBB, and SEQ bits
  31813. is undefined after a power-on reset or manual reset, so these bits should be initialized by
  31814. software as necessary.
  31815.  
  31816. 645
  31817.  
  31818. ----------------------- Page 662-----------------------
  31819.  
  31820. Bit 15—Condition Match Flag A (CMFA): Set to 1 when a break condition set for channel
  31821. A is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once
  31822. being set, it should be cleared with a write.)
  31823.  
  31824. Bit 15: CMFA Description
  31825.  
  31826. 0 Channel A break condition is not matched (Initial value)
  31827.  
  31828. 1 Channel A break condition match has occurred
  31829.  
  31830. Bit 14—Condition Match Flag B (CMFB): Set to 1 when a break condition set for channel
  31831. B is satisfied. This flag is not cleared to 0 (to confirm that the flag is set again after once
  31832. being set, it should be cleared with a write.)
  31833.  
  31834. Bit 14: CMFB Description
  31835.  
  31836. 0 Channel B break condition is not matched (Initial value)
  31837.  
  31838. 1 Channel B break condition match has occurred
  31839.  
  31840. Bits 13 to 11—Reserved: These bits are always read as 0, and should only be written with 0.
  31841.  
  31842. Bit 10—Instruction Access Break Select A (PCBA): Specifies whether a channel A
  31843. instruction access cycle break is to be effected before or after the instruction is executed.
  31844. This bit is not initialized by a power-on reset or manual reset.
  31845.  
  31846. Bit 10: PCBA Description
  31847.  
  31848. 0 Channel A PC break is effected before instruction execution
  31849.  
  31850. 1 Channel A PC break is effected after instruction execution
  31851.  
  31852. Bits 9 and 8—Reserved: These bits are always read as 0, and should only be written with 0.
  31853.  
  31854. Bit 7—Data Break Enable B (DBEB): Specifies whether the data bus condition is to be
  31855. included in the channel B break conditions. This bit is not initialized by a power-on reset or
  31856. manual reset.
  31857.  
  31858. Bit 7: DBEB Description
  31859.  
  31860. 0 Data bus condition is not included in channel B conditions
  31861.  
  31862. 1 Data bus condition is included in channel B conditions
  31863.  
  31864. Note: When the data bus is included in the break conditions, bits IDB1–0 in break bus cycle
  31865. register B (BBRB) should be set to 10 or 11.
  31866.  
  31867. 646
  31868.  
  31869. ----------------------- Page 663-----------------------
  31870.  
  31871. Bit 6—PC Break Select B (PCBB): Specifies whether a channel B instruction access cycle
  31872. break is to be effected before or after the instruction is executed. This bit is not initialized by
  31873. a power-on reset or manual reset.
  31874.  
  31875. Bit 6: PCBB Description
  31876.  
  31877. 0 Channel B PC break is effected before instruction execution
  31878.  
  31879. 1 Channel B PC break is effected after instruction execution
  31880.  
  31881. Bits 5 and 4—Reserved: These bits are always read as 0, and should only be written with 0.
  31882.  
  31883. Bit 3—Sequence Condition Select (SEQ): Specifies whether the conditions for channels A
  31884. and B are to be independent or sequential. This bit is not initialized by a power-on reset or
  31885. manual reset.
  31886.  
  31887. Bit 3: SEQ Description
  31888.  
  31889. 0 Channel A and B comparisons are performed as independent conditions
  31890.  
  31891. 1 Channel A and B comparisons are performed as sequential conditions
  31892. (channel A → channel B)
  31893.  
  31894. Bits 2 and 1—Reserved: These bits are always read as 0, and should only be written with 0.
  31895.  
  31896. Bit 0—User Break Debug Enable (UBDE): Specifies whether the user break debug function
  31897. (see section 20.4, User Break Debug Support Function) is to be used.
  31898.  
  31899. Bit 0: UBDE Description
  31900.  
  31901. 0 User break debug function is not used (Initial value)
  31902.  
  31903. 1 User break debug function is used
  31904.  
  31905. 20.3 Operation
  31906.  
  31907. 20.3.1 Explanation of Terms Relating to Accesses
  31908.  
  31909. An instruction access is an access that obtains an instruction. An operand access is any
  31910. memory access for the purpose of instruction execution. For example, the access to address
  31911. PC+disp×2+4 in the instruction MOV.W @(disp,PC), Rn (an access very close to the
  31912. program counter) is an operand access. The fetching of an instruction from the branch
  31913. destination when a branch instruction is executed is also an instruction access. As the term
  31914. “data” is used to distinguish data from an address, the term “operand access” is used in this
  31915. section.
  31916.  
  31917. 647
  31918.  
  31919. ----------------------- Page 664-----------------------
  31920.  
  31921. In the SH7750, all operand accesses are treated as either read accesses or write accesses.
  31922. The following instructions require special attention:
  31923.  
  31924. • PREF, OCBP, and OCBWB instructions: Treated as read accesses.
  31925.  
  31926. • MOVCA and OCBI instructions: Treated as write accesses.
  31927.  
  31928. • TAS instruction: Treated as one read access and one write access.
  31929.  
  31930. The operand accesses for the PREF, OCBP, OCBWB, and OCBI instructions are accesses
  31931. with no access data.
  31932.  
  31933. The SH7750 handles all operand accesses as having a data size. The data size can be byte,
  31934. word, longword, or quadword. The operand data size for the PREF, OCBP, OCBWB,
  31935. MOVCA, and OCBI instructions is treated as longword.
  31936.  
  31937. 20.3.2 Explanation of Terms Relating to Instruction Intervals
  31938.  
  31939. In this section, “1 (2, 3, ...) instruction(s) after...”, as a measure of the distance between two
  31940. instructions, is defined as follows. A branch is counted as an interval of two instructions.
  31941.  
  31942. • Example of sequence of instructions with no branch:
  31943.  
  31944. 100 Instruction A (0 instructions after instruction A)
  31945.  
  31946. 102 Instruction B (1 instruction after instruction A)
  31947.  
  31948. 104 Instruction C (2 instructions after instruction A)
  31949.  
  31950. 106 Instruction D (3 instructions after instruction A)
  31951.  
  31952. • Example of sequence of instructions with a branch (however, the example of a sequence
  31953. of instructions with no branch should be applied when the branch destination of a delayed
  31954. branch instruction is the instruction itself + 4):
  31955.  
  31956. 100 Instruction A: BT/S L200 (0 instructions after instruction A)
  31957.  
  31958. 102 Instruction B (1 instruction after instruction A, 0 instructions after
  31959. instruction B)
  31960.  
  31961. L200 200 Instruction C (3 instructions after instruction A, 2
  31962. instructions after instruction B)
  31963.  
  31964. 202 Instruction D (4 instructions after instruction A, 3 instructions after
  31965. instruction B)
  31966.  
  31967. 648
  31968.  
  31969. ----------------------- Page 665-----------------------
  31970.  
  31971. 20.3.3 User Break Operation Sequence
  31972.  
  31973. The sequence of operations from setting of break conditions to user break exception handling
  31974. is described below.
  31975.  
  31976. 1. Specify pre- or post-execution breaking in the case of an instruction access, inclusion or
  31977. exclusion of the data bus value in the break conditions in the case of an operand access,
  31978. and use of independent or sequential channel A and B break conditions, in the break
  31979. control register (BRCR). Set the break addresses in the break address registers for each
  31980. channel (BARA, BARB), the ASIDs corresponding to the break space in the break ASID
  31981. registers (BASRA, BASRB), and the address and ASID masking methods in the break
  31982. address mask registers (BAMRA, BAMRB). If the data bus value is to be included in the
  31983. break conditions, also set the break data in the break data register (BDRB) and the data
  31984. mask in the break data mask register (BDMRB).
  31985.  
  31986. 2. Set the break bus conditions in the break bus cycle registers (BBRA, BBRB). If even one
  31987. of the BBRA/BBRB instruction access/operand access select (ID bit) and read/write
  31988. select groups (RW bit) is set to 00, a user break interrupt will not be generated on the
  31989. corresponding channel. Make the BBRA and BBRB settings after all other break-related
  31990. register settings have been completed. If breaks are enabled with BBRA/BBRB while the
  31991. break address, data, or mask register, or the break control register is in the initial state
  31992. after a reset, a break may be generated inadvertently.
  31993.  
  31994. 3. The operation when a break condition is satisfied depends on the BL bit (in the CPU’s SR
  31995. register). When the BL bit is 0, exception handling is started and the condition match flag
  31996. (CMFA/CMFB) for the respective channel is set for the matched condition. When the BL
  31997. bit is 1, the condition match flag (CMFA/CMFB) for the respective channel is set for the
  31998. matched condition but exception handling is not started.
  31999.  
  32000. The condition match flags (CMFA, CMFB) are set by a branch condition match, but are
  32001. not reset. Therefore, a memory store instruction should be used on the BRCR register to
  32002. clear the flags to 0. See section 20.3.6, Condition Match Flag Setting, for the exact setting
  32003. conditions for the condition match flags.
  32004.  
  32005. 4. When sequential condition mode has been selected, and the channel B condition is
  32006. matched after the channel A condition has been matched, a break is effected at the
  32007. instruction at which the channel B condition was matched. See section 20.3.8, Contiguous
  32008. A and B Settings for Sequential Conditions, for the operation when the channel A
  32009. condition match and channel B condition match occur close together. With sequential
  32010. conditions, only the channel B condition match flag is set. When sequential condition
  32011. mode has been selected, if it is wished to clear the channel A match when the channel A
  32012. condition has been matched but the channel B condition has not yet been matched, this
  32013. can be done by writing 0 to the SEQ bit in the BRCR register.
  32014.  
  32015. 649
  32016.  
  32017. ----------------------- Page 666-----------------------
  32018.  
  32019. 20.3.4 Instruction Access Cycle Break
  32020.  
  32021. 1. When an instruction access/read/word setting is made in the break bus cycle register
  32022. (BBRA/BBRB), an instruction access cycle can be used as a break condition. In this
  32023. case, breaking before or after execution of the relevant instruction can be selected with
  32024. the PCBA/PCBB bit in the break control register (BRCR). When an instruction access
  32025. cycle is used as a break condition, clear the LSB of the break address registers (BARA,
  32026. BARB) to 0. A break will not be generated if this bit is set to 1.
  32027.  
  32028. 2. When a pre-execution break is specified, the break is effected when it is confirmed that
  32029. the instruction is to be fetched and executed. Therefore, an overrun-fetched instruction (an
  32030. instruction that is fetched but not executed when a branch or exception occurs) cannot be
  32031. used in a break. However, if a TLB miss or TLB protection violation exception occurs at
  32032. the time of the fetch of an instruction subject to a break, the break exception handling is
  32033. carried out first. The instruction TLB exception handling is performed when the instruction
  32034. is re-executed (see section 5.4, Exception Types and Priorities). Also, since a delayed
  32035. branch instruction and the delay slot instruction are executed as a single instruction, if a
  32036. pre-execution break is specified for a delay slot instruction, the break will be effected
  32037. before execution of the delayed branch instruction. However, a pre-execution break cannot
  32038. be specified for the delay slot instruction for an RTE instruction.
  32039.  
  32040. 3. With a pre-execution break, the instruction set as a break condition is executed, then a
  32041. break interrupt is generated before the next instruction is executed. When a post-execution
  32042. break is set for a delayed branch instruction, the delay slot is executed and the break is
  32043. effected before execution of the instruction at the branch destination (when the branch is
  32044. made) or the instruction two instructions ahead of the branch instruction (when the branch
  32045. is not made).
  32046.  
  32047. 4. When an instruction access cycle is set for channel B, break data register B (BDRB) is
  32048. ignored in judging whether there is an instruction access match. Therefore, a break
  32049. condition specified by the DBEB bit in BRCR is not executed.
  32050.  
  32051. 650
  32052.  
  32053. ----------------------- Page 667-----------------------
  32054.  
  32055. 20.3.5 Operand Access Cycle Break
  32056.  
  32057. 1. In the case of an operand access cycle break, the bits included in address bus comparison
  32058. vary as shown below according to the data size specification in the break bus cycle
  32059. register (BBRA/BBRB).
  32060.  
  32061. Data Size Address Bits Compared
  32062.  
  32063. Quadword (100) Address bits A31–A3
  32064.  
  32065. Longword (011) Address bits A31–A2
  32066.  
  32067. Word (010) Address bits A31–A1
  32068.  
  32069. Byte (001) Address bits A31–A0
  32070.  
  32071. Not included in condition (000) In quadword access, address bits A31–A3
  32072.  
  32073. In longword access, address bits A31–A2
  32074.  
  32075. In word access, address bits A31–A1
  32076.  
  32077. In byte access, address bits A31–A0
  32078.  
  32079. 2. When data value is included in break conditions in channel B
  32080.  
  32081. When a data value is included in the break conditions, set the DBEB bit in the break
  32082. control register (BRCR) to 1. In this case, break data register B (BDRB) and break data
  32083. mask register B (BDMRB) settings are necessary in addition to the address condition. A
  32084. user break interrupt is generated when all three conditions—address, ASID, and data—are
  32085. matched. When a quadword access occurs, the 64-bit access data is divided into an upper
  32086. 32 bits and lower 32 bits, and interpreted as two 32-bit data units. A break is generated if
  32087. either of the 32-bit data units satisfies the data match condition.
  32088.  
  32089. Set the IDB1–0 bits in break bus cycle register B (BBRB) to 10 or 11. When byte data is
  32090. specified, the same data should be set in the two bytes comprising bits 15–8 and bits 7–0
  32091. in break data register B (BDRB) and break data mask register B (BDMRB). When word
  32092. or byte is set, bits 31–16 of BDRB and BDMRB are ignored.
  32093.  
  32094. 3. When the DBEB bit in the break control register (BRCR) is set to 1, a break is not
  32095. generated by an operand access with no access data (an operand access in a PREF,
  32096. OCBP, OCBWB, or OCBI instruction).
  32097.  
  32098. 651
  32099.  
  32100. ----------------------- Page 668-----------------------
  32101.  
  32102. 20.3.6 Condition Match Flag Setting
  32103.  
  32104. 1. Instruction access with post-execution condition, or operand access
  32105.  
  32106. The flag is set when execution of the instruction that causes the break is completed. As an
  32107. exception to this, however, in the case of an instruction with more than one operand
  32108. access the flag may be set on detection of the match condition alone, without waiting for
  32109. execution of the instruction to be completed.
  32110.  
  32111. Example 1:
  32112.  
  32113. 100 BT L200 (branch performed)
  32114.  
  32115. 102 Instruction (operand access break on channel A) → flag not set
  32116.  
  32117. Example 2:
  32118.  
  32119. 110 FADD (FPU exception)
  32120.  
  32121. 112 Instruction (operand access break on channel A) → flag not set
  32122.  
  32123. 2. Instruction access with pre-execution condition
  32124.  
  32125. The flag is set when the break match condition is detected.
  32126.  
  32127. Example 1:
  32128.  
  32129. 110 Instruction (pre-execution break on channel A) → flag set
  32130.  
  32131. 112 Instruction (pre-execution break on channel B) → flag not set
  32132.  
  32133. Example 2:
  32134.  
  32135. 110 Instruction (pre-execution break on channel B, instruction access TLB miss) → flag
  32136. set
  32137.  
  32138. 20.3.7 Program Counter (PC) Value Saved
  32139.  
  32140. 1. When instruction access (pre-execution) is set as a break condition, the program counter
  32141. (PC) value saved to SPC in user break interrupt handling is the address of the instruction
  32142. at which the break condition match occurred. In this case, a user break interrupt is
  32143. generated and the fetched instruction is not executed.
  32144.  
  32145. 2. When instruction access (post-execution) is set as a break condition, the program counter
  32146. (PC) value saved to SPC in user break interrupt handling is the address of the instruction
  32147. to be executed after the instruction at which the break condition match occurred. In this
  32148. case, the fetched instruction is executed, and a user break interrupt is generated before
  32149. execution of the next instruction.
  32150.  
  32151. 3. When an instruction access (post-execution) break condition is set for a delayed branch
  32152. instruction, the delay slot instruction is executed and a user break is effected before
  32153. execution of the instruction at the branch destination (when the branch is made) or the
  32154. instruction two instructions ahead of the branch instruction (when the branch is not made).
  32155. In this case, the PC value saved to SPC is the address of the branch destination (when the
  32156. branch is made) or the instruction following the delay slot instruction (when the branch is
  32157. not made).
  32158.  
  32159. 652
  32160.  
  32161. ----------------------- Page 669-----------------------
  32162.  
  32163. 4. When operand access (address only) is set as a break condition, the address of the
  32164. instruction to be executed after the instruction at which the condition match occurred is
  32165. saved to SPC.
  32166.  
  32167. 5. When operand access (address + data) is set as a break condition, execution of the
  32168. instruction at which the condition match occurred is completed. A user break interrupt is
  32169. generated before execution of instructions from one instruction later to four instructions
  32170. later. It is not possible to specify at which instruction, from one later to four later, the
  32171. interrupt will be generated. The start address of the instruction after the instruction for
  32172. which execution is completed at the point at which user break interrupt handling is started
  32173. is saved to SPC. If an instruction between one instruction later and four instructions later
  32174. causes another exception, control is performed as follows. Designating the exception
  32175. caused by the break as exception 1, and the exception caused by an instruction between
  32176. one instruction later and four instructions later as exception 2, the fact that memory
  32177. updating and register updating that essentially cannot be performed by exception 2 cannot
  32178. be performed is guaranteed irrespective of the existence of exception 1. The program
  32179. counter value saved is the address of the first instruction for which execution is
  32180. suppressed. Whether exception 1 or exception 2 is used for the exception jump destination
  32181. and the value written to the exception register (EXPEVT/INTEVT) is not guaranteed.
  32182. However, if exception 2 is from a source not synchronized with an instruction (external
  32183. interrupt or peripheral module interrupt), exception 1 is used for the exception jump
  32184. destination and the value written to the exception register (EXPEVT/INTEVT).
  32185.  
  32186. 20.3.8 Contiguous A and B Settings for Sequential Conditions
  32187.  
  32188. When channel A match and channel B match timings are close together, a sequential break
  32189. may not be guaranteed. Rules relating to the guaranteed range are given below.
  32190.  
  32191. 1. Instruction access matches on both channel A and channel B
  32192.  
  32193. Instruction B is 0 instructions after Equivalent to setting the same address. Do not use
  32194. instruction A this setting.
  32195.  
  32196. Instruction B is 1 instruction after Sequential operation is not guaranteed.
  32197. instruction A
  32198.  
  32199. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  32200. after instruction A
  32201.  
  32202. 2. Instruction access match on channel A, operand access match on channel B
  32203.  
  32204. Instruction B is 0 or 1 instruction after Sequential operation is not guaranteed.
  32205. instruction A
  32206.  
  32207. Instruction B is 2 or more instructions Sequential operation is guaranteed.
  32208. after instruction A
  32209.  
  32210. 3. Operand access match on channel A, instruction access match on channel B
  32211.  
  32212. 653
  32213.  
  32214. ----------------------- Page 670-----------------------
  32215.  
  32216. Instruction B is 0 to 3 instructions after Sequential operation is not guaranteed.
  32217. instruction A
  32218.  
  32219. Instruction B is 4 or more instructions Sequential operation is guaranteed.
  32220. after instruction A
  32221.  
  32222. 4. Operand access matches on both channel A and channel B
  32223.  
  32224. Do not make a setting such that a single operand access will match the break conditions
  32225. of both channel A and channel B. There are no other restrictions. For example, sequential
  32226. operation is guaranteed even if two accesses within a single instruction match channel A
  32227. and channel B conditions in turn.
  32228.  
  32229. 20.3.9 Usage Notes
  32230.  
  32231. 1. Do not execute a post-execution instruction access break for the SLEEP instruction.
  32232.  
  32233. 2. Do not make an operand access break setting between 1 and 3 instructions before a
  32234. SLEEP instruction.
  32235.  
  32236. 3. The value of the BL bit referenced in a user break exception depends on the break setting,
  32237. as follows.
  32238.  
  32239. a.Pre-execution instruction access break: The BL bit value before the executed
  32240. instruction is referenced.
  32241.  
  32242. b.Post-execution instruction access break: The OR of the BL bit values before and
  32243. after the executed instruction is referenced.
  32244.  
  32245. c.Operand access break (address/data): The BL bit value after the executed instruction
  32246. is referenced.
  32247.  
  32248. d.In the case of an instruction that modifies the BL bit
  32249.  
  32250. SL.BL Pre- Post- Pre- Post- Operand
  32251. Execution Execution Execution Execution Access
  32252. Instruction Instruction Instruction Instruction (Address/Data
  32253. Access Access Access Access )
  32254.  
  32255. 0 → 0 A A A A A
  32256.  
  32257. 1 → 0 M M M M A
  32258.  
  32259. 0 → 1 A M A M M
  32260.  
  32261. 1 → 1 M M M M M
  32262.  
  32263. A: Accepted
  32264. M: Masked
  32265.  
  32266. 654
  32267.  
  32268. ----------------------- Page 671-----------------------
  32269.  
  32270. e.In the case of an RTE delay slot
  32271.  
  32272. The BL bit value before execution of a delay slot instruction is the same as the BL bit
  32273. value before execution of an RTE instruction. The BL bit value after execution of a
  32274. delay slot instruction is the same as the first BL bit value for the first instruction
  32275. executed on returning by means of an RTE instruction (the same as the value of the
  32276. BL bit in SSR before execution of the RTE instruction).
  32277.  
  32278. f. If an interrupt or exception is accepted with the BL bit cleared to 0, the value of the
  32279. BL bit before execution of the first instruction of the exception handling routine is 1.
  32280.  
  32281. 4. If channels A and B both match independently at virtually the same time, and, as a result,
  32282. the SPC value is the same for both user break interrupts, only one user break interrupt is
  32283. generated, but both the CMFA bit and the CMFB bit are set. For example:
  32284.  
  32285. 110 Instruction (post-execution instruction break on channel A) → SPC = 112, CMFA =
  32286. 1
  32287.  
  32288. 112 Instruction (pre-execution instruction break on channel B) → SPC = 112, CMFB = 1
  32289.  
  32290. 5. The PCBA or PCBB bit in BRCR is invalid for an instruction access break setting.
  32291.  
  32292. 6. When the SEQ bit in BRCR is 1, the internal sequential break state is initialized by a
  32293. channel B condition match. For example: A → A → B (user break generated) → B (no
  32294. break generated)
  32295.  
  32296. 7. In the event of contention between a re-execution type exception and a post-execution
  32297. break in a multistep instruction, the re-execution type exception is generated. In this case,
  32298. the CMF bit may or may not be set to 1 when the break condition occurs.
  32299.  
  32300. 8. A post-execution break is classified as a completion type exception. Consequently, in the
  32301. event of contention between a completion type exception and a post-execution break, the
  32302. post-execution break is suppressed in accordance with the priorities of the two events. For
  32303. example, in the case of contention between a TRAPA instruction and a post-execution
  32304. break, the user break is suppressed. However, in this case, the CMF bit is set by the
  32305. occurrence of the break condition.
  32306.  
  32307. 20.4 User Break Debug Support Function
  32308.  
  32309. The user break debug support function enables the processing used in the event of a user
  32310. break exception to be changed. When a user break exception occurs, if the UBDE bit is set to
  32311. 1 in the BRCR register, the DBR register value will be used as the branch destination address
  32312. instead of [VBR + offset]. The value of R15 is saved in the SGR register regardless of the
  32313. value of the UBDE bit in the BRCR register or the kind of exception event. A flowchart of the
  32314. user break debug support function is shown in figure 20.2.
  32315.  
  32316. 655
  32317.  
  32318. ----------------------- Page 672-----------------------
  32319.  
  32320. Exception/interrupt
  32321. generation
  32322.  
  32323. Hardware operation
  32324. SPC ← PC
  32325. SSR ← SR
  32326. SR.BL ← B'1
  32327.  
  32328. SR.MD ← B'1
  32329.  
  32330. SR.RB ← B'1
  32331.  
  32332. Exception Exception/ Trap
  32333. interrupt/trap?
  32334.  
  32335. Interrupt
  32336.  
  32337. EXPEVT ← exception code INTEVT ← interrupt code TRA ← TRAPA (imm)
  32338.  
  32339. SGR ← R15
  32340.  
  32341. No Yes
  32342. Reset exception?
  32343.  
  32344. Yes (BRCR.UBDE == 1) && No
  32345. (user break exception)?
  32346.  
  32347. PC ← DBR PC ← VBR + vector offset PC ← H'A0000000
  32348.  
  32349. Debug program Exception handler
  32350.  
  32351. R15 ← SGR
  32352. (STC instruction)
  32353.  
  32354. Execute RTE instruction
  32355. PC ← SPC
  32356. SR ← SSR
  32357.  
  32358. End of exception
  32359. operations
  32360.  
  32361. Figure 20.2 User Break Debug Support Function Flowchart
  32362.  
  32363. 656
  32364.  
  32365. ----------------------- Page 673-----------------------
  32366.  
  32367. 20.5 Examples of Use
  32368.  
  32369. Instruction Access Cycle Break Condition Settings
  32370.  
  32371. • Register settings: BASRA = H'80 / BARA = H'00000404 / BAMRA = H'00 /
  32372. BBRA = H'0014 / BASRB = H'70 / BARB = H'00008010 / BAMRB = H'01 /
  32373. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0400
  32374.  
  32375. Conditions set: Independent channel A/channel B mode
  32376.  
  32377.  Channel A: ASID: H'80 / address: H'00000404 / address mask: H'00
  32378.  
  32379. Bus cycle: instruction access (post-instruction-execution), read (operand size not
  32380. included in conditions)
  32381.  
  32382.  Channel B: ASID: H'70 / address: H'00008010 / address mask: H'01
  32383.  
  32384. Data: H'00000000 / data mask: H'00000000
  32385.  
  32386. Bus cycle: instruction access (pre-instruction-execution), read (operand size not
  32387. included in conditions)
  32388.  
  32389. A user break is generated after execution of the instruction at address H'00000404 with
  32390. ASID = H'80, or before execution of an instruction at addresses H'00008000–H'000083FE
  32391. with ASID = H'70.
  32392.  
  32393. • Register settings: BASRA = H'80 / BARA = H'00037226 / BAMRA = H'00 /
  32394. BBRA = H'0016 / BASRB = H'70 / BARB = H'0003722E / BAMRB = H'00 /
  32395. BBRB = H'0016 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0008
  32396.  
  32397. Conditions set: Channel A → channel B sequential mode
  32398.  
  32399.  Channel A: ASID: H'80 / address: H'00037226 / address mask: H'00
  32400.  
  32401. Bus cycle: instruction access (pre-instruction-execution), read, word
  32402.  
  32403.  Channel B: ASID: H'70 / address: H'0003722E / address mask: H'00
  32404.  
  32405. Data: H'00000000 / data mask: H'00000000
  32406.  
  32407. Bus cycle: instruction access (pre-instruction-execution), read, word
  32408.  
  32409. The instruction at address H'00037266 with ASID = H'80 is executed, then a user break is
  32410. generated before execution of the instruction at address H'0003722E with ASID = H'70.
  32411.  
  32412. • Register settings: BASRA = H'80 / BARA = H'00027128 / BAMRA = H'00 /
  32413. BBRA = H'001A / BASRB = H'70 / BARB = H'00031415 / BAMRB = H'00 /
  32414. BBRB = H'0014 / BDRB = H'00000000 / BDMRB = H'00000000 / BRCR = H'0000
  32415.  
  32416. Conditions set: Independent channel A/channel B mode
  32417.  
  32418.  Channel A: ASID: H'80 / address: H'00027128 / address mask: H'00
  32419.  
  32420. Bus cycle: CPU, instruction access (pre-instruction-execution), write, word
  32421.  
  32422.  Channel B: ASID: H'70 / address: H'00031415 / address mask: H'00
  32423.  
  32424. Data: H'00000000 / data mask: H'00000000
  32425.  
  32426. 657
  32427.  
  32428. ----------------------- Page 674-----------------------
  32429.  
  32430. Bus cycle: CPU, instruction access (pre-instruction-execution), read (operand size not
  32431. included in conditions)
  32432.  
  32433. A user break interrupt is not generated on channel A since the instruction access is not a
  32434. write cycle.
  32435.  
  32436. A user break interrupt is not generated on channel B since instruction access is performed
  32437. on an even address.
  32438.  
  32439. Operand Access Cycle Break Condition Settings
  32440.  
  32441. • Register settings: BASRA = H'80 / BARA = H'00123456 / BAMRA = H'00 /
  32442. BBRA = H'0024 / BASRB = H'70/ BARB = H'000ABCDE / BAMRB = H'02 /
  32443. BBRB = H'002A / BDRB = H'0000A512 / BDMRB = H'00000000 / BRCR = H'0080
  32444.  
  32445. Conditions set: Independent channel A/channel B mode
  32446.  
  32447.  Channel A: ASID: H'80 / address: H'00123456 / address mask: H'00
  32448.  
  32449. Bus cycle: operand access, read (operand size not included in conditions)
  32450.  
  32451.  Channel B: ASID: H'70 / address: H'000ABCDE / address mask: H'02
  32452.  
  32453. Data: H'0000A512 / data mask: H'00000000
  32454.  
  32455. Bus cycle: operand access, write, word
  32456.  
  32457. Data break enabled
  32458.  
  32459. On channel A, a user break interrupt is generated in the event of a longword read at
  32460. address H'00123454, a word read at address H'00123456, or a byte read at address
  32461. H'00123456, with ASID = H'80.
  32462.  
  32463. On channel B, a user break interrupt is generated when H'A512 is written by word access
  32464. to any address from H'000AB000 to H'000ABFFE with ASID = H'70.
  32465.  
  32466. 658
  32467.  
  32468. ----------------------- Page 675-----------------------
  32469.  
  32470. Section 21 Hitachi User Debug Interface (Hitachi-UDI)
  32471.  
  32472. 21.1 Overview
  32473.  
  32474. 21.1.1 Features
  32475.  
  32476. The Hitachi user debug interface (Hitachi-UDI) is a serial input/output interface conforming
  32477. to JTAG, IEEE 1149.1, and IEEE Standard Test Access Port and Boundary-Scan Architecture.
  32478. The SH7750’s Hitachi-UDI does not support boundary-scan, but is used for emulator
  32479. connection. The functions of this interface should not be used when using an emulator. Refer
  32480. to the emulator manual for the method of connecting the emulator. The Hitachi-UDI uses six
  32481. pins (TCK, TMS, TD, TDO, , and /BRKACK). The pin functions and serial
  32482. transfer protocol conform to the JTAG specifications.
  32483.  
  32484. 21.1.2 Block Diagram
  32485.  
  32486. Figure 21.1 shows a block diagram of the Hitachi-UDI. The TAP (test access port) controller
  32487. and control registers are reset independently of the chip reset pin by driving the pin low
  32488. or setting TMS to 1 and applying TCK for at least five clock cycles. The other circuits are
  32489. reset and initialized in an ordinary reset. The Hitachi-UDI circuit has four internal registers:
  32490. SDBPR, SDIR, SDDRH, and SDDRL (these last two together designated SDDR). The
  32491. SDBPR register supports the JTAG bypass mode, SDIR is the command register, and SDDR
  32492. is the data register. SDIR can be accessed directly from the TDI and TDO pins.
  32493.  
  32494. 659
  32495.  
  32496. ----------------------- Page 676-----------------------
  32497.  
  32498. Interrupt/reset
  32499. Break etc.
  32500. /BRKACK
  32501. control
  32502.  
  32503. TCK
  32504.  
  32505. TAP
  32506. TMS Decoder
  32507. controller
  32508.  
  32509.  
  32510.  
  32511. TDI
  32512. s
  32513. u
  32514. SDIR b
  32515. e
  32516. r l
  32517. e u
  32518. t d
  32519. s
  32520. i o
  32521. g m
  32522. SDBPR e l
  32523. r
  32524. t a
  32525. f r
  32526. i SDDRH e
  32527. h
  32528. S h
  32529. p
  32530. i
  32531. SDDRL r
  32532. e
  32533. P
  32534. TDO MUX
  32535.  
  32536. Figure 21.1 Block Diagram of Hitachi-UDI Circuit
  32537.  
  32538. 660
  32539.  
  32540. ----------------------- Page 677-----------------------
  32541.  
  32542. 21.1.3 Pin Configuration
  32543.  
  32544. Table 21.1 shows the Hitachi-UDI pin configuration.
  32545.  
  32546. Table 21.1 Hitachi-UDI Pins
  32547.  
  32548. Pin Name Abbreviatio I / O Function When Not
  32549. n Used
  32550. Clock pin TCK Input Same as the JTAG serial clock input Open*1
  32551.  
  32552. pin. Data is transferred from data
  32553. input pin TDI to the Hitachi-UDI
  32554. circuit, and data is read from data
  32555. output pin TDO, in synchronization
  32556. with this signal.
  32557. Mode pin TMS Input The mode select input pin. Changing Open*1
  32558.  
  32559. this signal in synchronization with
  32560. TCK determines the meaning of the
  32561. data input from TDI. The protocol
  32562. conforms to the JTAG (IEEE Std
  32563. 1149.1) specification.
  32564. Reset pin Input The input pin that resets the Hitachi- Fix at ground*2
  32565.  
  32566. UDI. This signal is received
  32567. asynchronously with respect to TCK,
  32568. and effects a reset of the JTAG
  32569. interface circuit when low.
  32570. must be driven low for a certain period
  32571. when powering on, regardless of
  32572. whether or not JTAG is used. This
  32573. differs from the IEEE specification.
  32574. Data input TDI Input The data input pin. Data is sent to the Open*1
  32575.  
  32576. pin Hitachi-UDI circuit by changing this
  32577. signal in synchronization with TCK.
  32578.  
  32579. Data output TDO Output The data output pin. Data is sent to Open
  32580. pin the Hitachi-UDI circuit by reading this
  32581. signal in synchronization with TCK.
  32582. Emulator pin / Input/ Dedicated emulator pin Open*1
  32583.  
  32584. BRKACK output
  32585.  
  32586. Notes: 1. Pulled up inside the chip. When designing a board that allows use of an emulator, or
  32587. when using interrupts and resets via the Hitachi-UDI, there is no problem in connecting
  32588. a pullup resistance externally.
  32589. 2. When designing a board that enables the use of an emulator, or when using interrupts
  32590. and resets via the Hitachi-UDI, drive low for a period overlapping at
  32591. power-on, and also provide for control by alone.
  32592.  
  32593. 661
  32594.  
  32595. ----------------------- Page 678-----------------------
  32596.  
  32597. The maximum frequency of TCK (TMS, TDI, TDO) is 20 MHz. Make the TCK or SH7750
  32598. CPG setting so that the TCK frequency is lower than that of the SH7750’s on-chip peripheral
  32599. module clock.
  32600.  
  32601. 21.1.4 Register Configuration
  32602.  
  32603. Table 21.2 shows the Hitachi-UDI registers. Except for SDBPR, these registers are mapped in
  32604. the control register space and can be referenced by the CPU.
  32605.  
  32606. Table 21.2 Hitachi-UDI Registers
  32607.  
  32608. Hitachi-UDI
  32609. CPU Side Side
  32610.  
  32611. Abbre- P 4 Area 7 Acces Acces Initial
  32612. Name viation R/W Address Address s Size R/W s Size Value*
  32613.  
  32614. Instruction SDIR R H'FFF00000 H'1FF00000 16 R/W 16 H'FFFF
  32615. register
  32616.  
  32617. Data register H SDDR/ R/W H'FFF00008 H'1FF00008 32/16 — 32 Undefined
  32618. SDDRH
  32619.  
  32620. Data register L SDDRL R/W H'FFF0000A H'1FF0000A 16 — — Undefined
  32621.  
  32622. Bypass register SDBPR — — — — R/W 1 Undefined
  32623.  
  32624. Note: * Initialized when the pin goes low or when the TAP is in the Test-Logic-Reset state.
  32625.  
  32626. 21.2 Register Descriptions
  32627.  
  32628. 21.2.1 Instruction Register (SDIR)
  32629.  
  32630. The instruction register (SDIR) is a 16-bit register that can only be read by the CPU. In the
  32631. initial state, bypass mode is set. The value (command) is set from the serial input pin (TDI).
  32632. SDIR is initialized by the pin or in the TAP Test-Logic-Reset state. When this register
  32633. is written to from the Hitachi-UDI, writing is possible regardless of the CPU mode. However,
  32634. if a read is performed by the CPU while writing is in progress, it may not be possible to read
  32635. the correct value. In this case, SDIR should be read twice, and then read again if the read
  32636. values do not match. Operation is undefined if a reserved command is set in this register.
  32637.  
  32638. 662
  32639.  
  32640. ----------------------- Page 679-----------------------
  32641.  
  32642. Bit: 15 14 13 12 11 10 9 8
  32643.  
  32644. TI3 TI2 TI1 TI0 — — — —
  32645.  
  32646. Initial value: 1 1 1 1 1 1 1 1
  32647.  
  32648. R/W: R R R R R R R R
  32649.  
  32650. Bit: 7 6 5 4 3 2 1 0
  32651.  
  32652. — — — — — — — —
  32653.  
  32654. Initial value: 1 1 1 1 1 1 1 1
  32655.  
  32656. R/W: R R R R R R R R
  32657.  
  32658. Bits 15 to 12—Test Instruction Bits (TI3–TI0)
  32659.  
  32660. Bit 15: TI3 Bit 14: TI2 Bit 13: TI1 Bit 12: TI0 Description
  32661.  
  32662. 0 0 — — Reserved
  32663.  
  32664. 1 0 — Reserved
  32665.  
  32666. 1 0 Hitachi-UDI reset negate
  32667.  
  32668. 1 Hitachi-UDI reset assert
  32669.  
  32670. 1 0 0 — Reserved
  32671.  
  32672. 1 — Hitachi-UDI interrupt
  32673.  
  32674. 1 0 — Reserved
  32675.  
  32676. 1 0 Reserved
  32677.  
  32678. 1 Bypass mode (Initial value)
  32679.  
  32680. Bits 11 to 0—Reserved: These bits are always read as 1, and should only be written with 1.
  32681.  
  32682. 663
  32683.  
  32684. ----------------------- Page 680-----------------------
  32685.  
  32686. 21.2.2 Data Register (SDDR)
  32687.  
  32688. The data register (SDDR) is a 32-bit register, comprising the two 16-bit registers SDDRH and
  32689. SDDRL, that can be read and written to by the CPU. The value in this register is not
  32690. initialized by a or CPU reset.
  32691.  
  32692. Bit: 31 30 29 28 27 26 25 24
  32693.  
  32694. Initial value: * * * * * * * *
  32695.  
  32696. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32697.  
  32698. Bit: 23 22 21 20 19 18 17 16
  32699.  
  32700. Initial value: * * * * * * * *
  32701.  
  32702. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32703.  
  32704. Bit: 15 14 13 12 11 10 9 8
  32705.  
  32706. Initial value: * * * * * * * *
  32707.  
  32708. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32709.  
  32710. Bit: 7 6 5 4 3 2 1 0
  32711.  
  32712. Initial value: * * * * * * * *
  32713.  
  32714. R/W: R/W R/W R/W R/W R/W R/W R/W R/W
  32715.  
  32716. Note: *: Undefined
  32717.  
  32718. Bits 31 to 0—DR Data: These bits store the SDDR value.
  32719.  
  32720. 21.2.3 Bypass Register (SDBPR)
  32721.  
  32722. The bypass register (SDBPR) is a one-bit register that cannot be accessed by the CPU. When
  32723. bypass mode is set in SDIR, SDBPR is connected between the TDI pin and TDO pin of the
  32724. Hitachi-UDI.
  32725.  
  32726. 664
  32727.  
  32728. ----------------------- Page 681-----------------------
  32729.  
  32730. 21.3 Operation
  32731.  
  32732. 21.3.1 TAP Control
  32733.  
  32734. Figure 21.2 shows the internal states of the TAP control circuit. These conform to the state
  32735. transitions specified by JTAG.
  32736.  
  32737. • The transition condition is the TMS value at the rising edge of TCK.
  32738.  
  32739. • The TDI value is sampled at the rising edge of TCK, and shifted at the falling edge.
  32740.  
  32741. • The TDO value changes at the falling edge of TCK. When not in the Shift-DR or Shift-IR
  32742. state, TDO is in the high-impedance state.
  32743.  
  32744. • In a transition to = 0, a transition is made to the Test-Logic-Reset state
  32745. asynchronously with respect to TCK.
  32746.  
  32747. 665
  32748.  
  32749. ----------------------- Page 682-----------------------
  32750.  
  32751. 21.3.2 Hitachi-UDI Reset
  32752.  
  32753. A power-on reset is effected by an SDIR command. A reset is effected by sending a Hitachi-
  32754. UDI reset assert command, and then sending a Hitachi-UDI reset negate command, from the
  32755. Hitachi-UDI pin (see figure 21.3). The interval required between the Hitachi-UDI reset assert
  32756. command and the Hitachi-UDI reset negate command is the same as the length of time the
  32757. reset pin is held low in order to effect a power-on reset.
  32758.  
  32759. Hitachi-UDI Hitachi-UDI
  32760. Hitachi-UDI pin reset assert reset negate
  32761.  
  32762. Chip internal reset
  32763.  
  32764. CPU state Normal Reset Reset processing
  32765.  
  32766. Figure 21.3 Hitachi-UDI Reset
  32767.  
  32768. 21.3.3 Hitachi-UDI Interrupt
  32769.  
  32770. The Hitachi-UDI interrupt function generates an interrupt by setting a command value in
  32771. SDIR from the Hitachi-UDI. The Hitachi-UDI interrupt is of general exception/interrupt
  32772. operation type, with a branch to an address based on VBR and return effected by means of an
  32773. RTE instruction. The exception code stored in control register INTEVT in this case is H'600.
  32774. The priority of the Hitachi-UDI interrupt can be controlled with bits 3 to 0 of control register
  32775. IPRC.
  32776.  
  32777. The Hitachi-UDI interrupt request signal is asserted for about eight SH7750 on-chip peripheral
  32778. clock cycles after the command is set. The number of assertion cycles is determined by the
  32779. ratio of TCK to the on-chip peripheral clock frequency. As the assertion period is limited, the
  32780. CPU may sometimes miss a request. The Hitachi-UDI interrupt command automatically
  32781. changes to the bypass command immediately after being set.
  32782.  
  32783. 21.3.4 Bypass
  32784.  
  32785. The Hitachi-UDI pins can be set to the bypass mode specified by JTAG by setting a
  32786. command in SDIR from the Hitachi-UDI.
  32787.  
  32788. ----------------------- Page 683-----------------------
  32789.  
  32790. 21.4 Usage Notes
  32791.  
  32792. 1. SDIR Command
  32793.  
  32794. Once an SDIR command has been set, it remains unchanged until initialization by
  32795. asserting or placing the TAP in the Test-Logic-Reset state, or until another
  32796. command (other than a Hitachi-UDI interrupt command) is written from the Hitachi-UDI.
  32797.  
  32798. 2. SDIR Commands in Sleep Mode
  32799.  
  32800. Sleep mode is cleared by a Hitachi-UDI interrupt or Hitachi-UDI reset, and these
  32801. exception requests are accepted in this mode. In standby mode, neither a Hitachi-UDI
  32802. interrupt nor a Hitachi-UDI reset is accepted..
  32803.  
  32804. 3. The Hitachi-UDI is used for emulator connection. Therefore, Hitachi-UDI functions cannot
  32805. be used when an emulator is used.
  32806.  
  32807. 4. The SH7750’s Hitachi-UDI pins must not be connected to a boundary-scan signal loop on
  32808. the board.
  32809.  
  32810. 667
  32811.  
  32812. ----------------------- Page 684-----------------------
  32813.  
  32814. 668
  32815.  
  32816. ----------------------- Page 685-----------------------
  32817.  
  32818. Section 22 Pin Description
  32819.  
  32820. 22.1 Pin Arrangement
  32821.  
  32822. K
  32823. ) ) ) C )
  32824. V V V A V
  32825. 3 3. 3. K 3
  32826. 3. 3 3 R 3.
  32827. ( (
  32828. ( 1 2 B (
  32829. G G L L / 1 0 D C C
  32830. P P L L S S 1 0 X T T 2
  32831. L C P P U U / R L 2
  32832. C T R
  32833. A L - - - - / T T K K / / / / 2 / K - - A L
  32834. 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
  32835. 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
  32836. 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
  32837.  
  32838. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  32839. NMI
  32840. A
  32841.  
  32842.  
  32843. B
  32844.  
  32845. 
  32846.  
  32847. C 1 2
  32848. L L MD1/TXD2
  32849. L L
  32850. P P
  32851. - - MD0/SCK
  32852. D S S
  32853. D47 S S D63
  32854. V V
  32855. 
  32856.  
  32857. D32 E D48
  32858. D46 D62
  32859.  
  32860. D33 1 0 D49
  32861. F A A
  32862.  Reserved 
  32863. D45 D61
  32864.  
  32865. D34 MD2/RXD2 D50
  32866. G
  32867. D44 RD/ D60
  32868.  
  32869. D35 H  D51
  32870. D43 D59
  32871.  
  32872. D36 D52
  32873. J
  32874. D42 D58
  32875.  BGA256 
  32876. D37 D53
  32877. K
  32878.  
  32879. (Top view)
  32880. D41 D57
  32881. L
  32882. D38 D54
  32883.  
  32884.  
  32885. D40 D56
  32886. M
  32887. D39 D55
  32888. D15 D31
  32889. N  
  32890. D0 D16
  32891. D14 P 1 0 D30
  32892. K K
  32893. D1 A A D17
  32894. D13  R R 
  32895. R / D D D29
  32896.  
  32897. D2 / D18
  32898. RXD
  32899. D12 D28
  32900. T
  32901. D3 D19
  32902.  
  32903.  
  32904.  
  32905. D11 D27
  32906. U
  32907. D4 D20
  32908. D10 D26
  32909. D5 V  D21
  32910.  
  32911. D9 D25
  32912. W
  32913.  
  32914. D6
  32915. Y
  32916.  
  32917. 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
  32918. 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
  32919. A A A A A A A A K I D D D
  32920. C Q Q Q Q C K / Q
  32921. D D D D C D D /
  32922. 7
  32923. / / / / R /
  32924.  
  32925. / / M
  32926. 2 / VDDQ (IO, 3.3 V)
  32927. 3 Q
  32928. M M D
  32929. Q /
  32930. / / / / Q / VSSQ (IO, 0 V)
  32931. / D D
  32932. /
  32933. /
  32934. 
  32935.  
  32936.  
  32937. / VDD (internal, 1.8 V)
  32938.  
  32939.  
  32940. /
  32941. /
  32942. VSS (internal, 0 V)
  32943.  
  32944.  
  32945. NC
  32946.  
  32947. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  32948. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  32949. and RTC are used.
  32950.  
  32951. Figure 22.1 Pin Arrangement (256-Pin BGA)
  32952.  
  32953. 669
  32954.  
  32955. ----------------------- Page 686-----------------------
  32956.  
  32957. K
  32958. ) ) ) C )
  32959. V V V A V
  32960. 3 3. 3. K 3
  32961. 3. 3 3 R 3.
  32962. ( ( D
  32963. ( 1 1 2 2 B E (
  32964. G G L L L L / 1 0 D C C
  32965. P P L L L L S S 1 0 X V T T 2
  32966. L C P P U U / R R L 2
  32967. C P P T R
  32968. A L - - - - - - / T T K K / / / 2 / / K E - - A L
  32969. 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
  32970. 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
  32971. 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
  32972.  
  32973.  
  32974.  
  32975. 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
  32976. 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
  32977. 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
  32978. 1 156 NMI
  32979. 2 155
  32980. 3 154
  32981. 4 153
  32982. 5 152
  32983. 6 151 MD2/RXD2
  32984. 7 150 MD1/TXD2
  32985. 8 149 MD0/SCK
  32986. 9 148
  32987.  
  32988.  
  32989.  
  32990. 10 147
  32991.  
  32992.  
  32993.  
  32994. D47 11 146 D63
  32995. D32 12 145 D48
  32996. 13 144
  32997. 14 143
  32998. D46 15 142 D62
  32999. D33 16 141 D49
  33000. D45 17 140 D61
  33001. D34 18 139 D50
  33002. D44 19 138 D60
  33003. D35 20 137 D51
  33004. 21 QFP208 136
  33005. 22 135
  33006.  
  33007.  
  33008. D43 23 134 D59
  33009. D36 24 Top view 133 D52
  33010. D42 25 132 D58
  33011. D37 26 131 D53
  33012. D41 27 130 D57
  33013. D38 28 129 D54
  33014. D40 29 128 D56
  33015. D39 30 127 D55
  33016. 31 126
  33017.  
  33018.  
  33019.  
  33020. 32 125
  33021.  
  33022.  
  33023.  
  33024. D15 33 124 D31
  33025. D0 34 123 D16
  33026. D14 35 122 D30
  33027. D1 36 121 D17
  33028. D13 37 120 D29
  33029. D2 38 119 D18
  33030. 39 VDD (internal, 1.8 V) 118
  33031. 40 117
  33032. D12 41 116 D28
  33033. D3 42 VSS (internal, 0 V) 115 D19
  33034. 43 114
  33035. 44 113
  33036. VDDQ (IO, 3.3 V)
  33037. D11 45 112 D27
  33038. D4 46 111 D20
  33039. D10 47 VSSQ (IO, 0 V) 110 D26
  33040. D5 48 109 D21
  33041. D9 49 108 D25
  33042. D6 50 107
  33043. / 51 106
  33044. / 52 105 RXD
  33045. 0 1 2 3 4
  33046. 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
  33047. 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
  33048.  
  33049.  
  33050.  
  33051. 8 7 5 4 1 0 6
  33052. E 7 6 5 4 3 2 1 0 9 8 7 O 6 5 4 3 2 1 0 3 4 2
  33053. 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
  33054. C Q Q Q Q A A A A A A A A K A A / Q D D D
  33055. D D D D C R R D D /
  33056. 7
  33057. / / / / D D R /
  33058.  
  33059. / / M
  33060. 2 /
  33061. 3 Q
  33062. M M D
  33063. Q /
  33064. / / / / Q /
  33065. / D D
  33066. /
  33067. /
  33068.  
  33069.  
  33070. /
  33071.  
  33072.  
  33073. /
  33074. /
  33075.  
  33076.  
  33077.  
  33078.  
  33079. Note: Power must be supplied to the on-chip PLL power supply pins (VDD-PLL1, VDD-PLL2, VSS-PLL1, VSS-PLL2,
  33080. VDD-CPG, VSS-CPG, VDD-RTC, and VSS-RTC) regardless of whether or not the PLL circuits, crystal resonator,
  33081. and RTC are used.
  33082.  
  33083. Figure 22.2 Pin Arrangement (208-Pin QFP)
  33084.  
  33085. 670
  33086.  
  33087. ----------------------- Page 687-----------------------
  33088.  
  33089. 22.2 Pin Functions
  33090.  
  33091. 22.2.1 Pin Functions (256-Pin BGA)
  33092.  
  33093. Table 22.1 Pin Functions
  33094.  
  33095. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33096.  
  33097. SRAM DRAM SDRAM PCMCIAMPX
  33098.  
  33099. 1 B2 I Bus ready
  33100.  
  33101. 2 B1 I Reset
  33102.  
  33103. 3 C2 O Chip select 0
  33104.  
  33105. 4 C1 O Chip select 1
  33106.  
  33107. 5 D4 O Chip select 4
  33108.  
  33109. 6 D3 O Chip select 5
  33110.  
  33111. 7 D2 O Chip select 6
  33112.  
  33113. 8 D1 O Bust start ( ) ( ) ( ) ( ) ( )
  33114.  
  33115. 9 E4 VSSQ Power IO GND (0 V)
  33116.  
  33117. 10 E3 O = / /
  33118.  
  33119.  
  33120. 11 F3 VDDQ Power IO VDD (3.3 V)
  33121.  
  33122. 12 F4 VSSQ Power IO GND (0 V)
  33123.  
  33124. 13 E2 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33125.  
  33126. 14 E1 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33127.  
  33128. 15 G3 VDD Power Internal VDD (1.8
  33129. V)
  33130.  
  33131. 16 G4 VSS Power Internal GND (0 V)
  33132.  
  33133. 17 F2 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33134.  
  33135. 18 F1 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33136.  
  33137. 19 H3 VDDQ Power IO VDD (3.3 V)
  33138.  
  33139. 20 H4 VSSQ Power IO GND (0 V)
  33140.  
  33141. 21 G2 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33142.  
  33143. 22 G1 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33144.  
  33145. 23 H2 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33146.  
  33147. 24 H1 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33148.  
  33149. 25 J3 VDDQ Power IO VDD (3.3 V)
  33150.  
  33151. 26 J4 VSSQ Power IO GND (0 V)
  33152.  
  33153. 27 J2 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33154.  
  33155. 28 J1 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33156.  
  33157. 671
  33158.  
  33159. ----------------------- Page 688-----------------------
  33160.  
  33161. Table 22.1 Pin Functions (cont)
  33162.  
  33163. No. Pin Pin Name I / O Function Reset Memory Interface
  33164. No.
  33165.  
  33166. SRAM DRAM SDRAM PCMCIA MPX
  33167.  
  33168. 29 K2 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33169.  
  33170. 30 K1 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33171.  
  33172. 31 K3 VDDQ Power IO VDD (3.3 V)
  33173.  
  33174. 32 K4 VSSQ Power IO GND (0 V)
  33175.  
  33176. 33 L1 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33177.  
  33178. 34 L2 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33179.  
  33180. 35 M1 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33181.  
  33182. 36 M2 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33183.  
  33184. 37 L3 VDDQ Power IO VDD (3.3 V)
  33185.  
  33186. 38 L4 VSSQ Power IO GND (0 V)
  33187.  
  33188. 39 N1 D15 I/O Data A15
  33189.  
  33190. 40 N2 D0 I/O Data A0
  33191.  
  33192. 41 P1 D14 I/O Data A14
  33193.  
  33194. 42 P2 D1 I/O Data A1
  33195.  
  33196. 43 M3 VDDQ Power IO VDD (3.3 V)
  33197.  
  33198. 44 M4 VSSQ Power IO GND (0 V)
  33199.  
  33200. 45 R1 D13 I/O Data A13
  33201.  
  33202. 46 R2 D2 I/O Data A2
  33203.  
  33204. 47 P3 VDD Power Internal VDD
  33205. (1.8 V)
  33206.  
  33207. 48 P4 VSS Power Internal GND
  33208. (0 V)
  33209.  
  33210. 49 T1 D12 I/O Data A12
  33211.  
  33212. 50 T2 D3 I/O Data A3
  33213.  
  33214. 51 R3 VDDQ Power IO VDD (3.3 V)
  33215.  
  33216. 52 R4 VSSQ Power IO GND (0 V)
  33217.  
  33218. 53 U1 D11 I/O Data A11
  33219.  
  33220. 54 U2 D4 I/O Data A4
  33221.  
  33222. 55 V1 D10 I/O Data A10
  33223.  
  33224. 56 V2 D5 I/O Data A5
  33225.  
  33226. 57 T3 VDDQ Power IO VDD (3.3 V)
  33227.  
  33228. 58 T4 VSSQ Power IO GND (0 V)
  33229.  
  33230. 59 W1 D9 I/O Data A9
  33231.  
  33232. 60 Y1 D6 I/O Data A6
  33233.  
  33234. 672
  33235.  
  33236. ----------------------- Page 689-----------------------
  33237.  
  33238. Table 22.1 Pin Functions (cont)
  33239.  
  33240. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33241.  
  33242. SRAM DRAM SDRAM PCMCIAMPX
  33243.  
  33244. 61 U3 / O Bus
  33245. acknowledge/
  33246. bus request
  33247.  
  33248. 62 V3 / I Bus
  33249. request/bus
  33250. acknowledge
  33251.  
  33252. 63 W2 D8 I/O Data A8
  33253.  
  33254. 64 Y2 D7 I/O Data A7
  33255.  
  33256. 65 W3 CKE O Clock output CKE
  33257. enable
  33258.  
  33259. 66 V5 VDDQ Power IO VDD (3.3 V)
  33260.  
  33261. 67 U5 VSSQ Power IO GND (0 V)
  33262.  
  33263. 68 Y3 / / O D47–D40 DQM5
  33264. DQM5 select signal
  33265.  
  33266. 69 W4 / / O D39–D32 DQM4
  33267. DQM4 select signal
  33268.  
  33269. 70 Y4 / / O D15–D8 select DQM1
  33270. DQM1 signal
  33271.  
  33272. 71 W5 / / O D7–D0 select DQM0
  33273. DQM0 signal
  33274.  
  33275. 72 Y5 A17 O Address
  33276.  
  33277. 73 V6 VDDQ Power IO VDD (3.3 V)
  33278.  
  33279. 74 U6 VSSQ Power IO GND (0 V)
  33280.  
  33281. 75 W6 A16 O Address
  33282.  
  33283. 76 Y6 A15 O Address
  33284.  
  33285. 77 V7 VDD Power Internal VDD
  33286. (1.8 V)
  33287.  
  33288. 78 U7 VSS Power Internal GND
  33289. (0 V)
  33290.  
  33291. 79 W7 A14 O Address
  33292.  
  33293. 80 Y7 A13 O Address
  33294.  
  33295. 81 V8 VDDQ Power IO VDD (3.3 V)
  33296.  
  33297. 82 U8 VSSQ Power IO GND (0 V)
  33298.  
  33299. 83 V4 NC
  33300.  
  33301. 84 W8 A12 O Address
  33302.  
  33303. 85 Y8 A11 O Address
  33304.  
  33305. 86 W9 A10 O Address
  33306.  
  33307. 673
  33308.  
  33309. ----------------------- Page 690-----------------------
  33310.  
  33311. Table 22.1 Pin Functions (cont)
  33312.  
  33313. No. Pin No. Pin Name I / O Function Reset Memory Interface
  33314.  
  33315. SRAM DRAM SDRAM PCMCIAMPX
  33316.  
  33317. 87 V9 VDDQ Power IO VDD (3.3 V)
  33318.  
  33319. 88 U9 VSSQ Power IO GND (0 V)
  33320.  
  33321. 89 Y9 A9 O Address
  33322.  
  33323. 90 W10 A8 O Address
  33324.  
  33325. 91 Y10 A7 O Address
  33326.  
  33327. 92 Y11 CKIO O Clock output CKIO
  33328.  
  33329. 93 V10 VDDQ Power IO VDD (3.3 V)
  33330.  
  33331. 94 U10 VSSQ Power IO GND (0 V)
  33332.  
  33333. 95 W11 CKIO2 O = CKIO* CKIO
  33334.  
  33335. 96 Y12 A6 O Address
  33336.  
  33337. 97 W12 A5 O Address
  33338.  
  33339. 98 Y13 A4 O Address
  33340.  
  33341. 99 V11 VDDQ Power IO VDD (3.3 V)
  33342.  
  33343. 100 U11 VSSQ Power IO GND (0 V)
  33344.  
  33345. 101 W13 A3 O Address
  33346.  
  33347. 102 Y14 A2 O Address
  33348.  
  33349. 103 V12 DRAK1 O DMAC1
  33350. request
  33351. acknowledge
  33352.  
  33353. 104 U13 DRAK0 O DMAC0
  33354. request
  33355. acknowledge
  33356.  
  33357. 105 V13 VDDQ Power IO VDD (3.3 V)
  33358.  
  33359. 106 U12 VSSQ Power IO GND (0 V)
  33360.  
  33361. 107 W14 O Chip select 3 ()
  33362.  
  33363. 108 Y15 O Chip select 2 ()
  33364.  
  33365. 109 V14 VDD Power Internal VDD
  33366. (1.8 V)
  33367.  
  33368. 110 U14 VSS Power Internal GND
  33369. (0 V)
  33370.  
  33371. 111 W15 O
  33372.  
  33373. 112 Y16 / / O Read//
  33374.  
  33375.  
  33376. 113 V15 VDDQ Power IO VDD (3.3 V)
  33377.  
  33378. 114 U15 VSSQ Power IO GND (0 V)
  33379.  
  33380. Note: * CKIO2 is not connected to PLL2.
  33381.  
  33382. 674
  33383.  
  33384. ----------------------- Page 691-----------------------
  33385.  
  33386. Table 22.1 Pin Functions (cont)
  33387.  
  33388. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33389.  
  33390. SRAM DRAM SDRAMPCMCIA MPX
  33391.  
  33392. 115 W16 RD/ O Read/write RD/ RD/ RD/
  33393.  
  33394. 116 Y17 / / O D23–D16 select DQM2
  33395. DQM2/ signal
  33396.  
  33397.  
  33398. 117 W17 / / O D31–D24 select DQM3
  33399. DQM3/ signal
  33400.  
  33401.  
  33402. 118 Y18 / / O D55–D48 select DQM6
  33403. DQM6 signal
  33404.  
  33405. 119 V16 VDDQ Power IO VDD (3.3 V)
  33406.  
  33407. 120 U16 VSSQ Power IO GND (0 V)
  33408.  
  33409. 121 W18 / / O D63–D56 select DQM7
  33410. DQM7/ signal
  33411.  
  33412. 122 Y19 D23 I/O Data A23
  33413.  
  33414. 123 W19 D24 I/O Data A24
  33415.  
  33416. 124 Y20 D22 I/O Data A22
  33417.  
  33418. 125 V17 RXD I SCI data input
  33419.  
  33420. 126 U17 I Request from
  33421. DMAC0
  33422.  
  33423. 127 U18 I Request from
  33424. DMAC1
  33425.  
  33426. 128 W20 D25 I/O Data A25
  33427.  
  33428. 129 T18 VDDQ Power IO VDD (3.3 V)
  33429.  
  33430. 130 T17 VSSQ Power IO GND (0 V)
  33431.  
  33432. 131 V19 D21 I/O Data A21
  33433.  
  33434. 132 V20 D26 I/O Data
  33435.  
  33436. 133 U19 D20 I/O Data A20
  33437.  
  33438. 134 U20 D27 I/O Data
  33439.  
  33440. 135 R18 VDDQ Power IO VDD (3.3 V)
  33441.  
  33442. 136 R17 VSSQ Power IO GND (0 V)
  33443.  
  33444. 137 T19 D19 I/O Data A19
  33445.  
  33446. 138 T20 D28 I/O Data
  33447.  
  33448. 139 P18 VDD Power Internal VDD (1.8
  33449. V)
  33450.  
  33451. 140 P17 VSS Power Internal GND (0
  33452. V)
  33453.  
  33454. 141 R19 D18 I/O Data A18
  33455.  
  33456. 675
  33457.  
  33458. ----------------------- Page 692-----------------------
  33459.  
  33460. Table 22.1 Pin Functions (cont)
  33461.  
  33462. No. Pin No. Pin Name I / O Function Reset Memory Interface
  33463.  
  33464. SRAM DRAM SDRAMPCMCIA MPX
  33465.  
  33466. 142 R20 D29 I/O Data
  33467.  
  33468. 143 N18 VDDQ Power IO VDD (3.3 V)
  33469.  
  33470. 144 N17 VSSQ Power IO GND (0 V)
  33471.  
  33472. 145 P19 D17 I/O Data A17
  33473.  
  33474. 146 P20 D30 I/O Data
  33475.  
  33476. 147 N19 D16 I/O Data A16
  33477.  
  33478. 148 N20 D31 I/O Data
  33479.  
  33480. 149 M18 VDDQ Power IO VDD (3.3 V)
  33481.  
  33482. 150 M17 VSSQ Power IO GND (0 V)
  33483.  
  33484. 151 M19 D55 I/O Data
  33485.  
  33486. 152 M20 D56 I/O Data
  33487.  
  33488. 153 L19 D54 I/O Data
  33489.  
  33490. 154 L20 D57 I/O Data
  33491.  
  33492. 155 L18 VDDQ Power IO VDD (3.3 V)
  33493.  
  33494. 156 L17 VSSQ Power IO GND (0 V)
  33495.  
  33496. 157 K20 D53 I/O Data
  33497.  
  33498. 158 K19 D58 I/O Data
  33499.  
  33500. 159 J20 D52 I/O Data
  33501.  
  33502. 160 J19 D59 I/O Data
  33503.  
  33504. 161 K18 VDDQ Power IO VDD (3.3 V)
  33505.  
  33506. 162 K17 VSSQ Power IO GND (0 V)
  33507.  
  33508. 163 H20 D51 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33509.  
  33510. 164 H19 D60 I/O Data
  33511.  
  33512. 165 G20 D50 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33513.  
  33514. 166 G19 D61 I/O Data ACCSIZ
  33515. E0
  33516.  
  33517. 167 J18 VDDQ Power IO VDD (3.3 V)
  33518.  
  33519. 168 J17 VSSQ Power IO GND (0 V)
  33520.  
  33521. 169 F20 D49 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33522.  
  33523. 170 F19 D62 I/O Data ACCSIZ
  33524. E1
  33525.  
  33526. 171 G18 VDD Power Internal VDD (1.8
  33527. V)
  33528.  
  33529. 172 G17 VSS Power Internal GND (0 V)
  33530.  
  33531. 173 E20 D48 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33532.  
  33533. 676
  33534.  
  33535. ----------------------- Page 693-----------------------
  33536.  
  33537. Table 22.1 Pin Functions (cont)
  33538.  
  33539. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33540.  
  33541. SRAM DRAM SDRAM PCMCIAMPX
  33542.  
  33543. 174 E19 D63 I/O Data ACCSIZE2
  33544.  
  33545. 175 F18 VDDQ Power IO VDD (3.3 V)
  33546.  
  33547. 176 F17 VSSQ Power IO GND (0 V)
  33548.  
  33549. 177 E17 VSSQ Power IO GND (0 V)
  33550.  
  33551. 178 E18 RD/ O = RD/ RD/ RD/ RD/
  33552.  
  33553. 179 D20 MD0/SCK I/O Mode/SCI MD0 SCK SCK SCK SCK SCK
  33554. clock
  33555.  
  33556. 180 D19 MD1/TXD2 I/O Mode SCIF MD1 TXD2 TXD2 TXD2 TXD2 TXD2
  33557. data output
  33558.  
  33559. 181 D18 MD2/RXD2 I Mode/SCIF MD2 RXD2 RXD2 RXD2 RXD2 RXD2
  33560. data input
  33561.  
  33562. 182 C20 I Interrupt 0
  33563.  
  33564. 183 C19 I Interrupt 1
  33565.  
  33566. 184 B20 I Interrupt 2
  33567.  
  33568. 185 C18 I Interrupt 3
  33569.  
  33570. 186 A20 NMI I Nonmaskable
  33571. interrupt
  33572.  
  33573. 187 B19 XTAL2 O RTC crystal
  33574. resonator pin
  33575.  
  33576. 188 A19 EXTAL2 I RTC crystal
  33577. resonator pin
  33578.  
  33579. 189 B18 VSS-RTC Power RTC GND (0 V)
  33580.  
  33581. 190 A18 VDD-RTC Power RTC VDD
  33582. (3.3 V)
  33583.  
  33584. 191 D17 Reserved I Pull up to 3.3.
  33585. V
  33586.  
  33587. 192 C17 VSS Power Internal GND
  33588. (0 V)
  33589.  
  33590. 193 B17 VDDQ Power IO VDD (3.3 V)
  33591.  
  33592. 194 C16 I/O SCIF data
  33593. control (CTS)
  33594.  
  33595. 195 A17 TCLK I/O RTC/TMU
  33596. clock
  33597.  
  33598. 196 B16 MD8/ I/O Mode/SCIF MD8
  33599. data control
  33600. (RTS)
  33601.  
  33602. 197 C15 VDDQ Power IO VDD (3.3 V)
  33603.  
  33604. 677
  33605.  
  33606. ----------------------- Page 694-----------------------
  33607.  
  33608. Table 22.1 Pin Functions (cont)
  33609.  
  33610. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33611.  
  33612. SRAM DRAM SDRAM PCMCIAMPX
  33613.  
  33614. 198 D15 VSSQ Power IO GND (0 V)
  33615.  
  33616. 199 B15 MD7/TXD I/O Mode/SCI MD7 TXD TXD TXD TXD TXD
  33617. data output
  33618.  
  33619. 200 A16 SCK2/ I SCIF clock/ SCK2 SCK2 SCK2 SCK2 SCK2
  33620. manual reset
  33621.  
  33622. 201 C14 VDD Power Internal VDD
  33623. (1.8 V)
  33624.  
  33625. 202 D14 VSS Power Internal GND
  33626. (0 V)
  33627.  
  33628. 203 A15 A18 O Address
  33629.  
  33630. 204 B14 A19 O Address
  33631.  
  33632. 205 C13 VDDQ Power IO VDD (3.3 V)
  33633.  
  33634. 206 D13 VSSQ Power IO GND (0 V)
  33635.  
  33636. 207 A14 A20 O Address
  33637.  
  33638. 208 B13 A21 O Address
  33639.  
  33640. 209 A13 A22 O Address
  33641.  
  33642. 210 B12 A23 O Address
  33643.  
  33644. 211 C12 VDDQ Power IO VDD (3.3 V)
  33645.  
  33646. 212 D12 VSSQ Power IO GND (0 V)
  33647.  
  33648. 213 A12 A24 O Address
  33649.  
  33650. 214 B11 A25 O Address
  33651.  
  33652. 215 A11 MD3/ I/O Mode/ MD3
  33653. PCMCIA-CE
  33654.  
  33655. 216 A10 MD4/ I/O Mode/ MD4
  33656. PCMCIA-CE
  33657.  
  33658. 217 C11 VDDQ Power IO VDD (3.3 V)
  33659.  
  33660. 218 D11 VSSQ Power IO GND (0 V)
  33661.  
  33662. 219 B10 MD5/ I/O Mode/ MD5
  33663. (DRAM)
  33664.  
  33665. 220 A9 DACK0 O DMAC0 bus
  33666. acknowledge
  33667.  
  33668. 221 B9 DACK1 O DMAC1 bus
  33669. acknowledge
  33670.  
  33671. 222 C8 A0 O Address
  33672.  
  33673. 223 C10 VDDQ Power IO VDD (3.3 V)
  33674.  
  33675. 224 D10 VSSQ Power IO GND (0 V)
  33676.  
  33677. 678
  33678.  
  33679. ----------------------- Page 695-----------------------
  33680.  
  33681. Table 22.1 Pin Functions (cont)
  33682.  
  33683. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33684.  
  33685. SRAM DRAM SDRAM PCMCIAMPX
  33686.  
  33687. 225 D8 A1 O Address
  33688.  
  33689. 226 A8 STATUS0 O Status
  33690.  
  33691. 227 B8 STATUS1 O Status
  33692.  
  33693. 228 A7 MD6/ I Mode/ MD6
  33694. (PCMCIA)
  33695.  
  33696. 229 C9 VDDQ Power IO VDD (3.3 V)
  33697.  
  33698. 230 D9 VSSQ Power IO GND (0 V)
  33699.  
  33700. 231 B7 / I/O Pin break/
  33701. BRKACK acknowledge
  33702. (Hitachi-UDI)
  33703.  
  33704. 232 A6 TDO O Data out
  33705. (Hitachi-UDI)
  33706.  
  33707. 233 C7 VDD Power Internal VDD
  33708. (1.8 V)
  33709.  
  33710. 234 D7 VSS Power Internal GND
  33711. (0 V)
  33712.  
  33713. 235 B6 TMS I Mode
  33714. (Hitachi-UDI)
  33715.  
  33716. 236 A5 TCK I Clock
  33717. (Hitachi-UDI)
  33718.  
  33719. 237 B5 TDI I Data in
  33720. (Hitachi-UDI)
  33721.  
  33722. 238 C4 I Reset
  33723. (Hitachi-UDI)
  33724.  
  33725. 239 C3 I CKIO2, ,
  33726. RD/
  33727. enable
  33728.  
  33729. 240 C6 NC
  33730.  
  33731. 241 A4 VDD-PLL2 Power PLL2 VDD
  33732. (3.3V)
  33733.  
  33734. 242 D6 VSS-PLL2 Power PLL2 GND (0V)
  33735.  
  33736. 243 B4 VDD-PLL1 Power PLL1 VDD
  33737. (3.3V)
  33738.  
  33739. 244 D5 VSS-PLL1 Power PLL1 GND (0V)
  33740.  
  33741. 245 A3 VDD-CPG Power CPG VDD
  33742. (3.3V)
  33743.  
  33744. 246 B3 VSS-CPG Power CPG GND (0V)
  33745.  
  33746. 247 A2 XTAL O Crystal
  33747. resonator
  33748.  
  33749. 679
  33750.  
  33751. ----------------------- Page 696-----------------------
  33752.  
  33753. Table 22.1 Pin Functions (cont)
  33754.  
  33755. No. Pin No.Pin Name I / O Function Reset Memory Interface
  33756.  
  33757. SRAM DRAM SDRAM PCMCIAMPX
  33758.  
  33759. 248 A1 EXTAL I External input
  33760. clock/crystal
  33761. resonator
  33762.  
  33763. 249 C5 NC
  33764.  
  33765. 250 D16 NC
  33766.  
  33767. 251 H17 NC
  33768.  
  33769. 252 H18 NC
  33770.  
  33771. 253 N3 NC
  33772.  
  33773. 254 N4 NC
  33774.  
  33775. 255 U4 NC
  33776.  
  33777. 256 V18 NC
  33778.  
  33779. I: Input
  33780. O: Output
  33781. I/O: Input/output
  33782. Power: Power supply
  33783. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  33784. system power supply, and power must be supplied continuously. Even if only the RTC is
  33785. operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD, and
  33786. VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  33787. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  33788. the on-chip PLL circuits are used.
  33789. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the on-
  33790. chip crystal resonator is used.
  33791. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the on-
  33792. chip RTC is used.
  33793. 5. VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are connected inside the package.
  33794.  
  33795. 680
  33796.  
  33797. ----------------------- Page 697-----------------------
  33798.  
  33799. 22.2.2 Pin Functions (208-Pin QFP)
  33800.  
  33801. Table 22.2 Pin Functions
  33802.  
  33803. Pin No. Pin Name I / O Function Reset Memory Interface
  33804.  
  33805. SRAM DRAM SDRAM PCMCIA MPX
  33806.  
  33807. 1 I Bus ready
  33808.  
  33809. 2 I Reset
  33810.  
  33811. 3 O Chip select 0
  33812.  
  33813. 4 O Chip select 1
  33814.  
  33815. 5 O Chip select 4
  33816.  
  33817. 6 O Chip select 5
  33818.  
  33819. 7 O Chip select 6
  33820.  
  33821. 8 O Bust start ( ) ( ) ( ) ( ) ( )
  33822.  
  33823. 9 VDDQ Power IO VDD (3.3 V)
  33824.  
  33825. 10 VSSQ Power IO GND (0 V)
  33826.  
  33827. 11 D47 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33828.  
  33829. 12 D32 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33830.  
  33831. 13 VDD Power Internal VDD
  33832. (1.8 V)
  33833.  
  33834. 14 VSS Power Internal GND
  33835. (0 V)
  33836.  
  33837. 15 D46 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33838.  
  33839. 16 D33 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33840.  
  33841. 17 D45 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33842.  
  33843. 18 D34 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33844.  
  33845. 19 D44 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33846.  
  33847. 20 D35 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33848.  
  33849. 21 VDDQ Power IO VDD (3.3 V)
  33850.  
  33851. 22 VSSQ Power IO GND (0 V)
  33852.  
  33853. 23 D43 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33854.  
  33855. 24 D36 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33856.  
  33857. 25 D42 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33858.  
  33859. 26 D37 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33860.  
  33861. 27 D41 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33862.  
  33863. 28 D38 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33864.  
  33865. 29 D40 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33866.  
  33867. 30 D39 I/O Data/port (Port) (Port) (Port) (Port) (Port)
  33868.  
  33869. 681
  33870.  
  33871. ----------------------- Page 698-----------------------
  33872.  
  33873. Table 22.2 Pin Functions (cont)
  33874.  
  33875. Pin No. Pin Name I / O Function Reset Memory Interface
  33876.  
  33877. SRAM DRAM SDRAM PCMCIA MPX
  33878.  
  33879. 31 VDDQ Power IO VDD (3.3 V)
  33880.  
  33881. 32 VSSQ Power IO GND (0 V)
  33882.  
  33883. 33 D15 I/O Data A15
  33884.  
  33885. 34 D0 I/O Data A0
  33886.  
  33887. 35 D14 I/O Data A14
  33888.  
  33889. 36 D1 I/O Data A1
  33890.  
  33891. 37 D13 I/O Data A13
  33892.  
  33893. 38 D2 I/O Data A2
  33894.  
  33895. 39 VDD Power Internal VDD
  33896. (1.8 V)
  33897.  
  33898. 40 VSS Power Internal GND
  33899. (0 V)
  33900.  
  33901. 41 D12 I/O Data A12
  33902.  
  33903. 42 D3 I/O Data A3
  33904.  
  33905. 43 VDDQ Power IO VDD (3.3 V)
  33906.  
  33907. 44 VSSQ Power IO GND (0 V)
  33908.  
  33909. 45 D11 I/O Data A11
  33910.  
  33911. 46 D4 I/O Data A4
  33912.  
  33913. 47 D10 I/O Data A10
  33914.  
  33915. 48 D5 I/O Data A5
  33916.  
  33917. 49 D9 I/O Data A9
  33918.  
  33919. 50 D6 I/O Data A6
  33920.  
  33921. 51 / O Bus
  33922. acknowledge/
  33923. bus request
  33924.  
  33925. 52 / I Bus request/bus
  33926. acknowledge
  33927.  
  33928. 53 D8 I/O Data A8
  33929.  
  33930. 54 D7 I/O Data A7
  33931.  
  33932. 55 CKE O Clock output CKE
  33933. enable
  33934.  
  33935. 56 VDDQ Power IO VDD (3.3 V)
  33936.  
  33937. 57 VSSQ Power IO GND (0 V)
  33938.  
  33939. 58 / / O D47–D40 select DQM5
  33940. DQM5 signal
  33941.  
  33942. 682
  33943.  
  33944. ----------------------- Page 699-----------------------
  33945.  
  33946. Table 22.2 Pin Functions (cont)
  33947.  
  33948. Pin No. Pin Name I / O Function Reset Memory Interface
  33949.  
  33950. SRAM DRAM SDRAM PCMCIA MPX
  33951.  
  33952. 59 / / O D39–D32 select DQM4
  33953. DQM4 signal
  33954.  
  33955. 60 / / O D15–D8 select DQM1
  33956. DQM1 signal
  33957.  
  33958. 61 / / O D7–D0 select signal DQM0
  33959. DQM0
  33960.  
  33961. 62 A17 O Address
  33962.  
  33963. 63 A16 O Address
  33964.  
  33965. 64 A15 O Address
  33966.  
  33967. 65 VDD Power Internal VDD (1.8
  33968. V)
  33969.  
  33970. 66 VSS Power Internal GND
  33971. (0 V)
  33972.  
  33973. 67 A14 O Address
  33974.  
  33975. 68 A13 O Address
  33976.  
  33977. 69 VDDQ Power IO VDD (3.3 V)
  33978.  
  33979. 70 VSSQ Power IO GND (0 V)
  33980.  
  33981. 71 A12 O Address
  33982.  
  33983. 72 A11 O Address
  33984.  
  33985. 73 A10 O Address
  33986.  
  33987. 74 A9 O Address
  33988.  
  33989. 75 A8 O Address
  33990.  
  33991. 76 A7 O Address
  33992.  
  33993. 77 CKIO O Clock output CKIO
  33994.  
  33995. 78 VDDQ Power IO VDD (3.3 V)
  33996.  
  33997. 79 VSSQ Power IO GND (0 V)
  33998.  
  33999. 80 A6 O Address
  34000.  
  34001. 81 A5 O Address
  34002.  
  34003. 82 A4 O Address
  34004.  
  34005. 83 A3 O Address
  34006.  
  34007. 84 A2 O Address
  34008.  
  34009. 85 DRAK1 O DMAC1 request
  34010. acknowledge
  34011.  
  34012. 86 DRAK0 O DMAC0 request
  34013. acknowledge
  34014.  
  34015. 87 VDDQ Power IO VDD (3.3 V)
  34016.  
  34017. 683
  34018.  
  34019. ----------------------- Page 700-----------------------
  34020.  
  34021. Table 22.2 Pin Functions (cont)
  34022.  
  34023. Pin No. Pin Name I / O Function Reset Memory Interface
  34024.  
  34025. SRAM DRAM SDRAMPCMCIA MPX
  34026.  
  34027. 88 VSSQ Power IO GND (0 V)
  34028.  
  34029. 89 O Chip select 3 ()
  34030.  
  34031. 90 O Chip select 2 ()
  34032.  
  34033. 91 VDD Power Internal VDD
  34034. (1.8 V)
  34035.  
  34036. 92 VSS Power Internal GND
  34037. (0 V)
  34038.  
  34039. 93 O
  34040.  
  34041. 94 / / O Read//
  34042.  
  34043.  
  34044. 95 RD/ O Read/write RD/ RD/ RD/
  34045.  
  34046. 96 / / O D23–D16 select DQM2
  34047. DQM2/ signal
  34048.  
  34049.  
  34050. 97 / / O D31–D24 select DQM3
  34051. DQM3/ signal
  34052.  
  34053.  
  34054. 98 / / O D55–D48 select DQM6
  34055. DQM6 signal
  34056.  
  34057. 99 VDDQ Power IO VDD (3.3 V)
  34058.  
  34059. 100 VSSQ Power IO GND (0 V)
  34060.  
  34061. 101 / / O D63–D56 select DQM7
  34062. DQM7/ signal
  34063.  
  34064. 102 D23 I/O Data A23
  34065.  
  34066. 103 D24 I/O Data A24
  34067.  
  34068. 104 D22 I/O Data A22
  34069.  
  34070. 105 RXD I SCI data input
  34071.  
  34072. 106 I Request from
  34073. DMAC0
  34074.  
  34075. 107 I Request from
  34076. DMAC1
  34077.  
  34078. 108 D25 I/O Data A25
  34079.  
  34080. 109 D21 I/O Data A21
  34081.  
  34082. 110 D26 I/O Data
  34083.  
  34084. 111 D20 I/O Data A20
  34085.  
  34086. 112 D27 I/O Data
  34087.  
  34088. 113 VDDQ Power IO VDD (3.3 V)
  34089.  
  34090. 684
  34091.  
  34092. ----------------------- Page 701-----------------------
  34093.  
  34094. Table 22.2 Pin Functions (cont)
  34095.  
  34096. Pin No. Pin Name I / O Function Reset Memory Interface
  34097.  
  34098. SRAM DRAM SDRAM PCMCIA MPX
  34099.  
  34100. 114 VSSQ Power IO GND (0 V)
  34101.  
  34102. 115 D19 I/O Data A19
  34103.  
  34104. 116 D28 I/O Data
  34105.  
  34106. 117 VDD Power Internal VDD
  34107. (1.8 V)
  34108.  
  34109. 118 VSS Power Internal GND
  34110. (0 V)
  34111.  
  34112. 119 D18 I/O Data A18
  34113.  
  34114. 120 D29 I/O Data
  34115.  
  34116. 121 D17 I/O Data A17
  34117.  
  34118. 122 D30 I/O Data
  34119.  
  34120. 123 D16 I/O Data A16
  34121.  
  34122. 124 D31 I/O Data
  34123.  
  34124. 125 VDDQ Power IO VDD (3.3 V)
  34125.  
  34126. 126 VSSQ Power IO GND (0 V)
  34127.  
  34128. 127 D55 I/O Data
  34129.  
  34130. 128 D56 I/O Data
  34131.  
  34132. 129 D54 I/O Data
  34133.  
  34134. 130 D57 I/O Data
  34135.  
  34136. 131 D53 I/O Data
  34137.  
  34138. 132 D58 I/O Data
  34139.  
  34140. 133 D52 I/O Data
  34141.  
  34142. 134 D59 I/O Data
  34143.  
  34144. 135 VDDQ Power IO VDD (3.3 V)
  34145.  
  34146. 136 VSSQ Power IO GND (0 V)
  34147.  
  34148. 137 D51 I/O Data
  34149.  
  34150. 138 D60 I/O Data
  34151.  
  34152. 139 D50 I/O Data
  34153.  
  34154. 140 D61 I/O Data ACCSIZE0
  34155.  
  34156. 141 D49 I/O Data
  34157.  
  34158. 142 D62 I/O Data ACCSIZE1
  34159.  
  34160. 143 VDD Power Internal VDD (1.8
  34161. V)
  34162.  
  34163. 144 VSS Power Internal GND (0
  34164. V)
  34165.  
  34166. 685
  34167.  
  34168. ----------------------- Page 702-----------------------
  34169.  
  34170. Table 22.2 Pin Functions (cont)
  34171.  
  34172. Pin No. Pin Name I / O Function Reset Memory Interface
  34173.  
  34174. SRAM DRAM SDRAM PCMCIAMPX
  34175.  
  34176. 145 D48 I/O Data
  34177.  
  34178. 146 D63 I/O Data ACCSIZE2
  34179.  
  34180. 147 VDDQ Power IO VDD (3.3 V)
  34181.  
  34182. 148 VSSQ Power IO GND (0 V)
  34183.  
  34184. 149 MD0/SCK I/O Mode/SCI clock MD0 SCK SCK SCK SCK SCK
  34185.  
  34186. 150 MD1/TXD2 I/O Mode SCIF data MD1 TXD2 TXD2 TXD2 TXD2 TXD2
  34187. output
  34188.  
  34189. 151 MD2/RXD2 I Mode/SCIF data MD2 RXD2 RXD2 RXD2 RXD2 RXD2
  34190. input
  34191.  
  34192. 152 I Interrupt 0
  34193.  
  34194. 153 I Interrupt 1
  34195.  
  34196. 154 I Interrupt 2
  34197.  
  34198. 155 I Interrupt 3
  34199.  
  34200. 156 NMI I Nonmaskable
  34201. interrupt
  34202.  
  34203. 157 XTAL2 O RTC crystal
  34204. resonator pin
  34205.  
  34206. 158 EXTAL2 I RTC crystal
  34207. resonator pin
  34208.  
  34209. 159 VSS-RTC Power RTC GND
  34210. (0 V)
  34211.  
  34212. 160 VDD-RTC Power RTC VDD
  34213. (3.3 V)
  34214.  
  34215. 161 Reserved I Pull up to
  34216. 3.3. V
  34217.  
  34218. 162 VSS Power Internal GND
  34219. (0 V)
  34220.  
  34221. 163 VDDQ Power IO VDD (3.3 V)
  34222.  
  34223. 164 I/O SCIF data control
  34224. (CTS)
  34225.  
  34226. 165 TCLK I/O RTC/TMU
  34227. clock
  34228.  
  34229. 166 MD8/ I/O Mode/SCIF data MD8
  34230. control (RTS)
  34231.  
  34232. 167 MD7/TXD I/O Mode/SCI data MD7 TXD TXD TXD TXD TXD
  34233. output
  34234.  
  34235. 168 SCK2/ I SCIF clock/ SCK2 SCK2 SCK2 SCK2 SCK2
  34236. manual reset
  34237.  
  34238. 686
  34239.  
  34240. ----------------------- Page 703-----------------------
  34241.  
  34242. Table 22.2 Pin Functions (cont)
  34243.  
  34244. Pin No. Pin Name I / O Function Reset Memory Interface
  34245.  
  34246. SRAM DRAM SDRAMPCMCIA MPX
  34247.  
  34248. 169 VDD Power Internal VDD
  34249. (1.8 V)
  34250.  
  34251. 170 VSS Power Internal GND
  34252. (0 V)
  34253.  
  34254. 171 A18 O Address
  34255.  
  34256. 172 A19 O Address
  34257.  
  34258. 173 A20 O Address
  34259.  
  34260. 174 A21 O Address
  34261.  
  34262. 175 A22 O Address
  34263.  
  34264. 176 A23 O Address
  34265.  
  34266. 177 VDDQ Power IO VDD (3.3 V)
  34267.  
  34268. 178 VSSQ Power IO GND (0 V)
  34269.  
  34270. 179 A24 O Address
  34271.  
  34272. 180 A25 O Address
  34273.  
  34274. 181 MD3/ I/O Mode/ MD3
  34275. PCMCIA-CE
  34276.  
  34277. 182 MD4/ I/O Mode/ MD4
  34278. PCMCIA-CE
  34279.  
  34280. 183 MD5/ I/O Mode/ (DRAM) MD5
  34281.  
  34282. 184 DACK0 O DMAC0 bus
  34283. acknowledge
  34284.  
  34285. 185 DACK1 O DMAC1 bus
  34286. acknowledge
  34287.  
  34288. 186 A0 O Address
  34289.  
  34290. 187 VDDQ Power IO VDD (3.3 V)
  34291.  
  34292. 188 VSSQ Power IO GND (0 V)
  34293.  
  34294. 189 A1 O Address
  34295.  
  34296. 190 STATUS0 O Status
  34297.  
  34298. 191 STATUS1 O Status
  34299.  
  34300. 192 MD6/ I Mode/ MD6
  34301. (PCMCIA)
  34302.  
  34303. 193 / I/O Pin break/
  34304. BRKACK acknowledge
  34305. (Hitachi-UDI )
  34306.  
  34307. 194 TDO O Data out
  34308. (Hitachi-UDI)
  34309.  
  34310. 687
  34311.  
  34312. ----------------------- Page 704-----------------------
  34313.  
  34314. Table 22.2 Pin Functions (cont)
  34315.  
  34316. Pin No. Pin Name I / O Function Reset Memory Interface
  34317.  
  34318. SRAM DRAM SDRAMPCMCIA MPX
  34319.  
  34320. 195 VDD Power Internal VDD
  34321. (1.8 V)
  34322.  
  34323. 196 VSS Power Internal GND (0 V)
  34324.  
  34325. 197 TMS I Mode
  34326. (Hitachi-UDI)
  34327.  
  34328. 198 TCK I Clock
  34329. (Hitachi-UDI)
  34330.  
  34331. 199 TDI I Data in
  34332. (Hitachi-UDI)
  34333.  
  34334. 200 I Reset
  34335. (Hitachi-UDI)
  34336.  
  34337. 201 VDD-PLL2 Power PLL2 VDD (3.3V)
  34338.  
  34339. 202 VSS-PLL2 Power PLL2 GND (0V)
  34340.  
  34341. 203 VDD-PLL1 Power PLL1 VDD (3.3V)
  34342.  
  34343. 204 VSS-PLL1 Power PLL1 GND (0V)
  34344.  
  34345. 205 VDD-CPG Power CPG VDD (3.3V)
  34346.  
  34347. 206 VSS-CPG Power CPG GND (0V)
  34348.  
  34349. 207 XTAL O Crystal resonator
  34350.  
  34351. 208 EXTAL I External input
  34352. clock/crystal
  34353. resonator
  34354.  
  34355. I: Input
  34356. O: Output
  34357. I/O: Input/output
  34358. Power: Power supply
  34359. Notes: 1. The VDDQ (3.3. V), VSSQ, VDD (1.8 V), and VSS pins must all be connected to the
  34360. system power supply, and power must be supplied continuously. Even if only the RTC is
  34361. operating (in standby mode), power must be supplied to all VDDQ, VSSQ, VDD, and
  34362. VSS pins, in the same way as for VDD-RTC and VSS-RTC.
  34363. 2. Power must be supplied to VDD-PLL1/2 and VSS-PLL1/2 regardless of whether or not
  34364. the on-chip PLL circuits are used.
  34365. 3. Power must be supplied to VDD-CPG and VSS-CPG regardless of whether or not the on-
  34366. chip crystal resonator is used.
  34367. 4. Power must be supplied to VDD-RTC and VSS-RTC regardless of whether or not the on-
  34368. chip RTC is used.
  34369. 5. With the QFP package, VSSQ, VSS, VSS-RTC, VSS-PLL1/2, and VSS-CPG are not
  34370. connected inside the package.
  34371. 6. The , RD/ , CKIO2, and pins are not provided on the QFP package.
  34372. 7. With the QFP package, the maximum external bus operating frequency is 83 MHz.
  34373.  
  34374. 688
  34375.  
  34376. ----------------------- Page 705-----------------------
  34377.  
  34378. Section 23 Electrical Characteristics
  34379.  
  34380. 23.1 Absolute Maximum Ratings
  34381.  
  34382. Table 23.1 Absolute Maximum Ratings
  34383.  
  34384. Item Symbol Value Unit
  34385.  
  34386. I/O, PLL, RTC power supply voltage VDDQ –0.3 to 4.2 V
  34387. VDD-PLL1/2 ,
  34388. V
  34389. DD-RTC ,
  34390. V
  34391. DD-CPG
  34392.  
  34393. Internal power supply voltage VDD –0.3 to 2.5 V
  34394.  
  34395. Input voltage Vin –0.3 to VDDQ + 0.3 V
  34396.  
  34397. Operating temperature Topr –20 to 75 °C
  34398.  
  34399. Storage temperature Tstg –55 to 125 °C
  34400.  
  34401. Note: Permanent damage to the chip may result if the maximum ratings are exceeded.
  34402. VDD (1.8 V) should be input after input of VDDQ, VDD-PLL1/2 , VDD-RTC , and VDD-CPG (3.3 V).
  34403.  
  34404. 689
  34405.  
  34406. ----------------------- Page 706-----------------------
  34407.  
  34408. 23.2 DC Characteristics
  34409.  
  34410. Table 23.2 DC Characteristics (Ta = –20 to +75°C)
  34411.  
  34412. Item Symbol Min Typ Max Unit Test Conditions
  34413.  
  34414. Power supply voltage VDDQ 3.0 3.3 3.6 V Normal mode, sleep
  34415. VDD-PLL1/2 mode, standby mode
  34416. V
  34417. DD-CPG
  34418.  
  34419. V
  34420. DD-RTC
  34421.  
  34422. VDD 1.6 1.8 2.0 Normal mode, sleep
  34423. mode, standby mode
  34424.  
  34425. Current dissipation Normal operation IDD — 840 — mA VDDQ, VDD-PLL1/2 , VDD-RTC ,
  34426. V = 3.3 V
  34427. DD-CPG
  34428.  
  34429. V = 1.8 V
  34430. DD
  34431. 1
  34432. * f = 200 Mhz
  34433.  
  34434. 2
  34435. * f = 100 Mhz
  34436.  
  34437. 3
  34438. * f = 50 MHz
  34439.  
  34440. — 420 —
  34441.  
  34442. — 210 —
  34443.  
  34444. Sleep mode — 150* 1 —
  34445.  
  34446. — 80*2 —
  34447.  
  34448. — 40*3 —
  34449.  
  34450. Standby mode — TBD — µA Ta = 25 ° C (RTC on)
  34451.  
  34452. — TBD — Ta > 50 ° C (RTC on)
  34453.  
  34454. — TBD — Ta = 25 ° C (RTC off)
  34455.  
  34456. — TBD — Ta > 50 ° C (RTC off)
  34457.  
  34458. Current dissipation Normal operation IDDQ — 160* 1 — mA VDDQ, VDD-PLL1/2 , VDD-RTC ,
  34459.  
  34460. V = 3.3 V
  34461. DD-CPG
  34462.  
  34463. V = 1.8 V
  34464. DD
  34465. * 1 f = 200 MHz,
  34466.  
  34467. t = 100 Mhz
  34468. cyc
  34469. * 2 f = 100 MHz,
  34470.  
  34471. t = 50 Mhz
  34472. cyc
  34473. * 3 f = 50 MHz,
  34474.  
  34475. t = 25 MHz
  34476. cyc
  34477.  
  34478. — 80*2 —
  34479.  
  34480. — 40*3 —
  34481.  
  34482. Sleep mode — 40*1 —
  34483.  
  34484. — 20*2 —
  34485.  
  34486. — 10*3 —
  34487.  
  34488. Standby mode — TBD — µA Ta = 25 ° C (RTC on)
  34489.  
  34490. 690
  34491.  
  34492. ----------------------- Page 707-----------------------
  34493.  
  34494. — TBD — Ta > 50 ° C (RTC on)
  34495.  
  34496. — TBD — Ta = 25 ° C (RTC off)
  34497.  
  34498. — TBD — Ta > 50 ° C (RTC off)
  34499.  
  34500. Table 23.2 DC Characteristics (cont) (Ta = –20 to +75°C)
  34501.  
  34502. Item SymbolMin Typ Max Unit Test Conditions
  34503.  
  34504. Input voltage , VIH VDDQ × — VDDQ + V
  34505. NMI, , / 0.9 0.3
  34506. BRKACK
  34507.  
  34508. Other input pins 2.0 — VDDQ +
  34509. 0.3
  34510.  
  34511. , VIL –0.3 — VDDQ ×
  34512. NMI, , / 0.1
  34513. BRKACK
  34514.  
  34515. Other input pins –0.3 — VDDQ ×
  34516. 0.2
  34517.  
  34518. Output voltage All output pins VOH 2.4 — — V
  34519.  
  34520. V — — 0.55
  34521. OL
  34522.  
  34523. Pull-up resistance Port pins Rpull 20 60 180 kΩ
  34524.  
  34525. Pin capacitance All pins CL — — 10 pF
  34526.  
  34527. Notes: 1. Connect VDD-PLL1/2 , VDD-RTC , and VDD-CPG to VDDQ, and VSS-CPG , VSS-PLL1/2 , and VSSQ-RTC to GND,
  34528. regardless of whether or not the PLL circuits and RTC are used.
  34529. 2. The current dissipation values are for V min = V – 0.5 V and V max = 0.5 V with all
  34530. IH DDQ IL
  34531.  
  34532. output pins unloaded.
  34533. 3. To reduce the leakage current in standby mode, the RTC must be turned on.
  34534. 4. IDDQ is the sum of the VDDQ, VDD-PLL1/2 , VDD-RTC , and VDD-CPG 3.3 V system currents.
  34535.  
  34536. Table 23.3 Permissible Output Currents (Ta = –20 to +75°C)
  34537.  
  34538. Item Symbol Min Typ Ma x Unit
  34539.  
  34540. Permissible output low current IOL — — 2 mA
  34541. (per pin)
  34542.  
  34543. Permissible output low current Σ IOL — — 120
  34544. (total)
  34545.  
  34546. Permissible output high current –IOH — — 2
  34547. (per pin)
  34548.  
  34549. Permissible output high current Σ(–IOH ) — — 40
  34550. (total)
  34551.  
  34552. Note: To protect chip reliability, do not exceed the output current values in table 23.3.
  34553.  
  34554. 691
  34555.  
  34556. ----------------------- Page 708-----------------------
  34557.  
  34558. 23.3 AC Characteristics
  34559.  
  34560. In principle, SH7750 input should be synchronous. Unless specified otherwise, ensure that the
  34561. setup time and hold times for each input signal are observed.
  34562.  
  34563. Table 23.4 Clock Timing
  34564.  
  34565. Item Symbol Min Typ M ax Unit Notes
  34566.  
  34567. Operating CPU, FPU, cache, TLB f 1 — 200 MHz
  34568. frequency
  34569.  
  34570. External bus 1 — 100
  34571.  
  34572. Peripheral modules 1 — 50
  34573.  
  34574. 692
  34575.  
  34576. ----------------------- Page 709-----------------------
  34577.  
  34578. 23.3.1 Clock and Control Signal Timing
  34579.  
  34580. Table 23.5 Clock and Control Signal Timing (V = 3.0 to 3.6 V, V = typ. 1.8 V, T =
  34581. DDQ DD a
  34582.  
  34583. –20 to +75°C, C = 30 pF)
  34584. L
  34585.  
  34586. Item SymbolMin Max Unit Figure
  34587.  
  34588. EXTAL PLL1, 2 operating1/2 divider operating fEX 16 66.7 MHz
  34589. clock input
  34590. frequency
  34591.  
  34592. 1/2 divider not operating fEX 8 33.3
  34593.  
  34594. PLL1, 2 1/2 divider operating fEX 2 66.7
  34595. not operating
  34596.  
  34597. 1/2 divider not operating fEX 1 33.3
  34598.  
  34599. EXTAL clock input cycle time t EXcyc 15 1000 ns 23.1
  34600.  
  34601. EXTAL clock input low-level pulse width t EXL 3.5 ns 23.1
  34602.  
  34603. EXTAL clock input high-level pulse width t EXH 3.5 ns 23.1
  34604.  
  34605. EXTAL clock output rise time t EXr 4 ns 23.1
  34606.  
  34607. EXTAL clock input fall time t EXf 4 ns 23.1
  34608.  
  34609. CKIO clock PLL2 operating fOP 25 100 MHz
  34610. output
  34611.  
  34612. PLL2 not operating fOP 1 100 MHz
  34613.  
  34614. CKIO clock output cycle time tcyc 10 1000 ns 23.2
  34615.  
  34616. CKIO clock output low-level pulse width tCKOL 1 — ns 23.2
  34617.  
  34618. CKIO clock output high-level pulse width tCKOH 1 — ns 23.2
  34619.  
  34620. CKIO clock output rise time tCKOr — 4 ns 23.2
  34621.  
  34622. CKIO clock output fall time t CKOf — 4 ns 23.2
  34623.  
  34624. 693
  34625.  
  34626. ----------------------- Page 710-----------------------
  34627.  
  34628. Table 23.5 Clock and Control Signal Timing (cont) (VDDQ = 3.0 to 3.6 V, VDD = typ. 1.8
  34629. V, T = –20 to +75°C, C = 30 pF)
  34630. a L
  34631.  
  34632. Item Symbol Min Max Unit Figure
  34633.  
  34634. Power-on oscillation settling time tOSC1 10 — ms 23.3, 23.5
  34635.  
  34636. Power-on oscillation settling time/mode tOSCMD 10 — ms 23.3, 23.5
  34637. settling
  34638.  
  34639. SCK2 reset setup time tSCK2RS 20 — ns 23.11
  34640.  
  34641. SCK2 reset hold time tSCK2RH 20 — ns 23.3, 23.5, 23.11
  34642.  
  34643. MD reset setup time tMDRS 3 — tcyc 23.12
  34644.  
  34645. MD reset hold time tMDRH 20 — ns 23.3, 23.5, 23.12
  34646.  
  34647. assert time tRESW 20 — tcyc 23.3, 23.4, 23.5,
  34648. 23.6, 23.11
  34649.  
  34650. PLL synchronization settling time tPLL 200 — µs 23.9, 23.10
  34651.  
  34652. Standby return oscillation settling time 1 tOSC2 10 — ms 23.4, 23.6
  34653.  
  34654. Standby return oscillation settling time 2 tOSC3 5 — ms 23.7
  34655.  
  34656. Standby return oscillation settling time 3 tOSC4 5 — ms 23.8
  34657.  
  34658. IRL interrupt determination time tIRLSTB — 200 µs 23.10
  34659. (RTC used, standby mode)
  34660.  
  34661. reset hold time tTRSTRH 0 ns 23.3, 23.5
  34662.  
  34663. Note: When a crystal resonator is connected to EXTAL and XTAL, the maximum frequency is 33.3
  34664. MHz. When a 3rd overtone crystal resonator is used, an external tank circuit is necessary.
  34665.  
  34666. tEXcyc
  34667.  
  34668. tEXH tEXL
  34669.  
  34670. VIH VIH VIH
  34671. 1/2VDDQ 1/2VDDQ
  34672.  
  34673. VIL VIL
  34674.  
  34675. tEXf tEXr
  34676.  
  34677. Note: When the clock is input from the EXTAL pin
  34678.  
  34679. Figure 23.1 EXTAL Clock Input Timing
  34680.  
  34681. 694
  34682.  
  34683. ----------------------- Page 711-----------------------
  34684.  
  34685. t
  34686. cyc
  34687.  
  34688. tCKOH tCKOL
  34689.  
  34690. VOH VOH VOH
  34691. 1/2VDDQ 1/2VDDQ
  34692.  
  34693. VOL VOL
  34694.  
  34695. tCKOf tCKOr
  34696.  
  34697. Figure 23.2 CKIO Clock Output Timing
  34698.  
  34699. Stable oscillation
  34700.  
  34701. CKIO,
  34702. internal clock
  34703.  
  34704. VDD VDD min
  34705. tRESW
  34706. tOSC1
  34707.  
  34708.  
  34709.  
  34710. tSCK2RH
  34711.  
  34712. SCK2
  34713.  
  34714. tOSCMD tMDRH
  34715.  
  34716. MD8, MD7,
  34717. MD2–MD0
  34718.  
  34719. tTRSTRH
  34720.  
  34721.  
  34722.  
  34723. Notes: 1. Oscillation settling time when on-chip resonator is used
  34724. 2. PLL2 not operating
  34725.  
  34726. Figure 23.3 Power-On Oscillation Settling Time
  34727.  
  34728. 695
  34729.  
  34730. ----------------------- Page 712-----------------------
  34731.  
  34732. Standby Stable oscillation
  34733.  
  34734. CKIO,
  34735. internal clock
  34736.  
  34737. tRESW
  34738.  
  34739. tOSC2
  34740.  
  34741.  
  34742.  
  34743. Notes: 1. Oscillation settling time when on-chip resonator is used
  34744. 2. PLL2 not operating
  34745.  
  34746. Figure 23.4 Standby Return Oscillation Settling Time (Return by )
  34747.  
  34748. Stable oscillation
  34749.  
  34750. Internal clock
  34751.  
  34752. VDD min
  34753. VDD
  34754. tRESW
  34755. tOSC1
  34756.  
  34757.  
  34758.  
  34759. tSCK2RH
  34760.  
  34761. SCK2
  34762.  
  34763. tOSCMD tMDRH
  34764.  
  34765. MD8, MD7,
  34766. MD2–MD0
  34767. tTRSTRH
  34768.  
  34769.  
  34770.  
  34771. CKIO
  34772.  
  34773. Notes: 1. Oscillation settling time when on-chip resonator is used
  34774. 2. PLL2 operating
  34775.  
  34776. Figure 23.5 Power-On Oscillation Settling Time
  34777.  
  34778. 696
  34779.  
  34780. ----------------------- Page 713-----------------------
  34781.  
  34782. Standby Stable oscillation
  34783.  
  34784. Internal
  34785. clock
  34786. tRESW
  34787. tOSC2
  34788.  
  34789.  
  34790.  
  34791. CKIO
  34792.  
  34793. Notes: 1. Oscillation settling time when on-chip resonator is used
  34794. 2. PLL2 operating
  34795.  
  34796. Figure 23.6 Standby Return Oscillation Settling Time (Return by )
  34797.  
  34798. Standby Stable oscillation
  34799.  
  34800. CKIO,
  34801. internal clock
  34802.  
  34803. tOSC3
  34804.  
  34805. NMI
  34806.  
  34807. Note: Oscillation settling time when on-chip resonator is used
  34808.  
  34809. Figure 23.7 Standby Return Oscillation Settling Time (Return by NMI)
  34810.  
  34811. 697
  34812.  
  34813. ----------------------- Page 714-----------------------
  34814.  
  34815. Standby Stable oscillation
  34816.  
  34817. CKIO,
  34818. internal clock
  34819.  
  34820. tOSC4
  34821.  
  34822. –
  34823.  
  34824. Note: Oscillation settling time when on-chip resonator is used
  34825.  
  34826. Figure 23.8 Standby Return Oscillation Settling Time (Return by – )
  34827.  
  34828. Reset or NMI
  34829. interrupt request
  34830.  
  34831. Stable input clock Stable input clock
  34832.  
  34833. EXTAL input
  34834.  
  34835. PLL synchronization tPLL × 2 PLL synchronization
  34836.  
  34837. PLL output,
  34838. CKIO output
  34839.  
  34840. Internal clock
  34841.  
  34842. STATUS1–
  34843. Normal Standby Normal
  34844. STATUS0
  34845.  
  34846. Figure 23.9 PLL Synchronization Settling Time in Case of or NMI Interrupt
  34847.  
  34848. 698
  34849.  
  34850. ----------------------- Page 715-----------------------
  34851.  
  34852. –
  34853. interrupt request
  34854.  
  34855. Stable input clock Stable input clock
  34856.  
  34857. EXTAL input
  34858.  
  34859. PLL synchronization tIRLSTB tPLL × 2 PLL synchronization
  34860.  
  34861. PLL output,
  34862. CKIO output
  34863.  
  34864. Internal clock
  34865.  
  34866. STATUS1–
  34867. Normal Standby Normal
  34868. STATUS0
  34869.  
  34870. Figure 23.10 PLL Synchronization Settling Time in Case of IRL Interrupt
  34871.  
  34872. CKIO
  34873.  
  34874. tRESW
  34875.  
  34876.  
  34877.  
  34878. tSCK2RS tSCK2RH
  34879.  
  34880. SCK2
  34881.  
  34882. Figure 23.11 Manual Reset Input Timing
  34883.  
  34884.  
  34885.  
  34886. tMDRS
  34887. tMDRH
  34888.  
  34889. MD6–MD3
  34890.  
  34891. Figure 23.12 Mode Input Timing
  34892.  
  34893. 699
  34894.  
  34895. ----------------------- Page 716-----------------------
  34896.  
  34897. 23.3.2 Control Signal Timing
  34898.  
  34899. Table 23.6 Control Signal Timing (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to
  34900. DDQ DD a
  34901.  
  34902. +75°C, C = 30 pF, PLL2 on)
  34903. L
  34904.  
  34905. 66 MHz 83 MHz 100 MHz
  34906.  
  34907. Item Symbo Min Max Min Max Min M ax Unit Figure Note
  34908. l
  34909.  
  34910. setup time tBREQS 2 — 2 — 2 — ns BGA
  34911.  
  34912. 3.5 — 3.5 — — — ns QFP
  34913.  
  34914. hold time tBREQH 1.5 — 1.5 — 1.5 — ns
  34915.  
  34916. delay time tBACKD — 10 — 8 — 6 ns
  34917.  
  34918. Bus tri-state delay time tBOFF1 — 15 — 12 — 10 ns
  34919.  
  34920. Bus tri-state delay time tBOFF2 — 2 — 2 — 2 tcyc 23.13
  34921. to standby mode
  34922.  
  34923. Bus buffer on time t — 15 — 12 — 10 ns
  34924. BON1
  34925.  
  34926. Bus buffer on time from t — 1 — 1 — 1 t 23.13
  34927. BON2 cyc
  34928.  
  34929. standby
  34930.  
  34931. STATUS0/1 delay time tSTD1 — 11 — 9 — 7 ns 23.13
  34932.  
  34933. STATUS0/1 delay time tSTD2 — 2 — 2 — 2 tcyc 23.13
  34934. to standby
  34935.  
  34936. 700
  34937.  
  34938. ----------------------- Page 717-----------------------
  34939.  
  34940. Normal operation Standby mode Normal operation
  34941.  
  34942. CKIO
  34943.  
  34944. STATUS 0, STATUS 1 Normal Standby Normal
  34945.  
  34946. tSTD2 tSTD1
  34947.  
  34948. , , RD/,
  34949. , , , ,
  34950. , , , tBOFF2 tBON2
  34951. RD/
  34952.  
  34953. A25–A0, D63–D0
  34954.  
  34955. DACKn, DRAKn, SCK,
  34956. * TXD, TXD2, ,
  34957.  
  34958.  
  34959. Note: * When the PHZ bit in STBCR is set to 1, these pins go to the high-impedance state (except
  34960. for pins being used as port pins, which retain their port state).
  34961.  
  34962. Figure 23.13 Pin Drive Timing for Standby Mode
  34963.  
  34964. 701
  34965.  
  34966. ----------------------- Page 718-----------------------
  34967.  
  34968. 23.3.3. Bus Timing
  34969.  
  34970. Table 23.7 Bus Timing (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30
  34971. DDQ DD a L
  34972.  
  34973. pF, PLL2 on)
  34974.  
  34975. 66 MHz 83 MHz 100 MHz
  34976.  
  34977. Item Symbo Min Max Min Max Min M ax Unit Notes
  34978. l
  34979.  
  34980. Address delay time tAD — 10 — 8 — 6 ns
  34981.  
  34982. delay time tBSD — 10 — 8 — 6 ns
  34983.  
  34984. delay time tCSD — 10 — 8 — 6 ns
  34985.  
  34986. delay time tRWD — 10 — 8 — 6 ns
  34987.  
  34988. delay time tRSD — 10 — 8 — 6 ns
  34989.  
  34990. Read data setup time tRDS 2 — 2 — 2 — ns BGA
  34991.  
  34992. 3.5 — 3.5 — — — ns QFP
  34993.  
  34994. Read data hold time t 1.5 — 1.5 — 1.5 — ns
  34995. RDH
  34996.  
  34997. delay time (falling tWEDF — 10 — 8 — 6 ns Relative
  34998. edge) to CKIO
  34999. falling
  35000. edge
  35001.  
  35002. delay time tWED1 — 10 — 8 — 6 ns
  35003.  
  35004. Write data delay time tWDD — 10 — 8 — 6 ns
  35005.  
  35006. setup time tRDYS 2 — 2 — 2 — ns BGA
  35007.  
  35008. 3.5 — 3.5 — — — ns QFP
  35009.  
  35010. hold time t 1.5 — 1.5 — 1.5 — ns
  35011. RDYH
  35012.  
  35013. delay time tRASD — 10 — 8 — 6 ns
  35014.  
  35015. delay time 1 tCASD1 — 10 — 8 — 6 ns DRAM
  35016.  
  35017. delay time 2 tCASD2 — 10 — 8 — 6 ns SDRAM
  35018.  
  35019. CKE delay time tCKED — 10 — 8 — 6 ns SDRAM
  35020.  
  35021. DQM delay time tDQMD — 10 — 8 — 6 ns SDRAM
  35022.  
  35023. delay time tFMD — 10 — 8 — 6 ns MPX
  35024.  
  35025. setup time tIO16S 2 — 2 — 2 — ns BGA
  35026.  
  35027. 3.5 — 3.5 — — — ns QFP
  35028.  
  35029. hold time t 1.5 — 1.5 — 1.5 — ns PCMCIA
  35030. IO16H
  35031.  
  35032. delay time tICWSDF — 10 — 8 — 6 ns PCMCIA
  35033. (falling edge)
  35034.  
  35035. delay time tICRSD — 10 — 8 — 6 ns PCMCIA
  35036.  
  35037. DACK delay time tDACD — 10 — 8 — 6 ns
  35038.  
  35039. 702
  35040.  
  35041. ----------------------- Page 719-----------------------
  35042.  
  35043. Table 23.7 Bus Timing (cont)
  35044.  
  35045. 66 MHz 83 MHz 100 MHz
  35046.  
  35047. Item Symbo Min Max Min Max Min M ax Unit Notes
  35048. l
  35049.  
  35050. DACK delay time (falling tDACDF — 10 — 8 — 6 ns Relative
  35051. edge) to CKIO
  35052. falling
  35053. edge
  35054.  
  35055. 703
  35056.  
  35057. ----------------------- Page 720-----------------------
  35058.  
  35059. T1 T2
  35060.  
  35061. CKIO
  35062.  
  35063. tAD tAD
  35064.  
  35065. A25–A0
  35066.  
  35067. tCSD tCSD
  35068.  
  35069.  
  35070.  
  35071. tRWD tRWD
  35072.  
  35073. RD/
  35074.  
  35075. tRSD tRSD tRSD
  35076.  
  35077.  
  35078.  
  35079. D63–D0 tRDS tRDH
  35080.  
  35081. (read)
  35082.  
  35083. tWED1
  35084. tWEDF tWEDF
  35085.  
  35086.  
  35087.  
  35088. tWDD tWDD tWDD
  35089.  
  35090. D63–D0
  35091. (write)
  35092.  
  35093. tBSD tBSD
  35094.  
  35095.  
  35096.  
  35097.  
  35098.  
  35099. tDACD
  35100. tDACD tDACD
  35101. DACKn
  35102. (SA: IO ← memory)
  35103.  
  35104. tDACDF
  35105. tDACDF
  35106. DACKn
  35107. (SA: IO → memory)
  35108.  
  35109. tDACD tDACD
  35110. DACKn
  35111. (DA)
  35112.  
  35113. Note: IO: DACK device
  35114. SA: Single address DMA transfer
  35115. DA: Dual address DMA transfer
  35116. DACK set to active-high
  35117.  
  35118. Figure 23.14 SRAM Bus Cycle: Basic Bus Cycle (No Wait)
  35119.  
  35120. 704
  35121.  
  35122. ----------------------- Page 721-----------------------
  35123.  
  35124. T1 Tw T2
  35125.  
  35126. CKIO
  35127.  
  35128. tAD tAD
  35129.  
  35130. A25–A0
  35131.  
  35132. tCSD tCSD
  35133.  
  35134.  
  35135.  
  35136. tRWD tRWD
  35137.  
  35138. RD/
  35139.  
  35140. tRSD tRSD tRSD
  35141.  
  35142.  
  35143.  
  35144. D63–D0 tRDS tRDH
  35145.  
  35146. (read)
  35147.  
  35148. tWED1
  35149. tWEDF tWEDF
  35150.  
  35151.  
  35152.  
  35153. tWDD tWDD tWDD
  35154.  
  35155. D63–D0
  35156. (write)
  35157.  
  35158. tBSD tBSD
  35159.  
  35160.  
  35161.  
  35162. tRDYS tRDYH
  35163.  
  35164.  
  35165.  
  35166. tDACD
  35167. tDACD tDACD
  35168. DACKn
  35169. (SA: IO ← memory)
  35170.  
  35171. tDACDF
  35172. tDACDF
  35173. DACKn
  35174. (SA: IO → memory)
  35175.  
  35176. tDACD tDACD
  35177. DACKn
  35178. (DA)
  35179.  
  35180. Note: IO: DACK device
  35181. SA: Single address DMA transfer
  35182. DA: Dual address DMA transfer
  35183.  
  35184. Figure 23.15 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait)
  35185.  
  35186. 705
  35187.  
  35188. ----------------------- Page 722-----------------------
  35189.  
  35190. T1 Tw Twe T2
  35191.  
  35192. CKIO
  35193.  
  35194. tAD tAD
  35195.  
  35196. A25–A0
  35197.  
  35198. tCSD tCSD
  35199.  
  35200.  
  35201.  
  35202. tRWD tRWD
  35203.  
  35204. RD/
  35205.  
  35206. tRSD tRSD tRSD
  35207.  
  35208.  
  35209.  
  35210. D63–D0 tRDS tRDH
  35211.  
  35212. (read)
  35213.  
  35214. tWED1
  35215. tWEDF tWEDF
  35216.  
  35217.  
  35218.  
  35219. tWDD tWDD tWDD
  35220.  
  35221. D63–D0
  35222. (write)
  35223.  
  35224. tBSD tBSD
  35225.  
  35226.  
  35227.  
  35228. tRDYS tRDYH
  35229.  
  35230.  
  35231.  
  35232. tDACD tRDYS tRDYH
  35233.  
  35234. DACKn tDACD tDACD
  35235.  
  35236. (SA: IO ← memory)
  35237.  
  35238. tDACDF
  35239. tDACDF
  35240. DACKn
  35241. (SA: IO → memory)
  35242.  
  35243. tDACD tDACD
  35244. DACKn
  35245. (DA)
  35246.  
  35247. Note: IO: DACK device
  35248. SA: Single address DMA transfer
  35249. DA: Dual address DMA transfer
  35250.  
  35251. Figure 23.16 SRAM Bus Cycle: Basic Bus Cycle (One Internal Wait + One External
  35252. Wait)
  35253.  
  35254. 706
  35255.  
  35256. ----------------------- Page 723-----------------------
  35257.  
  35258. TS1 T1 T2 TH1
  35259.  
  35260. CKIO
  35261.  
  35262. tAD tAD
  35263. A25–A0
  35264.  
  35265. tCSD tCSD
  35266.  
  35267.  
  35268. tRWD tRWD
  35269.  
  35270. RD/
  35271.  
  35272. tRSD tRSD tRSD
  35273.  
  35274.  
  35275. D63–D0 tRDS tRDH
  35276. (read)
  35277.  
  35278. tWED1
  35279. tWEDF tWEDF
  35280.  
  35281.  
  35282. tWDD tWDD tWDD
  35283.  
  35284. D63–D0
  35285. (write)
  35286.  
  35287. tBSD tBSD
  35288.  
  35289.  
  35290.  
  35291.  
  35292.  
  35293. tDACD tDACD
  35294. DACKn tDACD
  35295. (SA: IO ← memory)
  35296.  
  35297. tDACDF
  35298. tDACDF
  35299. DACKn
  35300. (SA: IO → memory)
  35301.  
  35302. tDACD tDACD
  35303. DACKn
  35304. (DA)
  35305.  
  35306. Figure 23.17 SRAM Bus Cycle: Basic Bus Cycle (No Wait, Address Setup/Hold Time
  35307. Insertion, AnS = 1, AnH = 1)
  35308.  
  35309. 707
  35310.  
  35311. ----------------------- Page 724-----------------------
  35312.  
  35313. T1 TB2 TB1 TB2 TB1 TB2 TB1 T2
  35314.  
  35315. CKIO
  35316. tAD tAD
  35317.  
  35318. A25–A5
  35319. tAD
  35320.  
  35321. A4–A0
  35322.  
  35323. tCSD tCSD
  35324.  
  35325.  
  35326. tRWD tRWD
  35327.  
  35328. RD/
  35329. tRSD
  35330. tRSD tRSD
  35331.  
  35332.  
  35333.  
  35334. D63–D0 tRDS tRDH tRDS tRDH
  35335.  
  35336. (read)
  35337.  
  35338. tBSD tBSD
  35339.  
  35340.  
  35341.  
  35342.  
  35343. tDACD tDACD
  35344. tDACD
  35345. DACKn
  35346. (SA: IO ← memory)
  35347. tDACD tDACD
  35348.  
  35349. DACKn
  35350. (DA)
  35351.  
  35352. Note: IO: DACK device
  35353. SA: Single address DMA transfer
  35354. DA: Dual address DMA transfer
  35355. DACK set to active-high
  35356.  
  35357. Figure 23.18 Burst ROM Bus Cycle (No Wait)
  35358.  
  35359. 708
  35360.  
  35361. ----------------------- Page 725-----------------------
  35362.  
  35363. (
  35364. 1
  35365. s
  35366. t
  35367.  
  35368. D
  35369. a
  35370. t
  35371. a
  35372. :
  35373.  
  35374. O T1 Tw Twe TB2 TB1 Twb TB2 TB1 Twb TB2 TB1 Twb T2
  35375. n
  35376. e
  35377.  
  35378. I
  35379. CKIO
  35380. n
  35381. t t
  35382. e
  35383. AD tAD
  35384. r
  35385. n
  35386. A25–A5
  35387. a
  35388. l
  35389. t
  35390. F
  35391. AD
  35392.  
  35393. W i
  35394. g
  35395. a u
  35396. A4–A0
  35397. i r
  35398. t
  35399. e tCSD
  35400.  
  35401. t
  35402. +
  35403. CSD
  35404. 2
  35405. O 3
  35406. .
  35407.  
  35408. n 1
  35409. e 9 t t
  35410.  
  35411. RWD RWD
  35412.  
  35413. E
  35414. x B
  35415. RD/
  35416. W t u
  35417. e
  35418. r
  35419. t
  35420. r
  35421. t RSD
  35422. a
  35423. RSD
  35424. i n s
  35425. t
  35426. t a
  35427.  
  35428. )
  35429. l R t
  35430. W O
  35431. tRDS tRDH tRDS RDH
  35432. M
  35433. D63–D0
  35434. a
  35435. i (read)
  35436. t
  35437. ; B
  35438. 2 u
  35439. tBSD
  35440. n s
  35441. d
  35442.  
  35443. / C t
  35444. 3 y
  35445. RDYH
  35446. r c
  35447. tRDYS tRDYS tRDYH
  35448. d l
  35449. / e
  35450. 4
  35451. t t
  35452. h
  35453. t RDYS tRDYH
  35454.  
  35455. DACD
  35456. D
  35457. DACKn
  35458. a
  35459. (SA: IO ← memory) tDACD
  35460. t
  35461. a
  35462. tDACD tDACD
  35463. :
  35464.  
  35465. O DACKn
  35466. n (DA)
  35467. e
  35468.  
  35469. I
  35470. n
  35471. t
  35472. e
  35473. r
  35474. n
  35475. a
  35476. 7 l
  35477. 0
  35478. 9
  35479.  
  35480. ----------------------- Page 726-----------------------
  35481.  
  35482. 7
  35483. 1
  35484. 0
  35485.  
  35486. (
  35487. N
  35488. o
  35489. TS1 T1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 TB2 TH1 TS1 TB1 T2 TH1
  35490.  
  35491. W
  35492. a
  35493. CKIO
  35494. i
  35495. t t
  35496. ,
  35497. AD t
  35498.  
  35499. AD
  35500. A A25–A5
  35501. d
  35502. d
  35503. tAD
  35504. r F
  35505. e i
  35506. s g A4–A0
  35507. s u
  35508. S r t
  35509. e
  35510. tCSD CSD
  35511. e
  35512. t 2
  35513. u 3
  35514. p .
  35515. / 2 t t
  35516. H
  35517. RWD
  35518. 0
  35519. RWD
  35520.  
  35521. o RD/
  35522. l
  35523. d B
  35524. u
  35525. t t
  35526. T
  35527. RSD RSD
  35528. i r
  35529. s
  35530.  
  35531. m t
  35532. e R tRDS tRDH tRDS tRDH
  35533. I O D63–D0
  35534. n
  35535. M
  35536. (read)
  35537. s
  35538. e
  35539. tBSD
  35540. r t
  35541. B
  35542. BSD
  35543. t
  35544. i
  35545. o u
  35546.  
  35547. n s
  35548. ,
  35549. C
  35550. A y
  35551. n c
  35552.  
  35553. S l
  35554. e tDACD t
  35555. =
  35556. tDACD DACD
  35557.  
  35558. DACKn
  35559. 1 (SA: IO ← memory)
  35560. ,
  35561.  
  35562. A
  35563. n
  35564. tDACD tDACD
  35565. H
  35566. DACKn
  35567. (DA)
  35568.  
  35569. =
  35570.  
  35571. 1
  35572. )
  35573.  
  35574. ----------------------- Page 727-----------------------
  35575.  
  35576. F
  35577. i
  35578. g
  35579. u
  35580. r T1 Tw Twe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe TB2 TB1 Twb Twbe T2
  35581. e
  35582.  
  35583. 2
  35584. 3
  35585. CKIO
  35586. .
  35587. 2
  35588. 1 t t
  35589.  
  35590. AD AD
  35591.  
  35592. A25 A5
  35593. B
  35594. u
  35595. r tAD
  35596. s
  35597. t
  35598. A4 A0
  35599.  
  35600. R
  35601. O
  35602. tCSD tCSD
  35603. M
  35604.  
  35605. B
  35606. u
  35607. tRWD tRWD
  35608. s
  35609. RD/
  35610. C
  35611. y
  35612. c t
  35613. l
  35614. tRSD tRSD RSD
  35615. e
  35616.  
  35617. (
  35618. O
  35619. n t t t t
  35620. e
  35621. RDS RDH RDS RDH
  35622.  
  35623. D63 D0
  35624. I
  35625. n
  35626. (read)
  35627. t
  35628. e
  35629. r
  35630. tBSD tBSD tBSD tBSD
  35631. n
  35632. a
  35633. l
  35634.  
  35635. W t t t t
  35636. a
  35637. RDYS RDYH RDYS RDYH
  35638. i
  35639. t
  35640.  
  35641. +
  35642. t t
  35643. O
  35644. tRDYS tRDYH RDYS RDYH
  35645. n
  35646. e
  35647. tDACD tDACD tDACD
  35648. DACKn
  35649. E
  35650. x
  35651. (SA: IO ← memory)
  35652. t
  35653. e
  35654. r t t
  35655. n
  35656. DACD DACD
  35657. a
  35658. DACKn
  35659. l
  35660. (DA)
  35661. W
  35662. a
  35663. i
  35664. t
  35665. )
  35666. 7
  35667. 1
  35668. 1
  35669.  
  35670. ----------------------- Page 728-----------------------
  35671.  
  35672. 7
  35673. 1 Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  35674. 2
  35675.  
  35676. CKIO
  35677.  
  35678. tAD tAD
  35679. F BANK Row
  35680. i
  35681. g
  35682. u
  35683. tAD
  35684. r
  35685. e Precharge-sel Row H/L
  35686.  
  35687. 2
  35688. 3
  35689. .
  35690. 2 Addr Row column
  35691. 2
  35692.  
  35693.  
  35694.  
  35695. tCSD tCSD
  35696. S
  35697. ( y
  35698.  
  35699. R n
  35700. C c
  35701. h
  35702. t t
  35703. D
  35704. RWD RWD
  35705. r
  35706. o
  35707. RD/
  35708. = n
  35709. 1 o t t
  35710. , u
  35711. RASD RASD
  35712.  
  35713. C s
  35714. A D t t
  35715. S R
  35716. tCASD2 CASD2 CASD2
  35717.  
  35718. L A
  35719. a M
  35720. t
  35721. e
  35722. n A t tDQMD
  35723. c
  35724. DQMD
  35725. u
  35726. y t DQMn
  35727. = o-
  35728. 3 P t t
  35729. r
  35730. RDS RDH
  35731. ,
  35732. e D63–D0
  35733. T c (read) d0
  35734. P h t
  35735. a
  35736. WDD
  35737. C r tWDD
  35738. = g D63–D0
  35739. e
  35740.  
  35741. (write)
  35742. 3
  35743. ) B
  35744. u t t
  35745. s
  35746. BSD BSD
  35747.  
  35748.  
  35749. C
  35750. y
  35751. c
  35752. l
  35753. e
  35754. :
  35755. CKE
  35756.  
  35757. S
  35758. i
  35759. n
  35760. tDACD tDACD tDACD
  35761. g
  35762. l
  35763. DACKn
  35764. e (SA: IO ← memory)
  35765.  
  35766. Note: IO: DACK device
  35767. SA: Single address DMA transfer
  35768. DA: Dual address DMA transfer
  35769. DACK set to active-high
  35770.  
  35771. ----------------------- Page 729-----------------------
  35772.  
  35773. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4 Tpc Tpc Tpc
  35774.  
  35775. CKIO
  35776. F
  35777. i
  35778. g tAD t
  35779. u
  35780. AD
  35781. r BANK Row
  35782. e
  35783.  
  35784. 2
  35785. 3
  35786. tAD
  35787. .
  35788. 2 Precharge-sel Row H/L
  35789. 3
  35790.  
  35791.  
  35792.  
  35793. S
  35794. y
  35795. Addr Row c0
  35796. n
  35797. ( c t
  35798. R h
  35799. tCSD CSD
  35800. C r
  35801. o
  35802. D n
  35803. o
  35804. = u
  35805. tRWD tRWD
  35806. s
  35807. 1 RD/
  35808. , D
  35809. C R t
  35810. A
  35811. t RASD
  35812. A
  35813. RASD
  35814. S M
  35815. L t t
  35816. a A
  35817. CASD2 CASD2
  35818. t
  35819. tCASD2
  35820. e u
  35821. n t
  35822.  
  35823. c o
  35824. y P-
  35825. = r
  35826. t tDQMD
  35827. e
  35828. DQMD
  35829.  
  35830. 3 c DQMn
  35831. , h
  35832. T a
  35833. P r
  35834. g
  35835. t tRDH
  35836. C
  35837. RDS
  35838. e D63–D0
  35839.  
  35840. d0 d1 d2 d3
  35841. = R (read)
  35842. e
  35843. t
  35844. 3
  35845. WDD
  35846. ) a t
  35847. d
  35848. WDD
  35849. D63–D0
  35850.  
  35851. B (write)
  35852. u
  35853. s
  35854. t t
  35855. C
  35856. BSD BSD
  35857.  
  35858. y
  35859. c
  35860. l
  35861. e
  35862. :
  35863.  
  35864. CKE
  35865. B
  35866. u
  35867. r
  35868. s
  35869. t
  35870. tDACD tDACD tDACD
  35871.  
  35872. DACKn
  35873. (SA: IO ← memory)
  35874. 7
  35875. 1
  35876. 3
  35877.  
  35878. ----------------------- Page 730-----------------------
  35879.  
  35880. Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35881.  
  35882. CKIO
  35883.  
  35884. tAD tAD
  35885.  
  35886. BANK Row
  35887.  
  35888. tRWD tAD
  35889.  
  35890. Precharge-sel Row H/L
  35891.  
  35892. tRWD
  35893.  
  35894. Addr Row c0
  35895.  
  35896. tCSD tCSD
  35897.  
  35898.  
  35899.  
  35900. tRWD tRWD
  35901.  
  35902. RD/
  35903.  
  35904. tRASD tRASD
  35905.  
  35906.  
  35907.  
  35908. tCASD2 tCASD2 tCASD2
  35909.  
  35910.  
  35911.  
  35912. tDQMD tDQMD
  35913.  
  35914. DQMn
  35915.  
  35916. D63–D0 tRDS tRDH
  35917. (read) d0 d1 d2 d3
  35918.  
  35919. tWDD tWDD
  35920. D63–D0
  35921. (write)
  35922.  
  35923. tBSD tBSD
  35924.  
  35925.  
  35926.  
  35927. CKE
  35928.  
  35929. tDACD tDACD tDACD
  35930.  
  35931. DACKn
  35932. (SA: IO ← memory)
  35933.  
  35934. Figure 23.24 Synchronous DRAM Normal Read Bus Cycle: ACT + READ Commands,
  35935. Burst (RCD = 1, CAS Latency = 3)
  35936.  
  35937. 714
  35938.  
  35939. ----------------------- Page 731-----------------------
  35940.  
  35941. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  35942.  
  35943. CKIO
  35944.  
  35945. tAD tAD tAD
  35946.  
  35947. BANK Row
  35948.  
  35949. tAD
  35950.  
  35951. Precharge-sel Row H/L
  35952.  
  35953. Addr Row c0
  35954.  
  35955. tCSD tCSD
  35956.  
  35957.  
  35958. tRWD tRWD
  35959.  
  35960. RD/
  35961.  
  35962. tRASD tRASD tRASD tRASD
  35963.  
  35964.  
  35965.  
  35966. tCASD2 tCASD2 tCASD2
  35967.  
  35968.  
  35969.  
  35970. tDQMD tDQMD
  35971.  
  35972. DQMn
  35973.  
  35974. D63–D0 tRDS tRDH
  35975.  
  35976. (read) d0 d1 d2 d3
  35977.  
  35978. tWDD tWDD
  35979. D63–D0
  35980. (write)
  35981.  
  35982. tBSD tBSD
  35983.  
  35984.  
  35985.  
  35986. CKE
  35987.  
  35988. tDACD tDACD tDACD
  35989. DACKn
  35990. (SA: IO ← memory)
  35991.  
  35992. Figure 23.25 Synchronous DRAM Normal Read Bus Cycle: PRE + ACT + READ
  35993. Commands, Burst (TPC = 1, RCD = 1, CAS Latency = 3)
  35994.  
  35995. 715
  35996.  
  35997. ----------------------- Page 732-----------------------
  35998.  
  35999. Tc1 Tc2 Tc3 Tc4/Td1 Td2 Td3 Td4
  36000.  
  36001. CKIO
  36002.  
  36003. tAD tAD
  36004.  
  36005. BANK Row
  36006.  
  36007. Precharge-sel H/L
  36008.  
  36009. Addr
  36010. c0
  36011.  
  36012. tCSD tCSD
  36013.  
  36014.  
  36015.  
  36016. tRWD tRWD
  36017.  
  36018. RD/
  36019.  
  36020. tRASD tRASD
  36021.  
  36022.  
  36023.  
  36024. tCASD2 tCASD2
  36025.  
  36026.  
  36027.  
  36028. tDQMD tDQMD
  36029.  
  36030. DQMn
  36031.  
  36032. D63–D0 tRDS tRDH
  36033.  
  36034. (read) d0 d1 d2 d3
  36035.  
  36036. tWDD tWDD
  36037. D63–D0
  36038. (write)
  36039.  
  36040. tBSD tBSD
  36041.  
  36042.  
  36043.  
  36044. CKE
  36045.  
  36046. tDACD tDACD tDACD
  36047.  
  36048. DACKn
  36049. (SA: IO ← memory)
  36050.  
  36051. Figure 23.26 Synchronous DRAM Normal Read Bus Cycle: READ Command, Burst
  36052. (CAS Latency = 3)
  36053.  
  36054. 716
  36055.  
  36056. ----------------------- Page 733-----------------------
  36057.  
  36058. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  36059.  
  36060. CKIO
  36061.  
  36062. tAD tAD
  36063.  
  36064. BANK Row
  36065.  
  36066. tAD
  36067. Precharge-sel Row H/L
  36068.  
  36069. Addr Row column
  36070.  
  36071. tCSD tCSD
  36072.  
  36073.  
  36074.  
  36075. tRWD tRWD
  36076.  
  36077. RD/
  36078.  
  36079. tRASD tRASD
  36080.  
  36081.  
  36082.  
  36083. tCASD2 tCASD2
  36084. tCASD2
  36085.  
  36086.  
  36087.  
  36088. tDQMD tDQMD
  36089.  
  36090. DQMn
  36091.  
  36092. tWDD
  36093. tWDD tWDD
  36094. D63–D0
  36095. c0
  36096. (write)
  36097.  
  36098. tBSD tBSD
  36099.  
  36100.  
  36101. CKE
  36102. tDACD tDACD
  36103. DACKn
  36104. (SA: IO → memory)
  36105.  
  36106. Figure 23.27 Synchronous DRAM Auto-Precharge Write Bus Cycle: Single
  36107. (RCD = 1, TRWL = 2, TPC = 1)
  36108.  
  36109. 717
  36110.  
  36111. ----------------------- Page 734-----------------------
  36112.  
  36113. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl Tpc
  36114.  
  36115. CKIO
  36116.  
  36117. tAD tAD
  36118.  
  36119. BANK Row
  36120.  
  36121. tAD
  36122. Precharge-sel Row H/L
  36123.  
  36124. Addr Row c0
  36125.  
  36126. tCSD tCSD
  36127.  
  36128.  
  36129.  
  36130. tRWD tRWD
  36131.  
  36132. RD/
  36133.  
  36134. tRASD tRASD
  36135.  
  36136.  
  36137.  
  36138. tCASD2 tCASD2
  36139. tCASD2
  36140.  
  36141.  
  36142.  
  36143. tDQMD tDQMD
  36144.  
  36145. DQMn
  36146.  
  36147. tWDD
  36148. tWDD tWDD
  36149. D63–D0
  36150. d0 d1 d2 d3
  36151. (write)
  36152.  
  36153. tBSD tBSD
  36154.  
  36155.  
  36156. CKE
  36157. tDACD tDACD
  36158. DACKn
  36159. (SA: IO → memory)
  36160.  
  36161. Figure 23.28 Synchronous DRAM Auto-Precharge Write Bus Cycle: Burst
  36162. (RCD = 1, TRWL = 2, TPC = 1)
  36163.  
  36164. 718
  36165.  
  36166. ----------------------- Page 735-----------------------
  36167.  
  36168. Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  36169.  
  36170. CKIO
  36171.  
  36172. tAD tAD
  36173.  
  36174. BANK Row
  36175.  
  36176. tAD
  36177.  
  36178. Precharge-sel Row H/L
  36179.  
  36180. Addr Row c0
  36181.  
  36182. tCSD tCSD
  36183.  
  36184.  
  36185.  
  36186. tRWD tRWD
  36187.  
  36188. RD/
  36189.  
  36190. tRASD tRASD
  36191.  
  36192.  
  36193.  
  36194. tCASD2 tCASD2
  36195. tCASD2
  36196.  
  36197.  
  36198.  
  36199. tDQMD tDQMD
  36200.  
  36201. DQMn
  36202.  
  36203. tWDD
  36204. tWDD tWDD
  36205. D63–D0
  36206. d0 d1 d2 d3
  36207. (write)
  36208.  
  36209. tBSD tBSD
  36210.  
  36211.  
  36212. CKE
  36213.  
  36214. tDACD tDACD
  36215.  
  36216. DACKn
  36217. (SA: IO → memory)
  36218.  
  36219. Figure 23.29 Synchronous DRAM Normal Write Bus Cycle: ACT + WRITE
  36220. Commands, Burst (RCD = 1, TRWL = 2)
  36221.  
  36222. 719
  36223.  
  36224. ----------------------- Page 736-----------------------
  36225.  
  36226. Tpr Tpc Tr Trw Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  36227.  
  36228. CKIO
  36229.  
  36230. tAD tAD tAD
  36231.  
  36232. BANK Row Row
  36233.  
  36234. tAD
  36235. Precharge-sel H/L Row H/L
  36236.  
  36237. Addr Row c0
  36238.  
  36239. tCSD tCSD
  36240.  
  36241.  
  36242.  
  36243. tRWD tRWD tRWD tRWD
  36244.  
  36245. RD/
  36246.  
  36247. tRASD tRASD tRASD tRASD
  36248.  
  36249.  
  36250.  
  36251. tCASD2 tCASD2
  36252. tCASD2
  36253.  
  36254.  
  36255.  
  36256. tDQMD tDQMD
  36257.  
  36258. DQMn
  36259.  
  36260. tWDD
  36261. tWDD tWDD
  36262. D63–D0
  36263. (write) d0 d1 d2 d3
  36264.  
  36265. tBSD tBSD
  36266.  
  36267.  
  36268. CKE
  36269. tDACD tDACD tDACD
  36270.  
  36271. DACKn
  36272. (SA: IO → memory)
  36273.  
  36274. Figure 23.30 Synchronous DRAM Normal Write Bus Cycle: PRE + ACT + WRITE
  36275. Commands, Burst (TPC = 1, RCD = 1, TRWL = 2)
  36276.  
  36277. 720
  36278.  
  36279. ----------------------- Page 737-----------------------
  36280.  
  36281. Tnop (Tnop) Tc1 Tc2 Tc3 Tc4 Trwl Trwl
  36282.  
  36283. CKIO
  36284.  
  36285. tAD tAD
  36286.  
  36287. BANK Row
  36288.  
  36289. Precharge-sel H/L
  36290.  
  36291. Addr c0
  36292.  
  36293. tCSD tCSD
  36294.  
  36295.  
  36296.  
  36297. tRWD tRWD
  36298.  
  36299. RD/
  36300.  
  36301.  
  36302.  
  36303. tCASD2 tCASD2
  36304.  
  36305.  
  36306.  
  36307. tDQMD tDQMD
  36308.  
  36309. DQMn
  36310.  
  36311. tWDD
  36312. tWDD tWDD
  36313. D63–D0
  36314. d0 d1 d2 d3
  36315. (write)
  36316.  
  36317. tBSD tBSD
  36318.  
  36319.  
  36320. CKE
  36321. tDACD SA-DMA tDACD
  36322.  
  36323. DACKn
  36324. (SA: IO → memory)
  36325.  
  36326. Normal write
  36327.  
  36328. Note: In the case of SA-DMA only, the (Tnop) cycle is inserted, and the DACKn signal is output as shown
  36329. by the solid line. In a normal write, the (Tnop) cycle is omitted and the DACKn signal is output as
  36330. shown by the dotted line.
  36331.  
  36332. Figure 23.31 Synchronous DRAM Normal Write Bus Cycle: WRITE Command, Burst
  36333. (TRWL = 2)
  36334.  
  36335. 721
  36336.  
  36337. ----------------------- Page 738-----------------------
  36338.  
  36339. Tpr Tpc
  36340.  
  36341. CKIO
  36342.  
  36343. tAD tAD
  36344.  
  36345. BANK Row
  36346.  
  36347. Precharge-sel H/L
  36348.  
  36349. Addr
  36350.  
  36351. tCSD tCSD
  36352.  
  36353.  
  36354.  
  36355. tRWD tRWD
  36356.  
  36357. RD/
  36358.  
  36359. tRASD tRASD
  36360.  
  36361.  
  36362.  
  36363. tCASD2 tCASD2
  36364.  
  36365.  
  36366.  
  36367. tDQMD tDQMD
  36368.  
  36369. DQMn
  36370.  
  36371. tWDD tWDD
  36372. D63–D0
  36373. (write)
  36374.  
  36375. tBSD
  36376.  
  36377.  
  36378. CKE
  36379.  
  36380. tDACD tDACD
  36381.  
  36382. DACKn
  36383.  
  36384. Figure 23.32 Synchronous DRAM Bus Cycle: Synchronous DRAM Precharge
  36385. Command (TPC = 1)
  36386.  
  36387. 722
  36388.  
  36389. ----------------------- Page 739-----------------------
  36390.  
  36391. TRr1 TRr2 TRr3 TRr4 TRrw TRr5 Trc Trc Trc
  36392.  
  36393. CKIO
  36394.  
  36395. tAD tAD
  36396.  
  36397. BANK
  36398.  
  36399. Precharge-sel
  36400.  
  36401. Addr
  36402.  
  36403. tCSD tCSD tCSD tCSD
  36404.  
  36405.  
  36406.  
  36407. tRWD tRWD
  36408.  
  36409. RD/
  36410.  
  36411. tRASD tRASD tRASD tRASD
  36412.  
  36413.  
  36414.  
  36415. tCASD2 tCASD2 tCASD2 tCASD2
  36416.  
  36417.  
  36418.  
  36419. tDQMD tDQMD
  36420. DQMn
  36421.  
  36422. tWDD tWDD
  36423. D63–D0
  36424. (write)
  36425.  
  36426. tBSD
  36427.  
  36428.  
  36429.  
  36430. CKE
  36431. tDACD tDACD
  36432.  
  36433. DACKn
  36434.  
  36435. Figure 23.33 Synchronous DRAM Bus Cycle: Synchronous DRAM Auto-Refresh
  36436. (TRAS = 1, TRC = 1)
  36437.  
  36438. 723
  36439.  
  36440. ----------------------- Page 740-----------------------
  36441.  
  36442. TRs1 TRs2 TRs3 TRs4 TRs5 Trc Trc Trc
  36443.  
  36444. CKIO
  36445.  
  36446. tAD tAD
  36447.  
  36448. BANK
  36449.  
  36450. Precharge-sel
  36451.  
  36452. Addr
  36453.  
  36454. tCSD
  36455. tCSD tCSD tCSD
  36456.  
  36457.  
  36458.  
  36459. tRWD tRWD
  36460.  
  36461. RD/
  36462.  
  36463. tRASD
  36464. tRASD tRASD tRASD
  36465.  
  36466.  
  36467.  
  36468. tCASD2
  36469. tCASD2 tCASD2 tCASD2
  36470.  
  36471.  
  36472.  
  36473. tDQMD tDQMD
  36474. DQMn
  36475.  
  36476. tWDD tWDD
  36477.  
  36478. D63–D0
  36479. (write)
  36480.  
  36481. tBSD
  36482.  
  36483.  
  36484.  
  36485. tCKED tCKED
  36486.  
  36487. CKE
  36488.  
  36489. tDACD tDACD
  36490.  
  36491. DACKn
  36492.  
  36493. Figure 23.34 Synchronous DRAM Bus Cycle: Synchronous DRAM Self-Refresh (TRC
  36494. = 1)
  36495.  
  36496. 724
  36497.  
  36498. ----------------------- Page 741-----------------------
  36499.  
  36500. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  36501.  
  36502. CKIO
  36503.  
  36504. tAD tAD tAD
  36505.  
  36506. BANK
  36507.  
  36508. Precharge-sel
  36509.  
  36510. Addr
  36511.  
  36512. tCSD tCSD tCSD
  36513.  
  36514.  
  36515.  
  36516. tRWD tRWD tRWD
  36517.  
  36518. RD/
  36519.  
  36520. tRASD tRASD tRASD
  36521.  
  36522.  
  36523.  
  36524. tCASD2 tCASD2 tCASD2 tCASD2
  36525.  
  36526.  
  36527.  
  36528. tDQMD tDQMD
  36529.  
  36530. DQMn
  36531.  
  36532. tWDD tWDD
  36533. D63–D0
  36534. (write)
  36535.  
  36536. tBSD
  36537.  
  36538.  
  36539.  
  36540. CKE
  36541.  
  36542. tDACD tDACD
  36543.  
  36544. DACKn
  36545.  
  36546. Figure 23.35 (a) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  36547. Setting (PALL)
  36548.  
  36549. 725
  36550.  
  36551. ----------------------- Page 742-----------------------
  36552.  
  36553. TRp1 TRp2 TRp3 TRp4 TMw TMw2 TMw3 TMw4 TMw5
  36554.  
  36555. CKIO
  36556.  
  36557. tAD tAD tAD
  36558.  
  36559. BANK
  36560.  
  36561. Precharge-sel
  36562.  
  36563. Addr
  36564.  
  36565. tCSD tCSD tCSD
  36566.  
  36567.  
  36568.  
  36569. tRWD tRWD tRWD
  36570.  
  36571. RD/
  36572.  
  36573. tRASD tRASD tRASD
  36574.  
  36575.  
  36576.  
  36577. tCASD2 tCASD2 tCASD2 tCASD2
  36578.  
  36579.  
  36580.  
  36581. tDQMD tDQMD
  36582.  
  36583. DQMn
  36584.  
  36585. tWDD tWDD
  36586. D63–D0
  36587. (write)
  36588.  
  36589. tBSD
  36590.  
  36591.  
  36592.  
  36593. CKE
  36594.  
  36595. tDACD tDACD
  36596.  
  36597. DACKn
  36598.  
  36599. Figure 23.35 (b) Synchronous DRAM Bus Cycle: Synchronous DRAM Mode Register
  36600. Setting (SET)
  36601.  
  36602. 726
  36603.  
  36604. ----------------------- Page 743-----------------------
  36605.  
  36606. Tr1 Tr2 Tc1 Tc2 Tpc Tr1 Tr2 Trw Tc1 Tcw Tc2 Tpc Tpc
  36607.  
  36608. CKIO
  36609.  
  36610. t t t t t
  36611. (
  36612. AD AD AD AD tAD AD
  36613. (
  36614. 1 A25–A0 Row column Row column
  36615. )
  36616.  
  36617. R
  36618. C
  36619. tCSD tCSD tCSD tCSD
  36620. D
  36621.  
  36622. = t t
  36623.  
  36624. tRWD tRWD RWD RWD
  36625. 0
  36626. , RD/
  36627.  
  36628. A
  36629. n
  36630. F
  36631. t t t t t t
  36632. W
  36633. RASD RASD RASD RASD RASD RASD
  36634. i
  36635. g
  36636.  
  36637.  
  36638. = u
  36639. r
  36640. 0 e t t t t t t
  36641. ,
  36642. CASD1 CASD1 CASD1 CASD1 CASD1 CASD1
  36643. T 2
  36644. 3
  36645. P .
  36646. C 3
  36647. 6
  36648.  
  36649. =
  36650. t t t t
  36651. D63–D0 RDS RDH RDS RDH
  36652.  
  36653. 1 D (read)
  36654. ;
  36655. ( R t t
  36656. 2 A
  36657. WDD WDD
  36658. ) M
  36659. t t t t
  36660.  
  36661. WDD WDD WDD WDD
  36662. R D63–D0
  36663. C B (write)
  36664. D u
  36665. s
  36666. =
  36667. C
  36668. t t
  36669.  
  36670. tBSD tBSD BSD BSD
  36671. 1 y
  36672. ,
  36673. c
  36674. A l
  36675. e
  36676. n s
  36677. W DACKn tDACD tDACD tDACD tDACD tDACD tDACD
  36678.  
  36679. = (SA: IO ← memory)
  36680.  
  36681. 1
  36682. ,
  36683.  
  36684. T t t t t t t
  36685. P
  36686. DACD DACD DACD DACD DACD DACD
  36687. DACKn
  36688. C (SA: IO → memory)
  36689.  
  36690. =
  36691.  
  36692. 2
  36693. )
  36694.  
  36695. Note: IO: DACK device (1) (2)
  36696. SA: Single address DMA transfer
  36697. DA: Dual address DMA transfer
  36698. 7
  36699. DACK set to active-high
  36700. 2
  36701. 7
  36702.  
  36703. ----------------------- Page 744-----------------------
  36704.  
  36705. T1r Tr2 Tc1 Tc2 Tce Tpc
  36706.  
  36707. CKIO
  36708.  
  36709. tAD tAD tAD
  36710.  
  36711. A25–A0 Row column
  36712.  
  36713. tCSD tCSD
  36714.  
  36715.  
  36716.  
  36717. tRWD tRWD
  36718.  
  36719. RD/
  36720.  
  36721. tRASD tRASD tRASD
  36722.  
  36723.  
  36724. tCASD1 tCASD1 tCASD1
  36725.  
  36726.  
  36727. tRDS tRDH
  36728. D63–D0
  36729. (read)
  36730.  
  36731. tWDD
  36732. D63–D0
  36733. (write)
  36734.  
  36735. tBSD tBSD
  36736.  
  36737.  
  36738.  
  36739. tDACD tDACD
  36740. DACKn
  36741. (SA: IO ← memory)
  36742.  
  36743. Figure 23.37 DRAM Bus Cycle (EDO Mode, RCD = 0, AnW = 0, TPC = 1)
  36744.  
  36745. 728
  36746.  
  36747. ----------------------- Page 745-----------------------
  36748.  
  36749. F
  36750. i T1r Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce Tpc
  36751. g
  36752. u
  36753. r
  36754. e
  36755. CKIO
  36756.  
  36757. 2
  36758. 3 t t t t
  36759. . AD AD AD AD
  36760. 3
  36761. 8 A25–A0 Row c0 c1 c2 c3
  36762.  
  36763.  
  36764.  
  36765. D
  36766. R
  36767. tCSD tCSD
  36768. A
  36769. M
  36770.  
  36771. B
  36772. u t t
  36773. r
  36774. RWD RWD
  36775. s
  36776. t RD/
  36777.  
  36778. B
  36779. u
  36780. s t t t
  36781.  
  36782. RASD RASD RASD
  36783. C
  36784. y
  36785. c
  36786. l
  36787. e
  36788.  
  36789. (
  36790. E tRWD tCASD1 tCASD1 tCASD1 tCASD1
  36791. D
  36792. O
  36793.  
  36794. M
  36795. o
  36796. d
  36797. D63–D0 tRDS tRDH tRDS tRDH
  36798. e
  36799. , (read) d0 d1 d2 d3
  36800.  
  36801. R
  36802. C
  36803. tWDD
  36804. D
  36805.  
  36806. = D63–D0
  36807.  
  36808. 0 (write)
  36809. ,
  36810.  
  36811. A
  36812. n
  36813. W
  36814. tBSD tBSD tBSD tBSD
  36815.  
  36816. =
  36817.  
  36818. 0
  36819. ,
  36820.  
  36821. T
  36822. P t t t
  36823. C
  36824. DACD DACD DACD
  36825. DACKn
  36826.  
  36827. =
  36828. (SA: IO ← memory)
  36829.  
  36830. 1
  36831. )
  36832. 7
  36833. 2
  36834. 9
  36835.  
  36836. ----------------------- Page 746-----------------------
  36837.  
  36838. 7
  36839. 3
  36840. 0
  36841. F
  36842. i
  36843. g
  36844. u
  36845. r
  36846. e
  36847.  
  36848. 2
  36849. 3
  36850. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tce Tpc
  36851. .
  36852. 3
  36853. 9 CKIO
  36854.  
  36855.  
  36856.  
  36857. D
  36858. tAD tAD tAD
  36859. R A25–A0 Row c0 c1 c2 c3
  36860. A
  36861. M
  36862. tCSD tCSD
  36863.  
  36864. B
  36865. u
  36866. r
  36867. tRWD tRWD
  36868. s
  36869. t
  36870. RD/
  36871. B
  36872. u tRASD
  36873. s
  36874. t tRASD
  36875.  
  36876. RASD
  36877. C
  36878. y
  36879. c
  36880. l
  36881. e
  36882. tCASD1
  36883. t t t t t
  36884. (
  36885. CASD1 CASD1 CASD1 CASD1 CASD1
  36886. E
  36887. D
  36888. O
  36889.  
  36890. M D63–D0 tRDS tRDH tRDS tRDH
  36891. o
  36892. (read) d0 d1 d2 d3
  36893. d
  36894. e
  36895. , t
  36896. WDD
  36897. R D63–D0
  36898. C (write)
  36899. D
  36900.  
  36901. =
  36902. tBSD tBSD
  36903.  
  36904. 1
  36905.  
  36906. ,
  36907.  
  36908. A
  36909. n
  36910. tDACD tDACD
  36911. W
  36912. tDACD
  36913. DACKn
  36914.  
  36915. = (SA: IO ← memory)
  36916.  
  36917. 1
  36918. ,
  36919.  
  36920. T
  36921. P
  36922. C
  36923.  
  36924. =
  36925.  
  36926. 1
  36927. )
  36928.  
  36929. ----------------------- Page 747-----------------------
  36930.  
  36931. F
  36932. i
  36933. g
  36934. u
  36935. r
  36936. e
  36937.  
  36938. 2
  36939. 3
  36940. .
  36941. 4
  36942. 0
  36943.  
  36944.  
  36945.  
  36946. D Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tce Tpc
  36947. R CKIO
  36948. A
  36949. M tAD tAD tAD
  36950.  
  36951. B
  36952. A25–A0 row c0 c1 c2 c3
  36953. u
  36954. r
  36955. t tCSD
  36956. C s
  36957. CSD
  36958. t
  36959. y
  36960. c B
  36961. l u
  36962. e s tRWD tRWD
  36963.  
  36964. C C RD/
  36965. A y t
  36966. S c
  36967. RASD t
  36968. l
  36969. t RASD
  36970. e
  36971. RASD
  36972. N
  36973.  
  36974.  
  36975. (
  36976. e E
  36977. g
  36978. a D tCASD1 tCASD1 tCASD1 tCASD1 tCASD1
  36979. t O
  36980. e
  36981.  
  36982. P M
  36983. u
  36984. l o D63–D0 t t t t
  36985. s d
  36986. RDS RDH RDS RDH
  36987. e (read)
  36988. e
  36989. d0 d1 d2 d3
  36990.  
  36991. W ,
  36992. R
  36993. tWDD
  36994. i D63–D0
  36995. d C
  36996. t
  36997. (write)
  36998. h D
  36999. )
  37000. =
  37001. tBSD tBSD
  37002.  
  37003. 1
  37004. ,
  37005.  
  37006. A tDACD
  37007. n
  37008. tDACD t
  37009. W
  37010. DACKn DACD
  37011. (SA: IO ← memory)
  37012.  
  37013. =
  37014.  
  37015. 1
  37016. ,
  37017.  
  37018. T
  37019. P
  37020. C
  37021.  
  37022. =
  37023.  
  37024. 1
  37025. ,
  37026.  
  37027. 2
  37028. 7 -
  37029. 3
  37030. 1
  37031.  
  37032. ----------------------- Page 748-----------------------
  37033.  
  37034. 7
  37035. 3
  37036. 2
  37037.  
  37038. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  37039.  
  37040. F CKIO
  37041. i
  37042. g
  37043. u
  37044. r t t t t
  37045. e
  37046. AD AD AD AD
  37047.  
  37048. 2 A25–A0 Row c0 c1 c2 c3
  37049. 3
  37050. .
  37051. 4
  37052. tCSD
  37053. 1 t
  37054. CSD
  37055.  
  37056.  
  37057. ( D
  37058. E R
  37059. D A
  37060. O t t
  37061. M
  37062. RWD RWD
  37063.  
  37064. M B RD/
  37065. o u
  37066. d r
  37067. e s t t
  37068. ,
  37069. RASD RASD
  37070. t
  37071. R B
  37072. C u
  37073. D s t
  37074. C
  37075. t t t t CASD1
  37076. =
  37077. CASD1 CASD1 CASD1 CASD1
  37078. y
  37079. 0 c
  37080.  
  37081. , l
  37082. e
  37083. A :
  37084. n R
  37085. W
  37086. tRDS tRDH tRDS tRDH
  37087. A
  37088. D63–D0
  37089. S
  37090. (read) d0 d1 d2 d3
  37091. =
  37092. D
  37093. t
  37094. 0
  37095. WDD
  37096. ) o
  37097. w
  37098. D63–D0
  37099. (write)
  37100. n
  37101.  
  37102. M
  37103. tBSD tBSD tBSD tBSD
  37104. o
  37105. d
  37106.  
  37107. e
  37108.  
  37109. S
  37110. t
  37111. a t t t
  37112. t
  37113. DACD DACD DACD
  37114. e
  37115. DACKn
  37116. (SA: IO ← memory)
  37117.  
  37118. ----------------------- Page 749-----------------------
  37119.  
  37120. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tce
  37121.  
  37122. F
  37123. i CKIO
  37124. g
  37125. u
  37126. r
  37127. e
  37128.  
  37129. tAD tAD tAD
  37130. 2
  37131. 3 A25–A0 c0 c1 c2 c3
  37132. .
  37133. 4
  37134. 2
  37135.  
  37136. tCSD
  37137.  
  37138.  
  37139. tCSD
  37140. D
  37141. R
  37142.  
  37143. ( A
  37144. E M
  37145. D t t
  37146. B
  37147. RWD RWD
  37148. O
  37149. u RD/
  37150. M r
  37151. s
  37152. o t RAS-down
  37153. d B mode ended
  37154. e u t
  37155. ,
  37156. RASD
  37157. s
  37158. R
  37159. C C
  37160. y
  37161. D
  37162. t
  37163. c
  37164. CASD1
  37165. l
  37166. e
  37167. t t t t
  37168. =
  37169. CASD1 CASD1 CASD1 CASD1
  37170. :
  37171.  
  37172. 0 R
  37173. ,
  37174. A A
  37175. n S
  37176. W D D63–D0 tRDS tRDH tRDS tRDH
  37177. o
  37178. = w (read) d0 d1 d2 d3
  37179. 0 n t
  37180. )
  37181. WDD
  37182. M
  37183. o
  37184. D63–D0
  37185. d (write)
  37186. e
  37187.  
  37188. C tBSD tBSD tBSD tBSD
  37189. o
  37190. n
  37191. t
  37192. i
  37193. n
  37194. u
  37195. a
  37196. t
  37197. i t t
  37198. o
  37199. DACD DACD
  37200. n DACKn
  37201.  
  37202. (SA: IO ← memory)
  37203.  
  37204. 7
  37205. 3
  37206. 3
  37207.  
  37208. ----------------------- Page 750-----------------------
  37209.  
  37210. 7
  37211. 3 F
  37212. 4 i
  37213. g
  37214. u
  37215. r Tc2 Tc1 Tc2 Tpc
  37216. e
  37217. Tr1 Tr2 Tc1 Tc2 Tc1 Tc2 Tc1
  37218.  
  37219. 2
  37220. 3 CKIO
  37221. .
  37222. 4
  37223. 3
  37224.  
  37225.  
  37226. tAD tAD tAD
  37227.  
  37228. D A25–A0 Row c0 c1 c2 c3
  37229. R
  37230. A
  37231. M
  37232. tCSD tCSD
  37233.  
  37234. B
  37235. u
  37236. r
  37237. s t
  37238. t
  37239. RWD tRWD
  37240.  
  37241. B
  37242. RD/
  37243. u
  37244. s
  37245.  
  37246. C tRASD tRASD tRASD
  37247. y
  37248. c
  37249. l
  37250. e
  37251.  
  37252. (
  37253. F tCASD1 t t t t
  37254. a
  37255. CASD1 CASD1 CASD1 CASD1
  37256. s
  37257. t
  37258.  
  37259.  
  37260. P
  37261. a
  37262. g
  37263. e
  37264. D63–D0 tRDS tRDH tRDS tRDH
  37265.  
  37266. M (read) d0 d1 d2 d3
  37267. o
  37268. tWDD
  37269. d
  37270. e
  37271. tWDD tWDD tWDD
  37272. ,
  37273. D63–D0
  37274. R
  37275. d0 d1 d2 d3
  37276. (write)
  37277. C
  37278. D
  37279.  
  37280. =
  37281. tBSD tBSD
  37282.  
  37283. 0
  37284. ,
  37285.  
  37286. A
  37287. n
  37288. W tDACD tDACD tDACD
  37289. DACKn
  37290. = (SA: IO ← memory)
  37291.  
  37292. 0
  37293. ,
  37294. t t
  37295. T
  37296. DACD DACD tDACD
  37297. P DACKn
  37298. C (SA: IO → memory)
  37299.  
  37300. =
  37301.  
  37302. 1
  37303. )
  37304.  
  37305. ----------------------- Page 751-----------------------
  37306.  
  37307. F
  37308. i
  37309. g
  37310. u
  37311. r
  37312. e
  37313.  
  37314. 2
  37315. 3
  37316. .
  37317. 4
  37318. 4
  37319.  
  37320. Tr1 Tr2 Trw Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tc1 Tcw Tc2 Tpc
  37321.  
  37322. D
  37323. R
  37324. CKIO
  37325. A t t
  37326. M
  37327. AD tAD AD
  37328. A25–A0 Row c0 c1 c2 c3
  37329.  
  37330. B
  37331. u t tCSD
  37332. r
  37333. CSD
  37334. s
  37335. t
  37336.  
  37337. B
  37338. u
  37339. tRWD tRWD
  37340. s RD/
  37341.  
  37342. C
  37343. y
  37344. tRASD t
  37345. c
  37346. tRASD RASD
  37347. l
  37348. e
  37349.  
  37350.  
  37351. (
  37352. F
  37353. a
  37354. tCASD1 tCASD1 tCASD1 tCASD1 tCASD1
  37355. s
  37356. t
  37357.  
  37358.  
  37359. P
  37360. a t
  37361. g
  37362. D63–D0 tRDS tRDH tRDS RDH
  37363. e
  37364. (read) d0 d1 d2 d3
  37365. M
  37366. tWDD
  37367. o
  37368. tWDD tWDD t
  37369. d
  37370. WDD
  37371. D63–D0
  37372. e
  37373. d0 d1 d2 d3
  37374. (write)
  37375. ,
  37376.  
  37377. R
  37378. C
  37379. tBSD tBSD
  37380. D
  37381.  
  37382. = tDACD
  37383.  
  37384. 1
  37385. tDACD tDACD
  37386. ,
  37387. DACKn
  37388. A (SA: IO ← memory)
  37389. n t
  37390. W
  37391. DACD tDACD tDACD
  37392.  
  37393. DACKn
  37394. = (SA: IO → memory)
  37395.  
  37396. 1
  37397. ,
  37398.  
  37399. T
  37400. P
  37401. C
  37402.  
  37403. =
  37404.  
  37405. 7 1
  37406. 3 )
  37407. 5
  37408.  
  37409. ----------------------- Page 752-----------------------
  37410.  
  37411. 7
  37412. 3
  37413. 6
  37414. (
  37415. F
  37416. a
  37417. s
  37418. t
  37419.  
  37420. P
  37421. a
  37422. g
  37423. e
  37424.  
  37425. M
  37426. o
  37427. d
  37428. e Tr1 Tr2 Trw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tc1 Tcw Tc2 Tcnw Tpc
  37429. ,
  37430.  
  37431. R CKIO
  37432. C t t t
  37433. D
  37434. AD AD AD
  37435. F
  37436.  
  37437. A25–A0
  37438. i
  37439. Row c0 c1 c2 c3
  37440. = g
  37441. u t
  37442. 1
  37443. t CSD
  37444. r
  37445. CSD
  37446. ,
  37447. e
  37448.  
  37449.  
  37450. A 2
  37451. n 3
  37452. tRWD tRWD
  37453. W .
  37454. 4
  37455. RD/
  37456. 5
  37457. =
  37458. t
  37459. RASD t
  37460.  
  37461. RASD
  37462.  
  37463. t
  37464.  
  37465. RASD
  37466. 1 D
  37467. ,
  37468.  
  37469. T R t t t
  37470. A
  37471. CASD1 t CASD1 t CASD1
  37472. P
  37473. CASD1 CASD1
  37474.  
  37475. C M
  37476. =
  37477. B
  37478. D63–D0 t t t t
  37479.  
  37480. RDS RDH RDS RDH
  37481. 1 u (read) d0 d1 d2 d3
  37482. , r
  37483. t
  37484.  
  37485. WDD
  37486. 2 s
  37487. t t
  37488. t
  37489. WDD WDD t
  37490. -
  37491. WDD
  37492.  
  37493. D63–D0
  37494. C B (write) d0 d1 d2 d3
  37495. y u
  37496. c s
  37497. l
  37498. t t
  37499.  
  37500. BSD BSD
  37501. e C
  37502. C y t
  37503. A c
  37504. DACD
  37505. l t t
  37506. S e
  37507. DACD DACD
  37508. DACKn
  37509.  
  37510. N (SA: IO ← memory) t
  37511. e
  37512. DACD tDACD tDACD
  37513. g DACKn
  37514. a
  37515. t (SA: IO → memory)
  37516. e
  37517.  
  37518. P
  37519. u
  37520. l
  37521. s
  37522. e
  37523.  
  37524. W
  37525. i
  37526. d
  37527. t
  37528. h
  37529. )
  37530.  
  37531. ----------------------- Page 753-----------------------
  37532.  
  37533. F
  37534. i
  37535. g
  37536. u
  37537. r
  37538. e
  37539.  
  37540. 2
  37541. 3
  37542. .
  37543. 4 Tc1 Tc2 Tc1 Tc2
  37544. 6
  37545. Tpc Tr1 Tr2 Tc1 Tc2 Tc1 Tc2
  37546.  
  37547.  
  37548. CKIO
  37549. D
  37550. R t t t t
  37551. A
  37552. AD AD AD AD
  37553. M A25–A0 Row c0 c1 c2 c3
  37554.  
  37555. B t t t
  37556. u
  37557. CSD CSD CSD
  37558. r
  37559. s
  37560. t
  37561.  
  37562. B t t t
  37563. u
  37564. RWD RWD RWD
  37565. s RD/
  37566.  
  37567. C
  37568. y
  37569. tRASD
  37570. c
  37571. tRASD
  37572. l
  37573. e
  37574. 0 :
  37575.  
  37576. ,
  37577. A R
  37578. A
  37579. t t t t t
  37580. n
  37581. CASD1 CASD1 CASD1 CASD1 CASD1
  37582. W S
  37583. D
  37584. = o
  37585. 0 w D63–D0 tRDS tRDH tRDS tRDH
  37586. ) n
  37587. (read) d0 d1 d2 d3
  37588. M
  37589. tWDD
  37590. o
  37591. tWDD tWDD tWDD
  37592. d D63–D0
  37593. e
  37594. d0 d1 d2 d3
  37595. (write)
  37596. S
  37597. t
  37598. a
  37599. t
  37600. tBSD tBSD
  37601. e
  37602.  
  37603. (
  37604.  
  37605. F
  37606. a
  37607. s
  37608. t
  37609. tDACD tDACD tDACD
  37610.  
  37611. P
  37612. DACKn
  37613. a (SA: IO ← memory)
  37614. g
  37615. e t t t
  37616. DACD DACD DACD
  37617. M DACKn
  37618. o (SA: IO → memory)
  37619. d
  37620. e
  37621. ,
  37622.  
  37623. R
  37624. C
  37625. 7 D
  37626. 3
  37627. 7 =
  37628.  
  37629. ----------------------- Page 754-----------------------
  37630.  
  37631. 7 F
  37632. 3 i
  37633. 8 g
  37634. u
  37635. r
  37636. e
  37637.  
  37638. 2
  37639. 3
  37640. .
  37641. 4
  37642. 7
  37643. Tnop Tc1 Tc2 Tc1 Tc2 Tc1 Tc2 Tc1 Tc2
  37644.  
  37645.  
  37646.  
  37647. D
  37648. CKIO
  37649. R
  37650. A
  37651. tAD tAD
  37652. M A25–A0 c0 c1 c2 c3
  37653.  
  37654. B
  37655. u
  37656. tCSD tCSD tCSD
  37657. r
  37658. s
  37659.  
  37660. t
  37661.  
  37662. B
  37663. u
  37664. tRWD tRWD tRWD
  37665. s RD/
  37666.  
  37667. C
  37668. R y
  37669. C c t
  37670. l
  37671. RAS down mode ended RASD
  37672. D e
  37673. :
  37674.  
  37675. = R t t t t
  37676. A
  37677. CASD1 CASD1 CASD1 CASD1
  37678. 0
  37679. tCASD1
  37680. , S
  37681. A
  37682.  
  37683. n D
  37684. W o
  37685. w t t tRDS tRDH
  37686.  
  37687. RDS
  37688. n
  37689. D63–D0 RDH
  37690. = (read) d0 d1 d2 d3
  37691. 0 M tWDD
  37692. )
  37693. o tWDD tWDD tWDD
  37694. d D63–D0
  37695. e d0 d1 d2 d3
  37696. (write)
  37697. C
  37698. o
  37699. n
  37700. tBSD tBSD
  37701. t
  37702. i
  37703. n
  37704. u
  37705. a
  37706. t
  37707. i
  37708. tDACD tDACD tDACD
  37709. o
  37710. n
  37711. DACKn
  37712. (SA: IO ← memory)
  37713. (
  37714. F
  37715. a
  37716. tDACD tDACD tDACD
  37717. s
  37718. t
  37719. DACKn
  37720.  
  37721. P
  37722. (SA: IO → memory)
  37723. a
  37724. g
  37725. e
  37726.  
  37727. M
  37728. o
  37729. d
  37730. e
  37731. ,
  37732.  
  37733. ----------------------- Page 755-----------------------
  37734.  
  37735. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  37736.  
  37737. CKIO
  37738.  
  37739. tAD
  37740.  
  37741. A25–A0
  37742.  
  37743. tCSD
  37744.  
  37745.  
  37746.  
  37747. tRWD
  37748.  
  37749. RD/
  37750.  
  37751. tRASD tRASD tRASD
  37752.  
  37753.  
  37754.  
  37755. tCASD1
  37756. tCASD1 tCASD1
  37757.  
  37758.  
  37759.  
  37760. tWDD
  37761.  
  37762. D63–D0
  37763. (write)
  37764.  
  37765.  
  37766.  
  37767. tDACD
  37768. DACKn
  37769. (SA: IO ← memory)
  37770.  
  37771. tDACD
  37772.  
  37773. DACKn
  37774. (SA: IO → memory)
  37775.  
  37776. Figure 23.48 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 0, TRC = 1)
  37777.  
  37778. 739
  37779.  
  37780. ----------------------- Page 756-----------------------
  37781.  
  37782. TRr1 TRr2 TRr3 TRr4 TRr4w TRr5 Trc Trc Trc
  37783.  
  37784. CKIO
  37785.  
  37786. tAD
  37787.  
  37788. A25–A0
  37789.  
  37790. tCSD
  37791.  
  37792.  
  37793.  
  37794. tRWD
  37795.  
  37796. RD/
  37797.  
  37798. tRASD tRASD tRASD
  37799.  
  37800.  
  37801. tCASD1
  37802. tCASD1 tCASD1
  37803.  
  37804.  
  37805.  
  37806. tWDD
  37807.  
  37808. D63–D0
  37809. (write)
  37810.  
  37811.  
  37812.  
  37813. tDACD
  37814. DACKn
  37815. (SA: IO ← memory)
  37816.  
  37817. tDACD
  37818.  
  37819. DACKn
  37820. (SA: IO → memory)
  37821.  
  37822. Figure 23.49 DRAM Bus Cycle: DRAM CAS-Before-RAS Refresh (TRAS = 1, TRC = 1)
  37823.  
  37824. TRr1 TRr2 TRr3 TRr4 TRr5 Trc Trc Trc
  37825.  
  37826. CKIO
  37827.  
  37828. tAD
  37829.  
  37830. A25–A0
  37831.  
  37832. tCSD
  37833.  
  37834.  
  37835.  
  37836. tRWD
  37837.  
  37838. RD/
  37839.  
  37840. tRASD tRASD tRASD
  37841.  
  37842.  
  37843.  
  37844. tCASD1 tCASD1 tCASD1
  37845.  
  37846.  
  37847.  
  37848. tWDD
  37849.  
  37850. D63–D0
  37851. (write)
  37852.  
  37853.  
  37854.  
  37855. tDACD
  37856. DACKn
  37857. (SA: IO ← memory)
  37858.  
  37859. tDACD
  37860. DACKn
  37861. (SA: IO → memory)
  37862.  
  37863. Figure 23.50 DRAM Bus Cycle: DRAM Self-Refresh (TRC = 1)
  37864.  
  37865. 740
  37866.  
  37867. ----------------------- Page 757-----------------------
  37868.  
  37869. Tpcm1 Tpcm2 Tpcm0 Tpcm1 Tpcm1w Tpcm1w Tpcm2 Tpcm2w
  37870.  
  37871. F
  37872. CKIO
  37873. i
  37874. g
  37875. u tAD tAD tAD tAD
  37876. r
  37877. e A25–A0
  37878.  
  37879. 2
  37880. 3
  37881. .
  37882. 5
  37883. tCSD tCSD tCSD tCSD
  37884. ( 1
  37885. 2
  37886. ) ()
  37887. (
  37888. P 1
  37889. )
  37890. t t t t
  37891. C
  37892. RWD RWD RWD RWD
  37893.  
  37894. O M P RD/
  37895. n C
  37896. e C M
  37897. I
  37898. I A
  37899. t
  37900. C
  37901. tRSD tRSD RSD tRSD t t
  37902. n
  37903. RSD RSD
  37904. t I
  37905. e M A
  37906.  
  37907. r
  37908. n e M
  37909. m
  37910. t t
  37911. a
  37912. RDS RDH t t
  37913. l e
  37914. D15–D0 RDS RDH
  37915. o
  37916. W r m (read)
  37917. y o t
  37918. a
  37919. t
  37920. r
  37921. WED1 WED1
  37922. i B y t t t t
  37923. t
  37924. WEDF WEDF WEDF WEDF
  37925. u
  37926. + s B
  37927.  
  37928.  
  37929. O C u t
  37930. s
  37931. tWDD WDD
  37932. n y C t t t
  37933. c
  37934. WDD WDD tWDD WDD
  37935. e l
  37936. y
  37937. D15–D0
  37938. e
  37939. E ( c (write)
  37940. l
  37941. x T e
  37942. t
  37943. e E (
  37944. tBSD tBSD tBSD
  37945. r D T tBSD
  37946. n E
  37947. a
  37948.  
  37949. l = D
  37950.  
  37951. W 1 =
  37952. tRDYS tRDYH
  37953. ,
  37954.  
  37955. a T 0
  37956. i ,
  37957. t E
  37958. ) T t
  37959. H
  37960. RDYS tRDYH
  37961. E
  37962. t t t t
  37963.  
  37964. DACD DACD DACD DACD
  37965. = H DACKn
  37966.  
  37967. 1 = (DA)
  37968. ,
  37969.  
  37970. 0
  37971. ,
  37972.  
  37973. N
  37974. TED TEH
  37975. o
  37976.  
  37977. W (1) (2)
  37978. a
  37979. i
  37980. t
  37981. ) Note: IO: DACK device
  37982. SA: Single address DMA transfer
  37983. 7
  37984. DA: Dual address DMA transfer
  37985. 4 DACK set to active-high
  37986. 1
  37987.  
  37988. ----------------------- Page 758-----------------------
  37989.  
  37990. 7
  37991. 4
  37992. 2
  37993.  
  37994. Tpci1 Tpci2 Tpci0 Tpci1 Tpci1w Tpci1w Tpci2 Tpci2w
  37995. F
  37996. i
  37997. g
  37998. CKIO
  37999. u
  38000. r t t t t
  38001. e
  38002. AD AD AD AD
  38003.  
  38004. 2
  38005. A25–A0
  38006. 3
  38007. .
  38008. 5
  38009. 2
  38010. tCSD tCSD tCSD tCSD
  38011. (
  38012. 2
  38013. )
  38014. ( ()
  38015. O P 1
  38016. n C ) t t t t
  38017. P
  38018. RWD RWD RWD RWD
  38019. e M C RD/
  38020. I C M
  38021. n
  38022. t I t t
  38023. e A C
  38024. ICRSD ICRSD
  38025. r
  38026. tICRSD t tICRSD
  38027. I
  38028. ICRSD
  38029. n I A
  38030. a / ()
  38031. l O I
  38032. W /
  38033. B O
  38034. tRDS tRDH t t
  38035. a u
  38036. D15–D0 RDS RDH
  38037. i s B (read)
  38038. t C u
  38039. + s
  38040. tICWSDF tICWSDF tICWSDF
  38041. y
  38042. C
  38043. t t
  38044. O c
  38045. ICWSDF ICWSDF
  38046. l y
  38047. n e
  38048. ()
  38049. c
  38050. e ( l
  38051. T e
  38052. t tWDD
  38053. E
  38054. WDD
  38055.  
  38056. E
  38057. t
  38058. (
  38059. WDD tWDD tWDD
  38060. x D T
  38061. t
  38062. D15–D0
  38063. e E (write)
  38064. r = D
  38065. n
  38066. a 1 =
  38067. tBSD tBSD tBSD
  38068. l ,
  38069.  
  38070. t
  38071. 0
  38072. BSD
  38073. W T ,
  38074. E
  38075. a H T
  38076. i
  38077. t t
  38078. E
  38079. RDYS RDYH
  38080. t
  38081.  
  38082. ) = H
  38083.  
  38084. 1 = t t t
  38085. ,
  38086. IO16S RDYS RDYH
  38087.  
  38088. tIO16H
  38089. 0
  38090. ,
  38091.  
  38092.  
  38093. N t t
  38094. o
  38095. tDACD tDACD tDACD IO16S IO16H tDACD
  38096.  
  38097. W
  38098. DACKn
  38099. (DA)
  38100. a
  38101. i
  38102. t
  38103. )
  38104.  
  38105. (1) (2)
  38106.  
  38107. ----------------------- Page 759-----------------------
  38108.  
  38109. F
  38110. i
  38111. g
  38112. u
  38113. r Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w Tpci0 Tpci1 Tpci1w Tpci2 Tpci2w
  38114. e
  38115.  
  38116. 2
  38117. 3
  38118. CKIO
  38119. .
  38120. 5 t t
  38121. 3
  38122. AD AD
  38123.  
  38124. A25–A1
  38125.  
  38126. P
  38127. C tAD
  38128. M A0
  38129. C
  38130. I
  38131. A
  38132. tCSD tCSD tCSD
  38133.  
  38134.  
  38135. I ()
  38136. /
  38137. O
  38138. t t
  38139. B
  38140. RWD RWD
  38141. u
  38142. RD/
  38143. s
  38144.  
  38145. C tICRSD tICRSD tICRSD
  38146. y
  38147. c ()
  38148. l
  38149. e
  38150. S t t
  38151. (
  38152. RDS RDH
  38153. i
  38154. T
  38155. D15–D0
  38156. z
  38157. i
  38158. E
  38159. (read)
  38160. n
  38161. g D
  38162. tICWSDF tICWSDF tICWSDF tICWSDF
  38163. ) t
  38164. =
  38165. ICWSDF
  38166.  
  38167. 1
  38168. ()
  38169. ,
  38170.  
  38171. T
  38172. tWDD tWDD tWDD
  38173. E
  38174. tWDD tWDD
  38175. H D15–D0
  38176. (write)
  38177. =
  38178.  
  38179. 1
  38180. tBSD tBSD
  38181. ,
  38182.  
  38183. O
  38184. n
  38185.  
  38186. e
  38187. tRDYS tRDYH tRDYS tRDYH
  38188.  
  38189. I
  38190. n
  38191. t
  38192. e
  38193.  
  38194. r
  38195. n
  38196. a
  38197. l
  38198.  
  38199. W t t
  38200. a
  38201. IO16S IO16H
  38202. i
  38203. t
  38204. ,
  38205.  
  38206. B
  38207. u
  38208. 7 s
  38209. 4
  38210. 3
  38211.  
  38212. ----------------------- Page 760-----------------------
  38213.  
  38214. 7
  38215. 4 Tm1 Tmd1w Tmd1 Tm0 Tmd1w Tmd1w Tmd1
  38216. 4 (
  38217. 2
  38218. )
  38219. CKIO
  38220. M F
  38221. i
  38222. P g
  38223. tFMD tFMD tFMD tFMD
  38224. X u
  38225. r /
  38226. B e tRDS tRDS
  38227. a 2 t t t t t t
  38228. s 3
  38229. WDD WDD RDH WDD WDD RDH
  38230. i .
  38231. c 5
  38232. D63–D0 A D0 A D0
  38233. 4
  38234. B
  38235. u
  38236. s ( t t t t
  38237. 1
  38238. CSD CSD CSD CSD
  38239. C )
  38240. y M
  38241.  
  38242. c
  38243. l P
  38244. e
  38245. tRWD tRWD tRWD tRWD
  38246. : X
  38247. R B
  38248. e
  38249. a
  38250. RD/
  38251. a
  38252. d s
  38253. i
  38254. c t t t t
  38255. (
  38256. WED1 WED1 WED1 WED1
  38257. 1 B
  38258. s
  38259. t u
  38260. s
  38261. D
  38262. t t
  38263.  
  38264. t t RDYS RDYH
  38265. C
  38266. RDYS RDYH
  38267. a
  38268. t y
  38269. a c
  38270. : l
  38271. t t
  38272. e
  38273. t RDYS RDYH
  38274. O :
  38275. BSD t t
  38276.  
  38277. t BSD BSD
  38278. n R
  38279. BSD
  38280. e e
  38281. a
  38282.  
  38283. I
  38284. n d
  38285. t
  38286. e (
  38287. t t
  38288. 1
  38289. DACD DACD t t
  38290. r
  38291. DACD DACD
  38292. n s
  38293. t
  38294. a
  38295. DACKn
  38296. l D (DA)
  38297. W a
  38298. t
  38299. a a
  38300. :
  38301. i
  38302. t O (1) (2)
  38303. + n
  38304. O e 1st data bus cycle information 1st data bus cycle information
  38305. n I D63–D61: Access size D63–D61: Access size
  38306. e n
  38307. t 000: Byte 000: Byte
  38308. E e
  38309. r 001: Word (2 bytes) 001: Word (2 bytes)
  38310. x n
  38311. t
  38312. a
  38313. 010: Long (4 bytes) 010: Long (4 bytes)
  38314. e
  38315. r l 011: Quad (8 bytes) 011: Quad (8 bytes)
  38316. n W 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38317. a
  38318. l a D25–D0: Address D25–D0: Address
  38319. W i
  38320. t
  38321. )
  38322. a Note: IO: DACK device
  38323. i
  38324. t SA: Single address DMA transfer
  38325. ) DA: Dual address DMA transfer
  38326.  
  38327. DACK set to active-high
  38328.  
  38329. ----------------------- Page 761-----------------------
  38330.  
  38331. (
  38332. 3
  38333. )
  38334.  
  38335. M
  38336. P
  38337. Tm1 Tmd1 Tm1 Tmd1w Tmd1 Tm1 Tmd1w Tmd1w Tmd1
  38338. X
  38339. B F CKIO
  38340. i
  38341. a ( g
  38342. 2
  38343. t t
  38344. s u
  38345. tFMD tFMD FMD FMD tFMD tFMD
  38346. i )
  38347. c r
  38348. M e
  38349. /
  38350.  
  38351. B P 2
  38352. u 3 t t t t t t t t t
  38353. X
  38354. WDD WDD WDD WDD WDD WDD WDD WDD WDD
  38355. s .
  38356. 5 D63–D0
  38357. C
  38358. A D0 A D0 A D0
  38359. B 5
  38360. y a
  38361. c s ( t t t t t t
  38362. l
  38363. CSD CSD CSD CSD CSD CSD
  38364. e i 1
  38365. c
  38366. : )
  38367.  
  38368.  
  38369. W B M
  38370. u
  38371. tRWD tRWD tRWD
  38372. r s P t t t
  38373. i
  38374. RWD RWD RWD
  38375. t C X
  38376. e
  38377. y B
  38378. RD/
  38379. ( c
  38380. 1 l a
  38381. e
  38382. t t t t t t
  38383. s s
  38384. WED1 WED1 WED1 WED1 WED1 WED1
  38385. t : i
  38386. c
  38387.  
  38388. D W B
  38389. a
  38390. t t
  38391. r u
  38392. RDYS RDYH
  38393. t
  38394. t t t t
  38395. i
  38396. RDYS RDYH RDYS RDYH
  38397. a t s
  38398. : e
  38399. C
  38400. O
  38401.  
  38402. (
  38403. t t
  38404. y
  38405. RDYS RDYH
  38406. 1
  38407. t tBSD tBSD
  38408. n c
  38409. BSD
  38410. s t t t
  38411. e t l
  38412. BSD BSD BSD
  38413. e
  38414. I D :
  38415. n a W
  38416. t t
  38417. e a r
  38418. tDACD tDACD t t tDACD t
  38419. r
  38420. DACD DACD DACD
  38421. : i
  38422. n t
  38423. a O e DACKn
  38424. l n ( (DA)
  38425. W e 1
  38426. s
  38427. I t
  38428. a n D
  38429. i
  38430. t t
  38431. e a
  38432. + r t (1) (2) (3)
  38433. n a
  38434. O a :
  38435. n l N 1st data bus cycle information 1st data bus cycle information 1st data bus cycle information
  38436. e W o D63–D61: Access size D63–D61: Access size D63–D61: Access size
  38437. E a W 000: Byte 000: Byte 000: Byte
  38438. x i
  38439. t t a 001: Word (2 bytes) 001: Word (2 bytes) 001: Word (2 bytes)
  38440. )
  38441. e i
  38442. r t 010: Long (4 bytes) 010: Long (4 bytes) 010: Long (4 bytes)
  38443. )
  38444. n 011: Quad (8 bytes) 011: Quad (8 bytes) 011: Quad (8 bytes)
  38445. a
  38446. l 1xx: Burst (32 bytes) 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38447.  
  38448. W D25–D0: Address D25–D0: Address D25–D0: Address
  38449. a
  38450. i
  38451. t
  38452. 7 )
  38453. 4
  38454. 5
  38455.  
  38456. ----------------------- Page 762-----------------------
  38457.  
  38458. 7
  38459. 4
  38460. 6
  38461.  
  38462. F
  38463. i
  38464. g
  38465. u
  38466. r Tm1 Tmd1w Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  38467. e
  38468.  
  38469. 2
  38470. (
  38471. CKIO
  38472. 2 3
  38473. .
  38474. ) 5 tFMD tFMD tFMD tFMD
  38475. M 6 /
  38476. P (
  38477. X 1 tWDD tWDD tRDS tRDH tWDD tWDD tRDS tRDH
  38478. )
  38479. B
  38480. D63–D0
  38481. 2
  38482. A D0 D1 D2 D3 A D0 D1 D2 D3
  38483. n u M
  38484. d s 2 P t t t t
  38485. /
  38486. CSD CSD CSD CSD
  38487. 3 C n X
  38488. r d
  38489. y
  38490.  
  38491. d / B
  38492. / c 3 t
  38493. l r u
  38494. RWD
  38495. 4 e t t t
  38496. d s
  38497. RWD RWD
  38498. t
  38499. RWD
  38500. :
  38501. h / C
  38502. B 4 RD/
  38503. D u t y
  38504. a r h c t t t t
  38505. l
  38506. WED1 WED1 WED1 WED1
  38507. t s D e
  38508. a t
  38509.  
  38510. : a :
  38511. R
  38512. t t
  38513. t B
  38514. RDYH RDYS
  38515. E e a u tRDYS tRDYH tRDYS tRDYH
  38516. x a : r
  38517. t d N s
  38518. e
  38519.  
  38520. t
  38521. r ( o
  38522. tBSD tBSD
  38523. n 1 I R t t
  38524. s
  38525. BSD BSD
  38526. a t n e
  38527. l t a
  38528. W D e d
  38529. a r
  38530. n (
  38531. t t t t
  38532. a t
  38533. DACD DACD DACD DACD
  38534. i a a 1
  38535. t : l s
  38536. t
  38537. DACKn
  38538.  
  38539. C N W D (DA)
  38540. o o a a
  38541. n I i t
  38542. t n t a
  38543. r ) :
  38544. o t
  38545. l e O (1) (2)
  38546. ) r
  38547. n n 1st data bus cycle information 1st data bus cycle information
  38548. a e
  38549. l D63–D61: Access size D63–D61: Access size
  38550. I
  38551. W n 000: Byte 000: Byte
  38552. t
  38553. a e 001: Word (2 bytes) 001: Word (2 bytes)
  38554. i r
  38555. t n
  38556. 010: Long (4 bytes) 010: Long (4 bytes)
  38557. ;
  38558. a 011: Quad (8 bytes) 011: Quad (8 bytes)
  38559. l
  38560. 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38561. W D25–D0: Address D25–D0: Address
  38562. a
  38563. i
  38564. t
  38565. ;
  38566.  
  38567. ----------------------- Page 763-----------------------
  38568.  
  38569. F
  38570. i
  38571. g
  38572. u
  38573. Tm1 Tmd1 Tmd2 Tmd3 Tmd4 Tm1 Tmd1w Tmd1 Tmd2w Tmd2 Tmd3 Tmd4w Tmd4
  38574. r
  38575. e
  38576. CKIO
  38577. ( 2
  38578. 2 2 3
  38579. n )
  38580. t t t
  38581. .
  38582. FMD FMD tFMD FMD
  38583. d 5
  38584. / M 7 /
  38585. 3
  38586. r P
  38587. d X (
  38588. tWDD t tWDD t
  38589. 1
  38590. WDD WDD
  38591. /
  38592.  
  38593. 4 )
  38594. D63–D0
  38595. t B A D0 D1 D2 D3 A D0 D1 D2 D3
  38596. h u M
  38597. s
  38598. D P
  38599. t t t t
  38600. 2
  38601. CSD CSD CSD CSD
  38602. a C n X
  38603. t y d
  38604.  
  38605. a c / B
  38606. : l 3
  38607. t t
  38608. u
  38609. RWD
  38610. e
  38611. RWD
  38612.  
  38613. N : r s t t
  38614. d
  38615. RWD RWD
  38616.  
  38617. o B / C
  38618. 4
  38619. u
  38620. RD/
  38621. I t y
  38622. n r h c
  38623. t s l
  38624. tWED1 tWED1 tWED1 tWED1
  38625. e t D e
  38626. r :
  38627.  
  38628. n W a B
  38629. t
  38630. t t
  38631. a
  38632. RDYH
  38633. r a
  38634. RDYS
  38635. l i : u tRDYS tRDYH tRDYS tRDYH
  38636. t r
  38637. W e N s
  38638. t
  38639. ( o
  38640.  
  38641. a 1 W t t
  38642. i BSD BSD
  38643. t s I t t
  38644. t n r
  38645. BSD BSD
  38646. + t i
  38647. D e t
  38648. E a r e
  38649. x t n (
  38650. a a 1
  38651. t t t
  38652. t
  38653. DACD DACD tDACD DACD
  38654. e : l s
  38655. r O W t
  38656. n
  38657. DACKn
  38658. a n a D (DA)
  38659. l e i a
  38660. t
  38661. W I t a
  38662. )
  38663. n :
  38664. a t O
  38665. i e
  38666. t r n (1) (2)
  38667. C n e
  38668. a 1st data bus cycle information 1st data bus cycle information
  38669. o l I
  38670. n n D63–D61: Access size D63–D61: Access size
  38671. t W t
  38672. r e 000: Byte 000: Byte
  38673. o a r
  38674. i n
  38675. 001: Word (2 bytes) 001: Word (2 bytes)
  38676. l
  38677. ) t
  38678. ; a 010: Long (4 bytes) 010: Long (4 bytes)
  38679. l
  38680. 011: Quad (8 bytes) 011: Quad (8 bytes)
  38681. W 1xx: Burst (32 bytes) 1xx: Burst (32 bytes)
  38682. a
  38683. i
  38684. D25–D0: Address D25–D0: Address
  38685. t
  38686. ;
  38687.  
  38688. 7
  38689. 4
  38690. 7
  38691.  
  38692. ----------------------- Page 764-----------------------
  38693.  
  38694. 7
  38695. 4
  38696. 8
  38697. T1 T2 T1 Tw T2 T1 Tw Twe T2
  38698.  
  38699. CKIO
  38700.  
  38701. tAD tAD tAD tAD tAD tAD
  38702.  
  38703. A25–A0
  38704. (
  38705. 3
  38706. )
  38707. tCSD tCSD tCSD tCSD tCSD tCSD
  38708.  
  38709. B F
  38710. a i
  38711. s g
  38712. i u
  38713. c r tRWD tRWD tRWD tRWD tRWD tRWD
  38714. R e RD/
  38715. e ( 2
  38716. a 2 3
  38717. d ) . t t t t t t t t t
  38718. 5
  38719. RSD RSD RSD RSD RSD RSD RSD RSD RSD
  38720. B 8
  38721. C a (
  38722. y s 1
  38723. c i ) M
  38724. c
  38725. t t t t t t
  38726. l
  38727. RDS RDH RDS RDH RDS RDH
  38728. e B
  38729. D63–D0
  38730. ( R a e
  38731. m
  38732. (read) t
  38733. O e s
  38734. WED1 tWED1 tWED1
  38735. a i o
  38736. n d c
  38737. t t t t t t
  38738. r
  38739. WEDF WED1 WEDF WED1 WEDF WED1
  38740.  
  38741. e R y
  38742. C
  38743.  
  38744. I e
  38745. n y a B
  38746. t c d y
  38747. t t t
  38748. e l
  38749. BSD BSD BSD
  38750. t
  38751. r e C e
  38752. tBSD t t
  38753.  
  38754. BSD BSD
  38755. n (
  38756. a O y C
  38757. c
  38758.  
  38759. l n l o
  38760. W e e n t t t
  38761. t
  38762. RDYS RDYS RDYH
  38763. (
  38764. r
  38765. t
  38766. a I N
  38767. RDYH
  38768. i n o
  38769. t t o l
  38770. + e W S t t
  38771. r
  38772. RDYS RDYH
  38773. R
  38774. t t
  38775.  
  38776. t t t
  38777. n
  38778. DACD DACD DACD DACD DACD
  38779. O a a A tDACD tDACD tDACD tDACD
  38780. i
  38781. n l t M
  38782. )
  38783. DACKn
  38784. e W (SA: IO ← memory)
  38785. E a B
  38786. x i u
  38787. t t
  38788. s
  38789. t t
  38790. )
  38791. t
  38792. e
  38793. tDACD tDACD tDACD DACD DACD DACD
  38794.  
  38795. r C
  38796. n DACKn
  38797. a y (DA)
  38798. l c
  38799. l
  38800. W e
  38801. s
  38802. a
  38803. i
  38804. t
  38805. )
  38806.  
  38807. (1) (2) (3)
  38808.  
  38809. Note: IO: DACK device
  38810. SA: Single address DMA transfer
  38811. DA: Dual address DMA transfer
  38812. DACK set to active-high
  38813.  
  38814. ----------------------- Page 765-----------------------
  38815.  
  38816. TS1 T1 T2 TH1
  38817.  
  38818. CKIO
  38819.  
  38820. tAD tAD
  38821.  
  38822. A25–A0
  38823.  
  38824. tCSD tCSD
  38825.  
  38826.  
  38827.  
  38828. tRWD tRWD
  38829.  
  38830. RD/
  38831.  
  38832. tRSD tRSD tRSD
  38833.  
  38834.  
  38835.  
  38836. D63–D0 tRDS tRDH
  38837.  
  38838. (read)
  38839. tWED1
  38840. tWEDF tWED1
  38841.  
  38842.  
  38843.  
  38844. tBSD
  38845. tBSD
  38846.  
  38847.  
  38848.  
  38849.  
  38850.  
  38851. tDACD tDACD
  38852. DACKn
  38853. (SA: IO ← memory)
  38854.  
  38855. tDACD tDACD
  38856.  
  38857. DACKn
  38858. (DA)
  38859.  
  38860. Figure 23.59 Memory Byte Control SRAM Bus Cycle: Basic Read Cycle (No Wait,
  38861. Address Setup/Hold Time Insertion, AnS = 1, AnH = 1)
  38862.  
  38863. 749
  38864.  
  38865. ----------------------- Page 766-----------------------
  38866.  
  38867. 23.3.4 Peripheral Module Signal Timing
  38868.  
  38869. Table 23.8 Peripheral Module Signal Timing
  38870. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2
  38871. DDQ DD a L
  38872.  
  38873. on)
  38874.  
  38875. 66 MHz 83 MHz 100 MHz
  38876.  
  38877. Module Item Symbol Min Max Min M ax Min Ma x Unit Figure
  38878.  
  38879. TMU, Timer clock pulse tTCLKWH 4 — 4 — 4 — Pcyc* 23.60
  38880. RTC width (high)
  38881.  
  38882. Timer clock pulse tTCLKWL 4 — 4 — 4 — Pcyc* 23.60
  38883. width (low)
  38884.  
  38885. Timer clock rise tTCLKr — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38886. time
  38887.  
  38888. Timer clock fall tTCLKf — 0.8 — 0.8 — 0.8 Pcyc* 23.60
  38889. time
  38890.  
  38891. Oscillation settling tROSC — 3 — 3 — 3 s 23.61
  38892. time
  38893.  
  38894. SCI Input clock cycle tScyc 4 — 4 — 4 — Pcyc* 23.62
  38895. (asynchronous)
  38896.  
  38897. Input clock cycle tScyc 6 — 6 — 6 — Pcyc* 23.62
  38898. (synchronous)
  38899.  
  38900. Input clock pulse tSCKW 0.4 0.6 0.4 0.6 0.4 0.6 tScyc 23.62
  38901. width
  38902.  
  38903. Input clock rise tSCKr — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38904. time
  38905.  
  38906. Input clock fall tSCKf — 0.8 — 0.8 — 0.8 Pcyc* 23.62
  38907. time
  38908.  
  38909. Transfer data t — 30 — 30 — 30 ns 23.63
  38910. TXD
  38911.  
  38912. delay time
  38913.  
  38914. Receive data tRXS 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38915. setup time
  38916. (synchronous)
  38917.  
  38918. Receive data tRXH 0.8 — 0.8 — 0.8 — Pcyc* 23.63
  38919. hold time
  38920. (synchronous)
  38921.  
  38922. 750
  38923.  
  38924. ----------------------- Page 767-----------------------
  38925.  
  38926. Table 23.8 Peripheral Module Signal Timing (cont)
  38927. (V = 3.0 to 3.6 V, V = typ. 1.8 V, T = –20 to +75°C, C = 30 pF, PLL2
  38928. DDQ DD a L
  38929.  
  38930. on)
  38931.  
  38932. 66 MHz 83 MHz 1 0 0
  38933. MH z
  38934.  
  38935. Module Item Symbo Min M a Min M a Min M a Unit Figure Note
  38936. l x x x
  38937.  
  38938. I/O ports Output data delay tPORTD — 10 — 8 — 6 ns 23.64
  38939. time
  38940.  
  38941. Input data setup tPORTS 2 — 2 — 2 — ns 23.64 BGABGA
  38942. time
  38943.  
  38944. 3.5 — 3.5 — — — ns QFPQFP
  38945.  
  38946. Input data hold tPORTH 1.5 — 1.5 — 1.5 — ns 23.64
  38947. time
  38948.  
  38949. DMAC setup time tDRQS 2 — 2 — 2 — ns 23.65 BGABGA
  38950.  
  38951. 3.5 — 3.5 — — — ns QFPQFP
  38952.  
  38953. hold time tDRQH 1.5 — 1.5 — 1.5 — ns 23.65
  38954.  
  38955. DRAKn delay time tDRAKD — 10 — 8 — 6 ns 23.65
  38956.  
  38957. Hitachi- Input clock cycle tTCKcyc 50 — 50 — 50 — ns 23.66
  38958. UDI
  38959.  
  38960. Input clock pulse tTCKH 15 — 15 — 15 — ns 23.66
  38961. width (high)
  38962.  
  38963. Input clock pulse tTCKL 15 — 15 — 15 — ns 23.66
  38964. width (low)
  38965.  
  38966. Input clock rise tTCKr — 10 — 10 — 10 ns 23.66
  38967. time
  38968.  
  38969. Input clock fall tTCKf — 10 — 10 — 10 ns 23.66
  38970. time
  38971.  
  38972. Hitachi- setup t 10 — 10 — 10 — t 23.67
  38973. ASEBRKS cyc
  38974.  
  38975. UDI time
  38976.  
  38977. hold time t 10 — 10 — 10 — t 23.67
  38978. ASEBRKH cyc
  38979.  
  38980. TDI/TMS setup tTDIS 15 — 15 — 15 — ns 23.68
  38981. time
  38982.  
  38983. TDI/TMS hold time t 15 — 15 — 15 — ns 23.68
  38984. TDIH
  38985.  
  38986. TDO delay time tTDO 0 10 0 10 0 10 ns 23.68
  38987.  
  38988. ASE-PINBRK tPINBRK 2 — 2 — 2 — Pcyc 23.69
  38989. pulse width *
  38990.  
  38991. Note: * Pcyc: P clock cycles
  38992.  
  38993. 751
  38994.  
  38995. ----------------------- Page 768-----------------------
  38996.  
  38997. TCLK
  38998.  
  38999. tTCLKWH tTCLKWL
  39000. tTCLKf tTCLKr
  39001.  
  39002. Figure 23.60 TCLK Input Timing
  39003.  
  39004. Stable oscillation
  39005.  
  39006. RTC internal clock
  39007.  
  39008. V
  39009. cc
  39010. V min
  39011. cc tROSC
  39012.  
  39013. Figure 23.61 RTC Oscillation Settling Time at Power-On
  39014.  
  39015. tSCKW
  39016.  
  39017. SCK, SCK2
  39018.  
  39019. t
  39020. Scyc
  39021. tSCKf tSCKr
  39022.  
  39023. Figure 23.62 SCK Input Clock Timing
  39024.  
  39025. 752
  39026.  
  39027. ----------------------- Page 769-----------------------
  39028.  
  39029. t
  39030. Scyc
  39031.  
  39032. SCK
  39033.  
  39034. tTXD tTXD
  39035.  
  39036. TXD
  39037.  
  39038. RXD
  39039.  
  39040. tRXS tRXH
  39041.  
  39042. Figure 23.63 SCI I/O Synchronous Mode Clock Timing
  39043.  
  39044. CKIO
  39045.  
  39046. Ports 19–0
  39047. (read)
  39048.  
  39049. tPORTS tPORTH
  39050.  
  39051. tPORTD tPORTD
  39052. Ports 19–0
  39053. (write)
  39054.  
  39055. Figure 23.64 I/O Port Input/Output Timing
  39056.  
  39057. CKIO
  39058.  
  39059. tDRQH tDRQH
  39060.  
  39061.  
  39062.  
  39063. tDRQS tDRQS
  39064.  
  39065. tDRAKD
  39066. DRAKn
  39067.  
  39068. Figure 23.65 /DRAK Timing
  39069.  
  39070. 753
  39071.  
  39072. ----------------------- Page 770-----------------------
  39073.  
  39074. tTCKcyc
  39075.  
  39076. tTCKH tTCKL
  39077.  
  39078. VIH VIH VIH
  39079. 1/2VDDQ 1/2VDDQ
  39080.  
  39081. VIL VIL
  39082.  
  39083. tTCKf tTCKr
  39084.  
  39085. Note: When clock is input from TCK pin
  39086.  
  39087. Figure 23.66 TCK Input Timing
  39088.  
  39089.  
  39090.  
  39091. SCK2/
  39092.  
  39093.  
  39094. tASEBRKS tASEBRKH tASEBRKS tASEBRKH
  39095.  
  39096. /
  39097. BRKACK
  39098.  
  39099. Figure 23.67 Reset Hold Timing
  39100.  
  39101. t
  39102. TCK TCKcyc
  39103.  
  39104. TDI tTDIS tTDIH
  39105. TMS
  39106.  
  39107. tTDO
  39108. TDO
  39109.  
  39110. Figure 23.68 Hitachi-UDI Data Transfer Timing
  39111.  
  39112. tPINBRK
  39113.  
  39114.  
  39115.  
  39116. Figure 23.69 Pin Break Timing
  39117.  
  39118. 754
  39119.  
  39120. ----------------------- Page 771-----------------------
  39121.  
  39122. 23.3.5 AC Characteristic Test Conditions
  39123.  
  39124. The AC characteristic test conditions are as follows:
  39125.  
  39126. • Input/output signal reference level: 1.5 V (VDDQ = 3.3 ±0.3 V)
  39127.  
  39128. • Input pulse level: VSSQ –3.0 V (VSSQ –VDDQ for , , NMI, and
  39129. /BRKACK)
  39130.  
  39131. • Input rise/fall time: 1 ns
  39132.  
  39133. The output load circuit is shown in figure 23.70.
  39134.  
  39135. IOL
  39136.  
  39137. LSI output pin DUT output
  39138.  
  39139. CL VREF
  39140.  
  39141. IOH
  39142.  
  39143. Notes: 1. C is the total value, including the capacitance of the test jig, etc.
  39144. L
  39145. The capacitance of each pin is set to 30 pF.
  39146. 2. IOL and IOH values are as shown in table 23.3, Permissible Output Currents.
  39147.  
  39148. Figure 23.70 Output Load Circuit
  39149.  
  39150. 755
  39151.  
  39152. ----------------------- Page 772-----------------------
  39153.  
  39154. 23.3.6 Delay Time Variation Due to Load Capacitance
  39155.  
  39156. A graph (reference data) of the variation in delay time when a load capacitance greater than
  39157. that stipulated (30 pF) is connected to the SH7750’s pins is shown below. The graph shown in
  39158. figure 23.71 should be taken into consideration if the stipulated capacitance is exceeded
  39159. when connecting an external device.
  39160.  
  39161. The graph will not be linear if the connected load capacitance exceeds the range shown in
  39162. figure 23.71.
  39163.  
  39164. +4.0 ns
  39165.  
  39166. +3.0 ns
  39167.  
  39168. e
  39169. m
  39170. i
  39171. T
  39172. +2.0 ns
  39173. y
  39174. a
  39175. l
  39176. e
  39177. D
  39178.  
  39179. +1.0 ns
  39180.  
  39181. +0.0 ns
  39182. +0 pF +25 pF +50 pF
  39183.  
  39184. Load Capacitance
  39185.  
  39186. Figure 23.71 Load Capacitance vs. Delay Time
  39187.  
  39188. 756
  39189.  
  39190. ----------------------- Page 773-----------------------
  39191.  
  39192. Appendix A Address List
  39193.  
  39194. Table A.1 Address List
  39195.  
  39196. Module Register P4 Address Area 7 Size Power-On Manual Sleep StandbySyncho-
  39197. Address* 1 Reset Reset nization
  39198.  
  39199. Clock
  39200.  
  39201. CCN PTEH H'FF00 0000 H'1F00 0000 32 Undefined Undefined Held Held Iclk
  39202.  
  39203. CCN PTEL H'FF00 0004 H'1F00 0004 32 Undefined Undefined Held Held Iclk
  39204.  
  39205. CCN TTB H'FF00 0008 H'1F00 0008 32 Undefined Undefined Held Held Iclk
  39206.  
  39207. CCN TEA H'FF00 000C H'1F00 000C 32 Undefined Held Held Held Iclk
  39208.  
  39209. CCN MMUCR H'FF00 0010 H'1F00 0010 32 H'0000 0000 H'0000 0000 Held Held Iclk
  39210.  
  39211. CCN BASRA H'FF00 0014 H'1F00 0014 8 Undefined Held Held Held Iclk
  39212.  
  39213. CCN BASRB H'FF00 0018 H'1F00 0018 8 Undefined Held Held Held Iclk
  39214.  
  39215. CCN CCR H'FF00 001C H'1F00 001C 32 H'0000 0000 H'0000 0000 Held Held Iclk
  39216.  
  39217. CCN TRA H'FF00 0020 H'1F00 0020 32 Undefined Undefined Held Held Iclk
  39218.  
  39219. CCN EXPEVT H'FF00 0024 H'1F00 0024 32 H'0000 0000 H'0000 0020 Held Held Iclk
  39220.  
  39221. CCN INTEVT H'FF00 0028 H'1F00 0028 32 Undefined Undefined Held Held Iclk
  39222.  
  39223. CCN PTEA H'FF00 0034 H'1F00 0034 32 Undefined Undefined Held Held Iclk
  39224.  
  39225. CCN QACR0 H'FF00 0038 H'1F00 0038 32 Undefined Undefined Held Held Iclk
  39226.  
  39227. CCN QACR1 H'FF00 003C H'1F00 003C 32 Undefined Undefined Held Held Iclk
  39228.  
  39229. UBC BARA H'FF20 0000 H'1F20 0000 32 Undefined Held Held Held Iclk
  39230.  
  39231. UBC BAMRA H'FF20 0004 H'1F20 0004 8 Undefined Held Held Held Iclk
  39232.  
  39233. UBC BBRA H'FF20 0008 H'1F20 0008 16 H'0000 Held Held Held Iclk
  39234.  
  39235. UBC BARB H'FF20 000C H'1F20 000C 32 Undefined Held Held Held Iclk
  39236.  
  39237. UBC BAMRB H'FF20 0010 H'1F20 0010 8 Undefined Held Held Held Iclk
  39238.  
  39239. UBC BBRB H'FF20 0014 H'1F20 0014 16 H'0000 Held Held Held Iclk
  39240.  
  39241. UBC BDRB H'FF20 0018 H'1F20 0018 32 Undefined Held Held Held Iclk
  39242.  
  39243. UBC BDMRB H'FF20 001C H'1F20 001C 32 Undefined Held Held Held Iclk
  39244.  
  39245. UBC BRCR H'FF20 0020 H'1F20 0020 16 H'0000*2 Held Held Held Iclk
  39246.  
  39247. BSC BCR1 H'FF80 0000 H'1F80 0000 32 H'0000 Held Held Held Bclk
  39248. 0000*2
  39249.  
  39250. BSC BCR2 H'FF80 0004 H'1F80 0004 16 H'3FFC*2 Held Held Held Bclk
  39251.  
  39252. BSC WCR1 H'FF80 0008 H'1F80 0008 32 H'7777 7777 Held Held Held Bclk
  39253.  
  39254. BSC WCR2 H'FF80 000C H'1F80 000C 32 H'FFFE EFFF Held Held Held Bclk
  39255.  
  39256. BSC WCR3 H'FF80 0010 H'1F80 0010 32 H'0777 7777 Held Held Held Bclk
  39257.  
  39258. 757
  39259.  
  39260. ----------------------- Page 774-----------------------
  39261.  
  39262. Table A.1 Address List (cont)
  39263.  
  39264. Module Register P4 Address Area 7 Size Power-On Manual Sleep StandbySynchro-
  39265. Address* 1 Reset Reset nization
  39266.  
  39267. Clock
  39268.  
  39269. BSC MCR H'FF80 0014 H'1F80 0014 32 H'0000 0000 Held Held Held Bclk
  39270.  
  39271. BSC PCR H'FF80 0018 H'1F80 0018 16 H'0000 Held Held Held Bclk
  39272.  
  39273. BSC RTCSR H'FF80 001C H'1F80 001C 16 H'0000 Held Held Held Bclk
  39274.  
  39275. BSC RTCNT H'FF80 0020 H'1F80 0020 16 H'0000 Held Held Held Bclk
  39276.  
  39277. BSC RTCOR H'FF80 0024 H'1F80 0024 16 H'0000 Held Held Held Bclk
  39278.  
  39279. BSC RFCR H'FF80 0028 H'1F80 0028 16 H'0000 Held Held Held Bclk
  39280.  
  39281. BSC PCTRA H'FF80 002C H'1F80 002C 32 H'0000 0000 Held Held Held Bclk
  39282.  
  39283. BSC PDTRA H'FF80 0030 H'1F80 0030 16 Undefined Held Held Held Bclk
  39284.  
  39285. BSC PCTRB H'FF80 0040 H'1F80 0040 32 H'0000 0000 Held Held Held Bclk
  39286.  
  39287. BSC PDTRB H'FF80 0044 H'1F80 0044 16 Undefined Held Held Held Bclk
  39288.  
  39289. BSC GPIOIC H'FF80 0048 H'1F80 0048 16 H'0000 0000 Held Held Held Bclk
  39290.  
  39291. BSC SDMR2 H'FF90 xxxx H'1F90 xxxx 8 Write-only Bclk
  39292.  
  39293. BSC SDMR3 H'FF94 xxxx H'1F94 xxxx 8 Bclk
  39294.  
  39295. DMAC SAR0 H'FFA0 0000 H'1FA0 0000 32 Undefined Undefined Held Held Bclk
  39296.  
  39297. DMAC DAR0 H'FFA0 0004 H'1FA0 0004 32 Undefined Undefined Held Held Bclk
  39298.  
  39299. DMAC DMATCR0 H'FFA0 0008 H'1FA0 0008 32 Undefined Undefined Held Held Bclk
  39300.  
  39301. DMAC CHCR0 H'FFA0 000C H'1FA0 000C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39302.  
  39303. DMAC SAR1 H'FFA0 0010 H'1FA0 0010 32 Undefined Undefined Held Held Bclk
  39304.  
  39305. DMAC DAR1 H'FFA0 0014 H'1FA0 0014 32 Undefined Undefined Held Held Bclk
  39306.  
  39307. DMAC DMATCR1 H'FFA0 0018 H'1FA0 0018 32 Undefined Undefined Held Held Bclk
  39308.  
  39309. DMAC CHCR1 H'FFA0 001C H'1FA0 001C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39310.  
  39311. DMAC SAR2 H'FFA0 0020 H'1FA0 0020 32 Undefined Undefined Held Held Bclk
  39312.  
  39313. DMAC DAR2 H'FFA0 0024 H'1FA0 0024 32 Undefined Undefined Held Held Bclk
  39314.  
  39315. DMAC DMATCR2 H'FFA0 0028 H'1FA0 0028 32 Undefined Undefined Held Held Bclk
  39316.  
  39317. DMAC CHCR2 H'FFA0 002C H'1FA0 002C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39318.  
  39319. DMAC SAR3 H'FFA0 0030 H'1FA0 0030 32 Undefined Undefined Held Held Bclk
  39320.  
  39321. DMAC DAR3 H'FFA0 0034 H'1FA0 0034 32 Undefined Undefined Held Held Bclk
  39322.  
  39323. DMAC DMATCR3 H'FFA0 0038 H'1FA0 0038 32 Undefined Undefined Held Held Bclk
  39324.  
  39325. DMAC CHCR3 H'FFA0 003C H'1FA0 003C 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39326.  
  39327. DMAC DMAOR H'FFA0 0040 H'1FA0 0040 32 H'0000 0000 H'0000 0000 Held Held Bclk
  39328.  
  39329. 758
  39330.  
  39331. ----------------------- Page 775-----------------------
  39332.  
  39333. Table A.1 Address List (cont)
  39334.  
  39335. Module Register P4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  39336. Address* 1 Reset Reset nization
  39337.  
  39338. Clock
  39339.  
  39340. CPG FRQCR H'FFC0 0000 H'1FC0 0000 16 *2 Held Held Held Pclk
  39341.  
  39342. CPG STBCR H'FFC0 0004 H'1FC0 0004 8 H'00 Held Held Held Pclk
  39343.  
  39344. CPG WTCNT H'FFC0 0008 H'1FC0 0008 8/16* 3 H'00 Held Held Held Pclk
  39345.  
  39346. CPG WTCSR H'FFC0 000C H'1FC0 000C 8/16* 3 H'00 Held Held Held Pclk
  39347.  
  39348. CPG STBCR2 H'FFC0 0010 H'1FC0 0010 8 H'00 Held Held Held Pclk
  39349.  
  39350. RTC R64CNT H'FFC8 0000 H'1FC8 0000 8 Held Held Held Held Pclk
  39351.  
  39352. RTC RSECCNT H'FFC8 0004 H'1FC8 0004 8 Held Held Held Held Pclk
  39353.  
  39354. RTC RMINCNT H'FFC8 0008 H'1FC8 0008 8 Held Held Held Held Pclk
  39355.  
  39356. RTC RHRCNT H'FFC8 000C H'1FC8 000C 8 Held Held Held Held Pclk
  39357.  
  39358. RTC RWKCNT H'FFC8 0010 H'1FC8 0010 8 Held Held Held Held Pclk
  39359.  
  39360. RTC RDAYCNT H'FFC8 0014 H'1FC8 0014 8 Held Held Held Held Pclk
  39361.  
  39362. RTC RMONCNT H'FFC8 0018 H'1FC8 0018 8 Held Held Held Held Pclk
  39363.  
  39364. RTC RYRCNT H'FFC8 001C H'1FC8 001C 16 Held Held Held Held Pclk
  39365.  
  39366. RTC RSECAR H'FFC8 0020 H'1FC8 0020 8 Held *2 Held Held Held Pclk
  39367.  
  39368. RTC RMINAR H'FFC8 0024 H'1FC8 0024 8 Held *2 Held Held Held Pclk
  39369.  
  39370. RTC RHRAR H'FFC8 0028 H'1FC8 0028 8 Held *2 Held Held Held Pclk
  39371.  
  39372. RTC RWKAR H'FFC8 002C H'1FC8 002C 8 Held *2 Held Held Held Pclk
  39373.  
  39374. RTC RDAYAR H'FFC8 0030 H'1FC8 0030 8 Held *2 Held Held Held Pclk
  39375.  
  39376. RTC RMONAR H'FFC8 0034 H'1FC8 0034 8 Held *2 Held Held Held Pclk
  39377.  
  39378. RTC RCR1 H'FFC8 0038 H'1FC8 0038 8 H'00*2 H'00*2 Held Held Pclk
  39379.  
  39380. RTC RCR2 H'FFC8 003C H'1FC8 003C 8 H'09*2 H'00*2 Held Held Pclk
  39381.  
  39382. INTC ICR H'FFD0 0000 H'1FD0 0000 16 H'0000*2 H'0000*2 Held Held Pclk
  39383.  
  39384. INTC IPRA H'FFD0 0004 H'1FD0 0004 16 H'0000 H'0000 Held Held Pclk
  39385.  
  39386. INTC IPRB H'FFD0 0008 H'1FD0 0008 16 H'0000 H'0000 Held Held Pclk
  39387.  
  39388. INTC IPRC H'FFD0 000C H'1FD0 000C 16 H'0000 H'0000 Held Held Pclk
  39389.  
  39390. TMU TOCR H'FFD8 0000 H'1FD8 0000 8 H'00 H'00 Held Held Pclk
  39391.  
  39392. TMU TSTR H'FFD8 0004 H'1FD8 0004 8 H'00 H'00 Held H'00*2 Pclk
  39393.  
  39394. TMU TCOR0 H'FFD8 0008 H'1FD8 0008 32 H'FFFF FFFFH'FFFF FFFF Held Held Pclk
  39395.  
  39396. TMU TCNT0 H'FFD8 000C H'1FD8 000C 32 H'FFFF FFFFH'FFFF FFFF Held Held Pclk
  39397.  
  39398. TMU TCR0 H'FFD8 0010 H'1FD8 0010 16 H'0000 H'0000 Held Held Pclk
  39399.  
  39400. 759
  39401.  
  39402. ----------------------- Page 776-----------------------
  39403.  
  39404. Table A.1 Address List (cont)
  39405.  
  39406. Module RegisterP4 Address Area 7 Size Power-On Manual Sleep Standby Synchro-
  39407. Address* 1 Reset Reset nization
  39408.  
  39409. Clock
  39410.  
  39411. TMU TCOR1 H'FFD8 0014 H'1FD8 0014 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39412.  
  39413. TMU TCNT1 H'FFD8 0018 H'1FD8 0018 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39414.  
  39415. TMU TCR1 H'FFD8 001C H'1FD8 001C 16 H'0000 H'0000 Held Held Pclk
  39416.  
  39417. TMU TCOR2 H'FFD8 0020 H'1FD8 0020 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39418.  
  39419. TMU TCNT2 H'FFD8 0024 H'1FD8 0024 32 H'FFFF FFFF H'FFFF FFFF Held Held Pclk
  39420.  
  39421. TMU TCR2 H'FFD8 0028 H'1FD8 0028 16 H'0000 H'0000 Held Held Pclk
  39422.  
  39423. TMU TCPR2 H'FFD8 002C H'1FD8 002C 32 Held Held Held Held Pclk
  39424.  
  39425. SCI SCSMR1 H'FFE0 0000 H'1FE0 0000 8 H'00 H'00 Held H'00 Pclk
  39426.  
  39427. SCI SCBRR1 H'FFE0 0004 H'1FE0 0004 8 H'FF H'FF Held H'FF Pclk
  39428.  
  39429. SCI SCSCR1 H'FFE0 0008 H'1FE0 0008 8 H'00 H'00 Held H'00 Pclk
  39430.  
  39431. SCI SCTDR1 H'FFE0 000C H'1FE0 000C 8 H'FF H'FF Held H'FF Pclk
  39432.  
  39433. SCI SCSSR1 H'FFE0 0010 H'1FE0 0010 8 H'84 H'84 Held H'84 Pclk
  39434.  
  39435. SCI SCRDR1 H'FFE0 0014 H'1FE0 0014 8 H'00 H'00 Held H'00 Pclk
  39436.  
  39437. SCI SCSCMR1 H'FFE0 0018 H'1FE0 0018 8 H'00 H'00 Held H'00 Pclk
  39438.  
  39439. SCI SCSPTR1 H'FFE0 001C H'1FE0 001C 8 H'00*2 H'00*2 Held H'00*2 Pclk
  39440.  
  39441. SCIF SCSMR2 H'FFE8 0000 H'1FE8 0000 16 H'0000 H'0000 Held Held Pclk
  39442.  
  39443. SCIF SCBRR2 H'FFE8 0004 H'1FE8 0004 8 H'FF H'FF Held Held Pclk
  39444.  
  39445. SCIF SCSCR2 H'FFE8 0008 H'1FE8 0008 16 H'0000 H'0000 Held Held Pclk
  39446.  
  39447. SCIF SCFTDR2 H'FFE8 000C H'1FE8 000C 8 Undefined Undefined Held Held Pclk
  39448.  
  39449. SCIF SCFSR2 H'FFE8 0010 H'1FE8 0010 16 H'0060 H'0060 Held Held Pclk
  39450.  
  39451. SCIF SCFRDR2 H'FFE8 0014 H'1FE8 0014 8 Undefined Undefined Held Held Pclk
  39452.  
  39453. SCIF SCFCR2 H'FFE8 0018 H'1FE8 0018 16 H'0000 H'0000 Held Held Pclk
  39454.  
  39455. SCIF SCFDR2 H'FFE8 001C H'1FE8 001C 16 H'0000 H'0000 Held Held Pclk
  39456.  
  39457. SCIF SCSPTR2 H'FFE8 0020 H'1FE8 0020 16 H'0000*2 H'0000*2 Held Held Pclk
  39458.  
  39459. SCIF SCLSR2 H'FFE8 0024 H'1FE8 0024 16 H'0000 H'0000 Held Held Pclk
  39460.  
  39461. Hitachi- SDIR H'FFF0 0000 H'1FF0 0000 16 H'FFFF*2 Held Held Held Pclk
  39462.  
  39463. UDI
  39464.  
  39465. Hitachi- SDDR H'FFF0 0008 H'1FF0 0008 32 Held Held Held Held Pclk
  39466. UDI
  39467.  
  39468. Notes: 1. With control registers, the above addresses in the physical page number field can be
  39469. accessed by means of a TLB setting. When these addresses are referenced directly
  39470. without using the TLB, operations are limited.
  39471.  
  39472. 760
  39473.  
  39474. ----------------------- Page 777-----------------------
  39475.  
  39476. 2. Includes undefined bits. See the descriptions of the individual modules.
  39477. 3. Use word-size access when writing. Perform the write with the upper byte set to H'5A or
  39478. H'A5, respectively. Byte- and longword-size writes cannot be used.
  39479. Use byte-size access when reading.
  39480.  
  39481. 761
  39482.  
  39483. ----------------------- Page 778-----------------------
  39484.  
  39485. Appendix B Package Dimensions
  39486.  
  39487. Unit :mm
  39488.  
  39489. 4× 0.20
  39490.  
  39491. 27.0
  39492. A 20 18 16 14 12 10 8 6 4 2
  39493. B 19 17 15 13 11 9 7 5 3 1
  39494.  
  39495. A
  39496. B
  39497. C
  39498. D
  39499. E
  39500. 5 F
  39501. 3 G
  39502. 6
  39503. 0. H
  39504. J
  39505. 0
  39506. . K
  39507. 7 L
  39508. 2
  39509. M
  39510. 7 N
  39511. 2
  39512. 1. P
  39513. R
  39514. T
  39515. U
  39516. V
  39517. W
  39518. Y
  39519.  
  39520. 1 0.635 1.27
  39521. .
  39522. 0.35 C 2
  39523.  
  39524. 0.15 C
  39525.  
  39526. A
  39527. 1
  39528. C .
  39529. 0
  39530.  
  39531. ±
  39532.  
  39533. 0
  39534. 6
  39535. .
  39536. 0
  39537.  
  39538. 256 × φ0.75 ± 0.15 Hitachi Code BP-256
  39539. 0.30 S C A S B S
  39540. 0.10 S C JEDEC Code MO-151
  39541. EIAJ Code –
  39542. Details of the part A Weight 3.0 g
  39543.  
  39544. Figure B.1 Package Dimensions (256-Pin BGA)
  39545.  
  39546. 762
  39547.  
  39548. ----------------------- Page 779-----------------------
  39549.  
  39550. 30.6 ± 0.2 Unit: mm
  39551.  
  39552. 28
  39553.  
  39554. 156 105
  39555.  
  39556. 157 104
  39557.  
  39558. 2
  39559. .
  39560. 0
  39561.  
  39562. ±
  39563.  
  39564. 6
  39565. . 5
  39566. 0 .
  39567. 3 0
  39568.  
  39569. 208 53
  39570. x
  39571. a
  39572. 1 52 M 5 4
  39573. 0.22 ± 0.05 0 0
  39574. 0.10 M 0 6 0 0. .
  39575. 0.20 ± 0.04 2. 5. ± ± 1.25 1.3
  39576. 3
  39577. 3 7 5
  39578. 1 1
  39579. . . 0° – 8°
  39580. 0 0
  39581.  
  39582. 0 5
  39583. 1. 1. 0.5 ± 0.1
  39584. 0 0
  39585. 0.10 + –
  39586. 5
  39587. 1 Hitachi Code FP-208E
  39588. .
  39589. 0 JEDEC —
  39590.  
  39591. Dimension including the plating thickness EIAJ Conforms
  39592. Base material dimension Weight (reference value) 5.3 g
  39593.  
  39594. Figure B.2 Package Dimensions (208-Pin QFP)
  39595.  
  39596. 763
  39597.  
  39598. ----------------------- Page 780-----------------------
  39599.  
  39600. Appendix C Mode Pin Settings
  39601.  
  39602. The MD8–MD0 pin values are input in the event of a power-on reset via the or
  39603. SCK2/ pin.
  39604.  
  39605. Clock Modes
  39606.  
  39607. Pin Values FrequencyPLL1 PLL2 Initial Clock Frequency
  39608. Divider 1 Ratio*2
  39609.  
  39610. Mode MD2 MD1 MD0 CPU Bus Periphera
  39611. Clock Clock l Module
  39612. Clock
  39613.  
  39614. 0 0 0 0 Off On On 6 3/2 3/2
  39615.  
  39616. 1 0 0 1 Off On On 6 1 1
  39617.  
  39618. 2 0 1 0 On On On 3 1 1/2
  39619.  
  39620. 3 0 1 1 Off On On 6 2 1
  39621.  
  39622. 4 1 0 0 On On On 3 3/2 3/4
  39623.  
  39624. 5 1 0 1 Off On On 6 3 3/2
  39625.  
  39626. Notes: 1. MD2–MD0 pin value combinations other than those shown above cannot be set.
  39627. 2. Taking the input clock (EXTAL or crystal resonator frequency) as 1.
  39628.  
  39629. Area 0 Bus Width
  39630.  
  39631. Pin Value
  39632.  
  39633. MD4 MD3 Bus Width
  39634.  
  39635. 0 0 64 bits
  39636.  
  39637. 1 8 bits
  39638.  
  39639. 1 0 16 bits
  39640.  
  39641. 1 32 bits
  39642.  
  39643. Endian
  39644.  
  39645. Pin Value
  39646.  
  39647. MD5 Endian
  39648.  
  39649. 0 Big endian
  39650.  
  39651. 1 Little endian
  39652.  
  39653. 764
  39654.  
  39655. ----------------------- Page 781-----------------------
  39656.  
  39657. Area 0 Memory Type
  39658.  
  39659. Pin Value
  39660.  
  39661. MD6 Memory Type
  39662.  
  39663. 0 MPX bus
  39664.  
  39665. 1 Normal memory
  39666.  
  39667. Master/Slave
  39668.  
  39669. Pin Value
  39670.  
  39671. MD7 Master/Slave
  39672.  
  39673. 0 Slave
  39674.  
  39675. 1 Master
  39676.  
  39677. Clock Input
  39678.  
  39679. Pin Value
  39680.  
  39681. MD8 Clock Input
  39682.  
  39683. 0 External input clock
  39684.  
  39685. 1 Crystal resonator
  39686.  
  39687. 765
  39688.  
  39689. ----------------------- Page 782-----------------------
  39690.  
  39691. Appendix D Pin Configuration
  39692.  
  39693. SH7750 VDDQ
  39694. rd_pullup_control
  39695.  
  39696. rd_dt_ //
  39697.  
  39698. rd_hiz_control VDDQ
  39699.  
  39700.  
  39701.  
  39702. VDDQ
  39703. rdwr_pullup_control
  39704.  
  39705. rdwr_dt_ RD/
  39706.  
  39707. rdwr_hiz_control VDDQ
  39708.  
  39709. RD/
  39710.  
  39711. PLL2
  39712. Bus clock CKIO
  39713.  
  39714. ckio_hiz_control
  39715.  
  39716. CKIO2
  39717.  
  39718. VDDQ
  39719.  
  39720. VSSQ
  39721.  
  39722.  
  39723.  
  39724. Figure D.1 Pin Configuration
  39725.  
  39726. 766
  39727.  
  39728. ----------------------- Page 783-----------------------
  39729.  
  39730. Description
  39731.  
  39732. 0 , RD/ , and CKIO2 have the same pin states as , RD/, and CKIO,
  39733. respectively
  39734.  
  39735. 1 , RD/ , and CKIO2 are in the high-impedance state
  39736.  
  39737. Note: CKIO is fed back to PLL2 to coordinate the external clock and internal clock phases.
  39738. However, CKIO2 is not fed back.
  39739.  
  39740. 767
  39741.  
  39742. ----------------------- Page 784-----------------------
  39743.  
  39744. Appendix E Pin Functions
  39745.  
  39746. E.1 Pin States
  39747.  
  39748. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State
  39749.  
  39750. Signal Name I / O Reset Reset Sleep Standb Bus Notes
  39751. (Power-On) (Manual) y Release
  39752. d
  39753.  
  39754. MasterSlave MasterSlave
  39755.  
  39756. D0–D7 I/O Z Z Z Z Z Z Z
  39757.  
  39758. D8–D15 I/O Z Z Z Z Z Z Z
  39759.  
  39760. D16–D23 I/O Z Z Z Z Z Z Z
  39761.  
  39762. D24–D31 I/O Z Z Z Z Z Z Z
  39763.  
  39764. D32–D39 I/O Z Z ZK ZK ZK ZK ZK Output
  39765. state held
  39766. when
  39767. used as
  39768. port
  39769.  
  39770. D40–D47 I/O Z Z ZK ZK ZK ZK ZK Output
  39771. state held
  39772. when
  39773. used as
  39774. port
  39775.  
  39776. D48–D55 I/O Z Z Z Z Z Z Z
  39777.  
  39778. D56–D63 I/O Z Z Z Z Z Z Z
  39779.  
  39780. A0, A1, A18–A25 O Z Z Z Z Z Z Z
  39781. A2–A17 O Z Z ZO*9 Z O ZO*7 Z
  39782.  
  39783. I I I I I I I I
  39784.  
  39785. / O H H H H O H O
  39786.  
  39787. / I I I I I I I I
  39788. O H Z H Z O*4 ZH*7 Z
  39789.  
  39790. CKE O H Z O*6 Z O*6 L O*6
  39791.  
  39792. – O H Z H Z O*4 ZH*7 Z
  39793.  
  39794. O H Z O*6 Z O*4 ZO*5 ZO*5
  39795.  
  39796. / O H Z O*6 Z O*4 ZO*5 ZO*5
  39797.  
  39798. RD/ O H Z H Z O*4 ZH*7 Z
  39799.  
  39800. I I I I I I I I
  39801.  
  39802. 768
  39803.  
  39804. ----------------------- Page 785-----------------------
  39805.  
  39806. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  39807.  
  39808. Signal Name I / O Reset Reset Sleep Standb Bus Notes
  39809. (Power-On) (Manual) y Release
  39810. d
  39811.  
  39812. MasterSlave MasterSlave
  39813. //DQM7 O H Z O*6 Z O*4 ZO*5 ZO*5
  39814.  
  39815. //DQM6 O H Z O*6 Z O*4 ZO*5 ZO*5
  39816.  
  39817. //DQM5 O H Z O*6 Z O*4 ZO*5 ZO*5
  39818.  
  39819. //DQM4 O H Z O*6 Z O*4 ZO*5 ZO*5
  39820.  
  39821. //DQM3 O H Z O*6 Z O*4 ZO*5 ZO*5
  39822.  
  39823. //DQM2 O H Z O*6 Z O*4 ZO*5 ZO*5
  39824.  
  39825. //DQM1 O H Z O*6 Z O*4 ZO*5 ZO*5
  39826.  
  39827. //DQM0 O H Z O*6 Z O*4 ZO*5 ZO*5
  39828.  
  39829. DACK1–DACK0 O L L L L O*4 ZO*8 O DMAC
  39830.  
  39831. MD7/TXD I/O I I I I IO ZO*8 IO SCI
  39832.  
  39833. MD6/ I I I I I I I I PCMCIA
  39834. (I/O)
  39835. MD5/ I/O*1 I I IO*6 I IO*4 IO*5 IO*5 DRAM2
  39836.  
  39837. MD4/ I/O*2 I I IH I IO*4 IH*7 I PCMCIA
  39838.  
  39839. MD3/ I/O*3 I I IH I IO*4 IH*7 I PCMCIA
  39840.  
  39841. CKIO O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39842.  
  39843. STATUS1– O O O O O O O O
  39844. STATUS0
  39845.  
  39846. – I I I I I I I I INTC
  39847.  
  39848. NMI I I I I I I I I INTC
  39849.  
  39850. – I I I I I I I I DMAC
  39851. DRAK1–DRAK0 O L L L L O*4 ZO*8 O DMAC
  39852.  
  39853. MD0/SCK I/O I I I I IO IO*8 IO SCI
  39854.  
  39855. RXD I I I I I I I I SCI
  39856.  
  39857. SCK2/ I I I I I I I I SCIF
  39858. MD1/TXD2 I/O I I I I IO IO*8 IO SCIF
  39859.  
  39860. MD2/RXD2 I I I I I I I I SCIF
  39861. I/O I I I I IO IO*8 IO SCIF
  39862.  
  39863. MD8/ I/O I I I I IO IO*8 IO SCIF
  39864.  
  39865. TCLK I/O I I I I IO IO IO TMU
  39866.  
  39867. 769
  39868.  
  39869. ----------------------- Page 786-----------------------
  39870.  
  39871. Table E.1 Pin States in Reset, Power-Down State, and Bus-Released State (cont)
  39872.  
  39873. Signal Name I / O Reset Reset Sleep Standb Bus Notes
  39874. (Power-On) (Manual) y Release
  39875. d
  39876.  
  39877. MasterSlave MasterSlave
  39878.  
  39879. TDO I/O O O O O O O O Hitachi-
  39880. UDI
  39881.  
  39882. TMS I I I I I I I I Hitachi-
  39883. UDI
  39884.  
  39885. TCK I I I I I I I I Hitachi-
  39886. UDI
  39887.  
  39888. TDI I I I I I I I I Hitachi-
  39889. UDI
  39890.  
  39891. I I I I I I I I Hitachi-
  39892. UDI
  39893. CKIO2*10 O O O ZO*11 ZO*11 ZO*11 ZO*11 ZO*11
  39894.  
  39895. *10 O H Z O*6 Z O*4 ZO*5 ZO*5
  39896.  
  39897. RD/ *10 O H Z H Z O*4 ZH*7 Z
  39898.  
  39899. I I I I I I I I
  39900.  
  39901. Notes: I: Input
  39902. O: Output
  39903. H: High-level output
  39904. L: Low-level output
  39905. Z: High-impedance
  39906. K: Output state held
  39907.  
  39908. 1. Output when area 2 DRAM is used.
  39909. 2. Output when area 5 PCMCIA is used.
  39910. 3. Output when area 6 PCMCIA is used.
  39911. 4. Depends on refresh and DMAC operations.
  39912. 5. Z (I) or O (refresh), depending on register setting (BCR1.HIZCNT).
  39913. 6. Depends on refresh operation.
  39914. 7. Z (I) or H (state held), depending on register setting (BCR1.HIZMEM).
  39915. 8. Z or O, depending on register setting (STBCR.PHZ).
  39916. 9. Output when refreshing is set.
  39917. 10.Operation in respective state when = 0; Z when = 1.
  39918. 11.Z or O, depending on register setting (FRQCR.CKOEN).
  39919.  
  39920. E.2 Handling of Unused Pins
  39921.  
  39922. • When RTC is not used
  39923. 770
  39924.  
  39925. ----------------------- Page 787-----------------------
  39926.  
  39927.  EXTAL2: Pull up to 3.3 V
  39928.  
  39929.  XTAL2: Leave unconnected
  39930.  
  39931.  VDD-RTC: Power supply (3.3 V)
  39932.  
  39933.  VSS-RTC: Power supply (0 V)
  39934.  
  39935. • When PLL1 is not used
  39936.  
  39937.  VDD-PLL1: Power supply (3.3 V)
  39938.  
  39939.  VSS-PLL1: Power supply (0 V)
  39940.  
  39941. • When PLL2 is not used
  39942.  
  39943.  VDD-PLL2: Power supply (3.3 V)
  39944.  
  39945.  VSS-PLL2: Power supply (0 V)
  39946.  
  39947. • When on-chip crystal oscillator is not used
  39948.  
  39949.  XTAL: Leave unconnected
  39950.  
  39951.  VDD-CPG: Power supply (3.3 V)
  39952.  
  39953.  VSS-CPG: Power supply (0 V)
  39954.  
  39955. 771
  39956.  
  39957. ----------------------- Page 788-----------------------
  39958.  
  39959. Appendix F Synchronous DRAM Address
  39960. Multiplexing Tables
  39961.  
  39962. (1) BUS 64 (16M: 512k x 16b x 2) x 4
  39963. AMX 0 AMXEXT 0 16M, column-addr-8bit 8MB
  39964.  
  39965. SH7750 Address Pins Synchronous Function
  39966. DRAM Address
  39967. Pins
  39968.  
  39969. RAS Cycle CAS Cycle
  39970.  
  39971. A14 A22 A22 A11 BANK selects bank address
  39972.  
  39973. A13 A21 H/L A10 Address precharge setting
  39974.  
  39975. A12 A20 0 A9 Address
  39976.  
  39977. A11 A19 0 A8
  39978.  
  39979. A10 A18 A10 A7
  39980.  
  39981. A9 A17 A9 A6
  39982.  
  39983. A8 A16 A8 A5
  39984.  
  39985. A7 A15 A7 A4
  39986.  
  39987. A6 A14 A6 A3
  39988.  
  39989. A5 A13 A5 A2
  39990.  
  39991. A4 A12 A4 A1
  39992.  
  39993. A3 A11 A3 A0
  39994.  
  39995. A2 Not used
  39996.  
  39997. A1 Not used
  39998.  
  39999. A0 Not used
  40000.  
  40001. 772
  40002.  
  40003. ----------------------- Page 789-----------------------
  40004.  
  40005. (2) BUS 32 (16M: 512k x 16b x 2) x 2
  40006. AMX 0 AMXEXT 0 16M, column-addr-8bit 4MB
  40007.  
  40008. SH7750 Address Pins Synchronous Function
  40009. DRAM Address
  40010. Pins
  40011.  
  40012. RAS Cycle CAS Cycle
  40013.  
  40014. A14
  40015.  
  40016. A13 A21 A21 A11 BANK selects bank address
  40017.  
  40018. A12 A20 H/L A10 Address precharge setting
  40019.  
  40020. A11 A19 0 A9 Address
  40021.  
  40022. A10 A18 0 A8
  40023.  
  40024. A9 A17 A9 A7
  40025.  
  40026. A8 A16 A8 A6
  40027.  
  40028. A7 A15 A7 A5
  40029.  
  40030. A6 A14 A6 A4
  40031.  
  40032. A5 A13 A5 A3
  40033.  
  40034. A4 A12 A4 A2
  40035.  
  40036. A3 A11 A3 A1
  40037.  
  40038. A2 A10 A2 A0
  40039.  
  40040. A1 Not used
  40041.  
  40042. A0 Not used
  40043.  
  40044. 773
  40045.  
  40046. ----------------------- Page 790-----------------------
  40047.  
  40048. (3) BUS 64 (16M: 512k x 16b x 2) x 4
  40049. AMX 0 AMXEXT 1 16M, column-addr-8bit 8MB
  40050.  
  40051. SH7750 Address Pins Synchronous Function
  40052. DRAM Address
  40053. Pins
  40054.  
  40055. RAS Cycle CAS Cycle
  40056.  
  40057. A14 A21 A21 A11 BANK selects bank address
  40058.  
  40059. A13 A22 H/L A10 Address precharge setting
  40060.  
  40061. A12 A20 0 A9 Address
  40062.  
  40063. A11 A19 0 A8
  40064.  
  40065. A10 A18 A10 A7
  40066.  
  40067. A9 A17 A9 A6
  40068.  
  40069. A8 A16 A8 A5
  40070.  
  40071. A7 A15 A7 A4
  40072.  
  40073. A6 A14 A6 A3
  40074.  
  40075. A5 A13 A5 A2
  40076.  
  40077. A4 A12 A4 A1
  40078.  
  40079. A3 A11 A3 A0
  40080.  
  40081. A2 Not used
  40082.  
  40083. A1 Not used
  40084.  
  40085. A0 Not used
  40086.  
  40087. 774
  40088.  
  40089. ----------------------- Page 791-----------------------
  40090.  
  40091. (4) BUS 32 (16M: 512k x 16b x 2) x 2
  40092. AMX 0 AMXEXT 1 16M, column-addr-8bit 4MB
  40093.  
  40094. SH7750 Address Pins Synchronous Function
  40095. DRAM Address
  40096. Pins
  40097.  
  40098. RAS Cycle CAS Cycle
  40099.  
  40100. A14
  40101.  
  40102. A13 A20 A20 A11 BANK selects bank address
  40103.  
  40104. A12 A21 H/L A10 Address precharge setting
  40105.  
  40106. A11 A19 0 A9 Address
  40107.  
  40108. A10 A18 0 A8
  40109.  
  40110. A9 A17 A9 A7
  40111.  
  40112. A8 A16 A8 A6
  40113.  
  40114. A7 A15 A7 A5
  40115.  
  40116. A6 A14 A6 A4
  40117.  
  40118. A5 A13 A5 A3
  40119.  
  40120. A4 A12 A4 A2
  40121.  
  40122. A3 A11 A3 A1
  40123.  
  40124. A2 A10 A2 A0
  40125.  
  40126. A1 Not used
  40127.  
  40128. A0 Not used
  40129.  
  40130. 775
  40131.  
  40132. ----------------------- Page 792-----------------------
  40133.  
  40134. (5) BUS 64 (16M: 1M x 8b x 2) x 8
  40135. AMX 1 AMXEXT 0 16M, column-addr-9bit 16MB
  40136.  
  40137. SH7750 Address Pins Synchronous Function
  40138. DRAM Address
  40139. Pins
  40140.  
  40141. RAS Cycle CAS Cycle
  40142.  
  40143. A14 A23 A23 A11 BANK selects bank address
  40144.  
  40145. A13 A22 H/L A10 Address precharge setting
  40146.  
  40147. A12 A21 0 A9 Address
  40148.  
  40149. A11 A20 A11 A8
  40150.  
  40151. A10 A19 A10 A7
  40152.  
  40153. A9 A18 A9 A6
  40154.  
  40155. A8 A17 A8 A5
  40156.  
  40157. A7 A16 A7 A4
  40158.  
  40159. A6 A15 A6 A3
  40160.  
  40161. A5 A14 A5 A2
  40162.  
  40163. A4 A13 A4 A1
  40164.  
  40165. A3 A12 A3 A0
  40166.  
  40167. A2 Not used
  40168.  
  40169. A1 Not used
  40170.  
  40171. A0 Not used
  40172.  
  40173. 776
  40174.  
  40175. ----------------------- Page 793-----------------------
  40176.  
  40177. (6) BUS 32 (16M: 1M x 8b x 2) x 4
  40178. AMX 1 AMXEXT 0 16M, column-addr-9bit 8MB
  40179.  
  40180. SH7750 Address Pins Synchronous Function
  40181. DRAM Address
  40182. Pins
  40183.  
  40184. RAS Cycle CAS Cycle
  40185.  
  40186. A14
  40187.  
  40188. A13 A22 A22 A11 BANK selects bank address
  40189.  
  40190. A12 A21 H/L A10 Address precharge setting
  40191.  
  40192. A11 A20 0 A9 Address
  40193.  
  40194. A10 A19 A10 A8
  40195.  
  40196. A9 A18 A9 A7
  40197.  
  40198. A8 A17 A8 A6
  40199.  
  40200. A7 A16 A7 A5
  40201.  
  40202. A6 A15 A6 A4
  40203.  
  40204. A5 A14 A5 A3
  40205.  
  40206. A4 A13 A4 A2
  40207.  
  40208. A3 A12 A3 A1
  40209.  
  40210. A2 A11 A2 A0
  40211.  
  40212. A1 Not used
  40213.  
  40214. A0 Not used
  40215.  
  40216. 777
  40217.  
  40218. ----------------------- Page 794-----------------------
  40219.  
  40220. (7) BUS 64 (16M: 1M x 8b x 2) x 8
  40221. AMX 1 AMXEXT 1 16M, column-addr-9bit 16MB
  40222.  
  40223. SH7750 Address Pins Synchronous Function
  40224. DRAM Address
  40225. Pins
  40226.  
  40227. RAS Cycle CAS Cycle
  40228.  
  40229. A14 A22 A22 A11 BANK selects bank address
  40230.  
  40231. A13 A23 H/L A10 Address precharge setting
  40232.  
  40233. A12 A21 0 A9 Address
  40234.  
  40235. A11 A20 A11 A8
  40236.  
  40237. A10 A19 A10 A7
  40238.  
  40239. A9 A18 A9 A6
  40240.  
  40241. A8 A17 A8 A5
  40242.  
  40243. A7 A16 A7 A4
  40244.  
  40245. A6 A15 A6 A3
  40246.  
  40247. A5 A14 A5 A2
  40248.  
  40249. A4 A13 A4 A1
  40250.  
  40251. A3 A12 A3 A0
  40252.  
  40253. A2 Not used
  40254.  
  40255. A1 Not used
  40256.  
  40257. A0 Not used
  40258.  
  40259. 778
  40260.  
  40261. ----------------------- Page 795-----------------------
  40262.  
  40263. (8) BUS 32 (16M: 1M x 8b x 2) x 4
  40264. AMX 1 AMXEXT 1 16M, column-addr-9bit 8MB
  40265.  
  40266. SH7750 Address Pins Synchronous Function
  40267. DRAM Address
  40268. Pins
  40269.  
  40270. RAS Cycle CAS Cycle
  40271.  
  40272. A14
  40273.  
  40274. A13 A21 A21 A11 BANK selects bank address
  40275.  
  40276. A12 A22 H/L A10 Address precharge setting
  40277.  
  40278. A11 A20 0 A9 Address
  40279.  
  40280. A10 A19 A10 A8
  40281.  
  40282. A9 A18 A9 A7
  40283.  
  40284. A8 A17 A8 A6
  40285.  
  40286. A7 A16 A7 A5
  40287.  
  40288. A6 A15 A6 A4
  40289.  
  40290. A5 A14 A5 A3
  40291.  
  40292. A4 A13 A4 A2
  40293.  
  40294. A3 A12 A3 A1
  40295.  
  40296. A2 A11 A2 A0
  40297.  
  40298. A1 Not used
  40299.  
  40300. A0 Not used
  40301.  
  40302. 779
  40303.  
  40304. ----------------------- Page 796-----------------------
  40305.  
  40306. (9) BUS 64 (64M: 1M x 16b x 4) x 4
  40307. AMX 2 64M, column-addr-8bit 32MB
  40308.  
  40309. SH7750 Address Pins Synchronous Function
  40310. DRAM Address
  40311. Pins
  40312.  
  40313. RAS Cycle CAS Cycle
  40314.  
  40315. A16 A24 A24 A13 BANK selects bank address
  40316.  
  40317. A15 A23 A23 A12
  40318.  
  40319. A14 A22 0 A11 Address precharge setting
  40320.  
  40321. A13 A21 H/L A10
  40322.  
  40323. A12 A20 0 A9 Address
  40324.  
  40325. A11 A19 0 A8
  40326.  
  40327. A10 A18 A10 A7
  40328.  
  40329. A9 A17 A9 A6
  40330.  
  40331. A8 A16 A8 A5
  40332.  
  40333. A7 A15 A7 A4
  40334.  
  40335. A6 A14 A6 A3
  40336.  
  40337. A5 A13 A5 A2
  40338.  
  40339. A4 A12 A4 A1
  40340.  
  40341. A3 A11 A3 A0
  40342.  
  40343. A2 Not used
  40344.  
  40345. A1 Not used
  40346.  
  40347. A0 Not used
  40348.  
  40349. 780
  40350.  
  40351. ----------------------- Page 797-----------------------
  40352.  
  40353. (10) BUS 32 (64M: 1M x 16b x 4) x 2
  40354. AMX 2 64M, column-addr-8bit 16MB
  40355.  
  40356. SH7750 Address Pins Synchronous Function
  40357. DRAM Address
  40358. Pins
  40359.  
  40360. RAS Cycle CAS Cycle
  40361.  
  40362. A16
  40363.  
  40364. A15 A23 A23 A13 BANK selects bank address
  40365.  
  40366. A14 A22 A22 A12
  40367.  
  40368. A13 A21 0 A11 Address precharge setting
  40369.  
  40370. A12 A20 H/L A10
  40371.  
  40372. A11 A19 0 A9 Address
  40373.  
  40374. A10 A18 0 A8
  40375.  
  40376. A9 A17 A9 A7
  40377.  
  40378. A8 A16 A8 A6
  40379.  
  40380. A7 A15 A7 A5
  40381.  
  40382. A6 A14 A6 A4
  40383.  
  40384. A5 A13 A5 A3
  40385.  
  40386. A4 A12 A4 A2
  40387.  
  40388. A3 A11 A3 A1
  40389.  
  40390. A2 A10 A2 A0
  40391.  
  40392. A1 Not used
  40393.  
  40394. A0 Not used
  40395.  
  40396. 781
  40397.  
  40398. ----------------------- Page 798-----------------------
  40399.  
  40400. (11) BUS 64 (64M: 2M x 8b x 4) x 8
  40401. AMX 3 64M, column-addr-9bit 64MB
  40402.  
  40403. SH7750 Address Pins Synchronous Function
  40404. DRAM Address
  40405. Pins
  40406.  
  40407. RAS Cycle CAS Cycle
  40408.  
  40409. A16 A25 A25 A13 BANK selects bank address
  40410.  
  40411. A15 A24 A24 A12
  40412.  
  40413. A14 A23 0 A11 Address precharge setting
  40414.  
  40415. A13 A22 H/L A10
  40416.  
  40417. A12 A21 0 A9 Address
  40418.  
  40419. A11 A20 A11 A8
  40420.  
  40421. A10 A19 A10 A7
  40422.  
  40423. A9 A18 A9 A6
  40424.  
  40425. A8 A17 A8 A5
  40426.  
  40427. A7 A16 A7 A4
  40428.  
  40429. A6 A15 A6 A3
  40430.  
  40431. A5 A14 A5 A2
  40432.  
  40433. A4 A13 A4 A1
  40434.  
  40435. A3 A12 A3 A0
  40436.  
  40437. A2 Not used
  40438.  
  40439. A1 Not used
  40440.  
  40441. A0 Not used
  40442.  
  40443. 782
  40444.  
  40445. ----------------------- Page 799-----------------------
  40446.  
  40447. (12) BUS 32 (64M: 2M x 8b x 4) x 4
  40448. AMX 3 64M, column-addr-9bit 32MB
  40449.  
  40450. SH7750 Address Pins Synchronous Function
  40451. DRAM Address
  40452. Pins
  40453.  
  40454. RAS Cycle CAS Cycle
  40455.  
  40456. A16
  40457.  
  40458. A15 A24 A24 A13 BANK selects bank address
  40459.  
  40460. A14 A23 A23 A12
  40461.  
  40462. A13 A22 0 A11 Address precharge setting
  40463.  
  40464. A12 A21 H/L A10
  40465.  
  40466. A11 A20 0 A9 Address
  40467.  
  40468. A10 A19 A10 A8
  40469.  
  40470. A9 A18 A9 A7
  40471.  
  40472. A8 A17 A8 A6
  40473.  
  40474. A7 A16 A7 A5
  40475.  
  40476. A6 A15 A6 A4
  40477.  
  40478. A5 A14 A5 A3
  40479.  
  40480. A4 A13 A4 A2
  40481.  
  40482. A3 A12 A3 A1
  40483.  
  40484. A2 A11 A2 A0
  40485.  
  40486. A1 Not used
  40487.  
  40488. A0 Not used
  40489.  
  40490. 783
  40491.  
  40492. ----------------------- Page 800-----------------------
  40493.  
  40494. (13) BUS 64 (64M: 512k x 32b x 4) x 2
  40495. AMX 4 64M, column-addr-8bit 16MB
  40496.  
  40497. SH7750 Address Pins Synchronous Function
  40498. DRAM Address
  40499. Pins
  40500.  
  40501. RAS Cycle CAS Cycle
  40502.  
  40503. A15 A23 A23 A12 BANK selects bank address
  40504.  
  40505. A14 A22 A22 A11
  40506.  
  40507. A13 A21 H/L A10 Address precharge setting
  40508.  
  40509. A12 A20 0 A9 Address
  40510.  
  40511. A11 A19 0 A8
  40512.  
  40513. A10 A18 A10 A7
  40514.  
  40515. A9 A17 A9 A6
  40516.  
  40517. A8 A16 A8 A5
  40518.  
  40519. A7 A15 A7 A4
  40520.  
  40521. A6 A14 A6 A3
  40522.  
  40523. A5 A13 A5 A2
  40524.  
  40525. A4 A12 A4 A1
  40526.  
  40527. A3 A11 A3 A0
  40528.  
  40529. A2 Not used
  40530.  
  40531. A1 Not used
  40532.  
  40533. A0 Not used
  40534.  
  40535. 784
  40536.  
  40537. ----------------------- Page 801-----------------------
  40538.  
  40539. (14) BUS 32 (64M: 512k x 32b x 4) x 1
  40540. AMX 4 64M, column-addr-8bit 8MB
  40541.  
  40542. SH7750 Address Pins Synchronous Function
  40543. DRAM Address
  40544. Pins
  40545.  
  40546. RAS Cycle CAS Cycle
  40547.  
  40548. A15
  40549.  
  40550. A14 A22 A22 A12 BANK selects bank address
  40551.  
  40552. A13 A21 A21 A11
  40553.  
  40554. A12 A20 H/L A10 Address precharge setting
  40555.  
  40556. A11 A19 0 A9 Address
  40557.  
  40558. A10 A18 0 A8
  40559.  
  40560. A9 A17 A9 A7
  40561.  
  40562. A8 A16 A8 A6
  40563.  
  40564. A7 A15 A7 A5
  40565.  
  40566. A6 A14 A6 A4
  40567.  
  40568. A5 A13 A5 A3
  40569.  
  40570. A4 A12 A4 A2
  40571.  
  40572. A3 A11 A3 A1
  40573.  
  40574. A2 A10 A2 A0
  40575.  
  40576. A1 Not used
  40577.  
  40578. A0 Not used
  40579.  
  40580. 785
  40581.  
  40582. ----------------------- Page 802-----------------------
  40583.  
  40584. (15) BUS 64 (64M: 1M x 32b x 2) x 2
  40585. AMX 5 64M, column-addr-8bit 16MB
  40586.  
  40587. SH7750 Address Pins Synchronous Function
  40588. DRAM Address
  40589. Pins
  40590.  
  40591. RAS Cycle CAS Cycle
  40592.  
  40593. A15 A23 A23 A12 BANK selects bank address
  40594.  
  40595. A14 A22 0 A11
  40596.  
  40597. A13 A21 H/L A10 Address precharge setting
  40598.  
  40599. A12 A20 0 A9 Address
  40600.  
  40601. A11 A19 0 A8
  40602.  
  40603. A10 A18 A10 A7
  40604.  
  40605. A9 A17 A9 A6
  40606.  
  40607. A8 A16 A8 A5
  40608.  
  40609. A7 A15 A7 A4
  40610.  
  40611. A6 A14 A6 A3
  40612.  
  40613. A5 A13 A5 A2
  40614.  
  40615. A4 A12 A4 A1
  40616.  
  40617. A3 A11 A3 A0
  40618.  
  40619. A2 Not used
  40620.  
  40621. A1 Not used
  40622.  
  40623. A0 Not used
  40624.  
  40625. 786
  40626.  
  40627. ----------------------- Page 803-----------------------
  40628.  
  40629. (16) BUS 32 (64M: 1M x 32b x 2) x 1
  40630. AMX 5 64M, column-addr-8bit 8MB
  40631.  
  40632. SH7750 Address Pins Synchronous Function
  40633. DRAM Address
  40634. Pins
  40635.  
  40636. RAS Cycle CAS Cycle
  40637.  
  40638. A15
  40639.  
  40640. A14 A22 A22 A12 BANK selects bank address
  40641.  
  40642. A13 A21 0 A11
  40643.  
  40644. A12 A20 H/L A10 Address precharge setting
  40645.  
  40646. A11 A19 0 A9 Address
  40647.  
  40648. A10 A18 0 A8
  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. 787
  40671.  
  40672. ----------------------- Page 804-----------------------
  40673.  
  40674. (17) BUS 64 (16M: 256k x 32b x 2) x 2
  40675. AMX 7 16M, column-addr-8bit 4MB
  40676.  
  40677. SH7750 Address Pins Synchronous Function
  40678. DRAM Address
  40679. Pins
  40680.  
  40681. RAS Cycle CAS Cycle
  40682.  
  40683. A13 A21 A21 A10 BANK selects bank address
  40684.  
  40685. A12 A20 H/L A9 Address precharge setting
  40686.  
  40687. A11 A19 0 A8 Address
  40688.  
  40689. A10 A18 A10 A7
  40690.  
  40691. A9 A17 A9 A6
  40692.  
  40693. A8 A16 A8 A5
  40694.  
  40695. A7 A15 A7 A4
  40696.  
  40697. A6 A14 A6 A3
  40698.  
  40699. A5 A13 A5 A2
  40700.  
  40701. A4 A12 A4 A1
  40702.  
  40703. A3 A11 A3 A0
  40704.  
  40705. A2 Not used
  40706.  
  40707. A1 Not used
  40708.  
  40709. A0 Not used
  40710.  
  40711. 788
  40712.  
  40713. ----------------------- Page 805-----------------------
  40714.  
  40715. (18) BUS 32 (16M: 256k x 32b x 2) x 1
  40716. AMX 7 16M, column-addr-8bit 2MB
  40717.  
  40718. SH7750 Address Pins Synchronous Function
  40719. DRAM Address
  40720. Pins
  40721.  
  40722. RAS Cycle CAS Cycle
  40723.  
  40724. A13
  40725.  
  40726. A12 A20 A20 A10 BANK selects bank address
  40727.  
  40728. A11 A19 H/L A9 Address precharge setting
  40729.  
  40730. A10 A18 0 A8 Address
  40731.  
  40732. A9 A17 A9 A7
  40733.  
  40734. A8 A16 A8 A6
  40735.  
  40736. A7 A15 A7 A5
  40737.  
  40738. A6 A14 A6 A4
  40739.  
  40740. A5 A13 A5 A3
  40741.  
  40742. A4 A12 A4 A2
  40743.  
  40744. A3 A11 A3 A1
  40745.  
  40746. A2 A10 A2 A0
  40747.  
  40748. A1 Not used
  40749.  
  40750. A0 Not used
  40751.  
  40752. 789
  40753.  
  40754. ----------------------- Page 806-----------------------
  40755.  
  40756. Appendix G SH7750 On-Demand Data Transfer Mode
  40757.  
  40758. G.1 Pins in DDT Mode
  40759.  
  40760. Figure G.1 shows the system configuration in DDT mode.
  40761.  
  40762. /DREQ0
  40763.  
  40764. /DRACK0
  40765.  
  40766. /DREQ1
  40767.  
  40768. /DACK0
  40769.  
  40770. SH7750 ID1, ID0/DRAK1, DACK1 External device
  40771.  
  40772. CLK
  40773.  
  40774. D63–D0
  40775.  
  40776. A25–A0, RAS, CAS, WE, DQMn, CKE
  40777.  
  40778. Synchronous
  40779. DRAM
  40780.  
  40781. Figure G.1 System Configuration in On-Demand Data Transfer Mode
  40782.  
  40783. • : Data bus release request signal for transmitting the data transfer request format
  40784. (DTR format) or a DMA request from an external device to the DMAC
  40785.  
  40786. If there is a wait for release of the data bus, an external device can have the data bus
  40787. released by asserting . When is accepted, the BSC asserts .
  40788.  
  40789. • : Data bus D63–D0 release signal
  40790.  
  40791. Assertion of means that the data bus will be released two cycles later.
  40792.  
  40793. • : Transfer request signal
  40794.  
  40795. Assertion of has the following different meanings.
  40796.  
  40797.  In normal data transfer mode (except channel 0), is asserted, and at the same time
  40798. the DTR format is output, two cycles after is asserted.
  40799.  
  40800.  In the case of the handshake protocol without use of the data bus, asserting enables
  40801. a transfer request to be issued for the channel for which a transfer request was made
  40802. immediately before. This function can be used only when is not asserted two
  40803. cycles earlier.
  40804.  
  40805.  In the case of direct data transfer mode (valid only for channel 2), a direct transfer
  40806. request can be made to channel 2 by asserting and simultaneously.
  40807.  
  40808. • : Reply strobe signal for external device from DMAC
  40809.  
  40810. 790
  40811.  
  40812. ----------------------- Page 807-----------------------
  40813.  
  40814. In the case of a read cycle, the SH7750 asserts in the same cycle in which valid
  40815. read data is carried. In the case of a write cycle, the SH7750 asserts two cycles
  40816. before the valid write data output cycle.
  40817.  
  40818. • ID1, ID0: Channel number notification signals
  40819.  
  40820.  00: Channel 0 (means demand data transfer)
  40821.  
  40822.  01: Channel 1
  40823.  
  40824.  10: Channel 2
  40825.  
  40826.  11: Channel 3
  40827.  
  40828. Data Transfer Request Format
  40829.  
  40830. 63 61 60 59 57 55 48 31 0
  40831.  
  40832. SZ ID MD COUNT (Reserved) ADDRESS
  40833.  
  40834. R/W
  40835.  
  40836. Figure G.2 Data Transfer Request Format
  40837.  
  40838. The data transfer request format (DTR format) consists of 64 bits. In the case of normal data
  40839. transfer mode (channel 0, except channel 0) and the handshake protocol using the data bus,
  40840. the transfer data size, read/write access, channel number, transfer request mode, number of
  40841. transfers, and transfer source or transfer destination address are specified. A specification in
  40842. bits 47–32 is invalid.
  40843.  
  40844. In normal data transfer mode (channel 0), only single address mode can be set. With the DTR
  40845. format, DS = (0: MD = 10, 11, 1: MD = 01), RL = 0, AL = 0, DM[1:0] = 01, SM[1:0] = 01,
  40846. RS[3:0] = (0010: R/W = 0, 0011: R/W = 1), TM = (0: MD = 11, 1: MD = 01, 10), TS[2:0] =
  40847. (SZ), and IE = 0 settings are made in DMA channel control register 0, COUNT is set in
  40848. transfer count register 0, and ADDRESS is set in source/destination address register 0.
  40849. Therefore, in DDT mode, the above control registers cannot be written to by the CPU, but can
  40850. be read.
  40851.  
  40852. Bits 63 to 61: Transmit Size (SZ2–SZ0)
  40853. • 000: Byte size (8-bit) specification
  40854. • 001: Word size (16-bit) specification
  40855.  
  40856. • 010: Longword size (32-bit) specification
  40857.  
  40858. • 011: Quadword size (64-bit) specification
  40859.  
  40860. • 100: 32-byte block transfer specification
  40861.  
  40862. • 101: Reserved
  40863.  
  40864. • 110: Reserved
  40865.  
  40866. • 111: Transfer end specification
  40867.  
  40868. 791
  40869.  
  40870. ----------------------- Page 808-----------------------
  40871.  
  40872. Bit 60: Read/Write (R/W)
  40873. • 0: Memory read specification
  40874.  
  40875. • 1: Memory write specification
  40876.  
  40877. Bits 59 and 58: Channel Number (ID1, ID0)
  40878. • 00: Channel 0 (demand data transfer)
  40879.  
  40880. • 01: Channel 1
  40881.  
  40882. • 10: Channel 2
  40883.  
  40884. • 11: Channel 3
  40885.  
  40886. Bits 57 and 56: Transfer Request Mode (MD1, MD0)
  40887. • 00: Handshake protocol (data bus used)
  40888.  
  40889. • 01: Burst mode (edge detection) specification
  40890.  
  40891. • 10: Burst mode (level detection) specification
  40892.  
  40893. • 11: Cycle steal mode specification
  40894.  
  40895. Bits 55 to 48: Transfer Count (COUNT7–COUNT0)
  40896. • 00000000: Maximum number of transfers (16M)
  40897.  
  40898. Bits 47 to 32: Reserved
  40899.  
  40900. Bits 31 to 0: Address (ADDRESS31–ADDRESS0)
  40901. • R/W = 0: Transfer source address specification
  40902.  
  40903. • R/W = 1: Transfer destination address specification
  40904.  
  40905. Notes: 1. Only the ID field is valid for channels 1 to 3.
  40906.  
  40907. 2. To start data transfer on channel 0, the initial value of MD in the DTR format must
  40908. be 01, 10, or 11.
  40909.  
  40910. 3. The COUNT field is ignored if MD = 00.
  40911.  
  40912. 4. In edge-sense burst mode, DMA transfer is executed continuously. In level-sense
  40913. burst mode and cycle steal mode, a handshake protocol is used to transfer each
  40914. unit of data.
  40915.  
  40916. 5. The maximum number of transfers can be specified by setting COUNT = 0 as DTR
  40917. format initialization data. If the amount of data to be transferred is unknown, set
  40918. COUNT = 0, start DMA transfer, and transfer the DTR format (ID = 00, MD ≠ 00,
  40919. SZ = 111) when the required amount of data has been transferred. This will
  40920. terminate DMA transfer on channel 0.
  40921.  
  40922. In this case, the TE bit in DMA channel control register 0 is not set, but transfer
  40923. cannot be restarted.
  40924.  
  40925. 792
  40926.  
  40927. ----------------------- Page 809-----------------------
  40928.  
  40929. G.2 Transfer Request Acceptance on Each Channel
  40930.  
  40931. On channel 0, a DMA data transfer request can be made by means of the DTR format. No
  40932. further transfer requests are accepted between DTR format acceptance and the end of the
  40933. data transfer.
  40934.  
  40935. On channels 1 to 3, output a transfer request from an external device by means of the DTR
  40936. format (ID = 01, 10, or 11) after making DMAC control register settings in the same way as
  40937. in normal DMA mode. Each of channels 1 to 3 has a request queue that can accept up to four
  40938. transfer requests. When a request queue is full, the fifth and subsequent transfer requests will
  40939. be ignored, and so transfer requests must not be output.
  40940.  
  40941. CLK
  40942.  
  40943.  
  40944.  
  40945.  
  40946.  
  40947.  
  40948.  
  40949. A25–A0 RA CA
  40950.  
  40951. D63–D0 DTR D0 D1 D2 D3
  40952.  
  40953. RAS,
  40954. CAS, WE BA RD
  40955.  
  40956.  
  40957.  
  40958. ID1, ID0 00
  40959.  
  40960. Figure G.3 Single Address Mode/Burst Mode/External Bus → External Device 32-
  40961. Byte Block Transfer/Channel 0 On-Demand Data Transfer
  40962.  
  40963. 793
  40964.  
  40965. ----------------------- Page 810-----------------------
  40966.  
  40967. CLK
  40968.  
  40969.  
  40970.  
  40971.  
  40972.  
  40973.  
  40974.  
  40975. A25–A0 RA CA
  40976.  
  40977. D63–D0 DTR D0 D1 D2 D3
  40978.  
  40979. RAS,
  40980. BA WT
  40981. CAS, WE
  40982.  
  40983.  
  40984.  
  40985. ID1, ID0
  40986.  
  40987. Figure G.4 Single Address Mode/Burst Mode/External Device → External Bus 32-
  40988. Byte Block Transfer/Channel 0 On-Demand Data Transfer
  40989.  
  40990. CLK
  40991.  
  40992.  
  40993.  
  40994.  
  40995.  
  40996.  
  40997.  
  40998. A25–A0 RA CA CA CA
  40999.  
  41000. D63–D0 DTR D0 D1
  41001.  
  41002. RAS,
  41003. BA RD RD RD
  41004. CAS, WE
  41005.  
  41006. DQMn
  41007.  
  41008.  
  41009.  
  41010. ID1, ID0 00 00
  41011.  
  41012. Figure G.5 Single Address Mode/Burst Mode/External Bus → External Device 64-Bit
  41013. Transfer/Channel 0 On-Demand Data Transfer
  41014.  
  41015. 794
  41016.  
  41017. ----------------------- Page 811-----------------------
  41018.  
  41019. CLK
  41020.  
  41021.  
  41022.  
  41023.  
  41024.  
  41025.  
  41026.  
  41027. A25–A0 RA CA CA
  41028.  
  41029. D63–D0 DTR D0 D1
  41030.  
  41031. RAS,
  41032. BA WT WT
  41033. CAS, WE
  41034.  
  41035. DQMn
  41036.  
  41037.  
  41038.  
  41039. ID1, ID0
  41040.  
  41041. Figure G.6 Single Address Mode/Burst Mode/External Device → External Bus 64-Bit
  41042. Transfer/Channel 0 On-Demand Data Transfer
  41043.  
  41044. 795
  41045.  
  41046. ----------------------- Page 812-----------------------
  41047.  
  41048. CLK
  41049.  
  41050.  
  41051.  
  41052.  
  41053.  
  41054.  
  41055.  
  41056. A25–A0 CA CA
  41057.  
  41058. D63–D0 DTR D0 D1 D2 D3 DTR D0 D1
  41059. MD = 10 or 11 MD = 00
  41060.  
  41061. CMD WT WT
  41062.  
  41063.  
  41064.  
  41065. ID1, ID0
  41066.  
  41067. Start of data transfer Next transfer request
  41068.  
  41069. Figure G.7 Handshake Protocol Using Data Bus
  41070. (Channel 0 On-Demand Data Transfer)
  41071.  
  41072. 796
  41073.  
  41074. ----------------------- Page 813-----------------------
  41075.  
  41076. CLK
  41077.  
  41078.  
  41079.  
  41080.  
  41081.  
  41082.  
  41083.  
  41084. A25–A0 CA CA
  41085.  
  41086. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  41087. MD = 10 or 11
  41088.  
  41089. CMD WT WT
  41090.  
  41091.  
  41092.  
  41093. ID1, ID0
  41094.  
  41095. Start of data transfer Next transfer request
  41096.  
  41097. Figure G.8 Handshake Protocol without Use of Data Bus
  41098. (Channel 0 On-Demand Data Transfer)
  41099.  
  41100. CLK
  41101.  
  41102.  
  41103.  
  41104.  
  41105.  
  41106.  
  41107.  
  41108. A25–A0 RA CA
  41109.  
  41110. D63–D0 D0 D1 D2 D3
  41111.  
  41112. RAS, CAS,
  41113. BA RD
  41114. WE
  41115.  
  41116. Figure G.9 Read from Synchronous DRAM Precharge Bank
  41117.  
  41118. 797
  41119.  
  41120. ----------------------- Page 814-----------------------
  41121.  
  41122. CLK
  41123.  
  41124.  
  41125.  
  41126. Transfer requests can be accepted
  41127.  
  41128.  
  41129.  
  41130.  
  41131.  
  41132. A25–A0 RA CA
  41133.  
  41134. D63–D0 D0 D1 D2 D3
  41135.  
  41136. RAS, CAS,
  41137. PCH BA RD
  41138. WE
  41139.  
  41140. Figure G.10 Read from Synchronous DRAM Non-Precharge Bank (Row Miss)
  41141.  
  41142. CLK
  41143.  
  41144.  
  41145.  
  41146.  
  41147.  
  41148.  
  41149.  
  41150. A25–A0 CA
  41151.  
  41152. D63–D0 D0 D1 D2 D3
  41153.  
  41154. RAS, CAS,
  41155. RD
  41156. WE
  41157.  
  41158. Figure G.11 Read from Synchronous DRAM (Row Hit)
  41159.  
  41160. 798
  41161.  
  41162. ----------------------- Page 815-----------------------
  41163.  
  41164. CLK
  41165.  
  41166.  
  41167.  
  41168.  
  41169.  
  41170.  
  41171.  
  41172. A25–A0 RA CA
  41173.  
  41174. D63–D0 D0 D1 D2 D3
  41175.  
  41176. RAS, CAS,
  41177. BA WT
  41178. WE
  41179.  
  41180. Figure G.12 Write to Synchronous DRAM Precharge Bank
  41181.  
  41182. CLK
  41183.  
  41184.  
  41185.  
  41186. Transfer requests can be accepted
  41187.  
  41188.  
  41189.  
  41190.  
  41191.  
  41192. A25–A0 RA CA
  41193.  
  41194. D63–D0 D0 D1 D2 D3
  41195.  
  41196. RAS, CAS,
  41197. PCH BA WT
  41198. WE
  41199.  
  41200. Figure G.13 Write to Synchronous DRAM Non-Precharge Bank (Row Miss)
  41201.  
  41202. 799
  41203.  
  41204. ----------------------- Page 816-----------------------
  41205.  
  41206. CLK
  41207.  
  41208.  
  41209.  
  41210.  
  41211.  
  41212.  
  41213.  
  41214. A25–A0 CA
  41215.  
  41216. D63–D0 D0 D1 D2 D3
  41217.  
  41218. RAS, CAS,
  41219. WT
  41220. WE
  41221.  
  41222. Figure G.14 Write to Synchronous DRAM (Row Hit)
  41223.  
  41224. CLK
  41225.  
  41226.  
  41227.  
  41228.  
  41229.  
  41230.  
  41231.  
  41232. A25–A0 RA CA
  41233.  
  41234. D63–D0 DTR D0 D1 D2
  41235.  
  41236. RAS,
  41237. BA RD
  41238. CAS, WE
  41239.  
  41240.  
  41241.  
  41242. ID1, ID0 00
  41243.  
  41244. Figure G.15 Single Address Mode/Burst Mode/External Bus → External Device 32-
  41245. Byte Block Transfer/Channel 0 On-Demand Data Transfer
  41246.  
  41247. 800
  41248.  
  41249. ----------------------- Page 817-----------------------
  41250.  
  41251. DMA Operation Register (DMAOR)
  41252.  
  41253. 31 15 9 8 2 1 0
  41254.  
  41255. PR[1:0] AE
  41256. DDT NMIF
  41257.  
  41258. DDT: 0: Normal DMA mode DME
  41259. 1: On-demand data transfer mode
  41260.  
  41261. Figure G.16 DDT Mode Setting
  41262.  
  41263. CLK
  41264.  
  41265.  
  41266.  
  41267.  
  41268. No DMA request sampling
  41269.  
  41270.  
  41271.  
  41272. A25–A0 CA CA
  41273.  
  41274. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3 D1 D2 D3
  41275. MD = 01
  41276.  
  41277. CMD WT WT
  41278.  
  41279.  
  41280.  
  41281. ID1, ID0
  41282.  
  41283. Start of data transfer
  41284.  
  41285. Figure G.17 Single Address Mode/Burst Mode/Edge Detection/
  41286. External Device → External Bus Data Transfer
  41287.  
  41288. 801
  41289.  
  41290. ----------------------- Page 818-----------------------
  41291.  
  41292. CLK
  41293.  
  41294.  
  41295.  
  41296.  
  41297. Wait for next DMA request
  41298.  
  41299.  
  41300.  
  41301. A25–A0 CA CA
  41302.  
  41303. D63–D0 DTR D0 D1 D2 D3 D0 D1 D2 D3
  41304. MD = 10
  41305.  
  41306. CMD RD RD
  41307.  
  41308.  
  41309.  
  41310. ID1, ID0
  41311.  
  41312. Start of data transfer
  41313.  
  41314. Figure G.18 Single Address Mode/Burst Mode/Level Detection/
  41315. External Bus → External Device Data Transfer
  41316.  
  41317. CLK
  41318.  
  41319.  
  41320.  
  41321.  
  41322.  
  41323.  
  41324.  
  41325. A25–A0 CA CA CA
  41326.  
  41327. D63–D0 DTR D0 D2 D3
  41328. MD = 01 Idle cycle Idle cycle Idle cycle
  41329.  
  41330. CMD RD RD RD
  41331.  
  41332. DQMn
  41333.  
  41334.  
  41335.  
  41336. ID1, ID0
  41337.  
  41338. Figure G.19 Single Address Mode/Burst Mode/Edge Detection/Byte, Word,
  41339. Longword, Quadword/External Bus → External Device Data Transfer
  41340.  
  41341. 802
  41342.  
  41343. ----------------------- Page 819-----------------------
  41344.  
  41345. CLK
  41346.  
  41347.  
  41348.  
  41349.  
  41350.  
  41351.  
  41352.  
  41353. A25–A0 CA CA CA
  41354.  
  41355. D63–D0 DTR D0 D1 D3
  41356.  
  41357. MD = 01
  41358.  
  41359. CMD WT WT WT
  41360.  
  41361. DQMn
  41362. Idle cycle Idle cycle Idle cycle
  41363.  
  41364.  
  41365.  
  41366. ID1, ID0
  41367.  
  41368. Figure G.20 Single Address Mode/Burst Mode/Edge Detection/Byte, Word,
  41369. Longword, Quadword/External Device → External Bus Data Transfer
  41370.  
  41371. 803
  41372.  
  41373. ----------------------- Page 820-----------------------
  41374.  
  41375. CLK
  41376.  
  41377.  
  41378.  
  41379.  
  41380.  
  41381.  
  41382.  
  41383. A25–A0 RA CA
  41384.  
  41385. D63–D0 DTR D0 D1 D2 D3
  41386.  
  41387. ID = 1, 2, or 3
  41388. RAS,
  41389. BA RD
  41390. CAS, WE
  41391.  
  41392.  
  41393.  
  41394. ID1, ID0 01 or 10 or 11
  41395.  
  41396. Figure G.21 Single Address Mode/Burst Mode/32-Byte Block Transfer/DMA Transfer
  41397. Request to Channels 1–3 Using Data Bus
  41398.  
  41399. 804
  41400.  
  41401. ----------------------- Page 821-----------------------
  41402.  
  41403. CLK
  41404.  
  41405.  
  41406.  
  41407.  
  41408.  
  41409.  
  41410.  
  41411. A25–A0 RA CA
  41412.  
  41413. D63–D0 D0 D1 D2 D3
  41414.  
  41415. RAS,
  41416. BA RD
  41417. CAS, WE
  41418.  
  41419.  
  41420.  
  41421. ID1, ID0 10
  41422.  
  41423. No DTR cycle, so requests can be made at any time
  41424.  
  41425. Figure G.22 Single Address Mode/Burst Mode/32-Byte Block Transfer/
  41426. External Bus → External Device Data Transfer/
  41427. Direct Data Transfer Request to Channel 2 without Using Data Bus
  41428.  
  41429. 805
  41430.  
  41431. ----------------------- Page 822-----------------------
  41432.  
  41433. Four requests can be queued Handshaking is necessary
  41434.  
  41435. to send additional requests
  41436.  
  41437. CLK
  41438.  
  41439. 3rd 4th 5th
  41440.  
  41441.  
  41442.  
  41443.  
  41444.  
  41445. No more requests
  41446.  
  41447.  
  41448.  
  41449. A25–A0 RA CA CA CA
  41450.  
  41451. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  41452.  
  41453. RAS,
  41454. CAS, WE BA RD RD RD NOP
  41455.  
  41456.  
  41457.  
  41458. ID1, ID0
  41459.  
  41460. Must be ignored
  41461. (no request transmitted)
  41462.  
  41463. Figure G.23 Single Address Mode/Burst Mode/External Bus → External Device Data
  41464. Transfer/Direct Data Transfer Request to Channel 2
  41465.  
  41466. 806
  41467.  
  41468. ----------------------- Page 823-----------------------
  41469.  
  41470. Four requests can be queued Handshaking is necessary
  41471.  
  41472. to send additional requests
  41473.  
  41474. CLK
  41475.  
  41476. 3rd 4th 5th
  41477.  
  41478.  
  41479.  
  41480.  
  41481.  
  41482.  
  41483.  
  41484. A25–A0 RA CA CA CA
  41485.  
  41486. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  41487.  
  41488. RAS,
  41489. BA WT WT WT NOP
  41490. CAS, WE
  41491.  
  41492.  
  41493.  
  41494. ID1, ID0
  41495.  
  41496. Must be ignored
  41497. (no request transmitted)
  41498.  
  41499. Figure G.24 Single Address Mode/Burst Mode/External Device → External Bus Data
  41500. Transfer/Direct Data Transfer Request to Channel 2
  41501.  
  41502. 807
  41503.  
  41504. ----------------------- Page 824-----------------------
  41505.  
  41506. Four requests can be queued Handshaking is necessary
  41507. to send additional requests
  41508.  
  41509. CLK
  41510.  
  41511. 3rd 4th 5th
  41512.  
  41513.  
  41514.  
  41515.  
  41516.  
  41517.  
  41518.  
  41519. A25–A0 CA CA CA
  41520.  
  41521. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2
  41522.  
  41523. RAS,
  41524. RD RD RD NOP
  41525. CAS, WE
  41526.  
  41527.  
  41528.  
  41529. ID1, ID0
  41530.  
  41531. Must be ignored
  41532. (no request transmitted)
  41533.  
  41534. Figure G.25 Single Address Mode/Burst Mode/External Bus → External Device Data
  41535. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  41536.  
  41537. 808
  41538.  
  41539. ----------------------- Page 825-----------------------
  41540.  
  41541. Four requests can be queued
  41542. Handshaking is necessary
  41543. to send additional requests
  41544.  
  41545. CLK
  41546.  
  41547. 3rd 4th 5th
  41548.  
  41549.  
  41550.  
  41551.  
  41552.  
  41553.  
  41554.  
  41555. A25–A0 CA CA CA
  41556.  
  41557. D63–D0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3
  41558.  
  41559. RAS,
  41560. WT WT WT NOP
  41561. CAS, WE
  41562.  
  41563.  
  41564.  
  41565. ID1, ID0
  41566.  
  41567. Must be ignored
  41568. (no request transmitted)
  41569.  
  41570. Figure G.26 Single Address Mode/Burst Mode/External Device → External Bus Data
  41571. Transfer (Active Bank Address)/Direct Data Transfer Request to Channel 2
  41572.  
  41573. 809
  41574.  
  41575. ----------------------- Page 826-----------------------
  41576.  
  41577. SH7750 Hardware Manual
  41578.  
  41579. Publication Date:1st Edition, August 1998
  41580. 2nd Edition, March 1999
  41581. Published by: Electronic Devices Sales & Marketing Group
  41582. Hitachi, Ltd.
  41583. Edited by: Technical Documentation Group
  41584. UL Media Co., Ltd.
  41585. Copyright © Hitachi, Ltd., 1998. All rights reserved. Printed in
  41586. 810 Japan.
Advertisement
Add Comment
Please, Sign In to add comment